2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#ifndef CONTROLLER_H
|
|
|
|
#define CONTROLLER_H
|
|
|
|
|
2023-12-21 12:09:09 +00:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QLabel>
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#include "car_interface.h"
|
|
|
|
|
|
|
|
class Controller : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-03-13 13:21:04 +00:00
|
|
|
explicit Controller(QWidget *parent = nullptr);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
protected:
|
2023-03-13 13:21:04 +00:00
|
|
|
void timerEvent(QTimerEvent *event) override;
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
private:
|
2012-08-02 18:49:12 +00:00
|
|
|
org::example::Examples::CarInterface *car;
|
2023-12-21 12:09:09 +00:00
|
|
|
QPushButton *accelerate;
|
|
|
|
QPushButton *decelerate;
|
|
|
|
QPushButton *left;
|
|
|
|
QPushButton *right;
|
|
|
|
QLabel *statusSymbol;
|
|
|
|
QLabel *status;
|
2011-04-27 10:05:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|