QtiPlot  0.9.8.2
Public Slots | Public Member Functions | Protected Slots | Private Member Functions | Private Attributes | List of all members
ImageExportDialog Class Reference

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

#include <ImageExportDialog.h>

Inheritance diagram for ImageExportDialog:
ExtensibleFileDialog

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. More...
 
bool color () const
 For vector formats: returns whether colors should be enabled for ouput (default: true). More...
 
int compression () const
 For raster formats supporting this option returns the output image compression, 0 means no compression. More...
 
QSizeF customExportSize ()
 Return the custom export size. More...
 
bool escapeStrings ()
 For TeX format: returns whether special characters should be escaped for ouput (default: true). More...
 
bool exportFontSizes ()
 For TeX format: returns whether font sizes should be exported (default: true). More...
 
 ImageExportDialog (MdiSubWindow *window, QWidget *parent=0, bool extended=true, Graph *g=0, Qt::WFlags flags=0)
 Constructor. More...
 
int quality () const
 Return the quality (in percent) the user selected for export to raster formats. More...
 
double scaleFontsFactor ()
 Return the scale fonts factor. More...
 
void selectFilter (const QString &filter)
 
int sizeUnit ()
 Return the unit used for the custom export size. More...
 
int sortMode () const
 Return the sort export mode for 3D plots. More...
 
int textExportMode () const
 Return the text export mode for 3D plots. More...
 
bool transparency () const
 Return whether the output's background should be transparent. More...
 
int vectorResolution () const
 For vector formats: returns the output resolution the user selected, defaulting to the screen resolution. More...
 
- Public Member Functions inherited from ExtensibleFileDialog
 ExtensibleFileDialog (QWidget *parent=0, bool extended=true, Qt::WFlags flags=0)
 Constructor. More...
 
bool isExtendable ()
 Tells weather the dialog has a valid extension widget. More...
 
bool isExtended ()
 
void setEditableFilter (bool on=true)
 Enables/Disables editing of the file type filter. More...
 
void setExtended (bool extended)
 Toggle extension widget on/off. More...
 
void setExtensionWidget (QWidget *extension)
 Set the extension widget to be displayed when the user presses the toggle button. More...
 
void setExtentionToggleButtonText (const QString &text)
 Sets the text to be displayed in the toggle button. More...
 

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. More...
 

Private Member Functions

void initAdvancedOptions ()
 Create d_advanced_options and everything it contains. More...
 

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. More...
 
QSpinBox * d_bitmap_resolution
 
QCheckBox * d_color
 
QComboBox * d_compression
 
QGroupBox * d_custom_size_box
 Container widget for user defined export size. More...
 
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. More...
 
QCheckBox * d_tex_font_sizes
 
QCheckBox * d_transparency
 
QGroupBox * d_vector_options
 Container widget for all options available for vector formats. More...
 
QSpinBox * d_vector_resolution
 
MdiSubWindowd_window
 Pointer to the window to be exported. More...
 
DoubleSpinBoxheightBox
 
QCheckBox * keepRatioBox
 
QLabel * resolutionLabel
 
DoubleSpinBoxscaleFontsBox
 
QComboBox * unitBox
 
DoubleSpinBoxwidthBox
 

Additional Inherited Members

- Protected Attributes inherited from ExtensibleFileDialog
QPushButton * d_extension_toggle
 Button for toggling display of extension on/off. More...
 

Detailed Description

QFileDialog extended with options for image export.

Constructor & Destructor Documentation

◆ ImageExportDialog()

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

◆ accept

void ImageExportDialog::accept ( )
slot

◆ adjustHeight

void ImageExportDialog::adjustHeight ( double  width)
protectedslot

◆ adjustWidth

void ImageExportDialog::adjustWidth ( double  height)
protectedslot

◆ bitmapResolution()

int ImageExportDialog::bitmapResolution ( ) const
inline

For raster formats: returns the output resolution the user selected, defaulting to the screen resolution.

Referenced by drawPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().

◆ closeEvent

void ImageExportDialog::closeEvent ( QCloseEvent *  e)
protectedslot

◆ color()

bool ImageExportDialog::color ( ) const
inline

For vector formats: returns whether colors should be enabled for ouput (default: true).

Referenced by drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().

◆ compression()

int ImageExportDialog::compression ( ) const
inline

For raster formats supporting this option returns the output image compression, 0 means no compression.

Referenced by closeEvent(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().

◆ customExportSize()

QSizeF ImageExportDialog::customExportSize ( )

◆ drawPreview

void ImageExportDialog::drawPreview ( QPrinter *  printer)
protectedslot

◆ drawVectorPreview

void ImageExportDialog::drawVectorPreview ( QPrinter *  printer)
protectedslot

◆ escapeStrings()

bool ImageExportDialog::escapeStrings ( )
inline

For TeX format: returns whether special characters should be escaped for ouput (default: true).

Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().

◆ exportFontSizes()

bool ImageExportDialog::exportFontSizes ( )
inline

For TeX format: returns whether font sizes should be exported (default: true).

Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), and ApplicationWindow::exportLayer().

