Implemented auto-loading and save button
This commit is contained in:
@@ -7,20 +7,24 @@
|
||||
|
||||
#include "dmxcontrollerthread.h"
|
||||
#include "lightproject.h"
|
||||
#include "scheincommandersettings.h"
|
||||
|
||||
class DmxController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int performance READ performance NOTIFY performanceChanged)
|
||||
Q_PROPERTY(ScheinCommanderSettings* settings READ settings)
|
||||
|
||||
public:
|
||||
explicit DmxController(QObject *parent = nullptr);
|
||||
|
||||
bool loadProject(QString name);
|
||||
bool saveProject(QString name);
|
||||
explicit DmxController(ScheinCommanderSettings &settings, QObject *parent = nullptr);
|
||||
|
||||
bool start();
|
||||
|
||||
Q_INVOKABLE bool loadProject(const QString &name);
|
||||
Q_INVOKABLE bool loadProject(const QUrl &url);
|
||||
Q_INVOKABLE bool saveProject(const QString &name);
|
||||
Q_INVOKABLE bool saveProject(const QUrl &url);
|
||||
|
||||
Q_INVOKABLE void setRegisterGroupSlider(int registerGroupId, quint8 value);
|
||||
|
||||
LightProject &lightProject() { return m_lightProject; }
|
||||
@@ -33,9 +37,12 @@ public:
|
||||
void setSliderStates(sliders_state_t &&sliderStates);
|
||||
void setSliderStates(const sliders_state_t &sliderStates);
|
||||
|
||||
ScheinCommanderSettings *settings() { return &m_settings; }
|
||||
const ScheinCommanderSettings *settings() const { return &m_settings; }
|
||||
int performance() const { return m_lastCounter; }
|
||||
|
||||
signals:
|
||||
void needToAskWhereToSaveChanged(bool needToAskWhereToSave);
|
||||
void performanceChanged(int performance);
|
||||
|
||||
void deviceTypeInserted(int first, int last);
|
||||
@@ -66,6 +73,8 @@ protected:
|
||||
void sendDmxBuffer(); // runs in its own thread
|
||||
|
||||
private:
|
||||
ScheinCommanderSettings &m_settings;
|
||||
|
||||
QSerialPort m_serialPort;
|
||||
|
||||
DmxControllerThread m_thread;
|
||||
|
Reference in New Issue
Block a user