A variable pill.
More...
#include <VariablePill.hh>
Inherits QWidget.
|
void | VariableAdded (const unsigned int _id, const std::string &_name) |
| Qt signal emitted when a child variable pill is added. More...
|
|
void | VariableLabelChanged (const std::string &_label) |
| Qt signal emitted when the variable pill's text has changed. More...
|
|
void | VariableMoved (const unsigned int _id) |
| Qt signal emitted when an existing variable pill is added as a child of this variable pill. More...
|
|
void | VariableRemoved (const unsigned int _id) |
| Qt signal emitted when a child variable pill is removed. More...
|
|
|
static const unsigned int | EmptyVariable |
| Empty variable id used to indicate non-existent variable. More...
|
|
◆ VariablePill()
Constructor.
- Parameters
-
[in] | _parent | Pointer to a parent widget |
◆ ~VariablePill()
◆ AddVariablePill()
Add a child variable pill.
This becomes a multi-variable pill.
- Parameters
-
[in] | _variable | Child variable pill to add. |
◆ Container()
Get the container which holds this variable pill.
- Returns
- _container Container that holds this variable pill.
◆ ContainsPoint()
bool ContainsPoint |
( |
const ignition::math::Vector2i & |
_pt | ) |
const |
Check if a point is inside the widget.
- Parameters
-
- Returns
- True if the point is inside the widget.
◆ 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
-
◆ Id()
unsigned int Id |
( |
| ) |
const |
Get the unique id of this variable pill.
- Returns
- Unique id;
◆ IsSelected()
bool IsSelected |
( |
| ) |
const |
Return the selected state of this variable pill.
- Returns
- Selected state.
◆ mouseMoveEvent()
void mouseMoveEvent |
( |
QMouseEvent * |
_event | ) |
|
|
protected |
Qt mouse press event.
- Parameters
-
[in] | _event | Qt mouse event. |
◆ mousePressEvent()
void mousePressEvent |
( |
QMouseEvent * |
_event | ) |
|
|
protected |
Qt mouse move event.
- Parameters
-
[in] | _event | Qt mouse event. |
◆ Name()
std::string Name |
( |
| ) |
const |
Get the unique name for this variable.
- Returns
- Name for this variable
◆ Parent()
Get the parent of this variable pill.
- Returns
- Parent variable pill.
◆ RemoveVariablePill()
Remove a child variable pill.
- Parameters
-
[in] | _variable | Child variable pill to remove. |
◆ SetContainer()
Set the container which holds this variable pill.
- Parameters
-
[in] | _container | Container to hold this variable pill. |
◆ SetName()
void SetName |
( |
const std::string & |
_name | ) |
|
Set a unique name for this variable.
- Parameters
-
[in] | _name | Name of the variable. |
◆ SetParent()
Set the parent of this variable pill.
- Parameters
-
[in] | _parent | Parent variable pill. |
◆ SetSelected()
void SetSelected |
( |
const bool |
_selected | ) |
|
Set the selected state of this variable pill.
- Parameters
-
[in] | _selected | True to set the state to be selected. |
◆ SetText()
void SetText |
( |
const std::string & |
_text | ) |
|
Set the text label for this variable pill.
- Parameters
-
[in] | _text | Text to set the label to. |
◆ Text()
std::string Text |
( |
| ) |
const |
Get the text label for this variable pill.
- Returns
- the text label.
◆ VariableAdded
void VariableAdded |
( |
const unsigned int |
_id, |
|
|
const std::string & |
_name |
|
) |
| |
|
signal |
Qt signal emitted when a child variable pill is added.
- Parameters
-
[in] | _id | Unique id of the child variable pill. |
[in] | _name | Name of variable pill added. |
◆ VariableLabelChanged
void VariableLabelChanged |
( |
const std::string & |
_label | ) |
|
|
signal |
Qt signal emitted when the variable pill's text has changed.
- Parameters
-
[in] | _label | New variable label. |
◆ VariableMoved
void VariableMoved |
( |
const unsigned int |
_id | ) |
|
|
signal |
Qt signal emitted when an existing variable pill is added as a child of this variable pill.
- Parameters
-
[in] | _id | Unique id of the existing variable pill that is added. |
◆ VariablePillByName()
VariablePill* VariablePillByName |
( |
const std::string & |
_name | ) |
|
Get a child variable pill by its unique name.
- Parameters
-
[in] | _name | Name of the variable pill |
- Returns
- Child variable pill.
◆ VariablePillCount()
unsigned int VariablePillCount |
( |
| ) |
const |
Get the number of child variable pills.
- Returns
- Number of child variable pills.
◆ VariablePills()
std::map<unsigned int, VariablePill *>& VariablePills |
( |
| ) |
const |
Get the a child variable pill.
- Parameters
-
[in] | _index | Index of the child variable pill. |
◆ VariableRemoved
void VariableRemoved |
( |
const unsigned int |
_id | ) |
|
|
signal |
Qt signal emitted when a child variable pill is removed.
- Parameters
-
[in] | _id | Name of child variable pill removed. |
◆ EmptyVariable
const unsigned int EmptyVariable |
|
static |
Empty variable id used to indicate non-existent variable.
The documentation for this class was generated from the following file: