Debian Codegraph @

src/graphicwindow.h

raw symbols SCIP
1 /*
2 Copyright (C) 2008, 2009 Andres Cabrera
3 [email protected]
4
5 This file is part of CsoundQt.
6
7 CsoundQt is free software; you can redistribute it
8 and/or modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 CsoundQt is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with Csound; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA
21 */
22
23 #ifndef GRAPHICWINDOW_H
24 #define GRAPHICWINDOW_H
25
26 #include <QtWidgets>
27 #include <QtPrintSupport/QPrinter>
28 #include <QtPrintSupport/QPrintDialog>
29
30
31 class GraphicWindow : public QWidget
32 {
33 Q_OBJECT
34 public:
35 GraphicWindow(QWidget *parent);
36
37 ~GraphicWindow();
38
39 void openPng(QString fileName);
40
41 private slots:
42 void zoomIn();
43 void zoomOut();
44 void normalSize();
45 void fitToWindow();
46 void save();
47 void print();
48
49 protected:
50 // virtual void closeEvent (QCloseEvent * event);
51
52 private:
53 // QGraphicsScene *m_scene;
54 void createActions();
55 // void createMenus();
56 void updateActions();
57 void scaleImage(double factor);
58 void adjustScrollBar(QScrollBar *scrollBar, double factor);
59
60 QLabel *imageLabel;
61 QScrollArea *scrollArea;
62 double scaleFactor;
63
64 QPrinter printer;
65
66 QToolBar *m_toolbar;
67 // QAction *openAct;
68 QAction *saveAct;
69 QAction *printAct;
70 QAction *exitAct;
71 QAction *zoomInAct;
72 QAction *zoomOutAct;
73 QAction *normalSizeAct;
74 QAction *fitToWindowAct;
75 // QAction *aboutAct;
76 // QAction *aboutQtAct;
77
78 QMenu *fileMenu;
79 QMenu *viewMenu;
80 QMenu *helpMenu;
81 };
82
83 #endif