Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:09:35

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QGROUPBOX_H
0005 #define QGROUPBOX_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qframe.h>
0009 
0010 QT_REQUIRE_CONFIG(groupbox);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QGroupBoxPrivate;
0015 class QStyleOptionGroupBox;
0016 class Q_WIDGETS_EXPORT QGroupBox : public QWidget
0017 {
0018     Q_OBJECT
0019 
0020     Q_PROPERTY(QString title READ title WRITE setTitle)
0021     Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
0022     Q_PROPERTY(bool flat READ isFlat WRITE setFlat)
0023     Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
0024     Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true)
0025 public:
0026     explicit QGroupBox(QWidget *parent = nullptr);
0027     explicit QGroupBox(const QString &title, QWidget *parent = nullptr);
0028     ~QGroupBox();
0029 
0030     QString title() const;
0031     void setTitle(const QString &title);
0032 
0033     Qt::Alignment alignment() const;
0034     void setAlignment(int alignment);
0035 
0036     QSize minimumSizeHint() const override;
0037 
0038     bool isFlat() const;
0039     void setFlat(bool flat);
0040     bool isCheckable() const;
0041     void setCheckable(bool checkable);
0042     bool isChecked() const;
0043 
0044 public Q_SLOTS:
0045     void setChecked(bool checked);
0046 
0047 Q_SIGNALS:
0048     void clicked(bool checked = false);
0049     void toggled(bool);
0050 
0051 protected:
0052     bool event(QEvent *event) override;
0053     void childEvent(QChildEvent *event) override;
0054     void resizeEvent(QResizeEvent *event) override;
0055     void paintEvent(QPaintEvent *event) override;
0056     void focusInEvent(QFocusEvent *event) override;
0057     void changeEvent(QEvent *event) override;
0058     void mousePressEvent(QMouseEvent *event) override;
0059     void mouseMoveEvent(QMouseEvent *event) override;
0060     void mouseReleaseEvent(QMouseEvent *event) override;
0061     virtual void initStyleOption(QStyleOptionGroupBox *option) const;
0062 
0063 
0064 private:
0065     Q_DISABLE_COPY(QGroupBox)
0066     Q_DECLARE_PRIVATE(QGroupBox)
0067     Q_PRIVATE_SLOT(d_func(), void _q_setChildrenEnabled(bool b))
0068 };
0069 
0070 QT_END_NAMESPACE
0071 
0072 #endif // QGROUPBOX_H