disabled freenect camera when not available

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1362 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-06-13 15:24:24 +00:00
parent 2c1ee42986
commit b85263c377
2 changed files with 4 additions and 0 deletions

View File

@@ -284,6 +284,8 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
selectSourceImageGrp->addAction(_ui->actionVideo);
selectSourceImageGrp->addAction(_ui->actionOpenNI);
selectSourceImageGrp->addAction(_ui->actionFreenect);
selectSourceImageGrp->addAction(_ui->actionOpenNI_CV);
selectSourceImageGrp->addAction(_ui->actionOpenNI_CV_ASUS);
this->updateSelectSourceImageMenu(_preferencesDialog->getSourceImageType());
connect(_ui->actionImageFiles, SIGNAL(triggered()), this, SLOT(selectImages()));
connect(_ui->actionVideo, SIGNAL(triggered()), this, SLOT(selectVideo()));
@@ -293,6 +295,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
this->updateSelectSourceRGBDMenu(_preferencesDialog->isSourceOpenniUsed(), _preferencesDialog->getSourceRGBD());
connect(_ui->actionOpenNI, SIGNAL(triggered()), this, SLOT(selectOpenni()));
connect(_ui->actionFreenect, SIGNAL(triggered()), this, SLOT(selectFreenect()));
_ui->actionFreenect->setEnabled(CameraFreenect::available());
connect(_ui->actionOpenNI_CV, SIGNAL(triggered()), this, SLOT(selectOpenniCv()));
connect(_ui->actionOpenNI_CV_ASUS, SIGNAL(triggered()), this, SLOT(selectOpenniCvAsus()));