TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
Tinkercell::GraphicsScene Class Reference

The primary task of the graphics scene is to draws items. All interactions with the GraphicsScene is done through MainWindow or NetworkHandle. NetworkHandle provides functions such as move, insert, and remove. MainWindow relays all the signals, such as mouse and key events, from the GraphicsScene. So, there is rarely a need to directly interact with the GraphicsScene. More...

#include <GraphicsScene.h>

Collaboration diagram for Tinkercell::GraphicsScene:
Collaboration graph
[legend]

List of all members.

Public Types

enum  InsertType { NEW, PASTED, LOADED, OTHER }
 for describing how an insertion was done More...

Public Slots

virtual void fitAll () const
 adjusts view to include all items
virtual void fitInView (const QRectF &) const
 adjusts view to include the given rect
virtual QRect mapToWidget (QRectF rect=QRectF(0, 0, 0, 0)) const
 map a rect from the scene coordinates to the view coordinates
virtual void popOut ()
 calls main window's popOut
virtual void popIn ()
 calls main window's popIn
virtual void zoom (qreal scaleFactor)
 zoom in or out
virtual void zoomIn ()
 zoom in (zoom with 1.5)
virtual void zoomOut ()
 zoom out (zoom with 0.75)
virtual void selectAll ()
 select all items
virtual void find (const QString &, bool clearSelected=true)
 select items with the given text
virtual void find (const QStringList &)
 select items with the given texts
virtual void deselect ()
 deselect all selected items
virtual void copy ()
 copy selected items
virtual void cut ()
 cut selected items
virtual void paste ()
 paste copied items
virtual void move (QGraphicsItem *item, const QPointF &distance)
 a simple move operation that also adds undo command to history window and emits associated signal(s)
virtual void move (const QList< QGraphicsItem * > &items, const QPointF &distance)
 a simple move operation that also adds undo command to history window and emits associated signal(s)
virtual void move (const QList< QGraphicsItem * > &items, const QList< QPointF > &distance)
 a simple move operation that also adds undo command to history window and emits associated signal(s)
virtual void insert (const QString &name, QGraphicsItem *item, InsertType type=NEW)
 this command performs an insert and also adds undo command to history window and emits associated signal(s)
virtual void insert (const QString &name, const QList< QGraphicsItem * > &items, InsertType type=NEW)
 this command performs an insert and also adds undo command to history window and emits associated signal(s)
virtual void remove (const QString &name, QGraphicsItem *item)
 this command performs an removal and also adds undo command to history window and emits associated signal(s)
virtual void remove (const QString &name, const QList< QGraphicsItem * > &items)
 this command performs an removal and also adds undo command to history window and emits associated signal(s)
virtual void removeSelected ()
 remove selected items
virtual void setBrush (const QString &name, QGraphicsItem *item, const QBrush &to)
 this command changes the brush of an item
virtual void setBrush (const QString &name, const QList< QGraphicsItem * > &items, const QList< QBrush > &to)
 this command changes the brush of an item and also adds undo command to history window and emits associated signal(s)
virtual void setZValue (const QString &name, QGraphicsItem *item, qreal to)
 this command changes the z value of an item and also adds undo command to history window and emits associated signal(s)
virtual void setZValue (const QString &name, const QList< QGraphicsItem * > &items, const QList< qreal > &to)
 this command changes the z value of an item and also adds undo command to history window and emits associated signal(s)
virtual void setPen (const QString &name, QGraphicsItem *item, const QPen &to)
 this command changes the pen of an item and also adds undo command to history window and emits associated signal(s)
virtual void setPen (const QString &name, const QList< QGraphicsItem * > &items, const QList< QPen > &to)
 this command changes the pen of an item and also adds undo command to history window and emits associated signal(s)
virtual void setBrushAndPen (const QString &name, QGraphicsItem *item, const QBrush &brush, const QPen &pen)
 this command changes the pen and/or brush of an item and also adds undo command to history window and emits associated signal(s)
virtual void setBrushAndPen (const QString &name, const QList< QGraphicsItem * > &items, const QList< QBrush > &brushes, const QList< QPen > &pens)
 this command changes the pen and/or brush of an item and also adds undo command to history window and emits associated signal(s)
virtual void transform (const QString &name, QGraphicsItem *item, const QPointF &sizechange, qreal anglechange=0.0, bool VFlip=false, bool HFlip=false)
 this command changes the size, angle, and orientation of an item and also adds undo command to history window and emits associated signal(s)
virtual void transform (const QString &name, const QList< QGraphicsItem * > &items, const QList< QPointF > &sizechange, const QList< qreal > &anglechange=QList< qreal >(), const QList< bool > &verticalFlip=QList< bool >(), const QList< bool > &horizontalFlip=QList< bool >())
 this command changes the size, angle, and orientation of an item and also adds undo command to history window and emits associated signal(s)
virtual void setParentItem (const QString &name, QGraphicsItem *item, QGraphicsItem *newParent)
 this command changes the parent of an item and also adds undo command to history window and emits associated signal(s)
virtual void setParentItem (const QString &name, const QList< QGraphicsItem * > &items, QGraphicsItem *newParent)
 this command changes the parent of an item and also adds undo command to history window and emits associated signal(s)
virtual void setParentItem (const QString &name, const QList< QGraphicsItem * > &items, const QList< QGraphicsItem * > &newParents)
 this command changes the parent of an item and also adds undo command to history window and emits associated signal(s)

Signals

void copyItems (GraphicsScene *scene, QList< QGraphicsItem * > &, QList< ItemHandle * > &)
 signals just before items are copied
void itemsAboutToBeRemoved (GraphicsScene *scene, QList< QGraphicsItem * > &, QList< ItemHandle * > &, QList< QUndoCommand * > &)
 signals just before items are deleted
void itemsRemoved (GraphicsScene *scene, const QList< QGraphicsItem * > &, const QList< ItemHandle * > &)
 signals whenever items are deleted
void itemsAboutToBeInserted (GraphicsScene *scene, QList< QGraphicsItem * > &, QList< ItemHandle * > &, QList< QUndoCommand * > &, GraphicsScene::InsertType type=NEW)
 signals whenever items are going to be added
