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
40
src/ui/itemwidget.h
Normal file
40
src/ui/itemwidget.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef RELAYWIDGET_H
|
||||
#define RELAYWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <memory>
|
||||
#include "itemsettingsdialog.h"
|
||||
#include "../items/item.h"
|
||||
|
||||
namespace Ui {
|
||||
class ItemWidget;
|
||||
}
|
||||
|
||||
class ItemWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
std::weak_ptr<Item> item_;
|
||||
|
||||
void disable();
|
||||
|
||||
private slots:
|
||||
void showSettingsDialog();
|
||||
void moveToState(bool state);
|
||||
void moveToValue(int value);
|
||||
|
||||
public:
|
||||
explicit ItemWidget(std::weak_ptr<Item> item, bool analog = false, QWidget *parent = nullptr);
|
||||
std::weak_ptr<Item> getItem();
|
||||
bool controles(const ItemData& relay);
|
||||
~ItemWidget();
|
||||
|
||||
public slots:
|
||||
|
||||
void stateChanged(int state);
|
||||
|
||||
private:
|
||||
Ui::ItemWidget *ui;
|
||||
};
|
||||
|
||||
#endif // RELAYWIDGET_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue