2014-05-18 11:52:39 -04:00
|
|
|
#ifndef INCLUDE_BUTTONSWITCH_H
|
|
|
|
#define INCLUDE_BUTTONSWITCH_H
|
|
|
|
|
|
|
|
#include <QToolButton>
|
|
|
|
|
2018-03-20 08:49:21 -04:00
|
|
|
#include "export.h"
|
2018-03-03 14:23:38 -05:00
|
|
|
|
|
|
|
class SDRGUI_API ButtonSwitch : public QToolButton {
|
2014-05-18 11:52:39 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ButtonSwitch(QWidget* parent = NULL);
|
2017-02-09 22:35:08 -05:00
|
|
|
void doToggle(bool checked);
|
2020-08-01 18:59:42 -04:00
|
|
|
void setColor(QColor color);
|
|
|
|
void resetColor();
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onToggled(bool checked);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPalette m_originalPalette;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_BUTTONSWITCH_H
|