Qt 5.10 Book Examples
chapter60
PaintElement
Ellipse.h
Go to the documentation of this file.
1
// ======================================================================
2
// Calculation.h
3
// ======================================================================
4
// This file is a part of the book
5
// "Qt 5.10 Professional programming with C++"
6
// http://qt-book.com
7
// ======================================================================
8
// Copyright (c) 2017 by Max Schlee
9
// ======================================================================
10
11
#pragma once
12
13
#include <QQuickPaintedItem>
14
15
class
QPainter;
16
17
// ======================================================================
18
class
Ellipse
:
public
QQuickPaintedItem {
19
Q_OBJECT
20
private
:
21
Q_PROPERTY(QColor
color
WRITE
setColorValue
22
READ
colorValue
23
)
24
QColor m_color;
25
26
public:
27
Ellipse
(QQuickItem* pqi = 0);
28
void
paint
(QPainter* ppainter);
29
30
QColor
colorValue
( ) const;
31
void
setColorValue
(const QColor&);
32
};
33
Ellipse::color
QColor color
Definition:
Ellipse.h:23
Ellipse::colorValue
QColor colorValue() const
Definition:
Ellipse.cpp:30
Ellipse
Definition:
Ellipse.h:18
Ellipse::setColorValue
void setColorValue(const QColor &)
Definition:
Ellipse.cpp:36
Ellipse::paint
void paint(QPainter *ppainter)
Definition:
Ellipse.cpp:21
Generated by
1.8.14