mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-11 22:10:21 +08:00
DatabaseViewer: fixed just 50 last values shown on statistics view
This commit is contained in:
@@ -97,6 +97,7 @@ public:
|
||||
void getFiguresSetup(QList<int> & curvesPerFigure, QStringList & curveNames);
|
||||
void addCurve(const QString & name, bool newFigure = true, bool cacheOn = false);
|
||||
void setWorkingDirectory(const QString & workingDirectory);
|
||||
void setNewFigureMaxItems(int value) {_newFigureMaxItems = value;}
|
||||
void closeFigures();
|
||||
void setCacheOn(bool on);
|
||||
|
||||
@@ -121,6 +122,7 @@ private:
|
||||
QMenu * _plotMenu;
|
||||
QToolBox * _statBox;
|
||||
QString _workingDirectory;
|
||||
int _newFigureMaxItems;
|
||||
QMap<QString, QWidget*> _figures;
|
||||
};
|
||||
|
||||
|
||||
@@ -516,6 +516,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
|
||||
this->changeState(kIdle);
|
||||
this->applyPrefSettings(PreferencesDialog::kPanelAll);
|
||||
|
||||
_ui->statsToolBox->setNewFigureMaxItems(50);
|
||||
_ui->statsToolBox->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
|
||||
_ui->graphicsView_graphView->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
|
||||
_cloudViewer->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
|
||||
|
||||
@@ -224,6 +224,7 @@ StatsToolBox::StatsToolBox(QWidget * parent) :
|
||||
_plotMenu = new QMenu(this);
|
||||
_plotMenu->addAction(tr("<New figure>"));
|
||||
_workingDirectory = QDir::homePath();
|
||||
_newFigureMaxItems = 0;
|
||||
}
|
||||
|
||||
StatsToolBox::~StatsToolBox()
|
||||
@@ -437,7 +438,7 @@ void StatsToolBox::plot(const StatItem * stat, const QString & plotName)
|
||||
//Plot
|
||||
UPlot * newPlot = new UPlot(figure);
|
||||
newPlot->setWorkingDirectory(_workingDirectory);
|
||||
newPlot->setMaxVisibleItems(50);
|
||||
newPlot->setMaxVisibleItems(_newFigureMaxItems);
|
||||
newPlot->setObjectName(newPlotName);
|
||||
hLayout->addWidget(newPlot);
|
||||
_plotMenu->addAction(newPlotName);
|
||||
|
||||
Reference in New Issue
Block a user