void itemsInserted (GraphicsScene *scene, const QList< QGraphicsItem * > &, const QList< ItemHandle * > &, GraphicsScene::InsertType type=NEW)
 signals whenever items are added
void itemsSelected (GraphicsScene *scene, const QList< QGraphicsItem * > &items, QPointF point, Qt::KeyboardModifiers modifiers)
 signals whenever items are selected (item can be sub-item, not top-level)
void mousePressed (GraphicsScene *scene, QPointF point, Qt::MouseButton, Qt::KeyboardModifiers modifiers)
 signals whenever an empty node of the screen is clicked
void mouseReleased (GraphicsScene *scene, QPointF point, Qt::MouseButton, Qt::KeyboardModifiers modifiers)
 signals whenever an empty node of the screen is clicked
void mouseDoubleClicked (GraphicsScene *scene, QPointF point, QGraphicsItem *, Qt::MouseButton, Qt::KeyboardModifiers modifiers)
 emits event when mouse is double clicked
void mouseDragged (GraphicsScene *scene, QPointF from, QPointF to, Qt::MouseButton, Qt::KeyboardModifiers modifiers)
 signals whenever mouse is dragged from one point to another
void itemsAboutToBeMoved (GraphicsScene *scene, QList< QGraphicsItem * > &item, QList< QPointF > &distance, QList< QUndoCommand * > &)
 signals whenever items are going to be moved (each item is the top-most item)
void itemsMoved (GraphicsScene *scene, const QList< QGraphicsItem * > &item, const QList< QPointF > &distance)
 signals whenever items are being moved (each item is the top-most item)
void mouseMoved (GraphicsScene *scene, QGraphicsItem *item, QPointF point, Qt::MouseButton, Qt::KeyboardModifiers modifiers, QList< QGraphicsItem * > &)
 signals whenever mouse moves, and indicates whether it is on top of an item
void mouseOnTopOf (GraphicsScene *scene, QGraphicsItem *item, QPointF point, Qt::KeyboardModifiers modifiers, QList< QGraphicsItem * > &)
 signals whenever mouse is on top of an item
void sceneRightClick (GraphicsScene *scene, QGraphicsItem *item, QPointF point, Qt::KeyboardModifiers modifiers)
 signals whenever right click is made on an item or sceen
void keyPressed (GraphicsScene *scene, QKeyEvent *)
 signals whenever a key is pressed
void keyReleased (GraphicsScene *scene, QKeyEvent *)
 signals whenever a key is released
void escapeSignal (const QWidget *sender)
 signals whenever the current activities need to be stopped
void filesDropped (const QList< QFileInfo > &files)
 signals whenever file(s) are dropped on the canvas
void colorChanged (GraphicsScene *scene, const QList< QGraphicsItem * > &items)
 signals whenever color of items are changed
void parentItemChanged (GraphicsScene *scene, const QList< QGraphicsItem * > &items, const QList< QGraphicsItem * > &parents)
 signals whenever item parents are changed

Public Member Functions

MainWindowmainWindow () const
 the main window for this network
ConsoleWindowconsole () const
 same as network->mainWindow->console()
ItemHandlelocalHandle () const
 same as networkWindow->handle
ItemHandleglobalHandle () const
 same as network->globalHandle()
virtual bool useDefaultBehavior () const
 indicates whether this scene is free to perform actions
virtual void useDefaultBehavior (bool)
 indicates whether this scene is free to perform actions
virtual QRectF visibleRegion () const
 Returns the currently visible window from the current graphics view.
virtual void setBackground (const QPixmap &) const
 set the background image for the scene
virtual void setForeground (const QPixmap &) const
 set the foreground image for the scene
virtual QPointF & lastPoint ()
 Returns the point where mouse was clicked last on the scene coordinates.
virtual QPoint & lastScreenPoint ()
 Returns the point where mouse was clicked last on the screen coordinates.
virtual QList< QGraphicsItem * > & selected ()
 Returns the list of pointers to items that are currently selected.
virtual QRectF selectedRect ()
 Returns a rectangle that includes all the selected items.
virtual QList< QGraphicsItem * > & moving ()
 Returns the list of pointers to items that are currently being moved.
virtual qreal ZValue ()
 top Z value
 GraphicsScene (NetworkHandle *network)
 Constructor: sets 10000x10000 scene.
virtual ~GraphicsScene ()
 destructor
virtual void enableGrid (int sz=100)
 set the grid mode ON with the given grid size
virtual void disableGrid ()
 set the grid mode OFF, which is same as setting grid size to 0
virtual void setGridSize (int sz=100)
 set the grid size. If > 0, grid will be enabled. If 0, grid will be disabled
virtual int gridSize () const
 get the grid size being used (0 = no grid)
virtual void addItem (QGraphicsItem *item)
 Add a new item to the scene (different from insert)
virtual void centerOn (const QPointF &point) const
 place center at the point
virtual void clearSelection ()
 Clear all selection and moving items list.
virtual void print (QPaintDevice *printer, const QRectF &rect=QRectF())
 send everything on the screen to a printer
virtual void select (QGraphicsItem *item)
 select one item (does not deselect other items)
virtual void select (const QList< QGraphicsItem * > &item)
 select items (does not deselect previously selected items)
virtual void deselect (QGraphicsItem *item)
 deselect one item
virtual void showToolTip (QPointF, const QString &)
 show a tooltip a the given position
virtual void snapToGrid (QGraphicsItem *)
 snap the node item to the grid

Public Attributes

NetworkHandlenetwork
 the network represented by this scene
NetworkWindownetworkWindow
 the network window widget inside of which this scene is located
QMenu * contextItemsMenu
 the context menu that is shown during right-click event on selected graphical items. Plugins can add new actions to this menu.
QMenu * contextScreenMenu
 the context menu that is shown during right-click event on the scene. Plugins can add new actions to this menu.

Static Public Attributes

static bool USE_DEFAULT_BEHAVIOR = true
 each graphics scene has a default behavior, i.e. moving, selecing, deleting. Whether or not to use the default behavior is set using scene->useDefaultBehavior. This static variable is the default value for each scene's useDefaultBehavior variable, i.e. setting this to true will cause a newly constructed graphics scene to NOT use default behaviors.
static int GRID = 0
 setting grid to a non-zero value forces node items to "fit" on the grid, where the gap between the grid lines is determined by this variable. The default is 0, i.e. no grid
static QPen SelectionRectanglePen = Qt::NoPen
 pen that is used to draw the selection rectangle
static QBrush SelectionRectangleBrush = QBrush(QColor(0,132,255,50))
 brush that is used to color the selection rectangle
static QBrush BackgroundBrush = Qt::NoBrush
 brush used to draw the background for all scenes
static QColor BackgroundColor
 background color for all scenes
static QPen GridPen = QPen(Qt::lightGray,2)
 pen used to draw the grid for the scene
static QBrush ForegroundBrush = Qt::NoBrush
 brush used to draw the foreground for the scene
static QBrush ToolTipBackgroundBrush = QBrush(QColor(36,28,28,125))
 brush used to draw the background of tool tips
static QBrush ToolTipTextBrush = QBrush(QColor(255,255,255,255))
 brush used to draw the text for tool tips
static qreal MIN_DRAG_DISTANCE = 2.0
 the minimum distance that gets classified as a "drag". Anything less will be considered just a click.

Protected Member Functions

virtual void hideToolTips ()
 hide the all tool tips
virtual void hideGraphicalTools ()
 hide the all graphical tools
virtual void showGraphicalTools ()
 show graphical tools for selected items
virtual void scaleGraphicalTools ()
 scale the visible graphical tools according to viewport size
virtual void mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent)
 when mouse is pressed, the item at the position is added to selected list and moving list
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent)
 when mouse is double clicked, the item at the position is added to selected list and moving list
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent)
 when mouse is moving, all items in moving list are moved
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent)
 when mouse is released, moving list is cleared
virtual void keyPressEvent (QKeyEvent *event)
 when key is pressed
virtual void keyReleaseEvent (QKeyEvent *event)
 when key is released
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *contextMenuEvent)
 context menu for the scene
virtual void populateContextMenu ()
 populate the context menu using selected items' tools actions
virtual void drawBackground (QPainter *painter, const QRectF &rect)
 draw background grid if in grid mode
virtual void selectConnections (const QPointF &)
 used to select the entire connection during mouse click

Static Protected Member Functions

static void clearStaticItems ()
 clears copied items

Protected Attributes

bool _useDefaultBehavior
 indicates whether this scene is free to perform actions
int gridSz
 grid size. If zero, then disabled
qreal lastZ
 topmost Z value
bool contextMenuJustActivated
 a hack to prevent strange mouse movements after context menu event
QGraphicsRectItem selectionRect
 rectanglular selection area
QList< QGraphicsItem * > toolTips
 list of temporary tool tips
QPointF clickedPoint
 point where mouse is clicked
QPoint clickedScreenPoint
 point where mouse is clicked on the screen
Qt::MouseButton clickedButton
 button that was used when mouse was clicked
bool mouseDown
 mouse is being pressed
QList< QGraphicsItem * > selectedItems
 list of pointers to selected items
QList< ToolGraphicsItem * > visibleTools
 list of pointers to tool items
QList< QGraphicsItem * > movingItems
 list of pointers to moving items
QGraphicsItemGroup * movingItemsGroup
 group of moving items

Static Protected Attributes

static QList< QGraphicsItem * > duplicateItems
 used to store copied items
static GraphicsScenecopiedFromScene
 used to store copied items

Friends

class MainWindow
class NetworkWindow
class NetworkHandle
class GraphicsView
class SymbolsTable

Detailed Description

The primary task of the graphics scene is to draws items. All interactions with the GraphicsScene is done through MainWindow or NetworkHandle. NetworkHandle provides functions such as move, insert, and remove. MainWindow relays all the signals, such as mouse and key events, from the GraphicsScene. So, there is rarely a need to directly interact with the GraphicsScene.

Definition at line 58 of file GraphicsScene.h.


Member Enumeration Documentation

for describing how an insertion was done

Enumerator:
NEW 
PASTED 
LOADED 
OTHER 

Definition at line 91 of file GraphicsScene.h.


Constructor & Destructor Documentation

Tinkercell::GraphicsScene::GraphicsScene ( NetworkHandle network)

Constructor: sets 10000x10000 scene.

Definition at line 132 of file GraphicsScene.cpp.

Here is the call graph for this function:

Tinkercell::GraphicsScene::~GraphicsScene ( ) [virtual]

destructor

Definition at line 158 of file GraphicsScene.cpp.

Here is the call graph for this function:


Member Function Documentation

void Tinkercell::GraphicsScene::addItem ( QGraphicsItem *  item) [virtual]

Add a new item to the scene (different from insert)

Add a new item to the scene Precondition: None Postcondition: None.

See also:
insert
Parameters:
QGraphicsItem*Tinkercell object
Returns:
void
Parameters:
Tinkercellobject
Returns:
void

Definition at line 270 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::centerOn ( const QPointF &  point) const [virtual]

place center at the point

place center at the point Precondition: None Postcondition: None

Parameters:
QPointFpoint
Returns:
void
Parameters:
point
Returns:
void

Definition at line 820 of file GraphicsScene.cpp.

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::clearSelection ( ) [virtual]

Clear all selection and moving items list.

Clear all selection and moving items list Precondition: None Postcondition: None.

Returns:
void

Definition at line 242 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::clearStaticItems ( ) [static, protected]

clears copied items

Definition at line 1748 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::colorChanged ( GraphicsScene scene,
const QList< QGraphicsItem * > &  items 
) [signal]

signals whenever color of items are changed

Parameters:
GraphicsScene* scene where the event took place
QList<QGraphicsItem*>&items that changed color
Returns:
void

Here is the caller graph for this function:

ConsoleWindow * Tinkercell::GraphicsScene::console ( ) const

same as network->mainWindow->console()

Definition at line 2235 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  mouseEvent) [protected, virtual]

context menu for the scene

context menu for the scene Precondition: None Postcondition: None

Parameters:
QGraphicsSceneContextMenuEvent* context menu event
Returns:
void
Parameters:
contextmenu event
Returns:
void

Definition at line 745 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::copy ( ) [virtual, slot]

copy selected items

Definition at line 1771 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::copyItems ( GraphicsScene scene,
QList< QGraphicsItem * > &  ,
QList< ItemHandle * > &   
) [signal]

signals just before items are copied

Parameters:
GraphicsScene* scene where the items are going to be copied
QList<QGraphicsItem*>&list of graphics items going to be copied
QList<ItemHandle*>&list of handles going to be copied (does NOT have to be the same number as items removed)
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::cut ( ) [virtual, slot]

cut selected items

Definition at line 1814 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::deselect ( ) [virtual, slot]

deselect all selected items

deselect items

Returns:
void

Definition at line 1054 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::deselect ( QGraphicsItem *  item) [virtual]

deselect one item

deselect items

Parameters:
QGraphicsItem*item to deselect
Returns:
void

Definition at line 1036 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::disableGrid ( ) [virtual]

set the grid mode OFF, which is same as setting grid size to 0

Returns:
void

Definition at line 2140 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::drawBackground ( QPainter *  painter,
const QRectF &  rect 
) [protected, virtual]

draw background grid if in grid mode

Definition at line 2192 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::enableGrid ( int  sz = 100) [virtual]

set the grid mode ON with the given grid size

Parameters:
doublegrid size (0 will disable grid)
Returns:
void

Definition at line 2135 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::escapeSignal ( const QWidget *  sender) [signal]

signals whenever the current activities need to be stopped

Parameters:
QWidget* the widget that send the signal
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::filesDropped ( const QList< QFileInfo > &  files) [signal]

signals whenever file(s) are dropped on the canvas

Parameters:
QList<QFileInfo>&the name(s) of the file(s)
Returns:
void
void Tinkercell::GraphicsScene::find ( const QString &  text,
bool  clearSelected = true 
) [virtual, slot]

select items with the given text

Definition at line 2025 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::find ( const QStringList &  textlist) [virtual, slot]

select items with the given texts

Definition at line 2019 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::fitAll ( ) const [virtual, slot]

adjusts view to include all items

Returns:
void

Definition at line 1113 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::fitInView ( const QRectF &  rect) const [virtual, slot]

adjusts view to include the given rect

adjusts view to include rect

Parameters:
QRectF
Returns:
void

Definition at line 1076 of file GraphicsScene.cpp.

ItemHandle * Tinkercell::GraphicsScene::globalHandle ( ) const

same as network->globalHandle()

Definition at line 2249 of file GraphicsScene.cpp.

Here is the call graph for this function:

int Tinkercell::GraphicsScene::gridSize ( ) const [virtual]

get the grid size being used (0 = no grid)

Returns:
int

Definition at line 2150 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::hideGraphicalTools ( ) [protected, virtual]

hide the all graphical tools

Definition at line 2359 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::hideToolTips ( ) [protected, virtual]

hide the all tool tips

Definition at line 2538 of file GraphicsScene.cpp.

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::insert ( const QString &  name,
QGraphicsItem *  item,
InsertType  type = NEW 
) [virtual, slot]

this command performs an insert and also adds undo command to history window and emits associated signal(s)

Parameters:
QStringname of new item
QList<QPointF>&distance to move the items specified for each item
Returns:
void

Definition at line 1359 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::insert ( const QString &  name,
const QList< QGraphicsItem * > &  items,
InsertType  type = NEW 
) [virtual, slot]

this command performs an insert and also adds undo command to history window and emits associated signal(s)

this command performs an insert and allows redo/undo of that insert

Definition at line 1388 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::itemsAboutToBeInserted ( GraphicsScene scene,
QList< QGraphicsItem * > &  ,
QList< ItemHandle * > &  ,
QList< QUndoCommand * > &  ,
GraphicsScene::InsertType  type = NEW 
) [signal]

signals whenever items are going to be added

Parameters:
GraphicsScene*scene where the items are added
QList<QGraphicsItem*>&list of new graphics items
QList<ItemHandle*>&list of new handles (does NOT have to be the same number as items)
QList<QUndoCommand*>&list of commands that will be executed right before items are inserted
InsertType(optional) indicated how the items were inserted, e.g. copy/pasted or loaded from a file
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::itemsAboutToBeMoved ( GraphicsScene scene,
QList< QGraphicsItem * > &  item,
QList< QPointF > &  distance,
QList< QUndoCommand * > &   
) [signal]

signals whenever items are going to be moved (each item is the top-most item)

Parameters:
GraphicsScene*scene where the items were moved
QList<QGraphicsItem*>&list of pointers to all moving items
QPointFdistance by which items moved
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
QList<QUndoCommand*>&list of commands that will be executed right before items are inserted
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::itemsAboutToBeRemoved ( GraphicsScene scene,
QList< QGraphicsItem * > &  ,
QList< ItemHandle * > &  ,
QList< QUndoCommand * > &   
) [signal]

signals just before items are deleted

Parameters:
GraphicsScene* scene where the items are going to be removed
QList<QGraphicsItem*>&list of graphics items going to be removed
QList<ItemHandle*>&list of handles going to be removed (does NOT have to be the same number as items removed)
QList<QUndoCommand*>&list of commands that will be executed right before items are removed
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::itemsInserted ( GraphicsScene scene,
const QList< QGraphicsItem * > &  ,
const QList< ItemHandle * > &  ,
GraphicsScene::InsertType  type = NEW 
) [signal]

signals whenever items are added

Parameters:
GraphicsScene*scene where the items were added
QList<QGraphicsItem*>&list of new graphics items
QList<ItemHandle*>&list of new handles (does NOT have to be the same number as items)
InsertType(optional) indicated how the items were inserted, e.g. copy/pasted or loaded from a file
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::itemsMoved ( GraphicsScene scene,
const QList< QGraphicsItem * > &  item,
const QList< QPointF > &  distance 
) [signal]

