summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxportselectdialog.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/xxportselectdialog.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/xxportselectdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportselectdialog.cpp59
1 files changed, 31 insertions, 28 deletions
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index 278cab0..088bffa 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -36,16 +36,21 @@ $Id$
#include <kglobal.h>
#include <qapplication.h>
-#include <qbuttongroup.h>
+#include <QDesktopWidget>
+#include <q3buttongroup.h>
#include <qcombobox.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <Q3VBoxLayout>
#include "kabcore.h"
#include "kabprefs.h"
@@ -62,8 +67,8 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
connect( mFiltersCombo, SIGNAL( activated( int ) ),
SLOT( filterChanged( int ) ) );
- connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( categoryClicked( QListViewItem* ) ) );
+ connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ),
+ SLOT( categoryClicked( Q3ListViewItem* ) ) );
// setup filters
#ifndef KAB_EMBEDDED
@@ -84,7 +89,7 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
QStringList categories = KABPrefs::instance()->mCustomCategories;
QStringList::Iterator it;
for ( it = categories.begin(); it != categories.end(); ++it )
- new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox );
+ new Q3CheckListItem( mCategoriesView, *it, Q3CheckListItem::CheckBox );
mUseCategories->setEnabled( categories.count() > 0 );
int count = mCore->selectedUIDs().count();
@@ -210,9 +215,9 @@ QStringList XXPortSelectDialog::categories() const
{
QStringList list;
- QListViewItemIterator it( mCategoriesView );
+ Q3ListViewItemIterator it( mCategoriesView );
for ( ; it.current(); ++it ) {
- QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current());
+ Q3CheckListItem* qcli = static_cast<Q3CheckListItem*>(it.current());
if ( qcli->isOn() )
list.append( it.current()->text( 0 ) );
}
@@ -225,9 +230,9 @@ void XXPortSelectDialog::filterChanged( int )
mUseFilters->setChecked( true );
}
-void XXPortSelectDialog::categoryClicked( QListViewItem *i )
+void XXPortSelectDialog::categoryClicked( Q3ListViewItem *i )
{
- QCheckListItem *qcli = static_cast<QCheckListItem*>( i );
+ Q3CheckListItem *qcli = static_cast<Q3CheckListItem*>( i );
if ( qcli->isOn() )
mUseCategories->setChecked( true );
}
@@ -244,60 +249,60 @@ void XXPortSelectDialog::slotHelp()
void XXPortSelectDialog::initGUI()
{
- QFrame *page = plainPage();
+ Q3Frame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHintSmall(),
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( page, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page );
topLayout->addWidget( label );
- mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page );
+ mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page );
mButtonGroup->setColumnLayout( 0, Qt::Vertical );
mButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
mButtonGroup->layout()->setMargin( KDialog::marginHint() );
- QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() );
+ Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() );
groupLayout->setAlignment( Qt::AlignTop );
mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup );
mUseWholeBook->setChecked( true );
- QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) );
+ Q3WhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) );
groupLayout->addWidget( mUseWholeBook, 0, 0 );
mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup );
- QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
+ Q3WhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
"This option is disabled if no contacts are selected." ) );
groupLayout->addWidget( mUseSelection, 1, 0 );
mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup );
- QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
+ Q3WhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
"This option is disabled if you haven't defined any filters" ) );
groupLayout->addWidget( mUseFilters, 2, 0 );
mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup );
- QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n"
+ Q3WhatsThis::add( mUseCategories, i18n( "Only 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 );
mFiltersCombo = new QComboBox( false, mButtonGroup );
mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
+ Q3WhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
groupLayout->addWidget( mFiltersCombo, 2, 1 );
- mCategoriesView = new QListView( mButtonGroup );
+ mCategoriesView = new Q3ListView( mButtonGroup );
mCategoriesView->addColumn( "" );
mCategoriesView->header()->hide();
- QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
+ Q3WhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
groupLayout->addWidget( mCategoriesView, 3, 1 );
mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
//if (QApplication::desktop()->height() == 480 )
// mCategoriesView->setMaximumHeight( 240 );
topLayout->addWidget( mButtonGroup );
- QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page );
+ Q3ButtonGroup *sortingGroup = new Q3ButtonGroup( i18n( "Sorting" ), page );
sortingGroup->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2,
+ Q3GridLayout *sortLayout = new Q3GridLayout( sortingGroup->layout(), 2, 2,
KDialog::spacingHint() );
sortLayout->setAlignment( Qt::AlignTop );
@@ -335,8 +340,6 @@ void XXPortSelectDialog::initGUI()
}
}
-#ifndef KAB_EMBEDDED
-#include "xxportselectdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_xxportselectdialog.cpp"
#endif //KAB_EMBEDDED
-
-