QtiPlot
0.9.8.2
Main Page
Related Pages
Classes
Files
File List
File Members
qtiplot
src
plot2D
dialogs
ImageExportDialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : ImageExportDialog.h
3
Project : QtiPlot
4
--------------------------------------------------------------------
5
Copyright : (C) 2006,2007 by Ion Vasilief, Knut Franke
6
Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
7
Description : QFileDialog extended with options for image export
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
#ifndef IMAGEEXPORTDIALOG_H
30
#define IMAGEEXPORTDIALOG_H
31
32
#include <
ExtensibleFileDialog.h
>
33
34
#include <QSpinBox>
35
#include <QCheckBox>
36
#include <QComboBox>
37
#include <QPrinter>
38
39
class
QLabel;
40
class
QStackedWidget;
41
class
QGroupBox;
42
class
MdiSubWindow
;
43
class
DoubleSpinBox
;
44
class
Graph
;
45
47
class
ImageExportDialog
:
public
ExtensibleFileDialog
48
{
49
Q_OBJECT
50
51
private
:
53
void
initAdvancedOptions
();
54
56
MdiSubWindow
*
d_window
;
58
QWidget *
d_advanced_options
;
59
// vector format options
61
QGroupBox *
d_vector_options
;
62
QSpinBox *
d_vector_resolution
;
63
QCheckBox *
d_color
;
64
// raster format options
66
QGroupBox *
d_raster_options
;
67
QSpinBox *
d_quality
;
68
QCheckBox *
d_transparency
;
69
QSpinBox *
d_bitmap_resolution
;
70
QComboBox *
d_compression
;
71
72
QComboBox *
d_3D_text_export_mode
;
73
QComboBox *
d_3D_export_sort
;
74
76
QGroupBox *
d_custom_size_box
;
77
DoubleSpinBox
*
widthBox
, *
heightBox
, *
scaleFontsBox
;
78
QComboBox *
unitBox
;
79
QLabel *
resolutionLabel
, *
compressionLabel
;
80
QCheckBox *
keepRatioBox
;
81
QCheckBox *
d_escape_tex_strings
;
82
QCheckBox *
d_tex_font_sizes
;
83
84
QPushButton *
d_preview_button
;
85
86
double
aspect_ratio
;
87
Graph
*
d_layer
;
88
89
public
:
91
98
ImageExportDialog
(
MdiSubWindow
*window, QWidget * parent = 0,
bool
extended =
true
,
Graph
*g = 0, Qt::WFlags flags = 0 );
100
int
vectorResolution
()
const
{
return
d_vector_resolution
->value(); };
102
bool
color
()
const
{
return
d_color
->isChecked(); };
104
bool
escapeStrings
(){
return
d_escape_tex_strings
->isChecked();};
106
bool
exportFontSizes
(){
return
d_tex_font_sizes
->isChecked();};
107
109
int
bitmapResolution
()
const
{
return
d_bitmap_resolution
->value(); };
110
112
int
compression
()
const
{
return
d_compression
->currentIndex();};
113
115
int
quality
()
const
{
return
d_quality
->value(); };
117
bool
transparency
()
const
;
119
int
textExportMode
()
const
{
return
d_3D_text_export_mode
->currentIndex();};
121
int
sortMode
()
const
{
return
d_3D_export_sort
->currentIndex();};
122
123
void
selectFilter
(
const
QString & filter);
125
QSizeF
customExportSize
();
127
int
sizeUnit
(){
return
unitBox
->currentIndex();};
129
double
scaleFontsFactor
();
130
131
public
slots:
132
void
accept
();
133
134
protected
slots:
135
void
closeEvent
(QCloseEvent*);
137
void
updateAdvancedOptions
(
const
QString &filter);
138
void
adjustWidth
(
double
height);
139
void
adjustHeight
(
double
width);
140
void
preview
();
141
void
drawPreview
(QPrinter *);
142
void
drawVectorPreview
(QPrinter *);
143
};
144
145
#endif
Generated on Tue Feb 19 2013 11:59:22 for QtiPlot by
1.8.3.1