File indexing completed on 2024-07-21 04:58:12

0001 /*
0002     SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef VIEWSETTINGSFACTORY_H
0007 #define VIEWSETTINGSFACTORY_H
0008 
0009 //Qt
0010 #include <QObject>
0011 #include <QPointer>
0012 
0013 namespace Plasma {
0014 class Containment;
0015 }
0016 
0017 
0018 namespace Latte {
0019 class View;
0020 
0021 namespace ViewPart {
0022 class PrimaryConfigView;
0023 class WidgetExplorerView;
0024 }
0025 
0026 }
0027 
0028 namespace Latte {
0029 
0030 class ViewSettingsFactory : public QObject
0031 {
0032     Q_OBJECT
0033 
0034 public:
0035     ViewSettingsFactory(QObject *parent);
0036     ~ViewSettingsFactory() override;
0037 
0038     bool hasOrphanSettings() const;
0039     bool hasVisibleSettings() const;
0040 
0041     ViewPart::PrimaryConfigView *primaryConfigView();
0042 
0043     Plasma::Containment *lastContainment();
0044     ViewPart::PrimaryConfigView *primaryConfigView(Latte::View *view);
0045     ViewPart::WidgetExplorerView *widgetExplorerView(Latte::View *view);
0046 
0047 private:
0048     QPointer<ViewPart::PrimaryConfigView> m_primaryConfigView;
0049     QPointer<Plasma::Containment> m_lastContainment;
0050 
0051 };
0052 
0053 }
0054 
0055 #endif