-rw-r--r-- | kaddressbook/kcmconfigs/addresseewidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp index f84b2ba..eb5bdd9 100644 --- a/kaddressbook/kcmconfigs/addresseewidget.cpp +++ b/kaddressbook/kcmconfigs/addresseewidget.cpp | |||
@@ -1,76 +1,77 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressBook. | 2 | This file is part of KAddressBook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qgroupbox.h> | 24 | #include <qgroupbox.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlistbox.h> | 27 | #include <qlistbox.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qapplication.h> | ||
29 | 30 | ||
30 | #include <kbuttonbox.h> | 31 | #include <kbuttonbox.h> |
31 | #include <kcombobox.h> | 32 | #include <kcombobox.h> |
32 | #include <kconfig.h> | 33 | #include <kconfig.h> |
33 | #include <kdialog.h> | 34 | #include <kdialog.h> |
34 | #include <klocale.h> | 35 | #include <klocale.h> |
35 | #include <kglobal.h> | 36 | #include <kglobal.h> |
36 | #include <klineedit.h> | 37 | #include <klineedit.h> |
37 | #include <kstandarddirs.h> | 38 | #include <kstandarddirs.h> |
38 | 39 | ||
39 | #include "addresseewidget.h" | 40 | #include "addresseewidget.h" |
40 | 41 | ||
41 | NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, | 42 | NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, |
42 | const char *name ) | 43 | const char *name ) |
43 | : QWidget( parent, name ) | 44 | : QWidget( parent, name ) |
44 | { | 45 | { |
45 | if (KGlobal::getOrientation() == KGlobal::Portrait) | 46 | if (KGlobal::getOrientation() == KGlobal::Portrait) |
46 | { | 47 | { |
47 | QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), | 48 | QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), |
48 | KDialog::spacingHintSmall() ); | 49 | KDialog::spacingHintSmall() ); |
49 | 50 | ||
50 | QLabel *label = new QLabel( i18n( title ), this ); | 51 | QLabel *label = new QLabel( i18n( title ), this ); |
51 | layout->addWidget( label, 0, 1 ); | 52 | layout->addWidget( label, 0, 1 ); |
52 | 53 | ||
53 | mBox = new QListBox( this ); | 54 | mBox = new QListBox( this ); |
54 | mBox->setMaximumSize(70, 70); | 55 | mBox->setMaximumSize(70, 70); |
55 | layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); | 56 | layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); |
56 | 57 | ||
57 | KButtonBox *bbox = new KButtonBox( this, Qt::Vertical ); | 58 | KButtonBox *bbox = new KButtonBox( this, Qt::Vertical ); |
58 | mAddButton = bbox->addButton( i18n( "Add" ), this, SLOT( add() ) ); | 59 | mAddButton = bbox->addButton( i18n( "Add" ), this, SLOT( add() ) ); |
59 | mRemoveButton = bbox->addButton( i18n( "Rem" ), this, SLOT( remove() ) ); | 60 | mRemoveButton = bbox->addButton( i18n( "Rem" ), this, SLOT( remove() ) ); |
60 | bbox->layout(); | 61 | bbox->layout(); |
61 | layout->addMultiCellWidget( bbox, 0, 1, 2,2); | 62 | layout->addMultiCellWidget( bbox, 0, 1, 2,2); |
62 | 63 | ||
63 | mEdit = new KLineEdit( this ); | 64 | mEdit = new KLineEdit( this ); |
64 | layout->addWidget( mEdit, 1, 1 ); | 65 | layout->addWidget( mEdit, 1, 1 ); |
65 | //mEdit->setMinimumWidth(50); | 66 | //mEdit->setMinimumWidth(50); |
66 | 67 | ||
67 | // layout->addWidget( group ); | 68 | // layout->addWidget( group ); |
68 | 69 | ||
69 | } | 70 | } |
70 | else | 71 | else |
71 | { | 72 | { |
72 | QHBoxLayout *layout = new QHBoxLayout( this ); | 73 | QHBoxLayout *layout = new QHBoxLayout( this ); |
73 | 74 | ||
74 | QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); | 75 | QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); |
75 | QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, | 76 | QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, |
76 | KDialog::spacingHint() ); | 77 | KDialog::spacingHint() ); |