diff --git a/res/skins/Deere/library.xml b/res/skins/Deere/library.xml index 923f06cb50e6..fefcee7ac6ff 100644 --- a/res/skins/Deere/library.xml +++ b/res/skins/Deere/library.xml @@ -71,6 +71,7 @@ false + 0.125 diff --git a/res/skins/LateNight/library.xml b/res/skins/LateNight/library.xml index 64f2615c5f84..5aa0788c4fad 100644 --- a/res/skins/LateNight/library.xml +++ b/res/skins/LateNight/library.xml @@ -74,6 +74,7 @@ #585858 #eece33 false + 0.125 diff --git a/res/skins/Shade/skin.xml b/res/skins/Shade/skin.xml index 3ced0911fd62..9a94e72d179f 100644 --- a/res/skins/Shade/skin.xml +++ b/res/skins/Shade/skin.xml @@ -251,7 +251,7 @@ Above the maximized library there are minimal decks which contain overview waveforms. For the end-of-track warning in those overviews to work instances of scrolling waveforms are required. We load in the maximzed library view, as well, but they are invisible as - they are 0px tall. + they are 0px tall. ############################################################################################ ############################################################################################ --> @@ -296,6 +296,7 @@ false + 0.125 diff --git a/res/skins/Tango/library.xml b/res/skins/Tango/library.xml index a5eae792f7d1..fb938b790238 100644 --- a/res/skins/Tango/library.xml +++ b/res/skins/Tango/library.xml @@ -115,6 +115,7 @@ Description: #585858 #eece33 false + 0.125 diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 8cd5a0dbb72f..f8992625ea15 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -122,8 +122,7 @@ void AutoDJFeature::bindLibraryWidget( m_pConfig, m_pLibrary, m_pAutoDJProcessor, - keyboard, - libraryWidget->getShowButtonText()); + keyboard); libraryWidget->registerView(kViewName, m_pAutoDJView); connect(m_pAutoDJView, &DlgAutoDJ::loadTrack, diff --git a/src/library/autodj/dlgautodj.cpp b/src/library/autodj/dlgautodj.cpp index 97305e08acb4..f3227031f0b1 100644 --- a/src/library/autodj/dlgautodj.cpp +++ b/src/library/autodj/dlgautodj.cpp @@ -7,6 +7,7 @@ #include "util/assert.h" #include "util/compatibility.h" #include "util/duration.h" +#include "widget/wlibrary.h" #include "widget/wtracktableview.h" namespace { @@ -15,19 +16,20 @@ const char* kRepeatPlaylistPreference = "Requeue"; } // anonymous namespace DlgAutoDJ::DlgAutoDJ( - QWidget* parent, + WLibrary* parent, UserSettingsPointer pConfig, Library* pLibrary, AutoDJProcessor* pProcessor, - KeyboardEventFilter* pKeyboard, - bool showButtonText) + KeyboardEventFilter* pKeyboard) : QWidget(parent), Ui::DlgAutoDJ(), m_pConfig(pConfig), m_pAutoDJProcessor(pProcessor), m_pTrackTableView(new WTrackTableView(this, m_pConfig, - pLibrary->trackCollections(), /*no sorting*/ false)), - m_bShowButtonText(showButtonText), + pLibrary->trackCollections(), + parent->getTrackTableBackgroundColorOpacity(), + /*no sorting*/ false)), + m_bShowButtonText(parent->getShowButtonText()), m_pAutoDJTableModel(nullptr) { setupUi(this); diff --git a/src/library/autodj/dlgautodj.h b/src/library/autodj/dlgautodj.h index 5a0d2f95b2dd..a9b96daef6e2 100644 --- a/src/library/autodj/dlgautodj.h +++ b/src/library/autodj/dlgautodj.h @@ -14,17 +14,17 @@ #include "controllers/keyboard/keyboardeventfilter.h" class PlaylistTableModel; +class WLibrary; class WTrackTableView; class DlgAutoDJ : public QWidget, public Ui::DlgAutoDJ, public LibraryView { Q_OBJECT public: - DlgAutoDJ(QWidget* parent, + DlgAutoDJ(WLibrary* parent, UserSettingsPointer pConfig, Library* pLibrary, AutoDJProcessor* pProcessor, - KeyboardEventFilter* pKeyboard, - bool showButtonText); + KeyboardEventFilter* pKeyboard); ~DlgAutoDJ() override; void onShow() override; diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index ee92114ae146..688887db738f 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -15,7 +15,8 @@ #include "util/assert.h" #include "util/compatibility.h" #include "util/logger.h" -#include "widget/wlibrarytableview.h" +#include "widget/wlibrary.h" +#include "widget/wtracktableview.h" namespace { @@ -23,9 +24,6 @@ const mixxx::Logger kLogger("BaseTrackTableModel"); const QString kEmptyString = QStringLiteral(""); -// Alpha value for row color background (range 0 - 255) -constexpr int kTrackColorRowBackgroundOpacity = 0x20; // 12.5% opacity - const QStringList kDefaultTableColumns = { LIBRARYTABLE_ALBUM, LIBRARYTABLE_ALBUMARTIST, @@ -98,7 +96,8 @@ BaseTrackTableModel::BaseTrackTableModel( cloneDatabase(pTrackCollectionManager), settingsNamespace), m_pTrackCollectionManager(pTrackCollectionManager), - m_previewDeckGroup(PlayerManager::groupForPreviewDeck(0)) { + m_previewDeckGroup(PlayerManager::groupForPreviewDeck(0)), + m_backgroundColorOpacity(WLibrary::kDefaultTrackTableBackgroundColorOpacity) { connect(&pTrackCollectionManager->internalCollection()->getTrackDAO(), &TrackDAO::forceModelUpdate, this, @@ -356,10 +355,11 @@ bool BaseTrackTableModel::isColumnHiddenByDefault( QAbstractItemDelegate* BaseTrackTableModel::delegateForColumn( const int index, QObject* pParent) { - auto* pTableView = qobject_cast(pParent); + auto* pTableView = qobject_cast(pParent); VERIFY_OR_DEBUG_ASSERT(pTableView) { return nullptr; } + m_backgroundColorOpacity = pTableView->getBackgroundColorOpacity(); if (index == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_RATING)) { return new StarDelegate(pTableView); } else if (index == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM)) { @@ -411,7 +411,9 @@ QVariant BaseTrackTableModel::data( } auto bgColor = mixxx::RgbColor::toQColor(trackColor); DEBUG_ASSERT(bgColor.isValid()); - bgColor.setAlpha(kTrackColorRowBackgroundOpacity); + DEBUG_ASSERT(m_backgroundColorOpacity >= 0.0); + DEBUG_ASSERT(m_backgroundColorOpacity <= 1.0); + bgColor.setAlphaF(m_backgroundColorOpacity); return QBrush(bgColor); } diff --git a/src/library/basetracktablemodel.h b/src/library/basetracktablemodel.h index 16aeff967fb6..9228edd2be03 100644 --- a/src/library/basetracktablemodel.h +++ b/src/library/basetracktablemodel.h @@ -10,6 +10,7 @@ class BaseCoverArtDelegate; class TrackCollectionManager; +class WLibraryTableView; class BaseTrackTableModel : public QAbstractTableModel, public TrackModel { Q_OBJECT @@ -19,7 +20,7 @@ class BaseTrackTableModel : public QAbstractTableModel, public TrackModel { explicit BaseTrackTableModel( const char* settingsNamespace, TrackCollectionManager* const pTrackCollectionManager, - QObject* parent = nullptr); + QObject* parent); ~BaseTrackTableModel() override = default; /////////////////////////////////////////////////////// @@ -200,6 +201,8 @@ class BaseTrackTableModel : public QAbstractTableModel, public TrackModel { const QString m_previewDeckGroup; + double m_backgroundColorOpacity; + ColumnCache m_columnCache; struct ColumnHeader { diff --git a/src/library/dlganalysis.cpp b/src/library/dlganalysis.cpp index 1a9796d4e1a7..01007b8ccc50 100644 --- a/src/library/dlganalysis.cpp +++ b/src/library/dlganalysis.cpp @@ -8,9 +8,10 @@ #include "library/trackcollectionmanager.h" #include "library/dlganalysis.h" #include "library/library.h" +#include "widget/wlibrary.h" #include "util/assert.h" -DlgAnalysis::DlgAnalysis(QWidget* parent, +DlgAnalysis::DlgAnalysis(WLibrary* parent, UserSettingsPointer pConfig, Library* pLibrary) : QWidget(parent), @@ -20,7 +21,11 @@ DlgAnalysis::DlgAnalysis(QWidget* parent, m_songsButtonGroup.addButton(radioButtonRecentlyAdded); m_songsButtonGroup.addButton(radioButtonAllSongs); - m_pAnalysisLibraryTableView = new WAnalysisLibraryTableView(this, pConfig, pLibrary->trackCollections()); + m_pAnalysisLibraryTableView = new WAnalysisLibraryTableView( + this, + pConfig, + pLibrary->trackCollections(), + parent->getTrackTableBackgroundColorOpacity()); connect(m_pAnalysisLibraryTableView, &WAnalysisLibraryTableView::loadTrack, this, diff --git a/src/library/dlganalysis.h b/src/library/dlganalysis.h index 2c0b7cba0825..1aacad7478bb 100644 --- a/src/library/dlganalysis.h +++ b/src/library/dlganalysis.h @@ -13,11 +13,12 @@ class AnalysisLibraryTableModel; class WAnalysisLibraryTableView; class Library; +class WLibrary; class DlgAnalysis : public QWidget, public Ui::DlgAnalysis, public virtual LibraryView { Q_OBJECT public: - DlgAnalysis(QWidget *parent, + DlgAnalysis(WLibrary *parent, UserSettingsPointer pConfig, Library* pLibrary); ~DlgAnalysis() override = default; diff --git a/src/library/dlghidden.cpp b/src/library/dlghidden.cpp index ffacd58f51ca..77dfcd94e907 100644 --- a/src/library/dlghidden.cpp +++ b/src/library/dlghidden.cpp @@ -2,16 +2,24 @@ #include "library/hiddentablemodel.h" #include "library/trackcollectionmanager.h" +#include "widget/wlibrary.h" #include "widget/wtracktableview.h" #include "util/assert.h" -DlgHidden::DlgHidden(QWidget* parent, UserSettingsPointer pConfig, - Library* pLibrary, - KeyboardEventFilter* pKeyboard) - : QWidget(parent), - Ui::DlgHidden(), - m_pTrackTableView( - new WTrackTableView(this, pConfig, pLibrary->trackCollections(), false)) { +DlgHidden::DlgHidden( + WLibrary* parent, + UserSettingsPointer pConfig, + Library* pLibrary, + KeyboardEventFilter* pKeyboard) + : QWidget(parent), + Ui::DlgHidden(), + m_pTrackTableView( + new WTrackTableView( + this, + pConfig, + pLibrary->trackCollections(), + parent->getTrackTableBackgroundColorOpacity(), + false)) { setupUi(this); m_pTrackTableView->installEventFilter(pKeyboard); diff --git a/src/library/dlghidden.h b/src/library/dlghidden.h index 37ae3c0340d2..4163fed8458a 100644 --- a/src/library/dlghidden.h +++ b/src/library/dlghidden.h @@ -8,6 +8,7 @@ #include "library/libraryview.h" #include "controllers/keyboard/keyboardeventfilter.h" +class WLibrary; class WTrackTableView; class HiddenTableModel; class QItemSelection; @@ -16,7 +17,7 @@ class DlgHidden : public QWidget, public Ui::DlgHidden, public LibraryView { Q_OBJECT public: - DlgHidden(QWidget* parent, UserSettingsPointer pConfig, + DlgHidden(WLibrary* parent, UserSettingsPointer pConfig, Library* pLibrary, KeyboardEventFilter* pKeyboard); ~DlgHidden() override; diff --git a/src/library/dlgmissing.cpp b/src/library/dlgmissing.cpp index 8126edd55dc8..d2d1240f3e9c 100644 --- a/src/library/dlgmissing.cpp +++ b/src/library/dlgmissing.cpp @@ -2,16 +2,24 @@ #include "library/missingtablemodel.h" #include "library/trackcollectionmanager.h" +#include "widget/wlibrary.h" #include "widget/wtracktableview.h" #include "util/assert.h" -DlgMissing::DlgMissing(QWidget* parent, UserSettingsPointer pConfig, - Library* pLibrary, - KeyboardEventFilter* pKeyboard) - : QWidget(parent), - Ui::DlgMissing(), - m_pTrackTableView( - new WTrackTableView(this, pConfig, pLibrary->trackCollections(), false)) { +DlgMissing::DlgMissing( + WLibrary* parent, + UserSettingsPointer pConfig, + Library* pLibrary, + KeyboardEventFilter* pKeyboard) + : QWidget(parent), + Ui::DlgMissing(), + m_pTrackTableView( + new WTrackTableView( + this, + pConfig, + pLibrary->trackCollections(), + parent->getTrackTableBackgroundColorOpacity(), + false)) { setupUi(this); m_pTrackTableView->installEventFilter(pKeyboard); diff --git a/src/library/dlgmissing.h b/src/library/dlgmissing.h index cedb9a77a443..9fd5985eec30 100644 --- a/src/library/dlgmissing.h +++ b/src/library/dlgmissing.h @@ -8,6 +8,7 @@ #include "library/libraryview.h" #include "controllers/keyboard/keyboardeventfilter.h" +class WLibrary; class WTrackTableView; class MissingTableModel; @@ -15,7 +16,7 @@ class DlgMissing : public QWidget, public Ui::DlgMissing, public LibraryView { Q_OBJECT public: - DlgMissing(QWidget* parent, UserSettingsPointer pConfig, + DlgMissing(WLibrary* parent, UserSettingsPointer pConfig, Library* pLibrary, KeyboardEventFilter* pKeyboard); ~DlgMissing() override; diff --git a/src/library/library.cpp b/src/library/library.cpp index 0c08e7df980a..d98c33d8f495 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -295,6 +295,7 @@ void Library::bindLibraryWidget(WLibrary* pLibraryWidget, pLibraryWidget, m_pConfig, m_pTrackCollectionManager, + pLibraryWidget->getTrackTableBackgroundColorOpacity(), true); pTrackTableView->installEventFilter(pKeyboard); connect(this, diff --git a/src/library/recording/dlgrecording.cpp b/src/library/recording/dlgrecording.cpp index 1b833d3c752e..763528dfcde5 100644 --- a/src/library/recording/dlgrecording.cpp +++ b/src/library/recording/dlgrecording.cpp @@ -5,15 +5,25 @@ #include "library/trackcollectionmanager.h" #include "widget/wwidget.h" #include "widget/wskincolor.h" +#include "widget/wlibrary.h" #include "widget/wtracktableview.h" #include "util/assert.h" -DlgRecording::DlgRecording(QWidget* parent, UserSettingsPointer pConfig, - Library* pLibrary, - RecordingManager* pRecordingManager, KeyboardEventFilter* pKeyboard) +DlgRecording::DlgRecording( + WLibrary* parent, + UserSettingsPointer pConfig, + Library* pLibrary, + RecordingManager* pRecordingManager, + KeyboardEventFilter* pKeyboard) : QWidget(parent), m_pConfig(pConfig), - m_pTrackTableView(new WTrackTableView(this, pConfig, pLibrary->trackCollections(), true)), + m_pTrackTableView( + new WTrackTableView( + this, + pConfig, + pLibrary->trackCollections(), + parent->getTrackTableBackgroundColorOpacity(), + true)), m_browseModel(this, pLibrary->trackCollections(), pRecordingManager), m_proxyModel(&m_browseModel), m_bytesRecordedStr("--"), diff --git a/src/library/recording/dlgrecording.h b/src/library/recording/dlgrecording.h index fc9045e8e4a0..3cb73a86e9c0 100644 --- a/src/library/recording/dlgrecording.h +++ b/src/library/recording/dlgrecording.h @@ -14,12 +14,13 @@ class PlaylistTableModel; class QSqlTableModel; +class WLibrary; class WTrackTableView; class DlgRecording : public QWidget, public Ui::DlgRecording, public virtual LibraryView { Q_OBJECT public: - DlgRecording(QWidget *parent, UserSettingsPointer pConfig, + DlgRecording(WLibrary *parent, UserSettingsPointer pConfig, Library* pLibrary, RecordingManager* pRecManager, KeyboardEventFilter* pKeyboard); ~DlgRecording() override; diff --git a/src/skin/skincontext.h b/src/skin/skincontext.h index 2095e26dcaf2..9cd85a6ee2cc 100644 --- a/src/skin/skincontext.h +++ b/src/skin/skincontext.h @@ -101,16 +101,16 @@ class SkinContext { return nodeToString(child); } - inline float selectFloat(const QDomNode& node, const QString& nodeName) const { + inline float selectFloat(const QDomNode& node, const QString& nodeName, float defaultValue = 0.0) const { bool ok = false; float conv = nodeToString(selectElement(node, nodeName)).toFloat(&ok); - return ok ? conv : 0.0f; + return ok ? conv : defaultValue; } - inline double selectDouble(const QDomNode& node, const QString& nodeName) const { + inline double selectDouble(const QDomNode& node, const QString& nodeName, double defaultValue = 0.0) const { bool ok = false; double conv = nodeToString(selectElement(node, nodeName)).toDouble(&ok); - return ok ? conv : 0.0; + return ok ? conv : defaultValue; } inline int selectInt(const QDomNode& node, const QString& nodeName, diff --git a/src/widget/wanalysislibrarytableview.cpp b/src/widget/wanalysislibrarytableview.cpp index 92719475f243..08d7af63de4f 100644 --- a/src/widget/wanalysislibrarytableview.cpp +++ b/src/widget/wanalysislibrarytableview.cpp @@ -1,10 +1,16 @@ #include "library/trackcollection.h" #include "widget/wanalysislibrarytableview.h" -WAnalysisLibraryTableView::WAnalysisLibraryTableView(QWidget* parent, - UserSettingsPointer pConfig, - TrackCollectionManager* pTrackCollectionManager) - : WTrackTableView(parent, pConfig, pTrackCollectionManager, true) { +WAnalysisLibraryTableView::WAnalysisLibraryTableView( + QWidget* parent, + UserSettingsPointer pConfig, + TrackCollectionManager* pTrackCollectionManager, + double trackTableBackgroundColorOpacity) + : WTrackTableView(parent, + pConfig, + pTrackCollectionManager, + trackTableBackgroundColorOpacity, + true) { setDragDropMode(QAbstractItemView::DragOnly); setDragEnabled(true); //Always enable drag for now (until we have a model that doesn't support this.) } diff --git a/src/widget/wanalysislibrarytableview.h b/src/widget/wanalysislibrarytableview.h index a4012b09521f..c3733b8abbaf 100644 --- a/src/widget/wanalysislibrarytableview.h +++ b/src/widget/wanalysislibrarytableview.h @@ -6,13 +6,15 @@ #include "preferences/usersettings.h" #include "widget/wtracktableview.h" -class WAnalysisLibraryTableView : public WTrackTableView -{ - public: - WAnalysisLibraryTableView(QWidget* parent, UserSettingsPointer pConfig, - TrackCollectionManager* pTrackCollectionManager); +class WAnalysisLibraryTableView : public WTrackTableView { + public: + WAnalysisLibraryTableView( + QWidget* parent, + UserSettingsPointer pConfig, + TrackCollectionManager* pTrackCollectionManager, + double trackTableBackgroundColorOpacity); - void onSearch(const QString& text) override; + void onSearch(const QString& text) override; }; #endif diff --git a/src/widget/wlibrary.cpp b/src/widget/wlibrary.cpp index 0fb9b7802737..8e10fe512b13 100644 --- a/src/widget/wlibrary.cpp +++ b/src/widget/wlibrary.cpp @@ -7,17 +7,30 @@ #include "widget/wlibrary.h" #include "library/libraryview.h" #include "controllers/keyboard/keyboardeventfilter.h" -#include "wtracktableview.h" +#include "widget/wtracktableview.h" +#include "util/math.h" WLibrary::WLibrary(QWidget* parent) : QStackedWidget(parent), WBaseWidget(this), m_mutex(QMutex::Recursive), + m_trackTableBackgroundColorOpacity(kDefaultTrackTableBackgroundColorOpacity), m_bShowButtonText(true) { } void WLibrary::setup(const QDomNode& node, const SkinContext& context) { - m_bShowButtonText = context.selectBool(node, "ShowButtonText", true); + m_bShowButtonText = + context.selectBool( + node, + "ShowButtonText", + true); + m_trackTableBackgroundColorOpacity = math_clamp( + context.selectDouble( + node, + "TrackTableBackgroundColorOpacity", + kDefaultTrackTableBackgroundColorOpacity), + kMinTrackTableBackgroundColorOpacity, + kMaxTrackTableBackgroundColorOpacity); } bool WLibrary::registerView(QString name, QWidget* view) { diff --git a/src/widget/wlibrary.h b/src/widget/wlibrary.h index b7d1ad6dcb3c..5c6a4fad7ec9 100644 --- a/src/widget/wlibrary.h +++ b/src/widget/wlibrary.h @@ -1,8 +1,4 @@ -// wlibrary.h -// Created 8/28/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef WLIBRARY_H -#define WLIBRARY_H +#pragma once #include #include @@ -33,6 +29,15 @@ class WLibrary : public QStackedWidget, public WBaseWidget { LibraryView* getActiveView() const; + // Alpha value for row color background + static constexpr double kDefaultTrackTableBackgroundColorOpacity = 0.125; // 12.5% opacity + static constexpr double kMinTrackTableBackgroundColorOpacity = 0.0; // 0% opacity + static constexpr double kMaxTrackTableBackgroundColorOpacity = 1.0; // 100% opacity + + double getTrackTableBackgroundColorOpacity() const { + return m_trackTableBackgroundColorOpacity; + } + bool getShowButtonText() const { return m_bShowButtonText; } @@ -51,8 +56,6 @@ class WLibrary : public QStackedWidget, public WBaseWidget { private: QMutex m_mutex; QMap m_viewMap; + double m_trackTableBackgroundColorOpacity; bool m_bShowButtonText; }; - -#endif /* WLIBRARY_H */ - diff --git a/src/widget/wlibrarytableview.h b/src/widget/wlibrarytableview.h index ad142ef194e9..57601488e676 100644 --- a/src/widget/wlibrarytableview.h +++ b/src/widget/wlibrarytableview.h @@ -59,10 +59,11 @@ class WLibraryTableView : public QTableView, public virtual LibraryView { void loadVScrollBarPosState(); void saveVScrollBarPosState(); + const UserSettingsPointer m_pConfig; + const ConfigKey m_vScrollBarPosKey; + QMap m_vScrollBarPosValues; - UserSettingsPointer m_pConfig; - ConfigKey m_vScrollBarPosKey; // The position of the vertical scrollbar slider, eg. before a search is // executed int m_noSearchVScrollBarPos; diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index b3e581d60660..04c692f1b9b1 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -41,15 +41,17 @@ #include "widget/wtracktableviewheader.h" #include "widget/wwidget.h" -WTrackTableView::WTrackTableView(QWidget * parent, +WTrackTableView::WTrackTableView(QWidget* parent, UserSettingsPointer pConfig, TrackCollectionManager* pTrackCollectionManager, + double backgroundColorOpacity, bool sorting) : WLibraryTableView(parent, pConfig, ConfigKey(LIBRARY_CONFIGVALUE, WTRACKTABLEVIEW_VSCROLLBARPOS_KEY)), m_pConfig(pConfig), m_pTrackCollectionManager(pTrackCollectionManager), + m_backgroundColorOpacity(backgroundColorOpacity), m_sorting(sorting), m_iCoverSourceColumn(-1), m_iCoverTypeColumn(-1), diff --git a/src/widget/wtracktableview.h b/src/widget/wtracktableview.h index fd6beae9d6ae..e842473ced23 100644 --- a/src/widget/wtracktableview.h +++ b/src/widget/wtracktableview.h @@ -32,6 +32,7 @@ class WTrackTableView : public WLibraryTableView { QWidget* parent, UserSettingsPointer pConfig, TrackCollectionManager* pTrackCollectionManager, + double backgroundColorOpacity, bool sorting); ~WTrackTableView() override; void contextMenuEvent(QContextMenuEvent * event) override; @@ -46,6 +47,10 @@ class WTrackTableView : public WLibraryTableView { void saveCurrentVScrollBarPos(); void restoreCurrentVScrollBarPos(); + double getBackgroundColorOpacity() const { + return m_backgroundColorOpacity; + } + public slots: void loadTrackModel(QAbstractItemModel* model); void slotMouseDoubleClicked(const QModelIndex &); @@ -133,6 +138,8 @@ class WTrackTableView : public WLibraryTableView { TrackCollectionManager* const m_pTrackCollectionManager; + const double m_backgroundColorOpacity; + QScopedPointer m_pTrackInfo; QScopedPointer m_pTagFetcher;