Commit 25b4a0ec authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Add PHD2 settings to Ekos options

parent 283f9d17
......@@ -29,9 +29,12 @@ OpsEkos::OpsEkos()
//Get a pointer to the KConfigDialog
m_ConfigDialog = KConfigDialog::exists( "settings" );
selectPHD2B->setIcon(QIcon::fromTheme("document-open"));
connect( m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL( clicked() ), SLOT( slotApply() ) );
connect( m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL( clicked() ), SLOT( slotApply() ) );
connect( m_ConfigDialog->button(QDialogButtonBox::Cancel), SIGNAL( clicked() ), SLOT( slotCancel() ) );
connect( selectPHD2B, SIGNAL(clicked()), this, SLOT(slotSelectPHD2Exec()));
}
......@@ -50,4 +53,13 @@ void OpsEkos::slotCancel()
{
}
void OpsEkos::slotSelectPHD2Exec()
{
QUrl phd2URL = QFileDialog::getOpenFileUrl(this, i18n("Select PHD2 Executable"));
if (phd2URL.isEmpty())
return;
kcfg_PHD2Exec->setText(phd2URL.path());
}
......@@ -34,6 +34,7 @@ private slots:
void slotApply();
void slotCancel();
void slotSelectPHD2Exec();
private:
KConfigDialog *m_ConfigDialog;
......
......@@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>468</width>
<height>313</height>
<width>490</width>
<height>419</height>
</rect>
</property>
<property name="windowTitle">
<string>TabWidget</string>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="generalTab">
<attribute name="title">
......@@ -295,7 +295,7 @@
<attribute name="title">
<string>Modules</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
......@@ -436,6 +436,115 @@
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>Guide</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QRadioButton" name="kcfg_UseEkosGuider">
<property name="toolTip">
<string>Use Ekos Native Guider.</string>
</property>
<property name="text">
<string>Internal Guider</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="kcfg_UsePHD2Guider">
<property name="toolTip">
<string>Use External PHD2 Guider. Limited functionality.</string>
</property>
<property name="text">
<string>PHD2</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_25">
<property name="text">
<string>PHD2</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="kcfg_PHD2Exec">
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="selectPHD2B">
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="kcfg_PHD2Port">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
......@@ -573,4 +682,7 @@
</widget>
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>
......@@ -1573,6 +1573,22 @@
</entry>
</group>
<group name="Guide">
<entry name="UseEkosGuider" type="Bool">
<label>Use Ekos Internal Guider Module for guiding</label>
<default>true</default>
</entry>
<entry name="UsePHD2Guider" type="Bool">
<label>Use External PHD2 Application for guiding</label>
<default>false</default>
</entry>
<entry name="PHD2Exec" type="String">
<label>PHD2 Executable</label>
<default>/usr/bin/phd2</default>
</entry>
<entry name="PHD2Port" type="UInt">
<label>PHD2 Event Monitoring Port</label>
<default>4400</default>
</entry>
<entry name="ST4Driver" type="String">
<label>Default ST4 Driver.</label>
</entry>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment