summaryrefslogtreecommitdiffstats
path: root/part/kxechoosestringdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'part/kxechoosestringdialog.cpp')
-rw-r--r--part/kxechoosestringdialog.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/part/kxechoosestringdialog.cpp b/part/kxechoosestringdialog.cpp
new file mode 100644
index 0000000..d36ed68
--- /dev/null
+++ b/part/kxechoosestringdialog.cpp
@@ -0,0 +1,42 @@
+/***************************************************************************
+ kxechoosestringdialog.cpp - description
+ -------------------------
+ begin : Fri Jul 20 2001
+ copyright : (C) 2001, 2002, 2003 by The KXMLEditor Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "kxechoosestringdialog.h"
+
+#include <qpushbutton.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+
+KXEChooseStringDialog::KXEChooseStringDialog(QWidget *parent,
+ const char *name,
+ const char *szCaption,
+ const char *szPrompt)
+ : KXEChooseStringDialogBase(parent, name, true)
+{
+ m_pComboBox->setEditable(true);
+ m_pComboBox->setFocus();
+ m_pPushButtonOk->setDefault(true);
+ setCaption(szCaption);
+ m_pTextLabel->setText(szPrompt);
+}
+
+/** Called, when user press OK button */
+void KXEChooseStringDialog::slotOk()
+{
+ m_strChoosedText = m_pComboBox->currentText();
+ accept();
+}