| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef CLOSEBUTTON_H |
| 4 | #define CLOSEBUTTON_H |
| 5 | |
| 6 | #include <QToolButton> |
| 7 | |
| 8 | class RSSGUARD_DLLSPEC PlainToolButton : public QToolButton { |
| 9 | Q_OBJECT |
| 10 | |
| 11 | public: |
| 12 | explicit PlainToolButton(QWidget* parent = nullptr); |
| 13 | |
| 14 | // Padding changers. |
| 15 | int padding() const; |
| 16 | void setPadding(int padding); |
| 17 | |
| 18 | public slots: |
| 19 | void setChecked(bool checked); |
| 20 | void reactOnActionChange(QAction* action); |
| 21 | void reactOnSenderActionChange(); |
| 22 | |
| 23 | protected: |
| 24 | void paintEvent(QPaintEvent* e); |
| 25 | |
| 26 | private: |
| 27 | int m_padding; |
| 28 | }; |
| 29 | |
| 30 | #endif // CLOSEBUTTON_H |