signals whenever items are being moved (each item is the top-most item)

Parameters:
GraphicsScene*scene where the items were moved
QList<QGraphicsItem*>&list of pointers to all moving items
QPointFdistance by which items moved
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::itemsRemoved ( GraphicsScene scene,
const QList< QGraphicsItem * > &  ,
const QList< ItemHandle * > &   
) [signal]

signals whenever items are deleted

Parameters:
GraphicsScene*scene where the items were removed
QList<QGraphicsItem*>&list of items removed
QList<ItemHandle*>&list of handles removed (does NOT have to be the same number as items removed)
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::itemsSelected ( GraphicsScene scene,
const QList< QGraphicsItem * > &  items,
QPointF  point,
Qt::KeyboardModifiers  modifiers 
) [signal]

signals whenever items are selected (item can be sub-item, not top-level)

Parameters:
GraphicsScene*scene where items are selected
QList<QGraphicsItem*>&list of all selected item pointers
QPointFpoint where mouse is clicked
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::keyPressed ( GraphicsScene scene,
QKeyEvent *   
) [signal]

signals whenever a key is pressed

Parameters:
GraphicsScene*scene where the event took place
QKeyEvent* key that is pressed
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::keyPressEvent ( QKeyEvent *  keyEvent) [protected, virtual]

when key is pressed

when key is pressed Precondition: None Postcondition: None

Parameters:
QKeyEvent* key event
Returns:
void
Parameters:
keyevent
Returns:
void

Definition at line 836 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::keyReleased ( GraphicsScene scene,
QKeyEvent *   
) [signal]

signals whenever a key is released

Parameters:
GraphicsScene*scene where the event took place
QKeyEvent* key that is released
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::keyReleaseEvent ( QKeyEvent *  keyEvent) [protected, virtual]

when key is released

when key is released Precondition: None Postcondition: None

Parameters:
QKeyEvent* key event
Returns:
void
Parameters:
keyevent
Returns:
void

Definition at line 994 of file GraphicsScene.cpp.

Here is the call graph for this function:

QPointF & Tinkercell::GraphicsScene::lastPoint ( ) [virtual]

Returns the point where mouse was clicked last on the scene coordinates.

Returns the point where mouse was clicked last Precondition: None Postcondition: None.

Parameters:
void
Returns:
QPointF& ref to last clicked point on the scene
Parameters:
void
Returns:
ref to last clicked point

Definition at line 82 of file GraphicsScene.cpp.

Here is the caller graph for this function:

QPoint & Tinkercell::GraphicsScene::lastScreenPoint ( ) [virtual]

Returns the point where mouse was clicked last on the screen coordinates.

Returns the point where mouse was clicked last Precondition: None Postcondition: None.

Parameters:
void
Returns:
QPointF& ref to last clicked point on the screen
Parameters:
void
Returns:
ref to last clicked point

Definition at line 92 of file GraphicsScene.cpp.

ItemHandle * Tinkercell::GraphicsScene::localHandle ( ) const

same as networkWindow->handle

Definition at line 2242 of file GraphicsScene.cpp.

Here is the caller graph for this function:

MainWindow * Tinkercell::GraphicsScene::mainWindow ( ) const

the main window for this network

Definition at line 2228 of file GraphicsScene.cpp.

Here is the caller graph for this function:

QRect Tinkercell::GraphicsScene::mapToWidget ( QRectF  rect = QRectF(0,0,0,0)) const [virtual, slot]

map a rect from the scene coordinates to the view coordinates

Parameters:
QRectFif left blank, the visible rect will be used
Returns:
void

Definition at line 1086 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::mouseDoubleClicked ( GraphicsScene scene,
QPointF  point,
QGraphicsItem *  ,
Qt::MouseButton  ,
Qt::KeyboardModifiers  modifiers 
) [signal]

emits event when mouse is double clicked

Parameters:
GraphicsScene*scene where the event took place
pointwhere mouse is clicked
modifierkeys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  mouseEvent) [protected, virtual]

when mouse is double clicked, the item at the position is added to selected list and moving list

emits signal when mouse is double clicked Precondition: None Postcondition: None

Parameters:
QGraphicsSceneMouseEvent* mouse event
Returns:
void
Parameters:
mouseevent
Returns:
void

Definition at line 725 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::mouseDragged ( GraphicsScene scene,
QPointF  from,
QPointF  to,
Qt::MouseButton  ,
Qt::KeyboardModifiers  modifiers 
) [signal]

signals whenever mouse is dragged from one point to another

Parameters:
GraphicsScene*scene where the event took place
QPointFpoint where mouse is clicked first
QPointFpoint where mouse is released
Qt::MouseButtonbutton being pressed
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::mouseMoved ( GraphicsScene scene,
QGraphicsItem *  item,
QPointF  point,
Qt::MouseButton  ,
Qt::KeyboardModifiers  modifiers,
QList< QGraphicsItem * > &   
) [signal]

signals whenever mouse moves, and indicates whether it is on top of an item

Parameters:
GraphicsScene*scene where the event took place
QGraphicsItem*pointer to item that mouse is on top of
QPointFpoint where mouse is clicked
Qt::MouseButtonbutton being pressed
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
QList<QGraphicsItem*>&list of items that are being moved with the mouse
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::mouseMoveEvent ( QGraphicsSceneMouseEvent *  mouseEvent) [protected, virtual]

when mouse is moving, all items in moving list are moved

when mouse is moving, all items in moving list are moved Precondition: None Postcondition: None

Parameters:
QGraphicsSceneMouseEvent* mouse event
Returns:
void
Parameters:
mouseevent
Returns:
void

Definition at line 545 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::mouseOnTopOf ( GraphicsScene scene,
QGraphicsItem *  item,
QPointF  point,
Qt::KeyboardModifiers  modifiers,
QList< QGraphicsItem * > &   
) [signal]

signals whenever mouse is on top of an item

