Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtWidgets/qcommandlinkbutton.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) 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 QCOMMANDLINKBUTTON_H
0005 #define QCOMMANDLINKBUTTON_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qpushbutton.h>
0009 
0010 QT_REQUIRE_CONFIG(commandlinkbutton);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 
0015 class QCommandLinkButtonPrivate;
0016 
0017 class Q_WIDGETS_EXPORT QCommandLinkButton: public QPushButton
0018 {
0019     Q_OBJECT
0020 
0021     Q_PROPERTY(QString description READ description WRITE setDescription)
0022     Q_PROPERTY(bool flat READ isFlat WRITE setFlat DESIGNABLE false)
0023 
0024 public:
0025     explicit QCommandLinkButton(QWidget *parent = nullptr);
0026     explicit QCommandLinkButton(const QString &text, QWidget *parent = nullptr);
0027     explicit QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = nullptr);
0028     ~QCommandLinkButton();
0029 
0030     QString description() const;
0031     void setDescription(const QString &description);
0032 
0033     QSize sizeHint() const override;
0034     int heightForWidth(int) const override;
0035     QSize minimumSizeHint() const override;
0036     void initStyleOption(QStyleOptionButton *option) const override;
0037 
0038 protected:
0039     bool event(QEvent *e) override;
0040     void paintEvent(QPaintEvent *) override;
0041 
0042 private:
0043     Q_DISABLE_COPY(QCommandLinkButton)
0044     Q_DECLARE_PRIVATE(QCommandLinkButton)
0045 };
0046 
0047 QT_END_NAMESPACE
0048 
0049 #endif // QCOMMANDLINKBUTTON