File: stringquery.cpp

package info (click to toggle)
wpa 2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 13,672 kB
  • sloc: ansic: 262,665; cpp: 4,656; python: 2,911; makefile: 2,796; sh: 1,466; php: 733; xml: 54; perl: 48
file content (31 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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();
}