Commits

iorodeo committed 9a6fe91

Mode error dialogs in set ... fromMap methods optional.

Comments (0)

Files changed (2)

src/gui/camera_window.cpp

         QString errMsgTitle("Load Configuration Error");
 
         // Set camera properties, videomode, etc.
+        // --------------------------------------
         QVariantMap cameraMap = configMap["camera"].toMap();
         if (cameraMap.isEmpty())
         {
             rtnStatus.message = errMsgText;
             return rtnStatus;
         }
-
-        // --------------------------------------------
-        // TO DO ... add rtnStatus to setCameraFrommap
-        // --------------------------------------------
-        if (!setCameraFromMap(cameraMap))
-        {
-            rtnStatus.success = false;
-            rtnStatus.message = QString("Unable to set camera values");
+        rtnStatus = setCameraFromMap(cameraMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
             return rtnStatus;
         }
 
             rtnStatus.message = errMsgText;
             return rtnStatus;
         }
-
-        //------------------------------------------------
-        //  TO DO ... add RtnStatus to  setLoggingFromMap
-        //------------------------------------------------
-        if (!setLoggingFromMap(loggingMap))
-        {
-            rtnStatus.success = false;
-            rtnStatus.message = QString("Unable to set logging values");
+        rtnStatus = setLoggingFromMap(loggingMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
             return rtnStatus;
         }
 
             rtnStatus.message = errMsgText;
             return rtnStatus;
         }
-        // --------------------------------------------
-        // TO DO  .. add RtnStatus to setTimerFromMap
-        // --------------------------------------------
-        if (!setTimerFromMap(timerMap))
-        {
-            rtnStatus.success = false;
-            rtnStatus.message = QString("Unable to set timer from map");
+        rtnStatus = setTimerFromMap(timerMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
             return rtnStatus;
         }
 
             rtnStatus.message = errMsgText;
             return rtnStatus;
         }
-        // ----------------------------------------------
-        // TO DO ... add RtnStatus to setDisplayFromMap
-        // ----------------------------------------------
-        if (!setDisplayFromMap(displayMap))
-        {
-            rtnStatus.success = false;
-            rtnStatus.message = QString("Unable to set display");
+        rtnStatus = setDisplayFromMap(displayMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
             return rtnStatus;
         }
 
             rtnStatus.message = errMsgText;
             return rtnStatus;
         }
-        // -------------------------------------------
-        // TO DO .. add RtnStatus to setServerFromMap
-        // -------------------------------------------
-        if (!setServerFromMap(serverMap))
-        {
-            rtnStatus.success = false;
-            rtnStatus.message = QString("Unable to set server configuration");
+        rtnStatus = setServerFromMap(serverMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
             return rtnStatus;
         }
 
             rtnStatus.message = errMsgText;
             return rtnStatus;
         }
-        // -------------------------------------------------
-        // TO DO ... add RtnStatus to setConfigFileFromMap
-        // -------------------------------------------------
-        if (!setConfigFileFromMap(configFileMap))
-        {
-            rtnStatus.success = false;
-            rtnStatus.message = QString("Unable to set configuration file");
+        rtnStatus = setConfigFileFromMap(configFileMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
             return rtnStatus;
         }
 
     }
     
 
-
-
-    bool CameraWindow::setCameraFromMap(QVariantMap cameraMap)
+    RtnStatus CameraWindow::setCameraFromMap(QVariantMap cameraMap, bool showErrorDlg)
     {
-        // Get Values from the camera - for making sure that vendor and model match etc.
+        RtnStatus rtnStatus;
+
         QString errMsgTitle("Load Configuration Error (Camera)");
         QString currVendorName;
         QString currModelName;
         bool error = false;
         unsigned int errorId;
 
+        // Get Values from the camera - for making sure that vendor and model match etc.
         cameraPtr_ -> acquireLock();
         try
         {
 
         if (error)
         {
-            QString msgTitle("Camera Query Error");
-            QString msgText("Error retrieving values from camera.\n\nError ID: ");
-            msgText += QString::number(errorId);
-            msgText += "\n\n";
-            msgText += errorMsg;
-            QMessageBox::critical(this, msgTitle, msgText);
+            QString errMsgText("Error retrieving values from camera. Error ID: ");
+            errMsgText += QString::number(errorId);
+            errMsgText += "\n\n";
+            errMsgText += errorMsg;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this, errMsgTitle, errMsgText);
+            }
             QByteArray emptyByteArray = QByteArray();
-            return false;
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         QString vendorName = cameraMap["vendor"].toString();
         if (vendorName.isEmpty())
         {
             QString errMsgText("Camera: vendor name is not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (vendorName != currVendorName)
         {
             QString errMsgText("Camera: current vendor does not match that in configuration file");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString modelName = cameraMap["model"].toString();
         if (modelName.isEmpty())
         {
             QString errMsgText("Camera: model name is not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (modelName != currModelName)
         {
             QString errMsgText("Camera: current  model does not match that in configuration file");
-            QMessageBox::critical(this,errMsgTitle, errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle, errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Try to set the camera properties
         if (cameraPropMap.isEmpty())
         {
             QString errMsgText("Camera: properties are not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         PropertyList::iterator propListIt;
                 QString errMsgText = QString(
                         "Camera: property %1 is not present"
                         ).arg(camelCaseName);
-                QMessageBox::critical(this,errMsgTitle,errMsgText);
-                return false;
+                if (showErrorDlg)
+                {
+                    QMessageBox::critical(this,errMsgTitle,errMsgText);
+                }
+                rtnStatus.success = false;
+                rtnStatus.message = errMsgText;
+                return rtnStatus;
             }
-            bool ok = setCameraPropertyFromMap(propValueMap, propInfo);
-            if (!ok)
+
+            rtnStatus = setCameraPropertyFromMap(propValueMap, propInfo, showErrorDlg);
+            if (!rtnStatus.success)
             {
-                return false;
+                return rtnStatus;
             }
         } // for ( propListIt ...
 
         if (videoModeString.isEmpty())
         {
             QString errMsgText("VideoMode: is not present in configuration");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         VideoMode videoMode = convertStringToVideoMode(videoModeString);
 
         if (frameRateString.isEmpty())
         {
             QString errMsgText("Camera: frameRate is not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         FrameRate frameRate = convertStringToFrameRate(frameRateString);
 
             QString errMsgText = QString("Development Error: videoMode = %1").arg(videoModeString); 
             errMsgText += "\n\n";
             errMsgText += "currently only videoMode=Format7 supported";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;   
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (frameRate != FRAMERATE_FORMAT7)
         {
             QString errMsgText = QString("Development Error: frameRate = %1").arg(frameRateString); 
             errMsgText += "\n\n";
             errMsgText += "currently only frameRatee=Format7 supported";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         // --------------------------------------------------------------------
         // TO DO - check if videoMode and frameRate are allowed and if so set
         if (triggerTypeString.isEmpty())
         {
             QString errMsgText("Camera: triggerType is not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         TriggerType triggerType = convertStringToTriggerType(triggerTypeString);
 
             QString errMsgText = QString("Development Error: triggerType = %1").arg(triggerTypeString); 
             errMsgText += "\n\n";
             errMsgText += "currently only triggerType=Internal supported";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         // --------------------------------------------------------------------
         // TO DO - Check if trigger type is allowed and if so set to new value
         // --------------------------------------------------------------------
 
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 
-    bool CameraWindow::setLoggingFromMap(QVariantMap loggingMap)
+    RtnStatus CameraWindow::setLoggingFromMap(QVariantMap loggingMap,bool showErrorDlg)
     {
+        RtnStatus rtnStatus;
         QString errMsgTitle("Load Configuration Error (Logging)");
 
         // Get "Enabled" value
         if (!loggingMap.contains("enabled"))
         {
             QString errMsgText("Logging configuration: enabled not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!loggingMap["enabled"].canConvert<bool>())
         {
             QString errMsgText("Logging configuration: unable to convert enabled to bool");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         logging_ = loggingMap["enabled"].toBool();
 
         if (!loggingMap.contains("format"))
         {
             QString errMsgText("Logging configuration: format not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!loggingMap["format"].canConvert<QString>())
         {
             QString errMsgText("Logging configuration: unable to convert");
             errMsgText += " format to string";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString formatString = loggingMap["format"].toString();
         VideoFileFormat format = convertStringToVideoFileFormat(formatString);
             QString errMsgText = QString(
                     "Logging configuration: unknown video file format %1"
                     ).arg(formatString); 
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoFileFormat_ = format;
 
         if (!loggingMap.contains("directory"))
         {
             QString errMsgText( "Logging configuration: directory not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!loggingMap["directory"].canConvert<QString>())
         {
             QString errMsgText("Logging configuration: unable to convert");
             errMsgText += " directory to string";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString directoryString = loggingMap["directory"].toString();
         QDir directory = QDir(directoryString);
         if (!directory.exists())
         {
             QString errMsgText("Logging configuration: directory does not exist");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         currentVideoFileDir_ = directory;
 
         if (!loggingMap.contains("fileName"))
         {
             QString errMsgText("Logging configuration: fileName not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!loggingMap["fileName"].canConvert<QString>())
         {
             QString errMsgText("Logging configuration: unable to convert");
             errMsgText += " fileName to string";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString fileNameString = loggingMap["fileName"].toString();
         currentVideoFileName_ = fileNameString;
         if (formatSettingsMap.isEmpty())
         { 
             QString errMsgText("Logging configuration: settings not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
-        }
-        if (!setFormatSettingsFromMap(formatSettingsMap))
-        {
-            return false;
-        }
-
-        return true;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
+        }
+        rtnStatus = setFormatSettingsFromMap(formatSettingsMap,showErrorDlg);
+        if (!rtnStatus.success)
+        {
+            return rtnStatus;
+        }
+
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 
-    bool CameraWindow::setTimerFromMap(QVariantMap timerMap)
+    RtnStatus CameraWindow::setTimerFromMap(QVariantMap timerMap, bool showErrorDlg)
     {
+        RtnStatus rtnStatus;
         QString errMsgTitle("Load Configuration Error (Timer)");
 
         // Set "Enabled" value
         {
             QString errMsgText("Timer configuration: enabled");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!timerMap["enabled"].canConvert<bool>())
         {
             QString errMsgText("Timer configuration: unable to ");
             errMsgText += " convert enabled to bool";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         bool timerEnabled = timerMap["enabled"].toBool();
         actionTimerEnabledPtr_ -> setChecked(timerEnabled);
         {
             QString errMsgText("Timer configuration: settings");
             errMsgText += " not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Set "Duration" value
         {
             QString errMsgText("Timer configuration: settings");
             errMsgText += " duration is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!settingsMap["duration"].canConvert<unsigned long long>())
         {
             QString errMsgText("Timer configuration: unable to convert");
             errMsgText += " settings duration to unsigned long";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         captureDurationSec_ = (unsigned long)(settingsMap["duration"].toULongLong());
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 
-    bool CameraWindow::setDisplayFromMap(QVariantMap displayMap)
+    RtnStatus CameraWindow::setDisplayFromMap(QVariantMap displayMap, bool showErrorDlg)
     {
+        RtnStatus rtnStatus;
         QString errMsgTitle("Load Congifuration Error (Display)");
 
         // Get Orientation map
         {
             QString errMsgText("Display configuration: orientation");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Set Orientation Flip Vertical
         {
             QString errMsgText("Display configuration: orientation");
             errMsgText += " flipVertical is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!orientMap["flipVertical"].canConvert<bool>())
         {
             QString errMsgText("Display configuration: unable to convert");
             errMsgText += " orientation flipVertical to bool";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         flipVert_ = orientMap["flipVertical"].toBool();
         std::cout << "flipVert_ " << flipVert_ << std::endl;
         {
             QString errMsgText("Display configuration: orientation");
             errMsgText += " flipHorizontal is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!orientMap["flipHorizontal"].canConvert<bool>())
         {
             QString errMsgText("Display configuration: unable to convert");
             errMsgText += " orientation flipHorizontal to bool";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         flipHorz_ = orientMap["flipHorizontal"].toBool();
         std::cout << "flipHorz_ " << flipHorz_ << std::endl;
         {
             QString errMsgText("Display configuration: rotation");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!displayMap["rotation"].canConvert<unsigned int>())
         {
             QString errMsgText("Display configuration: unable to convert");
             errMsgText += " rotation to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int rotationUInt = displayMap["rotation"].toUInt();
         if ( 
         {
             QString errMsgText("Display configuration: rotation");
             errMsgText += " must be 0, 90, 180, or 270";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         imageRotation_ = ImageRotationType(rotationUInt);
 
         {
             QString errMsgText("Display configuration: updateFrequency");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!displayMap["updateFrequency"].canConvert<double>())
         {
             QString errMsgText("Display configuration: unable to convert");
             errMsgText += " updateFrequency to double";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         double displayFreq = displayMap["updateFrequency"].toDouble();
         if (displayFreq < MIN_IMAGE_DISPLAY_FREQ)
             errMsgText += QString(" must be greater than or equal to %1").arg(
                     MIN_IMAGE_DISPLAY_FREQ
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (displayFreq > MAX_IMAGE_DISPLAY_FREQ)
         {
             errMsgText += QString(" must be less than or equal to %1").arg(
                     MIN_IMAGE_DISPLAY_FREQ
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         imageDisplayFreq_ = displayFreq;
 
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
-    bool CameraWindow::setServerFromMap(QVariantMap serverMap)
+    RtnStatus CameraWindow::setServerFromMap(QVariantMap serverMap, bool showErrorDlg)
     {
+        RtnStatus rtnStatus;
         QString errMsgTitle("Load configuration Error (Server)");
 
         // Get "enabled" value
         if (!serverMap.contains("enabled"))
         {
             QString errMsgText("Server configuration: enabled not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!serverMap["enabled"].canConvert<bool>())
         {
             QString errMsgText("Server configuration: unable to convert enabled to bool");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         bool serverEnabled = serverMap["enabled"].toBool();
 
         if (!serverMap.contains("port"))
         {
             QString errMsgText("Server configuration: port is not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!serverMap["port"].canConvert<unsigned int>())
         {
             QString errMsgText("Server configuration: unable to convert port to unsigned int");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int port = serverMap["port"].toUInt();
         if (port < HTTP_SERVER_PORT_BEGIN)
             QString errMsgText = QString("Server configuration: port is too low, must be >= %1").arg(
                     HTTP_SERVER_PORT_BEGIN
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (port > HTTP_SERVER_PORT_END)
         {
             QString errMsgText = QString("Server configuration: port is too high, must be <= %1").arg(
                     HTTP_SERVER_PORT_END
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         httpServerPort_ = port;
 
             httpServerPtr_ -> close();
         }
 
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 
-    bool CameraWindow::setConfigFileFromMap(QVariantMap configFileMap)
+    RtnStatus CameraWindow::setConfigFileFromMap(
+            QVariantMap configFileMap, 
+            bool showErrorDlg
+            )
     {
+        RtnStatus rtnStatus;
         QString errMsgTitle("Load Configuration Error (File)");
 
         // Set Directory
         {
             QString errMsgText("Configuration file: directory");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!configFileMap["directory"].canConvert<QString>())
         {
             QString errMsgText("Configuration file: unable to convert");
             errMsgText += " directory to string";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString directoryString = configFileMap["directory"].toString();
         QDir directory = QDir(directoryString);
         {
             QString errMsgText("Configuration file: directory");
             errMsgText += " does not exist";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         currentConfigFileDir_ = directory;
 
         {
             QString errMsgText("Configuration file: fileName");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!configFileMap["fileName"].canConvert<QString>())
         {
             QString errMsgText("Configuration file: unable to convert");
             errMsgText += " fileName to string";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString fileName = configFileMap["fileName"].toString();
         currentConfigFileName_ = fileName;
 
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 
-    bool CameraWindow::setCameraPropertyFromMap(QVariantMap propValueMap, PropertyInfo propInfo)
+    RtnStatus CameraWindow::setCameraPropertyFromMap(
+            QVariantMap propValueMap, 
+            PropertyInfo propInfo, 
+            bool showErrorDlg
+            )
     {
+        RtnStatus rtnStatus;
         Property newProp;
         newProp.type = propInfo.type;
         QString errMsgTitle("Load Configuration Error (Camera Property)");
             QString errMsgText = QString(
                     "Camera: property %1 has no value for present"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["present"].canConvert<bool>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to cast present to bool"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.present =  propValueMap["present"].toBool();
         if (newProp.present != propInfo.present)
             QString errMsgText = QString(
                     "Camera: property %1 present value does not match that in property info"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Get value for "Absolute Control"
             QString errMsgText = QString(
                     "Camera: property %1 has no value for absoluteControl"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["absoluteControl"].canConvert<bool>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to convedrt absoluteControl to bool"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.absoluteControl = propValueMap["absoluteControl"].toBool();
         if (newProp.absoluteControl && !propInfo.absoluteCapable)
             QString errMsgText = QString(
                     "Camera: property %1 is not capable of absoluteControl"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Get value for "One Push"
             QString errMsgText = QString(
                     "Camera: property %1 has no value for onePush"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["onePush"].canConvert<bool>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to convert onePush to bool"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.onePush = propValueMap["onePush"].toBool();
         if (newProp.onePush && !propInfo.onePushCapable)
             QString errMsgText = QString(
                     "Camera: property %1 is not capable of onePush"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Get value for "On"
             QString errMsgText = QString(
                     "Camera: property %1 has no value for on"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["on"].canConvert<bool>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to convert on to bool"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.on = propValueMap["on"].toBool();
 
             QString errMsgText = QString(
                     "Camera: property %1 has no value for autoActive"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["autoActive"].canConvert<bool>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to convert autoActive to bool"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.autoActive = propValueMap["autoActive"].toBool();
         if (newProp.autoActive && !propInfo.autoCapable)
             QString errMsgText = QString(
                     "Camera: property %1 is not auto capable"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // Get "Value" 
             QString errMsgText = QString(
                     "Camera: property %1 has no value"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["value"].canConvert<unsigned int>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to convert value to unsigned int"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.value = propValueMap["value"].toUInt();
         if (!newProp.absoluteControl) 
                 QString errMsgText = QString(
                         "Camera: property %1 value is out of range (too low)"
                         ).arg(name);
-                QMessageBox::critical(this,errMsgTitle,errMsgText);
-                return false;
+                if (showErrorDlg)
+                {
+                    QMessageBox::critical(this,errMsgTitle,errMsgText);
+                }
+                rtnStatus.success = false;
+                rtnStatus.message = errMsgText;
+                return rtnStatus;
             }
             else if (newProp.value > propInfo.maxValue)
             {
                 QString errMsgText = QString(
                         "Camera: property %1 value is out of range (too high)"
                         ).arg(name);
-                QMessageBox::critical(this,errMsgTitle,errMsgText);
-                return false;
+                if (showErrorDlg)
+                {
+                    QMessageBox::critical(this,errMsgTitle,errMsgText);
+                }
+                rtnStatus.success = false;
+                rtnStatus.message = errMsgText;
+                return rtnStatus;
             }
         }
 
             QString errMsgText = QString(
                     "Camera: property %1 has no absoluteValue"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!propValueMap["absoluteValue"].canConvert<float>())
         {
             QString errMsgText = QString(
                     "Camera: property %1 unable to convert absoluteValue to float"
                     ).arg(name);
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         newProp.absoluteValue = propValueMap["absoluteValue"].toFloat();
         if (newProp.absoluteControl)
                 QString errMsgText = QString(
                         "Camera: property %1 absoluteValue is out of range (too low)"
                         ).arg(name);
-                QMessageBox::critical(this,errMsgTitle,errMsgText);
-                return false;
+                if (showErrorDlg)
+                {
+                    QMessageBox::critical(this,errMsgTitle,errMsgText);
+                }
+                rtnStatus.success = false;
+                rtnStatus.message = errMsgText;
+                return rtnStatus;
             }
             else if (newProp.absoluteValue > propInfo.maxAbsoluteValue)
             {
                 QString errMsgText = QString(
                         "Camera: property %1 absoluteValue is out of range (too high)"
                         ).arg(name);
-                QMessageBox::critical(this,errMsgTitle,errMsgText);
-                return false;
+                if (showErrorDlg)
+                {
+                    QMessageBox::critical(this,errMsgTitle,errMsgText);
+                }
+                rtnStatus.success = false;
+                rtnStatus.message = errMsgText;
+                return rtnStatus;
             }
         }
 
 
             if (error)
             {
-                QString msgTitle("Set Camera Property Error");
-                QString msgText = QString("Error setting camera property %1.\n\nError ID: ").arg(name);
-                msgText += QString::number(errorId);
-                msgText += "\n\n";
-                msgText += errorMsg;
-                QMessageBox::critical(this, msgTitle, msgText);
+                QString errMsgText = QString("Error setting camera property %1.\n\nError ID: ").arg(name);
+                errMsgText += QString::number(errorId);
+                errMsgText += "\n\n";
+                errMsgText += errorMsg;
+                if (showErrorDlg)
+                {
+                    QMessageBox::critical(this, errMsgTitle, errMsgText);
+                }
                 QByteArray emptyByteArray = QByteArray();
-                return false;
+
+                rtnStatus.success = false;
+                rtnStatus.message = errMsgText;
+                return rtnStatus;
             }
         }
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 
-    bool CameraWindow::setFormatSettingsFromMap(QVariantMap settingsMap)
+    RtnStatus CameraWindow::setFormatSettingsFromMap(QVariantMap settingsMap, bool showErrorDlg)
     {
+        RtnStatus rtnStatus;
         QString errMsgTitle("Load Configuration Error (Format Settings)");
 
         // Get avi values
         if (aviMap.isEmpty())
         {
             QString errMsgText("Logging Settings : avi settings not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!aviMap.contains("frameSkip"))
         {
             QString errMsgText("Logging Settings: avi frameSkip not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!aviMap["frameSkip"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: unable to convert");
             errMsgText += " frameSkip to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int aviFrameSkip = aviMap["frameSkip"].toUInt();
         if (aviFrameSkip == 0)
         {
             QString errMsgText("Logging Settings: avi frameSkip");
             errMsgText += " must be greater than zero"; 
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.avi.frameSkip = aviFrameSkip;
 
         if (!aviMap.contains("codec"))
         {
             QString errMsgText("Logging Settings: avi codec not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!aviMap["codec"].canConvert<QString>())
         {
             QString errMsgText("Logging Settings: unable to convert");
             errMsgText += " avi codec to string";
-            QMessageBox::critical(this, errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this, errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         QString aviCodec = aviMap["codec"].toString();
         if (!VideoWriter_avi::isAllowedCodec(aviCodec))
         {
             QString errMsgText = QString("Logging Settings: avi codec %1").arg(aviCodec);
             errMsgText += " is not allowed";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.avi.codec = aviCodec;
 
         if (bmpMap.isEmpty())
         {
             QString errMsgText("Logging Settings: bmp settings not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!bmpMap.contains("frameSkip"))
         {
             QString errMsgText("Logging Settings: bmp frameSkip not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!bmpMap["frameSkip"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: bmp unable to convert");
             errMsgText += " frameSkip to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int bmpFrameSkip = bmpMap["frameSkip"].toUInt();
         if (bmpFrameSkip == 0)
         {
             QString errMsgText("Logging Settings: bmp frameSkip must");
             errMsgText += " be greater than zero";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.bmp.frameSkip = bmpFrameSkip;
 
         if (fmfMap.isEmpty())
         {
             QString errMsgText("Logging Settings: fmf settings not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!fmfMap.contains("frameSkip"))
         {
             QString errMsgText("Logging Settings: fmf frameSkip not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!fmfMap["frameSkip"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: fmf unable to convert");
             errMsgText += " frameSkip to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int fmfFrameSkip = fmfMap["frameSkip"].toUInt();
         if (fmfFrameSkip == 0)
         {
             QString errMsgText("Logging Settings: fmf frameSkip must");
             errMsgText += " be greater than zero";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.fmf.frameSkip = fmfFrameSkip;
         
         if (ufmfMap.isEmpty())
         {
             QString errMsgText("Logging Settings: ufmf settings not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         // ufmf Frame Skip
         if (!ufmfMap.contains("frameSkip"))
         {
             QString errMsgText("Logging Settings: ufmf frameSkip not present");
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfMap["frameSkip"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: ufmf unable to convert");
             errMsgText += " frameSkip to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfFrameSkip = ufmfMap["frameSkip"].toUInt();
         if (ufmfFrameSkip == 0)
         {
             QString errMsgText("Logging Settings: ufmf frameSkip must");
             errMsgText += " be greater than zero";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.ufmf.frameSkip = ufmfFrameSkip;
 
         {
             QString errMsgText("Logging Settings: ufmf"); 
             errMsgText += " backgroundThreshold not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfMap["backgroundThreshold"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: ufmf unable");
             errMsgText += " to convert backgroundThreshold to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfBackgroundThreshold = ufmfMap["backgroundThreshold"].toUInt();
         if (ufmfBackgroundThreshold < VideoWriter_ufmf::MIN_BACKGROUND_THRESHOLD)
             errMsgText += QString(" must be greater than %1").arg(
                     VideoWriter_ufmf::MIN_BACKGROUND_THRESHOLD
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (ufmfBackgroundThreshold > VideoWriter_ufmf::MAX_BACKGROUND_THRESHOLD)
         {
             errMsgText += QString(" msut be less than %1").arg(
                     VideoWriter_ufmf::MAX_BACKGROUND_THRESHOLD
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.ufmf.backgroundThreshold = ufmfBackgroundThreshold;
 
         {
             QString errMsgText("Logging Settings: ufmf"); 
             errMsgText += " boxLength not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfMap["boxLength"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: ufmf unable");
             errMsgText += " to convert boxLength to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfBoxLength = ufmfMap["boxLength"].toUInt();
         if (ufmfBoxLength < VideoWriter_ufmf::MIN_BOX_LENGTH)
             errMsgText += QString(" must be greater than %1").arg(
                     VideoWriter_ufmf::MIN_BOX_LENGTH
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (ufmfBoxLength > VideoWriter_ufmf::MAX_BOX_LENGTH)
         {
             errMsgText += QString(" must be less than %1").arg(
                     VideoWriter_ufmf::MAX_BOX_LENGTH
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.ufmf.boxLength = ufmfBoxLength;
 
         {
             QString errMsgText("Logging Settings: ufmf"); 
             errMsgText += " compressionThreads not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfMap["compressionThreads"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: ufmf unable");
             errMsgText += " to convert compressionThreads to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfCompressionThreads = ufmfMap["compressionThreads"].toUInt();
         if (ufmfCompressionThreads < VideoWriter_ufmf::MIN_NUMBER_OF_COMPRESSORS)
             errMsgText += QString(" must be greater than %1").arg(
                     VideoWriter_ufmf::MIN_NUMBER_OF_COMPRESSORS
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.ufmf.numberOfCompressors = ufmfCompressionThreads;
 
         {
             QString errMsgText("Logging Settings: ufmf"); 
             errMsgText += " medianUpdateCount not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfMap["medianUpdateCount"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: ufmf unable");
             errMsgText += " to convert medianUpdateCount to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfMedianUpdateCount = ufmfMap["medianUpdateCount"].toUInt();
         if (ufmfMedianUpdateCount < BackgroundHistogram_ufmf::MIN_MEDIAN_UPDATE_COUNT )
             errMsgText += QString(" must be greater than %1").arg(
                     BackgroundHistogram_ufmf::MIN_MEDIAN_UPDATE_COUNT
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.ufmf.medianUpdateCount = ufmfMedianUpdateCount;
 
         {
             QString errMsgText("Logging Settings: ufmf");
             errMsgText += " medianUpdateInterval not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfMap["medianUpdateInterval"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: ufmf unable");
             errMsgText += " to convert medianUpdateInterval to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfMedianUpdateInterval = ufmfMap["medianUpdateInterval"].toUInt();
         if (ufmfMedianUpdateInterval < BackgroundHistogram_ufmf::MIN_MEDIAN_UPDATE_INTERVAL )
             errMsgText += QString(" must be greater than %1").arg(
                     BackgroundHistogram_ufmf::MIN_MEDIAN_UPDATE_INTERVAL
                     );
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         videoWriterParams_.ufmf.medianUpdateInterval = ufmfMedianUpdateInterval;
 
         {
             QString errMsgText("Logging Settings: ufmf dilate");
             errMsgText += " is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
 
         // ufmf Dilate On
         {
             QString errMsgText("Logging Settins: ufmf dilate");
             errMsgText += " on is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfDilateMap["on"].canConvert<bool>())
         {
             QString errMsgText("Logging Settings: unable to convert");
             errMsgText += " ufmf dilate on to bool";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         bool ufmfDilateOn = ufmfDilateMap["on"].toBool();
         videoWriterParams_.ufmf.dilateState = ufmfDilateOn;
         {
             QString errMsgText("Logging Settings: ufmf dilate");
             errMsgText += " windowSize is not present";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         if (!ufmfDilateMap["windowSize"].canConvert<unsigned int>())
         {
             QString errMsgText("Logging Settings: unable to convert");
             errMsgText += " ufmf dilate windowSize to unsigned int";
-            QMessageBox::critical(this,errMsgTitle,errMsgText);
-            return false;
+            if (showErrorDlg)
+            {
+                QMessageBox::critical(this,errMsgTitle,errMsgText);
+            }
+            rtnStatus.success = false;
+            rtnStatus.message = errMsgText;
+            return rtnStatus;
         }
         unsigned int ufmfDilateWindowSize = ufmfDilateMap["windowSize"].toUInt();
         // ---------------------------------------------------------------------
         // ----------------------------------------------------------------------
         videoWriterParams_.ufmf.dilateWindowSize = ufmfDilateWindowSize;
 
-        return true;
+        rtnStatus.success = true;
+        rtnStatus.message = QString("");
+        return rtnStatus;
     }
 
 

src/gui/camera_window.hpp

             QString getVideoFileFullPathWithGuid();
             QString getConfigFileFullPath();
 
-            bool setCameraFromMap(QVariantMap cameraMap);
-            bool setLoggingFromMap(QVariantMap loggingMap);
-            bool setTimerFromMap(QVariantMap timerMap);
-            bool setDisplayFromMap(QVariantMap displayMap);
-            bool setServerFromMap(QVariantMap serverMap);
-            bool setConfigFileFromMap(QVariantMap configFileMap);
-            bool setCameraPropertyFromMap(QVariantMap propValueMap, PropertyInfo propInfo);
-            bool setFormatSettingsFromMap(QVariantMap settingsMap);
+            RtnStatus setCameraFromMap(QVariantMap cameraMap, bool showErrorDlg);
+            RtnStatus setLoggingFromMap(QVariantMap loggingMap, bool showErrorDlg);
+            RtnStatus setCameraPropertyFromMap(
+                    QVariantMap propValueMap, 
+                    PropertyInfo propInfo, 
+                    bool showErrorDlg
+                    );
+            RtnStatus setFormatSettingsFromMap(
+                    QVariantMap settingsMap, 
+                    bool showErrorDlg
+                    );
+            RtnStatus setTimerFromMap(QVariantMap timerMap, bool showErrorDlg);
+            RtnStatus setDisplayFromMap(QVariantMap displayMap, bool showErrorDlg);
+            RtnStatus setServerFromMap(QVariantMap serverMap, bool showErrorDlg);
+            RtnStatus setConfigFileFromMap(QVariantMap configFileMap, bool showErrorDlg);
 
             cv::Mat calcHistogram(cv::Mat mat);