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.
Constructor.
- Parameters
-
[in] | _parent | Pointer to a parent widget |
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. |
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. |
void dragEnterEvent |
( |
QDragEnterEvent * |
_evt | ) |
|
|
protected |
Used to accept drag enter events.
- Parameters
-
void dropEvent |
( |
QDropEvent * |
_evt | ) |
|
|
protected |
Used to accept drop events.
- Parameters
-
VariablePill* GetVariablePill |
( |
const unsigned int |
_id | ) |
const |
Get a variable pill by id.
- Parameters
-
- Returns
- Variable pill with the specified id.
virtual void keyPressEvent |
( |
QKeyEvent * |
_event | ) |
|
|
protectedvirtual |
Qt callback when a key is pressed.
- Parameters
-
Get the maximum number of variable pills this container can hold.
- Returns
- Maximum number of variable pills. -1 means unlimited.
void mouseReleaseEvent |
( |
QMouseEvent * |
_event | ) |
|
|
protected |
Qt callback when the mouse is released.
- Parameters
-
[in] | _event | Qt mouse event. |
Remove a variable pill from the container.
- Parameters
-
[in] | _variable | Variable pill to remove. |
void RemoveVariablePill |
( |
const unsigned int |
_id | ) |
|
Remove a variable pill from the container.
- Parameters
-
[in] | _id | Unique id of the variable pill to remove. |
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. |
Set the selected state of a variable pill.
- Parameters
-
[in] | _variable | Variable pill to set the selected state. |
void SetText |
( |
const std::string & |
_text | ) |
|
Set the label text for this variable pill container.
- Parameters
-
[in] | _text | Text to set the label to. |
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. |
std::string Text |
( |
| ) |
const |
Get the variable pill container's label text.
- Returns
- Container label.
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. |
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. |
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. |
unsigned int VariablePillCount |
( |
| ) |
const |
Get the number of child variable pills.
- Returns
- Number of child variable pills.
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: