diff options
Diffstat (limited to 'krecipes/src/dialogs/selectauthorsdialog.cpp')
-rw-r--r-- | krecipes/src/dialogs/selectauthorsdialog.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/krecipes/src/dialogs/selectauthorsdialog.cpp b/krecipes/src/dialogs/selectauthorsdialog.cpp index 9618253..d400aef 100644 --- a/krecipes/src/dialogs/selectauthorsdialog.cpp +++ b/krecipes/src/dialogs/selectauthorsdialog.cpp @@ -12,8 +12,8 @@ #include "selectauthorsdialog.h" -#include <qmessagebox.h> -#include <qvbox.h> +#include <ntqmessagebox.h> +#include <ntqvbox.h> #include <kconfig.h> #include <kdialog.h> @@ -23,39 +23,39 @@ #include "backends/recipedb.h" -SelectAuthorsDialog::SelectAuthorsDialog( QWidget *parent, const ElementList ¤tAuthors, RecipeDB *db ) +SelectAuthorsDialog::SelectAuthorsDialog( TQWidget *parent, const ElementList ¤tAuthors, RecipeDB *db ) : KDialogBase( parent, "SelectAuthorsDialog", true, i18n("Authors"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok ), database(db) { - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); //Design UI // Combo to Pick authors - QHBox *topBox = new QHBox(page); + TQHBox *topBox = new TQHBox(page); topBox->setSpacing(6); authorsCombo = new KComboBox( true, topBox ); - authorsCombo->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); + authorsCombo->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ) ); authorsCombo->completionObject() ->setCompletionMode( KGlobalSettings::CompletionPopupAuto ); authorsCombo->lineEdit() ->disconnect( authorsCombo ); //so hitting enter doesn't enter the item into the box // Add/Remove buttons il = new KIconLoader; - addAuthorButton = new QPushButton( topBox ); - QPixmap pm = il->loadIcon( "down", KIcon::NoGroup, 16 ); + addAuthorButton = new TQPushButton( topBox ); + TQPixmap pm = il->loadIcon( "down", KIcon::NoGroup, 16 ); addAuthorButton->setIconSet( pm ); - removeAuthorButton = new QPushButton( topBox ); + removeAuthorButton = new TQPushButton( topBox ); pm = il->loadIcon( "up", KIcon::NoGroup, 16 ); removeAuthorButton->setIconSet( pm ); // Author List authorListView = new KListView( page ); - authorListView->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); + authorListView->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ) ); KConfig * config = KGlobal::config(); config->setGroup( "Advanced" ); @@ -74,7 +74,7 @@ SelectAuthorsDialog::SelectAuthorsDialog( QWidget *parent, const ElementList &cu connect ( addAuthorButton, SIGNAL( clicked() ), this, SLOT( addAuthor() ) ); connect ( removeAuthorButton, SIGNAL( clicked() ), this, SLOT( removeAuthor() ) ); - authorsCombo->setEditText(QString::null); + authorsCombo->setEditText(TQString::null); authorsCombo->lineEdit()->setFocus(); } @@ -84,7 +84,7 @@ SelectAuthorsDialog::~SelectAuthorsDialog() void SelectAuthorsDialog::getSelectedAuthors( ElementList *newAuthors ) { - for ( QListViewItem * it = authorListView->firstChild();it; it = it->nextSibling() ) { + for ( TQListViewItem * it = authorListView->firstChild();it; it = it->nextSibling() ) { Element author; author.id = it->text( 0 ).toInt(); author.name = it->text( 1 ); @@ -102,7 +102,7 @@ void SelectAuthorsDialog::loadAuthors( const ElementList ¤tAuthors ) // Load the ListView with the authors of this recipe authorListView->clear(); for ( ElementList::const_iterator author_it = currentAuthors.begin(); author_it != currentAuthors.end(); ++author_it ) { - ( void ) new QListViewItem( authorListView, QString::number( ( *author_it ).id ), ( *author_it ).name ); + ( void ) new TQListViewItem( authorListView, TQString::number( ( *author_it ).id ), ( *author_it ).name ); } } @@ -111,7 +111,7 @@ void SelectAuthorsDialog::addAuthor( void ) { //check bounds first if ( authorsCombo->currentText().length() > uint(database->maxAuthorNameLength()) ) { - KMessageBox::error( this, QString( i18n( "Author name cannot be longer than %1 characters." ) ).arg( database->maxAuthorNameLength() ) ); + KMessageBox::error( this, TQString( i18n( "Author name cannot be longer than %1 characters." ) ).arg( database->maxAuthorNameLength() ) ); authorsCombo->lineEdit() ->selectAll(); return ; } @@ -127,14 +127,14 @@ void SelectAuthorsDialog::addAuthor( void ) int currentItem = authorsCombo->currentItem(); Element currentElement = authorList.getElement( currentItem ); - ( void ) new QListViewItem( authorListView, QString::number( currentElement.id ), currentElement.name ); + ( void ) new TQListViewItem( authorListView, TQString::number( currentElement.id ), currentElement.name ); } void SelectAuthorsDialog::removeAuthor( void ) { // Find the selected item first - QListViewItem * it; + TQListViewItem * it; it = authorListView->selectedItem(); if ( it ) { // Check if an author is selected first @@ -149,7 +149,7 @@ void SelectAuthorsDialog::createNewAuthorIfNecessary( void ) if ( !authorsCombo->contains( authorsCombo->currentText() ) && !( authorsCombo->currentText().stripWhiteSpace() ).isEmpty() ) // author is not in the list and is not empty { // Create new author - QString newAuthorName = authorsCombo->currentText(); + TQString newAuthorName = authorsCombo->currentText(); database->createNewAuthor( newAuthorName ); //List again the authors reloadAuthorsCombo(); |