◆ initAdvancedOptions()

void ImageExportDialog::initAdvancedOptions ( )
private

◆ preview

void ImageExportDialog::preview ( )
protectedslot

◆ quality()

int ImageExportDialog::quality ( ) const
inline

Return the quality (in percent) the user selected for export to raster formats.

References transparency().

Referenced by ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().

◆ scaleFontsFactor()

double ImageExportDialog::scaleFontsFactor ( )

◆ selectFilter()

void ImageExportDialog::selectFilter ( const QString &  filter)

◆ sizeUnit()

int ImageExportDialog::sizeUnit ( )
inline

◆ sortMode()

int ImageExportDialog::sortMode ( ) const
inline

Return the sort export mode for 3D plots.

References customExportSize(), and selectFilter().

Referenced by ApplicationWindow::exportAllGraphs(), and ApplicationWindow::exportGraph().

◆ textExportMode()

int ImageExportDialog::textExportMode ( ) const
inline

Return the text export mode for 3D plots.

Referenced by ApplicationWindow::exportAllGraphs(), and ApplicationWindow::exportGraph().

◆ transparency()

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 quality().

◆ updateAdvancedOptions

void ImageExportDialog::updateAdvancedOptions ( const QString &  filter)
protectedslot

◆ vectorResolution()

int ImageExportDialog::vectorResolution ( ) const
inline

For vector formats: returns the output resolution the user selected, defaulting to the screen resolution.

Referenced by drawVectorPreview(), ApplicationWindow::exportAllGraphs(), ApplicationWindow::exportGraph(), ApplicationWindow::exportLayer(), and ApplicationWindow::exportMatrix().

Member Data Documentation

◆ aspect_ratio

double ImageExportDialog::aspect_ratio
private

◆ compressionLabel

QLabel * ImageExportDialog::compressionLabel
private

◆ d_3D_export_sort

QComboBox* ImageExportDialog::d_3D_export_sort
private

Referenced by closeEvent(), and initAdvancedOptions().

◆ d_3D_text_export_mode

QComboBox* ImageExportDialog::d_3D_text_export_mode
private

Referenced by closeEvent(), and initAdvancedOptions().

◆ d_advanced_options

QWidget* ImageExportDialog::d_advanced_options
private

Container widget for all advanced options.

Referenced by ImageExportDialog(), and initAdvancedOptions().

◆ d_bitmap_resolution

QSpinBox* ImageExportDialog::d_bitmap_resolution
private

Referenced by closeEvent(), and initAdvancedOptions().

◆ d_color

QCheckBox* ImageExportDialog::d_color
private

Referenced by closeEvent(), and initAdvancedOptions().

◆ d_compression

QComboBox* ImageExportDialog::d_compression
private

◆ d_custom_size_box

QGroupBox* ImageExportDialog::d_custom_size_box
private

Container widget for user defined export size.

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

◆ d_escape_tex_strings

QCheckBox* ImageExportDialog::d_escape_tex_strings
private

◆ d_layer

Graph* ImageExportDialog::d_layer
private

◆ d_preview_button

QPushButton* ImageExportDialog::d_preview_button
private

◆ d_quality

QSpinBox* ImageExportDialog::d_quality
private

Referenced by closeEvent(), and initAdvancedOptions().

◆ d_raster_options

QGroupBox* ImageExportDialog::d_raster_options
private

Container widget for all options available for raster formats.

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

◆ d_tex_font_sizes

QCheckBox* ImageExportDialog::d_tex_font_sizes
private

◆ d_transparency

QCheckBox* ImageExportDialog::d_transparency
private

◆ d_vector_options

QGroupBox* ImageExportDialog::d_vector_options
private

Container widget for all options available for vector formats.

Referenced by initAdvancedOptions(), and updateAdvancedOptions().

◆ d_vector_resolution

QSpinBox* ImageExportDialog::d_vector_resolution
private

◆ d_window

MdiSubWindow* ImageExportDialog::d_window
private

◆ heightBox

DoubleSpinBox * ImageExportDialog::heightBox
private

◆ keepRatioBox

QCheckBox* ImageExportDialog::keepRatioBox
private

◆ resolutionLabel

QLabel* ImageExportDialog::resolutionLabel
private

◆ scaleFontsBox

DoubleSpinBox * ImageExportDialog::scaleFontsBox
private

◆ unitBox

QComboBox* ImageExportDialog::unitBox
private

◆ widthBox

DoubleSpinBox* ImageExportDialog::widthBox
private

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