ComponentItem handles and manipulates component items, such as devices, on the workspace.
More...
ComponentItem handles and manipulates component items, such as devices, on the workspace.
◆ device()
Device ComponentItem::device |
( |
| ) |
|
Returns the device.
- Returns
- Device, the device object.
◆ getClusterID()
string ComponentItem::getClusterID |
( |
| ) |
|
Returns the cluster ID of the component item.
- Returns
- string, the cluster ID of the component item.
◆ getHeight()
int ComponentItem::getHeight |
( |
| ) |
|
◆ getName()
QString ComponentItem::getName |
( |
| ) |
|
Returns the name of this component item.
- Returns
- QString, name of the component item.
◆ getParent()
Returns the parent cluster that contains this component item.
- Returns
- ComponentItem, the parent cluster that contains this component item.
◆ getThisClusterID()
QString ComponentItem::getThisClusterID |
( |
| ) |
|
◆ getWidth()
int ComponentItem::getWidth |
( |
| ) |
|
◆ getXCoordinate()
int ComponentItem::getXCoordinate |
( |
| ) |
|
Returns the x-coordinate of the component item.
- Returns
- int, the x-coordinate of the component item.
◆ getXCoordinateCenter()
int ComponentItem::getXCoordinateCenter |
( |
| ) |
|
Returns the center x-coordinate of the component item.
- Returns
- int, the center x-coordinate of the component item.
◆ getYCoordinate()
int ComponentItem::getYCoordinate |
( |
| ) |
|
Returns the y-coordinate of the component item.
- Returns
- int, the y-coordinate of the component item.
◆ getYCoordinateCenter()
int ComponentItem::getYCoordinateCenter |
( |
| ) |
|
Returns the center y-coordinate of the component item.
- Returns
- int, the center y-coordinate of the component item.
◆ loadAccessoryImage()
bool ComponentItem::loadAccessoryImage |
( |
int |
, |
|
|
QString |
|
|
) |
| |
Loads an image for an accessory.
- Parameters
-
slotNum,accessory | slot index. |
imagePath,path | to the image to use for the accessory. |
- Returns
- bool, true if successful, false if not.
◆ moveBy()
void ComponentItem::moveBy |
( |
double |
, |
|
|
double |
|
|
) |
| |
Moves the component item by the specified x and y values.
- Parameters
-
x,the | value to move the component item by on the x-axis. |
y,the | value to move the component item by on the y-axis. |
◆ moveIntoCluster()
bool ComponentItem::moveIntoCluster |
( |
QString |
| ) |
|
Moves the component item into a cluster in the same level with the specified name and returns whether it was successful.
- Parameters
-
name,the | name of the cluster in the same level |
- Returns
- boolean, whether the move was successful.
◆ moveOutOfCurrentCluster()
bool ComponentItem::moveOutOfCurrentCluster |
( |
| ) |
|
Moves the component item out of the current cluster and returns whether it was successful.
- Returns
- boolean, whether the move was successful.
◆ moveTo()
void ComponentItem::moveTo |
( |
double |
, |
|
|
double |
|
|
) |
| |
Moves the component item to the specified coordinates.
- Parameters
-
x,the | value to move the component item to on the x-axis. |
y,the | value to move the component item to on the y-axis. |
◆ removeAccessory()
void ComponentItem::removeAccessory |
( |
int |
| ) |
|
Removes an accessory.
- Parameters
-
slotNum,index | of the accessory to remove. |
◆ setSelected()
void ComponentItem::setSelected |
( |
bool |
| ) |
|
Selects or deselects the component item.
- Parameters
-
bSelected,true | to select the item, false to deselect it. |
◆ setVelocity()
void ComponentItem::setVelocity |
( |
double |
, |
|
|
double |
|
|
) |
| |
Sets the x-axis and y-axis velocity of the component item.
- Parameters
-
xv,the | x-axis velocity of the component item. |
yv,the | y-axis velocity of the component item. |
◆ setVisible()
void ComponentItem::setVisible |
( |
bool |
| ) |
|
Shows or hides the component item.
- Parameters
-
bVisible,true | to show the component item, false to hide it. |
◆ setX()
void ComponentItem::setX |
( |
double |
| ) |
|
Sets the x-coordinate of the component item.
- Parameters
-
x,the | x-coordinate of the component item. |
◆ setXCenter()
void ComponentItem::setXCenter |
( |
int |
| ) |
|
Sets the center x-coordinate of the component item.
- Parameters
-
x,the | center x-coordinate of the component item. |
◆ setXVelocity()
void ComponentItem::setXVelocity |
( |
double |
| ) |
|
Sets the x-axis velocity of the component item.
- Parameters
-
xv,the | x-axis velocity of the component item. |
◆ setY()
void ComponentItem::setY |
( |
double |
| ) |
|
Sets the y-coordinate of the component item.
- Parameters
-
y,the | y-coordinate of the component item. |
◆ setYCenter()
void ComponentItem::setYCenter |
( |
int |
| ) |
|
Sets the center y-coordinate of the component item.
- Parameters
-
y,the | y-coordinate of the component item. |
◆ setYVelocity()
void ComponentItem::setYVelocity |
( |
double |
| ) |
|
Sets the y-axis velocity of the component item.
- Parameters
-
yv,the | y-axis velocity of the component item. |
◆ type()
int ComponentItem::type |
( |
| ) |
|
Returns the type of the component item.
- Returns
- int, the type of component. Types: COMPONENT = 1100, CONNECTION = 1101, NOTE = 1102, PACKET = 1103, CLUSTER = 1104, RECTANGLE = 1105, LINE = 1106, ELLIPSE = 1107, MULTIUSERITEM = 1108, QOSPACKET = 1109, RESIZEINDICATOR = 1110, ACCESSORYITEM = 1111, POLYGON = 1112, TEXTPOPUP = 1113
◆ xVelocity()
double ComponentItem::xVelocity |
( |
| ) |
|
Returns the x-axis velocity of the component item.
- Returns
- double, the x-axis velocity of the component item.
◆ yVelocity()
double ComponentItem::yVelocity |
( |
| ) |
|
Returns the y-axis velocity of the component item.
- Returns
- double, the y-axis velocity of the component item.
The documentation for this class was generated from the following file: