1
0

refactor: opacity helper

This commit is contained in:
Gary Wang
2019-10-06 14:58:01 +08:00
parent 665385aa3d
commit 011e46b70b
11 changed files with 93 additions and 55 deletions

View File

@@ -3,11 +3,7 @@
#include <QPushButton>
QT_BEGIN_NAMESPACE
class QGraphicsOpacityEffect;
class QPropertyAnimation;
QT_END_NAMESPACE
class OpacityHelper;
class ToolButton : public QPushButton
{
Q_OBJECT
@@ -15,11 +11,10 @@ public:
ToolButton(QWidget * parent = nullptr);
public slots:
void setIconOpacity(qreal opacity);
void setOpacity(qreal opacity, bool animated = true);
private:
QGraphicsOpacityEffect * m_opacityFx;
QPropertyAnimation * m_opacityAnimation;
OpacityHelper * m_opacityHelper;
};
#endif // TOOLBUTTON_H