~ubuntu-branches/ubuntu/saucy/wpasupplicant/saucy

« back to all changes in this revision

Viewing changes to wpa_supplicant/wpa_gui-qt4/stringquery.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2010-11-22 09:43:43 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122094343-qgsxaojvmswfri77
Tags: 0.7.3-0ubuntu1
* Get wpasupplicant 0.7.3 from Debian's SVN. Leaving 0.7.3-1 as unreleased
  for now.
* Build-Depend on debhelper 8, since the packaging from Debian uses compat 8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
21
StringQuery::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
 
 
34
QString StringQuery::get_string()
 
35
{
 
36
        return edit->text();
 
37
}