Added General/debug parameter

This commit is contained in:
matlabbe
2017-03-27 13:56:53 -04:00
parent f722087bf5
commit 6337d4efb6
4 changed files with 24 additions and 2 deletions
+11
View File
@@ -54,6 +54,17 @@ FindObject::FindObject(bool keepImagesInRAM, QObject * parent) :
{
qRegisterMetaType<find_object::DetectionInfo>("find_object::DetectionInfo");
UASSERT(detector_ != 0 && extractor_ != 0);
if(Settings::getGeneral_debug())
{
ULogger::setPrintWhere(true);
ULogger::setLevel(ULogger::kDebug);
}
else
{
ULogger::setPrintWhere(false);
ULogger::setLevel(ULogger::kInfo);
}
}
FindObject::~FindObject() {
+11
View File
@@ -1647,6 +1647,17 @@ void MainWindow::notifyParametersChanged(const QStringList & paramChanged)
ui_->actionCamera_from_video_file->setChecked(!Settings::getCamera_5mediaPath().isEmpty() && !UDirectory::exists(Settings::getCamera_5mediaPath().toStdString()) && !Settings::getCamera_6useTcpCamera());
ui_->actionCamera_from_directory_of_images->setChecked(!Settings::getCamera_5mediaPath().isEmpty() && UDirectory::exists(Settings::getCamera_5mediaPath().toStdString()) && !Settings::getCamera_6useTcpCamera());
ui_->actionCamera_from_TCP_IP->setChecked(Settings::getCamera_6useTcpCamera());
if(Settings::getGeneral_debug())
{
ULogger::setPrintWhere(true);
ULogger::setLevel(ULogger::kDebug);
}
else
{
ULogger::setPrintWhere(false);
ULogger::setLevel(ULogger::kInfo);
}
}
} // namespace find_object