QFileDialog extended with options for image export. More...
#include <ImageExportDialog.h>
Public Member Functions | |
bool | color () const |
For vector formats: returns whether colors should be enabled for ouput (default: true). | |
ImageExportDialog (QWidget *parent=0, bool vector_options=true, bool extended=true, Qt::WFlags flags=0) | |
Constructor. | |
int | quality () const |
Return the quality (in percent) the user selected for export to raster formats. | |
int | resolution () const |
For vector formats: returns the output resolution the user selected, defaulting to the screen resolution. | |
void | selectFilter (const QString &filter) |
bool | transparency () const |
Return whether the output's background should be transparent. | |
Protected Slots | |
void | closeEvent (QCloseEvent *) |
void | updateAdvancedOptions (const QString &filter) |
Update which options are visible and enabled based on the output format. | |
Private Member Functions | |
void | initAdvancedOptions () |
Create d_advanced_options and everything it contains. | |
Private Attributes | |
QStackedWidget * | d_advanced_options |
Container widget for all advanced options. | |
QCheckBox * | d_color |
QSpinBox * | d_quality |
QGroupBox * | d_raster_options |
Container widget for all options available for raster formats. | |
QSpinBox * | d_resolution |
QCheckBox * | d_transparency |
QGroupBox * | d_vector_options |
Container widget for all options available for vector formats. |
QFileDialog extended with options for image export.
ImageExportDialog::ImageExportDialog | ( | QWidget * | parent = 0 , |
|
bool | vector_options = true , |
|||
bool | extended = true , |
|||
Qt::WFlags | flags = 0 | |||
) |
Constructor.
parent | parent widget | |
vector_options | whether advanced options are to be provided for export to vector formats | |
extended | flag: show/hide the advanced options on start-up | |
flags | window flags |
References d_advanced_options, d_vector_options, initAdvancedOptions(), ExtensibleFileDialog::setExtensionWidget(), and updateAdvancedOptions().
void ImageExportDialog::closeEvent | ( | QCloseEvent * | e | ) | [protected, slot] |
References d_color, ApplicationWindow::d_export_color, ApplicationWindow::d_export_quality, ApplicationWindow::d_export_resolution, ApplicationWindow::d_export_transparency, ApplicationWindow::d_extended_export_dialog, ApplicationWindow::d_image_export_filter, d_quality, d_resolution, d_transparency, and ExtensibleFileDialog::isExtended().
bool ImageExportDialog::color | ( | ) | const [inline] |
For vector formats: returns whether colors should be enabled for ouput (default: true).
References d_color.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().
void ImageExportDialog::initAdvancedOptions | ( | ) | [private] |
Create d_advanced_options and everything it contains.
References d_advanced_options, d_color, ApplicationWindow::d_export_color, ApplicationWindow::d_export_quality, ApplicationWindow::d_export_transparency, d_quality, d_raster_options, d_resolution, d_transparency, d_vector_options, and resolution().
Referenced by ImageExportDialog().
int ImageExportDialog::quality | ( | ) | const [inline] |
Return the quality (in percent) the user selected for export to raster formats.
References d_quality.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().
int ImageExportDialog::resolution | ( | ) | const [inline] |
For vector formats: returns the output resolution the user selected, defaulting to the screen resolution.
References d_resolution.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), ApplicationWindow::exportMatrix(), and initAdvancedOptions().
void ImageExportDialog::selectFilter | ( | const QString & | filter | ) |
bool ImageExportDialog::transparency | ( | ) | const [inline] |
Return whether the output's background should be transparent.
References d_transparency.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().
void ImageExportDialog::updateAdvancedOptions | ( | const QString & | filter | ) | [protected, slot] |
Update which options are visible and enabled based on the output format.
References d_advanced_options, ExtensibleFileDialog::d_extension_toggle, and d_transparency.
Referenced by ImageExportDialog(), and selectFilter().
QStackedWidget* ImageExportDialog::d_advanced_options [private] |
Container widget for all advanced options.
Referenced by ImageExportDialog(), initAdvancedOptions(), and updateAdvancedOptions().
QCheckBox* ImageExportDialog::d_color [private] |
Referenced by closeEvent(), color(), and initAdvancedOptions().
QSpinBox* ImageExportDialog::d_quality [private] |
Referenced by closeEvent(), initAdvancedOptions(), and quality().
QGroupBox* ImageExportDialog::d_raster_options [private] |
Container widget for all options available for raster formats.
Referenced by initAdvancedOptions().
QSpinBox* ImageExportDialog::d_resolution [private] |
Referenced by closeEvent(), initAdvancedOptions(), and resolution().
QCheckBox* ImageExportDialog::d_transparency [private] |
Referenced by closeEvent(), initAdvancedOptions(), transparency(), and updateAdvancedOptions().
QGroupBox* ImageExportDialog::d_vector_options [private] |
Container widget for all options available for vector formats.
Referenced by ImageExportDialog(), and initAdvancedOptions().