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 <QFileDialog>
00035 #include <QSpinBox>
00036 #include <QCheckBox>
00037 
00038 class QPushButton;
00039 class QStackedWidget;
00040 class QGroupBox;
00041 
00043 class ImageExportDialog: public QFileDialog
00044 {
00045     Q_OBJECT
00046 
00047 private:
00049     void initAdvancedOptions();
00050 
00052     QPushButton *d_advanced_toggle;
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 
00073     ImageExportDialog( QWidget * parent = 0, bool vector_options = true, Qt::WFlags flags = 0 );
00075     int resolution() const { return d_resolution->value(); }
00077     bool color() const { return d_color->isChecked(); }
00079     int quality() const { return d_quality->value(); }
00081     bool transparency() const { return d_transparency->isChecked(); }
00082 
00083 protected slots:
00085     void updateAdvancedOptions (const QString &filter);
00086 };
00087 
00088 #endif

Generated on Mon Oct 15 06:11:41 2007 for QtiPlot by  doxygen 1.5.3