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

Initial work for rotator support.

parent 9096ca38
......@@ -196,6 +196,8 @@ Capture::Capture()
resetFrameB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
calibrationB->setIcon(QIcon::fromTheme("run-build", QIcon(":/icons/breeze/default/run-build.svg")));
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"));
removeFromQueueB->setToolTip(i18n("Remove job from sequence queue"));
......@@ -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)
{
currentTelescope = static_cast<ISD::Telescope *>(newTelescope);
......
......@@ -270,6 +270,7 @@ class Capture : public QWidget, public Ui::Capture
void addGuideHead(ISD::GDInterface *newCCD);
void syncFrameType(ISD::GDInterface *ccd);
void setTelescope(ISD::GDInterface *newTelescope);
void setRotator(ISD::GDInterface *newRotator);
void syncTelescopeInfo();
void syncFilterInfo();
......@@ -548,7 +549,7 @@ class Capture : public QWidget, public Ui::Capture
ISD::Telescope *currentTelescope;
ISD::CCD *currentCCD;
ISD::GDInterface *currentFilter;
ISD::GDInterface *currentFilter=nullptr, *currentRotator=nullptr;
ISD::DustCap *dustCap;
ISD::LightBox *lightBox;
ISD::Dome *dome;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>623</width>
<height>519</height>
<width>662</width>
<height>517</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2">
......@@ -27,7 +27,7 @@
<number>3</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="leftLayout">
<property name="spacing">
<number>3</number>
</property>
......@@ -51,10 +51,7 @@
<property name="title">
<string>CCD &amp;&amp; Filter Wheel</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>3</number>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>3</number>
</property>
......@@ -67,7 +64,10 @@
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0" colspan="7">
<layout class="QGridLayout" name="gridLayout_4">
<property name="spacing">
<number>3</number>
......@@ -103,6 +103,9 @@
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="spacing">
<number>3</number>
</property>
<item>
<widget class="QCheckBox" name="temperatureCheck">
<property name="toolTip">
......@@ -204,7 +207,7 @@
</item>
</layout>
</item>
<item>
<item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
......@@ -231,104 +234,55 @@
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>3</number>
</property>
<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="8" column="0">
<widget class="QLabel" name="textLabel1_9">
<property name="toolTip">
<string>Horizontal and Vertical binning</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Binning:</string>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLabel" name="textLabel1_16">
<item row="2" column="0">
<widget class="QLabel" name="exposureLabel_2">
<property name="toolTip">
<string/>
<string>Set the exposure time in seconds for individual images, if applicable</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>H:</string>
<string>Exposure:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QSpinBox" name="countIN">
<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>
</property>
<property name="minimum">
<number>1</number>
<double>0.001000000000000</double>
</property>
<property name="maximum">
<number>999</number>
<double>3600.000000000000000</double>
</property>
<property name="value">
<number>1</number>
<double>1.000000000000000</double>
</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>
<item row="2" column="3" colspan="2">
<widget class="QLabel" name="textLabel1_2_3">
<property name="toolTip">
<string>Reset CCD frame &amp; size values to default values</string>
<string/>
</property>
<property name="text">
<string>Reset</string>
<property name="whatsThis">
<string/>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item row="0" column="5" colspan="2">
<item row="2" column="5" colspan="2">
<widget class="QComboBox" name="FilterPosCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
......@@ -338,39 +292,7 @@
</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>
<property name="minimum">
<double>0.001000000000000</double>
</property>
<property name="maximum">
<double>3600.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="3" column="0">
<widget class="QLabel" name="textLabel1_4">
<property name="toolTip">
<string>Number of images to capture</string>
......@@ -383,111 +305,76 @@
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QSpinBox" name="binXIN">
<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="toolTip">
<string>Horizontal binning</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
<number>999</number>
</property>
<property name="value">
<number>1</number>
</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="0" column="0">
<widget class="QLabel" name="exposureLabel_2">
<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="6" column="1">
<widget class="QLabel" name="textLabel1_13">
<item row="3" column="3" colspan="2">
<widget class="QLabel" name="textLabel1_8">
<property name="toolTip">
<string/>
<string>Delay in seconds between consecutive images</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>X:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Format:</string>
<string>Delay:</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QSpinBox" name="frameWIN">
<item row="3" column="5" colspan="2">
<widget class="QSpinBox" name="delayIN">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>99</number>
<number>3600</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="textLabel1_12">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Frame:</string>
<string>Format:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="textLabel1_10">
<item row="4" column="1" colspan="2">
<widget class="QComboBox" name="transferFormatCombo">
<property name="toolTip">
<string/>
<string>Image Transfer Format</string>
</property>
<property name="whatsThis">
<string/>
<item>
<property name="text">
<string>FITS</string>
</property>
</item>
<item>
<property name="text">
<string>H:</string>
<string>Native</string>
</property>
</item>
</widget>
</item>
<item row="3" column="3" colspan="2">
<item row="4" column="3" colspan="2">
<widget class="QLabel" name="ISOLabel">
<property name="text">
<string>ISO:</string>
......@@ -497,21 +384,24 @@
</property>
</widget>
</item>
<item row="1" column="5" colspan="2">
<widget class="QSpinBox" name="delayIN">
<item row="4" column="5" colspan="2">
<widget class="QComboBox" name="ISOCombo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>3600</number>
<property name="toolTip">
<string>ISO settings</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="textLabel1_15">
<item row="5" column="0">
<widget class="QLabel" name="textLabel1_17">
<property name="toolTip">
<string/>
</property>
......@@ -519,7 +409,7 @@
<string/>
</property>
<property name="text">
<string>W:</string>
<string>Type:</string>
</property>
</widget>
</item>
......@@ -533,38 +423,39 @@
</property>
</widget>
</item>
<item row="8" column="4" colspan="2">
<widget class="QSpinBox" name="binYIN">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<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>Vertical binning</string>
</property>
<property name="minimum">
<number>1</number>
<string/>
</property>
<property name="maximum">
<number>10</number>
<property name="whatsThis">
<string/>
</property>
<property name="value">
<number>1</number>
<property name="text">
<string>Frame:</string>
</property>
</widget>
</item>
<item row="1" column="3" colspan="2">
<widget class="QLabel" name="textLabel1_8">
<item row="6" column="1">
<widget class="QLabel" name="textLabel1_13">
<property name="toolTip">
<string>Delay in seconds between consecutive images</string>
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Delay:</string>
<string>X:</string>
</property>
</widget>
</item>
......@@ -578,8 +469,8 @@
</property>
</widget>
</item>
<item row="8" column="3">
<widget class="QLabel" name="textLabel1_11">
<item row="6" column="3">
<widget class="QLabel" name="textLabel1_14">
<property name="toolTip">
<string/>
</property>
......@@ -587,7 +478,51 @@
<string/>
</property>
<property name="text">
<string>V:</string>
<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>
......@@ -604,8 +539,8 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel1_17">
<item row="7" column="1">
<widget class="QLabel" name="textLabel1_15">
<property name="toolTip">
<string/>
</property>
......@@ -613,45 +548,25 @@
<string/>
</property>
<property name="text">
<string>Type:</string>
<string>W:</string>
</property>
</widget>
</item>
<item row="3" column="5" colspan="2">
<widget class="QComboBox" name="ISOCombo">
<property name="enabled">
<bool>false</bool>
</property>
<item row="7" column="2">
<widget class="QSpinBox" name="frameWIN">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>ISO settings</string>
</property>
</widget>
</item>
<item row="3" 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>
<property name="text">
<string>Native</string>
<property name="maximum">
<number>99</number>
</property>
</item>
</widget>
</item>
<item row="0" column="3" colspan="2">
<widget class="QLabel" name="textLabel1_2_3">
<item row="7" column="3">
<widget class="QLabel" name="textLabel1_16">
<property name="toolTip">
<string/>
</property>
......@@ -659,21 +574,26 @@
<string/>
</property>
<property name="text">
<string>Filter:</string>
<string>H:</string>
</property>
</widget>
</item>
<item row="5" column="3" colspan="2">
<widget class="QLabel" name="gainLabel">
<property name="text">
<string>Gain:</string>
<item row="7" column="4" colspan="2">
<widget class="QSpinBox" name="frameHIN">
<property name="sizePolicy">