26 #pragma GCC diagnostic push
27 #pragma GCC diagnostic ignored "-Wpedantic"
28 #include <ArmarXGui/gui-plugins/PlotterPlugin/ui_ArmarXPlotter.h>
29 #pragma GCC diagnostic pop
38 #include <ArmarXCore/interface/observers/ConditionHandlerInterface.h>
43 #include <ArmarXCore/interface/components/TopicRecorderInterface.h>
63 class ArmarXPlotterDialog;
73 public TopicReplayerListenerInterface
85 if (!ui.btnLogToFile->isChecked())
88 ui.btnLogToFile->setChecked(
true);
96 void onStopReply(
const Ice::Current&
c = Ice::emptyCurrent)
override
103 if (ui.btnLogToFile->isChecked())
105 ui.btnLogToFile->setChecked(
false);
113 Ui::ArmarXPlotter
ui;
125 return "Observers.LivePlotter";
129 return QIcon(
"://icons/combo_chart.svg");
131 void loadSettings(QSettings* settings)
override;
132 void saveSettings(QSettings* settings)
override;
136 void onInitComponent()
override;
137 void onConnectComponent()
override;
138 void onExitComponent()
override;
143 void onCloseWidget(QCloseEvent* event);
144 QwtPlotCurve* createCurve(
const QString& label);
145 QwtThermo* createBar(
const QString& label);
149 void ButtonAddSensorChannelClicked();
152 void toggleLogging(
bool toggled);
153 void onGraphStyleChanged(
const QString& style);
154 void logToFile(
long timestamp,
const std::map<std::string, VariantPtr>& dataMaptoAppend);
160 QDateTime startUpTime;
161 std::map< std::string, ObserverInterfacePrx> proxyMap;
162 bool __plottingPaused;
165 std::mutex dataMutex;
166 bool syncDataLogging;
167 std::vector<std::string> csvHeader;
168 std::ofstream logstream;
174 std::mutex fileMutex;