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 fieldRowsChanged ()
 
void selectedFieldsChanged ()
 

Public Member Functions

 LogViewerController (QObject *parent=nullptr)
 
 ~LogViewerController ()
 
SourceType sourceType () const
 
QString currentLogPath () const
 
bool hasLoadedLog () 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 23 of file LogViewerController.h.

Constructor & Destructor Documentation

◆ LogViewerController()

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

Definition at line 10 of file LogViewerController.cc.

◆ ~LogViewerController()

LogViewerController::~LogViewerController ( )

Definition at line 16 of file LogViewerController.cc.

Member Function Documentation

◆ clear()

void LogViewerController::clear ( )

Definition at line 21 of file LogViewerController.cc.

References fieldRowsChanged(), None, and selectedFieldsChanged().

◆ clearSelection()

void LogViewerController::clearSelection ( )

Definition at line 56 of file LogViewerController.cc.

References selectedFieldsChanged().

◆ currentLogPath()

QString LogViewerController::currentLogPath ( ) const
inline

Definition at line 35 of file LogViewerController.h.

◆ currentLogPathChanged

void LogViewerController::currentLogPathChanged ( )
signal

◆ eventColor()

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

Definition at line 108 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 103 of file LogViewerController.cc.

◆ fieldRows()

QVariantList LogViewerController::fieldRows ( ) const
inline

Definition at line 37 of file LogViewerController.h.

◆ fieldRowsChanged

void LogViewerController::fieldRowsChanged ( )
signal

Referenced by clear().

◆ hasLoadedLog()

bool LogViewerController::hasLoadedLog ( ) const
inline

Definition at line 36 of file LogViewerController.h.

◆ isFieldSelected()

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

Definition at line 98 of file LogViewerController.cc.

◆ isGroupExpanded()

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

Definition at line 77 of file LogViewerController.cc.

◆ openBinLog()

void LogViewerController::openBinLog ( const QString &  path)

Definition at line 37 of file LogViewerController.cc.

References Bin.

◆ openTLog()

void LogViewerController::openTLog ( const QString &  path)

Definition at line 32 of file LogViewerController.cc.

References TLog.

◆ openULogFile()

void LogViewerController::openULogFile ( const QString &  path)

Definition at line 42 of file LogViewerController.cc.

References ULog.

◆ selectedFields()

QStringList LogViewerController::selectedFields ( ) const
inline

Definition at line 38 of file LogViewerController.h.

◆ selectedFieldsChanged

void LogViewerController::selectedFieldsChanged ( )
signal

◆ setFieldSelected()

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

Definition at line 82 of file LogViewerController.cc.

References selectedFieldsChanged().

◆ setPlottableFields()

void LogViewerController::setPlottableFields ( const QStringList &  fieldNames)

Definition at line 47 of file LogViewerController.cc.

References selectedFieldsChanged().

◆ sourceType()

SourceType LogViewerController::sourceType ( ) const
inline

Definition at line 34 of file LogViewerController.h.

◆ sourceTypeChanged

void LogViewerController::sourceTypeChanged ( )
signal

◆ toggleGroupExpanded()

void LogViewerController::toggleGroupExpanded ( const QString &  groupName)

Definition at line 66 of file LogViewerController.cc.


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