dialogpreviewfile.h
Go to the documentation of this file.
1 /***************************************************************************
2  SocNetV: Social Network Visualizer
3  version: 3.0.2
4  Written in Qt
5 
6  dialogpreviewfile.h - description
7  -------------------
8  copyright : (C) 2005-2021 by Dimitris B. Kalamaras
9  project site : https://socnetv.org
10 
11  ***************************************************************************/
12 
13 /*******************************************************************************
14 * This program is free software: you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation, either version 3 of the License, or *
17 * (at your option) any later version. *
18 * *
19 * This program is distributed in the hope that it will be useful, *
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22 * GNU General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU General Public License *
25 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
26 ********************************************************************************/
27 
28 
29 #ifndef DIALOGPREVIEWFILE_H
30 #define DIALOGPREVIEWFILE_H
31 
32 #include <QDialog>
33 #include <QList>
34 
35 class QComboBox;
36 class QDialogButtonBox;
37 class QLabel;
38 class QTextCodec;
39 class QTextEdit;
40 
41 class DialogPreviewFile : public QDialog
42 {
43  Q_OBJECT
44 public:
45  explicit DialogPreviewFile(QWidget *parent = Q_NULLPTR);
46  void setCodecList(const QList<QTextCodec *> &list);
47  void setEncodedData(const QByteArray &data, const QString, const int );
48  QString decodedString() const { return decodedStr; }
49 signals:
50  void loadNetworkFileWithCodec(const QString, const QString, const int);
51 private slots:
52  void updateTextEdit();
53  void accept();
54 private:
55  QByteArray encodedData;
56  QString decodedStr, fileName;
57  int format;
58  QComboBox *encodingComboBox;
59  QLabel *encodingLabel;
60  QTextEdit *textEdit;
61  QDialogButtonBox *buttonBox;
62 
63 };
64 
65 #endif
QString decodedString() const
Definition: dialogpreviewfile.h:48
void accept()
Definition: dialogpreviewfile.cpp:101
void setEncodedData(const QByteArray &data, const QString, const int)
Definition: dialogpreviewfile.cpp:77
void updateTextEdit()
Definition: dialogpreviewfile.cpp:87
DialogPreviewFile(QWidget *parent=Q_NULLPTR)
Definition: dialogpreviewfile.cpp:33
QString decodedStr
Definition: dialogpreviewfile.h:56
QLabel * encodingLabel
Definition: dialogpreviewfile.h:59
QTextEdit * textEdit
Definition: dialogpreviewfile.h:60
void setCodecList(const QList< QTextCodec * > &list)
Definition: dialogpreviewfile.cpp:70
int format
Definition: dialogpreviewfile.h:57
Definition: dialogpreviewfile.h:41
QDialogButtonBox * buttonBox
Definition: dialogpreviewfile.h:61
QByteArray encodedData
Definition: dialogpreviewfile.h:55
void loadNetworkFileWithCodec(const QString, const QString, const int)
QString fileName
Definition: dialogpreviewfile.h:56
QComboBox * encodingComboBox
Definition: dialogpreviewfile.h:58