30 lines
771 B
C++
30 lines
771 B
C++
#ifndef GRAPHICSEVENTCONTEXT_H
|
|
#define GRAPHICSEVENTCONTEXT_H
|
|
/***********组态事件信号**********/
|
|
#include <QObject>
|
|
|
|
// 具体的文实现
|
|
class GraphicsEventContext : public QObject {
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
void panelVisibilityChanged(const QString& panelId, bool show);
|
|
void variableSet(const QString& varName, const QVariant& value);
|
|
void scriptExecuted(const QString& script);
|
|
|
|
public:
|
|
void emitPanelVisibilityChanged(const QString& panelId, bool show) {
|
|
emit panelVisibilityChanged(panelId, show);
|
|
}
|
|
|
|
void emitVariableSet(const QString& varName, const QVariant& value) {
|
|
emit variableSet(varName, value);
|
|
}
|
|
|
|
void emitScriptExecuted(const QString& script) {
|
|
emit scriptExecuted(script);
|
|
}
|
|
};
|
|
|
|
#endif
|