summaryrefslogtreecommitdiffabout
path: root/microkde/klineeditdlg.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (side-by-side diff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/klineeditdlg.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'microkde/klineeditdlg.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/klineeditdlg.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/microkde/klineeditdlg.h b/microkde/klineeditdlg.h
new file mode 100644
index 0000000..68e9252
--- a/dev/null
+++ b/microkde/klineeditdlg.h
@@ -0,0 +1,34 @@
+#ifndef MICROKDE_KLINEEDITDLG_H
+#define MICROKDE_KLINEEDITDLG_H
+
+#include "kdialogbase.h"
+#include <klineedit.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qdialog.h>
+#include <qpushbutton.h>
+
+class KLineEditDlg : public QDialog
+{
+ public:
+ KLineEditDlg( const QString & text, const QString & editText, QWidget *parent ) :
+ QDialog( parent,"lineedit", true ) {
+ QLabel* lab = new QLabel( text, this );
+ mEdit = new KLineEdit( this );
+ QVBoxLayout* vl = new QVBoxLayout( this );
+ vl->setSpacing(5);
+ vl->setMargin(7);
+ vl->addWidget( lab );
+ vl->addWidget( mEdit );
+ mEdit->setText( editText );
+ QPushButton * p = new QPushButton (" OK ", this );
+ vl->addWidget( p );
+ connect( p, SIGNAL ( clicked () ), this , SLOT (accept() ) );
+ }
+
+ QString text() { return mEdit->text(); }
+ private:
+ KLineEdit* mEdit;
+};
+
+#endif