2016-12-25 09:25:27 +02:00
/*
2017-01-02 17:05:30 -05:00
* Copyright 2016 Smith AR < audoban @ openmailbox . org >
* Michail Vourlakos < mvourlakos @ gmail . com >
*
* This file is part of Latte - Dock
*
* Latte - Dock is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation ; either version 2 of
* the License , or ( at your option ) any later version .
*
* Latte - Dock is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2016-12-25 09:25:27 +02:00
2018-12-06 12:15:58 +02:00
# ifndef VIEW_H
# define VIEW_H
2016-12-25 09:25:27 +02:00
2018-12-02 02:05:52 +02:00
// local
2020-04-24 14:52:16 +03:00
# include <coretypes.h>
2019-12-21 18:53:02 +02:00
# include "containmentinterface.h"
2018-11-30 21:33:46 +02:00
# include "effects.h"
2020-12-28 23:36:28 +02:00
# include "parabolic.h"
2018-12-01 00:13:11 +02:00
# include "positioner.h"
2020-12-29 19:32:25 +02:00
# include "eventssink.h"
2018-02-03 11:34:13 +02:00
# include "visibilitymanager.h"
2019-06-03 18:36:45 +03:00
# include "indicator/indicator.h"
2018-12-09 00:06:14 +02:00
# include "settings/primaryconfigview.h"
2019-06-08 16:20:43 +03:00
# include "windowstracker/windowstracker.h"
2021-03-21 15:31:47 +02:00
# include "../data/viewdata.h"
2019-02-06 18:15:59 +02:00
# include "../shortcuts/globalshortcuts.h"
2019-04-06 02:00:37 +03:00
# include "../layout/genericlayout.h"
2018-12-13 19:51:22 +02:00
# include "../plasma/quick/containmentview.h"
# include "../plasma/quick/configview.h"
2016-12-25 09:25:27 +02:00
2018-12-02 02:05:52 +02:00
// C++
2018-08-01 13:38:16 +02:00
# include <array>
2018-12-02 02:05:52 +02:00
// Qt
2016-12-25 09:25:27 +02:00
# include <QQuickView>
2017-01-03 15:33:30 +02:00
# include <QMenu>
2020-04-05 14:40:32 +03:00
# include <QMetaObject>
2017-06-11 18:06:03 +03:00
# include <QMimeData>
2016-12-25 09:25:27 +02:00
# include <QScreen>
# include <QPointer>
# include <QTimer>
2020-04-22 14:09:42 +03:00
2016-12-25 09:25:27 +02:00
namespace Plasma {
class Types ;
class Corona ;
class Containment ;
}
2020-04-05 17:01:10 +03:00
namespace PlasmaQuick {
class AppletQuickItem ;
}
2017-04-25 19:18:49 +03:00
namespace KWayland {
namespace Client {
class PlasmaShellSurface ;
}
}
2016-12-30 02:20:06 -05:00
namespace Latte {
2019-04-12 18:55:45 +03:00
class Corona ;
2020-05-12 14:45:31 +03:00
class Interfaces ;
2019-04-06 02:00:37 +03:00
class GenericLayout ;
2018-12-02 00:53:40 +02:00
2018-12-06 11:37:14 +02:00
namespace ViewPart {
2018-12-02 00:53:40 +02:00
class ContextMenu ;
}
2018-02-03 11:34:13 +02:00
}
namespace Latte {
2018-01-10 22:55:19 +02:00
2018-12-06 12:15:58 +02:00
class View : public PlasmaQuick : : ContainmentView
2018-07-03 22:15:45 +03:00
{
2016-12-25 09:25:27 +02:00
Q_OBJECT
2019-02-11 16:49:10 +02:00
Q_PROPERTY ( Latte : : Types : : ViewType type READ type WRITE setType NOTIFY typeChanged )
2017-08-09 03:33:03 +03:00
Q_PROPERTY ( bool alternativesIsShown READ alternativesIsShown NOTIFY alternativesIsShownChanged )
2017-05-07 15:06:29 +03:00
Q_PROPERTY ( bool behaveAsPlasmaPanel READ behaveAsPlasmaPanel WRITE setBehaveAsPlasmaPanel NOTIFY behaveAsPlasmaPanelChanged )
2018-12-06 15:34:04 +02:00
Q_PROPERTY ( bool byPassWM READ byPassWM WRITE setByPassWM NOTIFY byPassWMChanged )
2019-05-17 21:28:39 +03:00
Q_PROPERTY ( bool containsDrag READ containsDrag NOTIFY containsDragChanged )
2017-07-27 18:24:31 +03:00
Q_PROPERTY ( bool contextMenuIsShown READ contextMenuIsShown NOTIFY contextMenuIsShownChanged )
2020-04-23 21:57:17 +03:00
Q_PROPERTY ( bool inSettingsAdvancedMode READ inSettingsAdvancedMode NOTIFY inSettingsAdvancedModeChanged )
2020-04-08 15:22:38 +03:00
2020-07-29 01:20:45 +03:00
Q_PROPERTY ( bool inEditMode READ inEditMode NOTIFY inEditModeChanged )
2018-09-22 20:21:57 +03:00
Q_PROPERTY ( bool isPreferredForShortcuts READ isPreferredForShortcuts WRITE setIsPreferredForShortcuts NOTIFY isPreferredForShortcutsChanged )
2017-02-27 00:53:27 +02:00
Q_PROPERTY ( bool onPrimary READ onPrimary WRITE setOnPrimary NOTIFY onPrimaryChanged )
2020-03-19 15:32:36 +02:00
Q_PROPERTY ( bool screenEdgeMarginEnabled READ screenEdgeMarginEnabled WRITE setScreenEdgeMarginEnabled NOTIFY screenEdgeMarginEnabledChanged )
2017-01-16 14:07:49 -05:00
2019-08-01 18:18:40 +03:00
//! values to be used from Smart surrounding Views
2019-08-01 23:56:09 +03:00
Q_PROPERTY ( bool isTouchingBottomViewAndIsBusy READ isTouchingBottomViewAndIsBusy WRITE setIsTouchingBottomViewAndIsBusy NOTIFY isTouchingBottomViewAndIsBusyChanged )
Q_PROPERTY ( bool isTouchingTopViewAndIsBusy READ isTouchingTopViewAndIsBusy WRITE setIsTouchingTopViewAndIsBusy NOTIFY isTouchingTopViewAndIsBusyChanged )
2019-08-01 18:18:40 +03:00
2017-02-04 16:41:12 +02:00
Q_PROPERTY ( int alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged )
2018-02-17 19:02:06 +02:00
Q_PROPERTY ( int fontPixelSize READ fontPixelSize WRITE setFontPixelSize NOTIFY fontPixelSizeChanged )
2017-02-26 15:49:50 +02:00
Q_PROPERTY ( int x READ x NOTIFY xChanged )
Q_PROPERTY ( int y READ y NOTIFY yChanged )
2017-01-12 18:54:23 -05:00
Q_PROPERTY ( int width READ width NOTIFY widthChanged )
2016-12-25 09:25:27 +02:00
Q_PROPERTY ( int height READ height NOTIFY heightChanged )
2020-07-07 18:20:16 +03:00
Q_PROPERTY ( int editThickness READ editThickness NOTIFY editThicknessChanged )
2016-12-25 09:25:27 +02:00
Q_PROPERTY ( int maxThickness READ maxThickness WRITE setMaxThickness NOTIFY maxThicknessChanged )
2017-01-27 20:31:41 +02:00
Q_PROPERTY ( int normalThickness READ normalThickness WRITE setNormalThickness NOTIFY normalThicknessChanged )
2021-01-06 21:43:15 +02:00
Q_PROPERTY ( int maxNormalThickness READ maxNormalThickness WRITE setMaxNormalThickness NOTIFY maxNormalThicknessChanged )
2020-05-11 17:31:03 +03:00
Q_PROPERTY ( int headThicknessGap READ headThicknessGap WRITE setHeadThicknessGap NOTIFY headThicknessGapChanged )
2019-12-24 12:35:28 +02:00
Q_PROPERTY ( int screenEdgeMargin READ screenEdgeMargin WRITE setScreenEdgeMargin NOTIFY screenEdgeMarginChanged )
2017-01-31 21:25:00 +02:00
Q_PROPERTY ( float maxLength READ maxLength WRITE setMaxLength NOTIFY maxLengthChanged )
2020-04-29 09:54:16 +03:00
Q_PROPERTY ( float offset READ offset WRITE setOffset NOTIFY offsetChanged )
2017-01-31 21:25:00 +02:00
2021-04-01 11:00:59 +03:00
Q_PROPERTY ( QString name READ name NOTIFY nameChanged )
2020-07-07 18:33:41 +03:00
Q_PROPERTY ( QQuickItem * colorizer READ colorizer WRITE setColorizer NOTIFY colorizerChanged )
2021-01-23 23:37:13 +02:00
Q_PROPERTY ( QVariantList containmentActions READ containmentActions NOTIFY containmentActionsChanged )
2019-05-08 23:42:06 +03:00
Q_PROPERTY ( Latte : : Layout : : GenericLayout * layout READ layout WRITE setLayout NOTIFY layoutChanged )
2019-03-23 17:49:09 +02:00
Q_PROPERTY ( Latte : : ViewPart : : Effects * effects READ effects NOTIFY effectsChanged )
2020-04-08 14:34:05 +03:00
Q_PROPERTY ( Latte : : ViewPart : : ContainmentInterface * extendedInterface READ extendedInterface NOTIFY extendedInterfaceChanged )
2019-03-23 17:49:09 +02:00
Q_PROPERTY ( Latte : : ViewPart : : Indicator * indicator READ indicator NOTIFY indicatorChanged )
2020-12-28 23:36:28 +02:00
Q_PROPERTY ( Latte : : ViewPart : : Parabolic * parabolic READ parabolic NOTIFY parabolicChanged )
2018-12-06 11:37:14 +02:00
Q_PROPERTY ( Latte : : ViewPart : : Positioner * positioner READ positioner NOTIFY positionerChanged )
2020-12-29 19:32:25 +02:00
Q_PROPERTY ( Latte : : ViewPart : : EventsSink * sink READ sink NOTIFY sinkChanged )
2018-12-09 00:29:35 +02:00
Q_PROPERTY ( Latte : : ViewPart : : VisibilityManager * visibility READ visibility NOTIFY visibilityChanged )
2019-02-07 19:15:25 +02:00
Q_PROPERTY ( Latte : : ViewPart : : WindowsTracker * windowsTracker READ windowsTracker NOTIFY windowsTrackerChanged )
2018-11-30 21:33:46 +02:00
2020-05-12 14:45:31 +03:00
Q_PROPERTY ( Latte : : Interfaces * interfacesGraphicObj READ interfacesGraphicObj WRITE setInterfacesGraphicObj NOTIFY interfacesGraphicObjChanged )
2019-04-23 10:41:35 +03:00
Q_PROPERTY ( QRect absoluteGeometry READ absoluteGeometry NOTIFY absoluteGeometryChanged )
2017-03-09 15:49:24 +02:00
Q_PROPERTY ( QRect localGeometry READ localGeometry WRITE setLocalGeometry NOTIFY localGeometryChanged )
2017-02-26 15:49:50 +02:00
Q_PROPERTY ( QRect screenGeometry READ screenGeometry NOTIFY screenGeometryChanged )
2016-12-25 09:25:27 +02:00
public :
2018-12-06 15:34:04 +02:00
View ( Plasma : : Corona * corona , QScreen * targetScreen = nullptr , bool byPassWM = false ) ;
2018-12-06 12:15:58 +02:00
virtual ~ View ( ) ;
2017-01-16 14:07:49 -05:00
2020-05-02 13:23:37 +03:00
void init ( Plasma : : Containment * plasma_containment = nullptr ) ;
2017-01-16 14:07:49 -05:00
2019-02-11 16:49:10 +02:00
Types : : ViewType type ( ) const ;
void setType ( Types : : ViewType type ) ;
2017-08-09 03:33:03 +03:00
bool alternativesIsShown ( ) const ;
void setAlternativesIsShown ( bool show ) ;
2018-11-29 21:30:00 +02:00
bool inDelete ( ) const ;
2020-05-08 10:16:26 +03:00
bool inReadyState ( ) const ;
2018-11-29 21:30:00 +02:00
2017-02-27 00:53:27 +02:00
bool onPrimary ( ) const ;
void setOnPrimary ( bool flag ) ;
2017-05-07 15:06:29 +03:00
bool behaveAsPlasmaPanel ( ) const ;
void setBehaveAsPlasmaPanel ( bool behavior ) ;
2019-05-17 21:28:39 +03:00
bool containsDrag ( ) const ;
2019-03-08 16:14:34 +02:00
bool containsMouse ( ) const ;
2017-07-27 18:24:31 +03:00
bool contextMenuIsShown ( ) const ;
2018-12-06 15:34:04 +02:00
bool byPassWM ( ) const ;
void setByPassWM ( bool bypass ) ;
2017-03-18 23:32:27 +02:00
2018-02-12 16:11:33 +02:00
bool inEditMode ( ) const ;
2020-07-28 23:50:05 +03:00
bool isFloatingPanel ( ) const ;
2020-01-04 13:52:11 +02:00
2018-09-22 20:21:57 +03:00
bool isPreferredForShortcuts ( ) const ;
void setIsPreferredForShortcuts ( bool preferred ) ;
2020-04-23 21:57:17 +03:00
bool inSettingsAdvancedMode ( ) const ;
2019-08-01 23:56:09 +03:00
bool isTouchingBottomViewAndIsBusy ( ) const ;
void setIsTouchingBottomViewAndIsBusy ( bool touchAndBusy ) ;
2019-08-01 18:18:40 +03:00
2019-08-01 23:56:09 +03:00
bool isTouchingTopViewAndIsBusy ( ) const ;
void setIsTouchingTopViewAndIsBusy ( bool touchAndBusy ) ;
2019-08-01 18:18:40 +03:00
2019-12-24 12:35:28 +02:00
bool screenEdgeMarginEnabled ( ) const ;
2020-04-29 09:54:16 +03:00
void setScreenEdgeMarginEnabled ( bool enabled ) ;
2017-01-31 21:25:00 +02:00
2018-02-17 19:02:06 +02:00
int fontPixelSize ( ) const ;
void setFontPixelSize ( int size ) ;
2019-03-06 20:10:36 +02:00
int editThickness ( ) const ;
2017-01-12 18:54:23 -05:00
int maxThickness ( ) const ;
void setMaxThickness ( int thickness ) ;
2017-01-16 14:07:49 -05:00
2017-01-27 20:31:41 +02:00
int normalThickness ( ) const ;
void setNormalThickness ( int thickness ) ;
2021-01-06 21:43:15 +02:00
int maxNormalThickness ( ) const ;
void setMaxNormalThickness ( int thickness ) ;
2020-07-07 18:20:16 +03:00
2020-05-11 17:31:03 +03:00
int headThicknessGap ( ) const ;
void setHeadThicknessGap ( int thickness ) ;
2019-12-24 12:35:28 +02:00
int screenEdgeMargin ( ) const ;
void setScreenEdgeMargin ( int margin ) ;
2017-02-04 16:41:12 +02:00
int alignment ( ) const ;
void setAlignment ( int alignment ) ;
2020-04-29 09:54:16 +03:00
float maxLength ( ) const ;
void setMaxLength ( float length ) ;
float offset ( ) const ;
void setOffset ( float offset ) ;
2019-04-23 10:41:35 +03:00
QRect absoluteGeometry ( ) const ;
2017-02-26 15:49:50 +02:00
QRect screenGeometry ( ) const ;
2017-03-09 15:49:24 +02:00
QRect localGeometry ( ) const ;
void setLocalGeometry ( const QRect & geometry ) ;
2020-03-02 03:10:59 +02:00
QString validTitle ( ) const ;
2021-04-01 11:00:59 +03:00
QString name ( ) const ;
void setName ( const QString & newname ) ;
2019-06-08 01:38:27 +03:00
bool isOnActivity ( const QString & activity ) const ;
bool isOnAllActivities ( ) const ;
2020-03-21 12:44:52 +02:00
2019-06-08 01:38:27 +03:00
QStringList activities ( ) const ;
2020-03-21 12:44:52 +02:00
void setActivities ( const QStringList & ids ) ;
2018-02-09 19:22:04 +02:00
bool settingsWindowIsShown ( ) ;
2017-11-19 14:51:15 +02:00
void showSettingsWindow ( ) ;
2020-07-07 18:33:41 +03:00
QQuickItem * colorizer ( ) const ;
void setColorizer ( QQuickItem * colorizer ) ;
2021-01-23 23:37:13 +02:00
QVariantList containmentActions ( ) const ;
2020-06-27 14:42:29 +03:00
QQuickView * configView ( ) ;
2019-03-08 23:43:08 +02:00
2021-03-21 15:31:47 +02:00
Latte : : Data : : View data ( ) const ;
2019-12-21 18:53:02 +02:00
ViewPart : : Effects * effects ( ) const ;
2020-07-11 20:13:19 +03:00
ViewPart : : ContextMenu * contextMenu ( ) const ;
2020-04-08 14:34:05 +03:00
ViewPart : : ContainmentInterface * extendedInterface ( ) const ;
2019-03-23 17:49:09 +02:00
ViewPart : : Indicator * indicator ( ) const ;
2020-12-28 23:36:28 +02:00
ViewPart : : Parabolic * parabolic ( ) const ;
2018-12-06 11:37:14 +02:00
ViewPart : : Positioner * positioner ( ) const ;
2020-12-29 19:32:25 +02:00
ViewPart : : EventsSink * sink ( ) const ;
2018-12-09 00:29:35 +02:00
ViewPart : : VisibilityManager * visibility ( ) const ;
2019-02-07 19:15:25 +02:00
ViewPart : : WindowsTracker * windowsTracker ( ) const ;
2017-01-16 14:07:49 -05:00
2020-05-12 14:45:31 +03:00
Latte : : Interfaces * interfacesGraphicObj ( ) const ;
void setInterfacesGraphicObj ( Latte : : Interfaces * ifaces ) ;
2019-05-08 23:42:06 +03:00
Layout : : GenericLayout * layout ( ) const ;
void setLayout ( Layout : : GenericLayout * layout ) ;
2018-01-10 22:55:19 +02:00
2018-03-28 20:39:52 +03:00
KWayland : : Client : : PlasmaShellSurface * surface ( ) ;
2019-08-26 01:22:22 +03:00
//! release grab and restore mouse state
void unblockMouse ( int x , int y ) ;
2018-11-29 21:30:00 +02:00
void reconsiderScreen ( ) ;
2017-01-16 14:07:49 -05:00
2018-01-11 21:11:46 +02:00
//! these are signals that create crashes, such a example is the availableScreenRectChanged from corona
//! when its containment is destroyed
void disconnectSensitiveSignals ( ) ;
2020-06-28 18:15:16 +03:00
//! used from ViewSettingsFactory in order to move Configuration Windows to different View
void releaseConfigView ( ) ;
2016-12-25 09:25:27 +02:00
public slots :
2021-02-28 17:27:04 +02:00
Q_INVOKABLE void duplicateView ( ) ;
2021-02-13 19:52:52 +02:00
Q_INVOKABLE void exportTemplate ( ) ;
2018-12-06 15:57:20 +02:00
Q_INVOKABLE void removeView ( ) ;
2017-01-16 14:07:49 -05:00
2018-01-21 11:34:18 +02:00
Q_INVOKABLE void moveToLayout ( QString layoutName ) ;
2017-01-16 14:07:49 -05:00
2017-06-11 18:06:03 +03:00
Q_INVOKABLE bool mimeContainsPlasmoid ( QMimeData * mimeData , QString name ) ;
2019-04-23 10:41:35 +03:00
void updateAbsoluteGeometry ( bool bypassChecks = false ) ;
2017-03-08 21:00:09 +02:00
2019-02-06 18:15:59 +02:00
Q_INVOKABLE bool isHighestPriorityView ( ) ;
2021-02-28 13:16:40 +02:00
Q_INVOKABLE QAction * action ( const QString & name ) ;
2019-02-06 18:15:59 +02:00
2016-12-25 09:25:27 +02:00
protected slots :
void showConfigurationInterface ( Plasma : : Applet * applet ) override ;
2021-01-16 19:12:42 +02:00
void showWidgetExplorer ( const QPointF & point ) ;
2017-01-16 14:07:49 -05:00
2016-12-25 09:25:27 +02:00
protected :
bool event ( QEvent * ev ) override ;
2017-01-03 15:33:30 +02:00
void mousePressEvent ( QMouseEvent * event ) override ;
2017-01-16 14:07:49 -05:00
2016-12-25 09:25:27 +02:00
signals :
2016-12-30 13:46:56 +02:00
void eventTriggered ( QEvent * ev ) ;
2019-04-17 20:17:28 +03:00
void mousePressed ( const QPoint pos , const int button ) ;
void mouseReleased ( const QPoint pos , const int button ) ;
2020-01-31 17:59:08 +02:00
void wheelScrolled ( const QPoint pos , const QPoint angleDelta , const int buttons ) ;
2017-01-16 14:07:49 -05:00
2018-01-14 13:21:11 +02:00
void activitiesChanged ( ) ;
2017-08-09 03:33:03 +03:00
void alternativesIsShownChanged ( ) ;
2017-02-04 16:41:12 +02:00
void alignmentChanged ( ) ;
2017-05-07 15:06:29 +03:00
void behaveAsPlasmaPanelChanged ( ) ;
2018-12-06 15:34:04 +02:00
void byPassWMChanged ( ) ;
2020-07-07 18:33:41 +03:00
void colorizerChanged ( ) ;
2019-03-08 23:43:08 +02:00
void configWindowGeometryChanged ( ) ; // is called from config windows
2021-01-23 23:37:13 +02:00
void containmentActionsChanged ( ) ;
2019-05-17 21:28:39 +03:00
void containsDragChanged ( ) ;
2017-07-27 18:24:31 +03:00
void contextMenuIsShownChanged ( ) ;
2017-01-22 13:29:40 +02:00
void dockLocationChanged ( ) ;
2019-03-06 20:10:36 +02:00
void editThicknessChanged ( ) ;
2018-11-30 21:33:46 +02:00
void effectsChanged ( ) ;
2020-04-08 14:34:05 +03:00
void extendedInterfaceChanged ( ) ;
2018-02-17 19:02:06 +02:00
void fontPixelSizeChanged ( ) ;
2019-07-16 13:23:20 +03:00
void forcedShown ( ) ; //[workaround] forced shown to avoid a KWin issue that hides windows when closing activities
2021-03-03 22:04:25 +02:00
void geometryChanged ( ) ;
2017-01-12 18:54:23 -05:00
void widthChanged ( ) ;
2020-05-11 17:31:03 +03:00
void headThicknessGapChanged ( ) ;
2016-12-25 09:25:27 +02:00
void heightChanged ( ) ;
2018-02-12 16:11:33 +02:00
void inEditModeChanged ( ) ;
2019-03-23 17:49:09 +02:00
void indicatorChanged ( ) ;
2020-04-23 21:57:17 +03:00
void inSettingsAdvancedModeChanged ( ) ;
2020-05-12 14:45:31 +03:00
void interfacesGraphicObjChanged ( ) ;
2018-09-22 20:21:57 +03:00
void isPreferredForShortcutsChanged ( ) ;
2019-08-01 23:56:09 +03:00
void isTouchingBottomViewAndIsBusyChanged ( ) ;
void isTouchingTopViewAndIsBusyChanged ( ) ;
2019-05-08 23:42:06 +03:00
void layoutChanged ( ) ;
2017-03-09 15:49:24 +02:00
void localGeometryChanged ( ) ;
2017-01-31 21:25:00 +02:00
void maxLengthChanged ( ) ;
2016-12-25 09:25:27 +02:00
void maxThicknessChanged ( ) ;
2017-01-27 20:31:41 +02:00
void normalThicknessChanged ( ) ;
2021-01-06 21:43:15 +02:00
void maxNormalThicknessChanged ( ) ;
2021-04-01 11:00:59 +03:00
void nameChanged ( ) ;
2017-04-09 01:06:48 +03:00
void offsetChanged ( ) ;
2017-02-27 00:53:27 +02:00
void onPrimaryChanged ( ) ;
2020-12-28 23:36:28 +02:00
void parabolicChanged ( ) ;
2018-11-29 21:30:00 +02:00
void positionerChanged ( ) ;
2019-12-24 12:35:28 +02:00
void screenEdgeMarginChanged ( ) ;
2019-12-29 14:08:07 +02:00
void screenEdgeMarginEnabledChanged ( ) ;
2017-02-26 15:49:50 +02:00
void screenGeometryChanged ( ) ;
2020-12-29 19:32:25 +02:00
void sinkChanged ( ) ;
2019-02-11 16:49:10 +02:00
void typeChanged ( ) ;
2019-02-07 19:15:25 +02:00
void visibilityChanged ( ) ;
void windowsTrackerChanged ( ) ;
2017-02-26 15:49:50 +02:00
void xChanged ( ) ;
void yChanged ( ) ;
2017-01-16 14:07:49 -05:00
2019-04-23 10:41:35 +03:00
void absoluteGeometryChanged ( const QRect & geometry ) ;
2017-01-16 14:07:49 -05:00
2019-12-31 15:49:53 +02:00
void indicatorPluginChanged ( const QString & indicatorId ) ;
void indicatorPluginRemoved ( const QString & indicatorId ) ;
2020-07-18 17:39:34 +03:00
void userRequestedViewType ( const int & type ) ;
2019-06-20 17:42:49 +03:00
2019-12-28 13:59:36 +02:00
//! are used to trigger the Corona relevant signals and in that
//! way we can disable any such signaling all together, e.g. through disconnectSensitiveSignals()
void availableScreenRectChangedFrom ( Latte : : View * origin ) ;
2019-12-27 19:14:31 +02:00
void availableScreenRegionChangedFrom ( Latte : : View * origin ) ;
2017-01-13 17:15:53 +02:00
private slots :
2020-03-21 12:44:52 +02:00
void applyActivitiesToWindows ( ) ;
2019-12-28 13:59:36 +02:00
void availableScreenRectChangedFromSlot ( View * origin ) ;
2018-12-01 00:13:11 +02:00
void hideWindowsForSlidingOut ( ) ;
2018-12-06 12:15:58 +02:00
void preferredViewForShortcutsChangedSlot ( Latte : : View * view ) ;
2019-08-26 01:22:22 +03:00
void releaseGrab ( ) ;
2019-06-20 17:42:49 +03:00
void reloadSource ( ) ;
2020-04-05 14:40:32 +03:00
void updateTransientWindowsTracking ( ) ;
2017-01-14 01:59:25 +02:00
void statusChanged ( Plasma : : Types : : ItemStatus ) ;
2017-01-16 14:07:49 -05:00
2020-04-05 14:40:32 +03:00
void addTransientWindow ( QWindow * window ) ;
void removeTransientWindow ( const bool & visible ) ;
2020-05-09 12:26:33 +03:00
//! workaround in order for top panels to be always on top
void topViewAlwaysOnTop ( ) ;
void verticalUnityViewHasFocus ( ) ;
2020-05-11 23:04:44 +03:00
//!workround for when kwin hides view when an activity is closing
void showHiddenViewFromActivityStopping ( ) ;
2017-02-27 00:53:27 +02:00
void restoreConfig ( ) ;
void saveConfig ( ) ;
2017-01-12 18:54:23 -05:00
private :
2017-12-10 19:54:13 +02:00
void initSignalingForLocationChangeSliding ( ) ;
2017-04-25 19:18:49 +03:00
void setupWaylandIntegration ( ) ;
2017-04-23 02:31:36 +03:00
void updateAppletContainsMethod ( ) ;
2017-01-16 14:07:49 -05:00
2019-05-17 21:28:39 +03:00
void setContainsDrag ( bool contains ) ;
2016-12-25 09:25:27 +02:00
private :
2017-02-05 20:55:41 -05:00
Plasma : : Containment * containmentById ( uint id ) ;
2017-01-27 20:03:24 +02:00
2017-08-09 03:33:03 +03:00
bool m_alternativesIsShown { false } ;
2017-05-07 15:06:29 +03:00
bool m_behaveAsPlasmaPanel { false } ;
2018-12-06 15:34:04 +02:00
bool m_byPassWM { true } ;
2019-05-17 21:28:39 +03:00
bool m_containsDrag { false } ;
2019-03-08 16:14:34 +02:00
bool m_containsMouse { false } ;
2017-06-21 22:42:09 +03:00
bool m_inDelete { false } ;
2018-09-22 20:21:57 +03:00
bool m_isPreferredForShortcuts { false } ;
2017-02-27 00:53:27 +02:00
bool m_onPrimary { true } ;
2019-12-29 14:08:07 +02:00
bool m_screenEdgeMarginEnabled { false } ;
2019-04-14 13:25:16 +03:00
2019-08-01 23:56:09 +03:00
bool m_isTouchingBottomViewAndIsBusy { false } ;
bool m_isTouchingTopViewAndIsBusy { false } ;
2019-08-01 18:18:40 +03:00
2018-03-06 22:54:37 +02:00
int m_fontPixelSize { - 1 } ;
2021-02-10 20:13:15 +02:00
int m_maxThickness { 256 } ;
int m_normalThickness { 256 } ;
int m_maxNormalThickness { 256 } ;
2020-05-11 17:31:03 +03:00
int m_headThicknessGap { 0 } ;
2019-12-24 12:35:28 +02:00
int m_screenEdgeMargin { - 1 } ;
2017-01-31 21:25:00 +02:00
float m_maxLength { 1 } ;
2020-04-29 09:54:16 +03:00
float m_offset { 0 } ;
2017-01-16 14:07:49 -05:00
2018-12-07 18:55:35 +02:00
Types : : Alignment m_alignment { Types : : Center } ;
2019-02-11 16:49:10 +02:00
Types : : ViewType m_type { Types : : DockView } ;
2017-02-04 16:41:12 +02:00
2017-03-08 21:00:09 +02:00
QRect m_localGeometry ;
2019-04-23 10:41:35 +03:00
QRect m_absoluteGeometry ;
2018-04-05 10:09:04 +03:00
2021-04-01 11:00:59 +03:00
QString m_name ;
2019-06-08 01:38:27 +03:00
QStringList m_activities ;
2020-03-07 18:30:22 +02:00
//! HACK: In order to avoid crashes when the View is added and removed
//! immediately during startup
QTimer m_initLayoutTimer ;
2019-05-07 22:06:00 +03:00
//! HACK: Timers in order to handle KWin faulty
//! behavior that hides Views when closing Activities
//! with no actual reason
QTimer m_visibleHackTimer1 ;
QTimer m_visibleHackTimer2 ;
2019-08-26 01:22:22 +03:00
QTimer m_releaseGrabTimer ;
int m_releaseGrab_x ;
int m_releaseGrab_y ;
2019-05-08 23:42:06 +03:00
Layout : : GenericLayout * m_layout { nullptr } ;
2020-07-07 18:33:41 +03:00
QQuickItem * m_colorizer { nullptr } ;
2020-12-28 09:51:10 +02:00
2020-06-27 14:42:29 +03:00
QPointer < PlasmaQuick : : ConfigView > m_appletConfigView ;
2020-07-06 14:35:03 +03:00
QPointer < ViewPart : : PrimaryConfigView > m_primaryConfigView ;
2018-01-18 21:21:32 +02:00
2018-12-06 11:37:14 +02:00
QPointer < ViewPart : : ContextMenu > m_contextMenu ;
QPointer < ViewPart : : Effects > m_effects ;
2019-03-23 17:49:09 +02:00
QPointer < ViewPart : : Indicator > m_indicator ;
2019-12-21 18:53:02 +02:00
QPointer < ViewPart : : ContainmentInterface > m_interface ;
2020-12-28 23:36:28 +02:00
QPointer < ViewPart : : Parabolic > m_parabolic ;
2018-12-06 11:37:14 +02:00
QPointer < ViewPart : : Positioner > m_positioner ;
2020-12-29 19:32:25 +02:00
QPointer < ViewPart : : EventsSink > m_sink ;
2018-12-09 00:29:35 +02:00
QPointer < ViewPart : : VisibilityManager > m_visibility ;
2019-02-07 19:15:25 +02:00
QPointer < ViewPart : : WindowsTracker > m_windowsTracker ;
2017-02-26 19:15:20 +02:00
2020-05-12 14:45:31 +03:00
QPointer < Latte : : Interfaces > m_interfacesGraphicObj ;
2019-05-08 23:42:06 +03:00
//! Connections to release and bound for the assigned layout
2019-05-09 23:45:52 +03:00
QList < QMetaObject : : Connection > connectionsLayout ;
2018-01-20 00:34:55 +02:00
2020-04-05 14:40:32 +03:00
//! track transientWindows
QList < QWindow * > m_transientWindows ;
2019-04-12 18:55:45 +03:00
QPointer < Latte : : Corona > m_corona ;
2017-04-25 19:18:49 +03:00
KWayland : : Client : : PlasmaShellSurface * m_shellSurface { nullptr } ;
2016-12-25 09:25:27 +02:00
} ;
2016-12-30 02:20:06 -05:00
}
2016-12-25 09:25:27 +02:00
# endif