VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
canvas.h
Go to the documentation of this file.
1 /*
2  * canvas.h
3  *
4  * Copyright 2012 - 2014 Brenton Ross
5  *
6  * This file is part of VICI.
7  *
8  * VICI 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 3 of the License, or
11  * (at your option) any later version.
12  *
13  * VICI 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.
17  *
18  * You should VICI received a copy of the GNU General Public License
19  * along with VICI. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
27 #ifndef VICI_CANVAS_H
28 #define VICI_CANVAS_H
29 
30 #include "vici.h"
31 
32 class QGraphicsScene;
33 
34 namespace VICI
35 {
36 
38 
46 class CanvasScene : public Scene
47 {
48 protected:
49  QGraphicsScene * scene;
50 public:
52 
55  CanvasScene( QGraphicsScene *s) : scene(s) {}
56 
58  operator QGraphicsScene *() { return scene; }
59 
61  QGraphicsScene * operator -> () { return scene; }
62 };
63 
64 }
65 #endif /* CANVAS_H_ */
An implementation of the Scene abstract class for holding a QGraphicsScene.
Definition: canvas.h:46
A wrapper for QGraphicsScene class.
Definition: vici.h:205
QGraphicsScene * scene
the graphics scene being handled.
Definition: canvas.h:49
Project wide declarations and definitions.
QGraphicsScene * operator->()
pointer operator
Definition: canvas.h:61
CanvasScene(QGraphicsScene *s)
constructor
Definition: canvas.h:55