Updraft  1.0
Open source glider flight visualisation tool.
Updraft::IgcViewer::OpenedFile Class Reference

Helper class representing a single opened IGC file. More...

#include <openedfile.h>

Collaboration diagram for Updraft::IgcViewer::OpenedFile:

List of all members.

Public Slots

void fixPicked (int index)
 A slot waiting for the signal from the PlotWidget.
void fixIsPointedAt (int index)
 A slot waiting for the signal from the PlotWidget.
void clearMarkers ()
 It clears the markers on the track.

Public Member Functions

 ~OpenedFile ()
 Destructor.
bool init (IgcViewer *viewer, const QString &filename, QColor color)
 Open the file with the given filename.
void redraw ()
 Force redraw of everything.
void resetScales ()
 Reset the global scales.
void updateScales (const OpenedFile *other)
 Update the global scales based on the other opened file.
QColor getAutomaticColor ()
void selectTab ()
QString fileName ()
 Return the absolute file name.
void coloringChanged ()
 Set colors of the track according to the value selected in the viewer.
osg::Node * getNode ()
void trackClicked (const EventInfo *eventInfo)
 If the track is clicked, it computes the nearest fix to the click point, and places a marker on that fix.

Private Slots

void close ()
 Slot that gets called when the tab associated with this file is closed.

Private Member Functions

bool loadIgc (const QString &filename)
 Load the igc file to our own representation and close it.
void createGroup ()
 Create whole track in map.
osg::Node * createTrack ()
 Create the track geometry in map.
osg::Node * createSkirt ()
 Create the skirt under the track.
void setColors (Coloring *coloring)
 Set coloring of the track.
osg::Geode * createMarker (qreal scale)

Private Attributes

QFileInfo fileInfo
QComboBox * colorsCombo
IgcTextWidgettextBox
PlotWidgetplotWidget
TabInterfacetab
MapLayerInterfacetrack
IgcViewerviewer
QColor automaticColor
osg::Geometry * geom
 Geometry of the 3D track visualisation.
osg::Group * sceneRoot
osg::Geode * trackGeode
osg::ref_ptr< osg::Geode > trackPositionMarker
 The geometry of the track marker.
QList< osg::AutoTransform * > pickedMarkers
 The transformations plus the geometry of the markers on picked fix positions.
osg::AutoTransform * currentMarker
 The transformation plus the marker of the fix the user is currently pointing at in the graph widget.
ColoringcurrentColoring
QList< TrackFixfixList
 List of track points.
QList< Coloring * > colorings
QList< FixInfo * > fixInfo
 This variable contains all available igc infos accessible for mass rescaling / deleting / whatever.
FixInfoaltitudeInfo
FixInfoverticalSpeedInfo
FixInfogroundSpeedInfo
FixInfotimeInfo
Util::Gradient gradient

Detailed Description

Helper class representing a single opened IGC file.


Constructor & Destructor Documentation

Destructor.

Also removes the file from the list of opened files in IgcViewer.


Member Function Documentation

It clears the markers on the track.

void Updraft::IgcViewer::OpenedFile::close ( void  ) [private, slot]

Slot that gets called when the tab associated with this file is closed.

Deletes the opened file.

Set colors of the track according to the value selected in the viewer.

Create whole track in map.

osg::Geode * Updraft::IgcViewer::OpenedFile::createMarker ( qreal  scale) [private]

Create the skirt under the track.

Create the track geometry in map.

Return the absolute file name.

A slot waiting for the signal from the PlotWidget.

It sets the position of the marker of the current fix the user is pointing at with mouse.

void Updraft::IgcViewer::OpenedFile::fixPicked ( int  index) [slot]

A slot waiting for the signal from the PlotWidget.

It creates a new the marker for the picked fix, and places it at the position of the fix.

bool Updraft::IgcViewer::OpenedFile::init ( IgcViewer viewer,
const QString &  filename,
QColor  color 
)

Open the file with the given filename.

Parameters:
viewerThe parent IgcViewer object
filenameThe name of the file which should be opened
colorColor used for automatic coloring.
Returns:
Whether the file was successfully opened.
bool Updraft::IgcViewer::OpenedFile::loadIgc ( const QString &  filename) [private]

Load the igc file to our own representation and close it.

Fills fixList.

Force redraw of everything.

Reset the global scales.

void Updraft::IgcViewer::OpenedFile::setColors ( Coloring coloring) [private]

Set coloring of the track.

If the track is clicked, it computes the nearest fix to the click point, and places a marker on that fix.

Afterwards, it emits a signal with the fix-index.

Update the global scales based on the other opened file.


Member Data Documentation

osg::AutoTransform* Updraft::IgcViewer::OpenedFile::currentMarker [private]

The transformation plus the marker of the fix the user is currently pointing at in the graph widget.

Mouse pointing on the track is not implemented.

This variable contains all available igc infos accessible for mass rescaling / deleting / whatever.

There are separate variables for named access to specific info classes.

List of track points.

osg::Geometry* Updraft::IgcViewer::OpenedFile::geom [private]

Geometry of the 3D track visualisation.

Used for coloring.

QList<osg::AutoTransform*> Updraft::IgcViewer::OpenedFile::pickedMarkers [private]

The transformations plus the geometry of the markers on picked fix positions.

osg::ref_ptr<osg::Geode> Updraft::IgcViewer::OpenedFile::trackPositionMarker [private]

The geometry of the track marker.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines