diff options
Diffstat (limited to 'libkdepim/categoryeditdialog.cpp')
-rw-r--r-- | libkdepim/categoryeditdialog.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp index 757848b67..719bd9209 100644 --- a/libkdepim/categoryeditdialog.cpp +++ b/libkdepim/categoryeditdialog.cpp @@ -20,12 +20,12 @@ Boston, MA 02110-1301, USA. */ -#include <qstringlist.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qlayout.h> -#include <qheader.h> -#include <qpushbutton.h> +#include <tqstringlist.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqpushbutton.h> #include <klocale.h> #include "kpimprefs.h" @@ -37,59 +37,59 @@ using namespace KPIM; class CategoryEditDialog::Private { public: - QListView *mView; - QPushButton *mAddButton; - QPushButton *mEditButton; - QPushButton *mDeleteButton; + TQListView *mView; + TQPushButton *mAddButton; + TQPushButton *mEditButton; + TQPushButton *mDeleteButton; }; class CategoryListViewItem : public QListViewItem { public: - CategoryListViewItem( QListView *view, const QString &text ) : - QListViewItem( view, text ) + CategoryListViewItem( TQListView *view, const TQString &text ) : + TQListViewItem( view, text ) { } void okRename ( int col ) // we need that public to explicitly accept renaming when closing the dialog { - QListViewItem::okRename( col ); + TQListViewItem::okRename( col ); } }; -CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, +CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent, const char* name, bool modal ) : KDialogBase::KDialogBase( parent, name, modal, i18n("Edit Categories"), Ok|Apply|Cancel|Help, Ok, true ), mPrefs( prefs ), d( new Private ) { - QWidget *widget = new QWidget( this ); + TQWidget *widget = new TQWidget( this ); setMainWidget( widget ); - QGridLayout *layout = new QGridLayout( widget, 4, 2, marginHint(), spacingHint() ); + TQGridLayout *layout = new TQGridLayout( widget, 4, 2, marginHint(), spacingHint() ); - d->mView = new QListView( widget ); + d->mView = new TQListView( widget ); d->mView->addColumn( "" ); d->mView->header()->hide(); - d->mView->setDefaultRenameAction( QListView::Accept ); + d->mView->setDefaultRenameAction( TQListView::Accept ); layout->addMultiCellWidget( d->mView, 0, 3, 0, 0 ); - d->mAddButton = new QPushButton( i18n( "Add" ), widget ); + d->mAddButton = new TQPushButton( i18n( "Add" ), widget ); layout->addWidget( d->mAddButton, 0, 1 ); - d->mEditButton = new QPushButton( i18n( "Edit" ), widget ); + d->mEditButton = new TQPushButton( i18n( "Edit" ), widget ); layout->addWidget( d->mEditButton, 1, 1 ); - d->mDeleteButton = new QPushButton( i18n( "Remove" ), widget ); + d->mDeleteButton = new TQPushButton( i18n( "Remove" ), widget ); layout->addWidget( d->mDeleteButton, 2, 1 ); fillList(); - connect( d->mAddButton, SIGNAL( clicked() ), this, SLOT( add() ) ); - connect( d->mEditButton, SIGNAL( clicked() ), this, SLOT( edit() ) ); - connect( d->mDeleteButton, SIGNAL( clicked() ), this, SLOT( remove() ) ); + connect( d->mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( add() ) ); + connect( d->mEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( edit() ) ); + connect( d->mDeleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( remove() ) ); } /* @@ -103,12 +103,12 @@ CategoryEditDialog::~CategoryEditDialog() void CategoryEditDialog::fillList() { d->mView->clear(); - QStringList::Iterator it; + TQStringList::Iterator it; bool categoriesExist=false; for ( it = mPrefs->mCustomCategories.begin(); it != mPrefs->mCustomCategories.end(); ++it ) { - QListViewItem *item = new CategoryListViewItem( d->mView, *it ); + TQListViewItem *item = new CategoryListViewItem( d->mView, *it ); item->setRenameEnabled( 0, true ); categoriesExist = true; @@ -124,7 +124,7 @@ void CategoryEditDialog::add() if ( d->mView->firstChild() ) d->mView->setCurrentItem( d->mView->firstChild() ); - QListViewItem *item = new CategoryListViewItem( d->mView, i18n( "New category" ) ); + TQListViewItem *item = new CategoryListViewItem( d->mView, i18n( "New category" ) ); item->setRenameEnabled( 0, true ); d->mView->setSelected( item, true ); @@ -168,7 +168,7 @@ void CategoryEditDialog::slotApply() { mPrefs->mCustomCategories.clear(); - QListViewItem *item = d->mView->firstChild(); + TQListViewItem *item = d->mView->firstChild(); while ( item ) { if ( !item->text( 0 ).isEmpty() ) mPrefs->mCustomCategories.append( item->text( 0 ) ); |