Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3436,24 +3436,25 @@ if(QML)
src/qml/qmlapplication.cpp
src/qml/qmlautoreload.cpp
src/qml/qmlbeatsmodel.cpp
src/qml/qmlcuesmodel.cpp
src/qml/qmlcontrolproxy.cpp
src/qml/qmlchainpresetmodel.cpp
src/qml/qmlconfigproxy.cpp
src/qml/qmlcontrolproxy.cpp
src/qml/qmlcuesmodel.cpp
src/qml/qmldlgpreferencesproxy.cpp
src/qml/qmleffectmanifestparametersmodel.cpp
src/qml/qmleffectsmanagerproxy.cpp
src/qml/qmleffectslotproxy.cpp
src/qml/qmleffectsmanagerproxy.cpp
src/qml/qmllibraryproxy.cpp
src/qml/qmllibrarytracklistmodel.cpp
src/qml/qmlmixxxcontrollerscreen.cpp
src/qml/qmlplayermanagerproxy.cpp
src/qml/qmlplayerproxy.cpp
src/qml/qmlvisibleeffectsmodel.cpp
src/qml/qmlchainpresetmodel.cpp
src/qml/qmlwaveformoverview.cpp
src/qml/qmlmixxxcontrollerscreen.cpp
src/qml/qmlwaveformdisplay.cpp
src/qml/qmlwaveformoverview.cpp
src/qml/qmlwaveformrenderer.cpp
src/qml/qmlsettingparameter.cpp
src/qml/qmltrackproxy.cpp
src/waveform/renderers/allshader/digitsrenderer.cpp
src/waveform/renderers/allshader/waveformrenderbeat.cpp
src/waveform/renderers/allshader/waveformrenderer.cpp
Expand Down
3 changes: 2 additions & 1 deletion res/qml/Mixxx/Controls/WaveformOverview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Mixxx.WaveformOverview {
id: root

required property string group
readonly property var player: Mixxx.PlayerManager.getPlayer(root.group)

player: Mixxx.PlayerManager.getPlayer(root.group)
track: player.currentTrack

Mixxx.ControlProxy {
id: trackLoadedControl
Expand Down
4 changes: 0 additions & 4 deletions src/coreservices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@

#include "controllers/scripting/controllerscriptenginebase.h"
#include "qml/qmlconfigproxy.h"
#include "qml/qmlcontrolproxy.h"
#include "qml/qmldlgpreferencesproxy.h"
#include "qml/qmleffectslotproxy.h"
#include "qml/qmleffectsmanagerproxy.h"
#include "qml/qmllibraryproxy.h"
#include "qml/qmlplayermanagerproxy.h"
#include "qml/qmlplayerproxy.h"
#endif
#include "soundio/soundmanager.h"
#include "sources/soundsourceproxy.h"
Expand Down
28 changes: 28 additions & 0 deletions src/qml/qmlplayermanagerproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "mixer/playermanager.h"
#include "moc_qmlplayermanagerproxy.cpp"
#include "qml/qmlplayerproxy.h"
#include "track/track_decl.h"

namespace mixxx {
namespace qml {
Expand All @@ -31,6 +32,20 @@ QmlPlayerProxy* QmlPlayerManagerProxy::getPlayer(const QString& group) {
[this, group](const QString& trackLocation, bool play) {
loadLocationToPlayer(trackLocation, group, play);
});
connect(pPlayerProxy,
&QmlPlayerProxy::loadTrackRequested,
this,
[this, group](TrackPointer track,
#ifdef __STEM__
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we ifdeffing stems? Can we assume that by the time QML exists, every build will have stems? if so, then I'm ok making stems a prerequisite for building qml. (but not if this would force everyone to have stems turned on)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QML is already expected to be enabled for controller screens rendering, since 2.6. We could expect that both QML and STEM might be stable enough when we reach 3.0 to remove these two flags tho, but for now they are needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ywwg Do you agree with keeping these ifdefs for now?

mixxx::StemChannelSelection stemSelection,
#endif
bool play) {
loadTrackToPlayer(track, group,
#ifdef __STEM__
stemSelection,
#endif
play);
});
connect(pPlayerProxy,
&QmlPlayerProxy::cloneFromGroup,
this,
Expand Down Expand Up @@ -59,6 +74,19 @@ void QmlPlayerManagerProxy::loadLocationToPlayer(
m_pPlayerManager->slotLoadLocationToPlayer(location, group, play);
}

void QmlPlayerManagerProxy::loadTrackToPlayer(TrackPointer track,
const QString& group,
#ifdef __STEM__
mixxx::StemChannelSelection stemSelection,
#endif
bool play) {
m_pPlayerManager->slotLoadTrackToPlayer(track, group,
#ifdef __STEM__
stemSelection,
#endif
play);
}

// static
QmlPlayerManagerProxy* QmlPlayerManagerProxy::create(QQmlEngine* pQmlEngine, QJSEngine* pJsEngine) {
// The implementation of this method is mostly taken from the code example
Expand Down
6 changes: 6 additions & 0 deletions src/qml/qmlplayermanagerproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class QmlPlayerManagerProxy : public QObject {
const QUrl& locationUrl, bool play = false);
Q_INVOKABLE void loadLocationToPlayer(
const QString& location, const QString& group, bool play = false);
Q_INVOKABLE void loadTrackToPlayer(TrackPointer track,
const QString& group,
#ifdef __STEM__
mixxx::StemChannelSelection stemSelection,
#endif
bool play);

static QmlPlayerManagerProxy* create(QQmlEngine* pQmlEngine, QJSEngine* pJsEngine);
static void registerPlayerManager(std::shared_ptr<PlayerManager> pPlayerManager) {
Expand Down
Loading