ImageExportDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : ImageExportDialog.h
00003     Project              : QtiPlot
00004     --------------------------------------------------------------------
00005     Copyright            : (C) 2006,2007 by Ion Vasilief,
00006                            Tilman Hoener zu Siederdissen, Knut Franke
00007     Email (use @ for *)  : ion_vasilief*yahoo.fr, thzs*gmx.net,
00008                            knut.franke*gmx.de
00009     Description          : QFileDialog extended with options for image export
00010 
00011  ***************************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *  This program is free software; you can redistribute it and/or modify   *
00016  *  it under the terms of the GNU General Public License as published by   *
00017  *  the Free Software Foundation; either version 2 of the License, or      *
00018  *  (at your option) any later version.                                    *
00019  *                                                                         *
00020  *  This program is distributed in the hope that it will be useful,        *
00021  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00022  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00023  *  GNU General Public License for more details.                           *
00024  *                                                                         *
00025  *   You should have received a copy of the GNU General Public License     *
00026  *   along with this program; if not, write to the Free Software           *
00027  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
00028  *   Boston, MA  02110-1301  USA                                           *
00029  *                                                                         *
00030  ***************************************************************************/
00031 #ifndef IMAGEEXPORTDIALOG_H
00032 #define IMAGEEXPORTDIALOG_H
00033 
00034 #include "../../ExtensibleFileDialog.h"
00035 
00036 #include <QSpinBox>
00037 #include <QCheckBox>
00038 #include <QComboBox>
00039 #include <QPrinter>
00040 
00041 class QStackedWidget;
00042 class QGroupBox;
00043 
00045 class ImageExportDialog: public ExtensibleFileDialog
00046 {
00047     Q_OBJECT
00048 
00049 private:
00051     void initAdvancedOptions();
00052 
00054     QStackedWidget *d_advanced_options;
00055     // vector format options
00057     QGroupBox *d_vector_options;
00058     QSpinBox *d_resolution;
00059     QCheckBox *d_color;
00060     // raster format options
00062     QGroupBox *d_raster_options;
00063     QSpinBox *d_quality;
00064     QCheckBox *d_transparency;
00065 
00066 public:
00068 
00074     ImageExportDialog(QWidget * parent = 0, bool vector_options = true, bool extended = true, Qt::WFlags flags = 0 );
00076     int resolution() const { return d_resolution->value(); }
00078     bool color() const { return d_color->isChecked(); }
00079 
00081     int quality() const { return d_quality->value(); }
00083     bool transparency() const { return d_transparency->isChecked(); }
00084 
00085     void selectFilter(const QString & filter);
00086 
00087 protected slots:
00088     void closeEvent(QCloseEvent*);
00090     void updateAdvancedOptions (const QString &filter);
00091 };
00092 
00093 #endif

Generated on Fri Nov 7 03:36:52 2008 for QtiPlot by  doxygen 1.5.6