cut 3.3.0
Loading...
Searching...
No Matches
QeState Class Reference

Presents the state of a component based on the interpretation of a string. More...

#include <CutWidgets.h>

Inheritance diagram for QeState:
taurus.taurusstate.TaurusState

Public Slots

void setStateString (QString newValue)
 Main setter of the QeState widget.
 
void setOrthogonalSep (QString newValue)
 Defines which separator is to be used between Orthogonal regions.
 
void setSubstateSep (QString newValue)
 Defines which separator is to be used between Substates.
 
void setShowAll (bool showAll)
 When true configures the widget to show the complete Substates string.
 
void setAutoCompact (bool autoCompact)
 Sets the autoCompact property.
 
void setSpacing (int spacing)
 Sets the spacing property.
 
void setPositiveWords (QString positiveWords)
 Sets the positve words property.
 
void setWarningWords (QString warningWords)
 Sets the warning words property.
 
void setNegativeWords (QString negativeWords)
 Sets the negative words property.
 
void setNeutralWords (QString neutralWords)
 Sets the neutral words property.
 
void setOffWords (QString offWords)
 Sets the off words property.
 
void setInitialisingWords (QString initialisingWords)
 Sets the initialising words property.
 
void setShowOnlyIndex (int showOnlyIndex)
 Sets the showOnlyIndex property.
 

Signals

void stateStringChanged (QString newValue)
 Indicates a change in the stateString property.
 
void stateChanged (QString newValue)
 Indicates a change in the state property.
 
void orthogonalStatesChanged (QStringList newValue)
 Indicates a change in the orthogonalStates property.
 
void orthogonalSepChanged (QString newValue)
 Indicates a change in the orthogonal separator property.
 
void substateSepChanged (QString newValue)
 Indicates a change in the substate separator property.
 
void subStatesChanged (QStringList subStates)
 Indicates a change in the substates property.
 
void showAllChanged (bool showAll)
 Indicates a change in the showAll property.
 
void autoCompactChanged (bool autoCompact)
 Indicates a change in the autoCompact property.
 
void positiveWordsChanged (QString positiveWords)
 Indicates a change in the positiveWords property.
 
void warningWordsChanged (QString warningWords)
 Indicates a change in the warningWords property.
 
void negativeWordsChanged (QString negativeWords)
 Indicates a change in the negativeWords property.
 
void neutralWordsChanged (QString neutralWords)
 Indicates a change in the neutralWords property.
 
void offWordsChanged (QString offWords)
 Indicates a change in the offWords property.
 
void initialisingWordsChanged (QString initialisingWords)
 Indicates a change in the initialisingWords property.
 
void clicked ()
 Emitted when a mouse click is done in the widget.
 
void showOnlyIndexChanged (int showOnlyIndex)
 Signal emitted when the showOnlyIndex property changes.
 

Public Member Functions

 QeState (QWidget *parent=nullptr)
 Constructor for the QeState class.
 
QString getStateString ()
 Gets the stateString property.
 
QString getState ()
 Returns the parsed state.
 
QStringList getOrthogonalStates ()
 Returns a list of strings that contains the separated orthogonal state.
 
QString getOrthogonalSep ()
 Returns the separator used to parse between Orthogonal regions.
 
QString getSubstateSep ()
 Returns the separator used to parse between States whithin an orthogonal region.
 
QStringList getSubStates () const
 Returns list of parsed sub states.
 
bool showsAll () const
 Indicates when the widget shows all orthogonal regions instead of just one.
 
bool isAutoCompacting () const
 Indicates if the widget is set to automatically summarize states is horizontal space is not enough.
 
int spacing () const
 Returns the ammount of pixels left as spacing between states.
 
QString getPositiveWords () const
 Gets the list of positive words.
 
QString getWarningWords () const
 Gets the list of warning words.
 
QString getNegativeWords () const
 Gets the list of negative words.
 
QString getNeutralWords () const
 Gets the list of neutral words.
 
QString getOffWords () const
 Gets the list of off words.
 
QString getInitialisingWords () const
 Gets the list of initialiasing words.
 
int getShowOnlyIndex () const
 Gets the currently shown orthogonal region index.
 

Properties

QString stateString
 Communicates the widget of the string that contains the state information.
 
QString state
 Read-only property that contains the state of the component/application after interpretation of the stateString.
 
QStringList orthogonalStates
 Orthogonal regions states, in a list.
 
QStringList subStates
 Substates in a list.
 
QString orthogonalSep
 Orthogonal Regions separator.
 
QString substateSep
 Substates separator.
 
bool showAll
 Shows states and substates for first region.
 
bool autoCompact
 Automatically compact representation to Initials when no space is available.
 
int spacing
 Separation in pixels between one state and the next.
 
QString initialisingWords
 Words considered for Initialising color (normally yellow), space separated.
 
QString positiveWords
 Words considered for Positive color (normally green), space separated.
 
QString warningWords
 Words considered for Warning color (normally orange), space separated.
 
QString negativeWords
 Words considered for Negative color (normally red), space separated.
 
