Commits

iorodeo committed d48a3ee

Worked on alignment dialog.

Comments (0)

Files changed (10)

src/backend/fc2/camera_device_fc2.cpp

         // ------------------------------------------------
         //
         // Currently only sets to mode 0, doesn't check for
-        // support, doesn't set polarity, etc.
+        // support, etc.
         // ------------------------------------------------ 
+        fc2Error error = fc2SetGPIOPinDirection(context_, 0, 0);
+        if (error != FC2_ERROR_OK) 
+        {
+            std::stringstream ssError;
+            ssError << __PRETTY_FUNCTION__;
+            ssError << ": unable to set GPIO direction";
+            throw RuntimeError(ERROR_FC2_CREATE_IMAGE, ssError.str());
+        }
+        
         fc2TriggerMode trigMode = getTriggerMode_fc2();
         trigMode.onOff = TRUE;
         trigMode.mode = 0;
+        trigMode.source = 0;
+        trigMode.parameter = 0;
+        trigMode.polarity = 0;
         setTriggerMode(trigMode);
     }
 
 
     TimeStamp CameraDevice_fc2::getImageTimeStamp()
     {
-        //TimeStamp timeStamp;
-        //fc2TimeStamp timeStamp_fc2 = fc2GetImageTimeStamp(&rawImage_);
-        //timeStamp.seconds = (unsigned long long)(timeStamp_fc2.seconds);
-        //timeStamp.microSeconds = timeStamp_fc2.microSeconds;
-        //return timeStamp;
         return timeStamp_;
     }
 

src/gui/CMakeLists.txt

     timer_settings_dialog.ui
     logging_settings_dialog.ui
     format7_settings_dialog.ui
+    alignment_settings_dialog.ui
     )
 
 set(
     format7_settings_dialog.hpp
     json.hpp
     basic_http_server.hpp
+    alignment_settings.hpp
+    alignment_settings_dialog.hpp
     )
 
 set(
     format7_settings_dialog.cpp
     json.cpp
     basic_http_server.cpp
+    alignment_settings.cpp
+    alignment_settings_dialog.cpp
     )
 
 qt4_wrap_ui(bias_gui_FORMS_HEADERS ${bias_gui_FORMS}) 

src/gui/alignment_settings.cpp

+#include "alignment_settings.hpp"
+
+namespace bias
+{
+
+    const bool DEFAULT_GRID_VISIBLE = true;
+    const unsigned int DEFAULT_GRID_NUM_COL = 5;
+    const unsigned int DEFAULT_GRID_NUM_ROW = 5;
+    const unsigned int DEFAULT_GRID_PEN_WIDTH = 1;
+    const QColor DEFAULT_GRID_QCOLOR = QColor(0,0,255);
+
+    const bool DEFAULT_CIRCLE_VISIBLE = true;
+    const unsigned int DEFAULT_CIRCLE_RADIUS = 50;
+    const unsigned int DEFAULT_CIRCLE_POS_X = 100;
+    const unsigned int DEFAULT_CIRCLE_POS_Y = 100;
+    const unsigned int DEFAULT_CIRCLE_PEN_WIDTH = 1;
+    const QColor DEFAULT_CIRCLE_QCOLOR = QColor(255,255,0);
+
+    AlignmentSettings::AlignmentSettings()
+    {
+        gridVisible = DEFAULT_GRID_VISIBLE;
+        gridNumCol = DEFAULT_GRID_NUM_COL;
+        gridNumRow = DEFAULT_GRID_NUM_ROW;
+        gridPenWidth = DEFAULT_GRID_PEN_WIDTH;
+        gridQColor = DEFAULT_GRID_QCOLOR;
+
+        circleVisible = DEFAULT_CIRCLE_VISIBLE;
+        circleRadius = DEFAULT_CIRCLE_RADIUS;
+        circlePosX = DEFAULT_CIRCLE_POS_X;
+        circlePosY = DEFAULT_CIRCLE_POS_Y;
+        circlePenWidth = DEFAULT_CIRCLE_PEN_WIDTH;
+        circleQColor = DEFAULT_CIRCLE_QCOLOR;
+
+    };
+
+} // namespace bias

src/gui/alignment_settings.hpp

