Array of QeLed widgets that can be arranged horizontally or vertically.
More...
#include <CutWidgets.h>
|
| void | SetSignalTypes (const QStringList &signal_types) |
| | SetSignalTypes Converts QStrings to enum values of SignalType type and assigns them to existing LEDs in respective order.
|
| |
|
| void | OrderChanged (bool new_value) |
| | OrderChanged Communicates change of LEDs order.
|
| |
| void | LabelsVisibilityChanged (bool new_value) |
| | LabelsVisibilityChanged Communicates change of LEDs' labels visibility.
|
| |
| void | LedsCountChanged (int new_value) |
| | LedsCountChanged Communicates change of LEDs' numbers.
|
| |
| void | StatesChanged (QStringList new_value) |
| | StatesChanged Communicates change of LEDs' states.
|
| |
| void | LabelsChanged (QList< QString > labels) |
| | LabelsChanged Communicates change of LEDs' labels.
|
| |
| void | SignalTypesChanged (QStringList new_values) |
| | SignalTypesChanged SignalTypesChanged.
|
| |
|
| std::vector< bool > | GetStatesBoolVector () const |
| | GetStatesBoolVector Helper method to get current states.
|
| |
| QList< SignalType > | GetSignalTypesEnumList () |
| | GetSignalTypesEnumList Returns current signal types for each LED.
|
| |
| void | SetToolTips (QList< QString > tooltips) |
| | SetToolTips sets tooltips for existing LEDs.
|
| |
|
void | SetSignalTypes (const QList< SignalType > &signal_types) |
| | SetSignalTypes method to set signal types using enum values of SignalType type.
|
| |
| void | SetLabel (int index, QString label_text) |
| | SetLabel Sets label under specific index.
|
| |
| void | SetState (int index, bool state) |
| | SetState Sets state of a single LED.
|
| |
| void | SetSignalType (int index, SignalType signal_type) |
| | SetSignalType Sets signal type associated with the LED.
|
| |
|
| bool | vertical |
| | Order of the LEDs in the widget.
|
| |
| bool | labels_visible |
| | Show/hide LEDs labels.
|
| |
| int | leds_count |
| | Number of LEDs in the array.
|
| |
| QStringList | states |
| | States of LEDs.
|
| |
| QList< QString > | labels |
| | QList of QStrings that are labels for each LED.
|
| |
| QStringList | signal_types |
| | List of QStrings that are later converted to SignalType values which are assigned to corresponding LED (based on order of passed values).
|
| |
Array of QeLed widgets that can be arranged horizontally or vertically.
Each LED in the array can be configured with a label, a state (on/off), and a signal type (NONE, WARNING, CRITICAL, INFO) that determines its color scheme. The array supports dynamic resizing, label visibility toggling, and tooltip configuration.
- Note
- Properties:
- vertical: Order of the LEDs in the widget (horizontal by default).
- labels_visible: Show/hide LEDs labels (visible by default).
- leds_count: Number of LEDs in the array (3 by default).
- states: States of LEDs.
- labels: QList of QStrings that are labels for each LED.
- signal_types: List of QStrings converted to SignalType values for each LED.
-
Signals:
◆ GetSignalTypesEnumList()
| QList< SignalType > QeLedArray::GetSignalTypesEnumList |
( |
| ) |
|
GetSignalTypesEnumList Returns current signal types for each LED.
- Returns
- Signal types as QList<SignalTypes>
◆ GetStatesBoolVector()
| std::vector< bool > QeLedArray::GetStatesBoolVector |
( |
| ) |
const |
GetStatesBoolVector Helper method to get current states.
(Mostly for testing purposes)
- Returns
- Current states of LEDs
◆ LabelsChanged
| void QeLedArray::LabelsChanged |
( |
QList< QString > | labels | ) |
|
|
signal |
LabelsChanged Communicates change of LEDs' labels.
- Parameters
-
◆ LabelsVisibilityChanged
| void QeLedArray::LabelsVisibilityChanged |
( |
bool | new_value | ) |
|
|
signal |
LabelsVisibilityChanged Communicates change of LEDs' labels visibility.
- Parameters
-
◆ LedsCountChanged
| void QeLedArray::LedsCountChanged |
( |
int | new_value | ) |
|
|
signal |
LedsCountChanged Communicates change of LEDs' numbers.
- Parameters
-
◆ OrderChanged
| void QeLedArray::OrderChanged |
( |
bool | new_value | ) |
|
|
signal |
OrderChanged Communicates change of LEDs order.
- Parameters
-
◆ SetLabel()
| void QeLedArray::SetLabel |
( |
int | index, |
|
|
QString | label_text ) |
SetLabel Sets label under specific index.
- Parameters
-
| index | Index of the label (the same as the LED's) |
| label_text | New text of the label |
◆ SetSignalType()
| void QeLedArray::SetSignalType |
( |
int | index, |
|
|
SignalType | signal_type ) |
SetSignalType Sets signal type associated with the LED.
- Parameters
-
| index | Index of the LED |
| signal_type | New ttype of the signal |
◆ SetSignalTypes
| void QeLedArray::SetSignalTypes |
( |
const QStringList & | signal_types | ) |
|
|
slot |
SetSignalTypes Converts QStrings to enum values of SignalType type and assigns them to existing LEDs in respective order.
The accepted QStrings are: 'critical', 'warning', 'info', 'none' (case insensitive). If any other string is passed, it'll be converted to SignalType::NONE.
- Parameters
-
◆ SetState()
| void QeLedArray::SetState |
( |
int | index, |
|
|
bool | state ) |
SetState Sets state of a single LED.
- Parameters
-
| index | Index of the LED |
| state | New state of the LED |
◆ SetToolTips()
| void QeLedArray::SetToolTips |
( |
QList< QString > | tooltips | ) |
|
SetToolTips sets tooltips for existing LEDs.
If the number of passed tooltips is greater than the number of existing LEDs, the tooltips with indexes beyond the max index of m_leds_list are not set. If the number of passed tooltips is smaller than the number of existing LEDs, only LEDs with indexes from 0 to <max index of passed tooltips QList> will be updated.
- Parameters
-
| tooltips | QList with tooltips. |
◆ SignalTypesChanged
| void QeLedArray::SignalTypesChanged |
( |
QStringList | new_values | ) |
|
|
signal |
SignalTypesChanged SignalTypesChanged.
- Parameters
-
◆ StatesChanged
| void QeLedArray::StatesChanged |
( |
QStringList | new_value | ) |
|
|
signal |
StatesChanged Communicates change of LEDs' states.
- Parameters
-
◆ labels
| QList<QString> QeLedArray::labels |
|
readwrite |
QList of QStrings that are labels for each LED.
- Accessors:
- GetLabels(), SetLabels(QList<QString>)
◆ labels_visible
| bool QeLedArray::labels_visible |
|
readwrite |
Show/hide LEDs labels.
True by default which means the labels are visible
- Accessors:
- AreLabelsVisible(), SetLabelsVisibility(bool)
◆ leds_count
| int QeLedArray::leds_count |
|
readwrite |
Number of LEDs in the array.
3 by default
- Accessors:
- GetLedsCount(), SetLedsCount(int)
◆ signal_types
| QStringList QeLedArray::signal_types |
|
readwrite |
List of QStrings that are later converted to SignalType values which are assigned to corresponding LED (based on order of passed values).
- Accessors:
- GetSignalTypes(), SetSignalTypes(QStringList)
◆ states
| QStringList QeLedArray::states |
|
readwrite |
States of LEDs.
- Accessors:
- GetStates(), SetStates(QStringList)
◆ vertical
| bool QeLedArray::vertical |
|
readwrite |
Order of the LEDs in the widget.
False by default which means the widget orders LEDs horizontally
- Accessors:
- IsVertical(), SetVertical(bool)
The documentation for this class was generated from the following files:
- widgets/widgets/src/include/elt/cut/widgets/widgets/QeLedArray.hpp
- widgets/widgets/src/QeLedArray.cpp