1 /****************************************************************************
2 **
3 ** DQt - D bindings for the Qt Toolkit
4 **
5 ** GNU Lesser General Public License Usage
6 ** This file may be used under the terms of the GNU Lesser
7 ** General Public License version 3 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
9 ** packaging of this file. Please review the following information to
10 ** ensure the GNU Lesser General Public License version 3 requirements
11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
12 **
13 ****************************************************************************/
14 module qt.widgets.groupbox;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.coreevent;
19 import qt.core.namespace;
20 import qt.core.size;
21 import qt.core.string;
22 import qt.gui.event;
23 import qt.helpers;
24 import qt.widgets.styleoption;
25 import qt.widgets.widget;
26 
27 /+ QT_REQUIRE_CONFIG(groupbox); +/
28 
29 
30 extern(C++, class) struct QGroupBoxPrivate;
31 /+ class QStyleOptionGroupBox; +/
32 class /+ Q_WIDGETS_EXPORT +/ QGroupBox : QWidget
33 {
34     mixin(Q_OBJECT);
35 
36     /+ Q_PROPERTY(QString title READ title WRITE setTitle)
37     Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
38     Q_PROPERTY(bool flat READ isFlat WRITE setFlat)
39     Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
40     Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true) +/
41 public:
42     /+ explicit +/this(QWidget parent = null);
43     /+ explicit +/this(ref const(QString) title, QWidget parent = null);
44     ~this();
45 
46     final QString title() const;
47     final void setTitle(ref const(QString) title);
48     final void setTitle(const(QString) title)
49     {
50         setTitle(title);
51     }
52 
53     final /+ Qt:: +/qt.core.namespace.Alignment alignment() const;
54     final void setAlignment(int alignment);
55 
56     override QSize minimumSizeHint() const;
57 
58     final bool isFlat() const;
59     final void setFlat(bool flat);
60     final bool isCheckable() const;
61     final void setCheckable(bool checkable);
62     final bool isChecked() const;
63 
64 public /+ Q_SLOTS +/:
65     @QSlot final void setChecked(bool checked);
66 
67 /+ Q_SIGNALS +/public:
68     @QSignal final void clicked(bool checked = false);
69     @QSignal final void toggled(bool);
70 
71 protected:
72     override bool event(QEvent event);
73     override void childEvent(QChildEvent event);
74     override void resizeEvent(QResizeEvent event);
75     override void paintEvent(QPaintEvent event);
76     override void focusInEvent(QFocusEvent event);
77     override void changeEvent(QEvent event);
78     override void mousePressEvent(QMouseEvent event);
79     override void mouseMoveEvent(QMouseEvent event);
80     override void mouseReleaseEvent(QMouseEvent event);
81     final void initStyleOption(QStyleOptionGroupBox* option) const;
82 
83 
84 private:
85     /+ Q_DISABLE_COPY(QGroupBox) +/
86     /+ Q_DECLARE_PRIVATE(QGroupBox) +/
87     /+ Q_PRIVATE_SLOT(d_func(), void _q_setChildrenEnabled(bool b)) +/
88 }
89