25 #include "../system/eptexception.h"
95 EptAssert(list.size() <= 1,
"Either the item is unique or does not exist at all");
96 if (list.size() > 0)
return list.front();
118 EptAssert(list.size() <= 1,
"Either the item is unique or does not exist at all");
119 if (list.size() > 0)
return list.front();
138 if (item->getKeyIndex() == keyIndex) list.push_back(item);
157 if ((role & item->getItemRole()) == role) list.push_back(item);
177 if (item->getKeyIndex() == keyIndex and (role & item->getItemRole()) == role)
178 list.push_back(item);
GraphicsItem * getGraphicItem(int keyIndex, RoleType role)
Get a single graphics element specified by its index and its role.
std::list< GraphicsItem * > GraphicItemsList
A list of GraphicItem (global)
GraphicItemsList mGraphicItems
List of all graphic items in the view.
GraphicItemsList getGraphicItemsByRole(RoleType role)
Get a list of graphic items that match with the given role.
GraphicItemsList & getGraphicItems()
Get the list of the graphic items.
Class for a single item in a graphics view.
GraphicsItem * getGraphicItemByRole(RoleType role)
Get the first of all graphics elements with a given role.
GraphicsItem::RoleType RoleType
virtual void clear()
Clear the graphics panel.