mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-12 04:49:50 +08:00
MainWindow: added virtual functions for convenience
This commit is contained in:
@@ -298,6 +298,9 @@ protected:
|
|||||||
void setNewDatabasePathOutput(const QString & newDatabasePathOutput) {_newDatabasePathOutput = newDatabasePathOutput;}
|
void setNewDatabasePathOutput(const QString & newDatabasePathOutput) {_newDatabasePathOutput = newDatabasePathOutput;}
|
||||||
const QString & newDatabasePathOutput() const { return _newDatabasePathOutput; }
|
const QString & newDatabasePathOutput() const { return _newDatabasePathOutput; }
|
||||||
|
|
||||||
|
virtual ParametersMap getCustomParameters() {return ParametersMap();}
|
||||||
|
virtual Camera* createCamera();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_mainWindow * _ui;
|
Ui_mainWindow * _ui;
|
||||||
|
|
||||||
|
|||||||
@@ -4876,10 +4876,17 @@ void MainWindow::editDatabase()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Camera * MainWindow::createCamera()
|
||||||
|
{
|
||||||
|
return _preferencesDialog->createCamera();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::startDetection()
|
void MainWindow::startDetection()
|
||||||
{
|
{
|
||||||
UDEBUG("");
|
UDEBUG("");
|
||||||
ParametersMap parameters = _preferencesDialog->getAllParameters();
|
ParametersMap parameters = _preferencesDialog->getAllParameters();
|
||||||
|
uInsert(parameters, this->getCustomParameters());
|
||||||
|
|
||||||
// verify source with input rates
|
// verify source with input rates
|
||||||
if(_preferencesDialog->getSourceDriver() == PreferencesDialog::kSrcImages ||
|
if(_preferencesDialog->getSourceDriver() == PreferencesDialog::kSrcImages ||
|
||||||
_preferencesDialog->getSourceDriver() == PreferencesDialog::kSrcVideo ||
|
_preferencesDialog->getSourceDriver() == PreferencesDialog::kSrcVideo ||
|
||||||
@@ -4973,7 +4980,7 @@ void MainWindow::startDetection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Camera * camera = _preferencesDialog->createCamera();
|
Camera * camera = this->createCamera();
|
||||||
if(!camera)
|
if(!camera)
|
||||||
{
|
{
|
||||||
Q_EMIT stateChanged(kInitialized);
|
Q_EMIT stateChanged(kInitialized);
|
||||||
|
|||||||
Reference in New Issue
Block a user