QFileDialog extended with options for image export. More...
#include <ImageExportDialog.h>
Public Member Functions | |
int | bitmapResolution () const |
For raster formats: returns the output resolution the user selected, defaulting to the screen resolution. | |
bool | color () const |
For vector formats: returns whether colors should be enabled for ouput (default: true). | |
QSizeF | customExportSize () |
Return the custom export size. | |
bool | escapeStrings () |
For TeX format: returns whether special characters should be escaped for ouput (default: true). | |
bool | exportFontSizes () |
For TeX format: returns whether font sizes should be exported (default: true). | |
ImageExportDialog (MdiSubWindow *window, QWidget *parent=0, bool extended=true, Graph *g=0, Qt::WFlags flags=0) | |
Constructor. | |
int | quality () const |
Return the quality (in percent) the user selected for export to raster formats. | |
double | scaleFontsFactor () |
Return the scale fonts factor. | |
void | selectFilter (const QString &filter) |
int | sizeUnit () |
Return the unit used for the custom export size. | |
int | sortMode () const |
Return the sort export mode for 3D plots. | |
int | textExportMode () const |
Return the text export mode for 3D plots. | |
bool | transparency () const |
Return whether the output's background should be transparent. | |
int | vectorResolution () const |
For vector formats: returns the output resolution the user selected, defaulting to the screen resolution. | |
Protected Slots | |
void | adjustHeight (double width) |
void | adjustWidth (double height) |
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 | |
double | aspect_ratio |
QComboBox * | d_3D_export_sort |
QComboBox * | d_3D_text_export_mode |
QWidget * | d_advanced_options |
Container widget for all advanced options. | |
QSpinBox * | d_bitmap_resolution |
QCheckBox * | d_color |
QGroupBox * | d_custom_size_box |
Container widget for user defined export size. | |
QCheckBox * | d_escape_tex_strings |
Graph * | d_layer |
QSpinBox * | d_quality |
QGroupBox * | d_raster_options |
Container widget for all options available for raster formats. | |
QCheckBox * | d_tex_font_sizes |
QCheckBox * | d_transparency |
QGroupBox * | d_vector_options |
Container widget for all options available for vector formats. | |
QSpinBox * | d_vector_resolution |
MdiSubWindow * | d_window |
Pointer to the window to be exported. | |
DoubleSpinBox * | heightBox |
QCheckBox * | keepRatioBox |
QLabel * | resolutionLabel |
DoubleSpinBox * | scaleFontsBox |
QComboBox * | unitBox |
DoubleSpinBox * | widthBox |
QFileDialog extended with options for image export.
ImageExportDialog::ImageExportDialog | ( | MdiSubWindow * | window, | |
QWidget * | parent = 0 , |
|||
bool | extended = true , |
|||
Graph * | g = 0 , |
|||
Qt::WFlags | flags = 0 | |||
) |
Constructor.
window | window to be exported | |
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_window, initAdvancedOptions(), ExtensibleFileDialog::setExtensionWidget(), and updateAdvancedOptions().
void ImageExportDialog::adjustHeight | ( | double | width | ) | [protected, slot] |
References aspect_ratio, heightBox, keepRatioBox, DoubleSpinBox::setValue(), and unitBox.
Referenced by initAdvancedOptions().
void ImageExportDialog::adjustWidth | ( | double | height | ) | [protected, slot] |
References aspect_ratio, keepRatioBox, DoubleSpinBox::setValue(), unitBox, and widthBox.
Referenced by initAdvancedOptions().
int ImageExportDialog::bitmapResolution | ( | ) | const [inline] |
For raster formats: returns the output resolution the user selected, defaulting to the screen resolution.
References d_bitmap_resolution.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), ApplicationWindow::exportMatrix(), and ApplicationWindow::exportPresentationODF().
void ImageExportDialog::closeEvent | ( | QCloseEvent * | e | ) | [protected, slot] |
References customExportSize(), d_3D_export_sort, ApplicationWindow::d_3D_export_sort, ApplicationWindow::d_3D_export_text_mode, d_3D_text_export_mode, d_bitmap_resolution, d_color, d_escape_tex_strings, ApplicationWindow::d_export_bitmap_resolution, ApplicationWindow::d_export_color, ApplicationWindow::d_export_escape_tex_strings, ApplicationWindow::d_export_quality, ApplicationWindow::d_export_raster_size, ApplicationWindow::d_export_size_unit, ApplicationWindow::d_export_tex_font_sizes, ApplicationWindow::d_export_transparency, ApplicationWindow::d_export_vector_resolution, ApplicationWindow::d_extended_export_dialog, ApplicationWindow::d_image_export_filter, d_quality, ApplicationWindow::d_scale_fonts_factor, d_tex_font_sizes, d_transparency, d_vector_resolution, ExtensibleFileDialog::isExtended(), scaleFontsBox, unitBox, and DoubleSpinBox::value().
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().
QSizeF ImageExportDialog::customExportSize | ( | ) |
Return the custom export size.
References d_custom_size_box, heightBox, DoubleSpinBox::value(), and widthBox.
Referenced by closeEvent(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportPresentationODF().
bool ImageExportDialog::escapeStrings | ( | ) | [inline] |
For TeX format: returns whether special characters should be escaped for ouput (default: true).
References d_escape_tex_strings.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().
bool ImageExportDialog::exportFontSizes | ( | ) | [inline] |
For TeX format: returns whether font sizes should be exported (default: true).
References d_tex_font_sizes.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().
void ImageExportDialog::initAdvancedOptions | ( | ) | [private] |
Create d_advanced_options and everything it contains.
References adjustHeight(), adjustWidth(), aspect_ratio, MultiLayer::canvas(), ApplicationWindow::d_3D_export_sort, d_3D_export_sort, ApplicationWindow::d_3D_export_text_mode, d_3D_text_export_mode, d_advanced_options, d_bitmap_resolution, d_color, d_custom_size_box, d_escape_tex_strings, ApplicationWindow::d_export_bitmap_resolution, ApplicationWindow::d_export_color, ApplicationWindow::d_export_escape_tex_strings, ApplicationWindow::d_export_quality, ApplicationWindow::d_export_raster_size, ApplicationWindow::d_export_size_unit, ApplicationWindow::d_export_tex_font_sizes, ApplicationWindow::d_export_transparency, ApplicationWindow::d_export_vector_resolution, d_layer, d_quality, d_raster_options, ApplicationWindow::d_scale_fonts_factor, d_tex_font_sizes, d_transparency, d_vector_options, d_vector_resolution, d_window, heightBox, keepRatioBox, resolutionLabel, scaleFontsBox, DoubleSpinBox::setDecimals(), DoubleSpinBox::setFormat(), DoubleSpinBox::setMinimum(), DoubleSpinBox::setValue(), unitBox, and widthBox.
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(), ApplicationWindow::exportMatrix(), and ApplicationWindow::exportPresentationODF().
double ImageExportDialog::scaleFontsFactor | ( | ) |
Return the scale fonts factor.
References d_custom_size_box, scaleFontsBox, and DoubleSpinBox::value().
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportPresentationODF().
void ImageExportDialog::selectFilter | ( | const QString & | filter | ) |
int ImageExportDialog::sizeUnit | ( | ) | [inline] |
Return the unit used for the custom export size.
References unitBox.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportPresentationODF().
int ImageExportDialog::sortMode | ( | ) | const [inline] |
Return the sort export mode for 3D plots.
References d_3D_export_sort.
Referenced by ApplicationWindow::exportAllGraphs(), and ApplicationWindow::exportGraph().
int ImageExportDialog::textExportMode | ( | ) | const [inline] |
Return the text export mode for 3D plots.
References d_3D_text_export_mode.
Referenced by ApplicationWindow::exportAllGraphs(), and ApplicationWindow::exportGraph().
bool ImageExportDialog::transparency | ( | ) | const |
Return whether the output's background should be transparent.
References d_transparency.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportPresentationODF().
void ImageExportDialog::updateAdvancedOptions | ( | const QString & | filter | ) | [protected, slot] |
Update which options are visible and enabled based on the output format.
References d_custom_size_box, d_escape_tex_strings, ExtensibleFileDialog::d_extension_toggle, d_raster_options, d_tex_font_sizes, d_transparency, d_vector_options, d_vector_resolution, d_window, and resolutionLabel.
Referenced by ImageExportDialog(), and selectFilter().
int ImageExportDialog::vectorResolution | ( | ) | const [inline] |
For vector formats: returns the output resolution the user selected, defaulting to the screen resolution.
References d_vector_resolution.
Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().
double ImageExportDialog::aspect_ratio [private] |
Referenced by adjustHeight(), adjustWidth(), and initAdvancedOptions().
QComboBox* ImageExportDialog::d_3D_export_sort [private] |
Referenced by closeEvent(), initAdvancedOptions(), and sortMode().
QComboBox* ImageExportDialog::d_3D_text_export_mode [private] |
Referenced by closeEvent(), initAdvancedOptions(), and textExportMode().
QWidget* ImageExportDialog::d_advanced_options [private] |
Container widget for all advanced options.
Referenced by ImageExportDialog(), and initAdvancedOptions().
QSpinBox* ImageExportDialog::d_bitmap_resolution [private] |
Referenced by bitmapResolution(), closeEvent(), and initAdvancedOptions().
QCheckBox* ImageExportDialog::d_color [private] |
Referenced by closeEvent(), color(), and initAdvancedOptions().
QGroupBox* ImageExportDialog::d_custom_size_box [private] |
Container widget for user defined export size.
Referenced by customExportSize(), initAdvancedOptions(), scaleFontsFactor(), and updateAdvancedOptions().
QCheckBox* ImageExportDialog::d_escape_tex_strings [private] |
Referenced by closeEvent(), escapeStrings(), initAdvancedOptions(), and updateAdvancedOptions().
Graph* ImageExportDialog::d_layer [private] |
Referenced by 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(), and updateAdvancedOptions().
QCheckBox* ImageExportDialog::d_tex_font_sizes [private] |
Referenced by closeEvent(), exportFontSizes(), initAdvancedOptions(), and updateAdvancedOptions().
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 initAdvancedOptions(), and updateAdvancedOptions().
QSpinBox* ImageExportDialog::d_vector_resolution [private] |
Referenced by closeEvent(), initAdvancedOptions(), updateAdvancedOptions(), and vectorResolution().
MdiSubWindow* ImageExportDialog::d_window [private] |
Pointer to the window to be exported.
Referenced by ImageExportDialog(), initAdvancedOptions(), and updateAdvancedOptions().
DoubleSpinBox * ImageExportDialog::heightBox [private] |
Referenced by adjustHeight(), customExportSize(), and initAdvancedOptions().
QCheckBox* ImageExportDialog::keepRatioBox [private] |
Referenced by adjustHeight(), adjustWidth(), and initAdvancedOptions().
QLabel* ImageExportDialog::resolutionLabel [private] |
Referenced by initAdvancedOptions(), and updateAdvancedOptions().
DoubleSpinBox * ImageExportDialog::scaleFontsBox [private] |
Referenced by closeEvent(), initAdvancedOptions(), and scaleFontsFactor().
QComboBox* ImageExportDialog::unitBox [private] |
Referenced by adjustHeight(), adjustWidth(), closeEvent(), initAdvancedOptions(), and sizeUnit().
DoubleSpinBox* ImageExportDialog::widthBox [private] |
Referenced by adjustWidth(), customExportSize(), and initAdvancedOptions().