Refactoring
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "core/song.h"
|
||||
#include "covermanager/albumcoverloaderresult.h"
|
||||
#include "settings/appearancesettingspage.h"
|
||||
#include "constants/appearancesettings.h"
|
||||
#include "playlist.h"
|
||||
|
||||
class QWidget;
|
||||
@@ -66,13 +66,19 @@ class QMouseEvent;
|
||||
class QPaintEvent;
|
||||
class QTimerEvent;
|
||||
|
||||
class Application;
|
||||
class Player;
|
||||
class CollectionBackend;
|
||||
class PlaylistManager;
|
||||
class CurrentAlbumCoverLoader;
|
||||
class PlaylistHeader;
|
||||
class PlaylistProxyStyle;
|
||||
class DynamicPlaylistControls;
|
||||
class RatingItemDelegate;
|
||||
|
||||
#ifdef HAVE_MOODBAR
|
||||
class MoodbarLoader;
|
||||
#endif
|
||||
|
||||
class PlaylistView : public QTreeView {
|
||||
Q_OBJECT
|
||||
|
||||
@@ -82,7 +88,14 @@ class PlaylistView : public QTreeView {
|
||||
|
||||
static ColumnAlignmentMap DefaultColumnAlignment();
|
||||
|
||||
void Init(Application *app);
|
||||
void Init(const SharedPtr<Player> player,
|
||||
const SharedPtr<PlaylistManager> playlist_manager,
|
||||
const SharedPtr<CollectionBackend> collection_backend,
|
||||
#ifdef HAVE_MOODBAR
|
||||
const SharedPtr<MoodbarLoader> moodbar_loader,
|
||||
#endif
|
||||
const SharedPtr<CurrentAlbumCoverLoader> current_albumcover_loader);
|
||||
|
||||
void SetItemDelegates();
|
||||
void SetPlaylist(Playlist *playlist);
|
||||
void RemoveSelected();
|
||||
@@ -90,7 +103,7 @@ class PlaylistView : public QTreeView {
|
||||
void SetReadOnlySettings(const bool read_only) { read_only_settings_ = read_only; }
|
||||
|
||||
Playlist *playlist() const { return playlist_; }
|
||||
AppearanceSettingsPage::BackgroundImageType background_image_type() const { return background_image_type_; }
|
||||
AppearanceSettings::BackgroundImageType background_image_type() const { return background_image_type_; }
|
||||
Qt::Alignment column_alignment(int section) const;
|
||||
|
||||
void ResetHeaderState();
|
||||
@@ -175,7 +188,7 @@ class PlaylistView : public QTreeView {
|
||||
void LoadTinyPlayPausePixmaps(const int desired_size);
|
||||
void UpdateCachedCurrentRowPixmap(QStyleOptionViewItem option, const QModelIndex &idx);
|
||||
|
||||
void set_background_image_type(AppearanceSettingsPage::BackgroundImageType bg) {
|
||||
void set_background_image_type(AppearanceSettings::BackgroundImageType bg) {
|
||||
background_image_type_ = bg;
|
||||
Q_EMIT BackgroundPropertyChanged(); // clazy:exclude=incorrect-emit
|
||||
}
|
||||
@@ -192,15 +205,22 @@ class PlaylistView : public QTreeView {
|
||||
|
||||
void RepositionDynamicControls();
|
||||
|
||||
Application *app_;
|
||||
SharedPtr<Player> player_;
|
||||
SharedPtr<PlaylistManager> playlist_manager_;
|
||||
SharedPtr<CollectionBackend> collection_backend_;
|
||||
SharedPtr<CurrentAlbumCoverLoader> current_albumcover_loader_;
|
||||
#ifdef HAVE_MOODBAR
|
||||
SharedPtr<MoodbarLoader> moodbar_loader_;
|
||||
#endif
|
||||
|
||||
PlaylistProxyStyle *style_;
|
||||
Playlist *playlist_;
|
||||
PlaylistHeader *header_;
|
||||
|
||||
qreal device_pixel_ratio_;
|
||||
AppearanceSettingsPage::BackgroundImageType background_image_type_;
|
||||
AppearanceSettings::BackgroundImageType background_image_type_;
|
||||
QString background_image_filename_;
|
||||
AppearanceSettingsPage::BackgroundImagePosition background_image_position_;
|
||||
AppearanceSettings::BackgroundImagePosition background_image_position_;
|
||||
int background_image_maxsize_;
|
||||
bool background_image_stretch_;
|
||||
bool background_image_do_not_cut_;
|
||||
|
||||
Reference in New Issue
Block a user