2017-07-26 09:25:56 +03:00
/*
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
2017-07-26 09:25:56 +03:00
*/
# ifndef INFOVIEW_H
# define INFOVIEW_H
2018-12-02 03:05:52 +03:00
// local
2018-12-06 15:35:34 +03:00
# include "lattecorona.h"
2020-03-21 14:06:03 +03:00
# include "wm/windowinfowrap.h"
2017-07-26 09:25:56 +03:00
2018-12-02 03:05:52 +03:00
// Qt
2017-07-26 09:25:56 +03:00
# include <QObject>
# include <QQuickView>
2017-07-26 10:21:37 +03:00
# include <QScreen>
2017-07-26 09:25:56 +03:00
namespace KWayland {
namespace Client {
class PlasmaShellSurface ;
}
}
namespace Latte {
2018-07-03 22:15:45 +03:00
class InfoView : public QQuickView
{
2017-07-26 09:25:56 +03:00
Q_OBJECT
2017-07-26 10:21:37 +03:00
Q_PROPERTY ( Plasma : : FrameSvg : : EnabledBorders enabledBorders READ enabledBorders NOTIFY enabledBordersChanged )
2017-07-26 09:25:56 +03:00
public :
2022-05-08 13:52:55 +03:00
InfoView ( Latte : : Corona * corona , QString message , QScreen * screen , QWindow * parent = nullptr ) ;
2017-07-26 09:25:56 +03:00
~ InfoView ( ) override ;
2020-03-21 14:06:03 +03:00
QString validTitle ( ) const ;
2017-07-26 10:21:37 +03:00
Plasma : : FrameSvg : : EnabledBorders enabledBorders ( ) const ;
2017-07-26 09:25:56 +03:00
void init ( ) ;
Qt : : WindowFlags wFlags ( ) const ;
2018-01-15 01:29:11 +03:00
void setOnActivities ( QStringList activities = { " 0 " } ) ;
2017-07-26 09:25:56 +03:00
public slots :
Q_INVOKABLE void syncGeometry ( ) ;
2017-07-26 10:21:37 +03:00
signals :
void enabledBordersChanged ( ) ;
2017-07-26 09:25:56 +03:00
protected :
void showEvent ( QShowEvent * ev ) override ;
bool event ( QEvent * e ) override ;
2020-03-21 14:06:03 +03:00
private slots :
2017-07-26 09:25:56 +03:00
void setupWaylandIntegration ( ) ;
2020-03-21 14:06:03 +03:00
void updateWaylandId ( ) ;
2017-07-26 09:25:56 +03:00
private :
2020-03-21 14:06:03 +03:00
QString m_id ;
2017-07-26 09:25:56 +03:00
QString m_message ;
2017-07-27 17:34:32 +03:00
QScreen * m_screen { nullptr } ;
2017-07-26 10:21:37 +03:00
Plasma : : FrameSvg : : EnabledBorders m_borders { Plasma : : FrameSvg : : TopBorder | Plasma : : FrameSvg : : BottomBorder } ;
2020-03-21 14:06:03 +03:00
Latte : : WindowSystem : : WindowId m_trackedWindowId ;
2017-07-26 09:25:56 +03:00
KWayland : : Client : : PlasmaShellSurface * m_shellSurface { nullptr } ;
2018-12-06 15:35:34 +03:00
Latte : : Corona * m_corona { nullptr } ;
2017-07-26 09:25:56 +03:00
} ;
}
2018-12-06 15:35:34 +03:00
# endif //INFOVIEW_H