QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
LogViewerController Class Reference

#include <LogViewerController.h>

Inheritance diagram for LogViewerController:
Collaboration diagram for LogViewerController:

Public Types

enum class  SourceType { None , TLog , Bin , ULog }

Signals

void sourceTypeChanged ()
void currentLogPathChanged ()
void plottableFieldsChanged ()
void fieldRowsChanged ()
void selectedFieldsChanged ()

Public Member Functions

 LogViewerController (QObject *parent=nullptr)
 ~LogViewerController ()
SourceType sourceType () const
QString currentLogPath () const
bool hasLoadedLog () const
QStringList plottableFields () const
QVariantList fieldRows () const
QStringList selectedFields () const
Q_INVOKABLE void clear ()
Q_INVOKABLE void openTLog (const QString &path)
Q_INVOKABLE void openBinLog (const QString &path)
Q_INVOKABLE void openULogFile (const QString &path)
Q_INVOKABLE void setPlottableFields (const QStringList &fieldNames)
Q_INVOKABLE void clearSelection ()
Q_INVOKABLE void toggleGroupExpanded (const QString &groupName)
Q_INVOKABLE bool isGroupExpanded (const QString &groupName) const
Q_INVOKABLE void setFieldSelected (const QString &fieldName, bool selected)
Q_INVOKABLE bool isFieldSelected (const QString &fieldName) const
Q_INVOKABLE QString fieldColor (const QString &fieldName) const
Q_INVOKABLE QString eventColor (const QString &eventType) const

Detailed Description

Definition at line 11 of file LogViewerController.h.

Member Enumeration Documentation

◆ SourceType

Enumerator
None 
TLog 
Bin 
ULog 

Definition at line 24 of file LogViewerController.h.

Constructor & Destructor Documentation

◆ LogViewerController()

LogViewerController::LogViewerController ( QObject * parent = nullptr)
explicit

Definition at line 52 of file LogViewerController.cc.

◆ ~LogViewerController()

LogViewerController::~LogViewerController ( )

Definition at line 58 of file LogViewerController.cc.

Member Function Documentation

◆ clear()

void LogViewerController::clear ( )

◆ clearSelection()

void LogViewerController::clearSelection ( )

Definition at line 100 of file LogViewerController.cc.

References selectedFieldsChanged().

◆ currentLogPath()

QString LogViewerController::currentLogPath ( ) const
inline

Definition at line 36 of file LogViewerController.h.

◆ currentLogPathChanged

void LogViewerController::currentLogPathChanged ( )
signal

◆ eventColor()

QString LogViewerController::eventColor ( const QString & eventType) const

Definition at line 152 of file LogViewerController.cc.

◆ fieldColor()

QString LogViewerController::fieldColor ( const QString & fieldName) const

Returns a deterministic hash-based color for unselected fields. For selected fields, QML assigns index-based colors from its own palette.

Definition at line 147 of file LogViewerController.cc.

◆ fieldRows()

QVariantList LogViewerController::fieldRows ( ) const
inline

Definition at line 40 of file LogViewerController.h.

◆ fieldRowsChanged

void LogViewerController::fieldRowsChanged ( )
signal

Referenced by clear().

◆ hasLoadedLog()

bool LogViewerController::hasLoadedLog ( ) const
inline

Definition at line 37 of file LogViewerController.h.

◆ isFieldSelected()

bool LogViewerController::isFieldSelected ( const QString & fieldName) const

Definition at line 142 of file LogViewerController.cc.

◆ isGroupExpanded()

bool LogViewerController::isGroupExpanded ( const QString & groupName) const

Definition at line 121 of file LogViewerController.cc.

◆ openBinLog()

void LogViewerController::openBinLog ( const QString & path)

Definition at line 80 of file LogViewerController.cc.

References Bin.

◆ openTLog()

void LogViewerController::openTLog ( const QString & path)

Definition at line 75 of file LogViewerController.cc.

References TLog.

◆ openULogFile()

void LogViewerController::openULogFile ( const QString & path)

Definition at line 85 of file LogViewerController.cc.

References ULog.

◆ plottableFields()

QStringList LogViewerController::plottableFields ( ) const
inline

Definition at line 39 of file LogViewerController.h.

◆ plottableFieldsChanged

void LogViewerController::plottableFieldsChanged ( )
signal

Referenced by clear(), and setPlottableFields().

◆ selectedFields()

QStringList LogViewerController::selectedFields ( ) const
inline

Definition at line 41 of file LogViewerController.h.

◆ selectedFieldsChanged

void LogViewerController::selectedFieldsChanged ( )
signal

◆ setFieldSelected()

void LogViewerController::setFieldSelected ( const QString & fieldName,
bool selected )

Definition at line 126 of file LogViewerController.cc.

References selectedFieldsChanged().

◆ setPlottableFields()

void LogViewerController::setPlottableFields ( const QStringList & fieldNames)

Definition at line 90 of file LogViewerController.cc.

References plottableFieldsChanged(), and selectedFieldsChanged().

◆ sourceType()

SourceType LogViewerController::sourceType ( ) const
inline

Definition at line 35 of file LogViewerController.h.

Referenced by selectedFieldsChanged().

◆ sourceTypeChanged

void LogViewerController::sourceTypeChanged ( )
signal

◆ toggleGroupExpanded()

void LogViewerController::toggleGroupExpanded ( const QString & groupName)

Definition at line 110 of file LogViewerController.cc.


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