2021-03-01 20:03:25 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
|
2016-08-24 14:57:15 +00:00
|
|
|
*
|
2021-03-01 20:03:25 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
*/
|
2016-08-24 14:57:15 +00:00
|
|
|
|
|
|
|
|
#ifndef TASKPANEL_H
|
|
|
|
|
#define TASKPANEL_H
|
|
|
|
|
|
|
|
|
|
#include <Plasma/Containment>
|
2022-04-24 11:44:41 +00:00
|
|
|
#include <QWindow>
|
2016-08-24 14:57:15 +00:00
|
|
|
|
2021-08-31 00:02:17 +00:00
|
|
|
class OutputsModel;
|
2016-08-24 14:57:15 +00:00
|
|
|
class QAbstractItemModel;
|
|
|
|
|
|
|
|
|
|
namespace KWayland
|
|
|
|
|
{
|
|
|
|
|
namespace Client
|
|
|
|
|
{
|
2021-08-31 00:02:17 +00:00
|
|
|
class Output;
|
2016-08-24 14:57:15 +00:00
|
|
|
class PlasmaWindowManagement;
|
|
|
|
|
class PlasmaWindow;
|
|
|
|
|
class PlasmaShell;
|
|
|
|
|
class PlasmaShellSurface;
|
|
|
|
|
class Surface;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class TaskPanel : public Plasma::Containment
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
Q_PROPERTY(QWindow *panel READ panel WRITE setPanel NOTIFY panelChanged)
|
|
|
|
|
|
|
|
|
|
public:
|
2022-04-24 11:44:41 +00:00
|
|
|
TaskPanel(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
|
2016-08-24 14:57:15 +00:00
|
|
|
|
|
|
|
|
QWindow *panel();
|
|
|
|
|
void setPanel(QWindow *panel);
|
|
|
|
|
|
2022-02-13 04:23:57 +00:00
|
|
|
Q_INVOKABLE void setPanelHeight(qreal height);
|
|
|
|
|
|
2021-08-31 00:02:17 +00:00
|
|
|
QAbstractItemModel *outputs() const;
|
|
|
|
|
|
2023-03-06 06:38:43 +00:00
|
|
|
Q_INVOKABLE void triggerTaskSwitcher() const;
|
|
|
|
|
|
2016-08-24 14:57:15 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
|
void panelChanged();
|
2021-08-25 20:57:45 +00:00
|
|
|
void locationChanged();
|
2016-08-24 14:57:15 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void initWayland();
|
2017-09-14 11:01:07 +00:00
|
|
|
void updatePanelVisibility();
|
2016-08-24 14:57:15 +00:00
|
|
|
QWindow *m_panel = nullptr;
|
|
|
|
|
KWayland::Client::PlasmaShellSurface *m_shellSurface = nullptr;
|
|
|
|
|
KWayland::Client::Surface *m_surface = nullptr;
|
|
|
|
|
KWayland::Client::PlasmaShell *m_shellInterface = nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|