/
selectioncondition.h
55 lines (40 loc) · 1.36 KB
/
selectioncondition.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation and appearing in the file LICENSE.GPL *
* included in the packaging of this file. *
* *
***************************************************************************/
/*
* \author Aleksander Wojdyga <awojdyga@pluton.pol.lublin.pl>
*
* http://pluton.pol.lublin.pl/~awojdyga/nsbuilder/
*/
#ifndef SELECTIONCONDITION_H
#define SELECTIONCONDITION_H
#include <QWidget>
#include <QLabel>
#include <QSize>
class Selection;
class SelectionCondition : public QWidget
{
Q_OBJECT
public:
SelectionCondition(Selection *parent);
void setText(const QString &s);
void setComment(const QString &s);
virtual QSize minimumSizeHint() const;
protected:
void paintEvent(QPaintEvent *e);
void resizeEvent(QResizeEvent *event);
void showEvent(QShowEvent *e);
private:
void do_paintLabel();
QSize boundRect;
QLabel *label;
QString m_text;
QString m_comment;
Selection *p_parent;
};
#endif