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/addviewdialog.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/addviewdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/addviewdialog.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 6def26b..b52a83c 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp | |||
@@ -24,19 +24,21 @@ | |||
24 | #ifndef KAB_EMBEDDED | 24 | #ifndef KAB_EMBEDDED |
25 | #endif //KAB_EMBEDDED | 25 | #endif //KAB_EMBEDDED |
26 | 26 | ||
27 | #include <qradiobutton.h> | 27 | #include <qradiobutton.h> |
28 | #include <qbuttongroup.h> | 28 | #include <q3buttongroup.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | //Added by qt3to4: | ||
33 | #include <Q3GridLayout> | ||
32 | 34 | ||
33 | #include <klocale.h> | 35 | #include <klocale.h> |
34 | #include <kglobal.h> | 36 | #include <kglobal.h> |
35 | #include "kaddressbookview.h" | 37 | #include "kaddressbookview.h" |
36 | #include "addviewdialog.h" | 38 | #include "addviewdialog.h" |
37 | 39 | ||
38 | AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, | 40 | AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, |
39 | QWidget *parent, const char *name ) | 41 | QWidget *parent, const char *name ) |
40 | : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), | 42 | : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), |
41 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, | 43 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, |
42 | parent, name ), | 44 | parent, name ), |
@@ -47,9 +49,9 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, | |||
47 | mTypeId = 0; | 49 | mTypeId = 0; |
48 | 50 | ||
49 | QWidget *page = plainPage(); | 51 | QWidget *page = plainPage(); |
50 | 52 | ||
51 | QGridLayout *layout = new QGridLayout( page, 2, 2 ); | 53 | Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 ); |
52 | layout->setSpacing( spacingHint() ); | 54 | layout->setSpacing( spacingHint() ); |
53 | layout->setRowStretch( 1, 1 ); | 55 | layout->setRowStretch( 1, 1 ); |
54 | layout->setColStretch( 1, 1 ); | 56 | layout->setColStretch( 1, 1 ); |
55 | 57 | ||
@@ -60,14 +62,14 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, | |||
60 | connect( mViewNameEdit, SIGNAL( textChanged( const QString& ) ), | 62 | connect( mViewNameEdit, SIGNAL( textChanged( const QString& ) ), |
61 | SLOT( textChanged( const QString& ) ) ); | 63 | SLOT( textChanged( const QString& ) ) ); |
62 | layout->addWidget( mViewNameEdit, 0, 1 ); | 64 | layout->addWidget( mViewNameEdit, 0, 1 ); |
63 | 65 | ||
64 | mTypeGroup = new QButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); | 66 | mTypeGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); |
65 | connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); | 67 | connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); |
66 | layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); | 68 | layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); |
67 | 69 | ||
68 | // Now create the radio buttons. This needs some layout work. | 70 | // Now create the radio buttons. This needs some layout work. |
69 | QDictIterator<ViewFactory> iter( *mViewFactoryDict ); | 71 | Q3DictIterator<ViewFactory> iter( *mViewFactoryDict ); |
70 | for ( iter.toFirst(); iter.current(); ++iter ) { | 72 | for ( iter.toFirst(); iter.current(); ++iter ) { |
71 | //US i am not quit sure, why I can nopt use (*iter)-> here | 73 | //US i am not quit sure, why I can nopt use (*iter)-> here |
72 | //US new QRadioButton( (*iter)->type(), mTypeGroup ); | 74 | //US new QRadioButton( (*iter)->type(), mTypeGroup ); |
73 | //US label = new QLabel( (*iter)->description(), mTypeGroup ); | 75 | //US label = new QLabel( (*iter)->description(), mTypeGroup ); |
@@ -112,7 +114,7 @@ void AddViewDialog::textChanged( const QString &text ) | |||
112 | { | 114 | { |
113 | enableButton( KDialogBase::Ok, !text.isEmpty() ); | 115 | enableButton( KDialogBase::Ok, !text.isEmpty() ); |
114 | } | 116 | } |
115 | 117 | ||
116 | #ifndef KAB_EMBEDDED | 118 | #ifndef KAB_EMBEDDED_ |
117 | #include "addviewdialog.moc" | 119 | #include "moc_addviewdialog.cpp" |
118 | #endif //KAB_EMBEDDED | 120 | #endif //KAB_EMBEDDED |