2019-10-06 14:12:52 +08:00
|
|
|
#ifndef TOOLBUTTON_H
|
|
|
|
#define TOOLBUTTON_H
|
|
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
2019-10-06 14:58:01 +08:00
|
|
|
class OpacityHelper;
|
2019-10-06 14:12:52 +08:00
|
|
|
class ToolButton : public QPushButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-07-04 13:49:12 +08:00
|
|
|
ToolButton(bool hoverColor = false, QWidget * parent = nullptr);
|
2019-10-06 14:12:52 +08:00
|
|
|
|
|
|
|
public slots:
|
2019-10-06 14:58:01 +08:00
|
|
|
void setOpacity(qreal opacity, bool animated = true);
|
2019-10-06 14:12:52 +08:00
|
|
|
|
|
|
|
private:
|
2019-10-06 14:58:01 +08:00
|
|
|
OpacityHelper * m_opacityHelper;
|
2019-10-06 14:12:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TOOLBUTTON_H
|