pineapple-pictures/app/toolbutton.h

26 lines
545 B
C
Raw Normal View History

// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
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);
void setIconResourcePath(const QString &iconp);
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