Skip to content
Snippets Groups Projects
Commit db64cc9b authored by Philip Scherer's avatar Philip Scherer
Browse files

Make cosmetic improvements to prediction GUI

parent 113c9865
No related branches found
No related tags found
1 merge request!254Add GUI for armem predictions to MemoryViewer
...@@ -40,29 +40,31 @@ namespace armarx::armem::gui ...@@ -40,29 +40,31 @@ namespace armarx::armem::gui
timestampLayout(new QHBoxLayout()), timestampLayout(new QHBoxLayout()),
instanceSpinner(new QSpinBox()), instanceSpinner(new QSpinBox()),
predictionEngineSelector(new QComboBox()), predictionEngineSelector(new QComboBox()),
predictButton(new QPushButton("Copy prediction to clipboard")), predictButton(new QPushButton("Make prediction")),
entityInfoRetriever(std::move(entityInfoRetriever)) entityInfoRetriever(std::move(entityInfoRetriever))
{ {
auto* vlayout = new QVBoxLayout(); auto* vlayout = new QVBoxLayout();
// memoryEntity->editingFinished()
auto* hlayout = new QHBoxLayout(); auto* hlayout = new QHBoxLayout();
hlayout->addWidget(memoryEntity);
hlayout->addWidget(new QLabel("Entity ID")); hlayout->addWidget(new QLabel("Entity ID"));
hlayout->addWidget(memoryEntity);
vlayout->addLayout(hlayout); vlayout->addLayout(hlayout);
timestampInputSelector->addItems({"Absolute", "Relative to now"}); timestampInputSelector->addItems({"Absolute", "Relative to now"});
timestampLayout->addWidget(new QLabel("Prediction time"));
timestampLayout->addWidget(timestampInputSelector); timestampLayout->addWidget(timestampInputSelector);
vlayout->addLayout(timestampLayout); vlayout->addLayout(timestampLayout);
hlayout = new QHBoxLayout(); hlayout = new QHBoxLayout();
hlayout->addWidget(predictionEngineSelector);
hlayout->addWidget(new QLabel("Prediction engine")); hlayout->addWidget(new QLabel("Prediction engine"));
hlayout->addWidget(predictionEngineSelector);
hlayout->addStretch();
vlayout->addLayout(hlayout); vlayout->addLayout(hlayout);
vlayout->addWidget(predictButton); vlayout->addWidget(predictButton);
addTimestampInputMethod("Absolute", new AbsoluteTimestampInput()); addTimestampInputMethod("Absolute", new AbsoluteTimestampInput());
addTimestampInputMethod("Relative to now", new RelativeTimestampInput()); addTimestampInputMethod("Relative to now", new RelativeTimestampInput());
timestampLayout->addStretch();
setLayout(vlayout); setLayout(vlayout);
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <QDateTimeEdit> #include <QDateTimeEdit>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel>
#include <RobotAPI/libraries/armem_gui/gui_utils.h> #include <RobotAPI/libraries/armem_gui/gui_utils.h>
...@@ -41,7 +42,9 @@ namespace armarx::armem::gui ...@@ -41,7 +42,9 @@ namespace armarx::armem::gui
static_cast<int>((QDateTime::currentMSecsSinceEpoch() % 1000) * 1000)); static_cast<int>((QDateTime::currentMSecsSinceEpoch() % 1000) * 1000));
auto* hlayout = new QHBoxLayout(); auto* hlayout = new QHBoxLayout();
hlayout->addWidget(new QLabel("Time"));
hlayout->addWidget(dateTime); hlayout->addWidget(dateTime);
hlayout->addWidget(new QLabel("µs"));
hlayout->addWidget(microseconds); hlayout->addWidget(microseconds);
setLayout(hlayout); setLayout(hlayout);
} }
...@@ -60,6 +63,7 @@ namespace armarx::armem::gui ...@@ -60,6 +63,7 @@ namespace armarx::armem::gui
seconds->setValue(0); seconds->setValue(0);
auto* hlayout = new QHBoxLayout(); auto* hlayout = new QHBoxLayout();
hlayout->addWidget(new QLabel("Seconds"));
hlayout->addWidget(seconds); hlayout->addWidget(seconds);
setLayout(hlayout); setLayout(hlayout);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment