Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:23:40

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