KDeclarative

settinghighlighterprivate.h
1 /*
2  SPDX-FileCopyrightText: 2020 Kevin Ottens <[email protected]>
3  SPDX-FileCopyrightText: 2020 Cyril Rossi <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef SETTINGSHIGHLIGHTERPRIVATE_H
9 #define SETTINGSHIGHLIGHTERPRIVATE_H
10 
11 #include <QQuickItem>
12 #include <QPointer>
13 
14 class SettingHighlighterPrivate : public QObject
15 {
16  Q_OBJECT
17  Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged)
18  Q_PROPERTY(bool highlight READ highlight WRITE setHighlight NOTIFY highlightChanged)
19  Q_PROPERTY(bool defaultIndicatorVisible READ defaultIndicatorVisible WRITE setDefaultIndicatorVisible NOTIFY defaultIndicatorVisibleChanged)
20 
21 public:
22  using QObject::QObject;
23 
24  QQuickItem *target() const;
25  void setTarget(QQuickItem *target);
26 
27  bool highlight() const;
28  void setHighlight(bool highlight);
29 
30  bool defaultIndicatorVisible() const;
31  void setDefaultIndicatorVisible(bool enabled);
32 
33 Q_SIGNALS:
34  void targetChanged();
35  void highlightChanged();
36  void defaultIndicatorVisibleChanged(bool enabled);
37 
38 public Q_SLOTS:
39  void updateTarget();
40 
41 private:
42  QPointer<QQuickItem> m_target = nullptr;
43  QPointer<QQuickItem> m_styleTarget = nullptr;
44  bool m_highlight = false;
45  bool m_enabled = false;
46 };
47 
48 #endif
Q_SIGNALSQ_SIGNALS
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
QObject(QObject *parent)
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:44:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.