mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 14:07:30 +00:00
PC Application: partial firmware update dialog
This commit is contained in:
parent
8c8749accd
commit
07ba714f1f
134 changed files with 13954 additions and 7 deletions
28
Software/PC_Application/CustomWidgets/toggleswitch.h
Normal file
28
Software/PC_Application/CustomWidgets/toggleswitch.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue