2
* wbscene.h - an SVG whiteboard scene class
3
* Copyright (C) 2006 Joonas Govenius
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
/*! \brief The scene class for whiteboard items.
26
* Inherits QGraphicsScene.
28
* Processes remote whiteboard edits.
30
* This class also provides methods for queueing new edits and
31
* emits a signal with the corresponding whiteboard element.
36
class WbScene : public QGraphicsScene
41
/*! \brief Constructor
42
* Constructs a new scene with parent \a parent.
44
WbScene(SxeSession* session, QObject * parent = 0);
46
/*! \brief Appends the item to a list of items whose "transform" attribute is to be regenerated.*/
47
void queueTransformationRegeneration(WbItem* item);
48
/*! \brief Regenerate the SVG transformation matrices for items queued by queueTransformationRegeneration(WbItem* item) since last regeneration.*/
49
void regenerateTransformations();
50
/*! \brief Returns the coordinates of the center of all selected items. */
51
QPointF selectionCenter() const;
54
/*! \brief Brings the selected items \a n levels forward. */
55
void bringForward(int n = 1);
56
/*! \brief Brings the item to the top. */
58
/*! \brief Sends the selected items \a n levels backwards. */
59
void sendBackwards(int n = 1);
60
/*! \brief Brings the item to the back. */
62
/*! \brief Groups the selected items.*/
64
/*! \brief Ungroups the selected item groups.*/
68
/*! \brief Brings the selected items \a n levels forward.
69
* If \a n < 0, the items are send \a n levels baskwards.
70
* If \a toExtremum is true, the item is sent to the front/back.
72
void bring(int n, bool toExtremum);
75
QList< QPointer<WbItem> > pendingTranformations_;
77
QPointF selectionCenter_;