source: pacpusframework/trunk/include/Pacpus/DbitePlayer/DbtPlyUserInterface.h@ 52

Last change on this file since 52 was 31, checked in by sgosseli, 12 years ago

Huge commit: use the new includes style in all the files, add the license header in all the headers, and in some cpp.

File size: 2.9 KB
RevLine 
[31]1/**
2 *
3 * Distributed under the UTC Heudiascy Pacpus License, Version 1.0.
4 * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved.
5 *
6 * See the LICENSE file for more information or a copy at:
7 * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt
8 *
9 */
[3]10
[31]11#ifndef DEF_PACPUS_DBTPLYUSERINTERFACE_H
12#define DEF_PACPUS_DBTPLYUSERINTERFACE_H
[3]13
[31]14#include <QWidget>
[3]15
[31]16#include <Pacpus/kernel/ComponentBase.h>
17#include <Pacpus/kernel/ComponentFactory.h>
18#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
19#include <Pacpus/DbitePlayer/DbtPlyFileManager.h>
20#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
[3]21
22class QButtonGroup;
23class QCheckBox;
24class QCloseEvent;
25class QGroupBox;
26class QLabel;
27class QLayout;
28class QPushButton;
29class QSlider;
30class QTableWidget;
31
32namespace pacpus {
33
34class DbtPlyEngine;
35class DbtPlyEngineState;
36
37class DBITE_PLAYER_API DbtPlyUserInterface
38 : public QWidget
39 , public ComponentBase
40{
41 Q_OBJECT
42
43public:
44 /// Constructor.
45 ///
46 /// @param name component name
47 /// @see ComponentBase::ComponentBase(QString)
48 DbtPlyUserInterface(QString name);
49
50 /// Destructor.
51 ~DbtPlyUserInterface();
52
53 /// @returns time slider value
54 int getTime();
55
56 /// sets time slider value to 0
57 void resetTime();
58
59public Q_SLOTS:
60 /// Slot.
61 /// Refreshes the state of the player.
62 void displayStateSlot(DbtPlyEngineState * state, float speed);
63
64 /// Slot.
65 /// Displays the max and min times.
66 void displayMinMaxTime(road_time_t min, road_time_t max);
67
68 /// Slot.
69 /// Displays the current time of the player.
70 void displayTime(road_time_t time);
71
72private:
73 /// Configures the component.
74 virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
75
76 /// Starts component activity.
77 virtual void startActivity();
78
79 /// Stops component activity.
80 virtual void stopActivity();
81
82 void closeEvent(QCloseEvent * e);
83
84 void connectButtons();
85 void connectDisplay();
86 void connectSlider();
87 QLayout * createMainLayout();
88 QGroupBox * createControlGroupBox();
89 QGroupBox * createComponentListGroupBox();
90 void updateComponentList();
91
92private:
93 DbtPlyEngine * mEngine;
94
95 QWidget * wTel_ ;
96 QButtonGroup * butGroup;
97 QPushButton * playBut ;
98 QPushButton * pauseBut ;
99 QPushButton * stopBut ;
100 QPushButton * speedUpBut ;
101 QPushButton * speedDownBut ;
102 QLabel * lab;
103 QCheckBox * rev;
104 QSlider * timeSlider;
105 QLabel * timeMinTitle;
106 QLabel * timeMinValue;
107 QLabel * timeMaxTitle;
108 QLabel * timeMaxValue;
109 QLabel * timeCurTitle;
110 QLabel * timeCurValue;
111
112 QTableWidget * componentTableWidget;
113
114 // current max time
115 road_time_t tMax_;
116 // current min time
117 road_time_t tMin_;
118 // current absolute time
119 road_time_t absTime_;
120 // current relative time
121 int relTime_;
122};
123
124} // namespace pacpus
125
[31]126#endif // DEF_PACPUS_DBTPLYUSERINTERFACE_H
Note: See TracBrowser for help on using the repository browser.