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