LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft::Util::UnhideListModel Class Reference

A model to be used with UnhideListViewBase. More...

#include "unhidelistmodel.h"

+ Inheritance diagram for LeechCraft::Util::UnhideListModel:
+ Collaboration diagram for LeechCraft::Util::UnhideListModel:

Public Types

enum  Roles {
  ItemClass = Qt::UserRole + 1,
  ItemName,
  ItemDescription,
  ItemIcon
}
 Various unhide roles to be set by the rows of this model. More...
 

Public Member Functions

 UnhideListModel (QObject *parent)
 Constructs the model with the given parent. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LeechCraft::Util::RoleNamesMixin< QStandardItemModel >
 RoleNamesMixin ()=default
 Default constructor. More...
 
 RoleNamesMixin (Args &&... args)
 Constructs the base Model type with the given args. More...
 
void setRoleNames (const QHash< int, QByteArray > &roleNames)
 Sets the role names to roleNames. More...
 
QHash< int, QByteArray > roleNames () const override
 Returns the role names. More...
 

Detailed Description

A model to be used with UnhideListViewBase.

This model just defines some roles used in various "unhide" lists and exposes them to QML.

See also
UnhideListViewBase

Definition at line 49 of file unhidelistmodel.h.

Member Enumeration Documentation

◆ Roles

Various unhide roles to be set by the rows of this model.

Enumerator
ItemClass 

The unique ID of the item represented by this row.

Exposed under the name itemClass to QML.

ItemName 

The name of the item represented by this row.

Exposed under the name itemName to QML.

ItemDescription 

The description of the item represented by this row.

Exposed under the name itemDescr to QML.

ItemIcon 

The URL of the icon of the item represented by this row.

Exposed under the name itemIcon to QML.

Definition at line 55 of file unhidelistmodel.h.

Constructor & Destructor Documentation

◆ UnhideListModel()

LeechCraft::Util::UnhideListModel::UnhideListModel ( QObject *  parent)

Constructs the model with the given parent.

Parameters
[in]parentThe parent object of this model.

Definition at line 36 of file unhidelistmodel.cpp.

References LeechCraft::Util::RoleNamesMixin< QStandardItemModel >::roleNames(), and LeechCraft::Util::RoleNamesMixin< QStandardItemModel >::setRoleNames().

+ Here is the call graph for this function:

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