• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/wpa_supplicant-0.7.3/wpa_supplicant/wpa_gui-qt4/
1/*
2 * wpa_gui - StringQuery class
3 * Copyright (c) 2009, Atheros Communications
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#include <cstdio>
16#include <QLabel>
17
18#include "stringquery.h"
19
20
21StringQuery::StringQuery(QString label)
22{
23	edit = new QLineEdit;
24	edit->setFocus();
25	QGridLayout *layout = new QGridLayout;
26	layout->addWidget(new QLabel(label), 0, 0);
27	layout->addWidget(edit, 0, 1);
28	setLayout(layout);
29
30	connect(edit, SIGNAL(returnPressed()), this, SLOT(accept()));
31}
32
33
34QString StringQuery::get_string()
35{
36	return edit->text();
37}
38