Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
highlight.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef HIGHLIGHT_H
5#define HIGHLIGHT_H
6
7#include <QtCore/QPointer>
8#include <QtCore/QPointF>
9#include <QtGui/QTransform>
10#include <QtQuick/QQuickPaintedItem>
11
13
14namespace QmlJSDebugger {
15
17{
19
20public:
23
24 void setItem(QQuickItem *item);
25 QQuickItem *item() {return m_item;}
26
27protected:
28 QTransform transform() {return m_transform;}
29
30private:
31 void initRenderDetails();
32 void adjust();
33
34private:
35 QPointer<QQuickItem> m_item;
36 QTransform m_transform;
37};
38
43{
45
46public:
48 void paint(QPainter *painter) override;
49 void showName(const QPointF &displayPoint);
50
51private:
52 QPointF m_displayPoint;
53 QString m_name;
54 bool m_nameDisplayActive;
55
56 void disableNameDisplay();
57};
58
63{
64public:
67 {
68 setZ(1); // hover highlight on top of selection highlight
69 }
70
71 void paint(QPainter *painter) override;
72};
73
74} // namespace QmlJSDebugger
75
77
78#endif // HIGHLIGHT_H
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
Definition qquickitem.h:67
void setZ(qreal)
The QQuickPaintedItem class provides a way to use the QPainter API in the QML Scene Graph.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
void setItem(QQuickItem *item)
Definition highlight.cpp:33
Highlight(QQuickItem *parent)
Definition highlight.cpp:15
QQuickItem * item()
Definition highlight.h:25
QTransform transform()
Definition highlight.h:28
HoverHighlight(QQuickItem *parent)
Definition highlight.h:65
SelectionHighlight(const QString &name, QQuickItem *item, QQuickItem *parent)
void showName(const QPointF &displayPoint)
QPainter paint
Combined button and popup list for selecting options.
GLuint name
#define Q_OBJECT
QPainter painter(this)
[7]