Plasma-framework

configview.h
1/*
2 SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef CONFIGVIEW_H
8#define CONFIGVIEW_H
9
10#include <QQuickView>
11#include <QScopedPointer>
12
13#include <plasmaquick/plasmaquick_export.h>
14#include <qquickitem.h>
15
16//
17// W A R N I N G
18// -------------
19//
20// This file is not part of the public Plasma API. It exists purely as an
21// implementation detail. This header file may change from version to
22// version without notice, or even be removed.
23//
24// We mean it.
25//
26
27namespace Plasma
28{
29class Applet;
30}
31
32namespace PlasmaQuick
33{
34class ConfigViewPrivate;
35
36class ConfigModel;
37
38class PLASMAQUICK_EXPORT ConfigView : public QQuickWindow
39{
40 Q_OBJECT
41 Q_PROPERTY(PlasmaQuick::ConfigModel *configModel READ configModel CONSTANT)
42 Q_PROPERTY(QString appletGlobalShortcut READ appletGlobalShortcut WRITE setAppletGlobalShortcut NOTIFY appletGlobalShortcutChanged)
43
44public:
45 /**
46 * @param applet the applet of this ConfigView
47 * @param parent the QWindow in which this ConfigView is parented to
48 **/
49 ConfigView(Plasma::Applet *applet, QWindow *parent = nullptr);
50 ~ConfigView() override;
51
52 QQmlEngine *engine();
53 QQmlContext *rootContext();
54 void setSource(const QUrl &src);
55 QQuickItem *rootObject();
56
57 virtual void init();
58
59 Plasma::Applet *applet();
60
61 QString appletGlobalShortcut() const;
62 void setAppletGlobalShortcut(const QString &shortcut);
63
64 /**
65 * @return the ConfigModel of the ConfigView
66 **/
67 PlasmaQuick::ConfigModel *configModel() const;
68
69Q_SIGNALS:
70 void appletGlobalShortcutChanged();
71
72protected:
73 void hideEvent(QHideEvent *ev) override;
74 void resizeEvent(QResizeEvent *re) override;
75
76private:
78
79 Q_PRIVATE_SLOT(d, void updateMinimumWidth())
80 Q_PRIVATE_SLOT(d, void updateMinimumHeight())
81 Q_PRIVATE_SLOT(d, void updateMaximumWidth())
82 Q_PRIVATE_SLOT(d, void updateMaximumHeight())
83 Q_PRIVATE_SLOT(d, void updateTitle())
84};
85
86}
87
88#endif // multiple inclusion guard
This model contains all the possible config categories for a dialog, such as categories of the config...
Definition configmodel.h:51
The base Applet class.
Definition applet.h:64
The EdgeEventForwarder class This class forwards edge events to be replayed within the given margin T...
Definition action.h:20
Namespace for everything in libplasma.
QCA_EXPORT void init()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:54:11 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.