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

#include <FactValueGrid.h>

Inheritance diagram for FactValueGrid:
Collaboration diagram for FactValueGrid:

Classes

struct  LayoutFact
 A Fact a layout shows, named as InstrumentValueData names it. More...

Public Types

enum  FontSize { DefaultFontSize =0 , SmallFontSize , MediumFontSize , LargeFontSize }

Signals

void fontSizeChanged (FontSize fontSize)
void columnsChanged (QmlObjectListModel *model)
void rowCountChanged (int rowCount)
void settingsGroupChanged (QString settingsGroup)
void specificVehicleForCardChanged (Vehicle *vehicle)

Public Member Functions

 FactValueGrid (QQuickItem *parent=nullptr)
 ~FactValueGrid ()
Q_INVOKABLE void resetToDefaults (void)
 < null means track active vehicle, set to specific vehicle to track a single vehicle and share settings with other cards
Q_INVOKABLE QmlObjectListModel * appendColumn (void)
Q_INVOKABLE void deleteLastColumn (void)
Q_INVOKABLE void appendRow (void)
Q_INVOKABLE void deleteLastRow (void)
QmlObjectListModel * columns (void) const
QString settingsGroup (void) const
FontSize fontSize (void) const
QStringList iconNames (void) const
QGCMAVLinkTypes::VehicleClass_t vehicleClass (void) const
Vehicle * currentVehicle (void) const
Vehicle * specificVehicleForCard (void) const
void setFontSize (FontSize fontSize)
void componentComplete (void) final

Static Public Member Functions

static QList< LayoutFact > layoutFacts (const QString &settingsGroup)

Protected Attributes

QString _settingsGroup
FontSize _fontSize = DefaultFontSize
bool _preventSaveSettings = false
QmlObjectListModel * _columns = nullptr
int _rowCount = 0
Vehicle * _specificVehicleForCard = nullptr
Vehicle * _activeVehicle = nullptr

Detailed Description

Definition at line 27 of file FactValueGrid.h.

Member Enumeration Documentation

◆ FontSize

Enumerator
DefaultFontSize 
SmallFontSize 
MediumFontSize 
LargeFontSize 

Definition at line 37 of file FactValueGrid.h.

Constructor & Destructor Documentation

◆ FactValueGrid()

FactValueGrid::FactValueGrid ( QQuickItem * parent = nullptr)

◆ ~FactValueGrid()

FactValueGrid::~FactValueGrid ( )

Definition at line 124 of file FactValueGrid.cc.

Member Function Documentation

◆ appendColumn()

QmlObjectListModel * FactValueGrid::appendColumn ( void )

◆ appendRow()

void FactValueGrid::appendRow ( void )

◆ columns()

QmlObjectListModel * FactValueGrid::columns ( void ) const
inline

Definition at line 61 of file FactValueGrid.h.

References _columns.

Referenced by QGCCorePlugin::factValueGridCreateDefaultSettings().

◆ columnsChanged

void FactValueGrid::columnsChanged ( QmlObjectListModel * model)
signal

◆ componentComplete()

void FactValueGrid::componentComplete ( void )
final

◆ currentVehicle()

Vehicle * FactValueGrid::currentVehicle ( void ) const
inline

Definition at line 66 of file FactValueGrid.h.

References _activeVehicle, and _specificVehicleForCard.

Referenced by vehicleClass().

◆ deleteLastColumn()

void FactValueGrid::deleteLastColumn ( void )

Definition at line 274 of file FactValueGrid.cc.

References _columns.

◆ deleteLastRow()

void FactValueGrid::deleteLastRow ( void )

◆ fontSize()

FontSize FactValueGrid::fontSize ( void ) const
inline

Definition at line 63 of file FactValueGrid.h.

References _fontSize.

Referenced by fontSizeChanged(), and setFontSize().

◆ fontSizeChanged

void FactValueGrid::fontSizeChanged ( FontSize fontSize)
signal

References fontSize().

Referenced by componentComplete(), and setFontSize().

◆ iconNames()

QStringList FactValueGrid::iconNames ( void ) const
inline

Definition at line 64 of file FactValueGrid.h.

◆ layoutFacts()

QList< FactValueGrid::LayoutFact > FactValueGrid::layoutFacts ( const QString & settingsGroup)
static

The Facts of the layout that grids of settings group settingsGroup show, saved or default, column by column, for the active vehicle (the offline editing vehicle without one): for code that reads a layout without showing a grid. Empty without a vehicle.

Definition at line 60 of file FactValueGrid.cc.

References _activeVehicle, _columns, _settingsGroup, MultiVehicleManager::activeVehicle(), QmlObjectListModel::count(), InstrumentValueData::fact(), InstrumentValueData::factGroupName(), InstrumentValueData::factName(), FactValueGrid(), MultiVehicleManager::instance(), MultiVehicleManager::offlineEditingVehicle(), settingsGroup(), and QmlObjectListModel::value().

Referenced by TelemetryBarValues::readLayout().

◆ resetToDefaults()

void FactValueGrid::resetToDefaults ( void )

< null means track active vehicle, set to specific vehicle to track a single vehicle and share settings with other cards

Definition at line 134 of file FactValueGrid.cc.

References _settingsGroup.

◆ rowCountChanged

void FactValueGrid::rowCountChanged ( int rowCount)
signal

◆ setFontSize()

void FactValueGrid::setFontSize ( FontSize fontSize)

◆ settingsGroup()

QString FactValueGrid::settingsGroup ( void ) const
inline

Definition at line 62 of file FactValueGrid.h.

References _settingsGroup.

Referenced by layoutFacts(), and settingsGroupChanged().

◆ settingsGroupChanged

void FactValueGrid::settingsGroupChanged ( QString settingsGroup)
signal

References settingsGroup().

◆ specificVehicleForCard()

Vehicle * FactValueGrid::specificVehicleForCard ( void ) const
inline

◆ specificVehicleForCardChanged

void FactValueGrid::specificVehicleForCardChanged ( Vehicle * vehicle)
signal

References FactValueGrid().

◆ vehicleClass()

QGCMAVLinkTypes::VehicleClass_t FactValueGrid::vehicleClass ( void ) const

Member Data Documentation

◆ _activeVehicle

Vehicle* FactValueGrid::_activeVehicle = nullptr
protected

Definition at line 102 of file FactValueGrid.h.

Referenced by componentComplete(), currentVehicle(), and layoutFacts().

◆ _columns

QmlObjectListModel* FactValueGrid::_columns = nullptr
protected

◆ _fontSize

FontSize FactValueGrid::_fontSize = DefaultFontSize
protected

Definition at line 97 of file FactValueGrid.h.

Referenced by fontSize(), and setFontSize().

◆ _preventSaveSettings

bool FactValueGrid::_preventSaveSettings = false
protected

Definition at line 98 of file FactValueGrid.h.

◆ _rowCount

int FactValueGrid::_rowCount = 0
protected

Definition at line 100 of file FactValueGrid.h.

Referenced by appendColumn(), appendRow(), and deleteLastRow().

◆ _settingsGroup

QString FactValueGrid::_settingsGroup
protected

Definition at line 96 of file FactValueGrid.h.

Referenced by layoutFacts(), resetToDefaults(), and settingsGroup().

◆ _specificVehicleForCard

Vehicle* FactValueGrid::_specificVehicleForCard = nullptr
protected

Definition at line 101 of file FactValueGrid.h.

Referenced by componentComplete(), currentVehicle(), and specificVehicleForCard().


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