13 #define CONTROLS_DIRECTORY QStringLiteral("controls") 20 Q_CLASSINFO(
"Version",
"1.0.0")
32 static
bool ParseTimeString (const QString &Time,
int &Days,
int &Hours,
33 int &Minutes,
int &Seconds, quint64 &DurationInSeconds);
57 void Graph (QByteArray* Data);
61 void SetValue (
double Value) override;
79 #endif // TORCCONTROL_H static bool ParseTimeString(const QString &Time, int &Days, int &Hours, int &Minutes, int &Seconds, quint64 &DurationInSeconds)
Parse a Torc time string into days, hours, minutes and, if present, seconds.
bool IsKnownInput(const QString &Input) const
virtual bool Validate(void)
void InputValidChangedPriv(QObject *Input, bool Valid)
void InputValidChanged(bool Valid)
QMap< QObject *, QString > m_inputs
virtual TorcControl::Type GetType(void) const =0
virtual void CalculateOutput(void)=0
QMap< QObject *, double > m_inputValues
void InputValueChanged(double Value)
virtual bool AllowInputs(void) const
Most controls have an input side.
void SubscriberDeleted(QObject *Subscriber)
QMap< QObject *, double > m_lastInputValues
void SetValid(bool Valid) override
void SetValue(double Value) override
static QString DurationToString(int Days, quint64 Duration)
bool IsKnownOutput(const QString &Output) const
virtual bool IsPassthrough(void)
Only certain logic controls can be passthrough.
void Graph(QByteArray *Data)
Add this control to the state graph.
void CheckInputValues(void)
QString GetUIName(void) override
bool Finish(void)
Finish setup of the control.
bool CheckForCircularReferences(const QString &UniqueId, const QString &Path) const
QMap< QObject *, bool > m_inputValids
QMap< QObject *, QString > m_outputs