File indexing completed on 2024-04-28 04:37:32

0001 /*
0002     SPDX-FileCopyrightText: 2007 Roberto Raggi <roberto@kdevelop.org>
0003     SPDX-FileCopyrightText: 2007 Hamish Rodda <rodda@kde.org>
0004     SPDX-FileCopyrightText: 2011 Alexander Dymo <adymo@kdevelop.org>
0005 
0006     SPDX-License-Identifier: LicenseRef-MIT-KDevelop-Ideal
0007 */
0008 
0009 #ifndef IDEALTOOLBUTTON_H
0010 #define IDEALTOOLBUTTON_H
0011 
0012 #include <QToolButton>
0013 
0014 class IdealToolButton: public QToolButton
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     explicit IdealToolButton(Qt::DockWidgetArea area, QWidget *parent = nullptr);
0020 
0021     Qt::Orientation orientation() const;
0022 
0023     QSize sizeHint() const override;
0024 
0025     QSize minimumSizeHint() const override;
0026 
0027 protected:
0028     void paintEvent(QPaintEvent *event) override;
0029 
0030 private:
0031     const Qt::DockWidgetArea _area;
0032 };
0033 
0034 #endif // IDEALTOOLBUTTON_H