0
|
1 |
#ifndef INFOLABEL_H
|
|
2 |
#define INFOLABEL_H
|
|
3 |
|
|
4 |
|
|
5 |
#include <qlabel.h>
|
|
6 |
|
|
7 |
class QString;
|
|
8 |
class QLineEdit;
|
|
9 |
|
|
10 |
/*!
|
|
11 |
Class which defines an information label. It usually tells the user
|
|
12 |
information about some configuration parameter or result (label title).
|
|
13 |
It's usually shown as a title in bold and a colon, followed by its value.
|
|
14 |
*/
|
|
15 |
class InfoLabel : public QLabel
|
|
16 |
{
|
|
17 |
Q_OBJECT
|
|
18 |
|
|
19 |
private:
|
|
20 |
QString *titlevar, *valuevar;
|
|
21 |
|
|
22 |
void initWidget();
|
|
23 |
|
|
24 |
public slots:
|
|
25 |
/*!
|
|
26 |
* Sets the title of the label
|
|
27 |
*/
|
|
28 |
void setTitle(const QString &str);
|
|
29 |
/*!
|
|
30 |
* Sets the value shown as the title's value
|
|
31 |
*/
|
|
32 |
void setValue(const QString &str);
|
|
33 |
|
|
34 |
public:
|
|
35 |
/*!
|
|
36 |
* Constructs an InfoLabel with no title or value
|
|
37 |
*/
|
|
38 |
InfoLabel(QWidget *parent=0, const char *name=0);
|
|
39 |
|
|
40 |
/*!
|
|
41 |
* Constructs an InfoLabel with title \param mytitle and
|
|
42 |
* void result
|
|
43 |
* \param mytitle Title of the InfoLabel
|
|
44 |
*/
|
|
45 |
InfoLabel(const QString &mytitle, QWidget *parent=0,
|
|
46 |
const char *name=0);
|
|
47 |
|
|
48 |
/*!
|
|
49 |
* Constructs an InfoLabel with title #param mytitle and
|
|
50 |
* result #param myvalue
|
|
51 |
* \param mytitle Title of the InfoLabel
|
|
52 |
* \param myvalue Value of the information labeled as the title set
|
|
53 |
*/
|
|
54 |
InfoLabel(const QString &mytitle, const QString &myvalue,
|
|
55 |
QWidget *parent=0, const char *name=0);
|
|
56 |
|
|
57 |
/*!
|
|
58 |
* Returns the title of the information label
|
|
59 |
*/
|
|
60 |
QString title() const;
|
|
61 |
|
|
62 |
/*!
|
|
63 |
* Returns the value set for the information
|
|
64 |
*/
|
|
65 |
QString value() const;
|
|
66 |
};
|
|
67 |
|
|
68 |
#endif // INFOLABEL_H
|