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.statusbar; 13 extern(C++): 14 15 import qt.config; 16 import qt.core.coreevent; 17 import qt.core.string; 18 import qt.gui.event; 19 import qt.helpers; 20 import qt.widgets.widget; 21 22 /+ QT_REQUIRE_CONFIG(statusbar); +/ 23 24 25 extern(C++, class) struct QStatusBarPrivate; 26 27 /// Binding for C++ class [QStatusBar](https://doc.qt.io/qt-6/qstatusbar.html). 28 class /+ Q_WIDGETS_EXPORT +/ QStatusBar: QWidget 29 { 30 mixin(Q_OBJECT); 31 32 /+ Q_PROPERTY(bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled) +/ 33 34 public: 35 /+ explicit +/this(QWidget parent = null); 36 /+ virtual +/~this(); 37 38 final void addWidget(QWidget widget, int stretch = 0); 39 final int insertWidget(int index, QWidget widget, int stretch = 0); 40 final void addPermanentWidget(QWidget widget, int stretch = 0); 41 final int insertPermanentWidget(int index, QWidget widget, int stretch = 0); 42 final void removeWidget(QWidget widget); 43 44 final void setSizeGripEnabled(bool); 45 final bool isSizeGripEnabled() const; 46 47 final QString currentMessage() const; 48 49 public /+ Q_SLOTS +/: 50 @QSlot final void showMessage(ref const(QString) text, int timeout = 0); 51 @QSlot final void clearMessage(); 52 53 54 /+ Q_SIGNALS +/public: 55 @QSignal final void messageChanged(ref const(QString) text); 56 57 protected: 58 override void showEvent(QShowEvent ); 59 override void paintEvent(QPaintEvent ); 60 override void resizeEvent(QResizeEvent ); 61 62 final void reformat(); 63 final void hideOrShow(); 64 override bool event(QEvent ); 65 66 private: 67 /+ Q_DISABLE_COPY(QStatusBar) +/ 68 /+ Q_DECLARE_PRIVATE(QStatusBar) +/ 69 mixin(CREATE_CONVENIENCE_WRAPPERS); 70 } 71