25 #include <VisionX/gui-plugins/FeatureLearning/ui_FeatureLearningSaveToMemoryWidget.h>
32 FeatureLearningSaveToMemoryWidget::FeatureLearningSaveToMemoryWidget()
34 QDialog* dialogPointer =
this;
35 widget.setupUi(dialogPointer);
38 connect(widget.okayButtonBox, SIGNAL(accepted()),
this, SLOT(accept()));
39 connect(widget.okayButtonBox, SIGNAL(rejected()),
this, SLOT(close()));
40 connect(widget.objectComboBox, SIGNAL(currentIndexChanged(QString)),
this, SLOT(refreshOverwriteWarningLabel()));
45 FeatureLearningSaveToMemoryWidget::~FeatureLearningSaveToMemoryWidget()
50 Ui::FeatureLearningSaveToMemoryWidget* FeatureLearningSaveToMemoryWidget::getWidget()
57 void FeatureLearningSaveToMemoryWidget::refreshOverwriteWarningLabel()
59 QString objectId = widget.objectComboBox->itemData(widget.objectComboBox->currentIndex()).toString();
60 if (overwriteWarningMap[objectId] ==
true)
62 widget.overwriteWarningLabel->setStyleSheet(
"font-weight: bold; color: red");
63 widget.overwriteWarningLabel->setText(
"Warning: This Object has Features in the Memory that will be overwritten!");
64 widget.overwriteWarningLabel->setFrameShape(QFrame::Shape::StyledPanel);
68 widget.overwriteWarningLabel->setText(
"");
69 widget.overwriteWarningLabel->setFrameShape(QFrame::Shape::NoFrame);
73 void FeatureLearningSaveToMemoryWidget::setOverwriteWarningMap(QMap<QString, bool> newMap)
75 overwriteWarningMap = newMap;