mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Move most of the homescreen pieces in a QML import that can be reused making it easier to do alternative homescreens
49 lines
902 B
C++
49 lines
902 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2021 Marco Martin <mart@kde.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// Qt
|
|
#include <QObject>
|
|
#include <QAbstractListModel>
|
|
#include <QList>
|
|
#include <QSet>
|
|
|
|
#include "homescreenutils.h"
|
|
#include "applicationlistmodel.h"
|
|
|
|
class QString;
|
|
|
|
namespace KWayland
|
|
{
|
|
namespace Client
|
|
{
|
|
class PlasmaWindowManagement;
|
|
class PlasmaWindow;
|
|
}
|
|
}
|
|
|
|
class FavoritesModel;
|
|
|
|
class FavoritesModel : public ApplicationListModel {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
FavoritesModel(QObject *parent = nullptr);
|
|
~FavoritesModel() override;
|
|
|
|
|
|
QString storageToUniqueId(const QString &storageId) const;
|
|
QString uniqueToStorageId(const QString &uniqueId) const;
|
|
|
|
Q_INVOKABLE void addFavorite(const QString &storageId, int row, LauncherLocation location);
|
|
Q_INVOKABLE void removeFavorite(int row);
|
|
|
|
Q_INVOKABLE void loadApplications() override;
|
|
|
|
|
|
};
|
|
|