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