108 return "Visualization.ArViz";
112 void onInitComponent()
override;
113 void onExitComponent()
override;
115 void onConnectComponent()
override;
116 void onDisconnectComponent()
override;
118 void onGetBatchAsync(viz::data::RecordingBatch
const& batch);
123 void updateLayersFromProfile();
134 void onDisconnectGui();
136 void layersChanged(std::vector<viz::CoinLayerID>
const& layers);
137 void layerTreeChanged(QTreeWidgetItem* item,
int column);
138 void updateSelectedLayer(QTreeWidgetItem* current, QTreeWidgetItem* previous);
140 void onCollapseAll(
bool);
141 void onExpandAll(
bool);
143 void onHideAll(
bool);
144 void onShowAll(
bool);
145 void onHideFiltered(
bool);
146 void onShowFiltered(
bool);
148 void onFilterTextChanged(QString
const& filter);
150 void showAllLayers(
bool visible);
151 void showFilteredLayers(
bool visible);
153 void onDeselectElement();
154 void onContextMenuClicked();
155 void onInteractiveElementSelected(QListWidgetItem* item);
158 void onTimingObserverUpdate();
163 void onStartRecording();
164 void onStopRecording();
166 void onRefreshRecordings();
167 void onRecordingSelectionChanged(QListWidgetItem* current, QListWidgetItem* previous);
169 void onReplaySpinChanged(
int newValue);
170 void onReplaySliderChanged(
int newValue);
172 void selectRecording(viz::data::Recording
const& recording);
174 void onReplayStart(
bool);
175 void onReplayStop(
bool);
176 long replayToRevision(
long revision);
177 long getRevisionForTimestamp(
long timestamp);
178 void onReplayTimedStart(
bool checked);
179 void onReplayTimerTick();
183 void enableWidgetAccordingToMode();
187 std::unique_ptr<Ui::ArVizWidget> widget;
189 QPointer<SimpleConfigDialog> configDialog;
196 long replayCurrentTimestamp = 0;
197 long lastReplayRealTime = 0;
199 std::string storageName;
200 armarx::viz::StorageInterfacePrx storage;
201 std::string debugObserverName;
207 viz::data::RecordingSeq allRecordings;
210 viz::data::Recording currentRecording;
211 long currentRevision = -1;
212 long currentTimestamp = -1;
213 bool currentRecordingSelected =
false;
216 struct TimestampedRecordingBatch
218 IceUtil::Time lastUsed;
219 viz::data::RecordingBatch
data;
222 viz::data::RecordingBatch
const& getRecordingBatch(
long index);
223 void limitRecordingBatchCacheSize();
225 std::size_t recordingBatchCacheMaxSize = 5;
226 std::mutex recordingBatchCacheMutex;
227 std::atomic<long> recordingWaitingForBatchIndex = -1;
228 std::map<long, TimestampedRecordingBatch> recordingBatchCache;
233 armarx::viz::Callback_StorageInterface_getRecordingBatchPtr callback;
234 Ice::AsyncResultPtr callbackResult;
236 std::vector<double> timings;
244 return QIcon(
":icons/ArViz.png");