2 Copyright Russell Steffen <rsteffen@bayarea.net>
3 Copyright Stephan Zehetner <s.zehetner@nevox.org>
4 Copyright Dmitry Suzdalev <dimsuz@gmail.com>
5 Copyright <inge@lysator.liu.se>
6 Copyright <pinaraf@gmail.com>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include <QGraphicsItem>
27 #include <QTextDocument>
34 class PlanetItem
: public QObject
, public QGraphicsItem
39 PlanetItem(MapScene
*scene
, Sector
*sector
);
42 QRectF
boundingRect() const;
43 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
,
46 void hoverEnterEvent ( QGraphicsSceneHoverEvent
*event
);
47 void hoverLeaveEvent ( QGraphicsSceneHoverEvent
*event
);
48 void mousePressEvent ( QGraphicsSceneMouseEvent
*event
);
51 Sector
*sector () { return m_sector
; }
54 void planetItemSelected (PlanetItem
*);
72 class PlanetInfoItem
: public QGraphicsItem
78 QRectF
boundingRect() const;
79 void setPlanet (Planet
*planet
);
80 Planet
*planet () { return m_planet
; }
81 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
,
85 QTextDocument m_textDoc
;