Miam-Player  0.8.0
A nice music player
LibraryItemModel Class Reference

The LibraryItemModel class is used to cache information from the database, in order to increase performance. More...

#include <libraryitemmodel.h>

Inheritance diagram for LibraryItemModel:
MiamItemModel

Public Slots

void cleanDanglingNodes ()
 
void insertNode (GenericDAO *node) override
 
- Public Slots inherited from MiamItemModel
virtual void insertNode (GenericDAO *)
 
virtual void updateNode (GenericDAO *node)
 

Public Member Functions

 LibraryItemModel (QObject *parent=nullptr)
 
virtual QChar currentLetter (const QModelIndex &index) const override
 
virtual LibraryFilterProxyModelproxy () const override
 
void rebuildSeparators ()
 
void reset ()
 
QMultiHash< SeparatorItem *, QModelIndex > topLevelItems () const
 
- Public Member Functions inherited from MiamItemModel
 MiamItemModel (QObject *parent=nullptr)
 
QStandardItem * letterItem (const QString &letter) const
 

Additional Inherited Members

- Protected Member Functions inherited from MiamItemModel
SeparatorIteminsertSeparator (const QStandardItem *node)
 
void removeNode (const QModelIndex &node)
 
- Protected Attributes inherited from MiamItemModel
QHash< uint, QStandardItem * > _hash
 
QHash< QString, SeparatorItem * > _letters
 
QMultiHash< SeparatorItem *, QModelIndex > _topLevelItems
 
QHash< QString, QStandardItem * > _tracks
 

Detailed Description

The LibraryItemModel class is used to cache information from the database, in order to increase performance.

Author
Matthieu Bachelier

Constructor & Destructor Documentation

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

Member Function Documentation

void LibraryItemModel::cleanDanglingNodes ( )
slot

XXX: there's an empty row sometimes caused by extra SeparatorItem

QChar LibraryItemModel::currentLetter ( const QModelIndex &  iTop) const
overridevirtual

For every item in the library, gets the top level letter attached to it.

Implements MiamItemModel.

void LibraryItemModel::insertNode ( GenericDAO node)
overrideslot

Find and insert a node in the hierarchy of items.

LibraryFilterProxyModel * LibraryItemModel::proxy ( ) const
overridevirtual

Implements MiamItemModel.

void LibraryItemModel::rebuildSeparators ( )

Rebuild the list of separators when one has changed grammatical articles in options.

void LibraryItemModel::reset ( )
QMultiHash<SeparatorItem*, QModelIndex> LibraryItemModel::topLevelItems ( ) const
inline

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