QString neutralWords
 Words considered for Neutral color (normally blue), space separated.
 
QString offWords
 Words considered for Off color (normally grey), space separated.
 
int showOnlyIndex
 Shows only the state for the orthogonal region in the index N.
 

Detailed Description

Presents the state of a component based on the interpretation of a string.

Uses two separators to know where to cut the string.

Todo
Refactor QeState and QeStateDetailed common parts

Constructor & Destructor Documentation

◆ QeState()

QeState::QeState ( QWidget * parent = nullptr)
explicit

Constructor for the QeState class.

Parameters
parentQWidget that will be the parent to this newly constructure object.

Member Function Documentation

◆ getInitialisingWords()

QString QeState::getInitialisingWords ( ) const

Gets the list of initialiasing words.

Returns
QString that contains a comma separated list of words.
See also
initialisingWords initialisingWordsChanged

◆ getNegativeWords()

QString QeState::getNegativeWords ( ) const

Gets the list of negative words.

Returns
QString that contains a comma separated list of words.
See also
negativeWords negativeWordsChanged

◆ getNeutralWords()

QString QeState::getNeutralWords ( ) const

Gets the list of neutral words.

Returns
QString that contains a comma separated list of words.
See also
neutralWords neutralWordsChanged

◆ getOffWords()

QString QeState::getOffWords ( ) const

Gets the list of off words.

Returns
QString that contains a comma separated list of words.
See also
offWords offWordsChanged

◆ getOrthogonalSep()

QString QeState::getOrthogonalSep ( )

Returns the separator used to parse between Orthogonal regions.

Returns
QString with the separator
See also
orthogonalSep setOrthogonalSep

◆ getOrthogonalStates()

QStringList QeState::getOrthogonalStates ( )

Returns a list of strings that contains the separated orthogonal state.

Returns
QStringList List of parsed states
See also
orthogonalStates orthogonalStatesChanged

◆ getPositiveWords()

QString QeState::getPositiveWords ( ) const

Gets the list of positive words.

Returns
QString that contains a comma separated list of words.
See also
positiveWords positiveWordsChanged

◆ getShowOnlyIndex()

int QeState::getShowOnlyIndex ( ) const

Gets the currently shown orthogonal region index.

Returns
int Which orthogonal region index is shown by the widget.
See also
showOnlyIndex showOnlyIndexChanged

◆ getState()

QString QeState::getState ( )

Returns the parsed state.

Returns
QString with the parsed state
See also
state stateChanged

◆ getStateString()

QString QeState::getStateString ( )

Gets the stateString property.

Returns
The QString that represents the stateString property.
See also
stateString setStateString stateStringChanged

◆ getSubStates()

QStringList QeState::getSubStates ( ) const

Returns list of parsed sub states.

Returns
QStringList with each of the parsed sub states.
See also
subStates subStatesChanged

◆ getSubstateSep()

QString QeState::getSubstateSep ( )

Returns the separator used to parse between States whithin an orthogonal region.

Returns
QString with the separator
See also
substateSep setSubstateSep substateSepChanged

◆ getWarningWords()

QString QeState::getWarningWords ( ) const

Gets the list of warning words.

Returns
QString that contains a comma separated list of words.
See also
warningWords warningWordsChanged

◆ isAutoCompacting()

bool QeState::isAutoCompacting ( ) const

Indicates if the widget is set to automatically summarize states is horizontal space is not enough.

Returns
bool true when the widget will summarize states.
See also
autoCompact setAutoCompact autoCompactChanged

◆ setAutoCompact

void QeState::setAutoCompact ( bool autoCompact)
slot

Sets the autoCompact property.

Parameters
autoCompacttrue if the widget will summarize words if horizontal space is short.
See also
autoCompact isAutoCompacting autoCompactChanged

◆ setInitialisingWords

void QeState::setInitialisingWords ( QString initialisingWords)
slot

Sets the initialising words property.

Parameters
initialisingWordsComma separated string of words considered initiliasing.
See also
initialisingWords getInitialisingWords initialisingWordsChanged

◆ setNegativeWords

void QeState::setNegativeWords ( QString negativeWords)
slot

Sets the negative words property.

Parameters
negativeWordsComma separated string of words considered negative.
See also
negativeWords getNegativeWords negativeWordsChanged

◆ setNeutralWords

void QeState::setNeutralWords ( QString neutralWords)
slot

Sets the neutral words property.

Parameters
neutralWordsComma separated string of words considered neutral.
See also
neutralWords getNeutralWords neutralWordsChanged

◆ setOffWords

void QeState::setOffWords ( QString offWords)
slot

Sets the off words property.

Parameters
offWordsComma separated string of words considered off.
See also
offWords getOffWords offWordsChanged

◆ setOrthogonalSep

void QeState::setOrthogonalSep ( QString newValue)
slot

Defines which separator is to be used between Orthogonal regions.

Parameters
newValueString to be used as orthogonal regions separator
See also
orthogonalSep getOrthogonalSep orthogonalSepChanged

◆ setPositiveWords

void QeState::setPositiveWords ( QString positiveWords)
slot

