aboutsummaryrefslogtreecommitdiff
path: root/wpa_supplicant/wpa_gui-qt4/stringquery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wpa_supplicant/wpa_gui-qt4/stringquery.cpp')
-rw-r--r--wpa_supplicant/wpa_gui-qt4/stringquery.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/stringquery.cpp b/wpa_supplicant/wpa_gui-qt4/stringquery.cpp
new file mode 100644
index 000000000000..420e0bec4d04
--- /dev/null
+++ b/wpa_supplicant/wpa_gui-qt4/stringquery.cpp
@@ -0,0 +1,31 @@
+/*
+ * wpa_gui - StringQuery class
+ * Copyright (c) 2009, Atheros Communications
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include <cstdio>
+#include <QLabel>
+
+#include "stringquery.h"
+
+
+StringQuery::StringQuery(QString label)
+{
+ edit = new QLineEdit;
+ edit->setFocus();
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(new QLabel(label), 0, 0);
+ layout->addWidget(edit, 0, 1);
+ setLayout(layout);
+
+ connect(edit, SIGNAL(returnPressed()), this, SLOT(accept()));
+}
+
+
+QString StringQuery::get_string()
+{
+ return edit->text();
+}