diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-07-31 17:02:11 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-07-31 17:02:11 +0200 |
commit | 5f9410ae910e73f8966318d1e1b9be03a5651118 (patch) | |
tree | d46a2a2135dbed62dc978bed61ede6376263463b /krecipes/src/dialogs/selectcategoriesdialog.cpp | |
parent | 40d6261f7d30d372f6a0c9ffdd9fe1cd5b1d1002 (diff) | |
download | krecipes-5f9410ae910e73f8966318d1e1b9be03a5651118.tar.gz krecipes-5f9410ae910e73f8966318d1e1b9be03a5651118.zip |
Initial TQt conversion
Diffstat (limited to 'krecipes/src/dialogs/selectcategoriesdialog.cpp')
-rw-r--r-- | krecipes/src/dialogs/selectcategoriesdialog.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/krecipes/src/dialogs/selectcategoriesdialog.cpp b/krecipes/src/dialogs/selectcategoriesdialog.cpp index bfe57db..6674182 100644 --- a/krecipes/src/dialogs/selectcategoriesdialog.cpp +++ b/krecipes/src/dialogs/selectcategoriesdialog.cpp @@ -13,7 +13,7 @@ #include "selectcategoriesdialog.h" #include "createcategorydialog.h" -#include <qvbox.h> +#include <ntqvbox.h> #include <klocale.h> #include <kdebug.h> @@ -24,12 +24,12 @@ #include "backends/recipedb.h" #include "widgets/categorylistview.h" -SelectCategoriesDialog::SelectCategoriesDialog( QWidget *parent, const ElementList &items_on, RecipeDB *db ) +SelectCategoriesDialog::SelectCategoriesDialog( TQWidget *parent, const ElementList &items_on, RecipeDB *db ) : KDialogBase( parent, "SelectCategoriesDialog", true, i18n("Categories"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok ), database(db) { - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); //Design UI @@ -38,7 +38,7 @@ SelectCategoriesDialog::SelectCategoriesDialog( QWidget *parent, const ElementLi categoryListView->reload(); //New category button - QPushButton *newCatButton = new QPushButton( page ); + TQPushButton *newCatButton = new TQPushButton( page ); newCatButton->setText( i18n( "&New Category..." ) ); newCatButton->setFlat( true ); @@ -65,7 +65,7 @@ void SelectCategoriesDialog::loadCategories( const ElementList &items_on ) ElementList::const_iterator it; for ( it = items_on.begin(); it != items_on.end(); ++it ) { - CategoryCheckListItem *new_item = (CategoryCheckListItem*)categoryListView->findItem(QString::number((*it).id),1); + CategoryCheckListItem *new_item = (CategoryCheckListItem*)categoryListView->findItem(TQString::number((*it).id),1); if ( new_item ) { new_item->setOn(true); } @@ -78,13 +78,13 @@ void SelectCategoriesDialog::createNewCategory( void ) database->loadCategories( &categories ); CreateCategoryDialog* categoryDialog = new CreateCategoryDialog( this, categories ); - if ( categoryDialog->exec() == QDialog::Accepted ) { - QString result = categoryDialog->newCategoryName(); + if ( categoryDialog->exec() == TQDialog::Accepted ) { + TQString result = categoryDialog->newCategoryName(); int subcategory = categoryDialog->subcategory(); //check bounds first if ( result.length() > uint(database->maxCategoryNameLength()) ) { - KMessageBox::error( this, QString( i18n( "Category name cannot be longer than %1 characters." ) ).arg( database->maxCategoryNameLength() ) ); + KMessageBox::error( this, TQString( i18n( "Category name cannot be longer than %1 characters." ) ).arg( database->maxCategoryNameLength() ) ); return ; } @@ -92,7 +92,7 @@ void SelectCategoriesDialog::createNewCategory( void ) //a listview item will automatically be created, but we need to turn it on Element new_cat( result, database->lastInsertID() ); - QCheckListItem *new_item = ((QCheckListItem*)categoryListView->findItem( QString::number(new_cat.id), 1 )); + TQCheckListItem *new_item = ((TQCheckListItem*)categoryListView->findItem( TQString::number(new_cat.id), 1 )); if ( new_item ) new_item->setOn(true); } |