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

Last change on this file since 18 was 3, checked in by sgosseli, 12 years ago
  • Add the existing Pacpus files from pacpusdev and pacpuscore.
  • Provide a clean build system based on multiple CMake files.
File size: 2.9 KB
RevLine 
[3]1/*********************************************************************
2// created: 2007/04/12 - 16:30
3//
4// author: Elie Al Alam & Gerald Dherbomez
5// Heudiasyc UMR UTC/CNRS 6599 Copyright
6//
7// version: $Id: $
8//
9// purpose: Dbite Player User interface header file
10*********************************************************************/
11
12#ifndef DBTPLYUSERINTERFACE_H
13#define DBTPLYUSERINTERFACE_H
14
15#include <qwidget.h>
16
17#include "kernel/ComponentBase.h"
18#include "kernel/ComponentFactory.h"
19#include "DbitePlayerConfig.h"
20#include "DbtPlyFileManager.h"
21#include "DbtPlyEngine.h"
22
23class QButtonGroup;
24class QCheckBox;
25class QCloseEvent;
26class QGroupBox;
27class QLabel;
28class QLayout;
29class QPushButton;
30class QSlider;
31class QTableWidget;
32
33namespace pacpus {
34
35class DbtPlyEngine;
36class DbtPlyEngineState;
37
38class DBITE_PLAYER_API DbtPlyUserInterface
39 : public QWidget
40 , public ComponentBase
41{
42 Q_OBJECT
43
44public:
45 /// Constructor.
46 ///
47 /// @param name component name
48 /// @see ComponentBase::ComponentBase(QString)
49 DbtPlyUserInterface(QString name);
50
51 /// Destructor.
52 ~DbtPlyUserInterface();
53
54 /// @returns time slider value
55 int getTime();
56
57 /// sets time slider value to 0
58 void resetTime();
59
60public Q_SLOTS:
61 /// Slot.
62 /// Refreshes the state of the player.
63 void displayStateSlot(DbtPlyEngineState * state, float speed);
64
65 /// Slot.
66 /// Displays the max and min times.
67 void displayMinMaxTime(road_time_t min, road_time_t max);
68
69 /// Slot.
70 /// Displays the current time of the player.
71 void displayTime(road_time_t time);
72
73private:
74 /// Configures the component.
75 virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
76
77 /// Starts component activity.
78 virtual void startActivity();
79
80 /// Stops component activity.
81 virtual void stopActivity();
82
83 void closeEvent(QCloseEvent * e);
84
85 void connectButtons();
86 void connectDisplay();
87 void connectSlider();
88 QLayout * createMainLayout();
89 QGroupBox * createControlGroupBox();
90 QGroupBox * createComponentListGroupBox();
91 void updateComponentList();
92
93private:
94 DbtPlyEngine * mEngine;
95
96 QWidget * wTel_ ;
97 QButtonGroup * butGroup;
98 QPushButton * playBut ;
99 QPushButton * pauseBut ;
100 QPushButton * stopBut ;
101 QPushButton * speedUpBut ;
102 QPushButton * speedDownBut ;
103 QLabel * lab;
104 QCheckBox * rev;
105 QSlider * timeSlider;
106 QLabel * timeMinTitle;
107 QLabel * timeMinValue;
108 QLabel * timeMaxTitle;
109 QLabel * timeMaxValue;
110 QLabel * timeCurTitle;
111 QLabel * timeCurValue;
112
113 QTableWidget * componentTableWidget;
114
115 // current max time
116 road_time_t tMax_;
117 // current min time
118 road_time_t tMin_;
119 // current absolute time
120 road_time_t absTime_;
121 // current relative time
122 int relTime_;
123};
124
125} // namespace pacpus
126
127#endif // DBTPLYUSERINTERFACE_H
Note: See TracBrowser for help on using the repository browser.