TopicReplayerWidgetController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ArmarXGui::gui-plugins::TopicReplayerWidgetController
17  * @author Stefan Reither ( stef dot reither at web dot de )
18  * @date 2016
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <ArmarXGui/gui-plugins/TopicReplayerPlugin/ui_TopicReplayerWidget.h>
26 
29 
32 
34 
35 #include <QTimer>
36 
37 namespace armarx
38 {
64  public ArmarXComponentWidgetControllerTemplate<TopicReplayerWidgetController>
65  {
66  Q_OBJECT
67 
68  public:
73 
78 
82  void loadSettings(QSettings* settings) override;
83 
87  void saveSettings(QSettings* settings) override;
88 
93  static QString GetWidgetName()
94  {
95  return "Meta.TopicReplayer";
96  }
97 
101  void onInitComponent() override;
102 
106  void onConnectComponent() override;
107 
108  public slots:
109  /* QT slot declarations */
110 
111  signals:
112  /* QT signal declarations */
113 
114  private slots:
115  void loadFile();
116  void loopReplay();
117  void pauseReplay();
118  void resumeReplay();
119 
120  void setReplaySpeed();
121 
122  void replaySpeedSliderChanged();
123  void replaySpeedSpinBoxChanged();
124  void replayPositionSliderChanged();
125  void updateReplayPositionSlider();
126 
127  void stopSliderUpdater();
128  void startSliderUpdater();
129 
130  void jumpToPosition();
131 
132  private:
136  Ui::TopicReplayerWidget widget;
137 
139  IceUtil::Time replayLength;
140 
141  int replayPositionSliderUpdaterTimer;
142 
143  void fillListOfRecordedTopics();
144  void setPausedGuiMode();
145  void setPlayingGuiMode();
146 
147  void setUpReplayPositionSlider();
148 
149  void onDisconnectComponent() override;
150  void timerEvent(QTimerEvent* event) override;
151 
152  };
153 }
154 
armarx::TopicReplayerWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: TopicReplayerWidgetController.h:93
armarx::TopicReplayerWidgetController
TopicReplayerWidgetController is the controller of the widget of the TopicReplayerGui.
Definition: TopicReplayerWidgetController.h:62
PeriodicTask.h
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
IceInternal::Handle
Definition: forward_declarations.h:8
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
TopicReplayer.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
ImportExportComponent.h