+#ifndef BIAS_ALIGNMENT_SETTINGS_HPP
+#define BIAS_ALIGNMENT_SETTINGS_HPP
+
+#include <QColor>
+
+namespace bias
+{
+
+    class AlignmentSettings
+    {
+        public:
+
+            AlignmentSettings();
+
+            bool gridVisible;
+            unsigned int gridNumCol;
+            unsigned int gridNumRow;
+            unsigned int gridPenWidth;
+            QColor gridQColor;
+
+            bool circleVisible;
+            unsigned int circleRadius;
+            unsigned int circlePosX;
+            unsigned int circlePosY;
+            unsigned int circlePenWidth;
+            QColor circleQColor;
+
+    };
+
+} // namespace bias
+
+#endif // #ifndef BIAS_ALIGNMENT_SETTINGS_HPP

src/gui/alignment_settings_dialog.cpp

+#include "alignment_settings_dialog.hpp"
+
+namespace bias
+{
+
+    AlignmentSettingsDialog::AlignmentSettingsDialog(QWidget *parent)
+        : QDialog(parent)
+    {
+        connectWidgets();
+        initialize();
+    }
+
+
+    AlignmentSettingsDialog::AlignmentSettingsDialog(
+            AlignmentSettings settings, 
+            QWidget *parent
+            ) : QDialog(parent)
+    {
+        settings_ = settings;
+        initialize();
+    }
+    
+
+    void AlignmentSettingsDialog::connectWidgets()
+    {
+
+    }
+
+    void AlignmentSettingsDialog::initialize()
+    {
+        setupUi(this);
+
+        setAttribute(Qt::WA_DeleteOnClose);
+
+        updateSettings(settings_);
+    }
+
+
+    void AlignmentSettingsDialog::updateSettings(AlignmentSettings settings)
+    {
+        settings_ = settings;
+
+        gridVisibleCheckBoxPtr_ -> setChecked(true);
+
+    }
+
+
+} // namespace bias

src/gui/alignment_settings_dialog.hpp

+#ifndef BIAS_ALIGNMENT_SETTINGS_DIALOG_HPP
+#define BIAS_ALIGNMENT_SETTINSG_DIALOG_HPP
+
+#include <QDialog>
+#include "ui_alignment_settings_dialog.h"
+#include "alignment_settings.hpp"
+
+namespace bias
+{
+
+    class AlignmentSettingsDialog : public QDialog, public Ui::AlignmentSettingsDialog
+    {
+        Q_OBJECT
+
+        public:
+
+            AlignmentSettingsDialog(QWidget *parent=0);
+            AlignmentSettingsDialog(AlignmentSettings settings, QWidget *parent=0);
+
+        signals:
+
+            void alignmentSettingsChanged(AlignmentSettings settings);
+
+        private:
+
+            AlignmentSettings settings_;
+             
+            void initialize();
+            void connectWidgets();
+            void updateSettings(AlignmentSettings settings);
+
+
+
+    };
+
+} // namespace bias
+
+#endif // #ifndef BIAS_ALIGNMENT_SETTINGS_DIALOG_HPP

src/gui/alignment_settings_dialog.ui

