PC Application: partial firmware update dialog

This commit is contained in:
Jan Käberich 2020-08-30 22:03:41 +02:00
parent 8c8749accd
commit 07ba714f1f
134 changed files with 13954 additions and 7 deletions

View file

@ -0,0 +1,28 @@
#ifndef TOGGLESWITCH_H
#define TOGGLESWITCH_H
#include <QAbstractButton>
class ToggleSwitch : public QAbstractButton
{
Q_OBJECT
public:
ToggleSwitch(QWidget* parent = nullptr, bool state = false);
QSize sizeHint() const override;
signals:
void toggled(bool newstate);
public slots:
void toggle();
void setState(bool state);
protected:
void paintEvent(QPaintEvent*) override;
void mouseReleaseEvent(QMouseEvent*) override;
private:
int _height, _width;
bool state;
};
#endif // TOGGLESWITCH_H