ExtensibleFileDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : ExtensibleFileDialog.h
00003     Project              : QtiPlot
00004     --------------------------------------------------------------------
00005     Copyright            : (C) 2007 by Knut Franke, Ion Vasilief
00006     Email (use @ for *)  : knut.franke*gmx.de, ion_vasilief*yahoo.fr
00007     Description          : QFileDialog plus generic extension support
00008 
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *  This program is free software; you can redistribute it and/or modify   *
00014  *  it under the terms of the GNU General Public License as published by   *
00015  *  the Free Software Foundation; either version 2 of the License, or      *
00016  *  (at your option) any later version.                                    *
00017  *                                                                         *
00018  *  This program is distributed in the hope that it will be useful,        *
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00021  *  GNU General Public License for more details.                           *
00022  *                                                                         *
00023  *   You should have received a copy of the GNU General Public License     *
00024  *   along with this program; if not, write to the Free Software           *
00025  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
00026  *   Boston, MA  02110-1301  USA                                           *
00027  *                                                                         *
00028  ***************************************************************************/
00029 #ifndef EXTENSIBLE_FILE_DIALOG_H
00030 #define EXTENSIBLE_FILE_DIALOG_H
00031 
00032 #include <QFileDialog>
00033 #include <QPushButton>
00034 
00036 
00044 class ExtensibleFileDialog : public QFileDialog
00045 {
00046     Q_OBJECT
00047     
00048     public:
00050 
00055         ExtensibleFileDialog(QWidget *parent=0, bool extended = true, Qt::WFlags flags=0);
00057         void setExtensionWidget(QWidget *extension);
00058     
00060         bool isExtendable(){return d_extension != NULL;};
00061         bool isExtended(){return d_extension_toggle->isChecked();};
00062         void setExtended(bool extended){if (extended) d_extension_toggle->toggle();};
00063         
00064     protected:
00066         QPushButton *d_extension_toggle;
00067 
00068     private:
00070         QWidget *d_extension;
00072         int d_extension_row;
00073 };
00074 
00075 #endif // ifndef EXTENSIBLE_FILE_DIALOG_H

Generated on Tue Jun 17 08:36:12 2008 for QtiPlot by  doxygen 1.5.5