+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AlignmentSettingsDialog</class>
+ <widget class="QDialog" name="AlignmentSettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>527</width>
+    <height>330</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Alignmet Tools</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>1</number>
+     </property>
+     <widget class="QWidget" name="gridTabPtr">
+      <attribute name="title">
+       <string>Grid</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QWidget" name="gridVisibleWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_8">
+          <item>
+           <widget class="QCheckBox" name="gridVisibleCheckBoxPtr_">
+            <property name="text">
+             <string>Visible</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_12">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>407</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_6">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="gridRowsWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
+          <item>
+           <widget class="QLabel" name="label">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>25</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>25</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Rows</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QComboBox" name="gridRowsComboBoxPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>60</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>60</width>
+              <height>16777215</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_4">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>369</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_3">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="gridColsWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_9">
+          <item>
+           <widget class="QLabel" name="label_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>25</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>25</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Cols</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QComboBox" name="gridColsComboBoxPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>60</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>60</width>
+              <height>16777215</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_6">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>369</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_7">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="gridColorWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <widget class="QLabel" name="gridColorLabelPtr_">
+            <property name="text">
+             <string>Color:</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="gridColorImageLabelPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>25</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>25</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="frameShape">
+             <enum>QFrame::Box</enum>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_13">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>20</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QPushButton" name="gridColorChangePushButtonPtr_">
+            <property name="text">
+             <string>Change</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>51</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="circleTabPtr_">
+      <attribute name="title">
+       <string>Circle</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QWidget" name="circleVisibleWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <widget class="QCheckBox" name="circleVisibleCheckBoxPtr_">
+            <property name="layoutDirection">
+             <enum>Qt::LeftToRight</enum>
+            </property>
+            <property name="text">
+             <string>Visible</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_2">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>407</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="circlePosXWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_4">
+          <item>
+           <widget class="QLabel" name="circlePosXLabelPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>30</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>30</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Pos X</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_3">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>15</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QSlider" name="circlePosXSliderPtr_">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_5">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>15</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="circlePosXLineEditPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>60</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>60</width>
+              <height>16777215</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="widget_5" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_5">
+          <item>
+           <widget class="QLabel" name="circlePosYLabelPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>30</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>30</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Pos Y</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_7">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>15</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QSlider" name="circlePosYSliderPtr_">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_8">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>15</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="circlePosYLineEditPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>60</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>60</width>
+              <height>16777215</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_4">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="circleRadiusWidgetPtr_" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_6">
+          <item>
+           <widget class="QLabel" name="circleRadiusLabelPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>30</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>30</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Radius </string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_9">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>15</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QSlider" name="circleRadiusSliderPtr_">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_10">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>15</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="circleRadiusLineEditPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>60</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>60</width>
+              <height>16777215</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_5">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="widget_7" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_7">
+          <item>
+           <widget class="QLabel" name="circleColorLabelPtr_">
+            <property name="text">
+             <string>Color:</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="circleColorImageLabelPtr_">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>25</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>25</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="autoFillBackground">
+             <bool>false</bool>
+            </property>
+            <property name="frameShape">
+             <enum>QFrame::Box</enum>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_14">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>20</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QPushButton" name="circleColorChangePushButtonPtr_">
+            <property name="text">
+             <string>Change</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_11">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>4</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

src/gui/camera_window.cpp

 #include "timer_settings_dialog.hpp"
 #include "logging_settings_dialog.hpp"
 #include "format7_settings_dialog.hpp"
+#include "alignment_settings_dialog.hpp"
 #include "background_histogram_ufmf.hpp"
 #include "json.hpp"
 #include "basic_http_server.hpp"
     }
 
 
+    void CameraWindow::actionDisplayAlignToolsTriggered()
+    {
+        // If alignment settings dialog does exist create it otherwise raise
+        if (alignmentSettingsDialogPtr_.isNull()) 
+        {
+            alignmentSettingsDialogPtr_ = new AlignmentSettingsDialog(this);
+            alignmentSettingsDialogPtr_ -> show();
+        }
+        else
+        {
+            alignmentSettingsDialogPtr_ -> raise();
+        }
+    }
+
+
     void CameraWindow::actionVideoModeTriggered(int vidModeInt)
     {
         VideoMode vidMode = VideoMode(vidModeInt);
                );
 
         connect(
+                actionDisplayAlignToolsPtr_,
+                SIGNAL(triggered()),
+                this,
+                SLOT(actionDisplayAlignToolsTriggered())
+               );
+
+        connect(
                 actionPluginsSettingsPtr_,
                 SIGNAL(triggered()),
                 this,
             QPixmap &pixmapOriginal,
             bool flipAndRotate,
             bool addFrameCount,
-            bool addRoiBoundary
+            bool addRoiBoundary,
+            bool addAlignmentObjs
             )
     {
         // Draw ROI
             }
         }
 
+        // Scale pixmap
         QPixmap pixmapScaled =  pixmapCopy.scaled(
                 imageLabelPtr -> size(),
                 Qt::KeepAspectRatio, 
                 Qt::SmoothTransformation
                 );
 
