summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Fedoskin <afedoskin3@gmail.com>2016-05-14 14:27:26 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-05-14 14:27:26 (GMT)
commita7fd3b67ecd10dc936b19d79cb2da10cc3aaa982 (patch)
treee75cd3d3a0b2ead596e8a57ac657489b56a281e4
parentea7ea2d07b25b8bcec4dc2068b8aa4c03e1ad158 (diff)
Started setting up build for Android. Edited CMakeLists.txt so that
modules that are not used in Android version are not compiled. Started excluding not used modules in simclock.cpp, kstarsdata.cpp and skymapcomposite.cpp
-rw-r--r--CMakeLists.txt42
-rw-r--r--datahandlers/CMakeLists.txt8
-rw-r--r--datahandlers/catalogdb.cpp3
-rw-r--r--datahandlers/catalogdb.h4
-rw-r--r--doc/CMakeLists.txt4
-rw-r--r--kstars/CMakeLists.txt916
-rw-r--r--kstars/Options.kcfgc1
-rw-r--r--kstars/auxiliary/ksuserdb.cpp20
-rw-r--r--kstars/auxiliary/ksuserdb.h17
-rw-r--r--kstars/kstarsdata.cpp11
-rw-r--r--kstars/kstarsdata.h11
-rw-r--r--kstars/main.cpp17
-rw-r--r--kstars/oal/oal.h6
-rw-r--r--kstars/skycomponents/skymapcomposite.cpp42
-rw-r--r--kstars/time/simclock.cpp6
-rw-r--r--kstars/time/simclock.h6
16 files changed, 631 insertions, 483 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e81ec29..4e4ff89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,12 @@ set (KStars_VERSION_MAJOR 2)
set (KStars_VERSION_MINOR 6)
set (KStars_VERSION_REVISION 0)
+#Build KStars Lite with -DKSTARS_LITE=ON
+option(BUILD_KSTARS_LITE "Build KStars Lite" OFF)
+if(BUILD_KSTARS_LITE)
+ add_definitions(-DKSTARS_LITE)
+ include_directories("/opt/android/kde/install/include/KF5")
+endif(BUILD_KSTARS_LITE)
# minimal requirements
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.4.0")
@@ -25,26 +31,28 @@ include(ECMInstallIcons)
include(FeatureSummary)
include(ECMAddAppIcon)
-#Build KStars Lite with -DBUILD_KSTARS_LITE=ON
-option(BUILD_KSTARS_LITE "Build KStars Lite" OFF)
+# Load the frameworks we need
if(BUILD_KSTARS_LITE)
- add_definitions(-DKSTARS_LITE)
+ find_package(KF5 REQUIRED COMPONENTS
+ Config
+ I18n
+ Plotting
+ )
+else(BUILD_KSTARS_LITE)
+ find_package(KF5 REQUIRED COMPONENTS
+ Config
+ Crash
+ DocTools
+ WidgetsAddons
+ NewStuff
+ I18n
+ KIO
+ XmlGui
+ Plotting
+ IconThemes
+ )
endif(BUILD_KSTARS_LITE)
-# Load the frameworks we need
-find_package(KF5 REQUIRED COMPONENTS
- Config
- Crash
- DocTools
- WidgetsAddons
- NewStuff
- I18n
- KIO
- XmlGui
- Plotting
- IconThemes
-)
-
find_package(Eigen3 REQUIRED)
add_definitions(${EIGEN_DEFINITIONS})
include_directories(${EIGEN3_INCLUDE_DIR})
diff --git a/datahandlers/CMakeLists.txt b/datahandlers/CMakeLists.txt
index 6a9b53c..a7bd664 100644
--- a/datahandlers/CMakeLists.txt
+++ b/datahandlers/CMakeLists.txt
@@ -7,6 +7,8 @@ include_directories(
${kstars_SOURCE_DIR}/kstars/kstarslite
)
+
+
set(LibKSDataHandlers_SRCS
${kstars_SOURCE_DIR}/datahandlers/catalogentrydata.cpp
${kstars_SOURCE_DIR}/datahandlers/catalogdata.cpp
@@ -17,5 +19,9 @@ set(LibKSDataHandlers_SRCS
add_library(LibKSDataHandlers STATIC ${LibKSDataHandlers_SRCS})
# Added this because includedir was missing, is this required?
-target_link_libraries(LibKSDataHandlers KF5::WidgetsAddons KF5::I18n Qt5::Sql Qt5::Core Qt5::Gui)
+if(BUILD_KSTARS_LITE)
+ target_link_libraries(LibKSDataHandlers KF5::I18n Qt5::Sql Qt5::Core Qt5::Gui)
+else(BUILD_KSTARS_LITE)
+ target_link_libraries(LibKSDataHandlers KF5::WidgetsAddons Qt5::Sql Qt5::Core Qt5::Gui)
+endif(BUILD_KSTARS_LITE)
diff --git a/datahandlers/catalogdb.cpp b/datahandlers/catalogdb.cpp
index 9f70be3..95b97b6 100644
--- a/datahandlers/catalogdb.cpp
+++ b/datahandlers/catalogdb.cpp
@@ -666,7 +666,7 @@ bool CatalogDB::ParseCatalogInfoToDB(const QStringList &lines,
"; assuming 2000."));
catEpoch = 2000.;
}
-
+ #ifndef KSTARS_LITE
// Detect a duplicate catalog name
if (FindCatalog(catalog_name) != -1) {
if (KMessageBox::warningYesNo(0,
@@ -680,6 +680,7 @@ bool CatalogDB::ParseCatalogInfoToDB(const QStringList &lines,
RemoveCatalog(catalog_name);
}
}
+ #endif
// Everything OK. Make a new Catalog entry in DB
CatalogData new_catalog;
diff --git a/datahandlers/catalogdb.h b/datahandlers/catalogdb.h
index f21254d..c7c3d04 100644
--- a/datahandlers/catalogdb.h
+++ b/datahandlers/catalogdb.h
@@ -27,7 +27,6 @@
#include <QStandardPaths>
#include <KLocalizedString>
#include <QDebug>
-#include <KMessageBox>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlRecord>
@@ -39,6 +38,9 @@
#include <QFile>
#include <QDir>
+#ifndef KSTARS_LITE
+#include <KMessageBox>
+#endif
/* Some notes about the database. (skycomponents.sqlite)
* 1) The uid for Object Designation is the uid being used by objects in KStars
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index dd418a2..b4372fe 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,6 +1,6 @@
########### install files ###############
#
-
+if(NOT BUILD_KSTARS_LITE)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kstars)
-
+endif(NOT BUILD_KSTARS_LITE)
diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index a92321d..747cd5e 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -17,259 +17,399 @@ if(MSVC)
add_definitions(-DNOMINMAX)
endif()
-include_directories(
- ${kstars_SOURCE_DIR}/kstars/tools
- ${kstars_SOURCE_DIR}/kstars/skyobjects
- ${kstars_SOURCE_DIR}/kstars/skycomponents
- ${kstars_SOURCE_DIR}/kstars/auxiliary
- ${kstars_SOURCE_DIR}/kstars/time
-)
-
-#Temporary solution to allow use of qml files from source dir
-add_definitions( -DSOURCE_DIR=\"${kstars_SOURCE_DIR}\" )
if(BUILD_KSTARS_LITE)
-endif(BUILD_KSTARS_LITE)
-
-if (CFITSIO_FOUND)
- set (fits_SRCS
- fitsviewer/fitshistogram.cpp
- fitsviewer/fitsdata.cpp
- fitsviewer/fitsview.cpp
- fitsviewer/fitsviewer.cpp
- fitsviewer/fitstab.cpp
- fitsviewer/fitsdebayer.cpp
- fitsviewer/bayer.c
+ include_directories(
+ ${kstars_SOURCE_DIR}/kstars/skyobjects
+ ${kstars_SOURCE_DIR}/kstars/skycomponents
+ ${kstars_SOURCE_DIR}/kstars/auxiliary
+ ${kstars_SOURCE_DIR}/kstars/time
)
- set (fitsui_SRCS
- fitsviewer/fitsheaderdialog.ui
- fitsviewer/statform.ui
- fitsviewer/fitsdebayer.ui
- indi/streamform.ui
- fitsviewer/fitshistogramui.ui
+else(BUILD_KSTARS_LITE)
+ include_directories(
+ ${kstars_SOURCE_DIR}/kstars/tools
+ ${kstars_SOURCE_DIR}/kstars/skyobjects
+ ${kstars_SOURCE_DIR}/kstars/skycomponents
+ ${kstars_SOURCE_DIR}/kstars/auxiliary
+ ${kstars_SOURCE_DIR}/kstars/time
)
- include_directories(${CFITSIO_INCLUDE_DIR})
-endif(CFITSIO_FOUND)
+endif(BUILD_KSTARS_LITE)
-if (INDI_FOUND)
- set (indi_SRCS
- indi/drivermanager.cpp
- indi/servermanager.cpp
- indi/clientmanager.cpp
- indi/guimanager.cpp
- indi/driverinfo.cpp
- indi/deviceinfo.cpp
- indi/indidevice.cpp
- indi/indigroup.cpp
- indi/indiproperty.cpp
- indi/indielement.cpp
- indi/indistd.cpp
- indi/indilistener.cpp
- indi/inditelescope.cpp
- indi/indiccd.cpp
- indi/indifocuser.cpp
- indi/indifilter.cpp
- indi/indidome.cpp
- indi/indiweather.cpp
- indi/indicap.cpp
- indi/indilightbox.cpp
- indi/indidbus.cpp
- indi/opsindi.cpp
- indi/telescopewizardprocess.cpp
- indi/streamwg.cpp
+#Temporary solution to allow use of qml files from source dir DELETE
+add_definitions( -DSOURCE_DIR=\"${kstars_SOURCE_DIR}\" )
+
+if(NOT BUILD_KSTARS_LITE)
+ if (CFITSIO_FOUND)
+ set (fits_SRCS
+ fitsviewer/fitshistogram.cpp
+ fitsviewer/fitsdata.cpp
+ fitsviewer/fitsview.cpp
+ fitsviewer/fitsviewer.cpp
+ fitsviewer/fitstab.cpp
+ fitsviewer/fitsdebayer.cpp
+ fitsviewer/bayer.c
+ )
+ set (fitsui_SRCS
+ fitsviewer/fitsheaderdialog.ui
+ fitsviewer/statform.ui
+ fitsviewer/fitsdebayer.ui
+ indi/streamform.ui
+ fitsviewer/fitshistogramui.ui
+ )
+ include_directories(${CFITSIO_INCLUDE_DIR})
+ endif(CFITSIO_FOUND)
+
+ if (INDI_FOUND)
+ set (indi_SRCS
+ indi/drivermanager.cpp
+ indi/servermanager.cpp
+ indi/clientmanager.cpp
+ indi/guimanager.cpp
+ indi/driverinfo.cpp
+ indi/deviceinfo.cpp
+ indi/indidevice.cpp
+ indi/indigroup.cpp
+ indi/indiproperty.cpp
+ indi/indielement.cpp
+ indi/indistd.cpp
+ indi/indilistener.cpp
+ indi/inditelescope.cpp
+ indi/indiccd.cpp
+ indi/indifocuser.cpp
+ indi/indifilter.cpp
+ indi/indidome.cpp
+ indi/indiweather.cpp
+ indi/indicap.cpp
+ indi/indilightbox.cpp
+ indi/indidbus.cpp
+ indi/opsindi.cpp
+ indi/telescopewizardprocess.cpp
+ indi/streamwg.cpp
+ )
+ set(indiui_SRCS
+ indi/drivermanager.ui
+ indi/opsindi.ui
+ indi/indihostconf.ui
+ indi/streamform.ui
+ indi/telescopewizard.ui
+ )
+
+ if (CFITSIO_FOUND)
+ set(ekosui_SRCS
+ ekos/scheduler.ui
+ ekos/mosaic.ui
+ ekos/opsekos.ui
+ ekos/ekosmanager.ui
+ ekos/capture.ui
+ ekos/calibrationoptions.ui
+ ekos/align.ui
+ ekos/focus.ui
+ ekos/guide.ui
+ ekos/mount.ui
+ ekos/profileeditor.ui
+ ekos/guide/guider.ui
+ ekos/guide/rcalibration.ui
+ )
+
+ set(ekos_SRCS
+ ekos/schedulerjob.cpp
+ ekos/scheduler.cpp
+ ekos/mosaic.cpp
+ ekos/ekosmanager.cpp
+ ekos/capture.cpp
+ ekos/sequencejob.cpp
+ ekos/focus.cpp
+ ekos/guide.cpp
+ ekos/phd2.cpp
+ ekos/align.cpp
+ ekos/mount.cpp
+ ekos/dome.cpp
+ ekos/weather.cpp
+ ekos/dustcap.cpp
+ ekos/astrometryparser.cpp
+ ekos/offlineastrometryparser.cpp
+ ekos/onlineastrometryparser.cpp
+ ekos/profileeditor.cpp
+ ekos/opsekos.cpp
+ ekos/QProgressIndicator.cpp
+ ekos/guide/common.cpp
+ ekos/guide/gmath.cpp
+ ekos/guide/guider.cpp
+ ekos/guide/matr.cpp
+ ekos/guide/rcalibration.cpp
+ ekos/guide/scroll_graph.cpp
+ ekos/guide/vect.cpp
+
+ )
+
+ endif(CFITSIO_FOUND)
+
+ include_directories(${INDI_INCLUDE_DIR})
+ endif(INDI_FOUND)
+
+ if (WCSLIB_FOUND)
+ include_directories( ${WCSLIB_INCLUDE_DIR} )
+ endif (WCSLIB_FOUND)
+
+ if ( XPLANET_FOUND )
+ set (xplanet_SRCS
+ xplanet/opsxplanet.cpp
+ )
+ set(xplanetui_SRCS
+ xplanet/opsxplanet.ui
+ )
+ endif ( XPLANET_FOUND )
+
+ #FIXME Enable OpenGL Later
+ #if ( OPENGL_FOUND )
+ # include_directories( ${OPENGL_INCLUDE_DIRS} )
+ # set(kstars_gl_SRCS
+ # skyglpainter.cpp skymapgldraw.cpp
+ # )
+ # add_definitions(-DHAVE_OPENGL)
+ #endif( OPENGL_FOUND )
+
+ ########### next target ###############
+ set(libkstarstools_SRCS
+ tools/altvstime.cpp
+ tools/avtplotwidget.cpp
+ tools/calendarwidget.cpp
+ tools/conjunctions.cpp
+ tools/jmoontool.cpp
+ tools/ksconjunct.cpp
+ tools/eqplotwidget.cpp
+ tools/astrocalc.cpp
+ tools/modcalcangdist.cpp
+ tools/modcalcapcoord.cpp
+ tools/modcalcaltaz.cpp
+ tools/modcalcdaylength.cpp
+ tools/modcalceclipticcoords.cpp
+ tools/modcalcvizequinox.cpp
+ tools/modcalcgalcoord.cpp
+ tools/modcalcgeodcoord.cpp
+ tools/modcalcjd.cpp
+ tools/modcalcplanets.cpp
+ tools/modcalcsidtime.cpp
+ tools/modcalcvlsr.cpp
+ tools/observinglist.cpp
+ tools/obslistpopupmenu.cpp
+ tools/sessionsortfilterproxymodel.cpp
+ tools/obslistwizard.cpp
+ tools/planetviewer.cpp
+ tools/pvplotwidget.cpp
+ tools/scriptargwidgets.cpp
+ tools/scriptbuilder.cpp
+ tools/scriptfunction.cpp
+ tools/skycalendar.cpp
+ tools/wutdialog.cpp
+ tools/flagmanager.cpp
+ tools/horizonmanager.cpp
+
+ #FIXME Port to KF5
+ #tools/moonphasetool.cpp
+
+ tools/starhopper.cpp
+ tools/eyepiecefield.cpp
+ tools/exporteyepieceview.cpp
+ tools/starhopperdialog.cpp
+ )
+
+ if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
+ set(libkstarstools_SRCS
+ ${libkstarstools_SRCS}
+ tools/whatsinteresting/skyobjlistmodel.cpp
+ tools/whatsinteresting/wiview.cpp
+ tools/whatsinteresting/modelmanager.cpp
+ tools/whatsinteresting/skyobjitem.cpp
+ tools/whatsinteresting/wilpsettings.cpp
+ tools/whatsinteresting/wiequipsettings.cpp
+ tools/whatsinteresting/obsconditions.cpp
+ tools/whatsinteresting/skyobjdescription.cpp
+ )
+ endif()
+
+ ki18n_wrap_ui(libkstarstools_SRCS
+ tools/altvstime.ui
+ tools/argchangeviewoption.ui
+ tools/argexportimage.ui
+ tools/argloadcolorscheme.ui
+ tools/arglooktoward.ui
+ tools/argfindobject.ui
+ tools/argprintimage.ui
+ tools/argsetaltaz.ui
+ tools/argsetcolor.ui
+ tools/argsetgeolocation.ui
+ tools/argsetlocaltime.ui
+ tools/argsetradec.ui
+ tools/argsettrack.ui
+ tools/argtimescale.ui
+ tools/argwaitfor.ui
+ tools/argwaitforkey.ui
+ tools/argzoom.ui
+ tools/conjunctions.ui
+ tools/modcalcangdist.ui
+ tools/modcalcapcoord.ui
+ tools/modcalcaltaz.ui
+ tools/modcalcdaylength.ui
+ tools/modcalceclipticcoords.ui
+ tools/modcalcvizequinox.ui
+ tools/modcalcgalcoord.ui
+ tools/modcalcgeod.ui
+ tools/modcalcjd.ui
+ tools/modcalcplanets.ui
+ tools/modcalcsidtime.ui
+ tools/modcalcvlsr.ui
+ tools/observinglist.ui
+ tools/obslistwizard.ui
+ tools/optionstreeview.ui
+ tools/planetviewer.ui
+ tools/scriptbuilder.ui
+ tools/scriptnamedialog.ui
+ tools/skycalendar.ui
+ tools/wutdialog.ui
+ tools/flagmanager.ui
+ tools/starhopperdialog.ui
+ tools/horizonmanager.ui
+ )
+
+ if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
+ ki18n_wrap_ui(libkstarstools_SRCS
+ tools/whatsinteresting/wilpsettings.ui
+ tools/whatsinteresting/wiequipsettings.ui
+ )
+ endif()
+
+ set(libkstarswidgets_SRCS
+ widgets/clicklabel.cpp
+ widgets/dmsbox.cpp
+ widgets/draglistbox.cpp
+ widgets/fovwidget.cpp
+ widgets/logedit.cpp
+ widgets/magnitudespinbox.cpp
+ widgets/mapcanvas.cpp
+ widgets/thumbimage.cpp
+ widgets/timespinbox.cpp
+ widgets/timestepbox.cpp
+ widgets/timeunitbox.cpp
+ widgets/infoboxwidget.cpp
+ # widgets/genericcalendarwidget.cpp
+ # widgets/moonphasecalendarwidget.cpp
+ widgets/kshelplabel.cpp
+ widgets/unitspinboxwidget.cpp
)
- set(indiui_SRCS
- indi/drivermanager.ui
- indi/opsindi.ui
- indi/indihostconf.ui
- indi/streamform.ui
- indi/telescopewizard.ui
+
+ ki18n_wrap_ui(libkstarswidgets_SRCS
+ # widgets/genericcalendarwidget.ui
+ widgets/unitspinboxwidget.ui
)
-if (CFITSIO_FOUND)
- set(ekosui_SRCS
- ekos/scheduler.ui
- ekos/mosaic.ui
- ekos/opsekos.ui
- ekos/ekosmanager.ui
- ekos/capture.ui
- ekos/calibrationoptions.ui
- ekos/align.ui
- ekos/focus.ui
- ekos/guide.ui
- ekos/mount.ui
- ekos/profileeditor.ui
- ekos/guide/guider.ui
- ekos/guide/rcalibration.ui
- )
-
- set(ekos_SRCS
- ekos/schedulerjob.cpp
- ekos/scheduler.cpp
- ekos/mosaic.cpp
- ekos/ekosmanager.cpp
- ekos/capture.cpp
- ekos/sequencejob.cpp
- ekos/focus.cpp
- ekos/guide.cpp
- ekos/phd2.cpp
- ekos/align.cpp
- ekos/mount.cpp
- ekos/dome.cpp
- ekos/weather.cpp
- ekos/dustcap.cpp
- ekos/astrometryparser.cpp
- ekos/offlineastrometryparser.cpp
- ekos/onlineastrometryparser.cpp
- ekos/profileeditor.cpp
- ekos/opsekos.cpp
- ekos/QProgressIndicator.cpp
- ekos/guide/common.cpp
- ekos/guide/gmath.cpp
- ekos/guide/guider.cpp
- ekos/guide/matr.cpp
- ekos/guide/rcalibration.cpp
- ekos/guide/scroll_graph.cpp
- ekos/guide/vect.cpp
-
- )
-
-endif(CFITSIO_FOUND)
-
- include_directories(${INDI_INCLUDE_DIR})
-endif(INDI_FOUND)
+ set( kstars_KCFG_SRCS Options.kcfgc )
-if (WCSLIB_FOUND)
- include_directories( ${WCSLIB_INCLUDE_DIR} )
-endif (WCSLIB_FOUND)
+ set(kstars_options_SRCS
+ options/opsadvanced.cpp
+ options/opscatalog.cpp
+ options/opscolors.cpp
+ options/opsguides.cpp
+ options/opssolarsystem.cpp
+ options/opssatellites.cpp
+ options/opssupernovae.cpp
+ )
-if ( XPLANET_FOUND )
- set (xplanet_SRCS
- xplanet/opsxplanet.cpp
+ set(kstars_optionsui_SRCS
+ options/opsadvanced.ui
+ options/opscatalog.ui
+ options/opscolors.ui
+ options/opsguides.ui
+ options/opssolarsystem.ui
+ options/opssatellites.ui
+ options/opssupernovae.ui
)
- set(xplanetui_SRCS
- xplanet/opsxplanet.ui
+
+ set(kstars_dialogs_SRCS
+ dialogs/addcatdialog.cpp
+ dialogs/addlinkdialog.cpp
+ dialogs/detaildialog.cpp
+ dialogs/finddialog.cpp
+ dialogs/focusdialog.cpp
+ dialogs/fovdialog.cpp
+ dialogs/locationdialog.cpp
+ dialogs/timedialog.cpp
+ dialogs/exportimagedialog.cpp
)
-endif ( XPLANET_FOUND )
-#FIXME Enable OpenGL Later
-#if ( OPENGL_FOUND )
-# include_directories( ${OPENGL_INCLUDE_DIRS} )
-# set(kstars_gl_SRCS
-# skyglpainter.cpp skymapgldraw.cpp
-# )
-# add_definitions(-DHAVE_OPENGL)
-#endif( OPENGL_FOUND )
+ set(kstars_dialogsui_SRCS
+ dialogs/addcatdialog.ui
+ dialogs/addlinkdialog.ui
+ dialogs/details_database.ui
+ dialogs/details_data.ui
+ dialogs/details_data_comet.ui
+ dialogs/details_links.ui
+ dialogs/details_log.ui
+ dialogs/details_position.ui
+ dialogs/finddialog.ui
+ dialogs/focusdialog.ui
+ dialogs/fovdialog.ui
+ dialogs/locationdialog.ui
+ dialogs/wizwelcome.ui
+ dialogs/wizlocation.ui
+ dialogs/wizdownload.ui
+ dialogs/newfov.ui
+ dialogs/exportimagedialog.ui
+ )
-########### next target ###############
-set(libkstarstools_SRCS
- tools/altvstime.cpp
- tools/avtplotwidget.cpp
- tools/calendarwidget.cpp
- tools/conjunctions.cpp
- tools/jmoontool.cpp
- tools/ksconjunct.cpp
- tools/eqplotwidget.cpp
- tools/astrocalc.cpp
- tools/modcalcangdist.cpp
- tools/modcalcapcoord.cpp
- tools/modcalcaltaz.cpp
- tools/modcalcdaylength.cpp
- tools/modcalceclipticcoords.cpp
- tools/modcalcvizequinox.cpp
- tools/modcalcgalcoord.cpp
- tools/modcalcgeodcoord.cpp
- tools/modcalcjd.cpp
- tools/modcalcplanets.cpp
- tools/modcalcsidtime.cpp
- tools/modcalcvlsr.cpp
- tools/observinglist.cpp
- tools/obslistpopupmenu.cpp
- tools/sessionsortfilterproxymodel.cpp
- tools/obslistwizard.cpp
- tools/planetviewer.cpp
- tools/pvplotwidget.cpp
- tools/scriptargwidgets.cpp
- tools/scriptbuilder.cpp
- tools/scriptfunction.cpp
- tools/skycalendar.cpp
- tools/wutdialog.cpp
- tools/flagmanager.cpp
- tools/horizonmanager.cpp
-
- #FIXME Port to KF5
- #tools/moonphasetool.cpp
-
- tools/starhopper.cpp
- tools/eyepiecefield.cpp
- tools/exporteyepieceview.cpp
- tools/starhopperdialog.cpp
- )
+ set(oal_SRCS
+ oal/log.cpp
+ oal/observer.cpp
+ oal/site.cpp
+ oal/session.cpp
+ oal/scope.cpp
+ oal/eyepiece.cpp
+ oal/filter.cpp
+ oal/observation.cpp
+ oal/lens.cpp
+ oal/equipmentwriter.cpp
+ oal/observeradd.cpp
+ oal/execute.cpp
+ )
-if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
-set(libkstarstools_SRCS
- ${libkstarstools_SRCS}
- tools/whatsinteresting/skyobjlistmodel.cpp
- tools/whatsinteresting/wiview.cpp
- tools/whatsinteresting/modelmanager.cpp
- tools/whatsinteresting/skyobjitem.cpp
- tools/whatsinteresting/wilpsettings.cpp
- tools/whatsinteresting/wiequipsettings.cpp
- tools/whatsinteresting/obsconditions.cpp
- tools/whatsinteresting/skyobjdescription.cpp
+ set(printing_SRCS
+ printing/detailstable.cpp
+ printing/finderchart.cpp
+ printing/foveditordialog.cpp
+ printing/fovsnapshot.cpp
+ printing/kstarsdocument.cpp
+ printing/legend.cpp
+ printing/loggingform.cpp
+ printing/printingwizard.cpp
+ printing/pwizchartconfig.cpp
+ printing/pwizchartcontents.cpp
+ printing/pwizfovbrowse.cpp
+ printing/pwizfovconfig.cpp
+ printing/pwizfovmanual.cpp
+ printing/pwizfovsh.cpp
+ printing/pwizfovtypeselection.cpp
+ printing/pwizobjectselection.cpp
+ printing/pwizprint.cpp
+ printing/shfovexporter.cpp
+ printing/simplefovexporter.cpp
)
-endif()
-ki18n_wrap_ui(libkstarstools_SRCS
- tools/altvstime.ui
- tools/argchangeviewoption.ui
- tools/argexportimage.ui
- tools/argloadcolorscheme.ui
- tools/arglooktoward.ui
- tools/argfindobject.ui
- tools/argprintimage.ui
- tools/argsetaltaz.ui
- tools/argsetcolor.ui
- tools/argsetgeolocation.ui
- tools/argsetlocaltime.ui
- tools/argsetradec.ui
- tools/argsettrack.ui
- tools/argtimescale.ui
- tools/argwaitfor.ui
- tools/argwaitforkey.ui
- tools/argzoom.ui
- tools/conjunctions.ui
- tools/modcalcangdist.ui
- tools/modcalcapcoord.ui
- tools/modcalcaltaz.ui
- tools/modcalcdaylength.ui
- tools/modcalceclipticcoords.ui
- tools/modcalcvizequinox.ui
- tools/modcalcgalcoord.ui
- tools/modcalcgeod.ui
- tools/modcalcjd.ui
- tools/modcalcplanets.ui
- tools/modcalcsidtime.ui
- tools/modcalcvlsr.ui
- tools/observinglist.ui
- tools/obslistwizard.ui
- tools/optionstreeview.ui
- tools/planetviewer.ui
- tools/scriptbuilder.ui
- tools/scriptnamedialog.ui
- tools/skycalendar.ui
- tools/wutdialog.ui
- tools/flagmanager.ui
- tools/starhopperdialog.ui
- tools/horizonmanager.ui
- )
+ set(printingui_SRCS
+ printing/foveditordialog.ui
+ printing/pwizchartconfig.ui
+ printing/pwizchartcontents.ui
+ printing/pwizfovbrowse.ui
+ printing/pwizfovconfig.ui
+ printing/pwizfovmanual.ui
+ printing/pwizfovsh.ui
+ printing/pwizfovtypeselection.ui
+ printing/pwizobjectselection.ui
+ printing/pwizprint.ui
+ printing/pwizwelcome.ui
+ )
+endif(NOT BUILD_KSTARS_LITE)
-if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
-ki18n_wrap_ui(libkstarstools_SRCS
- tools/whatsinteresting/wilpsettings.ui
- tools/whatsinteresting/wiequipsettings.ui
- )
-endif()
+#Built for both KStars and KStars Lite
set(libkstarscomponents_SRCS
skycomponents/skylabeler.cpp
@@ -316,52 +456,6 @@ set(libkstarscomponents_SRCS
skycomponents/notifyupdatesui.cpp
)
-set(libkstarswidgets_SRCS
- widgets/clicklabel.cpp
- widgets/dmsbox.cpp
- widgets/draglistbox.cpp
- widgets/fovwidget.cpp
- widgets/logedit.cpp
- widgets/magnitudespinbox.cpp
- widgets/mapcanvas.cpp
- widgets/thumbimage.cpp
- widgets/timespinbox.cpp
- widgets/timestepbox.cpp
- widgets/timeunitbox.cpp
- widgets/infoboxwidget.cpp
-# widgets/genericcalendarwidget.cpp
-# widgets/moonphasecalendarwidget.cpp
- widgets/kshelplabel.cpp
- widgets/unitspinboxwidget.cpp
-)
-
-ki18n_wrap_ui(libkstarswidgets_SRCS
-# widgets/genericcalendarwidget.ui
- widgets/unitspinboxwidget.ui
-)
-
-set( kstars_KCFG_SRCS Options.kcfgc )
-
-set(kstars_options_SRCS
- options/opsadvanced.cpp
- options/opscatalog.cpp
- options/opscolors.cpp
- options/opsguides.cpp
- options/opssolarsystem.cpp
- options/opssatellites.cpp
- options/opssupernovae.cpp
-)
-
-set(kstars_optionsui_SRCS
- options/opsadvanced.ui
- options/opscatalog.ui
- options/opscolors.ui
- options/opsguides.ui
- options/opssolarsystem.ui
- options/opssatellites.ui
- options/opssupernovae.ui
-)
-
set(kstars_skyobjects_SRCS
skyobjects/constellationsart.cpp
skyobjects/deepskyobject.cpp
@@ -384,38 +478,6 @@ set(kstars_skyobjects_SRCS
skyobjects/supernova.cpp
)
-set(kstars_dialogs_SRCS
- dialogs/addcatdialog.cpp
- dialogs/addlinkdialog.cpp
- dialogs/detaildialog.cpp
- dialogs/finddialog.cpp
- dialogs/focusdialog.cpp
- dialogs/fovdialog.cpp
- dialogs/locationdialog.cpp
- dialogs/timedialog.cpp
- dialogs/exportimagedialog.cpp
-)
-
-set(kstars_dialogsui_SRCS
- dialogs/addcatdialog.ui
- dialogs/addlinkdialog.ui
- dialogs/details_database.ui
- dialogs/details_data.ui
- dialogs/details_data_comet.ui
- dialogs/details_links.ui
- dialogs/details_log.ui
- dialogs/details_position.ui
- dialogs/finddialog.ui
- dialogs/focusdialog.ui
- dialogs/fovdialog.ui
- dialogs/locationdialog.ui
- dialogs/wizwelcome.ui
- dialogs/wizlocation.ui
- dialogs/wizdownload.ui
- dialogs/newfov.ui
- dialogs/exportimagedialog.ui
-)
-
set(kstars_projection_SRCS
projections/projector.cpp
projections/lambertprojector.cpp
@@ -426,95 +488,82 @@ set(kstars_projection_SRCS
projections/equirectangularprojector.cpp
)
-set(kstars_extra_SRCS
- auxiliary/colorscheme.cpp
- auxiliary/dms.cpp
- auxiliary/fov.cpp
- auxiliary/geolocation.cpp
- auxiliary/imageviewer.cpp
- auxiliary/ksfilereader.cpp
- auxiliary/ksuserdb.cpp
- auxiliary/thumbnailpicker.cpp
- auxiliary/thumbnaileditor.cpp
- auxiliary/binfilehelper.cpp
- auxiliary/imageexporter.cpp
- auxiliary/ksutils.cpp
- auxiliary/ksdssimage.cpp
- auxiliary/ksdssdownloader.cpp
- auxiliary/kswizard.cpp
- auxiliary/qcustomplot.cpp
- auxiliary/profileinfo.cpp
- time/simclock.cpp
- time/kstarsdatetime.cpp
- time/timezonerule.cpp
- kstarsdbus.cpp
- ksnumbers.cpp
- kspopupmenu.cpp
- ksalmanac.cpp
- kstarsactions.cpp
- kstarsdata.cpp
- kstarsinit.cpp
- kstars.cpp
- kstarssplash.cpp
- skymap.cpp
- skymapdrawabstract.cpp
- skymapqdraw.cpp
- skymapevents.cpp
- skypainter.cpp
- skyqpainter.cpp
- texturemanager.cpp
-)
-
-set(oal_SRCS
- oal/log.cpp
- oal/observer.cpp
- oal/site.cpp
- oal/session.cpp
- oal/scope.cpp
- oal/eyepiece.cpp
- oal/filter.cpp
- oal/observation.cpp
- oal/lens.cpp
- oal/equipmentwriter.cpp
- oal/observeradd.cpp
- oal/execute.cpp
-)
-
-set(printing_SRCS
- printing/detailstable.cpp
- printing/finderchart.cpp
- printing/foveditordialog.cpp
- printing/fovsnapshot.cpp
- printing/kstarsdocument.cpp
- printing/legend.cpp
- printing/loggingform.cpp
- printing/printingwizard.cpp
- printing/pwizchartconfig.cpp
- printing/pwizchartcontents.cpp
- printing/pwizfovbrowse.cpp
- printing/pwizfovconfig.cpp
- printing/pwizfovmanual.cpp
- printing/pwizfovsh.cpp
- printing/pwizfovtypeselection.cpp
- printing/pwizobjectselection.cpp
- printing/pwizprint.cpp
- printing/shfovexporter.cpp
- printing/simplefovexporter.cpp
-)
-
-set(printingui_SRCS
- printing/foveditordialog.ui
- printing/pwizchartconfig.ui
- printing/pwizchartcontents.ui
- printing/pwizfovbrowse.ui
- printing/pwizfovconfig.ui
- printing/pwizfovmanual.ui
- printing/pwizfovsh.ui
- printing/pwizfovtypeselection.ui
- printing/pwizobjectselection.ui
- printing/pwizprint.ui
- printing/pwizwelcome.ui
-)
+if(BUILD_KSTARS_LITE)
+ set(kstars_extra_SRCS
+ auxiliary/colorscheme.cpp
+ auxiliary/dms.cpp
+ auxiliary/fov.cpp
+ auxiliary/geolocation.cpp
+ auxiliary/imageviewer.cpp
+ auxiliary/ksfilereader.cpp
+ auxiliary/ksuserdb.cpp
+ auxiliary/thumbnailpicker.cpp
+ auxiliary/thumbnaileditor.cpp
+ auxiliary/binfilehelper.cpp
+ auxiliary/imageexporter.cpp
+ auxiliary/ksutils.cpp
+ auxiliary/ksdssimage.cpp
+ auxiliary/ksdssdownloader.cpp
+ auxiliary/kswizard.cpp
+ auxiliary/qcustomplot.cpp
+ auxiliary/profileinfo.cpp
+ time/simclock.cpp
+ time/kstarsdatetime.cpp
+ time/timezonerule.cpp
+ kstarsdbus.cpp
+ ksnumbers.cpp
+ kspopupmenu.cpp
+ ksalmanac.cpp
+ kstarsactions.cpp
+ kstarsdata.cpp
+ skymap.cpp
+ skymapdrawabstract.cpp
+ skymapqdraw.cpp
+ skymapevents.cpp
+ skypainter.cpp
+ skyqpainter.cpp
+ texturemanager.cpp
+ )
+else(BUILD_KSTARS_LITE)
+ set(kstars_extra_SRCS
+ auxiliary/colorscheme.cpp
+ auxiliary/dms.cpp
+ auxiliary/fov.cpp
+ auxiliary/geolocation.cpp
+ auxiliary/imageviewer.cpp
+ auxiliary/ksfilereader.cpp
+ auxiliary/ksuserdb.cpp
+ auxiliary/thumbnailpicker.cpp
+ auxiliary/thumbnaileditor.cpp
+ auxiliary/binfilehelper.cpp
+ auxiliary/imageexporter.cpp
+ auxiliary/ksutils.cpp
+ auxiliary/ksdssimage.cpp
+ auxiliary/ksdssdownloader.cpp
+ auxiliary/kswizard.cpp
+ auxiliary/qcustomplot.cpp
+ auxiliary/profileinfo.cpp
+ time/simclock.cpp
+ time/kstarsdatetime.cpp
+ time/timezonerule.cpp
+ kstarsdbus.cpp
+ ksnumbers.cpp
+ kspopupmenu.cpp
+ ksalmanac.cpp
+ kstarsactions.cpp
+ kstarsdata.cpp
+ kstarsinit.cpp
+ kstars.cpp
+ kstarssplash.cpp
+ skymap.cpp
+ skymapdrawabstract.cpp
+ skymapqdraw.cpp
+ skymapevents.cpp
+ skypainter.cpp
+ skyqpainter.cpp
+ texturemanager.cpp
+ )
+endif(BUILD_KSTARS_LITE)
if(BUILD_KSTARS_LITE)
set(kstarslite_SRCS
@@ -554,8 +603,10 @@ set(kstars_SRCS ${indi_SRCS} ${fits_SRCS} ${ekos_SRCS} ${onlineparser_SRCS}
${printing_SRCS} ${kstarslite_SRCS} ${kstarslite_RESOURCE}
)
+if(NOT BUILD_KSTARS_LITE)
qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.xml kstars.h KStars)
qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.SimClock.xml simclock.h SimClock)
+endif(NOT BUILD_KSTARS_LITE)
if (INDI_FOUND)
qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.xml indi/indidbus.h INDIDBus)
@@ -588,30 +639,45 @@ ki18n_wrap_ui(kstars_SRCS
#kde4_add_app_icon(kstars_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-kstars.png")
add_executable(kstars main.cpp)
add_library( KStarsLib STATIC ${kstars_SRCS})
-
# FIXME TODO
#target_include_directories(KStarsLib INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/>")
-
-target_link_libraries(KStarsLib
- LibKSDataHandlers
- htmesh
- KF5::Crash
- KF5::I18n
- KF5::NewStuff
- KF5::KIOFileWidgets
- KF5::WidgetsAddons
- KF5::Plotting
-# KF5::TextEditor
-# KF5::DBusAddons
- KF5::IconThemes
- Qt5::Gui
- Qt5::PrintSupport
- Qt5::Sql
- Qt5::Svg
- Qt5::Qml
- Qt5::Quick
- ${ZLIB_LIBRARIES}
- )
+if(BUILD_KSTARS_LITE)
+ target_link_libraries(KStarsLib
+ LibKSDataHandlers
+ htmesh
+ KF5::I18n
+ KF5::Plotting
+ KF5::ConfigGui
+ Qt5::Gui
+ Qt5::PrintSupport
+ Qt5::Sql
+ Qt5::Svg
+ Qt5::Qml
+ Qt5::Quick
+ ${ZLIB_LIBRARIES}
+ )
+else(BUILD_KSTARS_LITE)
+ target_link_libraries(KStarsLib
+ LibKSDataHandlers
+ htmesh
+ KF5::Crash
+ KF5::I18n
+ KF5::NewStuff
+ KF5::KIOFileWidgets
+ KF5::WidgetsAddons
+ KF5::Plotting
+ # KF5::TextEditor
+ # KF5::DBusAddons
+ KF5::IconThemes
+ Qt5::Gui
+ Qt5::PrintSupport
+ Qt5::Sql
+ Qt5::Svg
+ Qt5::Qml
+ Qt5::Quick
+ ${ZLIB_LIBRARIES}
+ )
+endif(BUILD_KSTARS_LITE)
if(NOT WIN32)
target_link_libraries(KStarsLib m)
@@ -639,6 +705,7 @@ target_link_libraries(kstars KStarsLib)
install(TARGETS kstars ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+if(NOT BUILD_KSTARS_LITE)
########### install files ###############
ecm_install_icons(${KDE_INSTALL_ICONDIR})
install( PROGRAMS org.kde.kstars.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
@@ -655,3 +722,4 @@ if (WIN32)
install( FILES kstarsui-win.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars )
endif (WIN32)
install(FILES kstars.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
+endif(NOT BUILD_KSTARS_LITE)
diff --git a/kstars/Options.kcfgc b/kstars/Options.kcfgc
index e82fba2..a38d2ad 100644
--- a/kstars/Options.kcfgc
+++ b/kstars/Options.kcfgc
@@ -3,3 +3,4 @@ IncludeFiles=qpoint.h
ClassName=Options
Singleton=yes
Mutators=true
+GenerateProperties=true
diff --git a/kstars/auxiliary/ksuserdb.cpp b/kstars/auxiliary/ksuserdb.cpp
index ea1feaf..8b2df7c 100644
--- a/kstars/auxiliary/ksuserdb.cpp
+++ b/kstars/auxiliary/ksuserdb.cpp
@@ -306,7 +306,7 @@ QSqlDatabase KSUserDB::GetDatabase()
userdb_.open();
return userdb_;
}
-
+#ifndef KSTARS_LITE
void KSUserDB::GetAllObservers(QList<Observer *> &observer_list) {
userdb_.open();
observer_list.clear();
@@ -327,7 +327,7 @@ void KSUserDB::GetAllObservers(QList<Observer *> &observer_list) {
users.clear();
userdb_.close();
}
-
+#endif
/*
* Flag Section
*/
@@ -478,7 +478,7 @@ void KSUserDB::AddScope(const QString &model, const QString &vendor,
userdb_.close();
}
-
+#ifndef KSTARS_LITE
void KSUserDB::GetAllScopes(QList<Scope *> &scope_list) {
scope_list.clear();
@@ -505,7 +505,7 @@ void KSUserDB::GetAllScopes(QList<Scope *> &scope_list) {
equip.clear();
userdb_.close();
}
-
+#endif
/*
* Eyepiece section
*/
@@ -551,7 +551,7 @@ void KSUserDB::AddEyepiece(const QString &vendor, const QString &model,
userdb_.close();
}
-
+#ifndef KSTARS_LITE
void KSUserDB::GetAllEyepieces(QList<OAL::Eyepiece *> &eyepiece_list) {
eyepiece_list.clear();
@@ -577,7 +577,7 @@ void KSUserDB::GetAllEyepieces(QList<OAL::Eyepiece *> &eyepiece_list) {
equip.clear();
userdb_.close();
}
-
+#endif
/*
* lens section
*/
@@ -616,7 +616,7 @@ void KSUserDB::AddLens(const QString &vendor, const QString &model,
userdb_.close();
}
-
+#ifndef KSTARS_LITE
void KSUserDB::GetAllLenses(QList<OAL::Lens *> &lens_list) {
lens_list.clear();
@@ -638,7 +638,7 @@ void KSUserDB::GetAllLenses(QList<OAL::Lens *> &lens_list) {
equip.clear();
userdb_.close();
}
-
+#endif
/*
* filter section
*/
@@ -680,7 +680,7 @@ void KSUserDB::AddFilter(const QString &vendor, const QString &model,
userdb_.close();
}
-
+#ifndef KSTARS_LITE
void KSUserDB::GetAllFilters(QList<OAL::Filter *> &filter_list) {
userdb_.open();
filter_list.clear();
@@ -703,7 +703,7 @@ void KSUserDB::GetAllFilters(QList<OAL::Filter *> &filter_list) {
userdb_.close();
return;
}
-
+#endif
#if 0
bool KSUserDB::ImportFlags() {
QString flagfilename = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QDir::separator() + "flags.dat";
diff --git a/kstars/auxiliary/ksuserdb.h b/kstars/auxiliary/ksuserdb.h
index 0127fd8..fc316ee 100644
--- a/kstars/auxiliary/ksuserdb.h
+++ b/kstars/auxiliary/ksuserdb.h
@@ -33,7 +33,9 @@
#include <QFile>
#include <QXmlStreamReader>
#include "skyobjects/skyobject.h"
+#ifndef KSTARS_LITE
#include "oal/oal.h"
+#endif
#include "auxiliary/profileinfo.h"
class LineList;
@@ -96,6 +98,7 @@ class KSUserDB {
* @return bool
**/
bool DeleteObserver(const QString &id);
+ #ifndef KSTARS_LITE
/**
* @brief Updates the passed reference of observer_list with all observers
* The original content of the list is cleared.
@@ -103,7 +106,7 @@ class KSUserDB {
* @return void
**/
void GetAllObservers(QList<OAL::Observer *> &observer_list);
-
+ #endif
/************************************************************************
********************************* Horizon ******************************
************************************************************************/
@@ -184,6 +187,7 @@ class KSUserDB {
void AddScope(const QString &model, const QString &vendor, const QString &driver,
const QString &type, const double &focalLength, const double &aperture,
const QString &id);
+ #ifndef KSTARS_LITE
/**
* @brief updates the scope list with all scopes from database
* List is cleared and then filled with content.
@@ -192,7 +196,7 @@ class KSUserDB {
* @return void
**/
void GetAllScopes(QList<OAL::Scope *> &m_scopeList);
-
+ #endif
/************************************************************************
******************************* Eye Piece ******************************
************************************************************************/
@@ -211,6 +215,7 @@ class KSUserDB {
**/
void AddEyepiece(const QString &vendor, const QString &model, const double &focalLength,
const double &fov, const QString &fovunit, const QString &id);
+ #ifndef KSTARS_LITE
/**
* @brief Populate the reference passed with all eyepieces
*
@@ -218,7 +223,7 @@ class KSUserDB {
* @return void
**/
void GetAllEyepieces(QList<OAL::Eyepiece *> &m_eyepieceList);
-
+ #endif
/************************************************************************
********************************** Lens ********************************
************************************************************************/
@@ -235,6 +240,7 @@ class KSUserDB {
* @return void
**/
void AddLens(const QString &vendor, const QString &model, const double &factor, const QString &id);
+ #ifndef KSTARS_LITE
/**
* @brief Populate the reference passed with all lenses
*
@@ -242,7 +248,7 @@ class KSUserDB {
* @return void
**/
void GetAllLenses(QList<OAL::Lens *>& m_lensList);
-
+ #endif
/************************************************************************
******************************** Filters *******************************
************************************************************************/
@@ -260,6 +266,7 @@ class KSUserDB {
**/
void AddFilter(const QString &vendor, const QString &model, const QString &type, const QString &color,
const QString &id);
+ #ifndef KSTARS_LITE
/**
* @brief Populate the reference passed with all filters
*
@@ -267,7 +274,7 @@ class KSUserDB {
* @return void
**/
void GetAllFilters(QList<OAL::Filter *>& m_filterList);
-
+ #endif
private:
/**
* @brief This function initializes a new database in the user's directory.
diff --git a/kstars/kstarsdata.cpp b/kstars/kstarsdata.cpp
index b33ff31..d77fd59 100644
--- a/kstars/kstarsdata.cpp
+++ b/kstars/kstarsdata.cpp
@@ -23,8 +23,9 @@
#include <QTextStream>
#include <QDebug>
#include <QStandardPaths>
-
+#ifndef KSTARS_LITE
#include <KMessageBox>
+#endif
#include <KLocalizedString>
#include "Options.h"
@@ -47,7 +48,7 @@
#include "dialogs/detaildialog.h"
namespace {
-
+ #ifndef KSTARS_LITE
// Report fatal error during data loading to user
// Calls QApplication::exit
void fatalErrorMessage(QString fname) {
@@ -76,6 +77,7 @@ namespace {
qApp->exit(1);
return res == KMessageBox::Continue;
}
+#endif
}
KStarsData* KStarsData::pinstance = 0;
@@ -110,7 +112,9 @@ KStarsData::KStarsData() :
m_preUpdateNumID(0), m_updateNumID(0),
m_preUpdateNum( J2000 ), m_updateNum( J2000 )
{
+ #ifndef KSTARS_LITE
m_LogObject = new OAL::Log;
+ #endif
// at startup times run forward
setTimeDirection( 0.0 );
@@ -1024,7 +1028,7 @@ void KStarsData::syncFOV()
}
Options::setFOVNames( all.intersect(names).toList() );
}
-
+#ifndef KSTARS_LITE
// FIXME: Why does KStarsData store the Execute instance??? -- asimha
Execute* KStarsData::executeSession() {
if( !m_Execute )
@@ -1041,5 +1045,6 @@ ImageExporter * KStarsData::imageExporter()
return m_ImageExporter;
}
+#endif
diff --git a/kstars/kstarsdata.h b/kstars/kstarsdata.h
index d5c05e6..2611d1f 100644
--- a/kstars/kstarsdata.h
+++ b/kstars/kstarsdata.h
@@ -32,9 +32,10 @@
#include "colorscheme.h"
#include "kstarsdatetime.h"
#include "simclock.h"
+#ifndef KSTARS_LITE
#include "oal/oal.h"
#include "oal/log.h"
-
+#endif
#define MINZOOM 250.
#define MAXZOOM 5000000.
#define DEFAULTZOOM 2000.
@@ -208,7 +209,7 @@ public:
*@return the list of available FOVs
*/
inline const QList<FOV*> getAvailableFOVs() const { return availFOVs; }
-
+ #ifndef KSTARS_LITE
/** Return log object */
OAL::Log *logObject() { return m_LogObject; }
@@ -220,7 +221,7 @@ public:
ImageExporter * imageExporter();
Execute* executeSession();
-
+ #endif
/*@short Increments the updateID, forcing a recomputation of star positions as well */
unsigned int incUpdateID();
@@ -339,10 +340,12 @@ private:
KSUserDB m_ksuserdb;
CatalogDB m_catalogdb;
ColorScheme CScheme;
- OAL::Log *m_LogObject;
ObservingList *m_ObservingList;
+ #ifndef KSTARS_LITE
+ OAL::Log *m_LogObject;
Execute *m_Execute;
ImageExporter *m_ImageExporter;
+ #endif
//EquipmentWriter *m_equipmentWriter;
diff --git a/kstars/main.cpp b/kstars/main.cpp
index 649da74..c846403 100644
--- a/kstars/main.cpp
+++ b/kstars/main.cpp
@@ -21,14 +21,14 @@
#include <QCommandLineParser>
#include <QCommandLineOption>
-#include <KAboutData>
-#include <KCrash>
-#include <KLocalizedString>
-
#ifdef KSTARS_LITE
#include "kstarslite.h"
-#include "kstars.h"
#include "skymap.h"
+#include <KLocalizedString>
+#else
+#include <KAboutData>
+#include <KCrash>
+#include "kstars.h"
#endif
#include "kstarsdata.h"
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationVersion(KSTARS_VERSION);
-
+ #ifndef KSTARS_LITE
/**
* enable high dpi support
*/
@@ -229,9 +229,6 @@ int main(int argc, char *argv[])
QDir writableDir;
writableDir.mkdir(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
-#ifdef KSTARS_LITE
- KStarsLite::createInstance( true, ! parser.isSet( "paused" ), datestring );
-#else
KStars::createInstance( true, ! parser.isSet( "paused" ), datestring );
// no session.. just start up normally
@@ -249,6 +246,8 @@ int main(int argc, char *argv[])
KStars::Instance()->openFITS(u);
}
}
+#else
+ KStarsLite::createInstance( true, ! parser.isSet( "paused" ), datestring );
#endif
QObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()));
diff --git a/kstars/oal/oal.h b/kstars/oal/oal.h
index 62700d1..6785228 100644
--- a/kstars/oal/oal.h
+++ b/kstars/oal/oal.h
@@ -21,7 +21,9 @@
#include <QString>
#include <QLocale>
+#ifndef KSTARS_LITE
#include <kmessagebox.h>
+#endif
#include <KLocalizedString>
/**
@@ -49,7 +51,11 @@ namespace OAL
class Lens;
inline int warningOverwrite( QString message )
{
+ #ifndef KSTARS_LITE
return KMessageBox::warningYesNo( 0, message, xi18n("Overwrite"), KGuiItem(xi18n("Overwrite")), KGuiItem(xi18n("Cancel")) );
+ #else
+ return 0;
+ #endif
}
}
#endif
diff --git a/kstars/skycomponents/skymapcomposite.cpp b/kstars/skycomponents/skymapcomposite.cpp
index 2501859..afb83cc 100644
--- a/kstars/skycomponents/skymapcomposite.cpp
+++ b/kstars/skycomponents/skymapcomposite.cpp
@@ -45,7 +45,6 @@
#include "solarsystemcomposite.h"
#include "starcomponent.h"
#include "deepstarcomponent.h"
-#include "flagcomponent.h"
#include "satellitescomponent.h"
#include "supernovaecomponent.h"
#include "constellationartcomponent.h"
@@ -53,6 +52,10 @@
#include "ksasteroid.h"
#include "observinglist.h"
+#ifndef KSTARS_LITE
+#include "flagcomponent.h"
+#endif
+
#include "skymesh.h"
#include "skylabeler.h"
#include "skypainter.h"
@@ -75,6 +78,41 @@ SkyMapComposite::SkyMapComposite(SkyComposite *parent ) :
//Add all components
//Stars must come before constellation lines
+#ifdef KSTARS_LITE
+ addComponent( m_MilkyWay = new MilkyWay( this ), 50);
+ addComponent( m_Stars = StarComponent::Create( this ), 10);
+ addComponent( m_EquatorialCoordinateGrid = new EquatorialCoordinateGrid( this ));
+ addComponent( m_HorizontalCoordinateGrid = new HorizontalCoordinateGrid( this ));
+
+ // Do add to components.
+ addComponent( m_CBoundLines = new ConstellationBoundaryLines( this ), 80);
+ m_Cultures = new CultureList();
+ addComponent( m_CLines = new ConstellationLines( this, m_Cultures ), 85);
+ addComponent( m_CNames = new ConstellationNamesComponent( this, m_Cultures ), 90);
+ addComponent( m_Equator = new Equator( this ), 95);
+ addComponent( m_Ecliptic = new Ecliptic( this ), 95);
+ addComponent( m_Horizon = new HorizonComponent( this ), 100);
+ addComponent( m_DeepSky = new DeepSkyComponent( this ), 5);
+ addComponent(m_ConstellationArt = new ConstellationArtComponent( this, m_Cultures ), 100);
+
+ addComponent( m_ArtificialHorizon = new ArtificialHorizonComponent(this), 110);
+
+ m_CustomCatalogs = new SkyComposite( this );
+ QStringList allcatalogs = Options::showCatalogNames();
+ for ( int i=0; i < allcatalogs.size(); ++ i ) {
+ m_CustomCatalogs->addComponent(
+ new CatalogComponent( this, allcatalogs.at(i), false, i ), 6
+ );
+ }
+
+ addComponent( m_SolarSystem = new SolarSystemComposite( this ), 2);
+
+ addComponent( m_ObservingList = new TargetListComponent( this , 0, QPen(),
+ &Options::obsListSymbol, &Options::obsListText ), 120 );
+ addComponent( m_StarHopRouteList = new TargetListComponent( this , 0, QPen() ), 130 );
+ addComponent( m_Satellites = new SatellitesComponent( this ), 7 );
+ addComponent( m_Supernovae = new SupernovaeComponent( this ), 7 );
+#else
addComponent( m_MilkyWay = new MilkyWay( this ), 50);
addComponent( m_Stars = StarComponent::Create( this ), 10);
addComponent( m_EquatorialCoordinateGrid = new EquatorialCoordinateGrid( this ));
@@ -109,7 +147,7 @@ SkyMapComposite::SkyMapComposite(SkyComposite *parent ) :
addComponent( m_StarHopRouteList = new TargetListComponent( this , 0, QPen() ), 130 );
addComponent( m_Satellites = new SatellitesComponent( this ), 7 );
addComponent( m_Supernovae = new SupernovaeComponent( this ), 7 );
-
+#endif
connect( this, SIGNAL( progressText( const QString & ) ),
KStarsData::Instance(), SIGNAL( progressText( const QString & ) ) );
}
diff --git a/kstars/time/simclock.cpp b/kstars/time/simclock.cpp
index 3536d36..87f389f 100644
--- a/kstars/time/simclock.cpp
+++ b/kstars/time/simclock.cpp
@@ -21,8 +21,9 @@
#include <KLocalizedString>
#include "kstars.h"
+#ifndef KSTARS_LITE
#include "simclockadaptor.h"
-
+#endif
int SimClock::TimerInterval = 100; //msec
@@ -30,9 +31,10 @@ SimClock::SimClock(QObject *parent, const KStarsDateTime &when) :
QObject(parent),
tmr(this)
{
+ #ifndef KSTARS_LITE
new SimClockAdaptor(this);
QDBusConnection::sessionBus().registerObject("/KStars/SimClock", this);
-
+ #endif
if (! when.isValid() )
tmr.stop();
setUTC(when);
diff --git a/kstars/time/simclock.h b/kstars/time/simclock.h
index b7da1df..7ba29d9 100644
--- a/kstars/time/simclock.h
+++ b/kstars/time/simclock.h
@@ -19,8 +19,9 @@
#define KSTARS_SIMCLOCK_H__
#include <time.h>
-
+#ifndef KSTARS_LITE
#include <QtDBus/QtDBus>
+#endif
#include <QTimer>
#include "kstarsdatetime.h"
@@ -75,6 +76,7 @@ public:
void setManualMode( bool on=true );
public Q_SLOTS:
+ #ifndef KSTARS_LITE
/** DBUS function to stop the SimClock. */
Q_SCRIPTABLE Q_NOREPLY void stop();
@@ -86,7 +88,7 @@ public Q_SLOTS:
/** DBUS function to set scale of simclock. */
Q_SCRIPTABLE Q_NOREPLY void setClockScale(float s);
-
+ #endif
/** Respond to the QTimer::timeout signal */
void tick();