summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/stardelegate/starrating.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-11-22 21:21:25 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-04 07:00:44 +0000
commit1cfe064632099e036f964832c23afe266e54d59e (patch)
treeda3fe64e73993b8df89547f7db1fa53625ae04f8 /examples/widgets/itemviews/stardelegate/starrating.h
parent51f6d5d8c261fb94adc9bf5754cabf8e37236af5 (diff)
Cleanup StarDelegate example
Cleanup the StarDelegate example: - use QStyledItemDelegate instead QItemDelegate - use nullptr and other useful c++11 constructs - include the correct headers Change-Id: If2f65fe7cbdcdd4571d10ffa98d36eeab7836bbb Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Diffstat (limited to 'examples/widgets/itemviews/stardelegate/starrating.h')
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/widgets/itemviews/stardelegate/starrating.h b/examples/widgets/itemviews/stardelegate/starrating.h
index fa77311914..fc3028db58 100644
--- a/examples/widgets/itemviews/stardelegate/starrating.h
+++ b/examples/widgets/itemviews/stardelegate/starrating.h
@@ -51,15 +51,15 @@
#ifndef STARRATING_H
#define STARRATING_H
-#include <QMetaType>
-#include <QPointF>
-#include <QVector>
+#include <QPainter>
+#include <QPolygonF>
+#include <QSize>
//! [0]
class StarRating
{
public:
- enum EditMode { Editable, ReadOnly };
+ enum class EditMode { Editable, ReadOnly };
explicit StarRating(int starCount = 1, int maxStarCount = 5);