summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-24 09:53:02 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-24 09:53:02 (GMT)
commitd26bea32d853d593d66337aea0ccff05d6394dad (patch)
tree0ccc40ceddb265954bef75f052ac11fb34c323ed
parent043e2e6d247786c3a5005a480c76144c1c29a2d6 (diff)
Add button to display INDI logs
-rw-r--r--kstars/indi/opsindi.cpp11
-rw-r--r--kstars/indi/opsindi.h1
-rw-r--r--kstars/indi/opsindi.ui9
3 files changed, 19 insertions, 2 deletions
diff --git a/kstars/indi/opsindi.cpp b/kstars/indi/opsindi.cpp
index 1d20c07..6332af0 100644
--- a/kstars/indi/opsindi.cpp
+++ b/kstars/indi/opsindi.cpp
@@ -12,7 +12,8 @@
#include <QPushButton>
#include <QFileDialog>
-//#include <KLineEdit>
+#include <QDesktopServices>
+
#include <KConfigDialog>
#include <QCheckBox>
@@ -44,6 +45,7 @@ OpsINDI::OpsINDI()
connect(selectFITSDirB, SIGNAL(clicked()), this, SLOT(saveFITSDirectory()));
connect(selectDriversDirB, SIGNAL(clicked()), this, SLOT(saveDriversDirectory()));
+ connect(showLogsB, SIGNAL(clicked()), this, SLOT(slotShowLogFiles()));
#ifdef Q_OS_WIN
kcfg_indiServer->setEnabled(false);
@@ -69,3 +71,10 @@ void OpsINDI::saveDriversDirectory()
kcfg_indiDriversDir->setText(dir);
}
+void OpsINDI::slotShowLogFiles()
+{
+ QUrl path = QUrl::fromLocalFile(QDir::homePath() + "/.indi/logs");
+
+ QDesktopServices::openUrl(path);
+}
+
diff --git a/kstars/indi/opsindi.h b/kstars/indi/opsindi.h
index 4c97c6b..d3cbf50 100644
--- a/kstars/indi/opsindi.h
+++ b/kstars/indi/opsindi.h
@@ -33,6 +33,7 @@ public:
private slots:
void saveFITSDirectory();
void saveDriversDirectory();
+ void slotShowLogFiles();
private:
KConfigDialog *m_ConfigDialog;
diff --git a/kstars/indi/opsindi.ui b/kstars/indi/opsindi.ui
index 6a17013..6656465 100644
--- a/kstars/indi/opsindi.ui
+++ b/kstars/indi/opsindi.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>435</width>
+ <width>444</width>
<height>350</height>
</rect>
</property>
@@ -379,6 +379,13 @@
</property>
</spacer>
</item>
+ <item>
+ <widget class="QPushButton" name="showLogsB">
+ <property name="text">
+ <string>Show INDI Logs</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>