Changeset View
Changeset View
Standalone View
Standalone View
src/browsers/CollectionTreeItemModelBase.h
Show All 31 Lines | |||||
32 | #include <QPixmap> | 32 | #include <QPixmap> | ||
33 | #include <QSet> | 33 | #include <QSet> | ||
34 | 34 | | |||
35 | namespace Collections | 35 | namespace Collections | ||
36 | { | 36 | { | ||
37 | class Collection; | 37 | class Collection; | ||
38 | } | 38 | } | ||
39 | class CollectionTreeItem; | 39 | class CollectionTreeItem; | ||
40 | class QMutex; | | |||
41 | class QTimeLine; | 40 | class QTimeLine; | ||
42 | class TrackLoaderJob; | 41 | class TrackLoaderJob; | ||
43 | 42 | | |||
44 | typedef QPair<Collections::Collection*, CollectionTreeItem* > CollectionRoot; | 43 | typedef QPair<Collections::Collection*, CollectionTreeItem* > CollectionRoot; | ||
45 | 44 | | |||
46 | /** | 45 | /** | ||
47 | @author Nikolaj Hald Nielsen <nhn@kde.org> | 46 | @author Nikolaj Hald Nielsen <nhn@kde.org> | ||
48 | */ | 47 | */ | ||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 118 | public Q_SLOTS: | |||
140 | void slotCollapsed( const QModelIndex &index ); | 139 | void slotCollapsed( const QModelIndex &index ); | ||
141 | void slotExpanded( const QModelIndex &index ); | 140 | void slotExpanded( const QModelIndex &index ); | ||
142 | 141 | | |||
143 | private: | 142 | private: | ||
144 | void handleSpecialQueryResult( CollectionTreeItem::Type type, Collections::QueryMaker *qm, const Meta::DataList &dataList ); | 143 | void handleSpecialQueryResult( CollectionTreeItem::Type type, Collections::QueryMaker *qm, const Meta::DataList &dataList ); | ||
145 | void handleNormalQueryResult( Collections::QueryMaker *qm, const Meta::DataList &dataList ); | 144 | void handleNormalQueryResult( Collections::QueryMaker *qm, const Meta::DataList &dataList ); | ||
146 | 145 | | |||
147 | Collections::QueryMaker::QueryType mapCategoryToQueryType( int levelType ) const; | 146 | Collections::QueryMaker::QueryType mapCategoryToQueryType( int levelType ) const; | ||
147 | void tracksLoaded( const Meta::AlbumPtr &album, const QModelIndex &index, const Meta::TrackList &tracks ); | ||||
148 | 148 | | |||
149 | /** | | |||
150 | * This function is thread-safe | | |||
151 | */ | | |||
152 | void tracksLoaded( Meta::AlbumPtr album, const QModelIndex &index, const Meta::TrackList &tracks ); | | |||
153 | | ||||
154 | QMutex *m_loadingAlbumsMutex; | | |||
155 | QHash<Meta::Album *, int> m_years; | 149 | QHash<Meta::Album *, int> m_years; | ||
156 | mutable QSet<Meta::AlbumPtr> m_loadingAlbums; | 150 | mutable QSet<Meta::AlbumPtr> m_loadingAlbums; | ||
157 | 151 | | |||
158 | protected: | 152 | protected: | ||
159 | /** Adds the query maker to the running queries and connects the slots */ | 153 | /** Adds the query maker to the running queries and connects the slots */ | ||
160 | void addQueryMaker( CollectionTreeItem* item, | 154 | void addQueryMaker( CollectionTreeItem* item, | ||
161 | Collections::QueryMaker *qm ) const; | 155 | Collections::QueryMaker *qm ) const; | ||
162 | 156 | | |||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |