Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtWidgets/qbuttongroup.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2020 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 QBUTTONGROUP_H
0005 #define QBUTTONGROUP_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtCore/qobject.h>
0009 
0010 QT_REQUIRE_CONFIG(buttongroup);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QAbstractButton;
0015 class QAbstractButtonPrivate;
0016 class QButtonGroupPrivate;
0017 
0018 class Q_WIDGETS_EXPORT QButtonGroup : public QObject
0019 {
0020     Q_OBJECT
0021 
0022     Q_PROPERTY(bool exclusive READ exclusive WRITE setExclusive)
0023 public:
0024     explicit QButtonGroup(QObject *parent = nullptr);
0025     ~QButtonGroup();
0026 
0027     void setExclusive(bool);
0028     bool exclusive() const;
0029 
0030     void addButton(QAbstractButton *, int id = -1);
0031     void removeButton(QAbstractButton *);
0032 
0033     QList<QAbstractButton*> buttons() const;
0034 
0035     QAbstractButton * checkedButton() const;
0036     // no setter on purpose!
0037 
0038     QAbstractButton *button(int id) const;
0039     void setId(QAbstractButton *button, int id);
0040     int id(QAbstractButton *button) const;
0041     int checkedId() const;
0042 
0043 Q_SIGNALS:
0044     void buttonClicked(QAbstractButton *);
0045     void buttonPressed(QAbstractButton *);
0046     void buttonReleased(QAbstractButton *);
0047     void buttonToggled(QAbstractButton *, bool);
0048     void idClicked(int);
0049     void idPressed(int);
0050     void idReleased(int);
0051     void idToggled(int, bool);
0052 
0053 private:
0054     Q_DISABLE_COPY(QButtonGroup)
0055     Q_DECLARE_PRIVATE(QButtonGroup)
0056     friend class QAbstractButton;
0057     friend class QAbstractButtonPrivate;
0058 };
0059 
0060 QT_END_NAMESPACE
0061 
0062 #endif // QBUTTONGROUP_H