A container for holding variable pills.
More...
#include <VariablePillContainer.hh>
Inherits QWidget.
|
void | VariableAdded (const unsigned int _id, const std::string &_name, const unsigned int _targetId) |
| Qt signal emitted when a variable is added to the container. More...
|
|
void | VariableLabelChanged (const unsigned int _id, const std::string &_label) |
| Qt signal emitted when a variable label has changed. More...
|
|
void | VariableMoved (const unsigned int _id, const unsigned int _targetId) |
| Qt signal emitted when a variable is moved into the container. More...
|
|
void | VariableRemoved (const unsigned int _id, const unsigned int _targetId) |
| Qt signal emitted when a variable is removed from the container. More...
|
|
A container for holding variable pills.
◆ VariablePillContainer()
Constructor.
- Parameters
-
[in] | _parent | Pointer to a parent widget |
◆ ~VariablePillContainer()
◆ AddVariablePill() [1/2]
Add a new variable pill to a multi-variable pill in the container.
- Parameters
-
[in] | _name | Name of variable pill to add. |
[in] | _targetId | Unqiue id of the variable pill to add to. |
◆ AddVariablePill() [2/2]
Add a variable pill to the container.
- Parameters
-
[in] | _variable | Variable pill to add. |
[in] | _targetId | Unqiue id of the variable pill to add to. |
◆ dragEnterEvent()
void dragEnterEvent |
( |
QDragEnterEvent * |
_evt | ) |
|
|
protected |
Used to accept drag enter events.
- Parameters
-
◆ dropEvent()
void dropEvent |
( |
QDropEvent * |
_evt | ) |
|
|
protected |
Used to accept drop events.
- Parameters
-
◆ GetVariablePill()
VariablePill* GetVariablePill |
( |
const unsigned int |
_id | ) |
const |
Get a variable pill by id.
- Parameters
-
- Returns
- Variable pill with the specified id.
◆ keyPressEvent()
virtual void keyPressEvent |
( |
QKeyEvent * |
_event | ) |
|
|
protectedvirtual |
Qt callback when a key is pressed.
- Parameters
-
◆ MaxSize()
Get the maximum number of variable pills this container can hold.
- Returns
- Maximum number of variable pills. -1 means unlimited.
◆ mouseReleaseEvent()
void mouseReleaseEvent |
( |
QMouseEvent * |
_event | ) |
|
|
protected |
Qt callback when the mouse is released.
- Parameters
-
[in] | _event | Qt mouse event. |
◆ RemoveVariablePill() [1/2]
Remove a variable pill from the container.
- Parameters
-
[in] | _variable | Variable pill to remove. |
◆ RemoveVariablePill() [2/2]
void RemoveVariablePill |
( |
const unsigned int |
_id | ) |
|
Remove a variable pill from the container.
- Parameters
-
[in] | _id | Unique id of the variable pill to remove. |
◆ SetMaxSize()
void SetMaxSize |
( |
const int |
_max | ) |
|
Set the maximum number of variable pills this container can hold.
- Parameters
-
[in] | _max | Maximum number of variable pills. -1 means unlimited. |
◆ SetSelected()
Set the selected state of a variable pill.
- Parameters
-
[in] | _variable | Variable pill to set the selected state. |
◆ SetText()
void SetText |
( |
const std::string & |
_text | ) |
|
Set the label text for this variable pill container.
- Parameters
-
[in] | _text | Text to set the label to. |
◆ SetVariablePillLabel()
void SetVariablePillLabel |
( |
const unsigned int |
_id, |
|
|
const std::string & |
_text |
|
) |
| |
Set the label text for a variable pill in this container.
- Parameters
-
[in] | _id | Unique id of the variable pill. |
[in] | _text | Text to set the variable pill label to. |
◆ Text()
std::string Text |
( |
| ) |
const |
Get the variable pill container's label text.
- Returns
- Container label.
◆ VariableAdded
void VariableAdded |
( |
const unsigned int |
_id, |
|
|
const std::string & |
_name, |
|
|
const unsigned int |
_targetId |
|
) |
| |
|
signal |
Qt signal emitted when a variable is added to the container.
- Parameters
-
[in] | _id | Unique id of the variable pill. |
[in] | _name | Name of variable pill added. |
[in] | _targetId | Unique id of the target variable pill that this variable is added to. VariablePill::EmptyVariable if it is added to a container and not a variable pill. |
◆ VariableLabelChanged
void VariableLabelChanged |
( |
const unsigned int |
_id, |
|
|
const std::string & |
_label |
|
) |
| |
|
signal |
Qt signal emitted when a variable label has changed.
- Parameters
-
[in] | _id | Unique id of the variable pill. |
[in] | _label | New variable label. |
◆ VariableMoved
void VariableMoved |
( |
const unsigned int |
_id, |
|
|
const unsigned int |
_targetId |
|
) |
| |
|
signal |
Qt signal emitted when a variable is moved into the container.
- Parameters
-
[in] | _id | Unique id of the variable pill. |
[in] | _targetId | Unique id of the target variable pill that this variable has moved to. VariablePill::EmptyVariable if it moved to a container and not a variable pill. |
◆ VariablePillCount()
unsigned int VariablePillCount |
( |
| ) |
const |
Get the number of child variable pills.
- Returns
- Number of child variable pills.
◆ VariableRemoved
void VariableRemoved |
( |
const unsigned int |
_id, |
|
|
const unsigned int |
_targetId |
|
) |
| |
|
signal |
Qt signal emitted when a variable is removed from the container.
- Parameters
-
[in] | _id | Unique id of the variable pill. |
[in] | _targetId | Unique id of the target variable pill that this variable is removed from. VariablePill::EmptyVariable if it is removed from a container and not a variable pill. |
The documentation for this class was generated from the following file: