#include <controller.h>
Inheritance diagram for Controller:


Definition at line 31 of file controller.h.
Public Member Functions | |
| Controller (QWidget *parent=0) | |
Protected Member Functions | |
| void | timerEvent (QTimerEvent *event) |
Private Slots | |
| void | on_accelerate_clicked () |
| void | on_decelerate_clicked () |
| void | on_left_clicked () |
| void | on_right_clicked () |
Private Attributes | |
| Ui::Controller | ui |
| CarInterface * | car |
| Controller::Controller | ( | QWidget * | parent = 0 |
) |
Definition at line 29 of file controller.cpp.
References car, QDBusConnection::sessionBus(), QObject::startTimer(), and ui.
00030 : QWidget(parent) 00031 { 00032 ui.setupUi(this); 00033 car = new CarInterface("com.trolltech.CarExample", "/Car", 00034 QDBusConnection::sessionBus(), this); 00035 startTimer(1000); 00036 }
Here is the call graph for this function:

| void Controller::timerEvent | ( | QTimerEvent * | event | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive timer events for the object.
QTimer provides a higher-level interface to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.
Reimplemented from QObject.
Definition at line 38 of file controller.cpp.
References car, QWidget::event(), QDBusAbstractInterface::isValid(), and ui.
00039 { 00040 Q_UNUSED(event); 00041 if (car->isValid()) 00042 ui.label->setText("connected"); 00043 else 00044 ui.label->setText("disconnected"); 00045 }
Here is the call graph for this function:

| void Controller::on_accelerate_clicked | ( | ) | [private, slot] |
Definition at line 47 of file controller.cpp.
References CarInterface::accelerate(), and car.
00048 { 00049 car->accelerate(); 00050 }
| void Controller::on_decelerate_clicked | ( | ) | [private, slot] |
Definition at line 52 of file controller.cpp.
References car, and CarInterface::decelerate().
00053 { 00054 car->decelerate(); 00055 }
| void Controller::on_left_clicked | ( | ) | [private, slot] |
| void Controller::on_right_clicked | ( | ) | [private, slot] |
Ui::Controller Controller::ui [private] |
CarInterface* Controller::car [private] |
Definition at line 49 of file controller.h.
Referenced by Controller(), on_accelerate_clicked(), on_decelerate_clicked(), on_left_clicked(), on_right_clicked(), and timerEvent().
1.5.1