2017-10-25 07:20:47 +02:00
|
|
|
// For license of this file, see <project-root-folder>/LICENSE.md.
|
2014-02-26 07:41:40 +01:00
|
|
|
|
2014-01-19 18:24:20 +01:00
|
|
|
#ifndef CLOSEBUTTON_H
|
|
|
|
#define CLOSEBUTTON_H
|
|
|
|
|
|
|
|
#include <QToolButton>
|
|
|
|
|
2014-01-19 21:35:13 +01:00
|
|
|
class PlainToolButton : public QToolButton {
|
2024-03-19 10:31:49 +01:00
|
|
|
Q_OBJECT
|
2017-09-19 10:18:21 +02:00
|
|
|
|
|
|
|
public:
|
2020-05-06 12:56:24 +02:00
|
|
|
explicit PlainToolButton(QWidget* parent = nullptr);
|
2014-01-19 18:24:20 +01:00
|
|
|
|
2017-09-19 10:18:21 +02:00
|
|
|
// Padding changers.
|
|
|
|
int padding() const;
|
|
|
|
void setPadding(int padding);
|
2014-01-19 18:24:20 +01:00
|
|
|
|
2017-09-19 10:18:21 +02:00
|
|
|
public slots:
|
|
|
|
void setChecked(bool checked);
|
|
|
|
void reactOnActionChange(QAction* action);
|
|
|
|
void reactOnSenderActionChange();
|
2014-03-19 07:15:35 +01:00
|
|
|
|
2017-09-19 10:18:21 +02:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent* e);
|
2014-03-19 07:15:35 +01:00
|
|
|
|
2017-09-19 10:18:21 +02:00
|
|
|
private:
|
|
|
|
int m_padding;
|
2014-01-19 18:24:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CLOSEBUTTON_H
|