1 /*
2 	Copyright 2006-2019 The QElectroTech Team
3 	This file is part of QElectroTech.
4 
5 	QElectroTech is free software: you can redistribute it and/or modify
6 	it under the terms of the GNU General Public License as published by
7 	the Free Software Foundation, either version 2 of the License, or
8 	(at your option) any later version.
9 
10 	QElectroTech 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 QElectroTech.  If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef EXPORT_PROPERTIES_H
19 #define EXPORT_PROPERTIES_H
20 #include <QtCore>
21 #include "qet.h"
22 
23 /**
24 	This class is a container for various options used when printing or
25 	exporting a diagram as an image file.
26 */
27 class ExportProperties {
28 	// constructeur, destructeur
29 	public:
30 	ExportProperties();
31 	virtual ~ExportProperties();
32 
33 	// methods
34 	public:
35 	void toSettings  (QSettings &, const QString & = QString()) const;
36 	void fromSettings(QSettings &, const QString & = QString());
37 
38 	static ExportProperties defaultExportProperties ();
39 	static ExportProperties defaultPrintProperties  ();
40 
41 	// attributes
42 	public:
43 	QDir destination_directory;     ///< Target directory for generated files
44 	QString format;                 ///< Image format of generated files
45 	bool draw_grid;                 ///< Whether to render the diagram grid
46 	bool draw_border;               ///< Whether to render the border (along with rows/columns headers)
47 	bool draw_titleblock;           ///< Whether to render the title block
48 	bool draw_terminals;            ///< Whether to render terminals
49 	bool draw_colored_conductors;   ///< Whether to render conductors colors
50 	QET::DiagramArea exported_area; ///< Area of diagrams to be rendered
51 };
52 #endif
53