+        // Add alignment objects
+        if (haveImagePixmap_ && addAlignmentObjs)
+        { 
+            QSize scaledPixmapSize = pixmapScaled.size();
+            QSize origPixmapSize = pixmapOriginal.size();
+
+            unsigned int scaledPixmapWidth = scaledPixmapSize.width();
+            unsigned int scaledPixmapHeight = scaledPixmapSize.height();
+            unsigned int origPixmapWidth = origPixmapSize.width();
+            unsigned int origPixmapHeight = origPixmapSize.height();
+
+            // Draw alignment grid
+            if (alignmentSettings_.gridVisible)
+            {
+                QPainter gridPainter(&pixmapScaled);
+                QPen gridPen = QPen(alignmentSettings_.gridQColor);
+                gridPen.setWidth(alignmentSettings_.gridPenWidth);
+                gridPainter.setPen(gridPen);
+
+                unsigned int posX;
+                unsigned int posY; 
+
+                for (unsigned int i=0;i<alignmentSettings_.gridNumCol; i++)
+                {
+                    posX = (i+1)*(scaledPixmapWidth/(alignmentSettings_.gridNumCol+1));
+                    gridPainter.drawLine(posX,0, posX, scaledPixmapHeight);
+                }
+
+                for (unsigned int i=0; i<alignmentSettings_.gridNumRow; i++)
+                {
+                    posY = (i+1)*(scaledPixmapHeight/(alignmentSettings_.gridNumRow+1));
+                    gridPainter.drawLine(0,posY,scaledPixmapWidth,posY);
+                }
+                gridPainter.end();
+            }
+
+            // Draw alignement circle
+            if (alignmentSettings_.circleVisible)
+            {
+                float scaleX = float(scaledPixmapWidth)/float(origPixmapWidth);
+                float scaleY = float(scaledPixmapHeight)/float(origPixmapHeight);
+                QPainter circlePainter(&pixmapScaled);
+                QPen circlePen = QPen(alignmentSettings_.circleQColor);
+                circlePen.setWidth(alignmentSettings_.circlePenWidth);
+                circlePainter.setPen(circlePen);
+                circlePainter.drawEllipse(
+                        (unsigned int)(scaleX*alignmentSettings_.circlePosX),
+                        (unsigned int)(scaleY*alignmentSettings_.circlePosY),
+                        (unsigned int)(2*scaleX*alignmentSettings_.circleRadius),
+                        (unsigned int)(2*scaleY*alignmentSettings_.circleRadius)
+                        );
+                circlePainter.end();
+            }
+        }
+
         
         // Flip and rotate pixmap if required
         if (flipAndRotate) {
 
     void CameraWindow::updateAllImageLabels()
     { 
-        updateImageLabel(previewImageLabelPtr_, previewPixmapOriginal_, true, true, true);
-        updateImageLabel(pluginImageLabelPtr_, pluginPixmapOriginal_, true, false, false);
-        updateImageLabel(histogramImageLabelPtr_, histogramPixmapOriginal_, false, false, false);
+        updateImageLabel(
+                previewImageLabelPtr_,   
+                previewPixmapOriginal_,   
+                true,  
+                true,  
+                true,
+                true
+                );
+
+        updateImageLabel(
+                pluginImageLabelPtr_,    
+                pluginPixmapOriginal_,    
+                true,  
+                false, 
+                false,
+                false
+                );
+
+        updateImageLabel(
+                histogramImageLabelPtr_, 
+                histogramPixmapOriginal_, 
+                false, 
+                false, 
+                false,
+                false
+                );
     }
 
 
             QPixmap &pixmapOriginal, 
             bool flipAndRotate,
             bool addFrameCount,
-            bool addRoiBoundary
+            bool addRoiBoundary,
+            bool addAlignmentObjs
             )
     {
         // Determines if resize of pixmap of image on Qlabel is required and 
                     pixmapOriginal,
                     flipAndRotate,
                     addFrameCount,
-                    addRoiBoundary
+                    addRoiBoundary,
+                    addAlignmentObjs
                     );
         }
     }
 
     void CameraWindow::resizeAllImageLabels()
     { 
-        resizeImageLabel(previewImageLabelPtr_, previewPixmapOriginal_, true, true, true);
-        resizeImageLabel(pluginImageLabelPtr_, pluginPixmapOriginal_, false, false, false);
-        resizeImageLabel(histogramImageLabelPtr_, histogramPixmapOriginal_, false, false, false);
+        resizeImageLabel(
+                previewImageLabelPtr_, 
+                previewPixmapOriginal_, 
+                true, 
+                true, 
+                true, 
+                true
+                );
+
+        resizeImageLabel(
+                pluginImageLabelPtr_, 
+                pluginPixmapOriginal_, 
+                true, 
+                false, 
+                false, 
+                false
+                );
+
+        resizeImageLabel(
+                histogramImageLabelPtr_, 
+                histogramPixmapOriginal_, 
+                false, 
+                false, 
+                false, 
+                false
+                );
     }
 
 
         TriggerType triggerType = convertStringToTriggerType(triggerTypeString);
 
         // --------------------------------------------------------------------
-        // TEMPORARY - currently only allow internal trigger
+        // TO DO - Check if trigger type is allowed 
         // --------------------------------------------------------------------
