Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 qgsencodingfiledialog.h - File dialog which queries the encoding type 00003 -------------------------------------- 00004 Date : 16-Feb-2005 00005 Copyright : (C) 2005 by Marco Hugentobler 00006 email : marco.hugentobler@autoform.ch 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #ifndef QGSENCODINGFILEDIALOG_H 00017 #define QGSENCODINGFILEDIALOG_H 00018 00019 #include <QFileDialog> 00020 class QComboBox; 00021 class QPushButton; 00022 00026 class GUI_EXPORT QgsEncodingFileDialog: public QFileDialog 00027 { 00028 Q_OBJECT 00029 public: 00030 QgsEncodingFileDialog( QWidget * parent = 0, 00031 const QString & caption = QString(), const QString & directory = QString(), 00032 const QString & filter = QString(), const QString & encoding = QString() ); 00033 ~QgsEncodingFileDialog(); 00035 QString encoding() const; 00036 /* Adds a 'Cancel All' button for the user to click */ 00037 void addCancelAll(); 00038 /* Returns true if the user clicked 'Cancel All' */ 00039 bool cancelAll(); 00040 00041 public slots: 00042 void saveUsedEncoding(); 00043 00044 void pbnCancelAll_clicked(); 00045 00046 private: 00048 QComboBox* mEncodingComboBox; 00049 00050 /* The button to click */ 00051 QPushButton *mCancelAllButton; 00052 00053 /* Set if user clicked 'Cancel All' */ 00054 bool mCancelAll; 00055 }; 00056 00057 #endif