summaryrefslogtreecommitdiffstats
path: root/examples/dbus/remotecontrolledcar/car/car.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dbus/remotecontrolledcar/car/car.h')
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/examples/dbus/remotecontrolledcar/car/car.h b/examples/dbus/remotecontrolledcar/car/car.h
index 44654f6647..5a1e199ae0 100644
--- a/examples/dbus/remotecontrolledcar/car/car.h
+++ b/examples/dbus/remotecontrolledcar/car/car.h
@@ -12,25 +12,23 @@ class Car : public QGraphicsObject
Q_OBJECT
public:
Car();
- QRectF boundingRect() const;
+ QRectF boundingRect() const override;
-public Q_SLOTS:
+public slots:
void accelerate();
void decelerate();
void turnLeft();
void turnRight();
-Q_SIGNALS:
- void crashed();
-
protected:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
- void timerEvent(QTimerEvent *event);
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget = nullptr) override;
+ void timerEvent(QTimerEvent *event) override;
private:
- QBrush color;
- qreal wheelsAngle; // used when applying rotation
- qreal speed; // delta movement along the body axis
+ QBrush color = Qt::green;
+ qreal wheelsAngle = 0; // used when applying rotation
+ qreal speed = 0; // delta movement along the body axis
};
#endif // CAR_H