-        if (triggerType != TRIGGER_INTERNAL)
-        {
-            QString errMsgText = QString("Development Error: triggerType = %1").arg(triggerTypeString); 
-            errMsgText += "\n\n";
-            errMsgText += "currently only triggerType=Internal supported";
-            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
-        // --------------------------------------------------------------------
+        switch (triggerType)
+        {
+            case TRIGGER_INTERNAL:
+                cameraPtr_ -> acquireLock();
+                cameraPtr_ -> setTriggerInternal();
+                cameraPtr_ -> releaseLock();
+                actionCameraTriggerInternalPtr_ -> setChecked(true);
+                actionCameraTriggerExternalPtr_ -> setChecked(false);
+                break;
+
+            case TRIGGER_EXTERNAL:
+                cameraPtr_ -> acquireLock();
+                cameraPtr_ -> setTriggerExternal();
+                cameraPtr_ -> releaseLock();
+                actionCameraTriggerInternalPtr_ -> setChecked(false);
+                actionCameraTriggerExternalPtr_ -> setChecked(true);
+                break;
+
+            default:
+                {
+                    QString errMsgText = QString("Unknown triggerType = %1").arg(triggerType); 
+                    if (showErrorDlg)
+                    {
+                        QMessageBox::critical(this,errMsgTitle,errMsgText);
+                    }
+                    rtnStatus.success = false;
+                    rtnStatus.message = errMsgText;
+                    return rtnStatus;
+                }
+
+        } // swtich(triggerType)
 
         // Format7 settings
         QVariantMap format7SettingsMap = cameraMap["format7Settings"].toMap();

src/gui/camera_window.hpp

 #include "ui_camera_window.h"
 #include "camera_facade_fwd.hpp"
 #include "video_writer_params.hpp"
+#include "alignment_settings.hpp"
 
 
 // External lib forward declarations
     class TimerSettingsDialog;
     class LoggingSettingsDialog;
     class Format7SettingsDialog;
+    class AlignmentSettingsDialog;
     class BasicHttpServer;
     template <class T> class Lockable;
     template <class T> class LockableQueue;
             void actionDisplayFlipVertTriggered();
             void actionDisplayFlipHorzTriggered();
             void actionDisplayRotTriggered();
+            void actionDisplayAlignToolsTriggered();
             void actionHelpUserManualTriggered();
             void actionPluginsSettingsTriggered();
             void actionServerEnabledTriggered();
             QPixmap pluginPixmapOriginal_;
             QPixmap histogramPixmapOriginal_;
 
+
             QPointer<QActionGroup> videoModeActionGroupPtr_; 
             QPointer<QActionGroup> frameRateActionGroupPtr_; 
             QPointer<QActionGroup> cameraTriggerActionGroupPtr_;
             QPointer<TimerSettingsDialog> timerSettingsDialogPtr_;
             QPointer<LoggingSettingsDialog> loggingSettingsDialogPtr_;
             QPointer<Format7SettingsDialog> format7SettingsDialogPtr_;
+            AlignmentSettings alignmentSettings_;
+            QPointer<AlignmentSettingsDialog> alignmentSettingsDialogPtr_;
 
             VideoWriterParams videoWriterParams_;
 
                     QPixmap &pixmapOriginal, 
                     bool flipAndRotate=true,
                     bool addFrameCount=true,
-                    bool addRoiBoundary=true
+                    bool addRoiBoundary=true,
+                    bool addAlignmentObjs=true
                     );
             void updateAllImageLabels();
 
                     QPixmap &pixmapOriginal, 
                     bool flipAndRotate=true,
                     bool addFrameCount=true,
-                    bool addRoiBoundary=true
+                    bool addRoiBoundary=true,
+                    bool addAlignmentObjs=true
                     );
+
             void resizeAllImageLabels();
             void updateHistogramPixmap(cv::Mat hist);
 

src/gui/camera_window.ui

     </widget>
     <addaction name="menuDisplayOrientationPtr_"/>
     <addaction name="menuDisplayRotPtr_"/>
+    <addaction name="actionDisplayAlignToolsPtr_"/>
     <addaction name="actionDisplayUpdateFreqPtr_"/>
    </widget>
    <widget class="QMenu" name="menuFile">
     <string>Commands...</string>
    </property>
   </action>
+  <action name="actionDisplayAlignToolsPtr_">
+   <property name="text">
+    <string>Alignment Tools...</string>
+   </property>
+  </action>
  </widget>
  <resources/>
  <connections/>