0
|
1 |
#ifndef INPUTCOMBO_H
|
|
2 |
#define INPUTCOMBO_H
|
|
3 |
|
|
4 |
#include <qhbox.h>
|
|
5 |
|
|
6 |
class QString;
|
|
7 |
class QStringList;
|
|
8 |
class QLabel;
|
|
9 |
class QComboBox;
|
|
10 |
|
|
11 |
/*!
|
|
12 |
* A class for making input fields of type "Label: ComboBox"
|
|
13 |
*/
|
|
14 |
class InputCombo : public QHBox
|
|
15 |
{
|
|
16 |
Q_OBJECT
|
|
17 |
|
|
18 |
private:
|
|
19 |
QLabel *labelbox;
|
|
20 |
QComboBox *combobox;
|
|
21 |
|
|
22 |
void initWidget();
|
|
23 |
|
|
24 |
public slots:
|
|
25 |
/*!
|
|
26 |
* Sets the label of the input field
|
|
27 |
*/
|
|
28 |
void setLabel(QString &str);
|
|
29 |
|
|
30 |
public:
|
|
31 |
/*!
|
|
32 |
* Constructs an InputCombo with no label or combobox content
|
|
33 |
*/
|
|
34 |
InputCombo(QWidget *parent=0, const char *name=0);
|
|
35 |
/*!
|
|
36 |
* Constructs an InputCombo with label \param mylabel and
|
|
37 |
* void combobox
|
|
38 |
* \param mylabel Label of the InputCombo
|
|
39 |
*/
|
|
40 |
InputCombo(const QString &mylabel, QWidget *parent=0,
|
|
41 |
const char *name=0);
|
|
42 |
/*!
|
|
43 |
* Constructs an InputCombo with label \param mylabel and
|
|
44 |
* an initialized combobox
|
|
45 |
* \param mylabel Label of the InputCombo
|
|
46 |
* \param mystrings Content of the combobox
|
|
47 |
*/
|
|
48 |
InputCombo(const QString &mylabel, const QStringList &mystrings,
|
|
49 |
QWidget *parent=0, const char *name=0);
|
|
50 |
|
|
51 |
/*!
|
|
52 |
* Returns the contents of the textbox
|
|
53 |
*/
|
|
54 |
QString text() const;
|
|
55 |
/*!
|
|
56 |
* Returns the label of the input field
|
|
57 |
*/
|
|
58 |
QString label() const;
|
|
59 |
|
|
60 |
/*!
|
|
61 |
* Returns the QLabel
|
|
62 |
*/
|
|
63 |
QLabel* qLabel();
|
|
64 |
/*!
|
|
65 |
* Returns the QComboBox
|
|
66 |
*/
|
|
67 |
QComboBox* qComboBox();
|
|
68 |
};
|
|
69 |
|
|
70 |
#endif // INPUTCOMBO_H
|