|
QtiPlot
0.9.8.2
|
QFileDialog extended with options for image export. More...
#include <ImageExportDialog.h>
Public Slots | |
| void | accept () |
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). | |
| int | compression () const |
| For raster formats supporting this option returns the output image compression, 0 means no compression. | |
| 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 | drawPreview (QPrinter *) |
| void | drawVectorPreview (QPrinter *) |
| void | preview () |
| 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 |
| QLabel * | compressionLabel |
| 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 |
| QComboBox * | d_compression |
| QGroupBox * | d_custom_size_box |
| Container widget for user defined export size. | |
| QCheckBox * | d_escape_tex_strings |
| Graph * | d_layer |
| QPushButton * | d_preview_button |
| 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::accept | ( | ) | [slot] |
References ApplicationWindow::d_confirm_overwrite.
| 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 drawPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().
| void ImageExportDialog::closeEvent | ( | QCloseEvent * | e | ) | [protected, slot] |
References compression(), 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_compression, 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, ApplicationWindow::d_keep_aspect_ration, d_quality, ApplicationWindow::d_scale_fonts_factor, d_tex_font_sizes, d_transparency, d_vector_resolution, ExtensibleFileDialog::isExtended(), keepRatioBox, 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 drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().
| int ImageExportDialog::compression | ( | ) | const [inline] |
For raster formats supporting this option returns the output image compression, 0 means no compression.
References d_compression.
Referenced by closeEvent(), 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(), drawPreview(), drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().
| void ImageExportDialog::drawPreview | ( | QPrinter * | printer | ) | [protected, slot] |
References bitmapResolution(), MultiLayer::canvas(), customExportSize(), Graph::customPrintSize(), d_layer, d_window, MultiLayer::draw(), Graph::draw(), scaleFontsFactor(), and sizeUnit().
Referenced by preview().
| void ImageExportDialog::drawVectorPreview | ( | QPrinter * | printer | ) | [protected, slot] |
References MultiLayer::canvas(), color(), customExportSize(), Graph::customPrintSize(), d_layer, d_window, MultiLayer::exportVector(), Graph::exportVector(), scaleFontsFactor(), sizeUnit(), and vectorResolution().
Referenced by preview().
| 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(), compressionLabel, d_3D_export_sort, ApplicationWindow::d_3D_export_sort, ApplicationWindow::d_3D_export_text_mode, d_3D_text_export_mode, d_advanced_options, d_bitmap_resolution, d_color, d_compression, d_custom_size_box, d_escape_tex_strings, ApplicationWindow::d_export_bitmap_resolution, ApplicationWindow::d_export_color, ApplicationWindow::d_export_compression, 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_keep_aspect_ration, d_layer, d_preview_button, 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, preview(), resolutionLabel, scaleFontsBox, DoubleSpinBox::setDecimals(), DoubleSpinBox::setFormat(), DoubleSpinBox::setMinimum(), DoubleSpinBox::setValue(), unitBox, and widthBox.
Referenced by ImageExportDialog().
| void ImageExportDialog::preview | ( | ) | [protected, slot] |
References d_raster_options, d_window, drawPreview(), and drawVectorPreview().
Referenced by initAdvancedOptions().
| 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().
| double ImageExportDialog::scaleFontsFactor | ( | ) |
Return the scale fonts factor.
References d_custom_size_box, scaleFontsBox, and DoubleSpinBox::value().
Referenced by drawPreview(), drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().
| void ImageExportDialog::selectFilter | ( | const QString & | filter | ) |
| int ImageExportDialog::sizeUnit | ( | ) | [inline] |
Return the unit used for the custom export size.
References unitBox.
Referenced by drawPreview(), drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().
| 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(), and ApplicationWindow::exportLayer().
| void ImageExportDialog::updateAdvancedOptions | ( | const QString & | filter | ) | [protected, slot] |
Update which options are visible and enabled based on the output format.
References compressionLabel, d_compression, d_custom_size_box, d_escape_tex_strings, ExtensibleFileDialog::d_extension_toggle, d_preview_button, 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 drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().
double ImageExportDialog::aspect_ratio [private] |
Referenced by adjustHeight(), adjustWidth(), and initAdvancedOptions().
QLabel * ImageExportDialog::compressionLabel [private] |
Referenced by initAdvancedOptions(), and updateAdvancedOptions().
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().
QComboBox* ImageExportDialog::d_compression [private] |
Referenced by compression(), initAdvancedOptions(), and updateAdvancedOptions().
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 drawPreview(), drawVectorPreview(), and initAdvancedOptions().
QPushButton* ImageExportDialog::d_preview_button [private] |
Referenced by initAdvancedOptions(), and updateAdvancedOptions().
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(), preview(), 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 drawPreview(), drawVectorPreview(), ImageExportDialog(), initAdvancedOptions(), preview(), and updateAdvancedOptions().
DoubleSpinBox * ImageExportDialog::heightBox [private] |
Referenced by adjustHeight(), customExportSize(), and initAdvancedOptions().
QCheckBox* ImageExportDialog::keepRatioBox [private] |
Referenced by adjustHeight(), adjustWidth(), closeEvent(), 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().
1.7.6.1