Skip to content
Snippets Groups Projects
Commit 54ef84ca authored by Joana Plewnia's avatar Joana Plewnia
Browse files

added GUI elements for changing export path and name to MemoryViewer/QueryWidget

- is not connected yet
parent 049e9756
No related branches found
No related tags found
1 merge request!422Draft: Memory Viewer LTM Recording Progress bar
Pipeline #17280 passed
......@@ -13,6 +13,7 @@
#include <QVBoxLayout>
#include <QWidget>
#include <QScrollArea>
#include <QLineEdit>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
......@@ -60,18 +61,47 @@ namespace armarx::armem::gui
vboxlayout->addWidget(_dropDisabledCheckBox);
auto* recDepthHLayout = new QHBoxLayout();
_recursionDepthLabel = new QLabel("Link resolution depth:");
recDepthHLayout->addWidget(_recursionDepthLabel);
_recursionDepthLabel->setFixedWidth(200);
_recursionDepthSpinner = new QSpinBox(); // NOLINT
_recursionDepthSpinner->setRange(-1, std::numeric_limits<int>::max());
_recursionDepthSpinner->setValue(0);
_recursionDepthSpinner->setEnabled(_dataCheckBox->isChecked());
_recursionDepthSpinner->setSpecialValueText(QString("Unlimited"));
recDepthHLayout->addWidget(_recursionDepthSpinner);
_recursionDepthLabel = new QLabel("Link resolution depth");
recDepthHLayout->addWidget(_recursionDepthLabel);
recDepthHLayout->addStretch();
vboxlayout->addLayout(recDepthHLayout);
auto* exportPathHLayout = new QHBoxLayout();
_exportPathLabel = new QLabel("Export path:");
exportPathHLayout->addWidget(_exportPathLabel);
_exportPathLabel->setFixedWidth(200);
_exportPathLineEdit = new QLineEdit();
exportPathHLayout->addWidget(_exportPathLineEdit);
exportPathHLayout->setStretchFactor(_exportPathLineEdit, 4);
_exportPathConfirmButton = new QPushButton("Confirm Path");
exportPathHLayout->addWidget(_exportPathConfirmButton);
_exportPathConfirmButton->setFixedWidth(100);
vboxlayout->addLayout(exportPathHLayout);
auto* exportNameHLayout = new QHBoxLayout();
_exportNameLabel = new QLabel("Export name:");
exportNameHLayout->addWidget(_exportNameLabel);
_exportNameLabel->setFixedWidth(200);
_exportNameLineEdit = new QLineEdit();
exportNameHLayout->addWidget(_exportNameLineEdit);
exportNameHLayout->setStretchFactor(_exportNameLineEdit, 4);
_exportNameConfirmButton = new QPushButton("Confirm Name");
exportNameHLayout->addWidget(_exportNameConfirmButton);
_exportNameConfirmButton->setFixedWidth(100);
vboxlayout->addLayout(exportNameHLayout);
auto ltmButtonsLayout = new QVBoxLayout();
_storeInLTMButton = new QPushButton("Query and store in LTM");
ltmButtonsLayout->addWidget(_storeInLTMButton);
......@@ -91,6 +121,12 @@ namespace armarx::armem::gui
vlayout->addLayout(hlayout);
// Public connections.
connect(_exportPathConfirmButton, &QPushButton::pressed, this, [=]() {
confirmExportPath(_exportPathLineEdit->text().toStdString());
});
connect(_exportNameConfirmButton, &QPushButton::pressed, this, [=]() {
confirmExportPath(_exportNameLineEdit->text().toStdString());
});
connect(_storeInLTMButton, &QPushButton::pressed, this, &This::storeInLTM);
connect(_startLTMRecordingButton, &QPushButton::pressed, this, &This::startRecording);
connect(_stopLTMRecordingButton, &QPushButton::pressed, this, &This::stopRecording);
......
......@@ -11,6 +11,7 @@ class QWidget;
class QTabWidget;
class QPushButton;
class QGroupBox;
class QLineEdit;
namespace armarx::armem::gui
{
......@@ -51,6 +52,7 @@ namespace armarx::armem::gui
void storeInLTM();
void startRecording();
void stopRecording();
void confirmExportPath(std::string path);
// ToDo:
// void queryChanged(armem::query::data::Input query);
......@@ -73,6 +75,14 @@ namespace armarx::armem::gui
QLabel* _recursionDepthLabel;
QSpinBox* _recursionDepthSpinner;
QLabel* _exportPathLabel;
QLineEdit* _exportPathLineEdit;
QPushButton* _exportPathConfirmButton;
QLabel* _exportNameLabel;
QLineEdit* _exportNameLineEdit;
QPushButton* _exportNameConfirmButton;
QPushButton* _storeInLTMButton;
QPushButton* _startLTMRecordingButton;
QPushButton* _stopLTMRecordingButton;
......
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