mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Move from a C++ library + QML plugin to a QML plugin only for simplicity, since the homescreen switching architecture will be done from Plasma, and so use of the shell library only needs to be from QML.
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
/*
|
|
SPDX-FileCopyrightText: 2016, 2019 Kai Uwe Broulik <kde@privat.broulik.de>
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QPointer>
|
|
#include <QQuickItem>
|
|
#include <QUrl>
|
|
|
|
class QAction;
|
|
|
|
class NotificationFileMenu : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
|
|
Q_PROPERTY(QQuickItem *visualParent READ visualParent WRITE setVisualParent NOTIFY visualParentChanged)
|
|
Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged)
|
|
|
|
public:
|
|
explicit NotificationFileMenu(QObject *parent = nullptr);
|
|
~NotificationFileMenu() override;
|
|
|
|
QUrl url() const;
|
|
void setUrl(const QUrl &url);
|
|
|
|
QQuickItem *visualParent() const;
|
|
void setVisualParent(QQuickItem *visualParent);
|
|
|
|
bool visible() const;
|
|
void setVisible(bool visible);
|
|
|
|
Q_INVOKABLE void open(int x, int y);
|
|
|
|
Q_SIGNALS:
|
|
void actionTriggered(QAction *action);
|
|
|
|
void urlChanged();
|
|
void visualParentChanged();
|
|
void visibleChanged();
|
|
|
|
private:
|
|
QUrl m_url;
|
|
QPointer<QQuickItem> m_visualParent;
|
|
bool m_visible = false;
|
|
};
|