KCMUtils

settinghighlighterprivate.h
1/*
2 SPDX-FileCopyrightText: 2020 Kevin Ottens <kevin.ottens@enioka.com>
3 SPDX-FileCopyrightText: 2020 Cyril Rossi <cyril.rossi@enioka.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef SETTINGSHIGHLIGHTERPRIVATE_H
9#define SETTINGSHIGHLIGHTERPRIVATE_H
10
11#include <QPointer>
12#include <QQmlParserStatus>
13#include <QQuickItem>
14
15class SettingHighlighterPrivate : public QObject, public QQmlParserStatus
16{
18 QML_ELEMENT
19 Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged)
20 Q_PROPERTY(bool highlight READ highlight WRITE setHighlight NOTIFY highlightChanged)
21 Q_PROPERTY(bool defaultIndicatorVisible READ defaultIndicatorVisible WRITE setDefaultIndicatorVisible NOTIFY defaultIndicatorVisibleChanged)
23public:
24 using QObject::QObject;
25
26 QQuickItem *target() const;
27 void setTarget(QQuickItem *target);
28
29 bool highlight() const;
30 void setHighlight(bool highlight);
31
32 bool defaultIndicatorVisible() const;
33 void setDefaultIndicatorVisible(bool enabled);
34
36 void targetChanged();
37 void highlightChanged();
38 void defaultIndicatorVisibleChanged(bool enabled);
39
40private:
41 void updateTarget();
42
43 void classBegin() override
44 {
45 }
46 void componentComplete() override;
47
48 bool m_isComponentComplete = false;
49
50 QPointer<QQuickItem> m_target = nullptr;
51 QPointer<QQuickItem> m_styleTarget = nullptr;
52 bool m_highlight = false;
53 bool m_enabled = false;
54};
55
56#endif
QObject(QObject *parent)
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.