Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
fileviewerwidget.h
Go to the documentation of this file.
1 #ifndef FILEVIEWERWIDGET_H
2 #define FILEVIEWERWIDGET_H
3 
4 #include <QWidget>
5 #include <QLabel>
6 #include <QTextEdit>
7 
8 /*! @brief Show a files contents, raw and pretty.
9  *
10  * Currently this is just a raw text viewer.
11  *
12  * Idea is to be able to just read a file and view it..
13  * Initiall this is for text and a view of the raw text..
14  * Future idea is to have a clever viewer that detect stuff..
15  * eg detect xml and parse into a tree as well as raw
16  * json parsed into a tree as well as raw
17  *
18  * @todo watch the file for changes and reload (checkbox) and info on last updated
19  * @todo this we need to create a model.. and a parser.. so we wait for qt5..
20 */
21 class FileViewerWidget : public QWidget
22 {
23  Q_OBJECT
24 public:
25  explicit FileViewerWidget(QWidget *parent = 0);
26 
28  QTextEdit *txtEdit;
29 
30  void setFile(QString file_name);
31 
32  void moveEvent(QMoveEvent *ev);
33 signals:
34 
35 public slots:
36 
37 };
38 
39 #endif // FILEVIEWERWIDGET_H
40 
Show a files contents, raw and pretty.
QTextEdit * txtEdit
FileViewerWidget(QWidget *parent=0)
void setFile(QString file_name)
Loads file and sets labels.
void moveEvent(QMoveEvent *ev)