author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/nameeditdialog.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/nameeditdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/nameeditdialog.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 199f3d6..96822d8 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp | |||
@@ -10,67 +10,69 @@ | |||
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 <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qlistbox.h> | 26 | #include <q3listbox.h> |
27 | #include <qlistview.h> | 27 | #include <q3listview.h> |
28 | #include <qtooltip.h> | 28 | #include <qtooltip.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qcheckbox.h> | 30 | #include <qcheckbox.h> |
31 | #include <qstring.h> | 31 | #include <qstring.h> |
32 | //Added by qt3to4: | ||
33 | #include <Q3GridLayout> | ||
32 | 34 | ||
33 | #ifndef KAB_EMBEDDED | 35 | #ifndef KAB_EMBEDDED |
34 | #include <kaccelmanager.h> | 36 | #include <kaccelmanager.h> |
35 | #else //KAB_EMBEDDED | 37 | #else //KAB_EMBEDDED |
36 | #include <kstandarddirs.h> | 38 | #include <kstandarddirs.h> |
37 | #endif //KAB_EMBEDDED | 39 | #endif //KAB_EMBEDDED |
38 | 40 | ||
39 | #include <kapplication.h> | 41 | #include <kapplication.h> |
40 | #include <kbuttonbox.h> | 42 | #include <kbuttonbox.h> |
41 | #include <kconfig.h> | 43 | #include <kconfig.h> |
42 | #include <klineedit.h> | 44 | #include <klineedit.h> |
43 | #include <klistview.h> | 45 | #include <klistview.h> |
44 | #include <kcombobox.h> | 46 | #include <kcombobox.h> |
45 | #include <klocale.h> | 47 | #include <klocale.h> |
46 | #include <kglobal.h> | 48 | #include <kglobal.h> |
47 | #include <kdebug.h> | 49 | #include <kdebug.h> |
48 | #include <kiconloader.h> | 50 | #include <kiconloader.h> |
49 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
50 | 52 | ||
51 | #include "nameeditdialog.h" | 53 | #include "nameeditdialog.h" |
52 | 54 | ||
53 | NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, | 55 | NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, |
54 | QWidget *parent, const char *name ) | 56 | QWidget *parent, const char *name ) |
55 | : KDialogBase( Plain, i18n( "Edit Contact Name" ), Help | Ok | Cancel, | 57 | : KDialogBase( Plain, i18n( "Edit Contact Name" ), Help | Ok | Cancel, |
56 | Ok, parent, name, true ) | 58 | Ok, parent, name, true ) |
57 | { | 59 | { |
58 | 60 | ||
59 | QWidget *page = plainPage(); | 61 | QWidget *page = plainPage(); |
60 | QGridLayout *layout = new QGridLayout( page, 5, 3 ); | 62 | Q3GridLayout *layout = new Q3GridLayout( page, 5, 3 ); |
61 | layout->setSpacing( spacingHint() ); | 63 | layout->setSpacing( spacingHint() ); |
62 | layout->addColSpacing( 2, 100 ); | 64 | layout->addColSpacing( 2, 100 ); |
63 | QLabel *label; | 65 | QLabel *label; |
64 | 66 | ||
65 | label = new QLabel( i18n( "Honorific prefixes:" ), page ); | 67 | label = new QLabel( i18n( "Honorific prefixes:" ), page ); |
66 | layout->addWidget( label, 0, 0 ); | 68 | layout->addWidget( label, 0, 0 ); |
67 | mPrefixCombo = new KComboBox( page ); | 69 | mPrefixCombo = new KComboBox( page ); |
68 | mPrefixCombo->setDuplicatesEnabled( false ); | 70 | mPrefixCombo->setDuplicatesEnabled( false ); |
69 | mPrefixCombo->setEditable( true ); | 71 | mPrefixCombo->setEditable( true ); |
70 | label->setBuddy( mPrefixCombo ); | 72 | label->setBuddy( mPrefixCombo ); |
71 | layout->addMultiCellWidget( mPrefixCombo, 0, 0, 1, 2 ); | 73 | layout->addMultiCellWidget( mPrefixCombo, 0, 0, 1, 2 ); |
72 | 74 | ||
73 | label = new QLabel( i18n( "Given name:" ), page ); | 75 | label = new QLabel( i18n( "Given name:" ), page ); |
74 | layout->addWidget( label, 1, 0 ); | 76 | layout->addWidget( label, 1, 0 ); |
75 | mGivenNameEdit = new KLineEdit( page ); | 77 | mGivenNameEdit = new KLineEdit( page ); |
76 | label->setBuddy( mGivenNameEdit ); | 78 | label->setBuddy( mGivenNameEdit ); |
@@ -282,19 +284,19 @@ void NameEditDialog::updateTypeCombo() | |||
282 | mFormattedNameCombo->insertItem( formattedName( addr, SimpleName ) ); | 284 | mFormattedNameCombo->insertItem( formattedName( addr, SimpleName ) ); |
283 | mFormattedNameCombo->insertItem( formattedName( addr, FullName ) ); | 285 | mFormattedNameCombo->insertItem( formattedName( addr, FullName ) ); |
284 | mFormattedNameCombo->insertItem( formattedName( addr, ReverseName ) ); | 286 | mFormattedNameCombo->insertItem( formattedName( addr, ReverseName ) ); |
285 | 287 | ||
286 | mFormattedNameCombo->setCurrentItem( pos ); | 288 | mFormattedNameCombo->setCurrentItem( pos ); |
287 | } | 289 | } |
288 | 290 | ||
289 | void NameEditDialog::slotHelp() | 291 | void NameEditDialog::slotHelp() |
290 | { | 292 | { |
291 | #ifndef KAB_EMBEDDED | 293 | #ifndef KAB_EMBEDDED |
292 | kapp->invokeHelp( "managing-contacts-automatic-nameparsing" ); | 294 | kapp->invokeHelp( "managing-contacts-automatic-nameparsing" ); |
293 | #else //KAB_EMBEDDED | 295 | #else //KAB_EMBEDDED |
294 | qDebug("NameEditDialog::slotHelp Help is not supported yet"); | 296 | qDebug("NameEditDialog::slotHelp Help is not supported yet"); |
295 | #endif //KAB_EMBEDDED | 297 | #endif //KAB_EMBEDDED |
296 | } | 298 | } |
297 | 299 | ||
298 | #ifndef KAB_EMBEDDED | 300 | #ifndef KAB_EMBEDDED_ |
299 | #include "nameeditdialog.moc" | 301 | #include "moc_nameeditdialog.cpp" |
300 | #endif //KAB_EMBEDDED | 302 | #endif //KAB_EMBEDDED |