File indexing completed on 2025-01-18 10:09:37
0001
0002
0003
0004 #ifndef QRADIOBUTTON_H
0005 #define QRADIOBUTTON_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qabstractbutton.h>
0009
0010 QT_REQUIRE_CONFIG(radiobutton);
0011
0012 QT_BEGIN_NAMESPACE
0013
0014
0015 class QRadioButtonPrivate;
0016 class QStyleOptionButton;
0017
0018 class Q_WIDGETS_EXPORT QRadioButton : public QAbstractButton
0019 {
0020 Q_OBJECT
0021
0022 public:
0023 explicit QRadioButton(QWidget *parent = nullptr);
0024 explicit QRadioButton(const QString &text, QWidget *parent = nullptr);
0025 ~QRadioButton();
0026
0027 QSize sizeHint() const override;
0028 QSize minimumSizeHint() const override;
0029
0030 protected:
0031 bool event(QEvent *e) override;
0032 bool hitButton(const QPoint &) const override;
0033 void paintEvent(QPaintEvent *) override;
0034 void mouseMoveEvent(QMouseEvent *) override;
0035 virtual void initStyleOption(QStyleOptionButton *button) const;
0036
0037
0038 private:
0039 Q_DECLARE_PRIVATE(QRadioButton)
0040 Q_DISABLE_COPY(QRadioButton)
0041 friend class QAccessibleButton;
0042 };
0043
0044 QT_END_NAMESPACE
0045
0046 #endif