diff options
Diffstat (limited to 'kaddressbook/xxportselectdialog.cpp')
-rw-r--r-- | kaddressbook/xxportselectdialog.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index a32c10807..1cbf75a56 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp @@ -27,16 +27,16 @@ #include <kcombobox.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qstringlist.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqstringlist.h> +#include <tqwhatsthis.h> #include "core.h" #include "kabprefs.h" @@ -44,22 +44,22 @@ #include "xxportselectdialog.h" XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( Plain, i18n( "Choose Which Contacts to Export" ), Help | Ok | Cancel, Ok, parent, name, true, true ), mCore( core ), mUseSorting( sort ) { initGUI(); - connect( mFiltersCombo, SIGNAL( activated( int ) ), - SLOT( filterChanged( int ) ) ); - connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( categoryClicked( QListViewItem* ) ) ); + connect( mFiltersCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( filterChanged( int ) ) ); + connect( mCategoriesView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + TQT_SLOT( categoryClicked( TQListViewItem* ) ) ); // setup filters mFilters = Filter::restore( kapp->config(), "Filter" ); Filter::List::ConstIterator filterIt; - QStringList filters; + TQStringList filters; for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt ) filters.append( (*filterIt).name() ); @@ -67,10 +67,10 @@ XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort, mUseFilters->setEnabled( filters.count() > 0 ); // setup categories - const QStringList categories = KABPrefs::instance()->customCategories(); - QStringList::ConstIterator it; + const TQStringList categories = KABPrefs::instance()->customCategories(); + TQStringList::ConstIterator it; for ( it = categories.begin(); it != categories.end(); ++it ) - new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); + new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox ); mUseCategories->setEnabled( categories.count() > 0 ); int count = mCore->selectedUIDs().count(); @@ -88,11 +88,11 @@ XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort, KABC::AddresseeList XXPortSelectDialog::contacts() { - const QStringList selection = mCore->selectedUIDs(); + const TQStringList selection = mCore->selectedUIDs(); KABC::AddresseeList list; if ( mUseSelection->isChecked() ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = selection.begin(); it != selection.end(); ++it ) { KABC::Addressee addr = mCore->addressBook()->findByUid( *it ); if ( !addr.isEmpty() ) @@ -111,13 +111,13 @@ KABC::AddresseeList XXPortSelectDialog::contacts() list.append( *it ); } } else if ( mUseCategories->isChecked() ) { - const QStringList categorieList = categories(); + const TQStringList categorieList = categories(); KABC::AddressBook::ConstIterator it; KABC::AddressBook::ConstIterator addressBookEnd( mCore->addressBook()->end() ); for ( it = mCore->addressBook()->begin(); it != addressBookEnd; ++it ) { - const QStringList tmp( (*it).categories() ); - QStringList::ConstIterator tmpIt; + const TQStringList tmp( (*it).categories() ); + TQStringList::ConstIterator tmpIt; for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) if ( categorieList.contains( *tmpIt ) ) { list.append( *it ); @@ -141,13 +141,13 @@ KABC::AddresseeList XXPortSelectDialog::contacts() return list; } -QStringList XXPortSelectDialog::categories() const +TQStringList XXPortSelectDialog::categories() const { - QStringList list; + TQStringList list; - QListViewItemIterator it( mCategoriesView ); + TQListViewItemIterator it( mCategoriesView ); for ( ; it.current(); ++it ) { - QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current()); + TQCheckListItem* qcli = static_cast<TQCheckListItem*>(it.current()); if ( qcli->isOn() ) list.append( it.current()->text( 0 ) ); } @@ -160,12 +160,12 @@ void XXPortSelectDialog::filterChanged( int ) mUseFilters->setChecked( true ); } -void XXPortSelectDialog::categoryClicked( QListViewItem *i ) +void XXPortSelectDialog::categoryClicked( TQListViewItem *i ) { if ( !i ) return; - QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); + TQCheckListItem *qcli = static_cast<TQCheckListItem*>( i ); if ( qcli->isOn() ) mUseCategories->setChecked( true ); } @@ -177,66 +177,66 @@ void XXPortSelectDialog::slotHelp() void XXPortSelectDialog::initGUI() { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHint(), + TQVBoxLayout *topLayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Which contacts do you want to export?" ), page ); + TQLabel *label = new TQLabel( i18n( "Which contacts do you want to export?" ), page ); topLayout->addWidget( label ); - mButtonGroup = new QButtonGroup( i18n( "Selection" ), page ); + mButtonGroup = new TQButtonGroup( i18n( "Selection" ), page ); mButtonGroup->setColumnLayout( 0, Qt::Vertical ); mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); mButtonGroup->layout()->setMargin( KDialog::marginHint() ); - QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); + TQGridLayout *groupLayout = new TQGridLayout( mButtonGroup->layout() ); groupLayout->setAlignment( Qt::AlignTop ); - mUseWholeBook = new QRadioButton( i18n( "&All contacts" ), mButtonGroup ); + mUseWholeBook = new TQRadioButton( i18n( "&All contacts" ), mButtonGroup ); mUseWholeBook->setChecked( true ); - QWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) ); + TQWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) ); groupLayout->addWidget( mUseWholeBook, 0, 0 ); - mUseSelection = new QRadioButton( i18n("&Selected contact", "&Selected contacts (%n selected)", mCore->selectedUIDs().count() ), mButtonGroup ); - QWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n" + mUseSelection = new TQRadioButton( i18n("&Selected contact", "&Selected contacts (%n selected)", mCore->selectedUIDs().count() ), mButtonGroup ); + TQWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n" "This option is disabled if no contacts are selected." ) ); groupLayout->addWidget( mUseSelection, 1, 0 ); - mUseFilters = new QRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup ); - QWhatsThis::add( mUseFilters, i18n( "Only export contacts matching the selected filter.\n" + mUseFilters = new TQRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup ); + TQWhatsThis::add( mUseFilters, i18n( "Only export contacts matching the selected filter.\n" "This option is disabled if you have not defined any filters" ) ); groupLayout->addWidget( mUseFilters, 2, 0 ); - mUseCategories = new QRadioButton( i18n( "Category &members" ), mButtonGroup ); - QWhatsThis::add( mUseCategories, i18n( "Only export contacts who are members of a category that is checked on the list to the left.\n" + mUseCategories = new TQRadioButton( i18n( "Category &members" ), mButtonGroup ); + TQWhatsThis::add( mUseCategories, i18n( "Only export contacts who are members of a category that is checked on the list to the left.\n" "This option is disabled if you have no categories." ) ); groupLayout->addWidget( mUseCategories, 3, 0, Qt::AlignTop ); - mFiltersCombo = new QComboBox( false, mButtonGroup ); - QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) ); + mFiltersCombo = new TQComboBox( false, mButtonGroup ); + TQWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) ); groupLayout->addWidget( mFiltersCombo, 2, 1 ); - mCategoriesView = new QListView( mButtonGroup ); + mCategoriesView = new TQListView( mButtonGroup ); mCategoriesView->addColumn( "" ); mCategoriesView->header()->hide(); - QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) ); + TQWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) ); groupLayout->addWidget( mCategoriesView, 3, 1 ); topLayout->addWidget( mButtonGroup ); - QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); + TQButtonGroup *sortingGroup = new TQButtonGroup( i18n( "Sorting" ), page ); sortingGroup->setColumnLayout( 0, Qt::Vertical ); - QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, + TQGridLayout *sortLayout = new TQGridLayout( sortingGroup->layout(), 2, 2, KDialog::spacingHint() ); sortLayout->setAlignment( Qt::AlignTop ); - label = new QLabel( i18n( "Criterion:" ), sortingGroup ); + label = new TQLabel( i18n( "Criterion:" ), sortingGroup ); sortLayout->addWidget( label, 0, 0 ); mFieldCombo = new KComboBox( false, sortingGroup ); sortLayout->addWidget( mFieldCombo, 0, 1 ); - label = new QLabel( i18n( "Order:" ), sortingGroup ); + label = new TQLabel( i18n( "Order:" ), sortingGroup ); sortLayout->addWidget( label, 1, 0 ); mSortTypeCombo = new KComboBox( false, sortingGroup ); |