Sets the positve words property.

Parameters
positiveWordsComma separated string of words considered positive.
See also
positiveWords getPositiveWords positiveWordsChanged

◆ setShowAll

void QeState::setShowAll ( bool showAll)
slot

When true configures the widget to show the complete Substates string.

When false it only shows the last or inner-most substate.

Parameters
showAllbool True shows all the substates.
See also
showAll showsAll showAllChanged

◆ setShowOnlyIndex

void QeState::setShowOnlyIndex ( int showOnlyIndex)
slot

Sets the showOnlyIndex property.

Parameters
showOnlyIndexShows only one state, which will be the index indicated by this value.
See also
showOnlyIndex getShowOnlyIndex showOnlyIndexChanged

◆ setSpacing

void QeState::setSpacing ( int spacing)
slot

Sets the spacing property.

Parameters
spacingammount of space between states.
See also
spacing

◆ setStateString

void QeState::setStateString ( QString newValue)
slot

Main setter of the QeState widget.

It accepts newValue as the state information to be processed.

Parameters
newValueA double-separated string that carries the State information of a RAD component. Separators are set by QeState::orthogonalSep and QeState::substateSep.
See also
stateString getStateString stateStringChanged

◆ setSubstateSep

void QeState::setSubstateSep ( QString newValue)
slot

Defines which separator is to be used between Substates.

Parameters
newValueString to be used as substate separator
See also
substateSep getSubstateSep

◆ setWarningWords

void QeState::setWarningWords ( QString warningWords)
slot

Sets the warning words property.

Parameters
warningWordsComma separated string of words considered warning.
See also
warningWords getWarningWords warningWordsChanged

◆ showOnlyIndexChanged

void QeState::showOnlyIndexChanged ( int showOnlyIndex)
signal

Signal emitted when the showOnlyIndex property changes.

Parameters
showOnlyIndexnew orthogonal region index to show. If -1, shows all.

◆ showsAll()

bool QeState::showsAll ( ) const

Indicates when the widget shows all orthogonal regions instead of just one.

Returns
bool that is true when all orthogonal regions are shown.
See also
showAll setShowAll showAllChanged

◆ spacing()

int QeState::spacing ( ) const

Returns the ammount of pixels left as spacing between states.

Returns
int with the number of pixels between states.
See also
spacing setSpacing

Property Documentation

◆ autoCompact

bool QeState::autoCompact
readwrite

Automatically compact representation to Initials when no space is available.

Accessors:
isAutoCompacting(), setAutoCompact(bool)

◆ initialisingWords

QString QeState::initialisingWords
readwrite

Words considered for Initialising color (normally yellow), space separated.

Accessors:
getInitialisingWords(), setInitialisingWords(const QString&)

◆ negativeWords

QString QeState::negativeWords
readwrite

Words considered for Negative color (normally red), space separated.

Accessors:
getNegativeWords(), setNegativeWords(const QString&)

◆ neutralWords

QString QeState::neutralWords
readwrite

Words considered for Neutral color (normally blue), space separated.

Accessors:
getNeutralWords(), setNeutralWords(const QString&)

◆ offWords

QString QeState::offWords
readwrite

Words considered for Off color (normally grey), space separated.

Accessors:
getOffWords(), setOffWords(const QString&)

◆ orthogonalSep

QString QeState::orthogonalSep
readwrite

Orthogonal Regions separator.

Default ';'

Accessors:
getOrthogonalSep(), setOrthogonalSep(QString)

◆ orthogonalStates

QStringList QeState::orthogonalStates
read

Orthogonal regions states, in a list.

Accessors:
getOrthogonalStates()

◆ positiveWords

QString QeState::positiveWords
readwrite

Words considered for Positive color (normally green), space separated.

Accessors:
getPositiveWords(), setPositiveWords(const QString&)

◆ showAll

bool QeState::showAll
readwrite

Shows states and substates for first region.

Accessors:
showsAll(), setShowAll(bool)

◆ showOnlyIndex

int QeState::showOnlyIndex
readwrite

Shows only the state for the orthogonal region in the index N.

If 0, shows every orthogonal region.

Accessors:
getShowOnlyIndex(), setShowOnlyIndex(int)

◆ spacing

int QeState::spacing
readwrite

Separation in pixels between one state and the next.

Accessors:
spacing(), setSpacing(int)

◆ state

QString QeState::state
read

Read-only property that contains the state of the component/application after interpretation of the stateString.

Accessors:
getState()

◆ stateString

QString QeState::stateString
readwrite

Communicates the widget of the string that contains the state information.

Accessors:
getStateString(), setStateString(QString)

◆ subStates

QStringList QeState::subStates
read

Substates in a list.

Accessors:
getSubStates()

◆ substateSep

QString QeState::substateSep
readwrite

Substates separator.

Default ':'

Accessors:
getSubstateSep(), setSubstateSep(QString)

◆ warningWords

QString QeState::warningWords
readwrite

Words considered for Warning color (normally orange), space separated.

Accessors:
getWarningWords(), setWarningWords(const QString&)

The documentation for this class was generated from the following files: