mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 01:57:45 +08:00
UI: Added option to change map resolution on UI side, save/restore thresholds in figures, fixed basic panel's slam/rgbd mode checkboxes not changing the state of corresponding parameters.
This commit is contained in:
@@ -584,10 +584,11 @@ void StatsToolBox::contextMenuEvent(QContextMenuEvent * event)
|
||||
}
|
||||
}
|
||||
|
||||
void StatsToolBox::getFiguresSetup(QList<int> & curvesPerFigure, QStringList & curveNames)
|
||||
void StatsToolBox::getFiguresSetup(QList<int> & curvesPerFigure, QStringList & curveNames, QStringList & curveThresholds)
|
||||
{
|
||||
curvesPerFigure.clear();
|
||||
curveNames.clear();
|
||||
curveThresholds.clear();
|
||||
for(QMap<QString, QWidget*>::iterator i=_figures.begin(); i!=_figures.end(); ++i)
|
||||
{
|
||||
QList<UPlot *> plots = i.value()->findChildren<UPlot *>();
|
||||
@@ -596,6 +597,10 @@ void StatsToolBox::getFiguresSetup(QList<int> & curvesPerFigure, QStringList & c
|
||||
QStringList names = plots[0]->curveNames();
|
||||
curvesPerFigure.append(names.size());
|
||||
curveNames.append(names);
|
||||
for(int j=0; j<names.size(); ++j)
|
||||
{
|
||||
curveThresholds.append(plots[0]->isThreshold(names[j])?QString::number(plots[0]->getThresholdValue(names[j])):"NA");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -628,6 +633,22 @@ void StatsToolBox::addCurve(const QString & name, bool newFigure, bool cacheOn)
|
||||
ULOGGER_ERROR("Not supposed to be here...");
|
||||
}
|
||||
}
|
||||
void StatsToolBox::addThreshold(const QString & name, qreal value)
|
||||
{
|
||||
QString plotName = _plotMenu->actions().last()->text();
|
||||
QWidget * fig = _figures.value(plotName, (QWidget*)0);
|
||||
if(fig)
|
||||
{
|
||||
UPlot * plot = fig->findChild<UPlot *>(plotName);
|
||||
if(plot)
|
||||
plot->addThreshold(name, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
UERROR("There are no figures, cannot add threshold \"%s\"", name.toStdString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void StatsToolBox::setWorkingDirectory(const QString & workingDirectory)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user