Commit 1c9b5c68 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Initial work for rotator support.

parent 9096ca38
...@@ -196,6 +196,8 @@ Capture::Capture() ...@@ -196,6 +196,8 @@ Capture::Capture()
resetFrameB->setAttribute(Qt::WA_LayoutUsesWidgetRect); resetFrameB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
calibrationB->setIcon(QIcon::fromTheme("run-build", QIcon(":/icons/breeze/default/run-build.svg"))); calibrationB->setIcon(QIcon::fromTheme("run-build", QIcon(":/icons/breeze/default/run-build.svg")));
calibrationB->setAttribute(Qt::WA_LayoutUsesWidgetRect); calibrationB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
rotatorB->setIcon(QIcon::fromTheme("kstars_solarsystem", QIcon(":/icons/breeze/default/kstars_solarsystem.svg")));
rotatorB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
addToQueueB->setToolTip(i18n("Add job to sequence queue")); addToQueueB->setToolTip(i18n("Add job to sequence queue"));
removeFromQueueB->setToolTip(i18n("Remove job from sequence queue")); removeFromQueueB->setToolTip(i18n("Remove job from sequence queue"));
...@@ -2373,6 +2375,12 @@ void Capture::setFocusStatus(FocusState state) ...@@ -2373,6 +2375,12 @@ void Capture::setFocusStatus(FocusState state)
} }
} }
void Capture::setRotator(ISD::GDInterface *newRotator)
{
currentRotator = newRotator;
rotatorB->setEnabled(true);
}
void Capture::setTelescope(ISD::GDInterface *newTelescope) void Capture::setTelescope(ISD::GDInterface *newTelescope)
{ {
currentTelescope = static_cast<ISD::Telescope *>(newTelescope); currentTelescope = static_cast<ISD::Telescope *>(newTelescope);
......
...@@ -270,6 +270,7 @@ class Capture : public QWidget, public Ui::Capture ...@@ -270,6 +270,7 @@ class Capture : public QWidget, public Ui::Capture
void addGuideHead(ISD::GDInterface *newCCD); void addGuideHead(ISD::GDInterface *newCCD);
void syncFrameType(ISD::GDInterface *ccd); void syncFrameType(ISD::GDInterface *ccd);
void setTelescope(ISD::GDInterface *newTelescope); void setTelescope(ISD::GDInterface *newTelescope);
void setRotator(ISD::GDInterface *newRotator);
void syncTelescopeInfo(); void syncTelescopeInfo();
void syncFilterInfo(); void syncFilterInfo();
...@@ -548,7 +549,7 @@ class Capture : public QWidget, public Ui::Capture ...@@ -548,7 +549,7 @@ class Capture : public QWidget, public Ui::Capture
ISD::Telescope *currentTelescope; ISD::Telescope *currentTelescope;
ISD::CCD *currentCCD; ISD::CCD *currentCCD;
ISD::GDInterface *currentFilter; ISD::GDInterface *currentFilter=nullptr, *currentRotator=nullptr;
ISD::DustCap *dustCap; ISD::DustCap *dustCap;
ISD::LightBox *lightBox; ISD::LightBox *lightBox;
ISD::Dome *dome; ISD::Dome *dome;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>623</width> <width>662</width>
<height>519</height> <height>517</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2"> <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="leftLayout">
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
</property> </property>
...@@ -51,10 +51,7 @@ ...@@ -51,10 +51,7 @@
<property name="title"> <property name="title">
<string>CCD &amp;&amp; Filter Wheel</string> <string>CCD &amp;&amp; Filter Wheel</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin"> <property name="leftMargin">
<number>3</number> <number>3</number>
</property> </property>
...@@ -67,7 +64,10 @@ ...@@ -67,7 +64,10 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>3</number> <number>3</number>
</property> </property>
<item> <property name="spacing">
<number>3</number>
</property>
<item row="0" column="0" colspan="7">
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
...@@ -103,6 +103,9 @@ ...@@ -103,6 +103,9 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11"> <layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="spacing">
<number>3</number>
</property>
<item> <item>
<widget class="QCheckBox" name="temperatureCheck"> <widget class="QCheckBox" name="temperatureCheck">
<property name="toolTip"> <property name="toolTip">
...@@ -204,7 +207,7 @@ ...@@ -204,7 +207,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
...@@ -231,71 +234,370 @@ ...@@ -231,71 +234,370 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="2" column="0">
<layout class="QGridLayout" name="gridLayout"> <widget class="QLabel" name="exposureLabel_2">
<property name="spacing"> <property name="toolTip">
<string>Set the exposure time in seconds for individual images, if applicable</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Exposure:</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QDoubleSpinBox" name="exposureIN">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="decimals">
<number>3</number> <number>3</number>
</property> </property>
<item row="6" column="3"> <property name="minimum">
<widget class="QLabel" name="textLabel1_14"> <double>0.001000000000000</double>
<property name="toolTip"> </property>
<string/> <property name="maximum">
</property> <double>3600.000000000000000</double>
<property name="whatsThis"> </property>
<string/> <property name="value">
</property> <double>1.000000000000000</double>
<property name="text"> </property>
<string>Y:</string> </widget>
</property> </item>
</widget> <item row="2" column="3" colspan="2">
</item> <widget class="QLabel" name="textLabel1_2_3">
<item row="8" column="0"> <property name="toolTip">
<widget class="QLabel" name="textLabel1_9"> <string/>
<property name="toolTip"> </property>
<string>Horizontal and Vertical binning</string> <property name="whatsThis">
</property> <string/>
<property name="whatsThis"> </property>
<string/> <property name="text">
</property> <string>Filter:</string>
<property name="text"> </property>
<string>Binning:</string> </widget>
</property> </item>
</widget> <item row="2" column="5" colspan="2">
<widget class="QComboBox" name="FilterPosCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="textLabel1_4">
<property name="toolTip">
<string>Number of images to capture</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Count:</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QSpinBox" name="countIN">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="3" column="3" colspan="2">
<widget class="QLabel" name="textLabel1_8">
<property name="toolTip">
<string>Delay in seconds between consecutive images</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Delay:</string>
</property>
</widget>
</item>
<item row="3" column="5" colspan="2">
<widget class="QSpinBox" name="delayIN">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>3600</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Format:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QComboBox" name="transferFormatCombo">
<property name="toolTip">
<string>Image Transfer Format</string>
</property>
<item>
<property name="text">
<string>FITS</string>
</property>
</item> </item>
<item row="7" column="3"> <item>
<widget class="QLabel" name="textLabel1_16"> <property name="text">
<property name="toolTip"> <string>Native</string>
<string/> </property>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>H:</string>
</property>
</widget>
</item> </item>
<item row="1" column="1" colspan="2"> </widget>
<widget class="QSpinBox" name="countIN"> </item>
<property name="sizePolicy"> <item row="4" column="3" colspan="2">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <widget class="QLabel" name="ISOLabel">
<horstretch>0</horstretch> <property name="text">
<verstretch>0</verstretch> <string>ISO:</string>
</sizepolicy> </property>
</property> <property name="alignment">
<property name="minimum"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<number>1</number> </property>
</property> </widget>
<property name="maximum"> </item>
<number>999</number> <item row="4" column="5" colspan="2">
</property> <widget class="QComboBox" name="ISOCombo">
<property name="value"> <property name="enabled">
<number>1</number> <bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>ISO settings</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel1_17">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Type:</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QComboBox" name="frameTypeCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="5" column="3" colspan="2">
<widget class="QLabel" name="gainLabel">
<property name="text">
<string>Gain:</string>
</property>
</widget>
</item>
<item row="5" column="5" colspan="2">
<widget class="QDoubleSpinBox" name="gainIN"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="textLabel1_12">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Frame:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="textLabel1_13">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>X:</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QSpinBox" name="frameXIN">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QLabel" name="textLabel1_14">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Y:</string>
</property>
</widget>
</item>
<item row="6" column="4" colspan="2">
<widget class="QSpinBox" name="frameYIN">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="6" column="6">
<widget class="QPushButton" name="resetFrameB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Reset CCD frame &amp; size values to default values</string>
</property>
<property name="text">
<string>Reset</string>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="textLabel1_19">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Size:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="textLabel1_15">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>W:</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QSpinBox" name="frameWIN">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>99</number>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLabel" name="textLabel1_16">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>H:</string>
</property>
</widget>
</item>
<item row="7" column="4" colspan="2">
<widget class="QSpinBox" name="frameHIN">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="7" column="6" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>3</number>
</property>
<item>
<widget class="QPushButton" name="calibrationB">
<property name="enabled">
<bool>false</bool>
</property> </property>
</widget>
</item>
<item row="6" column="6">
<widget class="QPushButton" name="resetFrameB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -304,8 +606,8 @@ ...@@ -304,8 +606,8 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>22</width>
<height>0</height> <height>22</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
...@@ -315,10 +617,10 @@ ...@@ -315,10 +617,10 @@
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Reset CCD frame &amp; size values to default values</string> <string>Dark &amp; Flat frames automatic calibration options</string>
</property> </property>
<property name="text"> <property name="text">
<string>Reset</string> <string>Calibration</string>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
...@@ -328,392 +630,105 @@ ...@@ -328,392 +630,105 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="5" colspan="2"> <item>
<widget class="QComboBox" name="FilterPosCombo"> <widget class="QPushButton" name="rotatorB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="6" column="4" colspan="2">
<widget class="QSpinBox" name="frameYIN">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QDoubleSpinBox" name="exposureIN">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="decimals">
<number>3</number>
</property>