QGIS API Documentation  3.24.2-Tisler (13c1a02865)
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_sip.h"
22 
23 class QComboBox;
24 class QPushButton;
25 
30 class GUI_EXPORT QgsEncodingFileDialog: public QFileDialog
31 {
32  Q_OBJECT
33  public:
34 
38  QgsEncodingFileDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr,
39  const QString &caption = QString(), const QString &directory = QString(),
40  const QString &filter = QString(), const QString &encoding = QString() );
42  QString encoding() const;
44  void addCancelAll();
46  bool cancelAll();
47 
48  public slots:
49  void saveUsedEncoding();
50 
51  void pbnCancelAll_clicked();
52 
53  private:
55  QComboBox *mEncodingComboBox = nullptr;
56 
57  /* The button to click */
58  QPushButton *mCancelAllButton = nullptr;
59 
60  /* Set if user clicked 'Cancel All' */
61  bool mCancelAll;
62 };
63 
69 class GUI_EXPORT QgsEncodingSelectionDialog: public QDialog
70 {
71  Q_OBJECT
72 
73  public:
74 
82  QgsEncodingSelectionDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr,
83  const QString &caption = QString(), const QString &encoding = QString(),
84  Qt::WindowFlags flags = Qt::WindowFlags() );
85 
90  QString encoding() const;
91 
96  void setEncoding( const QString &encoding );
97 
98  private:
99 
100  QComboBox *mEncodingComboBox = nullptr;
101 
102 };
103 
104 
105 #endif
A file dialog which lets the user select the preferred encoding type for a data provider.
A dialog which presents the user with a choice of file encodings.
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53