summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Fedoskin <afedoskin3@gmail.com>2016-11-01 20:50:11 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-11-01 20:50:11 (GMT)
commit2f928fbfa9441d5969121321731e1d6e3f9fb2e5 (patch)
treeb773ab8190c824916a2644a914b4da6e0b1e2bd8
parent3b3e27ea8c377f96d1cc95b15fb7abe0d3843dcf (diff)
KStars Lite - Fix bug with INDI in Android version
-rw-r--r--CMakeLists.txt2
-rw-r--r--kstars/fitsviewer/fitsviewlite.cpp2
-rw-r--r--kstars/kstarslite.cpp4
-rw-r--r--kstars/kstarslite.h6
-rw-r--r--kstars/kstarslite/qml/indi/INDIControlPanel.qml1
-rw-r--r--kstars/kstarslite/skyitems/rootnode.cpp6
-rw-r--r--kstars/kstarslite/skyitems/rootnode.h6
-rw-r--r--kstars/skymaplite.cpp6
-rw-r--r--kstars/skymaplite.h4
9 files changed, 2 insertions, 35 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c38acd..b9eedc8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,7 +83,7 @@ add_definitions(${EIGEN_DEFINITIONS})
include_directories(${EIGEN3_INCLUDE_DIR})
if(BUILD_KSTARS_LITE)
- find_package(CFitsio) #REQUIRED)
+ find_package(CFitsio REQUIRED)
else()
find_package(CFitsio)
endif()
diff --git a/kstars/fitsviewer/fitsviewlite.cpp b/kstars/fitsviewer/fitsviewlite.cpp
index dc5f556..fc5d95e 100644
--- a/kstars/fitsviewer/fitsviewlite.cpp
+++ b/kstars/fitsviewer/fitsviewlite.cpp
@@ -29,12 +29,10 @@
#include "ksutils.h"
#include "Options.h"
-#ifdef HAVE_INDI
#include <basedevice.h>
#include "indi/indilistener.h"
#include "indi/indistd.h"
#include "indi/driverinfo.h"
-#endif
#include <QImage>
#define ZOOM_DEFAULT 100.0
diff --git a/kstars/kstarslite.cpp b/kstars/kstarslite.cpp
index f1afcb7..0e3e419 100644
--- a/kstars/kstarslite.cpp
+++ b/kstars/kstarslite.cpp
@@ -27,9 +27,7 @@
#include "ksplanetbase.h"
#include <QScreen>
-#ifdef HAVE_INDI
#include "indi/clientmanagerlite.h"
-#endif
#include "kspaths.h"
@@ -59,11 +57,9 @@ KStarsLite::KStarsLite( bool doSplash, bool startClock, const QString &startDate
m_KStarsData = KStarsData::Create();
Q_ASSERT( m_KStarsData );
-#ifdef HAVE_INDI
//INDI Android Client
m_clientManager = new ClientManagerLite;
m_Engine.rootContext()->setContextProperty("ClientManagerLite", m_clientManager);
-#endif
//Make instance of KStarsLite and KStarsData available to QML
m_Engine.rootContext()->setContextProperty("KStarsLite", this);
diff --git a/kstars/kstarslite.h b/kstars/kstarslite.h
index b1ffbf5..0424f3d 100644
--- a/kstars/kstarslite.h
+++ b/kstars/kstarslite.h
@@ -36,9 +36,7 @@ class FindDialogLite;
class DetailDialogLite;
class LocationDialogLite;
-#ifdef HAVE_INDI
class ClientManagerLite;
-#endif
class QQuickItem;
@@ -110,10 +108,8 @@ public:
/** @return true if tutorial should be shown **/
bool getRunTutorial();
-#ifdef HAVE_INDI
/** @return pointer to KStarsData object which handles connection to INDI server. */
inline ClientManagerLite *clientManagerLite() const { return m_clientManager; }
-#endif
/** @defgroup kconfigwrappers QML wrappers around KConfig
* @{
@@ -241,9 +237,7 @@ private:
DetailDialogLite *m_detailDialogLite;
LocationDialogLite *m_locationDialogLite;
-#ifdef HAVE_INDI
ClientManagerLite *m_clientManager;
-#endif
};
#endif
diff --git a/kstars/kstarslite/qml/indi/INDIControlPanel.qml b/kstars/kstarslite/qml/indi/INDIControlPanel.qml
index e092050..045a1a6 100644
--- a/kstars/kstarslite/qml/indi/INDIControlPanel.qml
+++ b/kstars/kstarslite/qml/indi/INDIControlPanel.qml
@@ -98,6 +98,7 @@ KSPage {
notification.showNotification(xi18n("Couldn't connect to the server"))
}
} else {
+
ClientManagerLite.disconnectHost()
}
Qt.inputMethod.hide()
diff --git a/kstars/kstarslite/skyitems/rootnode.cpp b/kstars/kstarslite/skyitems/rootnode.cpp
index b3e1ab1..9e7f8d0 100644
--- a/kstars/kstarslite/skyitems/rootnode.cpp
+++ b/kstars/kstarslite/skyitems/rootnode.cpp
@@ -38,10 +38,8 @@
#include "kstarslite/skyitems/lines/eclipticitem.h"
#include "kstarslite/skyitems/lines/milkywayitem.h"
-#ifdef HAVE_INDI
//Symbols
#include "kstarslite/skyitems/telescopesymbolsitem.h"
-#endif
#include "kstarslite/skyitems/fovitem.h"
@@ -98,9 +96,7 @@ RootNode::RootNode()
m_internedResolvedCatalogItem = new SyncedCatalogItem(m_skyComposite->internetResolvedComponent(), this);
m_manualAdditionsCatalogItem = new SyncedCatalogItem(m_skyComposite->manualAdditionsComponent(), this);
-#ifdef HAVE_INDI
m_telescopeSymbols = new TelescopeSymbolsItem(this);
-#endif
setIsRectangular(false);
updateClipPoly();
@@ -268,9 +264,7 @@ void RootNode::update(bool clearTextures) {
m_internedResolvedCatalogItem->update();
m_manualAdditionsCatalogItem->update();
-#ifdef HAVE_INDI
m_telescopeSymbols->update();
-#endif
m_labelsItem->update();
m_FOVItem->update();
diff --git a/kstars/kstarslite/skyitems/rootnode.h b/kstars/kstarslite/skyitems/rootnode.h
index 93be1f9..2deb588 100644
--- a/kstars/kstarslite/skyitems/rootnode.h
+++ b/kstars/kstarslite/skyitems/rootnode.h
@@ -49,9 +49,7 @@ class SyncedCatalogItem;
class FOVItem;
-#ifdef HAVE_INDI
class TelescopeSymbolsItem;
-#endif
/** @class RootNode
*
@@ -107,9 +105,7 @@ public:
*/
void genCachedTextures();
-#ifdef HAVE_INDI
inline TelescopeSymbolsItem *telescopeSymbolsItem() { return m_telescopeSymbols; }
-#endif
private:
QVector<QVector<QSGTexture *>> m_textureCache;
QVector<QVector<QSGTexture *>> m_oldTextureCache;
@@ -145,8 +141,6 @@ private:
QSGGeometryNode *m_visualizeClipping;
FOVItem *m_FOVItem;
-#ifdef HAVE_INDI
TelescopeSymbolsItem *m_telescopeSymbols;
-#endif
};
#endif
diff --git a/kstars/skymaplite.cpp b/kstars/skymaplite.cpp
index 7a65dc2..405c5d9 100644
--- a/kstars/skymaplite.cpp
+++ b/kstars/skymaplite.cpp
@@ -18,11 +18,9 @@
#include "kstarsdata.h"
#include "kstarslite.h"
-#ifdef HAVE_INDI
#include "indi/inditelescopelite.h"
#include "indi/clientmanagerlite.h"
#include "kstarslite/skyitems/telescopesymbolsitem.h"
-#endif
#include "projections/projector.h"
#include "projections/lambertprojector.h"
@@ -133,12 +131,10 @@ SkyMapLite::SkyMapLite()
connect( this, SIGNAL( destinationChanged() ), this, SLOT( slewFocus() ) );
connect( KStarsData::Instance(), SIGNAL( skyUpdate( bool ) ), this, SLOT( slotUpdateSky( bool ) ) );
-#ifdef HAVE_INDI
ClientManagerLite *clientMng = KStarsLite::Instance()->clientManagerLite();
connect(clientMng, &ClientManagerLite::telescopeAdded, [this](TelescopeLite *newTelescope){ this->m_newTelescopes.append(newTelescope->getDevice()); });
connect(clientMng, &ClientManagerLite::telescopeRemoved, [this](TelescopeLite *newTelescope){ this->m_delTelescopes.append(newTelescope->getDevice()); });
-#endif
}
QSGNode* SkyMapLite::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) {
@@ -155,7 +151,6 @@ QSGNode* SkyMapLite::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *upda
m_rootNode = n;
}
/** Add or delete telescope crosshairs **/
-#ifdef HAVE_INDI
if(m_newTelescopes.count() > 0) {
foreach(INDI::BaseDevice *telescope, m_newTelescopes) {
n->telescopeSymbolsItem()->addTelescope(telescope);
@@ -169,7 +164,6 @@ QSGNode* SkyMapLite::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *upda
}
m_delTelescopes.clear();
}
-#endif
//Notify RootNode that textures for point node should be recreated
n->update(clearTextures);
clearTextures = false;
diff --git a/kstars/skymaplite.h b/kstars/skymaplite.h
index 05f6294..b9a05e6 100644
--- a/kstars/skymaplite.h
+++ b/kstars/skymaplite.h
@@ -30,9 +30,7 @@
#include "kstarsdata.h"
#include "kstarslite/skyitems/rootnode.h"
-#ifdef HAVE_INDI
#include "basedevice.h"
-#endif
class dms;
class KStarsData;
@@ -684,10 +682,8 @@ private:
bool tapBegan;
-#ifdef HAVE_INDI
QList<INDI::BaseDevice *> m_newTelescopes;
QList<INDI::BaseDevice *> m_delTelescopes;
-#endif
};
#endif