roviz  0.7
Code Documentation of roviz
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ItemScene Class Reference
Inheritance diagram for ItemScene:
Inheritance graph
Collaboration diagram for ItemScene:
Collaboration graph

Signals

void sceneRealChanged ()
 
void loadingProgress (const int progress, const QString &loadcomment="", const QString &loadinfo="Loading Project")
 

Public Member Functions

 ItemScene (QSharedPointer< ProjectGui > projectGui, QObject *parent=0)
 
bool loadFromXml (QDomElement &dom)
 Load the current scene from the passed xml element. More...
 
bool saveToXml (QDomDocument &document, QDomElement &xml) const
 Save the current scene with all items and their config to xml. More...
 
void resetBounding ()
 Resets the bounding rect. Call this method after resizing the view. The sceneRect will be shrinked if possible.
 
void paste ()
 pastes the items in the clipboard to the mouse cursor position on the scene
 
QList< QGraphicsItem * > copyableItems () const
 Returns all currently selected and copyable items. More...
 
void cut ()
 copies the selected items & connectors to clipboard and removes them from the scene
 
void copy () const
 copies the selected items & connections to clipboard
 
void createTemplate ()
 Creates a template using the currently selected items.
 
void copy (QList< QGraphicsItem *> itms) const
 Copy the passed items to clipboard. More...
 
QSharedPointer< ProjectGuiprojectGui () const
 
QPixmap createPixmap (QDomDocument const &itemsDocument)
 
QPixmap createPixmap (QList< QGraphicsItem *> items, const QRectF &bounding) const
 

Static Public Member Functions

static QList< QGraphicsItem * > copyableItems (QList< QGraphicsItem *> itms)
 Returns the items which are copyable (removing connectors where only one end is in the list) More...
 

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 
void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
 
void dropEvent (QGraphicsSceneDragDropEvent *event)
 
void dragMoveEvent (QGraphicsSceneDragDropEvent *event)
 

Member Function Documentation

◆ copy()

void ItemScene::copy ( QList< QGraphicsItem *>  itms) const

Copy the passed items to clipboard.

Parameters
itmsthe items, connectors & notes to copy to clipboard

◆ copyableItems() [1/2]

QList< QGraphicsItem * > ItemScene::copyableItems ( ) const

Returns all currently selected and copyable items.

Returns
A list containing all the copyable items
Here is the caller graph for this function:

◆ copyableItems() [2/2]

QList< QGraphicsItem * > ItemScene::copyableItems ( QList< QGraphicsItem *>  itms)
static

Returns the items which are copyable (removing connectors where only one end is in the list)

Parameters
itmsThe items to search for copyable items
Returns
A list containing all the copyable items

◆ createPixmap() [1/2]

QPixmap ItemScene::createPixmap ( QDomDocument const &  itemsDocument)
Parameters
itemsDocumentA XML-representation of the items to render
Returns
A pixmap representation of the given items

◆ createPixmap() [2/2]

QPixmap ItemScene::createPixmap ( QList< QGraphicsItem *>  items,
const QRectF &  bounding 
) const
Parameters
itemsA list of items to render
boundingThe bounding box of the given items
Returns
A pixmap representation of the given items

◆ loadFromXml()

bool ItemScene::loadFromXml ( QDomElement &  dom)

Load the current scene from the passed xml element.

Parameters
domthe element to load the scene from
Returns
true on success

◆ projectGui()

QSharedPointer< ProjectGui > ItemScene::projectGui ( ) const
Returns
Returns the associated project gui, which renders/owns this view/scene
Here is the caller graph for this function:

◆ saveToXml()

bool ItemScene::saveToXml ( QDomDocument &  document,
QDomElement &  xml 
) const

Save the current scene with all items and their config to xml.

Parameters
documentthe document which can be used to create elements on it
xmlthe DomElement to save the scene to
Returns
true on success

The documentation for this class was generated from the following files: