switched from qsettings to json added editng of actors
This commit is contained in:
parent
b04fbfb5bc
commit
df27b622a0
141 changed files with 4402 additions and 5068 deletions
33
src/actors/timeractor.h
Normal file
33
src/actors/timeractor.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#pragma once
|
||||
#include <QTimer>
|
||||
#include "actor.h"
|
||||
|
||||
class TimerActor: public Actor
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
int timeoutMsec_;
|
||||
|
||||
QTimer timer;
|
||||
|
||||
private slots:
|
||||
|
||||
void timeout();
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void onValueChanged(uint8_t state);
|
||||
void setTimeout(const int timeoutSec);
|
||||
|
||||
public:
|
||||
explicit TimerActor(const int timeoutSec = 60, QObject *parent = nullptr);
|
||||
virtual QString getName();
|
||||
|
||||
int getTimeout();
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json);
|
||||
|
||||
virtual void store(QString subsecton, QSettings* settings);
|
||||
virtual void load(QString subsecton, QSettings* settings);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue