QGIS API Documentation  2.99.0-Master (9caa722)
qgsencodingfiledialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsencodingfiledialog.h - File dialog which queries the encoding type
3  --------------------------------------
4  Date : 16-Feb-2005
5  Copyright : (C) 2005 by Marco Hugentobler
6  email : [email protected]
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSENCODINGFILEDIALOG_H
17 #define QGSENCODINGFILEDIALOG_H
18 
19 #include <QFileDialog>
20 #include "qgis_gui.h"
21 #include "qgis.h"
22 
23 class QComboBox;
24 class QPushButton;
25 
29 class GUI_EXPORT QgsEncodingFileDialog: public QFileDialog
30 {
31  Q_OBJECT
32  public:
33 
37  QgsEncodingFileDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr,
38  const QString &caption = QString(), const QString &directory = QString(),
39  const QString &filter = QString(), const QString &encoding = QString() );
41  QString encoding() const;
43  void addCancelAll();
45  bool cancelAll();
46 
47  public slots:
48  void saveUsedEncoding();
49 
50  void pbnCancelAll_clicked();
51 
52  private:
54  QComboBox *mEncodingComboBox = nullptr;
55 
56  /* The button to click */
57  QPushButton *mCancelAllButton = nullptr;
58 
59  /* Set if user clicked 'Cancel All' */
60  bool mCancelAll;
61 };
62 
63 #endif
A file dialog which lets the user select the preferred encoding type for a data provider.
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46