Miam-Player  0.8.0
A nice music player
MiamItemModel Class Referenceabstract

The MiamItemModel class. More...

#include <miamitemmodel.h>

Inheritance diagram for MiamItemModel:
LibraryItemModel UniqueLibraryItemModel

Public Slots

virtual void insertNode (GenericDAO *)
virtual void updateNode (GenericDAO *node)

Public Member Functions

 MiamItemModel (QObject *parent=nullptr)
virtual QChar currentLetter (const QModelIndex &index) const =0
QStandardItem * letterItem (const QString &letter) const
virtual QSortFilterProxyModel * proxy () const =0

Protected Member Functions

SeparatorIteminsertSeparator (const QStandardItem *node)
void removeNode (const QModelIndex &node)

Protected Attributes

QHash< uint, QStandardItem * > _hash
QHash< QString, SeparatorItem * > _letters
QMultiHash< SeparatorItem *, QModelIndex > _topLevelItems
QHash< QString, QStandardItem * > _tracks

Detailed Description

The MiamItemModel class.

Matthieu Bachelier

Constructor & Destructor Documentation

MiamItemModel::MiamItemModel ( QObject *  parent = nullptr)

Member Function Documentation

virtual QChar MiamItemModel::currentLetter ( const QModelIndex &  index) const
pure virtual
virtual void MiamItemModel::insertNode ( GenericDAO )
SeparatorItem * MiamItemModel::insertSeparator ( const QStandardItem *  node)
QStandardItem* MiamItemModel::letterItem ( const QString &  letter) const
virtual QSortFilterProxyModel* MiamItemModel::proxy ( ) const
pure virtual
void MiamItemModel::removeNode ( const QModelIndex &  node)

Recursively remove node and its parent if the latter has no more children.

void MiamItemModel::updateNode ( GenericDAO node)

Why do I have to update asynchronously this node? Can I just not fill all the information in the Database class?

Member Data Documentation

QHash<uint, QStandardItem*> MiamItemModel::_hash

This hash is a cache, used to insert nodes in this tree at the right location.

QHash<QString, SeparatorItem*> MiamItemModel::_letters

Letters are items to groups separate of top levels items (items without parent).

QMultiHash<SeparatorItem*, QModelIndex> MiamItemModel::_topLevelItems

Letter L returns all Artists (e.g.) starting with L.

QHash<QString, QStandardItem*> MiamItemModel::_tracks

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