1 /***************************************************************************
2  *   Copyright (C) 2000-2019 by Johan Maes                                 *
3  *   on4qz@telenet.be                                                      *
4  *   http://users.telenet.be/on4qz                                         *
5  *                                                                         *
6  *   This program 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; either version 2 of the License, or     *
9  *   (at your option) any later version.                                   *
10  *                                                                         *
11  *   This program is distributed in the hope that it will be useful,       *
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14  *   GNU General Public License for more details.                          *
15  *                                                                         *
16  *   You should have received a copy of the GNU General Public License     *
17  *   along with this program; if not, write to the                         *
18  *   Free Software Foundation, Inc.,                                       *
19  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20  ***************************************************************************/
21 #ifndef EDITOR_H
22 #define EDITOR_H
23 
24 #include <QMainWindow>
25 #include <QFile>
26 #include <QComboBox>
27 
28 
29 
30 class editorView;
31 
32 /*!
33 Mainwindow for the image gallery
34 
35 This editor allows the creation of images and templates.
36 */
37 
38 /*!
39 @author Johan Maes - ON4QZ
40 */
41 class editor : public QMainWindow
42 {
43 	Q_OBJECT
44 
45 public:
46     editor(QWidget *parent=0);
47 	~editor();
48 	bool openFile(QString fn);
49 	void readSettings();
50   bool setImage(QImage *im);
51 
52 public slots:
53 	void slotFileNew();
54 	void slotFileOpen();
55 	void slotFileSave();
56 	void slotFileSaveImage();
57 	void slotFileSaveTemplate();
58 	void slotFileQuit();
59 
60 
61 private:
62 	editorView *ev;
63 	void closeEvent(QCloseEvent *);
64 	void initActions();
65 	void initMenubar();
66 
67 	void writeSettings();
68 	QAction *fileNew;
69 	QAction *fileOpen;
70 	QAction *fileSave;
71 	QAction *fileSaveImage;
72 	QAction *fileSaveTemplate;
73 	QAction *fileQuit;
74 	QAction *clearAll;
75 	QAction *copy;
76 	QAction *paste;
77 	QAction *deleteAction;
78 	QMenu *fileMenu;
79 	QMenu *editMenu;
80 	QFile localFile;
81 	QFile externalFile;
82 };
83 
84 #endif
85