diff options
Diffstat (limited to 'src/bookmarksdlg.cpp')
-rw-r--r-- | src/bookmarksdlg.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/bookmarksdlg.cpp b/src/bookmarksdlg.cpp index f3bd823..772664b 100644 --- a/src/bookmarksdlg.cpp +++ b/src/bookmarksdlg.cpp @@ -18,83 +18,83 @@ ***************************************************************************/ #include <kdialog.h> #include <klocale.h> -#include <qvariant.h> -#include <qpushbutton.h> -#include <qheader.h> -#include <qtable.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqvariant.h> +#include <tqpushbutton.h> +#include <tqheader.h> +#include <tqtable.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "bookmarksdlg.h" /* - * Constructs a BookmarksDlg as a child of 'parent', with the + * Constructs a BookmarksDlg as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -BookmarksDlg::BookmarksDlg(const Bookmarks& bms, QWidget* parent, +BookmarksDlg::BookmarksDlg(const Bookmarks& bms, TQWidget* tqparent, const char* name, bool modal, WFlags fl) - : QDialog(parent, name, modal, fl), + : TQDialog(tqparent, name, modal, fl), m_bookmarks(bms) { if ( !name ) setName( "BookmarksDlg" ); setSizeGripEnabled(TRUE); - BookmarksDlgLayout = new QVBoxLayout( this, 11, 6, "BookmarksDlgLayout"); + BookmarksDlgLayout = new TQVBoxLayout( this, 11, 6, "BookmarksDlgLayout"); - layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); + tqlayout3 = new TQHBoxLayout( 0, 0, 6, "tqlayout3"); - bookmarksTable = new QTable(3, 2, this, "bookmarksList" ); + bookmarksTable = new TQTable(3, 2, this, "bookmarksList" ); bookmarksTable->horizontalHeader()->setLabel(0, "Title"); bookmarksTable->horizontalHeader()->setLabel(1, "Page number"); // bookmarksTable->setLeftMargin(0); bookmarksTable->setColumnStretchable(0, true); - bookmarksTable->setSelectionMode(QTable::SingleRow); - layout3->addWidget( bookmarksTable ); + bookmarksTable->setSelectionMode(TQTable::SingleRow); + tqlayout3->addWidget( bookmarksTable ); - layout2 = new QVBoxLayout( 0, 0, 6, "layout2"); + tqlayout2 = new TQVBoxLayout( 0, 0, 6, "tqlayout2"); - addButton = new QPushButton( this, "addButton" ); - layout2->addWidget( addButton ); + addButton = new TQPushButton( this, "addButton" ); + tqlayout2->addWidget( addButton ); - deleteButton = new QPushButton( this, "deleteButton" ); - layout2->addWidget( deleteButton ); - Horizontal_Spacing2_2 = new QSpacerItem( 20, 60, QSizePolicy::Minimum, QSizePolicy::Expanding ); - layout2->addItem( Horizontal_Spacing2_2 ); - layout3->addLayout( layout2 ); - BookmarksDlgLayout->addLayout( layout3 ); + deleteButton = new TQPushButton( this, "deleteButton" ); + tqlayout2->addWidget( deleteButton ); + Horizontal_Spacing2_2 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); + tqlayout2->addItem( Horizontal_Spacing2_2 ); + tqlayout3->addLayout( tqlayout2 ); + BookmarksDlgLayout->addLayout( tqlayout3 ); - Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); + Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); - buttonHelp = new QPushButton( this, "buttonHelp" ); + buttonHelp = new TQPushButton( this, "buttonHelp" ); buttonHelp->setAutoDefault( TRUE ); Layout1->addWidget( buttonHelp ); - Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); Layout1->addItem( Horizontal_Spacing2 ); - buttonOk = new QPushButton( this, "buttonOk" ); + buttonOk = new TQPushButton( this, "buttonOk" ); buttonOk->setAutoDefault( TRUE ); buttonOk->setDefault( TRUE ); Layout1->addWidget( buttonOk ); - buttonCancel = new QPushButton( this, "buttonCancel" ); + buttonCancel = new TQPushButton( this, "buttonCancel" ); buttonCancel->setAutoDefault( TRUE ); Layout1->addWidget( buttonCancel ); BookmarksDlgLayout->addLayout( Layout1 ); languageChange(); - resize( QSize(400, 267).expandedTo(minimumSizeHint()) ); + resize( TQSize(400, 267).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); updateBookmarks(); // signals and slots connections - connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); - connect(addButton, SIGNAL(clicked()), this, SLOT(addBookmark())); - connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteBookmark())); - connect(bookmarksTable, SIGNAL(valueChanged(int, int)), this, SLOT(valueChanged(int, int))); + connect(buttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(buttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addBookmark())); + connect(deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteBookmark())); + connect(bookmarksTable, TQT_SIGNAL(valueChanged(int, int)), this, TQT_SLOT(valueChanged(int, int))); } /* @@ -102,7 +102,7 @@ BookmarksDlg::BookmarksDlg(const Bookmarks& bms, QWidget* parent, */ BookmarksDlg::~BookmarksDlg() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* @@ -115,11 +115,11 @@ void BookmarksDlg::languageChange() addButton->setText( tr2i18n( "Add" ) ); deleteButton->setText( tr2i18n( "Delete" ) ); buttonHelp->setText( tr2i18n( "&Help" ) ); - buttonHelp->setAccel( QKeySequence( tr2i18n( "F1" ) ) ); + buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) ); buttonOk->setText( tr2i18n( "&OK" ) ); - buttonOk->setAccel( QKeySequence( QString::null ) ); + buttonOk->setAccel( TQKeySequence( TQString() ) ); buttonCancel->setText( tr2i18n( "Ca&ncel" ) ); - buttonCancel->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) ); + buttonCancel->setAccel( TQKeySequence( tr2i18n( "Alt+N" ) ) ); } void BookmarksDlg::addBookmark() @@ -147,7 +147,7 @@ void BookmarksDlg::updateBookmarks() const Bookmark& bm = m_bookmarks[i]; bookmarksTable->setNumRows(i+1); bookmarksTable->setText(i, 0, bm.name()); - bookmarksTable->setText(i, 1, QString::number(bm.page())); + bookmarksTable->setText(i, 1, TQString::number(bm.page())); } } @@ -167,7 +167,7 @@ void BookmarksDlg::valueChanged(int row, int col) bm.setPage(page); else //return old value - bookmarksTable->setText(row, col, QString::number(bm.page())); + bookmarksTable->setText(row, col, TQString::number(bm.page())); } } |