FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
QGraph.h
1 /*
2  * Copyright 2011, 2012 Lukas Jirkovsky
3  *
4  * This file is part of FotoSHOCK.
5  *
6  * FotoSHOCK is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, version 3 of the License.
9  *
10  * FotoSHOCK 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.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with FotoSHOCK. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef QGRAPH_H
20 #define QGRAPH_H
21 
22 #include <GraphManager.hpp>
23 
24 #include <QGraphicsView>
25 
26 class QMenu;
27 
28 class QGraph : public QGraphicsView {
29  public:
30  QGraph(const vector<FotoSHOCKcore::ImageOperationDescriptor*>& operations, QWidget* parent = 0);
32 
35  void addContextMenu(QMenu* menu);
36 
37  virtual void contextMenuEvent(QContextMenuEvent* event);
38 
39  void serialize(QString fileName);
40  void deserialize(QString fileName);
41  private:
43  QGraphicsScene* m_scene;
44  QMenu* m_contextMenu;
45 };
46 
47 #endif // QGRAPH_H