1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-03 09:17:50 +03:00
latte-dock/app/infoview.h

78 lines
1.6 KiB
C
Raw Normal View History

/*
2021-05-27 18:01:00 +03:00
SPDX-FileCopyrightText: 2016 Smith AR <audoban@openmailbox.org>
SPDX-FileCopyrightText: 2016 Michail Vourlakos <mvourlakos@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef INFOVIEW_H
#define INFOVIEW_H
2018-12-02 03:05:52 +03:00
// local
#include "lattecorona.h"
2020-03-21 14:06:03 +03:00
#include "wm/windowinfowrap.h"
2018-12-02 03:05:52 +03:00
// Qt
#include <QObject>
#include <QQuickView>
#include <QScreen>
namespace KWayland {
namespace Client {
class PlasmaShellSurface;
}
}
namespace Latte {
2018-07-03 22:15:45 +03:00
class InfoView : public QQuickView
{
Q_OBJECT
Q_PROPERTY(Plasma::FrameSvg::EnabledBorders enabledBorders READ enabledBorders NOTIFY enabledBordersChanged)
public:
InfoView(Latte::Corona *corona, QString message, QScreen *screen, QWindow *parent = nullptr);
~InfoView() override;
2020-03-21 14:06:03 +03:00
QString validTitle() const;
Plasma::FrameSvg::EnabledBorders enabledBorders() const;
void init();
Qt::WindowFlags wFlags() const;
void setOnActivities(QStringList activities = {"0"});
public slots:
Q_INVOKABLE void syncGeometry();
signals:
void enabledBordersChanged();
protected:
void showEvent(QShowEvent *ev) override;
bool event(QEvent *e) override;
2020-03-21 14:06:03 +03:00
private slots:
void setupWaylandIntegration();
2020-03-21 14:06:03 +03:00
void updateWaylandId();
private:
2020-03-21 14:06:03 +03:00
QString m_id;
QString m_message;
2017-07-27 17:34:32 +03:00
QScreen *m_screen{nullptr};
Plasma::FrameSvg::EnabledBorders m_borders{Plasma::FrameSvg::TopBorder | Plasma::FrameSvg::BottomBorder};
2020-03-21 14:06:03 +03:00
Latte::WindowSystem::WindowId m_trackedWindowId;
KWayland::Client::PlasmaShellSurface *m_shellSurface{nullptr};
Latte::Corona *m_corona{nullptr};
};
}
#endif //INFOVIEW_H