summaryrefslogtreecommitdiffstats
path: root/src/qml/qmllibraryproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qmllibraryproxy.h')
-rw-r--r--src/qml/qmllibraryproxy.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/qml/qmllibraryproxy.h b/src/qml/qmllibraryproxy.h
new file mode 100644
index 0000000000..e7d64c1770
--- /dev/null
+++ b/src/qml/qmllibraryproxy.h
@@ -0,0 +1,35 @@
+#pragma once
+#include <QObject>
+#include <memory>
+
+#include "qml/qmllibrarytracklistmodel.h"
+#include "util/parented_ptr.h"
+
+class Library;
+class SidebarModel;
+
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel);
+
+namespace mixxx {
+namespace skin {
+namespace qml {
+
+class QmlLibraryTrackListModel;
+
+class QmlLibraryProxy : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(mixxx::skin::qml::QmlLibraryTrackListModel* model MEMBER m_pModel CONSTANT)
+
+ public:
+ explicit QmlLibraryProxy(std::shared_ptr<Library> pLibrary, QObject* parent = nullptr);
+
+ Q_INVOKABLE QAbstractItemModel* getSidebarModel();
+
+ private:
+ std::shared_ptr<Library> m_pLibrary;
+ parented_ptr<QmlLibraryTrackListModel> m_pModel;
+};
+
+} // namespace qml
+} // namespace skin
+} // namespace mixxx