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) { |