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...
|
|
Constructor.
- Parameters
-
[in] | _parent | Pointer to a parent widget |
Add a child variable pill.
This becomes a multi-variable pill.
- Parameters
-
[in] | _variable | Child variable pill to add. |
Get the container which holds this variable pill.
- Returns
- _container Container that holds this variable pill.
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.
void dragEnterEvent |
( |
QDragEnterEvent * |
_evt | ) |
|
|
protected |
Used to accept drag enter events.
- Parameters
-
void dropEvent |
( |
QDropEvent * |
_evt | ) |
|
|
protected |
Used to accept drop events.
- Parameters
-
unsigned int Id |
( |
| ) |
const |
Get the unique id of this variable pill.
- Returns
- Unique id;
bool IsSelected |
( |
| ) |
const |
Return the selected state of this variable pill.
- Returns
- Selected state.
void mouseMoveEvent |
( |
QMouseEvent * |
_event | ) |
|
|
protected |
Qt mouse press event.
- Parameters
-
[in] | _event | Qt mouse event. |
void mousePressEvent |
( |
QMouseEvent * |
_event | ) |
|
|
protected |
Qt mouse move event.
- Parameters
-
[in] | _event | Qt mouse event. |
std::string Name |
( |
| ) |
const |
Get the unique name for this variable.
- Returns
- Name for this variable
Get the parent of this variable pill.
- Returns
- Parent variable pill.
Remove a child variable pill.
- Parameters
-
[in] | _variable | Child variable pill to remove. |
Set the container which holds this variable pill.
- Parameters
-
[in] | _container | Container to hold this variable pill. |
void SetName |
( |
const std::string & |
_name | ) |
|
Set a unique name for this variable.
- Parameters
-
[in] | _name | Name of the variable. |
Set the parent of this variable pill.
- Parameters
-
[in] | _parent | Parent variable pill. |
void SetSelected |
( |
const bool |
_selected | ) |
|
Set the selected state of this variable pill.
- Parameters
-
[in] | _selected | True to set the state to be selected. |
void SetText |
( |
const std::string & |
_text | ) |
|
Set the text label for this variable pill.
- Parameters
-
[in] | _text | Text to set the label to. |
std::string Text |
( |
| ) |
const |
Get the text label for this variable pill.
- Returns
- the text label.
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. |
void VariableLabelChanged |
( |
const std::string & |
_label | ) |
|
|
signal |
Qt signal emitted when the variable pill's text has changed.
- Parameters
-
[in] | _label | New variable label. |
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. |
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.
unsigned int VariablePillCount |
( |
| ) |
const |
Get the number of child variable pills.
- Returns
- Number of child variable pills.
std::map<unsigned int, VariablePill *>& VariablePills |
( |
| ) |
const |
Get the a child variable pill.
- Parameters
-
[in] | _index | Index of the child variable pill. |
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. |
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: