File indexing completed on 2025-02-16 08:16:11
0001 /* 0002 SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef CANVASCONFIGVIEW_H 0007 #define CANVASCONFIGVIEW_H 0008 0009 // local 0010 #include "subconfigview.h" 0011 0012 //Qt 0013 #include <QObject> 0014 #include <QQuickView> 0015 #include <QPointer> 0016 #include <QTimer> 0017 0018 // Plasma 0019 #include <plasma/package.h> 0020 #include <Plasma/FrameSvg> 0021 0022 0023 namespace Plasma { 0024 class Applet; 0025 class Containment; 0026 class FrameSvg; 0027 class Types; 0028 } 0029 0030 namespace KWayland { 0031 namespace Client { 0032 class PlasmaShellSurface; 0033 } 0034 } 0035 0036 namespace Latte { 0037 class Corona; 0038 class View; 0039 } 0040 0041 namespace Latte { 0042 namespace ViewPart { 0043 class PrimaryConfigView; 0044 } 0045 } 0046 0047 namespace Latte { 0048 namespace ViewPart { 0049 0050 class CanvasConfigView : public SubConfigView 0051 { 0052 Q_OBJECT 0053 0054 public: 0055 CanvasConfigView(Latte::View *view, PrimaryConfigView *parent); 0056 0057 QRect geometryWhenVisible() const; 0058 0059 void hideConfigWindow(); 0060 0061 public slots: 0062 Q_INVOKABLE void syncGeometry() override; 0063 0064 signals: 0065 void showSignal(); 0066 0067 protected: 0068 void showEvent(QShowEvent *ev) override; 0069 void focusOutEvent(QFocusEvent *ev) override; 0070 bool event(QEvent *ev) override; 0071 0072 void init() override; 0073 void initParentView(Latte::View *view) override; 0074 void updateEnabledBorders() override; 0075 0076 private: 0077 QRect m_geometryWhenVisible; 0078 0079 QPointer<PrimaryConfigView> m_parent; 0080 }; 0081 0082 } 0083 } 0084 #endif //CANVASSECONDARYCONFIGVIEW_H 0085