summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxportselectdialog.cpp
Unidiff
Diffstat (limited to 'kaddressbook/xxportselectdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportselectdialog.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index ab95d5f..6282453 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -14,48 +14,49 @@
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25/* 25/*
26Enhanced Version of the file for platform independent KDE tools. 26Enhanced Version of the file for platform independent KDE tools.
27Copyright (c) 2004 Ulf Schenk 27Copyright (c) 2004 Ulf Schenk
28 28
29$Id$ 29$Id$
30*/ 30*/
31 31
32#include <kabc/addressbook.h> 32#include <kabc/addressbook.h>
33#include <kapplication.h> 33#include <kapplication.h>
34#include <kcombobox.h> 34#include <kcombobox.h>
35#include <klocale.h> 35#include <klocale.h>
36#include <kglobal.h> 36#include <kglobal.h>
37 37
38#include <qapplication.h>
38#include <qbuttongroup.h> 39#include <qbuttongroup.h>
39#include <qcombobox.h> 40#include <qcombobox.h>
40#include <qheader.h> 41#include <qheader.h>
41#include <qlabel.h> 42#include <qlabel.h>
42#include <qlayout.h> 43#include <qlayout.h>
43#include <qlistview.h> 44#include <qlistview.h>
44#include <qpushbutton.h> 45#include <qpushbutton.h>
45#include <qradiobutton.h> 46#include <qradiobutton.h>
46#include <qstringlist.h> 47#include <qstringlist.h>
47#include <qwhatsthis.h> 48#include <qwhatsthis.h>
48 49
49#include "kabcore.h" 50#include "kabcore.h"
50#include "kabprefs.h" 51#include "kabprefs.h"
51 52
52#include "xxportselectdialog.h" 53#include "xxportselectdialog.h"
53 54
54XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, 55XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
55 QWidget* parent, const char* name ) 56 QWidget* parent, const char* name )
56 : KDialogBase( Plain, i18n( "Choose which contacts to select" ), Help | Ok | Cancel, 57 : KDialogBase( Plain, i18n( "Choose which contacts to select" ), Help | Ok | Cancel,
57 Ok, parent, name, true, true ), mCore( core ), 58 Ok, parent, name, true, true ), mCore( core ),
58 mUseSorting( sort ) 59 mUseSorting( sort )
59{ 60{
60 initGUI(); 61 initGUI();
61 62
@@ -224,65 +225,70 @@ void XXPortSelectDialog::initGUI()
224 QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" 225 QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
225 "This option is disabled if no contacts are selected." ) ); 226 "This option is disabled if no contacts are selected." ) );
226 groupLayout->addWidget( mUseSelection, 1, 0 ); 227 groupLayout->addWidget( mUseSelection, 1, 0 );
227 228
228 mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); 229 mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup );
229 QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" 230 QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
230 "This option is disabled if you haven't defined any filters" ) ); 231 "This option is disabled if you haven't defined any filters" ) );
231 groupLayout->addWidget( mUseFilters, 2, 0 ); 232 groupLayout->addWidget( mUseFilters, 2, 0 );
232 233
233 mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); 234 mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup );
234 QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" 235 QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n"
235 "This option is disabled if you have no categories." ) ); 236 "This option is disabled if you have no categories." ) );
236 groupLayout->addWidget( mUseCategories, 3, 0 ); 237 groupLayout->addWidget( mUseCategories, 3, 0 );
237 238
238 mFiltersCombo = new QComboBox( false, mButtonGroup ); 239 mFiltersCombo = new QComboBox( false, mButtonGroup );
239 QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); 240 QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
240 groupLayout->addWidget( mFiltersCombo, 2, 1 ); 241 groupLayout->addWidget( mFiltersCombo, 2, 1 );
241 242
242 mCategoriesView = new QListView( mButtonGroup ); 243 mCategoriesView = new QListView( mButtonGroup );
243 mCategoriesView->addColumn( "" ); 244 mCategoriesView->addColumn( "" );
244 mCategoriesView->header()->hide(); 245 mCategoriesView->header()->hide();
245 QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); 246 QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
246 groupLayout->addWidget( mCategoriesView, 3, 1 ); 247 groupLayout->addWidget( mCategoriesView, 3, 1 );
247 248
249 // if (QApplication::desktop()->height() == 480 )
250 // mCategoriesView->setMaximumHeight( 240 );
248 topLayout->addWidget( mButtonGroup ); 251 topLayout->addWidget( mButtonGroup );
249 252
250 QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); 253 QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page );
251 sortingGroup->setColumnLayout( 0, Qt::Vertical ); 254 sortingGroup->setColumnLayout( 0, Qt::Vertical );
252 QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, 255 QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2,
253 KDialog::spacingHint() ); 256 KDialog::spacingHint() );
254 sortLayout->setAlignment( Qt::AlignTop ); 257 sortLayout->setAlignment( Qt::AlignTop );
255 258
256 label = new QLabel( i18n( "Criterion:" ), sortingGroup ); 259 label = new QLabel( i18n( "Criterion:" ), sortingGroup );
257 sortLayout->addWidget( label, 0, 0 ); 260 sortLayout->addWidget( label, 0, 0 );
258 261
259#ifndef KAB_EMBEDDED 262#ifndef KAB_EMBEDDED
260 mFieldCombo = new KComboBox( false, sortingGroup ); 263 mFieldCombo = new KComboBox( false, sortingGroup );
261#else //KAB_EMBEDDED 264#else //KAB_EMBEDDED
262 //US Combobox is not editable anyway 265 //US Combobox is not editable anyway
263 mFieldCombo = new KComboBox( sortingGroup ); 266 mFieldCombo = new KComboBox( sortingGroup );
264#endif //KAB_EMBEDDED 267#endif //KAB_EMBEDDED
265 sortLayout->addWidget( mFieldCombo, 0, 1 ); 268 sortLayout->addWidget( mFieldCombo, 0, 1 );
266 269
267 label = new QLabel( i18n( "Order:" ), sortingGroup ); 270 label = new QLabel( i18n( "Order:" ), sortingGroup );
268 sortLayout->addWidget( label, 1, 0 ); 271 sortLayout->addWidget( label, 1, 0 );
269 272
270#ifndef KAB_EMBEDDED 273#ifndef KAB_EMBEDDED
271 mSortTypeCombo = new KComboBox( false, sortingGroup ); 274 mSortTypeCombo = new KComboBox( false, sortingGroup );
272#else //KAB_EMBEDDED 275#else //KAB_EMBEDDED
273 //US Combobox is not editable anyway 276 //US Combobox is not editable anyway
274 mSortTypeCombo = new KComboBox( sortingGroup ); 277 mSortTypeCombo = new KComboBox( sortingGroup );
275#endif //KAB_EMBEDDED 278#endif //KAB_EMBEDDED
276 sortLayout->addWidget( mSortTypeCombo, 1, 1 ); 279 sortLayout->addWidget( mSortTypeCombo, 1, 1 );
277 280
278 topLayout->addWidget( sortingGroup ); 281 topLayout->addWidget( sortingGroup );
279 282
280 if ( !mUseSorting ) 283 if ( !mUseSorting )
281 sortingGroup->hide(); 284 sortingGroup->hide();
285#ifndef DESKTOP_VERSION
286 hideButtons();
287#endif
282} 288}
283 289
284#ifndef KAB_EMBEDDED 290#ifndef KAB_EMBEDDED
285#include "xxportselectdialog.moc" 291#include "xxportselectdialog.moc"
286#endif //KAB_EMBEDDED 292#endif //KAB_EMBEDDED
287 293
288 294