Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
FileViewerWidget Class Reference

Show a files contents, raw and pretty. More...

#include <fileviewerwidget.h>

Inheritance diagram for FileViewerWidget:

Public Member Functions

 FileViewerWidget (QWidget *parent=0)
 
void moveEvent (QMoveEvent *ev)
 
void setFile (QString file_name)
 Loads file and sets labels. More...
 

Public Attributes

QLabellblFileName
 
QTextEdit * txtEdit
 

Detailed Description

Show a files contents, raw and pretty.

Currently this is just a raw text viewer.

Idea is to be able to just read a file and view it.. Initiall this is for text and a view of the raw text.. Future idea is to have a clever viewer that detect stuff.. eg detect xml and parse into a tree as well as raw json parsed into a tree as well as raw

Todo:

watch the file for changes and reload (checkbox) and info on last updated

this we need to create a model.. and a parser.. so we wait for qt5..

Definition at line 21 of file fileviewerwidget.h.

Constructor & Destructor Documentation

FileViewerWidget::FileViewerWidget ( QWidget parent = 0)
explicit

Definition at line 13 of file fileviewerwidget.cpp.

Member Function Documentation

void FileViewerWidget::moveEvent ( QMoveEvent *  ev)

Definition at line 70 of file fileviewerwidget.cpp.

void FileViewerWidget::setFile ( QString  file_path)

Loads file and sets labels.

Todo:
no error trapping, autodetect required

Definition at line 51 of file fileviewerwidget.cpp.

Referenced by AircraftWidget::on_view_aircraft_cache(), and AirportsWidget::on_view_airports_cache().

Member Data Documentation

QLabel* FileViewerWidget::lblFileName

Definition at line 27 of file fileviewerwidget.h.

Referenced by FileViewerWidget(), and setFile().

QTextEdit* FileViewerWidget::txtEdit

Definition at line 28 of file fileviewerwidget.h.

Referenced by FileViewerWidget(), and setFile().


The documentation for this class was generated from the following files: