1#ifndef QESTATEDETAILED_HPP
2#define QESTATEDETAILED_HPP
425 void paintEvent(QPaintEvent *event)
override;
426 void mousePressEvent(QMouseEvent *event)
override;
427 void focusOutEvent(QFocusEvent * event )
override;
428 QSize sizeHint()
const override;
431 void processStateString();
432 const QColor fillColorForState(
const QString&
state);
433 QString lastSubState(QString compositeState);
434 QString compactString(QString oldState);
435 QColor foregroundFromBackgroundColor(QColor fgColor);
436 QString m_stateString = {};
438 QStringList m_orthogonalStates = {};
439 QString m_orthogonalSep =
";";
440 QString m_substateSep =
":";
442 QColor positive = QColor(
"#3C7A0C");
443 QColor neutral = QColor(
"#095AD3");
444 QColor negative = QColor(
"#FF3317");
445 QColor viewBackgroundAlternate = QColor(
"#F2F2F2");
446 QColor warning = QColor(
"#FF8E26");
448 QStringList m_subStates;
449 bool m_showAll =
true;
450 bool m_autoCompact =
false;
452 QString m_positiveWords =
"idle goingrunning goingidle updateidle";
453 QString m_warningWords =
"recovering";
454 QString m_negativeWords =
"error";
455 QString m_neutralWords =
"running updating";
456 QString m_offWords =
"off";
457 QString m_initialisingWords =
"initialising starting notready ready enabling disabling";
458 bool m_popupMode =
false;
QString stateString
Communicates the widget of the string that contains the state information.
Definition QeStateDetailed.hpp:30
QString getWarningWords() const
Gets the list of warning words.
Definition QeStateDetailed.hpp:179
void setSubstateSep(QString newValue)
Defines which separator is to be used between Substates.
Definition QeStateDetailed.hpp:304
int spacing
Separation in pixels between one state and the next.
Definition QeStateDetailed.hpp:66
QString getOffWords() const
Gets the list of off words.
Definition QeStateDetailed.hpp:200
void popupModeChanged(bool popupMode)
Indicates when the popupMode has changed.
void initialisingWordsChanged(QString initialisingWords)
Indicates a change in the initialisingWords property.
bool popupMode
Identifies this widget as a popup to a particular QeState.
Definition QeStateDetailed.hpp:108
QString neutralWords
Words considered for Neutral color (normally blue), space separated.
Definition QeStateDetailed.hpp:96
QString getNegativeWords() const
Gets the list of negative words.
Definition QeStateDetailed.hpp:186
QString getNeutralWords() const
Gets the list of neutral words.
Definition QeStateDetailed.hpp:193
QString state
Read-only property that contains the state of the component/application after interpretation of the s...
Definition QeStateDetailed.hpp:36
void orthogonalSepChanged(QString newValue)
Indicates a change in the orthogonal separator property.
void setNegativeWords(QString negativeWords)
Sets the negative words property.
Definition QeStateDetailed.hpp:355
QString initialisingWords
Words considered for Initialising color (normally yellow), space separated.
Definition QeStateDetailed.hpp:72
void subStatesChanged(QStringList subStates)
Indicates a change in the substates property.
void setStateString(QString newValue)
Main setter of the QeState widget.
Definition QeStateDetailed.cpp:15
void setPopupMode(bool popupMode)
Sets the operation mode for the widget.
Definition QeStateDetailed.hpp:415
void warningWordsChanged(QString warningWords)
Indicates a change in the warningWords property.
QString getState()
Returns the parsed state.
Definition QeStateDetailed.hpp:130
void neutralWordsChanged(QString neutralWords)
Indicates a change in the neutralWords property.
void substateSepChanged(QString newValue)
Indicates a change in the substate separator property.
void setNeutralWords(QString neutralWords)
Sets the neutral words property.
Definition QeStateDetailed.hpp:370
QString negativeWords
Words considered for Negative color (normally red), space separated.
Definition QeStateDetailed.hpp:90
void orthogonalStatesChanged(QStringList newValue)
Indicates a change in the orthogonalStates property.
void setPositiveWords(QString positiveWords)
Sets the positve words property.
Definition QeStateDetailed.hpp:325
QString getPositiveWords() const
Gets the list of positive words.
Definition QeStateDetailed.hpp:172
void setOrthogonalSep(QString newValue)
Defines which separator is to be used between Orthogonal regions.
Definition QeStateDetailed.hpp:297
void positiveWordsChanged(QString positiveWords)
Indicates a change in the positiveWords property.
QString offWords
Words considered for Off color (normally grey), space separated.
Definition QeStateDetailed.hpp:102
void offWordsChanged(QString offWords)
Indicates a change in the offWords property.
void setInitialisingWords(QString initialisingWords)
Sets the initialising words property.
Definition QeStateDetailed.hpp:400
void stateChanged(QString newValue)
Indicates a change in the state property.
QStringList getSubStates() const
Returns list of parsed sub states.
Definition QeStateDetailed.hpp:158
QStringList orthogonalStates
Orthogonal regions states, in a list.
Definition QeStateDetailed.hpp:42
void setOffWords(QString offWords)
Sets the off words property.
Definition QeStateDetailed.hpp:385
QString warningWords
Words considered for Warning color (normally orange), space separated.
Definition QeStateDetailed.hpp:84
QStringList getOrthogonalStates()
Returns a list of strings that contains the separated orthogonal state.
Definition QeStateDetailed.hpp:137
QStringList subStates
Substates in a list.
Definition QeStateDetailed.hpp:48
QString positiveWords
Words considered for Positive color (normally green), space separated.
Definition QeStateDetailed.hpp:78
QString getInitialisingWords() const
Gets the list of initialiasing words.
Definition QeStateDetailed.hpp:207
void setSpacing(int spacing)
Sets the spacing property.
Definition QeStateDetailed.hpp:311
bool getPopupMode() const
Returns if this instance of the widget is acting as a popup.
Definition QeStateDetailed.hpp:213
void negativeWordsChanged(QString negativeWords)
Indicates a change in the negativeWords property.
void setWarningWords(QString warningWords)
Sets the warning words property.
Definition QeStateDetailed.hpp:340
int spacing() const
Returns the ammount of pixels left as spacing between states.
Definition QeStateDetailed.hpp:165
QString orthogonalSep
Orthogonal Regions separator.
Definition QeStateDetailed.hpp:54
QString getSubstateSep()
Returns the separator used to parse between States whithin an orthogonal region.
Definition QeStateDetailed.hpp:151
QString getStateString()
Gets the stateString property.
Definition QeStateDetailed.hpp:123
QeStateDetailed(QWidget *parent=nullptr)
Constructor for the QeStateDetailed class.
Definition QeStateDetailed.cpp:11
QString substateSep
Substates separator.
Definition QeStateDetailed.hpp:60
QString getOrthogonalSep()
Returns the separator used to parse between Orthogonal regions.
Definition QeStateDetailed.hpp:144
void stateStringChanged(QString newValue)
Indicates a change in the stateString property.