summaryrefslogtreecommitdiffstats
path: root/src/manager-lib/applicationmodel.h
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2019-10-13 16:56:51 +0200
committerRobert Griebl <robert.griebl@qt.io>2019-10-28 14:11:42 +0100
commit495cc72c005cbb7796e557b0995f130c1d128a7b (patch)
tree9266c35d1b5851cd4b88b1856f425df0f1ca7d34 /src/manager-lib/applicationmodel.h
parent0a1cccfccd8f76014bc697c5c9006c5ebb9723e8 (diff)
Change intent implementation to better fit new architecture
- IntentServer is now a list model as all the other singletons. - IntentModel is the companion filter model for the IntentServer, just like the ApplicationModel is for the ApplicationManager - Intent is now a Q_OBJECT instead of a Q_GADGET Change-Id: Ifead097c543fb00b08ab21210e4526a6f65ba167 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'src/manager-lib/applicationmodel.h')
-rw-r--r--src/manager-lib/applicationmodel.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/manager-lib/applicationmodel.h b/src/manager-lib/applicationmodel.h
index 1ec1d503..6d0ef279 100644
--- a/src/manager-lib/applicationmodel.h
+++ b/src/manager-lib/applicationmodel.h
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2019 Luxoft Sweden AB
** Copyright (C) 2018 Pelagicore AG
** Contact: https://www.qt.io/licensing/
@@ -51,6 +52,7 @@ QT_FORWARD_DECLARE_CLASS(QJSEngine);
QT_BEGIN_NAMESPACE_AM
class ApplicationModelPrivate;
+class Application;
class ApplicationModel : public QSortFilterProxyModel
{
@@ -62,7 +64,7 @@ class ApplicationModel : public QSortFilterProxyModel
Q_PROPERTY(QJSValue sortFunction READ sortFunction WRITE setSortFunction NOTIFY sortFunctionChanged)
public:
- ApplicationModel();
+ ApplicationModel(QObject *parent = nullptr);
int count() const;
@@ -73,6 +75,7 @@ public:
void setSortFunction(const QJSValue &callback);
Q_INVOKABLE int indexOfApplication(const QString &id) const;
+ Q_INVOKABLE int indexOfApplication(Application *application) const;
Q_INVOKABLE int mapToSource(int ourIndex) const;
Q_INVOKABLE int mapFromSource(int sourceIndex) const;