summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-03 14:57:11 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-03 14:57:11 (GMT)
commita7603e2120a56cb10e1e3057c780e84b69fb47d4 (patch)
tree6027138eb5ad53871d17258ef4dc416d76961fa3
parent8e84022f58b84155a45eb6c818472fed11a52c14 (diff)
Compile without WCS take 2
-rw-r--r--kstars/fitsviewer/fitsdata.cpp9
-rw-r--r--kstars/fitsviewer/fitsdata.h9
-rw-r--r--kstars/fitsviewer/fitsviewer.cpp7
3 files changed, 15 insertions, 10 deletions
diff --git a/kstars/fitsviewer/fitsdata.cpp b/kstars/fitsviewer/fitsdata.cpp
index b29f632..60d9e9f 100644
--- a/kstars/fitsviewer/fitsdata.cpp
+++ b/kstars/fitsviewer/fitsdata.cpp
@@ -17,7 +17,6 @@
* See http://members.aol.com/pkirchg for more details. *
***************************************************************************/
-#include <config-kstars.h>
#include "fitsdata.h"
#include "skymapcomposite.h"
#include "kstarsdata.h"
@@ -41,7 +40,6 @@
#ifdef HAVE_WCSLIB
#include <wcshdr.h>
#include <wcsfix.h>
-#include <wcs.h>
#endif
#include "ksutils.h"
@@ -1780,10 +1778,9 @@ bool FITSData::checkWCS()
return false;
}
+#ifdef HAVE_WCSLIB
void FITSData::findObjectsInImage(struct wcsprm *wcs, double world[], double phi, double theta, double imgcrd[], double pixcrd[], int stat[])
{
- #ifdef HAVE_WCSLIB
-
int width=getWidth();
int height=getHeight();
int status=0;
@@ -1853,10 +1850,8 @@ void FITSData::findObjectsInImage(struct wcsprm *wcs, double world[], double phi
}
delete (num);
-
-#endif
-
}
+#endif
QList<FITSSkyObject *> FITSData::getSkyObjects(){
return objList;
diff --git a/kstars/fitsviewer/fitsdata.h b/kstars/fitsviewer/fitsdata.h
index 91df5d1..68d6d3c 100644
--- a/kstars/fitsviewer/fitsdata.h
+++ b/kstars/fitsviewer/fitsdata.h
@@ -20,7 +20,8 @@
#ifndef FITSDATA_H_
#define FITSDATA_H_
-#include "skyobject.h"
+#include <config-kstars.h>
+
#include <QFrame>
#include <QImage>
#include <QPixmap>
@@ -31,6 +32,8 @@
#include <QLabel>
#include <QStringList>
+#include "skyobject.h"
+
#ifdef HAVE_WCSLIB
#include <wcs.h>
#endif
@@ -92,7 +95,6 @@ private:
};
-
class FITSData
{
public:
@@ -204,10 +206,13 @@ public:
int getFlipVCounter() const;
void setFlipVCounter(int value);
+ #ifdef HAVE_WCSLIB
void findObjectsInImage(struct wcsprm *wcs, double world[], double phi, double theta, double imgcrd[], double pixcrd[], int stat[]);
+ #endif
QList<FITSSkyObject *> getSkyObjects();
QList<FITSSkyObject*> objList;//Does this need to be public??
+
private:
bool rotFITS (int rotate, int mirror);
diff --git a/kstars/fitsviewer/fitsviewer.cpp b/kstars/fitsviewer/fitsviewer.cpp
index 11bf82a..e060559 100644
--- a/kstars/fitsviewer/fitsviewer.cpp
+++ b/kstars/fitsviewer/fitsviewer.cpp
@@ -57,7 +57,10 @@
#include "fitshistogram.h"
#include "ksutils.h"
#include "Options.h"
+
+#ifdef HAVE_INDI
#include "indi/indilistener.h"
+#endif
#define INITIAL_W 785
#define INITIAL_H 650
@@ -99,9 +102,11 @@ FITSViewer::FITSViewer (QWidget *parent)
//These two connections will enable or disable the scope button if a scope is available or not.
//Of course this is also dependent on the presence of WCS data in the image.
+
+ #ifdef HAVE_INDI
connect(INDIListener::Instance(), SIGNAL(newTelescope(ISD::GDInterface *)), this, SLOT(updateWCSFunctions()));
connect(INDIListener::Instance(), SIGNAL(deviceRemoved(ISD::GDInterface *)), this, SLOT(updateWCSFunctions()));
-
+ #endif
led.setColor(Qt::green);