QtiPlot 0.9.8.2
Public Slots | Public Member Functions | Protected Slots | Private Member Functions | Private Attributes
ImageExportDialog Class Reference

QFileDialog extended with options for image export. More...

#include <ImageExportDialog.h>

Inheritance diagram for ImageExportDialog:
ExtensibleFileDialog

List of all members.

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
Graphd_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
MdiSubWindowd_window
 Pointer to the window to be exported.
DoubleSpinBoxheightBox
QCheckBox * keepRatioBox
QLabel * resolutionLabel
DoubleSpinBoxscaleFontsBox
QComboBox * unitBox
DoubleSpinBoxwidthBox

Detailed Description

QFileDialog extended with options for image export.


Constructor & Destructor Documentation

ImageExportDialog::ImageExportDialog ( MdiSubWindow window,
QWidget *  parent = 0,
bool  extended = true,
Graph g = 0,
Qt::WFlags  flags = 0 
)

Constructor.

Parameters:
windowwindow to be exported
parentparent widget
vector_optionswhether advanced options are to be provided for export to vector formats
extendedflag: show/hide the advanced options on start-up
flagswindow flags

References d_advanced_options, d_window, initAdvancedOptions(), ExtensibleFileDialog::setExtensionWidget(), and updateAdvancedOptions().


Member Function Documentation

void ImageExportDialog::accept ( ) [slot]
void ImageExportDialog::adjustHeight ( double  width) [protected, slot]
void ImageExportDialog::adjustWidth ( double  height) [protected, slot]
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]
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 ( )
void ImageExportDialog::drawPreview ( QPrinter *  printer) [protected, slot]
void ImageExportDialog::drawVectorPreview ( QPrinter *  printer) [protected, slot]
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]
void ImageExportDialog::preview ( ) [protected, slot]
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 ( )
void ImageExportDialog::selectFilter ( const QString &  filter)
int ImageExportDialog::sizeUnit ( ) [inline]
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]
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().


Member Data Documentation

Container widget for all advanced options.

Referenced by ImageExportDialog(), and initAdvancedOptions().

QCheckBox* ImageExportDialog::d_color [private]
QComboBox* ImageExportDialog::d_compression [private]

Container widget for user defined export size.

Referenced by customExportSize(), initAdvancedOptions(), scaleFontsFactor(), and updateAdvancedOptions().

QPushButton* ImageExportDialog::d_preview_button [private]
QSpinBox* ImageExportDialog::d_quality [private]

Container widget for all options available for raster formats.

Referenced by initAdvancedOptions(), preview(), and updateAdvancedOptions().

QCheckBox* ImageExportDialog::d_transparency [private]

Container widget for all options available for vector formats.

Referenced by initAdvancedOptions(), and updateAdvancedOptions().

QCheckBox* ImageExportDialog::keepRatioBox [private]
QComboBox* ImageExportDialog::unitBox [private]

The documentation for this class was generated from the following files: