stringquery.cpp
Go to the documentation of this file.
00001 /*
00002  * wpa_gui - StringQuery class
00003  * Copyright (c) 2009, Atheros Communications
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #include <cstdio>
00016 #include <QLabel>
00017 
00018 #include "stringquery.h"
00019 
00020 
00021 StringQuery::StringQuery(QString label)
00022 {
00023         edit = new QLineEdit;
00024         edit->setFocus();
00025         QGridLayout *layout = new QGridLayout;
00026         layout->addWidget(new QLabel(label), 0, 0);
00027         layout->addWidget(edit, 0, 1);
00028         setLayout(layout);
00029 
00030         connect(edit, SIGNAL(returnPressed()), this, SLOT(accept()));
00031 }
00032 
00033 
00034 QString StringQuery::get_string()
00035 {
00036         return edit->text();
00037 }


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:36