scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ImageExportDialog.h
Go to the documentation of this file.
1 
13 
31 #ifndef IMAGEEXPORTDIALOG_H
32 #define IMAGEEXPORTDIALOG_H
33 
34 #include "ExtensibleFileDialog.h"
35 
36 #include <QSpinBox>
37 #include <QCheckBox>
38 #include <QComboBox>
39 #include <QPrinter>
40 
41 class QStackedWidget;
42 class QGroupBox;
43 
46 {
47  Q_OBJECT
48 
49 private:
51  void initAdvancedOptions();
52 
54  QStackedWidget *d_advanced_options;
55  // vector format options
57  QGroupBox *d_vector_options;
58  QSpinBox *d_resolution;
59  QCheckBox *d_color;
60  QCheckBox *d_keep_aspect;
61  QCheckBox *d_standard_page;
62  QComboBox *d_box_page_size;
64  // raster format options
66  QGroupBox *d_raster_options;
67  QSpinBox *d_quality;
68 
69 public:
71 
77  ImageExportDialog(QWidget * parent = 0, bool vector_options = true, bool extended = true, Qt::WindowFlags flags = 0 );
79  int resolution() const { return d_resolution->value(); }
81  bool color() const { return d_color->isChecked(); }
83  bool keepAspect() const { return d_keep_aspect->isChecked(); }
85  QPrinter::PageSize pageSize() const;
86  void setPageSize(QPrinter::PageSize size);
87  QPrinter::Orientation pageOrientation() const;
88  void setOrientation(QPrinter::Orientation orientation);
90  int quality() const { return d_quality->value(); }
91 
92  void selectFilter(const QString & filter);
93 
94 protected slots:
95  void closeEvent(QCloseEvent*);
97  void updateAdvancedOptions (const QString &filter);
98 };
99 
100 #endif
ImageExportDialog::ImageExportDialog
ImageExportDialog(QWidget *parent=0, bool vector_options=true, bool extended=true, Qt::WindowFlags flags=0)
Constructor.
Definition: ImageExportDialog.cpp:45
ImageExportDialog::color
bool color() const
For vector formats: returns whether colors should be enabled for ouput (default: true).
Definition: ImageExportDialog.h:81
ImageExportDialog::keepAspect
bool keepAspect() const
For vector formats: returns whether the output should preserve aspect ratio of the plot (default: tru...
Definition: ImageExportDialog.h:83
ImageExportDialog::d_quality
QSpinBox * d_quality
Definition: ImageExportDialog.h:67
ImageExportDialog::resolution
int resolution() const
For vector formats: returns the output resolution the user selected, defaulting to the screen resolut...
Definition: ImageExportDialog.h:79
ImageExportDialog
QFileDialog extended with options for image export.
Definition: ImageExportDialog.h:46
ImageExportDialog::d_box_page_orientation
QComboBox * d_box_page_orientation
Definition: ImageExportDialog.h:63
ImageExportDialog::setPageSize
void setPageSize(QPrinter::PageSize size)
Definition: ImageExportDialog.cpp:239
ImageExportDialog::selectFilter
void selectFilter(const QString &filter)
Definition: ImageExportDialog.cpp:264
ImageExportDialog::d_box_page_size
QComboBox * d_box_page_size
Definition: ImageExportDialog.h:62
ImageExportDialog::d_standard_page
QCheckBox * d_standard_page
Definition: ImageExportDialog.h:61
ImageExportDialog::d_vector_options
QGroupBox * d_vector_options
Container widget for all options available for vector formats.
Definition: ImageExportDialog.h:57
python-sipcmd.flags
list flags
Definition: python-sipcmd.py:61
ExtensibleFileDialog
QFileDialog plus generic extension support.
Definition: ExtensibleFileDialog.h:45
ImageExportDialog::quality
int quality() const
Return the quality (in percent) the user selected for export to raster formats.
Definition: ImageExportDialog.h:90
ImageExportDialog::pageSize
QPrinter::PageSize pageSize() const
For vector formats: returns a standard output page size (default: QPrinter::Custom).
Definition: ImageExportDialog.cpp:206
ImageExportDialog::d_raster_options
QGroupBox * d_raster_options
Container widget for all options available for raster formats.
Definition: ImageExportDialog.h:66
ImageExportDialog::initAdvancedOptions
void initAdvancedOptions()
Create d_advanced_options and everything it contains.
Definition: ImageExportDialog.cpp:83
ImageExportDialog::pageOrientation
QPrinter::Orientation pageOrientation() const
Definition: ImageExportDialog.cpp:224
ExtensibleFileDialog.h
ImageExportDialog::d_advanced_options
QStackedWidget * d_advanced_options
Container widget for all advanced options.
Definition: ImageExportDialog.h:54
ImageExportDialog::d_resolution
QSpinBox * d_resolution
Definition: ImageExportDialog.h:58
ImageExportDialog::d_color
QCheckBox * d_color
Definition: ImageExportDialog.h:59
ImageExportDialog::setOrientation
void setOrientation(QPrinter::Orientation orientation)
Definition: ImageExportDialog.cpp:255
ImageExportDialog::updateAdvancedOptions
void updateAdvancedOptions(const QString &filter)
Update which options are visible and enabled based on the output format.
Definition: ImageExportDialog.cpp:173
ImageExportDialog::d_keep_aspect
QCheckBox * d_keep_aspect
Definition: ImageExportDialog.h:60
ImageExportDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: ImageExportDialog.cpp:188