Refactoring
This commit is contained in:
@@ -30,10 +30,12 @@
|
||||
#include <QPixmap>
|
||||
#include <QSet>
|
||||
|
||||
#include "core/scoped_ptr.h"
|
||||
#include "includes/scoped_ptr.h"
|
||||
#include "includes/shared_ptr.h"
|
||||
#include "core/song.h"
|
||||
#include "widgets/autoexpandingtreeview.h"
|
||||
|
||||
class QSortFilterProxyModel;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
class QContextMenuEvent;
|
||||
@@ -41,8 +43,20 @@ class QMouseEvent;
|
||||
class QPaintEvent;
|
||||
class QKeyEvent;
|
||||
|
||||
class Application;
|
||||
class TaskManager;
|
||||
class TagReaderClient;
|
||||
class NetworkAccessManager;
|
||||
class CollectionLibrary;
|
||||
class CollectionBackend;
|
||||
class CollectionModel;
|
||||
class CollectionFilter;
|
||||
class CollectionFilterWidget;
|
||||
class DeviceManager;
|
||||
class StreamingServices;
|
||||
class AlbumCoverLoader;
|
||||
class CurrentAlbumCoverLoader;
|
||||
class CoverProviders;
|
||||
class LyricsProviders;
|
||||
class EditTagDialog;
|
||||
class OrganizeDialog;
|
||||
|
||||
@@ -57,8 +71,18 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
// Please note that the selection is recursive meaning that if for example an album is selected this will return all of it's songs.
|
||||
SongList GetSelectedSongs() const;
|
||||
|
||||
void SetApplication(Application *app);
|
||||
void SetFilter(CollectionFilterWidget *filter);
|
||||
void Init(const SharedPtr<TaskManager> task_manager,
|
||||
const SharedPtr<TagReaderClient> tagreader_client,
|
||||
const SharedPtr<NetworkAccessManager> network,
|
||||
const SharedPtr<AlbumCoverLoader> albumcover_loader,
|
||||
const SharedPtr<CurrentAlbumCoverLoader> current_albumcover_loader,
|
||||
const SharedPtr<CoverProviders> cover_providers,
|
||||
const SharedPtr<LyricsProviders> lyrics_providers,
|
||||
const SharedPtr<CollectionLibrary> collection,
|
||||
const SharedPtr<DeviceManager> device_manager,
|
||||
const SharedPtr<StreamingServices> streaming_services);
|
||||
|
||||
void SetFilterWidget(CollectionFilterWidget *filter_widget);
|
||||
|
||||
// QTreeView
|
||||
void keyboardSearch(const QString &search) override;
|
||||
@@ -82,7 +106,7 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
void EditTagError(const QString &message);
|
||||
|
||||
Q_SIGNALS:
|
||||
void ShowConfigDialog();
|
||||
void ShowSettingsDialog();
|
||||
|
||||
void TotalSongCountUpdated_();
|
||||
void TotalArtistCountUpdated_();
|
||||
@@ -120,8 +144,21 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
void SaveContainerPath(const QModelIndex &child);
|
||||
|
||||
private:
|
||||
Application *app_;
|
||||
CollectionFilterWidget *filter_;
|
||||
SharedPtr<TaskManager> task_manager_;
|
||||
SharedPtr<TagReaderClient> tagreader_client_;
|
||||
SharedPtr<NetworkAccessManager> network_;
|
||||
SharedPtr<DeviceManager> device_manager_;
|
||||
SharedPtr<AlbumCoverLoader> albumcover_loader_;
|
||||
SharedPtr<CurrentAlbumCoverLoader> current_albumcover_loader_;
|
||||
SharedPtr<CollectionLibrary> collection_;
|
||||
SharedPtr<CoverProviders> cover_providers_;
|
||||
SharedPtr<LyricsProviders> lyrics_providers_;
|
||||
SharedPtr<StreamingServices> streaming_services_;
|
||||
|
||||
SharedPtr<CollectionBackend> backend_;
|
||||
CollectionModel *model_;
|
||||
CollectionFilter *filter_;
|
||||
CollectionFilterWidget *filter_widget_;
|
||||
|
||||
int total_song_count_;
|
||||
int total_artist_count_;
|
||||
|
||||
Reference in New Issue
Block a user