diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | build/depends.py | 1 | ||||
-rw-r--r-- | res/skins/Shade/deck.xml | 30 | ||||
-rw-r--r-- | src/skin/legacyskinparser.cpp | 68 | ||||
-rw-r--r-- | src/skin/legacyskinparser.h | 1 | ||||
-rw-r--r-- | src/test/cuecontrol_test.cpp | 6 | ||||
-rw-r--r-- | src/widget/wcoverart.cpp | 14 | ||||
-rw-r--r-- | src/widget/wcoverart.h | 5 | ||||
-rw-r--r-- | src/widget/wcoverartlabel.cpp | 17 | ||||
-rw-r--r-- | src/widget/wcoverartlabel.h | 1 | ||||
-rw-r--r-- | src/widget/wtrackproperty.cpp | 13 | ||||
-rw-r--r-- | src/widget/wtrackproperty.h | 4 | ||||
-rw-r--r-- | src/widget/wtracktableview.cpp | 1 | ||||
-rw-r--r-- | src/widget/wtracktext.cpp | 1 | ||||
-rw-r--r-- | src/widget/wtracktext.h | 4 | ||||
-rw-r--r-- | src/widget/wtrackwidgetgroup.cpp | 124 | ||||
-rw-r--r-- | src/widget/wtrackwidgetgroup.h | 51 |
17 files changed, 294 insertions, 48 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e4c0290f4..ad1eeed7a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -894,6 +894,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL src/widget/wtracktableview.cpp src/widget/wtracktableviewheader.cpp src/widget/wtracktext.cpp + src/widget/wtrackwidgetgroup.cpp src/widget/wvumeter.cpp src/widget/wwaveformviewer.cpp src/widget/wwidget.cpp diff --git a/build/depends.py b/build/depends.py index cbc8a7a88b..3e86495fe3 100644 --- a/build/depends.py +++ b/build/depends.py @@ -956,6 +956,7 @@ class MixxxCore(Feature): "src/widget/wbasewidget.cpp", "src/widget/wwidget.cpp", "src/widget/wwidgetgroup.cpp", + "src/widget/wtrackwidgetgroup.cpp", "src/widget/wwidgetstack.cpp", "src/widget/wsizeawarestack.cpp", "src/widget/wlabel.cpp", diff --git a/res/skins/Shade/deck.xml b/res/skins/Shade/deck.xml index d96d70f42f..24fe0df86e 100644 --- a/res/skins/Shade/deck.xml +++ b/res/skins/Shade/deck.xml @@ -34,13 +34,21 @@ <Size>40f,45f</Size> <BackPath>style/style_bg_deck_top_left.png</BackPath> <Children> - <CoverArt> + <TrackWidgetGroup> <Pos>2,7</Pos> - <TooltipId>coverart</TooltipId> - <ObjectName>DeckCoverArt</ObjectName> <Size>35f,35f</Size> <Group><Variable name="group"/></Group> - </CoverArt> + <TrackColorAlpha>200</TrackColorAlpha> + <Children> + <CoverArt> + <Pos>0,0</Pos> + <TooltipId>coverart</TooltipId> + <ObjectName>DeckCoverArt</ObjectName> + <Size>35f,35f</Size> + <Group><Variable name="group"/></Group> + </CoverArt> + </Children> + </TrackWidgetGroup> </Children> </WidgetGroup> <WidgetGroup> @@ -63,13 +71,19 @@ </Style> <Property>titleInfo</Property> <Channel><Variable name="channum"/></Channel> - <Size>0e,20f</Size> + <Size>0e,23f</Size> <Elide>right</Elide> </TrackProperty> + <TrackWidgetGroup> + <Size>0e,1f</Size> + <Group><Variable name="group"/></Group> + <TrackColorAlpha>255</TrackColorAlpha> + </TrackWidgetGroup> + <WidgetGroup> <ObjectName>ArtistAndTimeRow</ObjectName> - <Size>0e,20f</Size> + <Size>0e,19f</Size> <Layout>horizontal</Layout> <Children> <TrackProperty> @@ -81,7 +95,7 @@ color: #191F24; text-align: left; padding-left: 1px; - padding-top: 4px; + padding-top: 0px; } </Style> <Property>artist</Property> @@ -98,7 +112,7 @@ color: #191F24; text-align: right; padding-left: 1px; - padding-top: 4px; + padding-top: 0px; } </Style> <Group><Variable name="group"/></Group> diff --git a/src/skin/legacyskinparser.cpp b/src/skin/legacyskinparser.cpp index f6db4add2f..45417b4971 100644 --- a/src/skin/legacyskinparser.cpp +++ b/src/skin/legacyskinparser.cpp @@ -15,26 +15,21 @@ #include "control/controlobject.h" #include "control/controlproxy.h" - -#include "controllers/keyboard/keyboardeventfilter.h" -#include "mixer/playermanager.h" -#include "mixer/basetrackplayer.h" -#include "library/library.h" -#include "util/xml.h" #include "controllers/controllerlearningeventfilter.h" #include "controllers/controllermanager.h" - -#include "skin/colorschemeparser.h" -#include "skin/skincontext.h" -#include "skin/launchimage.h" - +#include "controllers/keyboard/keyboardeventfilter.h" #include "effects/effectsmanager.h" - +#include "library/library.h" +#include "mixer/basetrackplayer.h" +#include "mixer/playermanager.h" #include "recording/recordingmanager.h" - +#include "skin/colorschemeparser.h" +#include "skin/launchimage.h" +#include "skin/skincontext.h" #include "util/cmdlineargs.h" #include "util/timer.h" #include "util/valuetransformer.h" +#include "util/xml.h" #include "waveform/waveformwidgetfactory.h" #include "widget/controlwidgetconnection.h" #include "widget/wbasewidget.h" @@ -81,6 +76,7 @@ #include "widget/wtime.h" #include "widget/wtrackproperty.h" #include "widget/wtracktext.h" +#include "widget/wtrackwidgetgroup.h" #include "widget/wvumeter.h" #include "widget/wwaveformviewer.h" #include "widget/wwidget.h" @@ -549,6 +545,8 @@ QList<QWidget*> LegacySkinParser::parseNode(const QDomElement& node) { result = wrapWidget(parseSearchBox(node)); } else if (nodeName == "WidgetGroup") { result = wrapWidget(parseWidgetGroup(node)); + } else if (nodeName == "TrackWidgetGroup") { + result = wrapWidget(parseTrackWidgetGroup(node)); } else if (nodeName == "WidgetStack") { result = wrapWidget(parseWidgetStack(node)); } else if (nodeName == "SizeAwareStack") { @@ -1055,6 +1053,48 @@ QWidget* LegacySkinParser::parseTrackProperty(const QDomElement& node) { return p; } +QWidget* LegacySkinParser::parseTrackWidgetGroup(const QDomElement& node) { + QString group = lookupNodeGroup(node); + BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); + + if (!pPlayer) { + return nullptr; + } + + WTrackWidgetGroup* pGroup = new WTrackWidgetGroup( + m_pParent, + m_pConfig, + m_pLibrary->trackCollections(), + group); + commonWidgetSetup(node, pGroup); + pGroup->setup(node, *m_pContext); + pGroup->Init(); + parseChildren(node, pGroup); + + connect(pPlayer, + &BaseTrackPlayer::newTrackLoaded, + pGroup, + &WTrackWidgetGroup::slotTrackLoaded); + connect(pPlayer, + &BaseTrackPlayer::loadingTrack, + pGroup, + &WTrackWidgetGroup::slotLoadingTrack); + connect(pGroup, + &WTrackWidgetGroup::trackDropped, + m_pPlayerManager, + &PlayerManager::slotLoadToPlayer); + connect(pGroup, + &WTrackWidgetGroup::cloneDeck, + m_pPlayerManager, + &PlayerManager::slotCloneDeck); + + TrackPointer pTrack = pPlayer->getLoadedTrack(); + if (pTrack) { + pGroup->slotTrackLoaded(pTrack); + } + return pGroup; +} + QWidget* LegacySkinParser::parseStarRating(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); @@ -1079,8 +1119,6 @@ QWidget* LegacySkinParser::parseStarRating(const QDomElement& node) { return p; } - - QWidget* LegacySkinParser::parseNumberRate(const QDomElement& node) { QString group = lookupNodeGroup(node); QColor c(255,255,255); diff --git a/src/skin/legacyskinparser.h b/src/skin/legacyskinparser.h index e19951a762..5a4ab1fc40 100644 --- a/src/skin/legacyskinparser.h +++ b/src/skin/legacyskinparser.h @@ -95,6 +95,7 @@ class LegacySkinParser : public QObject, public SkinParser { // Grouping / layout. QWidget* parseWidgetGroup(const QDomElement& node); + QWidget* parseTrackWidgetGroup(const QDomElement& node); QWidget* parseWidgetStack(const QDomElement& node); QWidget* parseSizeAwareStack(const QDomElement& node); QWidget* parseSplitter(const QDomElement& node); diff --git a/src/test/cuecontrol_test.cpp b/src/test/cuecontrol_test.cpp index fa8d3b24dc..e945cb2884 100644 --- a/src/test/cuecontrol_test.cpp +++ b/src/test/cuecontrol_test.cpp @@ -289,12 +289,10 @@ TEST_F(CueControlTest, SeekOnLoadDefault_CueInPreroll) { config()->set(ConfigKey("[Controls]", "CueRecall"), ConfigValue(static_cast<int>(SeekOnLoadMode::MainCue))); TrackPointer pTrack = createTestTrack(); - pTrack->setCuePoint(CuePosition(-100.0)); - loadTrack(pTrack); - EXPECT_DOUBLE_EQ(-100.0, m_pCuePoint->get()); - EXPECT_DOUBLE_EQ(-100.0, getCurrentSample()); + EXPECT_DOUBLE_EQ(0.0, m_pCuePoint->get()); + EXPECT_DOUBLE_EQ(0.0, getCurrentSample()); // Move cue like silence analysis does and check if track is following it pTrack->setCuePoint(CuePosition(-200.0)); diff --git a/src/widget/wcoverart.cpp b/src/widget/wcoverart.cpp index add4f52c4a..803d090fa7 100644 --- a/src/widget/wcoverart.cpp +++ b/src/widget/wcoverart.cpp @@ -234,15 +234,21 @@ void WCoverArt::resizeEvent(QResizeEvent* /*unused*/) { m_defaultCoverScaled = scaledCoverArt(m_defaultCover); } +void WCoverArt::contextMenuEvent(QContextMenuEvent* event) { + event->accept(); + if (m_loadedTrack) { + m_pMenu->setCoverArt(m_lastRequestedCover); + m_pMenu->popup(event->globalPos()); + } +} + void WCoverArt::mousePressEvent(QMouseEvent* event) { if (!m_bEnable) { return; } - if (event->button() == Qt::RightButton && m_loadedTrack) { // show context-menu - m_pMenu->setCoverArt(m_lastRequestedCover); - m_pMenu->popup(event->globalPos()); - } else if (event->button() == Qt::LeftButton) { + if (event->button() == Qt::LeftButton) { + event->accept(); // do nothing if left button is pressed, // wait for button release m_clickTimer.setSingleShot(true); diff --git a/src/widget/wcoverart.h b/src/widget/wcoverart.h index bd295a6893..0bc34c23a1 100644 --- a/src/widget/wcoverart.h +++ b/src/widget/wcoverart.h @@ -51,8 +51,9 @@ class WCoverArt : public QWidget, public WBaseWidget, public TrackDropTarget { protected: void paintEvent(QPaintEvent* /*unused*/) override; void resizeEvent(QResizeEvent* /*unused*/) override; - void mousePressEvent(QMouseEvent* /*unused*/) override; - void mouseReleaseEvent(QMouseEvent* /*unused*/) override; + void mousePressEvent(QMouseEvent* event) override; + void mouseReleaseEvent(QMouseEvent* event) override; + void contextMenuEvent(QContextMenuEvent* event) override; void dragEnterEvent(QDragEnterEvent *event) override; void dropEvent(QDropEvent *event) override; diff --git a/src/widget/wcoverartlabel.cpp b/src/widget/wcoverartlabel.cpp index c7098b20f5..b923f78974 100644 --- a/src/widget/wcoverartlabel.cpp +++ b/src/widget/wcoverartlabel.cpp @@ -16,13 +16,11 @@ WCoverArtLabel::WCoverArtLabel(QWidget* parent) setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); setFrameShape(QFrame::Box); setAlignment(Qt::AlignCenter); - setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, SIGNAL(customContextMenuRequested(QPoint)), - this, SLOT(slotCoverMenu(QPoint))); - connect(m_pCoverMenu, SIGNAL(coverInfoSelected(const CoverInfoRelative&)), - this, SIGNAL(coverInfoSelected(const CoverInfoRelative&))); - connect(m_pCoverMenu, SIGNAL(reloadCoverArt()), - this, SIGNAL(reloadCoverArt())); + connect(m_pCoverMenu, + &WCoverArtMenu::coverInfoSelected, + this, + &WCoverArtLabel::coverInfoSelected); + connect(m_pCoverMenu, &WCoverArtMenu::reloadCoverArt, this, &WCoverArtLabel::reloadCoverArt); m_defaultCover.setDevicePixelRatio(getDevicePixelRatioF(this)); m_defaultCover = m_defaultCover.scaled(s_labelDisplaySize * getDevicePixelRatioF(this), @@ -64,6 +62,11 @@ void WCoverArtLabel::slotCoverMenu(const QPoint& pos) { m_pCoverMenu->popup(mapToGlobal(pos)); } +void WCoverArtLabel::contextMenuEvent(QContextMenuEvent* event) { + event->accept(); + m_pCoverMenu->popup(event->globalPos()); +} + void WCoverArtLabel::loadTrack(TrackPointer pTrack) { m_pLoadedTrack = pTrack; } diff --git a/src/widget/wcoverartlabel.h b/src/widget/wcoverartlabel.h index 9ae4528c5e..fc073ad4c8 100644 --- a/src/widget/wcoverartlabel.h +++ b/src/widget/wcoverartlabel.h @@ -26,6 +26,7 @@ class WCoverArtLabel : public QLabel { protected: void mousePressEvent(QMouseEvent* event) override; + void contextMenuEvent(QContextMenuEvent* event) override; private slots: void slotCoverMenu(const QPoint& pos); diff --git a/src/widget/wtrackproperty.cpp b/src/widget/wtrackproperty.cpp index 8508878e9c..16b3eb576b 100644 --- a/src/widget/wtrackproperty.cpp +++ b/src/widget/wtrackproperty.cpp @@ -7,7 +7,7 @@ #include "util/dnd.h" namespace { -const WTrackMenu::Features trackMenuFeatures = +const WTrackMenu::Features kTrackMenuFeatures = WTrackMenu::Feature::Playlist | WTrackMenu::Feature::Crate | WTrackMenu::Feature::Metadata | @@ -27,7 +27,7 @@ WTrackProperty::WTrackProperty( m_group(group), m_pConfig(pConfig), m_pTrackMenu(make_parented<WTrackMenu>( - this, pConfig, pTrackCollectionManager, trackMenuFeatures)) { + this, pConfig, pTrackCollectionManager, kTrackMenuFeatures)) { setAcceptDrops(true); } @@ -78,21 +78,22 @@ void WTrackProperty::updateLabel() { setText(""); } -void WTrackProperty::mouseMoveEvent(QMouseEvent *event) { +void WTrackProperty::mouseMoveEvent(QMouseEvent* event) { if ((event->buttons() & Qt::LeftButton) && m_pCurrentTrack) { DragAndDropHelper::dragTrack(m_pCurrentTrack, this, m_group); } } -void WTrackProperty::dragEnterEvent(QDragEnterEvent *event) { +void WTrackProperty::dragEnterEvent(QDragEnterEvent* event) { DragAndDropHelper::handleTrackDragEnterEvent(event, m_group, m_pConfig); } -void WTrackProperty::dropEvent(QDropEvent *event) { +void WTrackProperty::dropEvent(QDropEvent* event) { DragAndDropHelper::handleTrackDropEvent(event, *this, m_group, m_pConfig); } -void WTrackProperty::contextMenuEvent(QContextMenuEvent *event) { +void WTrackProperty::contextMenuEvent(QContextMenuEvent* event) { + event->accept(); if (m_pCurrentTrack) { m_pTrackMenu->loadTrack(m_pCurrentTrack); // Create the right-click menu diff --git a/src/widget/wtrackproperty.h b/src/widget/wtrackproperty.h index 8810ca5c3c..d3783173b9 100644 --- a/src/widget/wtrackproperty.h +++ b/src/widget/wtrackproperty.h @@ -34,9 +34,11 @@ signals: void slotTrackLoaded(TrackPointer track); void slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack); + protected: + void contextMenuEvent(QContextMenuEvent* event) override; + private slots: void slotTrackChanged(TrackId); - void contextMenuEvent(QContextMenuEvent* event) override; private: void dragEnterEvent(QDragEnterEvent *event) override; diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index 628a2c29d4..91abff393e 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -430,6 +430,7 @@ void WTrackTableView::contextMenuEvent(QContextMenuEvent* event) { VERIFY_OR_DEBUG_ASSERT(m_pTrackMenu.get()) { initTrackMenu(); } + event->accept(); // Update track indices in context menu QModelIndexList indices = selectionModel()->selectedRows(); m_pTrackMenu->loadTrackModelIndices(indices); diff --git a/src/widget/wtracktext.cpp b/src/widget/wtracktext.cpp index f553a595f4..2c0626641d 100644 --- a/src/widget/wtracktext.cpp +++ b/src/widget/wtracktext.cpp @@ -84,6 +84,7 @@ void WTrackText::dropEvent(QDropEvent *event) { } void WTrackText::contextMenuEvent(QContextMenuEvent* event) { + event->accept(); if (m_pCurrentTrack) { m_pTrackMenu->loadTrack(m_pCurrentTrack); // Create the right-click menu diff --git a/src/widget/wtracktext.h b/src/widget/wtracktext.h index 04521bf3b1..87bafaecf7 100644 --- a/src/widget/wtracktext.h +++ b/src/widget/wtracktext.h @@ -31,9 +31,11 @@ class WTrackText : public WLabel, public TrackDropTarget { void slotTrackLoaded(TrackPointer track); void slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack); + protected: + void contextMenuEvent(QContextMenuEvent* event) override; + private slots: void slotTrackChanged(TrackId); - void contextMenuEvent(QContextMenuEvent* event) override; private: void dragEnterEvent(QDragEnterEvent *event) override; diff --git a/src/widget/wtrackwidgetgroup.cpp b/src/widget/wtrackwidgetgroup.cpp new file mode 100644 index 0000000000..359157fe47 --- /dev/null +++ b/src/widget/wtrackwidgetgroup.cpp @@ -0,0 +1,124 @@ + +#include "widget/wtrackwidgetgroup.h" + +#include <QDebug> +#include <QStylePainter> +#include <QUrl> + +#include "control/controlobject.h" +#include "util/dnd.h" +#include "widget/wtrackmenu.h" + +namespace { + +int kDefaultTrackColorAplha = 255; + +const WTrackMenu::Features kTrackMenuFeatures = + WTrackMenu::Feature::Playlist | + WTrackMenu::Feature::Crate | + WTrackMenu::Feature::Metadata | + WTrackMenu::Feature::Reset | + WTrackMenu::Feature::BPM | + WTrackMenu::Feature::Color | + WTrackMenu::Feature::FileBrowser | + WTrackMenu::Feature::Properties; + +} // anonymous namespace + +WTrackWidgetGroup::WTrackWidgetGroup(QWidget* pParent, + UserSettingsPointer pConfig, + TrackCollectionManager* pTrackCollectionManager, + const QString& group) + : WWidgetGroup(pParent), + m_group(group), + m_pConfig(pConfig), + m_trackColorAlpha(kDefaultTrackColorAplha), + m_pTrackMenu(make_parented<WTrackMenu>( + this, pConfig, pTrackCollectionManager, kTrackMenuFeatures)) { + setAcceptDrops(true); +} + +WTrackWidgetGroup::~WTrackWidgetGroup() { +} + +void WTrackWidgetGroup::setup(const QDomNode& node, const SkinContext& context) { + WWidgetGroup::setup(node, context); + + bool ok = false; + int trackColorAlpha = context.selectInt( + node, + QStringLiteral("TrackColorAlpha"), + &ok); + if (ok) { + m_trackColorAlpha = trackColorAlpha; + } +} + +void WTrackWidgetGroup::slotTrackLoaded(TrackPointer track) { + if (track) { + m_pCurrentTrack = track; + connect(track.get(), + &Track::changed, + this, + &WTrackWidgetGroup::slotTrackChanged); + updateColor(); + } +} + +void WTrackWidgetGroup::slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack) { + Q_UNUSED(pNewTrack); + Q_UNUSED(pOldTrack); + if (m_pCurrentTrack) { + disconnect(m_pCurrentTrack.get(), nullptr, this, nullptr); + } + m_pCurrentTrack.reset(); + updateColor(); +} + +void WTrackWidgetGroup::slotTrackChanged(TrackId trackId) { + Q_UNUSED(trackId); + updateColor(); +} + +void WTrackWidgetGroup::updateColor() { + if (m_pCurrentTrack) { + m_trackColor = mixxx::RgbColor::toQColor(m_pCurrentTrack->getColor()); + m_trackColor.setAlpha(m_trackColorAlpha); + } else { + m_trackColor = QColor(); + } + update(); +} + +void WTrackWidgetGroup::paintEvent(QPaintEvent* pe) { + WWidgetGroup::paintEvent(pe); + + if (m_trackColor.isValid()) { + QStylePainter p(this); + + p.fillRect(rect(), QBrush(m_trackColor)); + } +} + +void WTrackWidgetGroup::mouseMoveEvent(QMouseEvent* event) { + if ((event->buttons() & Qt::LeftButton) && m_pCurrentTrack) { + DragAndDropHelper::dragTrack(m_pCurrentTrack, this, m_group); + } +} + +void WTrackWidgetGroup::dragEnterEvent(QDragEnterEvent* event) { + DragAndDropHelper::handleTrackDragEnterEvent(event, m_group, m_pConfig); +} + +void WTrackWidgetGroup::dropEvent(QDropEvent* event) { + DragAndDropHelper::handleTrackDropEvent(event, *this, m_group, m_pConfig); +} + +void WTrackWidgetGroup::contextMenuEvent(QContextMenuEvent* event) { + event->accept(); + if (m_pCurrentTrack) { + m_pTrackMenu->loadTrack(m_pCurrentTrack); + // Create the right-click menu + m_pTrackMenu->popup(event->globalPos()); + } +} diff --git a/src/widget/wtrackwidgetgroup.h b/src/widget/wtrackwidgetgroup.h new file mode 100644 index 0000000000..e89e8e0262 --- /dev/null +++ b/src/widget/wtrackwidgetgroup.h @@ -0,0 +1,51 @@ +#pragma once + +#include "skin/skincontext.h" +#include "track/track.h" +#include "util/parented_ptr.h" +#include "widget/trackdroptarget.h" +#include "widget/wwidgetgroup.h" + +class WTrackMenu; +class TrackCollectionManager; + +class WTrackWidgetGroup : public WWidgetGroup, public TrackDropTarget { + Q_OBJECT + public: + WTrackWidgetGroup(QWidget* pParent, + UserSettingsPointer pConfig, + TrackCollectionManager* pTrackCollectionManager, + const QString& group); + ~WTrackWidgetGroup() override; + void setup(const QDomNode& node, const SkinContext& context) override; + + signals: + void trackDropped(QString fileName, QString group) override; + void cloneDeck(QString source_group, QString target_group) override; + + public slots: + void slotTrackLoaded(TrackPointer track); + void slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack); + + protected: + void paintEvent(QPaintEvent* pe) override; + void contextMenuEvent(QContextMenuEvent* event) override; + + private slots: + void slotTrackChanged(TrackId); + + private: + void dragEnterEvent(QDragEnterEvent* event) override; + void dropEvent(QDropEvent* event) override; + void mouseMoveEvent(QMouseEvent* event) override; + + void updateColor(); + + const QString m_group; + UserSettingsPointer m_pConfig; + TrackPointer m_pCurrentTrack; + QColor m_trackColor; + int m_trackColorAlpha; + + const parented_ptr<WTrackMenu> m_pTrackMenu; +}; |