Parameters:
GraphicsScene*scene where the event took place
QGraphicsItem*pointer to item that mouse is on top of
QPointFpoint where mouse is clicked
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
QList<QGraphicsItem*>&list of items that are being moved with the mouse
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::mousePressed ( GraphicsScene scene,
QPointF  point,
Qt::MouseButton  ,
Qt::KeyboardModifiers  modifiers 
) [signal]

signals whenever an empty node of the screen is clicked

Parameters:
GraphicsScene*scene where the event took place
QPointFpoint where mouse is clicked
Qt::MouseButtonwhich button was pressed
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::mousePressEvent ( QGraphicsSceneMouseEvent *  mouseEvent) [protected, virtual]

when mouse is pressed, the item at the position is added to selected list and moving list

when mouse is pressed, the item at the position is added to selected list and moving list Precondition: None Postcondition: None

Parameters:
QGraphicsSceneMouseEvent* mouse event
Returns:
void
Parameters:
mouseevent
Returns:
void

Definition at line 322 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::mouseReleased ( GraphicsScene scene,
QPointF  point,
Qt::MouseButton  ,
Qt::KeyboardModifiers  modifiers 
) [signal]

signals whenever an empty node of the screen is clicked

Parameters:
GraphicsScene*scene where the event took place
QPointFpoint where mouse is clicked
Qt::MouseButtonwhich button was pressed
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  mouseEvent) [protected, virtual]

when mouse is released, moving list is cleared

when mouse is released, moving list is cleared Precondition: None Postcondition: None

Parameters:
QGraphicsSceneMouseEvent* mouse event
Returns:
void
Parameters:
mouseevent
Returns:
void

Definition at line 636 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::move ( QGraphicsItem *  item,
const QPointF &  distance 
) [virtual, slot]

a simple move operation that also adds undo command to history window and emits associated signal(s)

a simple move operation with undo

Parameters:
QGraphicsItem* item to move
QPointFdistance to move the item
Returns:
void

Definition at line 1150 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::move ( const QList< QGraphicsItem * > &  items,
const QPointF &  distance 
) [virtual, slot]

a simple move operation that also adds undo command to history window and emits associated signal(s)

a simple move operation with undo

Parameters:
QList<QGraphicsItem*>&items to move
QPointFdistance to move the items (same for all items)
Returns:
void

Definition at line 1216 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::move ( const QList< QGraphicsItem * > &  items,
const QList< QPointF > &  distance 
) [virtual, slot]

a simple move operation that also adds undo command to history window and emits associated signal(s)

a simple move operation with undo

Parameters:
QList<QGraphicsItem*>&items to move
QList<QPointF>&distance to move the items specified for each item
Returns:
void

Definition at line 1288 of file GraphicsScene.cpp.

Here is the call graph for this function:

QList< QGraphicsItem * > & Tinkercell::GraphicsScene::moving ( ) [virtual]

Returns the list of pointers to items that are currently being moved.

Returns the list of pointers to items that are currently being moved Precondition: None Postcondition: None.

Parameters:
void
Returns:
QList<QGraphicsItem*>& list of pointers to moving items
Parameters:
void
Returns:
list of pointers to moving items

Definition at line 126 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::parentItemChanged ( GraphicsScene scene,
const QList< QGraphicsItem * > &  items,
const QList< QGraphicsItem * > &  parents 
) [signal]

signals whenever item parents are changed

Parameters:
GraphicsScene* scene where the event took place
QList<QGraphicsItem*>&items
QList<QGraphicsItem*>&new parents
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::paste ( ) [virtual, slot]

paste copied items

Definition at line 1871 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::popIn ( ) [virtual, slot]

calls main window's popIn

Returns:
void

Definition at line 2353 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::popOut ( ) [virtual, slot]

calls main window's popOut

Returns:
void

Definition at line 2347 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::populateContextMenu ( ) [protected, virtual]

populate the context menu using selected items' tools actions

Returns:
void

Definition at line 2460 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::print ( QPaintDevice *  printer,
const QRectF &  rect = QRectF() 
) [virtual]

send everything on the screen to a printer

prints the current scene

Parameters:
QPaintDevice* printer
QRectFregion to print
Returns:
void

Definition at line 1723 of file GraphicsScene.cpp.

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::remove ( const QString &  name,
QGraphicsItem *  item 
) [virtual, slot]

this command performs an removal and also adds undo command to history window and emits associated signal(s)

this command performs an removal and allows redo/undo of that removal

Definition at line 1422 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::remove ( const QString &  name,
const QList< QGraphicsItem * > &  items 
) [virtual, slot]

this command performs an removal and also adds undo command to history window and emits associated signal(s)

this command performs an removal and allows redo/undo of that removal

Definition at line 1460 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::removeSelected ( ) [virtual, slot]

remove selected items

Definition at line 1843 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::scaleGraphicalTools ( ) [protected, virtual]

scale the visible graphical tools according to viewport size

Definition at line 2403 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::sceneRightClick ( GraphicsScene scene,
QGraphicsItem *  item,
QPointF  point,
Qt::KeyboardModifiers  modifiers 
) [signal]

signals whenever right click is made on an item or sceen

Parameters:
GraphicsScene*scene where the event took place
QGraphicsItem*pointer to item that mouse is clicked on
QPointFpoint where mouse is clicked
Qt::KeyboardModifiersmodifier keys being used when mouse clicked
Returns:
void

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::select ( const QList< QGraphicsItem * > &  item) [virtual]

select items (does not deselect previously selected items)

select items

Parameters:
QList<QGraphicsItem*>&items to select
Returns:
void

Definition at line 1018 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::select ( QGraphicsItem *  item) [virtual]

select one item (does not deselect other items)

select items

Parameters:
QGraphicsItem*item to select
Returns:
void

Definition at line 1001 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::selectAll ( ) [virtual, slot]

select all items

Definition at line 1854 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::selectConnections ( const QPointF &  point) [protected, virtual]

used to select the entire connection during mouse click

Definition at line 2256 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QList< QGraphicsItem * > & Tinkercell::GraphicsScene::selected ( ) [virtual]

Returns the list of pointers to items that are currently selected.

