diff options
Diffstat (limited to 'kaddressbook/filtereditdialog.cpp')
-rw-r--r-- | kaddressbook/filtereditdialog.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index 40c0f077c..2b6607376 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -21,17 +21,17 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqwidget.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -45,17 +45,17 @@ #include "kabprefs.h" #include "filtereditdialog.h" -FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name ) +FilterEditDialog::FilterEditDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Edit Address Book Filter" ), Help | Ok | Cancel, Ok, parent, name, false, true ) { initGUI(); - const QStringList cats = KABPrefs::instance()->customCategories(); + const TQStringList cats = KABPrefs::instance()->customCategories(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = cats.begin(); it != cats.end(); ++it ) - mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ) ); + mCategoriesView->insertItem( new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox ) ); filterNameTextChanged( mNameEdit->text() ); } @@ -68,11 +68,11 @@ void FilterEditDialog::setFilter( const Filter &filter ) { mNameEdit->setText( filter.name() ); - QStringList categories = filter.categories(); - QListViewItem *item = mCategoriesView->firstChild(); + TQStringList categories = filter.categories(); + TQListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { if ( categories.contains( item->text( 0 ) ) ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item ); checkItem->setOn( true ); } @@ -91,10 +91,10 @@ Filter FilterEditDialog::filter() filter.setName( mNameEdit->text() ); - QStringList categories; - QListViewItem *item = mCategoriesView->firstChild(); + TQStringList categories; + TQListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item ); if ( checkItem->isOn() ) categories.append( item->text( 0 ) ); @@ -114,44 +114,44 @@ void FilterEditDialog::initGUI() { resize( 490, 300 ); - QWidget *page = plainPage(); - QLabel *label; + TQWidget *page = plainPage(); + TQLabel *label; - QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); + TQGridLayout *topLayout = new TQGridLayout( page, 3, 2, 0, spacingHint() ); - label = new QLabel( i18n( "Name:" ), page ); + label = new TQLabel( i18n( "Name:" ), page ); mNameEdit = new KLineEdit( page ); mNameEdit->setFocus(); topLayout->addWidget( label, 0, 0 ); topLayout->addWidget( mNameEdit, 0, 1 ); - connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( filterNameTextChanged( const QString&) ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( filterNameTextChanged( const TQString&) ) ); mCategoriesView = new KListView( page ); mCategoriesView->addColumn( i18n( "Category" ) ); mCategoriesView->setFullWidth( true ); topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); - mMatchRuleGroup = new QButtonGroup( page ); + mMatchRuleGroup = new TQButtonGroup( page ); mMatchRuleGroup->setExclusive( true ); - QBoxLayout *gbLayout = new QVBoxLayout( mMatchRuleGroup ); + TQBoxLayout *gbLayout = new TQVBoxLayout( mMatchRuleGroup ); gbLayout->setSpacing( KDialog::spacingHint() ); gbLayout->setMargin( KDialog::marginHint() ); - QRadioButton *radio = new QRadioButton( i18n( "Show only contacts matching the selected categories" ), mMatchRuleGroup ); + TQRadioButton *radio = new TQRadioButton( i18n( "Show only contacts matching the selected categories" ), mMatchRuleGroup ); radio->setChecked( true ); mMatchRuleGroup->insert( radio ); gbLayout->addWidget( radio ); - radio = new QRadioButton( i18n( "Show all contacts except those matching the selected categories" ), mMatchRuleGroup ); + radio = new TQRadioButton( i18n( "Show all contacts except those matching the selected categories" ), mMatchRuleGroup ); mMatchRuleGroup->insert( radio ); gbLayout->addWidget( radio ); topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); } -void FilterEditDialog::filterNameTextChanged( const QString &text ) +void FilterEditDialog::filterNameTextChanged( const TQString &text ) { enableButtonOK( !text.isEmpty() ); } @@ -161,7 +161,7 @@ void FilterEditDialog::slotHelp() kapp->invokeHelp( "using-filters" ); } -FilterDialog::FilterDialog( QWidget *parent, const char *name ) +FilterDialog::FilterDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Edit Address Book Filters" ), Ok | Cancel, Ok, parent, name, false, true ) { @@ -242,7 +242,7 @@ void FilterDialog::refresh() mFilterListBox->insertItem( (*it).name() ); } -void FilterDialog::selectionChanged( QListBoxItem *item ) +void FilterDialog::selectionChanged( TQListBoxItem *item ) { bool state = ( item != 0 ); @@ -254,22 +254,22 @@ void FilterDialog::initGUI() { resize( 330, 200 ); - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); + TQGridLayout *topLayout = new TQGridLayout( page, 1, 2, 0, spacingHint() ); mFilterListBox = new KListBox( page ); topLayout->addWidget( mFilterListBox, 0, 0 ); - connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ), - SLOT( selectionChanged( QListBoxItem * ) ) ); - connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ), - SLOT( edit() ) ); + connect( mFilterListBox, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), + TQT_SLOT( selectionChanged( TQListBoxItem * ) ) ); + connect( mFilterListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), + TQT_SLOT( edit() ) ); KButtonBox *buttonBox = new KButtonBox( page, Vertical ); - buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) ); - mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) ); + buttonBox->addButton( i18n( "&Add..." ), this, TQT_SLOT( add() ) ); + mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, TQT_SLOT( edit() ) ); mEditButton->setEnabled( false ); - mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT( remove() ) ); + mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, TQT_SLOT( remove() ) ); mRemoveButton->setEnabled( false ); buttonBox->layout(); |