Qt 5.10 Book Examples
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 
QColor color
Definition: Ellipse.h:23
QColor colorValue() const
Definition: Ellipse.cpp:30
void setColorValue(const QColor &)
Definition: Ellipse.cpp:36
void paint(QPainter *ppainter)
Definition: Ellipse.cpp:21