Returns the list of pointers to items that are currently selected Precondition: None Postcondition: None.

Parameters:
void
Returns:
QList<QGraphicsItem*>& list of pointers to selected items
Parameters:
void
Returns:
list of pointers to selected items

Definition at line 102 of file GraphicsScene.cpp.

Here is the caller graph for this function:

QRectF Tinkercell::GraphicsScene::selectedRect ( ) [virtual]

Returns a rectangle that includes all the selected items.

Returns a rectangle that includes all the selected items Precondition: None Postcondition: None.

Parameters:
void
Returns:
QRectF bounding rect for selected items
Parameters:
void
Returns:
bounding rect for selected items

Definition at line 113 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::setBackground ( const QPixmap &  image) const [virtual]

set the background image for the scene

Definition at line 2323 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::setBrush ( const QString &  name,
QGraphicsItem *  item,
const QBrush &  to 
) [virtual, slot]

this command changes the brush of an item

Definition at line 1502 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setBrush ( const QString &  name,
const QList< QGraphicsItem * > &  items,
const QList< QBrush > &  to 
) [virtual, slot]

this command changes the brush of an item and also adds undo command to history window and emits associated signal(s)

this command changes the brush of an item

Definition at line 1519 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setBrushAndPen ( const QString &  name,
QGraphicsItem *  item,
const QBrush &  brush,
const QPen &  pen 
) [virtual, slot]

this command changes the pen and/or brush of an item and also adds undo command to history window and emits associated signal(s)

this command changes the pen of an item

Definition at line 1567 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setBrushAndPen ( const QString &  name,
const QList< QGraphicsItem * > &  items,
const QList< QBrush > &  brushes,
const QList< QPen > &  pens 
) [virtual, slot]

this command changes the pen and/or brush of an item and also adds undo command to history window and emits associated signal(s)

this command changes the pen of an item

Definition at line 1584 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setForeground ( const QPixmap &  image) const [virtual]

set the foreground image for the scene

Definition at line 2335 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::setGridSize ( int  sz = 100) [virtual]

set the grid size. If > 0, grid will be enabled. If 0, grid will be disabled

Parameters:
doublegrid size (0 will disable grid)
Returns:
void

Definition at line 2145 of file GraphicsScene.cpp.

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::setParentItem ( const QString &  name,
const QList< QGraphicsItem * > &  items,
const QList< QGraphicsItem * > &  newParents 
) [virtual, slot]

this command changes the parent of an item and also adds undo command to history window and emits associated signal(s)

this command changes the parent of an item

Definition at line 1637 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setParentItem ( const QString &  name,
const QList< QGraphicsItem * > &  items,
QGraphicsItem *  newParent 
) [virtual, slot]

this command changes the parent of an item and also adds undo command to history window and emits associated signal(s)

this command changes the parent of an item

Definition at line 1618 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setParentItem ( const QString &  name,
QGraphicsItem *  item,
QGraphicsItem *  newParent 
) [virtual, slot]

this command changes the parent of an item and also adds undo command to history window and emits associated signal(s)

this command changes the parent of an item

Definition at line 1600 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setPen ( const QString &  name,
const QList< QGraphicsItem * > &  items,
const QList< QPen > &  to 
) [virtual, slot]

this command changes the pen of an item and also adds undo command to history window and emits associated signal(s)

this command changes the pen of an item

Definition at line 1551 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::setPen ( const QString &  name,
QGraphicsItem *  item,
const QPen &  to 
) [virtual, slot]

this command changes the pen of an item and also adds undo command to history window and emits associated signal(s)

this command changes the pen of an item

Definition at line 1534 of file GraphicsScene.cpp.

Here is the call graph for this function:

virtual void Tinkercell::GraphicsScene::setZValue ( const QString &  name,
QGraphicsItem *  item,
qreal  to 
) [virtual, slot]

this command changes the z value of an item and also adds undo command to history window and emits associated signal(s)

virtual void Tinkercell::GraphicsScene::setZValue ( const QString &  name,
const QList< QGraphicsItem * > &  items,
const QList< qreal > &  to 
) [virtual, slot]

this command changes the z value of an item and also adds undo command to history window and emits associated signal(s)

void Tinkercell::GraphicsScene::showGraphicalTools ( ) [protected, virtual]

show graphical tools for selected items

Definition at line 2377 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::showToolTip ( QPointF  p,
const QString &  text 
) [virtual]

show a tooltip a the given position

Definition at line 2514 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::snapToGrid ( QGraphicsItem *  item) [virtual]

snap the node item to the grid

Parameters:
NodeGraphicsItem*
Returns:
void

Definition at line 2155 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::transform ( const QString &  name,
const QList< QGraphicsItem * > &  items,
const QList< QPointF > &  sizechange,
const QList< qreal > &  anglechange = QList<qreal>(),
const QList< bool > &  verticalFlip = QList<bool>(),
const QList< bool > &  horizontalFlip = QList<bool>() 
) [virtual, slot]

this command changes the size, angle, and orientation of an item and also adds undo command to history window and emits associated signal(s)

this command changes the size, angle, and orientation of an item

Definition at line 1701 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::transform ( const QString &  name,
QGraphicsItem *  item,
const QPointF &  sizechange,
qreal  anglechange = 0.0,
bool  VFlip = false,
bool  HFlip = false 
) [virtual, slot]

this command changes the size, angle, and orientation of an item and also adds undo command to history window and emits associated signal(s)

this command changes the size, angle, and orientation of an item

Definition at line 1682 of file GraphicsScene.cpp.

void Tinkercell::GraphicsScene::useDefaultBehavior ( bool  b) [virtual]

indicates whether this scene is free to perform actions

Definition at line 2548 of file GraphicsScene.cpp.

bool Tinkercell::GraphicsScene::useDefaultBehavior ( ) const [virtual]

indicates whether this scene is free to perform actions

Definition at line 2555 of file GraphicsScene.cpp.

QRectF Tinkercell::GraphicsScene::visibleRegion ( ) const [virtual]

Returns the currently visible window from the current graphics view.

Returns the currently visible window.

