src/labeledwidget.h

changeset 421
7d26db0be944
parent 223
4f95d7f2e9ef
child 455
c5d14d112034
equal deleted inserted replaced
420:8d6af951b611 421:7d26db0be944
37 m_widget = new R (this); 37 m_widget = new R (this);
38 commonInit (labelstr); 38 commonInit (labelstr);
39 } 39 }
40 40
41 explicit LabeledWidget (const char* labelstr, R* widget, QWidget* parent = null) : 41 explicit LabeledWidget (const char* labelstr, R* widget, QWidget* parent = null) :
42 QWidget (parent), m_widget (widget) 42 QWidget (parent), m_widget (widget) {
43 { 43
44 commonInit (labelstr); 44 commonInit (labelstr);
45 } 45 }
46 46
47 explicit LabeledWidget (QWidget* parent = 0, Qt::WindowFlags f = 0) { 47 explicit LabeledWidget (QWidget* parent = 0, Qt::WindowFlags f = 0) {
48 m_widget = new R (this); 48 m_widget = new R (this);
49 commonInit (""); 49 commonInit ("");
50 } 50 }
51 51
52 R* w () const { return m_widget; } 52 R* w() const { return m_widget; }
53 operator R* () { return m_widget; } 53 operator R*() { return m_widget; }
54 54
55 private: 55 private:
56 Q_DISABLE_COPY (LabeledWidget<R>) 56 Q_DISABLE_COPY (LabeledWidget<R>)
57 57
58 void commonInit (const char* labelstr) { 58 void commonInit (const char* labelstr) {

mercurial