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.commandlinkbutton;
13 extern(C++):
14 
15 import qt.config;
16 import qt.core.coreevent;
17 import qt.core.size;
18 import qt.core.string;
19 import qt.gui.event;
20 import qt.helpers;
21 import qt.widgets.pushbutton;
22 import qt.widgets.styleoption;
23 import qt.widgets.widget;
24 
25 /+ QT_REQUIRE_CONFIG(commandlinkbutton); +/
26 
27 
28 
29 extern(C++, class) struct QCommandLinkButtonPrivate;
30 
31 /// Binding for C++ class [QCommandLinkButton](https://doc.qt.io/qt-6/qcommandlinkbutton.html).
32 class /+ Q_WIDGETS_EXPORT +/ QCommandLinkButton: QPushButton
33 {
34     mixin(Q_OBJECT);
35 
36     /+ Q_PROPERTY(QString description READ description WRITE setDescription)
37     Q_PROPERTY(bool flat READ isFlat WRITE setFlat DESIGNABLE false) +/
38 
39 public:
40     /+ explicit +/this(QWidget parent = null);
41     /+ explicit +/this(ref const(QString) text, QWidget parent = null);
42     /+ explicit +/this(ref const(QString) text, ref const(QString) description, QWidget parent = null);
43     ~this();
44 
45     final QString description() const;
46     final void setDescription(ref const(QString) description);
47 
48     override QSize sizeHint() const;
49     override int heightForWidth(int) const;
50     override QSize minimumSizeHint() const;
51     override void initStyleOption(QStyleOptionButton* option) const;
52 
53 protected:
54     override bool event(QEvent e);
55     override void paintEvent(QPaintEvent );
56 
57 private:
58     /+ Q_DISABLE_COPY(QCommandLinkButton) +/
59     /+ Q_DECLARE_PRIVATE(QCommandLinkButton) +/
60     mixin(CREATE_CONVENIENCE_WRAPPERS);
61 }
62