dialogpreviewfile.h
Go to the documentation of this file.
1 /***************************************************************************
2  SocNetV: Social Network Visualizer
3  version: 2.2
4  Written in Qt
5 
6  dialogpreviewfile.h - description
7  -------------------
8  copyright : (C) 2005-2017 by Dimitris B. Kalamaras
9  project site : http://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 = 0);
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 
55 private:
56  QByteArray encodedData;
57  QString decodedStr, fileName;
58  int format;
59  QComboBox *encodingComboBox;
60  QLabel *encodingLabel;
61  QTextEdit *textEdit;
62  QDialogButtonBox *buttonBox;
63 
64 };
65 
66 #endif
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
QString decodedStr
Definition: dialogpreviewfile.h:57
QLabel * encodingLabel
Definition: dialogpreviewfile.h:60
QTextEdit * textEdit
Definition: dialogpreviewfile.h:61
void setCodecList(const QList< QTextCodec * > &list)
Definition: dialogpreviewfile.cpp:70
QDialogButtonBox * buttonBox
Definition: dialogpreviewfile.h:62
int format
Definition: dialogpreviewfile.h:58
QString decodedString() const
Definition: dialogpreviewfile.h:48
QByteArray encodedData
Definition: dialogpreviewfile.h:56
DialogPreviewFile(QWidget *parent=0)
Definition: dialogpreviewfile.cpp:33
Definition: dialogpreviewfile.h:41
void loadNetworkFileWithCodec(const QString, const QString, const int)
QComboBox * encodingComboBox
Definition: dialogpreviewfile.h:59
QString fileName
Definition: dialogpreviewfile.h:57