-rw-r--r-- | microkde/klineeditdlg.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/microkde/klineeditdlg.h b/microkde/klineeditdlg.h index 68e9252..d0004cd 100644 --- a/microkde/klineeditdlg.h +++ b/microkde/klineeditdlg.h | |||
@@ -1,34 +1,36 @@ | |||
1 | #ifndef MICROKDE_KLINEEDITDLG_H | 1 | #ifndef MICROKDE_KLINEEDITDLG_H |
2 | #define MICROKDE_KLINEEDITDLG_H | 2 | #define MICROKDE_KLINEEDITDLG_H |
3 | 3 | ||
4 | #include "kdialogbase.h" | 4 | #include "kdialogbase.h" |
5 | #include <klineedit.h> | 5 | #include <klineedit.h> |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
8 | #include <qdialog.h> | 8 | #include <qdialog.h> |
9 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
10 | //Added by qt3to4: | ||
11 | #include <Q3VBoxLayout> | ||
10 | 12 | ||
11 | class KLineEditDlg : public QDialog | 13 | class KLineEditDlg : public QDialog |
12 | { | 14 | { |
13 | public: | 15 | public: |
14 | KLineEditDlg( const QString & text, const QString & editText, QWidget *parent ) : | 16 | KLineEditDlg( const QString & text, const QString & editText, QWidget *parent ) : |
15 | QDialog( parent,"lineedit", true ) { | 17 | QDialog( parent,"lineedit", true ) { |
16 | QLabel* lab = new QLabel( text, this ); | 18 | QLabel* lab = new QLabel( text, this ); |
17 | mEdit = new KLineEdit( this ); | 19 | mEdit = new KLineEdit( this ); |
18 | QVBoxLayout* vl = new QVBoxLayout( this ); | 20 | Q3VBoxLayout* vl = new Q3VBoxLayout( this ); |
19 | vl->setSpacing(5); | 21 | vl->setSpacing(5); |
20 | vl->setMargin(7); | 22 | vl->setMargin(7); |
21 | vl->addWidget( lab ); | 23 | vl->addWidget( lab ); |
22 | vl->addWidget( mEdit ); | 24 | vl->addWidget( mEdit ); |
23 | mEdit->setText( editText ); | 25 | mEdit->setText( editText ); |
24 | QPushButton * p = new QPushButton (" OK ", this ); | 26 | QPushButton * p = new QPushButton (" OK ", this ); |
25 | vl->addWidget( p ); | 27 | vl->addWidget( p ); |
26 | connect( p, SIGNAL ( clicked () ), this , SLOT (accept() ) ); | 28 | connect( p, SIGNAL ( clicked () ), this , SLOT (accept() ) ); |
27 | } | 29 | } |
28 | 30 | ||
29 | QString text() { return mEdit->text(); } | 31 | QString text() { return mEdit->text(); } |
30 | private: | 32 | private: |
31 | KLineEdit* mEdit; | 33 | KLineEdit* mEdit; |
32 | }; | 34 | }; |
33 | 35 | ||
34 | #endif | 36 | #endif |