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

#include <LoggingCategoryModel.h>

+ Inheritance diagram for LoggingCategoryTreeModel:
+ Collaboration diagram for LoggingCategoryTreeModel:

Public Types

enum class  Roles { ShortNameRole = Qt::UserRole + 1 , FullNameRole , EnabledRole }
 

Public Member Functions

 LoggingCategoryTreeModel (QObject *parent=nullptr)
 
 ~LoggingCategoryTreeModel () override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex parent (const QModelIndex &child) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QHash< int, QByteArrayroleNames () const override
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const override
 
void insertCategory (const QStringList &pathSegments, const QString &fullCategory, QGCLoggingCategoryItem *item)
 
void forEachItem (const std::function< void(QGCLoggingCategoryItem *)> &fn)
 

Detailed Description

Definition at line 86 of file LoggingCategoryModel.h.

Member Enumeration Documentation

◆ Roles

Enumerator
ShortNameRole 
FullNameRole 
EnabledRole 

Definition at line 93 of file LoggingCategoryModel.h.

Constructor & Destructor Documentation

◆ LoggingCategoryTreeModel()

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

Definition at line 113 of file LoggingCategoryModel.cc.

◆ ~LoggingCategoryTreeModel()

LoggingCategoryTreeModel::~LoggingCategoryTreeModel ( )
overridedefault

Member Function Documentation

◆ columnCount()

int LoggingCategoryTreeModel::columnCount ( const QModelIndex parent = QModelIndex()) const
override

Definition at line 157 of file LoggingCategoryModel.cc.

References index(), and parent().

◆ data()

QVariant LoggingCategoryTreeModel::data ( const QModelIndex index,
int  role = Qt::DisplayRole 
) const
override

◆ flags()

Qt::ItemFlags LoggingCategoryTreeModel::flags ( const QModelIndex index) const
override

Definition at line 218 of file LoggingCategoryModel.cc.

References index().

◆ forEachItem()

void LoggingCategoryTreeModel::forEachItem ( const std::function< void(QGCLoggingCategoryItem *)> &  fn)

Definition at line 238 of file LoggingCategoryModel.cc.

References LoggingCategoryTreeNode::children, and index().

◆ hasChildren()

bool LoggingCategoryTreeModel::hasChildren ( const QModelIndex parent = QModelIndex()) const
override

Definition at line 163 of file LoggingCategoryModel.cc.

References LoggingCategoryTreeNode::children, and parent().

◆ index()

QModelIndex LoggingCategoryTreeModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

◆ insertCategory()

void LoggingCategoryTreeModel::insertCategory ( const QStringList pathSegments,
const QString fullCategory,
QGCLoggingCategoryItem item 
)

◆ parent()

QModelIndex LoggingCategoryTreeModel::parent ( const QModelIndex child) const
override

◆ roleNames()

QHash< int, QByteArray > LoggingCategoryTreeModel::roleNames ( ) const
override

Definition at line 227 of file LoggingCategoryModel.cc.

References EnabledRole, FullNameRole, index(), and ShortNameRole.

◆ rowCount()

int LoggingCategoryTreeModel::rowCount ( const QModelIndex parent = QModelIndex()) const
override

Definition at line 152 of file LoggingCategoryModel.cc.

References LoggingCategoryTreeNode::children, and parent().

◆ setData()

bool LoggingCategoryTreeModel::setData ( const QModelIndex index,
const QVariant value,
int  role = Qt::EditRole 
)
override

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