Parameters:
void
Returns:
QRectF rectangle
Parameters:
void
Returns:
rectangle

Definition at line 59 of file GraphicsScene.cpp.

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::zoom ( qreal  scaleFactor) [virtual, slot]

zoom in or out

zoom

Parameters:
scalefactor (< 1 means zoom out)
Returns:
void
Parameters:
scalefactor
Returns:
void

Definition at line 785 of file GraphicsScene.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::GraphicsScene::zoomIn ( ) [virtual, slot]

zoom in (zoom with 1.5)

zoom in

Returns:
void
Parameters:
scalefactor
Returns:
void

Definition at line 803 of file GraphicsScene.cpp.

Here is the call graph for this function:

void Tinkercell::GraphicsScene::zoomOut ( ) [virtual, slot]

zoom out (zoom with 0.75)

zoom out

Parameters:
scalefactor
Returns:
void

Definition at line 810 of file GraphicsScene.cpp.

Here is the call graph for this function:

qreal Tinkercell::GraphicsScene::ZValue ( ) [virtual]

top Z value

top Z value Precondition: None Postcondition: None

Returns:
double

Definition at line 313 of file GraphicsScene.cpp.

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class GraphicsView [friend]

Definition at line 541 of file GraphicsScene.h.

friend class MainWindow [friend]

Definition at line 538 of file GraphicsScene.h.

friend class NetworkHandle [friend]

Definition at line 540 of file GraphicsScene.h.

friend class NetworkWindow [friend]

Definition at line 539 of file GraphicsScene.h.

friend class SymbolsTable [friend]

Definition at line 542 of file GraphicsScene.h.


Member Data Documentation

indicates whether this scene is free to perform actions

Definition at line 454 of file GraphicsScene.h.

QBrush Tinkercell::GraphicsScene::BackgroundBrush = Qt::NoBrush [static]

brush used to draw the background for all scenes

Definition at line 76 of file GraphicsScene.h.

background color for all scenes

Definition at line 78 of file GraphicsScene.h.

Qt::MouseButton Tinkercell::GraphicsScene::clickedButton [protected]

button that was used when mouse was clicked

Definition at line 476 of file GraphicsScene.h.

point where mouse is clicked

Definition at line 472 of file GraphicsScene.h.

point where mouse is clicked on the screen

Definition at line 474 of file GraphicsScene.h.

the context menu that is shown during right-click event on selected graphical items. Plugins can add new actions to this menu.

Definition at line 113 of file GraphicsScene.h.

a hack to prevent strange mouse movements after context menu event

Definition at line 460 of file GraphicsScene.h.

the context menu that is shown during right-click event on the scene. Plugins can add new actions to this menu.

Definition at line 118 of file GraphicsScene.h.

used to store copied items

Definition at line 468 of file GraphicsScene.h.

QList< QGraphicsItem * > Tinkercell::GraphicsScene::duplicateItems [static, protected]

used to store copied items

Definition at line 466 of file GraphicsScene.h.

QBrush Tinkercell::GraphicsScene::ForegroundBrush = Qt::NoBrush [static]

brush used to draw the foreground for the scene

Definition at line 82 of file GraphicsScene.h.

setting grid to a non-zero value forces node items to "fit" on the grid, where the gap between the grid lines is determined by this variable. The default is 0, i.e. no grid

Definition at line 70 of file GraphicsScene.h.

QPen Tinkercell::GraphicsScene::GridPen = QPen(Qt::lightGray,2) [static]

pen used to draw the grid for the scene

Definition at line 80 of file GraphicsScene.h.

grid size. If zero, then disabled

Definition at line 456 of file GraphicsScene.h.

topmost Z value

Definition at line 458 of file GraphicsScene.h.

the minimum distance that gets classified as a "drag". Anything less will be considered just a click.

Definition at line 88 of file GraphicsScene.h.

mouse is being pressed

Definition at line 478 of file GraphicsScene.h.

QList<QGraphicsItem*> Tinkercell::GraphicsScene::movingItems [protected]

list of pointers to moving items

Definition at line 484 of file GraphicsScene.h.

QGraphicsItemGroup* Tinkercell::GraphicsScene::movingItemsGroup [protected]

group of moving items

Definition at line 486 of file GraphicsScene.h.

the network represented by this scene

Definition at line 94 of file GraphicsScene.h.

the network window widget inside of which this scene is located

Definition at line 96 of file GraphicsScene.h.

QList<QGraphicsItem*> Tinkercell::GraphicsScene::selectedItems [protected]

list of pointers to selected items

Definition at line 480 of file GraphicsScene.h.

QGraphicsRectItem Tinkercell::GraphicsScene::selectionRect [protected]

rectanglular selection area

Definition at line 462 of file GraphicsScene.h.

QBrush Tinkercell::GraphicsScene::SelectionRectangleBrush = QBrush(QColor(0,132,255,50)) [static]

brush that is used to color the selection rectangle

Definition at line 74 of file GraphicsScene.h.

pen that is used to draw the selection rectangle

Definition at line 72 of file GraphicsScene.h.

QBrush Tinkercell::GraphicsScene::ToolTipBackgroundBrush = QBrush(QColor(36,28,28,125)) [static]

brush used to draw the background of tool tips

Definition at line 84 of file GraphicsScene.h.

QList<QGraphicsItem*> Tinkercell::GraphicsScene::toolTips [protected]

list of temporary tool tips

Definition at line 464 of file GraphicsScene.h.

QBrush Tinkercell::GraphicsScene::ToolTipTextBrush = QBrush(QColor(255,255,255,255)) [static]

brush used to draw the text for tool tips

Definition at line 86 of file GraphicsScene.h.

each graphics scene has a default behavior, i.e. moving, selecing, deleting. Whether or not to use the default behavior is set using scene->useDefaultBehavior. This static variable is the default value for each scene's useDefaultBehavior variable, i.e. setting this to true will cause a newly constructed graphics scene to NOT use default behaviors.

Definition at line 67 of file GraphicsScene.h.

list of pointers to tool items

Definition at line 482 of file GraphicsScene.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines