summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2015-10-02 14:52:34 +0300
committerJasem Mutlaq <[email protected]>2015-10-02 14:52:34 +0300
commit0b0f9d7708f8fab18c650900b130b1c037d24c79 (patch)
tree8e37a998a3276bc6f058052520d60fc7a21f2267
parent732efc6c760cf75046649fcbb5f15587b9ceadb8 (diff)
parent1c559fbbc8bb8c78c9ac7d54b5e232e05fa3bfaf (diff)
Merge with constellation art branch
-rw-r--r--README.images5
-rw-r--r--kstars/CMakeLists.txt9
-rw-r--r--kstars/data/CMakeLists.txt106
-rw-r--r--kstars/data/skycultures/inuit/blubber-container.pngbin0 -> 10420 bytes
-rw-r--r--kstars/data/skycultures/inuit/breastbone.pngbin0 -> 8357 bytes
-rw-r--r--kstars/data/skycultures/inuit/caribou.pngbin0 -> 39550 bytes
-rw-r--r--kstars/data/skycultures/inuit/collarbones.pngbin0 -> 6566 bytes
-rw-r--r--kstars/data/skycultures/inuit/dogs.pngbin0 -> 58577 bytes
-rw-r--r--kstars/data/skycultures/inuit/lamp-stand.pngbin0 -> 15161 bytes
-rw-r--r--kstars/data/skycultures/inuit/runners.pngbin0 -> 49430 bytes
-rw-r--r--kstars/data/skycultures/inuit/the-one-behind.pngbin0 -> 65301 bytes
-rw-r--r--kstars/data/skycultures/inuit/two-in-front.pngbin0 -> 57720 bytes
-rw-r--r--kstars/data/skycultures/inuit/two-placed-far-apart.pngbin0 -> 13268 bytes
-rw-r--r--kstars/data/skycultures/inuit/two-sunbeams.pngbin0 -> 41251 bytes
-rw-r--r--kstars/data/skycultures/skycultures.sqlitebin0 -> 8192 bytes
-rw-r--r--kstars/data/skycultures/western/andromeda.pngbin0 -> 42331 bytes
-rw-r--r--kstars/data/skycultures/western/antlia.pngbin0 -> 15258 bytes
-rw-r--r--kstars/data/skycultures/western/apus.pngbin0 -> 16408 bytes
-rw-r--r--kstars/data/skycultures/western/aquarius.pngbin0 -> 65359 bytes
-rw-r--r--kstars/data/skycultures/western/aquila.pngbin0 -> 52792 bytes
-rw-r--r--kstars/data/skycultures/western/ara.pngbin0 -> 18730 bytes
-rw-r--r--kstars/data/skycultures/western/argonavis.pngbin0 -> 71779 bytes
-rw-r--r--kstars/data/skycultures/western/aries.pngbin0 -> 40845 bytes
-rw-r--r--kstars/data/skycultures/western/auriga.pngbin0 -> 82473 bytes
-rw-r--r--kstars/data/skycultures/western/bootes.pngbin0 -> 48838 bytes
-rw-r--r--kstars/data/skycultures/western/caelum.pngbin0 -> 12049 bytes
-rw-r--r--kstars/data/skycultures/western/camelopardalis.pngbin0 -> 13467 bytes
-rw-r--r--kstars/data/skycultures/western/cancer.pngbin0 -> 17963 bytes
-rw-r--r--kstars/data/skycultures/western/canes-venatici.pngbin0 -> 17720 bytes
-rw-r--r--kstars/data/skycultures/western/canis-major.pngbin0 -> 39999 bytes
-rw-r--r--kstars/data/skycultures/western/canis-minor.pngbin0 -> 37044 bytes
-rw-r--r--kstars/data/skycultures/western/capricornus.pngbin0 -> 53983 bytes
-rw-r--r--kstars/data/skycultures/western/cassiopeia.pngbin0 -> 63126 bytes
-rw-r--r--kstars/data/skycultures/western/centaurus.pngbin0 -> 51959 bytes
-rw-r--r--kstars/data/skycultures/western/cepheus.pngbin0 -> 57093 bytes
-rw-r--r--kstars/data/skycultures/western/cetus.pngbin0 -> 80643 bytes
-rw-r--r--kstars/data/skycultures/western/chamaeleon.pngbin0 -> 16497 bytes
-rw-r--r--kstars/data/skycultures/western/circinus.pngbin0 -> 10215 bytes
-rw-r--r--kstars/data/skycultures/western/columba.pngbin0 -> 37146 bytes
-rw-r--r--kstars/data/skycultures/western/coma-berenices.pngbin0 -> 39932 bytes
-rw-r--r--kstars/data/skycultures/western/corona-australis.pngbin0 -> 44041 bytes
-rw-r--r--kstars/data/skycultures/western/corona-borealis.pngbin0 -> 22925 bytes
-rw-r--r--kstars/data/skycultures/western/corvus.pngbin0 -> 20192 bytes
-rw-r--r--kstars/data/skycultures/western/crater.pngbin0 -> 21487 bytes
-rw-r--r--kstars/data/skycultures/western/crux.pngbin0 -> 16307 bytes
-rw-r--r--kstars/data/skycultures/western/cygnus.pngbin0 -> 46360 bytes
-rw-r--r--kstars/data/skycultures/western/delphinus.pngbin0 -> 30292 bytes
-rw-r--r--kstars/data/skycultures/western/dorado.pngbin0 -> 15792 bytes
-rw-r--r--kstars/data/skycultures/western/draco.pngbin0 -> 61007 bytes
-rw-r--r--kstars/data/skycultures/western/equuleus.pngbin0 -> 19351 bytes
-rw-r--r--kstars/data/skycultures/western/eridanus.pngbin0 -> 30911 bytes
-rw-r--r--kstars/data/skycultures/western/fornax.pngbin0 -> 36274 bytes
-rw-r--r--kstars/data/skycultures/western/gemini.pngbin0 -> 25612 bytes
-rw-r--r--kstars/data/skycultures/western/grus.pngbin0 -> 16352 bytes
-rw-r--r--kstars/data/skycultures/western/hercules.pngbin0 -> 59735 bytes
-rw-r--r--kstars/data/skycultures/western/horlogium.pngbin0 -> 36298 bytes
-rw-r--r--kstars/data/skycultures/western/hydra.pngbin0 -> 51056 bytes
-rw-r--r--kstars/data/skycultures/western/hydrus.pngbin0 -> 10600 bytes
-rw-r--r--kstars/data/skycultures/western/indus.pngbin0 -> 41803 bytes
-rw-r--r--kstars/data/skycultures/western/lacerta.pngbin0 -> 32463 bytes
-rw-r--r--kstars/data/skycultures/western/leo-minor.pngbin0 -> 18886 bytes
-rw-r--r--kstars/data/skycultures/western/leo.pngbin0 -> 50694 bytes
-rw-r--r--kstars/data/skycultures/western/lepus.pngbin0 -> 22174 bytes
-rw-r--r--kstars/data/skycultures/western/libra.pngbin0 -> 14320 bytes
-rw-r--r--kstars/data/skycultures/western/lupus.pngbin0 -> 38585 bytes
-rw-r--r--kstars/data/skycultures/western/lynx.pngbin0 -> 39781 bytes
-rw-r--r--kstars/data/skycultures/western/lyra.pngbin0 -> 16807 bytes
-rw-r--r--kstars/data/skycultures/western/mensa.pngbin0 -> 48774 bytes
-rw-r--r--kstars/data/skycultures/western/microscopium.pngbin0 -> 30161 bytes
-rw-r--r--kstars/data/skycultures/western/monoceros.pngbin0 -> 48067 bytes
-rw-r--r--kstars/data/skycultures/western/musca.pngbin0 -> 45395 bytes
-rw-r--r--kstars/data/skycultures/western/norma.pngbin0 -> 11897 bytes
-rw-r--r--kstars/data/skycultures/western/octans.pngbin0 -> 37523 bytes
-rw-r--r--kstars/data/skycultures/western/ophiuchus.pngbin0 -> 50687 bytes
-rw-r--r--kstars/data/skycultures/western/orion.pngbin0 -> 55791 bytes
-rw-r--r--kstars/data/skycultures/western/pavo.pngbin0 -> 33131 bytes
-rw-r--r--kstars/data/skycultures/western/pegasus.pngbin0 -> 50266 bytes
-rw-r--r--kstars/data/skycultures/western/perseus.pngbin0 -> 70903 bytes
-rw-r--r--kstars/data/skycultures/western/phoenix.pngbin0 -> 26045 bytes
-rw-r--r--kstars/data/skycultures/western/pictor.pngbin0 -> 16374 bytes
-rw-r--r--kstars/data/skycultures/western/pisces.pngbin0 -> 69132 bytes
-rw-r--r--kstars/data/skycultures/western/piscis-austrinus.pngbin0 -> 18324 bytes
-rw-r--r--kstars/data/skycultures/western/pyxis.pngbin0 -> 28494 bytes
-rw-r--r--kstars/data/skycultures/western/reticulum.pngbin0 -> 15655 bytes
-rw-r--r--kstars/data/skycultures/western/sagitta.pngbin0 -> 7742 bytes
-rw-r--r--kstars/data/skycultures/western/sagittarius.pngbin0 -> 46322 bytes
-rw-r--r--kstars/data/skycultures/western/scorpius.pngbin0 -> 56932 bytes
-rw-r--r--kstars/data/skycultures/western/sculptor.pngbin0 -> 20077 bytes
-rw-r--r--kstars/data/skycultures/western/scutum.pngbin0 -> 31901 bytes
-rw-r--r--kstars/data/skycultures/western/sextans.pngbin0 -> 19428 bytes
-rw-r--r--kstars/data/skycultures/western/taurus.pngbin0 -> 44933 bytes
-rw-r--r--kstars/data/skycultures/western/telescopium.pngbin0 -> 5926 bytes
-rw-r--r--kstars/data/skycultures/western/triangulum-australe.pngbin0 -> 5853 bytes
-rw-r--r--kstars/data/skycultures/western/triangulum.pngbin0 -> 9071 bytes
-rw-r--r--kstars/data/skycultures/western/tucana.pngbin0 -> 10279 bytes
-rw-r--r--kstars/data/skycultures/western/ursa-major.pngbin0 -> 38900 bytes
-rw-r--r--kstars/data/skycultures/western/ursa-minor.pngbin0 -> 13321 bytes
-rw-r--r--kstars/data/skycultures/western/virgo.pngbin0 -> 59423 bytes
-rw-r--r--kstars/data/skycultures/western/volans.pngbin0 -> 8624 bytes
-rw-r--r--kstars/data/skycultures/western/vulpecula.pngbin0 -> 18111 bytes
-rw-r--r--kstars/dialogs/chelper.cpp84
-rw-r--r--kstars/dialogs/chelper.h59
-rw-r--r--kstars/dialogs/chelper.ui96
-rw-r--r--kstars/icons/22-actions-kstars_constellationart.pngbin0 -> 483 bytes
-rw-r--r--kstars/icons/32-actions-kstars_constellationart.pngbin0 -> 750 bytes
-rw-r--r--kstars/icons/48-actions-kstars_constellationart.pngbin0 -> 1288 bytes
-rw-r--r--kstars/icons/64-actions-kstars_constellationart.pngbin0 -> 1836 bytes
-rw-r--r--kstars/icons/CMakeLists.txt4
-rw-r--r--kstars/kstars.cpp1
-rw-r--r--kstars/kstars.kcfg5
-rw-r--r--kstars/kstarsactions.cpp14
-rw-r--r--kstars/kstarsinit.cpp4
-rw-r--r--kstars/kstarsui-indi.rc1
-rw-r--r--kstars/kstarsui-win.rc1
-rw-r--r--kstars/kstarsui.rc1
-rw-r--r--kstars/options/opsguides.cpp7
-rw-r--r--kstars/options/opsguides.h1
-rw-r--r--kstars/options/opsguides.ui38
-rw-r--r--kstars/skycomponents/constellationartcomponent.cpp109
-rw-r--r--kstars/skycomponents/constellationartcomponent.h70
-rw-r--r--kstars/skycomponents/constellationlines.cpp4
-rw-r--r--kstars/skycomponents/skymapcomposite.cpp21
-rw-r--r--kstars/skycomponents/skymapcomposite.h4
-rw-r--r--kstars/skyglpainter.cpp7
-rw-r--r--kstars/skyglpainter.h1
-rw-r--r--kstars/skyobjects/constellationsart.cpp46
-rw-r--r--kstars/skyobjects/constellationsart.h84
-rw-r--r--kstars/skypainter.cpp1
-rw-r--r--kstars/skypainter.h9
-rw-r--r--kstars/skyqpainter.cpp50
-rw-r--r--kstars/skyqpainter.h9
-rw-r--r--kstars/texturemanager.cpp21
132 files changed, 848 insertions, 24 deletions
diff --git a/README.images b/README.images
index cb02739..7960540 100644
--- a/README.images
+++ b/README.images
@@ -247,3 +247,8 @@ a joint project of the University of Massachusetts and the Infrared
Processing and Analysis Center/California Institute of Technology,
funded by the National Aeronautics and Space Administration and the
National Science Foundation.
+
+Stellarium:
+http://bazaar.launchpad.net/~stellarium/stellarium/trunk/files/head:/skycultures/western/
+Western Skyculture images obtained from Stellarium as a part of
+the Constellation Art project in Google Summer of Code 2015.
diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index 8e46818..17bebad 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -262,6 +262,7 @@ set(libkstarscomponents_SRCS
skycomponents/deepstarcomponent.cpp
skycomponents/deepskycomponent.cpp
skycomponents/catalogcomponent.cpp
+ skycomponents/constellationartcomponent.cpp
skycomponents/constellationboundarylines.cpp
skycomponents/constellationlines.cpp
skycomponents/constellationnamescomponent.cpp
@@ -332,6 +333,7 @@ set(kstars_optionsui_SRCS
)
set(kstars_skyobjects_SRCS
+ skyobjects/constellationsart.cpp
skyobjects/deepskyobject.cpp
skyobjects/jupitermoons.cpp
skyobjects/planetmoons.cpp
@@ -362,6 +364,10 @@ set(kstars_dialogs_SRCS
dialogs/locationdialog.cpp
dialogs/timedialog.cpp
dialogs/exportimagedialog.cpp
+
+
+ # REMOVE THIS IS ONLY FOR TESTING
+ dialogs/chelper.cpp
)
set(kstars_dialogsui_SRCS
@@ -382,6 +388,9 @@ set(kstars_dialogsui_SRCS
dialogs/wizdownload.ui
dialogs/newfov.ui
dialogs/exportimagedialog.ui
+
+ # REMOVE THIS IS ONLY FOR TESTING
+ dialogs/chelper.ui
)
set(kstars_projection_SRCS
diff --git a/kstars/data/CMakeLists.txt b/kstars/data/CMakeLists.txt
index f504e96..7c5724c 100644
--- a/kstars/data/CMakeLists.txt
+++ b/kstars/data/CMakeLists.txt
@@ -1,7 +1,10 @@
########### install files ###############
-install( FILES kstars.png geomap.png
+install( FILES
+ kstars.png
+ geomap.png
citydb.sqlite
+ skycultures/skycultures.sqlite
stars.dat
starnames.dat namedstars.dat unnamedstars.dat
Henry-Draper.idx
@@ -124,6 +127,107 @@ install( FILES textures/star.png
install ( FILES scripts/supernova_updates_parser.py
DESTINATION ${KDE_INSTALL_DATADIR}/kstars/scripts )
+
+install( FILES skycultures/western/andromeda.png
+ skycultures/western/antlia.png
+ skycultures/western/apus.png
+ skycultures/western/aquarius.png
+ skycultures/western/aquila.png
+ skycultures/western/ara.png
+ skycultures/western/argonavis.png
+ skycultures/western/aries.png
+ skycultures/western/auriga.png
+ skycultures/western/bootes.png
+ skycultures/western/caelum.png
+ skycultures/western/camelopardalis.png
+ skycultures/western/cancer.png
+ skycultures/western/canes-venatici.png
+ skycultures/western/canis-major.png
+ skycultures/western/canis-minor.png
+ skycultures/western/capricornus.png
+ skycultures/western/cassiopeia.png
+ skycultures/western/centaurus.png
+ skycultures/western/cepheus.png
+ skycultures/western/cetus.png
+ skycultures/western/chamaeleon.png
+ skycultures/western/circinus.png
+ skycultures/western/columba.png
+ skycultures/western/coma-berenices.png
+ skycultures/western/corona-australis.png
+ skycultures/western/corona-borealis.png
+ skycultures/western/corvus.png
+ skycultures/western/crater.png
+ skycultures/western/crux.png
+ skycultures/western/cygnus.png
+ skycultures/western/delphinus.png
+ skycultures/western/dorado.png
+ skycultures/western/draco.png
+ skycultures/western/equuleus.png
+ skycultures/western/eridanus.png
+ skycultures/western/fornax.png
+ skycultures/western/gemini.png
+ skycultures/western/grus.png
+ skycultures/western/hercules.png
+ skycultures/western/horlogium.png
+ skycultures/western/hydra.png
+ skycultures/western/hydrus.png
+ skycultures/western/indus.png
+ skycultures/western/lacerta.png
+ skycultures/western/leo-minor.png
+ skycultures/western/leo.png
+ skycultures/western/lepus.png
+ skycultures/western/libra.png
+ skycultures/western/lupus.png
+ skycultures/western/lynx.png
+ skycultures/western/lyra.png
+ skycultures/western/mensa.png
+ skycultures/western/microscopium.png
+ skycultures/western/monoceros.png
+ skycultures/western/musca.png
+ skycultures/western/norma.png
+ skycultures/western/octans.png
+ skycultures/western/ophiuchus.png
+ skycultures/western/orion.png
+ skycultures/western/pavo.png
+ skycultures/western/pegasus.png
+ skycultures/western/perseus.png
+ skycultures/western/phoenix.png
+ skycultures/western/pictor.png
+ skycultures/western/pisces.png
+ skycultures/western/piscis-austrinus.png
+ skycultures/western/pyxis.png
+ skycultures/western/reticulum.png
+ skycultures/western/sagitta.png
+ skycultures/western/sagittarius.png
+ skycultures/western/scorpius.png
+ skycultures/western/sculptor.png
+ skycultures/western/scutum.png
+ skycultures/western/sextans.png
+ skycultures/western/taurus.png
+ skycultures/western/telescopium.png
+ skycultures/western/triangulum-australe.png
+ skycultures/western/triangulum.png
+ skycultures/western/tucana.png
+ skycultures/western/ursa-major.png
+ skycultures/western/ursa-minor.png
+ skycultures/western/virgo.png
+ skycultures/western/volans.png
+ skycultures/western/vulpecula.png
+ DESTINATION ${KDE_INSTALL_DATADIR}/kstars/skycultures/western )
+
+install( FILES skycultures/inuit/blubber-container.png
+ skycultures/inuit/breastbone.png
+ skycultures/inuit/caribou.png
+ skycultures/inuit/collarbones.png
+ skycultures/inuit/dogs.png
+ skycultures/inuit/lamp-stand.png
+ skycultures/inuit/runners.png
+ skycultures/inuit/the-one-behind.png
+ skycultures/inuit/two-in-front.png
+ skycultures/inuit/two-placed-far-apart.png
+ skycultures/inuit/two-sunbeams.png
+ DESTINATION ${KDE_INSTALL_DATADIR}/kstars/skycultures/inuit )
+
diff --git a/kstars/data/skycultures/inuit/blubber-container.png b/kstars/data/skycultures/inuit/blubber-container.png
new file mode 100644
index 0000000..6494d23
--- /dev/null
+++ b/kstars/data/skycultures/inuit/blubber-container.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/breastbone.png b/kstars/data/skycultures/inuit/breastbone.png
new file mode 100644
index 0000000..1824d41
--- /dev/null
+++ b/kstars/data/skycultures/inuit/breastbone.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/caribou.png b/kstars/data/skycultures/inuit/caribou.png
new file mode 100644
index 0000000..75d8eb7
--- /dev/null
+++ b/kstars/data/skycultures/inuit/caribou.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/collarbones.png b/kstars/data/skycultures/inuit/collarbones.png
new file mode 100644
index 0000000..f2eb7eb
--- /dev/null
+++ b/kstars/data/skycultures/inuit/collarbones.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/dogs.png b/kstars/data/skycultures/inuit/dogs.png
new file mode 100644
index 0000000..82ce214
--- /dev/null
+++ b/kstars/data/skycultures/inuit/dogs.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/lamp-stand.png b/kstars/data/skycultures/inuit/lamp-stand.png
new file mode 100644
index 0000000..78914b9
--- /dev/null
+++ b/kstars/data/skycultures/inuit/lamp-stand.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/runners.png b/kstars/data/skycultures/inuit/runners.png
new file mode 100644
index 0000000..7fb596f
--- /dev/null
+++ b/kstars/data/skycultures/inuit/runners.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/the-one-behind.png b/kstars/data/skycultures/inuit/the-one-behind.png
new file mode 100644
index 0000000..eb123a4
--- /dev/null
+++ b/kstars/data/skycultures/inuit/the-one-behind.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/two-in-front.png b/kstars/data/skycultures/inuit/two-in-front.png
new file mode 100644
index 0000000..c280d14
--- /dev/null
+++ b/kstars/data/skycultures/inuit/two-in-front.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/two-placed-far-apart.png b/kstars/data/skycultures/inuit/two-placed-far-apart.png
new file mode 100644
index 0000000..90f25b5
--- /dev/null
+++ b/kstars/data/skycultures/inuit/two-placed-far-apart.png
Binary files differ
diff --git a/kstars/data/skycultures/inuit/two-sunbeams.png b/kstars/data/skycultures/inuit/two-sunbeams.png
new file mode 100644
index 0000000..a3c3eff
--- /dev/null
+++ b/kstars/data/skycultures/inuit/two-sunbeams.png
Binary files differ
diff --git a/kstars/data/skycultures/skycultures.sqlite b/kstars/data/skycultures/skycultures.sqlite
new file mode 100644
index 0000000..38d58e7
--- /dev/null
+++ b/kstars/data/skycultures/skycultures.sqlite
Binary files differ
diff --git a/kstars/data/skycultures/western/andromeda.png b/kstars/data/skycultures/western/andromeda.png
new file mode 100644
index 0000000..828a830
--- /dev/null
+++ b/kstars/data/skycultures/western/andromeda.png
Binary files differ
diff --git a/kstars/data/skycultures/western/antlia.png b/kstars/data/skycultures/western/antlia.png
new file mode 100644
index 0000000..510d102
--- /dev/null
+++ b/kstars/data/skycultures/western/antlia.png
Binary files differ
diff --git a/kstars/data/skycultures/western/apus.png b/kstars/data/skycultures/western/apus.png
new file mode 100644
index 0000000..1e79a9f
--- /dev/null
+++ b/kstars/data/skycultures/western/apus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/aquarius.png b/kstars/data/skycultures/western/aquarius.png
new file mode 100644
index 0000000..7e299f4
--- /dev/null
+++ b/kstars/data/skycultures/western/aquarius.png
Binary files differ
diff --git a/kstars/data/skycultures/western/aquila.png b/kstars/data/skycultures/western/aquila.png
new file mode 100644
index 0000000..2c32eb5
--- /dev/null
+++ b/kstars/data/skycultures/western/aquila.png
Binary files differ
diff --git a/kstars/data/skycultures/western/ara.png b/kstars/data/skycultures/western/ara.png
new file mode 100644
index 0000000..c7d4c65
--- /dev/null
+++ b/kstars/data/skycultures/western/ara.png
Binary files differ
diff --git a/kstars/data/skycultures/western/argonavis.png b/kstars/data/skycultures/western/argonavis.png
new file mode 100644
index 0000000..3babc3b
--- /dev/null
+++ b/kstars/data/skycultures/western/argonavis.png
Binary files differ
diff --git a/kstars/data/skycultures/western/aries.png b/kstars/data/skycultures/western/aries.png
new file mode 100644
index 0000000..19b3b9d
--- /dev/null
+++ b/kstars/data/skycultures/western/aries.png
Binary files differ
diff --git a/kstars/data/skycultures/western/auriga.png b/kstars/data/skycultures/western/auriga.png
new file mode 100644
index 0000000..b1a9e45
--- /dev/null
+++ b/kstars/data/skycultures/western/auriga.png
Binary files differ
diff --git a/kstars/data/skycultures/western/bootes.png b/kstars/data/skycultures/western/bootes.png
new file mode 100644
index 0000000..1df9239
--- /dev/null
+++ b/kstars/data/skycultures/western/bootes.png
Binary files differ
diff --git a/kstars/data/skycultures/western/caelum.png b/kstars/data/skycultures/western/caelum.png
new file mode 100644
index 0000000..be99e1c
--- /dev/null
+++ b/kstars/data/skycultures/western/caelum.png
Binary files differ
diff --git a/kstars/data/skycultures/western/camelopardalis.png b/kstars/data/skycultures/western/camelopardalis.png
new file mode 100644
index 0000000..c55a54e
--- /dev/null
+++ b/kstars/data/skycultures/western/camelopardalis.png
Binary files differ
diff --git a/kstars/data/skycultures/western/cancer.png b/kstars/data/skycultures/western/cancer.png
new file mode 100644
index 0000000..faf4a81
--- /dev/null
+++ b/kstars/data/skycultures/western/cancer.png
Binary files differ
diff --git a/kstars/data/skycultures/western/canes-venatici.png b/kstars/data/skycultures/western/canes-venatici.png
new file mode 100644
index 0000000..23b475c
--- /dev/null
+++ b/kstars/data/skycultures/western/canes-venatici.png
Binary files differ
diff --git a/kstars/data/skycultures/western/canis-major.png b/kstars/data/skycultures/western/canis-major.png
new file mode 100644
index 0000000..9f62331
--- /dev/null
+++ b/kstars/data/skycultures/western/canis-major.png
Binary files differ
diff --git a/kstars/data/skycultures/western/canis-minor.png b/kstars/data/skycultures/western/canis-minor.png
new file mode 100644
index 0000000..e637ede
--- /dev/null
+++ b/kstars/data/skycultures/western/canis-minor.png
Binary files differ
diff --git a/kstars/data/skycultures/western/capricornus.png b/kstars/data/skycultures/western/capricornus.png
new file mode 100644
index 0000000..ecae263
--- /dev/null
+++ b/kstars/data/skycultures/western/capricornus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/cassiopeia.png b/kstars/data/skycultures/western/cassiopeia.png
new file mode 100644
index 0000000..bea02e7
--- /dev/null
+++ b/kstars/data/skycultures/western/cassiopeia.png
Binary files differ
diff --git a/kstars/data/skycultures/western/centaurus.png b/kstars/data/skycultures/western/centaurus.png
new file mode 100644
index 0000000..5ab395b
--- /dev/null
+++ b/kstars/data/skycultures/western/centaurus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/cepheus.png b/kstars/data/skycultures/western/cepheus.png
new file mode 100644
index 0000000..9af2217
--- /dev/null
+++ b/kstars/data/skycultures/western/cepheus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/cetus.png b/kstars/data/skycultures/western/cetus.png
new file mode 100644
index 0000000..ae928b3
--- /dev/null
+++ b/kstars/data/skycultures/western/cetus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/chamaeleon.png b/kstars/data/skycultures/western/chamaeleon.png
new file mode 100644
index 0000000..e248ff9
--- /dev/null
+++ b/kstars/data/skycultures/western/chamaeleon.png
Binary files differ
diff --git a/kstars/data/skycultures/western/circinus.png b/kstars/data/skycultures/western/circinus.png
new file mode 100644
index 0000000..9e4f37b
--- /dev/null
+++ b/kstars/data/skycultures/western/circinus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/columba.png b/kstars/data/skycultures/western/columba.png
new file mode 100644
index 0000000..487fc98
--- /dev/null
+++ b/kstars/data/skycultures/western/columba.png
Binary files differ
diff --git a/kstars/data/skycultures/western/coma-berenices.png b/kstars/data/skycultures/western/coma-berenices.png
new file mode 100644
index 0000000..94ce48e
--- /dev/null
+++ b/kstars/data/skycultures/western/coma-berenices.png
Binary files differ
diff --git a/kstars/data/skycultures/western/corona-australis.png b/kstars/data/skycultures/western/corona-australis.png
new file mode 100644
index 0000000..fed1728
--- /dev/null
+++ b/kstars/data/skycultures/western/corona-australis.png
Binary files differ
diff --git a/kstars/data/skycultures/western/corona-borealis.png b/kstars/data/skycultures/western/corona-borealis.png
new file mode 100644
index 0000000..ebfa8e1
--- /dev/null
+++ b/kstars/data/skycultures/western/corona-borealis.png
Binary files differ
diff --git a/kstars/data/skycultures/western/corvus.png b/kstars/data/skycultures/western/corvus.png
new file mode 100644
index 0000000..a398e00
--- /dev/null
+++ b/kstars/data/skycultures/western/corvus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/crater.png b/kstars/data/skycultures/western/crater.png
new file mode 100644
index 0000000..6249c98
--- /dev/null
+++ b/kstars/data/skycultures/western/crater.png
Binary files differ
diff --git a/kstars/data/skycultures/western/crux.png b/kstars/data/skycultures/western/crux.png
new file mode 100644
index 0000000..6e0f65b
--- /dev/null
+++ b/kstars/data/skycultures/western/crux.png
Binary files differ
diff --git a/kstars/data/skycultures/western/cygnus.png b/kstars/data/skycultures/western/cygnus.png
new file mode 100644
index 0000000..c613bef
--- /dev/null
+++ b/kstars/data/skycultures/western/cygnus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/delphinus.png b/kstars/data/skycultures/western/delphinus.png
new file mode 100644
index 0000000..3a96f27
--- /dev/null
+++ b/kstars/data/skycultures/western/delphinus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/dorado.png b/kstars/data/skycultures/western/dorado.png
new file mode 100644
index 0000000..967a445
--- /dev/null
+++ b/kstars/data/skycultures/western/dorado.png
Binary files differ
diff --git a/kstars/data/skycultures/western/draco.png b/kstars/data/skycultures/western/draco.png
new file mode 100644
index 0000000..40e7d0c
--- /dev/null
+++ b/kstars/data/skycultures/western/draco.png
Binary files differ
diff --git a/kstars/data/skycultures/western/equuleus.png b/kstars/data/skycultures/western/equuleus.png
new file mode 100644
index 0000000..57a2ad1
--- /dev/null
+++ b/kstars/data/skycultures/western/equuleus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/eridanus.png b/kstars/data/skycultures/western/eridanus.png
new file mode 100644
index 0000000..699057d
--- /dev/null
+++ b/kstars/data/skycultures/western/eridanus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/fornax.png b/kstars/data/skycultures/western/fornax.png
new file mode 100644
index 0000000..b74bbe0
--- /dev/null
+++ b/kstars/data/skycultures/western/fornax.png
Binary files differ
diff --git a/kstars/data/skycultures/western/gemini.png b/kstars/data/skycultures/western/gemini.png
new file mode 100644
index 0000000..1cf6ba7
--- /dev/null
+++ b/kstars/data/skycultures/western/gemini.png
Binary files differ
diff --git a/kstars/data/skycultures/western/grus.png b/kstars/data/skycultures/western/grus.png
new file mode 100644
index 0000000..ed585f1
--- /dev/null
+++ b/kstars/data/skycultures/western/grus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/hercules.png b/kstars/data/skycultures/western/hercules.png
new file mode 100644
index 0000000..1a7a481
--- /dev/null
+++ b/kstars/data/skycultures/western/hercules.png
Binary files differ
diff --git a/kstars/data/skycultures/western/horlogium.png b/kstars/data/skycultures/western/horlogium.png
new file mode 100644
index 0000000..71314ee
--- /dev/null
+++ b/kstars/data/skycultures/western/horlogium.png
Binary files differ
diff --git a/kstars/data/skycultures/western/hydra.png b/kstars/data/skycultures/western/hydra.png
new file mode 100644
index 0000000..523248c
--- /dev/null
+++ b/kstars/data/skycultures/western/hydra.png
Binary files differ
diff --git a/kstars/data/skycultures/western/hydrus.png b/kstars/data/skycultures/western/hydrus.png
new file mode 100644
index 0000000..a89c41c
--- /dev/null
+++ b/kstars/data/skycultures/western/hydrus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/indus.png b/kstars/data/skycultures/western/indus.png
new file mode 100644
index 0000000..2d3a1ef
--- /dev/null
+++ b/kstars/data/skycultures/western/indus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/lacerta.png b/kstars/data/skycultures/western/lacerta.png
new file mode 100644
index 0000000..ec17100
--- /dev/null
+++ b/kstars/data/skycultures/western/lacerta.png
Binary files differ
diff --git a/kstars/data/skycultures/western/leo-minor.png b/kstars/data/skycultures/western/leo-minor.png
new file mode 100644
index 0000000..13c5055
--- /dev/null
+++ b/kstars/data/skycultures/western/leo-minor.png
Binary files differ
diff --git a/kstars/data/skycultures/western/leo.png b/kstars/data/skycultures/western/leo.png
new file mode 100644
index 0000000..1e568ac
--- /dev/null
+++ b/kstars/data/skycultures/western/leo.png
Binary files differ
diff --git a/kstars/data/skycultures/western/lepus.png b/kstars/data/skycultures/western/lepus.png
new file mode 100644
index 0000000..821fd23
--- /dev/null
+++ b/kstars/data/skycultures/western/lepus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/libra.png b/kstars/data/skycultures/western/libra.png
new file mode 100644
index 0000000..83e3a77
--- /dev/null
+++ b/kstars/data/skycultures/western/libra.png
Binary files differ
diff --git a/kstars/data/skycultures/western/lupus.png b/kstars/data/skycultures/western/lupus.png
new file mode 100644
index 0000000..a319fea
--- /dev/null
+++ b/kstars/data/skycultures/western/lupus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/lynx.png b/kstars/data/skycultures/western/lynx.png
new file mode 100644
index 0000000..6bf817b
--- /dev/null
+++ b/kstars/data/skycultures/western/lynx.png
Binary files differ
diff --git a/kstars/data/skycultures/western/lyra.png b/kstars/data/skycultures/western/lyra.png
new file mode 100644
index 0000000..842e3c4
--- /dev/null
+++ b/kstars/data/skycultures/western/lyra.png
Binary files differ
diff --git a/kstars/data/skycultures/western/mensa.png b/kstars/data/skycultures/western/mensa.png
new file mode 100644
index 0000000..ab05b00
--- /dev/null
+++ b/kstars/data/skycultures/western/mensa.png
Binary files differ
diff --git a/kstars/data/skycultures/western/microscopium.png b/kstars/data/skycultures/western/microscopium.png
new file mode 100644
index 0000000..bb52812
--- /dev/null
+++ b/kstars/data/skycultures/western/microscopium.png
Binary files differ
diff --git a/kstars/data/skycultures/western/monoceros.png b/kstars/data/skycultures/western/monoceros.png
new file mode 100644
index 0000000..c4840f7
--- /dev/null
+++ b/kstars/data/skycultures/western/monoceros.png
Binary files differ
diff --git a/kstars/data/skycultures/western/musca.png b/kstars/data/skycultures/western/musca.png
new file mode 100644
index 0000000..b1aeddb
--- /dev/null
+++ b/kstars/data/skycultures/western/musca.png
Binary files differ
diff --git a/kstars/data/skycultures/western/norma.png b/kstars/data/skycultures/western/norma.png
new file mode 100644
index 0000000..38e1871
--- /dev/null
+++ b/kstars/data/skycultures/western/norma.png
Binary files differ
diff --git a/kstars/data/skycultures/western/octans.png b/kstars/data/skycultures/western/octans.png
new file mode 100644
index 0000000..7e0bb75
--- /dev/null
+++ b/kstars/data/skycultures/western/octans.png
Binary files differ
diff --git a/kstars/data/skycultures/western/ophiuchus.png b/kstars/data/skycultures/western/ophiuchus.png
new file mode 100644
index 0000000..67bc1c0
--- /dev/null
+++ b/kstars/data/skycultures/western/ophiuchus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/orion.png b/kstars/data/skycultures/western/orion.png
new file mode 100644
index 0000000..1333ff2
--- /dev/null
+++ b/kstars/data/skycultures/western/orion.png
Binary files differ
diff --git a/kstars/data/skycultures/western/pavo.png b/kstars/data/skycultures/western/pavo.png
new file mode 100644
index 0000000..d3ea21e
--- /dev/null
+++ b/kstars/data/skycultures/western/pavo.png
Binary files differ
diff --git a/kstars/data/skycultures/western/pegasus.png b/kstars/data/skycultures/western/pegasus.png
new file mode 100644
index 0000000..40cf116
--- /dev/null
+++ b/kstars/data/skycultures/western/pegasus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/perseus.png b/kstars/data/skycultures/western/perseus.png
new file mode 100644
index 0000000..98c8a7c
--- /dev/null
+++ b/kstars/data/skycultures/western/perseus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/phoenix.png b/kstars/data/skycultures/western/phoenix.png
new file mode 100644
index 0000000..43e3156
--- /dev/null
+++ b/kstars/data/skycultures/western/phoenix.png
Binary files differ
diff --git a/kstars/data/skycultures/western/pictor.png b/kstars/data/skycultures/western/pictor.png
new file mode 100644
index 0000000..abb3ad6
--- /dev/null
+++ b/kstars/data/skycultures/western/pictor.png
Binary files differ
diff --git a/kstars/data/skycultures/western/pisces.png b/kstars/data/skycultures/western/pisces.png
new file mode 100644
index 0000000..5ac48dd
--- /dev/null
+++ b/kstars/data/skycultures/western/pisces.png
Binary files differ
diff --git a/kstars/data/skycultures/western/piscis-austrinus.png b/kstars/data/skycultures/western/piscis-austrinus.png
new file mode 100644
index 0000000..11f47fe
--- /dev/null
+++ b/kstars/data/skycultures/western/piscis-austrinus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/pyxis.png b/kstars/data/skycultures/western/pyxis.png
new file mode 100644
index 0000000..3d36d9b
--- /dev/null
+++ b/kstars/data/skycultures/western/pyxis.png
Binary files differ
diff --git a/kstars/data/skycultures/western/reticulum.png b/kstars/data/skycultures/western/reticulum.png
new file mode 100644
index 0000000..ccc05ee
--- /dev/null
+++ b/kstars/data/skycultures/western/reticulum.png
Binary files differ
diff --git a/kstars/data/skycultures/western/sagitta.png b/kstars/data/skycultures/western/sagitta.png
new file mode 100644
index 0000000..b32315d
--- /dev/null
+++ b/kstars/data/skycultures/western/sagitta.png
Binary files differ
diff --git a/kstars/data/skycultures/western/sagittarius.png b/kstars/data/skycultures/western/sagittarius.png
new file mode 100644
index 0000000..f1f6c0b
--- /dev/null
+++ b/kstars/data/skycultures/western/sagittarius.png
Binary files differ
diff --git a/kstars/data/skycultures/western/scorpius.png b/kstars/data/skycultures/western/scorpius.png
new file mode 100644
index 0000000..901ac82
--- /dev/null
+++ b/kstars/data/skycultures/western/scorpius.png
Binary files differ
diff --git a/kstars/data/skycultures/western/sculptor.png b/kstars/data/skycultures/western/sculptor.png
new file mode 100644
index 0000000..c2f014e
--- /dev/null
+++ b/kstars/data/skycultures/western/sculptor.png
Binary files differ
diff --git a/kstars/data/skycultures/western/scutum.png b/kstars/data/skycultures/western/scutum.png
new file mode 100644
index 0000000..bc8c72a
--- /dev/null
+++ b/kstars/data/skycultures/western/scutum.png
Binary files differ
diff --git a/kstars/data/skycultures/western/sextans.png b/kstars/data/skycultures/western/sextans.png
new file mode 100644
index 0000000..35397c2
--- /dev/null
+++ b/kstars/data/skycultures/western/sextans.png
Binary files differ
diff --git a/kstars/data/skycultures/western/taurus.png b/kstars/data/skycultures/western/taurus.png
new file mode 100644
index 0000000..e6d6be0
--- /dev/null
+++ b/kstars/data/skycultures/western/taurus.png
Binary files differ
diff --git a/kstars/data/skycultures/western/telescopium.png b/kstars/data/skycultures/western/telescopium.png
new file mode 100644
index 0000000..e965b2a
--- /dev/null
+++ b/kstars/data/skycultures/western/telescopium.png
Binary files differ
diff --git a/kstars/data/skycultures/western/triangulum-australe.png b/kstars/data/skycultures/western/triangulum-australe.png
new file mode 100644
index 0000000..fa83821
--- /dev/null
+++ b/kstars/data/skycultures/western/triangulum-australe.png
Binary files differ
diff --git a/kstars/data/skycultures/western/triangulum.png b/kstars/data/skycultures/western/triangulum.png
new file mode 100644
index 0000000..3e1983e
--- /dev/null
+++ b/kstars/data/skycultures/western/triangulum.png
Binary files differ
diff --git a/kstars/data/skycultures/western/tucana.png b/kstars/data/skycultures/western/tucana.png
new file mode 100644
index 0000000..47e6e58
--- /dev/null
+++ b/kstars/data/skycultures/western/tucana.png
Binary files differ
diff --git a/kstars/data/skycultures/western/ursa-major.png b/kstars/data/skycultures/western/ursa-major.png
new file mode 100644
index 0000000..3da611d
--- /dev/null
+++ b/kstars/data/skycultures/western/ursa-major.png
Binary files differ
diff --git a/kstars/data/skycultures/western/ursa-minor.png b/kstars/data/skycultures/western/ursa-minor.png
new file mode 100644
index 0000000..bea87f2
--- /dev/null
+++ b/kstars/data/skycultures/western/ursa-minor.png
Binary files differ
diff --git a/kstars/data/skycultures/western/virgo.png b/kstars/data/skycultures/western/virgo.png
new file mode 100644
index 0000000..238df7a
--- /dev/null
+++ b/kstars/data/skycultures/western/virgo.png
Binary files differ
diff --git a/kstars/data/skycultures/western/volans.png b/kstars/data/skycultures/western/volans.png
new file mode 100644
index 0000000..4bb804c
--- /dev/null
+++ b/kstars/data/skycultures/western/volans.png
Binary files differ
diff --git a/kstars/data/skycultures/western/vulpecula.png b/kstars/data/skycultures/western/vulpecula.png
new file mode 100644
index 0000000..d8408d5
--- /dev/null
+++ b/kstars/data/skycultures/western/vulpecula.png
Binary files differ
diff --git a/kstars/dialogs/chelper.cpp b/kstars/dialogs/chelper.cpp
new file mode 100644
index 0000000..4ce9d71
--- /dev/null
+++ b/kstars/dialogs/chelper.cpp
@@ -0,0 +1,84 @@
+/***************************************************************************
+ CHelper.cpp - description
+ -------------------
+ begin : Sat Mar 23 2002
+ copyright : (C) 2002 by Jason Harris
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "chelper.h"
+
+#include <QVBoxLayout>
+#include <QDebug>
+#include <KLocalizedString>
+#include <KMessageBox>
+
+#include "skyqpainter.h"
+
+#include "kstars.h"
+#include "kstarsdata.h"
+#include "dms.h"
+#include "skyobjects/skypoint.h"
+#include "skymap.h"
+
+CHelperUI::CHelperUI( QWidget *parent ) : QFrame( parent ) {
+ setupUi( this );
+}
+
+CHelper::CHelper()
+ : QDialog( KStars::Instance() )
+{
+ //initialize point to the current focus position
+
+
+ fd = new CHelperUI(this);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(fd);
+ setLayout(mainLayout);
+
+ setWindowTitle( xi18n( "Set Constellation Parameters" ) );
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
+ mainLayout->addWidget(buttonBox);
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(validatePoint()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ fd->midRA->setDegType(false); //RA box should be HMS-style
+ fd->midRA->setFocus(); //set input focus
+}
+
+CHelper::~CHelper(){
+}
+
+void CHelper::validatePoint() {
+ bool raOk(false), decOk(false), paOK(false), widthOK(false), heightOK(false);
+ dms ra( fd->midRA->createDms( false, &raOk ) ); //false means expressed in hours
+ dms dec( fd->midDE->createDms( true, &decOk ) );
+ dms pa( fd->PA->createDms( true, &paOK ) );
+ dms scaleW( fd->scaleW->createDms( true, &widthOK ) );
+ dms scaleH( fd->scaleH->createDms( true, &heightOK ) );
+
+ if ( raOk && decOk && paOK && widthOK && heightOK )
+ {
+ SkyQPainter::setCHelper(ra, dec, pa, scaleW, scaleH);
+
+
+ } else
+ {
+ qDebug() << " raOK " << raOk << " DE ok " << decOk << "PA OK " << paOK << " width OK " << widthOK << " heightOK " << heightOK;
+ return;
+ }
+
+}
+
+
diff --git a/kstars/dialogs/chelper.h b/kstars/dialogs/chelper.h
new file mode 100644
index 0000000..4f93c53
--- /dev/null
+++ b/kstars/dialogs/chelper.h
@@ -0,0 +1,59 @@
+/***************************************************************************
+ CHelper.h - description
+ -------------------
+ begin : Sat Mar 23 2002
+ copyright : (C) 2002 by Jason Harris
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CHelper_H_
+#define CHelper_H_
+
+#include <QDialog>
+
+#include "ui_chelper.h"
+
+#include "skyobjects/skypoint.h"
+class KStars;
+
+class CHelperUI : public QFrame, public Ui::CHelper {
+ Q_OBJECT
+public:
+ explicit CHelperUI( QWidget *parent=0 );
+};
+
+
+class CHelper : public QDialog {
+ Q_OBJECT
+public:
+ /**Constructor. */
+ explicit CHelper();
+
+ /**Destructor (empty). */
+ ~CHelper();
+
+
+
+public slots:
+
+ /**Attempt to interpret the text in the KLineEdits as Ra and Dec values.
+ *If the point is validated, close the window.
+ */
+ void validatePoint();
+
+private:
+
+ CHelperUI *fd;
+
+};
+
+#endif
diff --git a/kstars/dialogs/chelper.ui b/kstars/dialogs/chelper.ui
new file mode 100644
index 0000000..a50c631
--- /dev/null
+++ b/kstars/dialogs/chelper.ui
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CHelper</class>
+ <widget class="QWidget" name="CHelper">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>274</width>
+ <height>153</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Mid RA:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="dmsBox" name="midRA"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Mid DE:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="dmsBox" name="midDE"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>PA:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="dmsBox" name="PA"/>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Width:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="dmsBox" name="scaleW"/>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Height:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="dmsBox" name="scaleH"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>72</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>dmsBox</class>
+ <extends>QLineEdit</extends>
+ <header>widgets/dmsbox.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/kstars/icons/22-actions-kstars_constellationart.png b/kstars/icons/22-actions-kstars_constellationart.png
new file mode 100644
index 0000000..73976d0
--- /dev/null
+++ b/kstars/icons/22-actions-kstars_constellationart.png
Binary files differ
diff --git a/kstars/icons/32-actions-kstars_constellationart.png b/kstars/icons/32-actions-kstars_constellationart.png
new file mode 100644
index 0000000..d362198
--- /dev/null
+++ b/kstars/icons/32-actions-kstars_constellationart.png
Binary files differ
diff --git a/kstars/icons/48-actions-kstars_constellationart.png b/kstars/icons/48-actions-kstars_constellationart.png
new file mode 100644
index 0000000..69fd31b
--- /dev/null
+++ b/kstars/icons/48-actions-kstars_constellationart.png
Binary files differ
diff --git a/kstars/icons/64-actions-kstars_constellationart.png b/kstars/icons/64-actions-kstars_constellationart.png
new file mode 100644
index 0000000..967b2fc
--- /dev/null
+++ b/kstars/icons/64-actions-kstars_constellationart.png
Binary files differ
diff --git a/kstars/icons/CMakeLists.txt b/kstars/icons/CMakeLists.txt
index 76c79d1..3eadcae 100644
--- a/kstars/icons/CMakeLists.txt
+++ b/kstars/icons/CMakeLists.txt
@@ -3,6 +3,7 @@ ecm_install_icons(ICONS
22-actions-kstars_cbound.png
22-actions-kstars_clines.png
22-actions-kstars_cnames.png
+22-actions-kstars_constellationart.png
22-actions-kstars_deepsky.png
22-actions-kstars_flag.png
22-actions-kstars_grid.png
@@ -25,6 +26,7 @@ ecm_install_icons(ICONS
22-actions-kstars_ekos_guide.png
32-actions-kstars_clines.png
32-actions-kstars_cnames.png
+32-actions-kstars_constellationart.png
32-actions-kstars_deepsky.png
32-actions-kstars_flag.png
32-actions-kstars_grid.png
@@ -47,6 +49,7 @@ ecm_install_icons(ICONS
32-actions-kstars_ekos_guide.png
48-actions-kstars_clines.png
48-actions-kstars_cnames.png
+48-actions-kstars_constellationart.png
48-actions-kstars_deepsky.png
48-actions-kstars_flag.png
48-actions-kstars_grid.png
@@ -72,6 +75,7 @@ ecm_install_icons(ICONS
64-actions-kstars_cbound.png
64-actions-kstars_clines.png
64-actions-kstars_cnames.png
+64-actions-kstars_constellationart.png
64-actions-kstars_colors.png
64-actions-kstars_deepsky.png
64-actions-kstars_flag.png
diff --git a/kstars/kstars.cpp b/kstars/kstars.cpp
index 9e13a3c..77f5ec7 100644
--- a/kstars/kstars.cpp
+++ b/kstars/kstars.cpp
@@ -208,6 +208,7 @@ void KStars::applyConfig( bool doApplyFocus ) {
actionCollection()->action("show_deepsky" )->setChecked( Options::showDeepSky() );
actionCollection()->action("show_planets" )->setChecked( Options::showSolarSystem() );
actionCollection()->action("show_clines" )->setChecked( Options::showCLines() );
+ actionCollection()->action("show_constellationart")->setChecked( Options::showConstellationArt() );
actionCollection()->action("show_cnames" )->setChecked( Options::showCNames() );
actionCollection()->action("show_cbounds" )->setChecked( Options::showCBounds() );
actionCollection()->action("show_mw" )->setChecked( Options::showMilkyWay() );
diff --git a/kstars/kstars.kcfg b/kstars/kstars.kcfg
index 8019f2f..1b66891 100644
--- a/kstars/kstars.kcfg
+++ b/kstars/kstars.kcfg
@@ -402,6 +402,11 @@
<whatsthis>Toggle whether constellation lines are drawn in the sky map.</whatsthis>
<default>false</default>
</entry>
+ <entry name="ShowConstellationArt" type="Bool">
+ <label>Draw constellation art in the sky map?</label>
+ <whatsthis>Toggle whether constellation art drawn in the sky map.</whatsthis>
+ <default>false</default>
+ </entry>
<entry name="ShowCNames" type="Bool">
<label>Draw constellation names in the sky map?</label>
<whatsthis>Toggle whether constellation name labels are drawn in the sky map.</whatsthis>
diff --git a/kstars/kstarsactions.cpp b/kstars/kstarsactions.cpp
index 0355851..395a4b5 100644
--- a/kstars/kstarsactions.cpp
+++ b/kstars/kstarsactions.cpp
@@ -78,6 +78,10 @@
#include "tools/astrocalc.h"
#include "tools/altvstime.h"
#include "tools/wutdialog.h"
+
+//REMOVE THIS
+#include "dialogs/chelper.h"
+
//FIXME Port to QML2
#if 0
#include "tools/whatsinteresting/wiview.h"
@@ -167,6 +171,11 @@ void KStars::slotViewToolBar() {
if ( kcd ) {
opguides->kcfg_ShowCBounds->setChecked( a->isChecked() );
}
+ } else if ( a == actionCollection()->action( "show_constellationart" ) ) {
+ Options::setShowConstellationArt( a->isChecked() );
+ if ( kcd ) {
+ opguides->kcfg_ShowConstellationArt->setChecked( a->isChecked() );
+ }
} else if ( a == actionCollection()->action( "show_mw" ) ) {
Options::setShowMilkyWay( a->isChecked() );
if ( kcd ) {
@@ -690,6 +699,7 @@ void KStars::slotApplyConfigChanges() {
m_KStarsData->skyComposite()->setCurrentCulture( m_KStarsData->skyComposite()->getCultureName( (int)Options::skyCulture() ) );
m_KStarsData->skyComposite()->reloadCLines();
m_KStarsData->skyComposite()->reloadCNames();
+ m_KStarsData->skyComposite()->reloadConstellationArt();
}
void KStars::slotApplyWIConfigChanges() {
@@ -1078,6 +1088,10 @@ void KStars::slotTrack() {
}
void KStars::slotManualFocus() {
+ // REMOVE THIS
+ QPointer<CHelper> chelper = new CHelper( );
+ chelper->show();
+
QPointer<FocusDialog> focusDialog = new FocusDialog( this ); // = new FocusDialog( this );
if ( Options::useAltAz() ) focusDialog->activateAzAltPage();
diff --git a/kstars/kstarsinit.cpp b/kstars/kstarsinit.cpp
index 688b901..80eb4c9 100644
--- a/kstars/kstarsinit.cpp
+++ b/kstars/kstarsinit.cpp
@@ -501,6 +501,10 @@ void KStars::initActions() {
<< i18nc("Toggle Constellation Boundaries in the display", "C. Boundaries" )
<< QIcon::fromTheme("kstars_cbound" )
<< ToolTip( i18n("Toggle constellation boundaries") );
+ actionCollection()->add<KToggleAction>("show_constellationart", this, SLOT( slotViewToolBar() ) )
+ << xi18nc("Toggle Constellation Art in the display", "C. Art" )
+ << QIcon::fromTheme("kstars_constellationart" )
+ << ToolTip( xi18n("Toggle constellation art") );
actionCollection()->add<KToggleAction>("show_mw", this, SLOT( slotViewToolBar() ) )
<< i18nc("Toggle Milky Way in the display", "Milky Way" )
<< QIcon::fromTheme("kstars_mw" )
diff --git a/kstars/kstarsui-indi.rc b/kstars/kstarsui-indi.rc
index 95d824c..dd3c7fd 100644
--- a/kstars/kstarsui-indi.rc
+++ b/kstars/kstarsui-indi.rc
@@ -161,6 +161,7 @@
<Action name="show_satellites" />
<Action name="show_clines" />
<Action name="show_cnames" />
+ <Action name="show_constellationart" />
<Action name="show_cbounds" />
<Action name="show_mw" />
<Action name="show_equatorial_grid" />
diff --git a/kstars/kstarsui-win.rc b/kstars/kstarsui-win.rc
index af76def..f8c8947 100644
--- a/kstars/kstarsui-win.rc
+++ b/kstars/kstarsui-win.rc
@@ -156,6 +156,7 @@
<Action name="show_satellites" />
<Action name="show_clines" />
<Action name="show_cnames" />
+ <Action name="show_constellationart" />
<Action name="show_cbounds" />
<Action name="show_mw" />
<Action name="show_equatorial_grid" />
diff --git a/kstars/kstarsui.rc b/kstars/kstarsui.rc
index 62bb66e..c590766 100644
--- a/kstars/kstarsui.rc
+++ b/kstars/kstarsui.rc
@@ -153,6 +153,7 @@
<Action name="show_satellites" />
<Action name="show_clines" />
<Action name="show_cnames" />
+ <Action name="show_constellationart" />
<Action name="show_cbounds" />
<Action name="show_mw" />
<Action name="show_equatorial_grid" />
diff --git a/kstars/options/opsguides.cpp b/kstars/options/opsguides.cpp
index 3813056..cee4e88 100644
--- a/kstars/options/opsguides.cpp
+++ b/kstars/options/opsguides.cpp
@@ -27,6 +27,8 @@ OpsGuides::OpsGuides( KStars *_ks )
setupUi( this );
connect( kcfg_ShowCNames, SIGNAL( toggled( bool ) ),
this, SLOT( slotToggleConstellOptions( bool ) ) );
+ connect( kcfg_ShowConstellationArt, SIGNAL( toggled( bool ) ),
+ this, SLOT( slotToggleConstellationArt( bool ) ) );
connect( kcfg_ShowMilkyWay, SIGNAL( toggled( bool ) ),
this, SLOT( slotToggleMilkyWayOptions( bool ) ) );
connect( kcfg_ShowGround, SIGNAL( toggled( bool ) ),
@@ -41,6 +43,7 @@ OpsGuides::OpsGuides( KStars *_ks )
// checkboxes depending on the options.
slotToggleOpaqueGround( Options::showGround() );
slotToggleConstellOptions( Options::showCNames() );
+ slotToggleConstellationArt(Options::showConstellationArt);
slotToggleMilkyWayOptions( Options::showMilkyWay() );
slotToggleAutoSelectGrid( Options::autoSelectGrid() );
@@ -53,6 +56,10 @@ void OpsGuides::slotToggleConstellOptions( bool state ) {
ConstellOptions->setEnabled( state );
}
+void OpsGuides::slotToggleConstellationArt( bool state ) {
+ kcfg_ShowConstellationArt->setEnabled( state );
+}
+
void OpsGuides::slotToggleMilkyWayOptions( bool state ) {
kcfg_FillMilkyWay->setEnabled( state );
}
diff --git a/kstars/options/opsguides.h b/kstars/options/opsguides.h
index c1f1d20..b9aa3b2 100644
--- a/kstars/options/opsguides.h
+++ b/kstars/options/opsguides.h
@@ -36,6 +36,7 @@ public:
private slots:
void slotToggleConstellOptions( bool state );
+ void slotToggleConstellationArt(bool state );
void slotToggleMilkyWayOptions( bool state );
void slotToggleOpaqueGround( bool state );
void slotToggleAutoSelectGrid( bool state );
diff --git a/kstars/options/opsguides.ui b/kstars/options/opsguides.ui
index 1b4f556..6038c83 100644
--- a/kstars/options/opsguides.ui
+++ b/kstars/options/opsguides.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>423</width>
- <height>552</height>
+ <height>592</height>
</rect>
</property>
<layout class="QVBoxLayout">
@@ -29,7 +29,16 @@
<property name="spacing">
<number>6</number>
</property>
- <property name="margin">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -62,6 +71,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="kcfg_ShowConstellationArt">
+ <property name="text">
+ <string>Constellation Art</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QCheckBox" name="kcfg_ShowHighlightedCBound">
<property name="text">
<string>Highlight central constellation boundary</string>
@@ -90,7 +106,16 @@
<property name="spacing">
<number>6</number>
</property>
- <property name="margin">
+ <property name="leftMargin">
+ <number>8</number>
+ </property>
+ <property name="topMargin">
+ <number>8</number>
+ </property>
+ <property name="rightMargin">
+ <number>8</number>
+ </property>
+ <property name="bottomMargin">
<number>8</number>
</property>
<item>
@@ -315,13 +340,6 @@
</item>
</layout>
</widget>
- <customwidgets>
- <customwidget>
- <class>QComboBox</class>
- <extends>QComboBox</extends>
- <header>QComboBox.h</header>
- </customwidget>
- </customwidgets>
<tabstops>
<tabstop>kcfg_ShowCLines</tabstop>
<tabstop>kcfg_SkyCulture</tabstop>
diff --git a/kstars/skycomponents/constellationartcomponent.cpp b/kstars/skycomponents/constellationartcomponent.cpp
new file mode 100644
index 0000000..285a83c
--- /dev/null
+++ b/kstars/skycomponents/constellationartcomponent.cpp
@@ -0,0 +1,109 @@
+/***************************************************************************
+ ConstellationArtComponent.cpp - K Desktop Planetarium
+ -------------------
+ begin : 2015-05-27
+ copyright : (C) 2015 by M.S.Adityan
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "constellationartcomponent.h"
+#include "kstars/auxiliary/ksfilereader.h"
+#include "kstars/skymap.h"
+#include "kstars/projections/projector.h"
+
+ConstellationArtComponent::ConstellationArtComponent( SkyComposite *parent, CultureList *cultures ):SkyComponent(parent)
+{
+ cultureName = cultures->current();
+ records = 0;
+ loadData();
+}
+
+ConstellationArtComponent::~ConstellationArtComponent()
+{ while( !m_ConstList.isEmpty() ) {
+ ConstellationsArt *o = m_ConstList.takeFirst();
+ delete o;
+ }
+}
+
+void ConstellationArtComponent::loadData(){
+
+ QSqlDatabase skydb = QSqlDatabase::addDatabase("QSQLITE", "skycultures");
+ QString dbfile = QStandardPaths::locate(QStandardPaths::DataLocation, "skycultures.sqlite");
+
+ skydb.setDatabaseName(dbfile);
+ if (skydb.open() == false)
+ {
+ qWarning() << "Unable to open sky cultures database file " << dbfile << endl;
+ return;
+ }
+ QSqlQuery get_query(skydb);
+
+ if(cultureName=="Western")
+ {
+ if (!get_query.exec("SELECT * FROM western"))
+ {
+ qDebug() << get_query.lastError();
+ return;
+ }
+ }
+ if(cultureName=="Inuit")
+ {
+ if (!get_query.exec("SELECT * FROM inuit"))
+ {
+ qDebug() << get_query.lastError();
+ return;
+ }
+ }
+
+ while (get_query.next())
+ {
+ QString abbreviation = get_query.value("Abbreviation").toString();
+ QString filename = get_query.value("Filename").toString();
+ QString midpointRA = get_query.value("MidpointRA").toString();
+ QString midpointDEC = get_query.value("MidpointDEC").toString();
+ double pa = get_query.value("Position Angle").toDouble();
+ double w = get_query.value("Width").toDouble();
+ double h = get_query.value("Height").toDouble();
+
+ dms midpointra = dms::fromString(midpointRA,false);
+ dms midpointdec = dms::fromString(midpointDEC,true);
+
+ // appends constellation info
+ ConstellationsArt *ca = new ConstellationsArt(midpointra, midpointdec, pa, w,h, abbreviation, filename);
+ m_ConstList.append(ca);
+ qDebug()<<"Successsfully read skyculture.sqlite"<<abbreviation<<filename<<midpointRA<<midpointDEC<<pa<<w<<h;
+ records++;
+ }
+ qDebug()<<"Successfully processed"<<records<<"records for"<<cultureName<<"sky culture";
+ skydb.close();
+}
+
+void ConstellationArtComponent::showList()
+{
+ int i = 0;
+ for(i = 0; i < m_ConstList.size(); i++)
+ {
+ qDebug()<<m_ConstList[i]->getAbbrev()<<m_ConstList[i]->getImageFileName();
+ qDebug()<<m_ConstList[i]->pa();
+ }
+}
+
+void ConstellationArtComponent::draw(SkyPainter *skyp){
+
+ if(Options::showConstellationArt()){
+
+ for(int i =0; i<records; i++)
+ skyp->drawConstellationArtImage(m_ConstList[i]);
+ }
+
+ //Loops through the QList containing all data required to draw constellations.
+}
diff --git a/kstars/skycomponents/constellationartcomponent.h b/kstars/skycomponents/constellationartcomponent.h
new file mode 100644
index 0000000..224a7fe
--- /dev/null
+++ b/kstars/skycomponents/constellationartcomponent.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ ConstellationArtComponent.h - K Desktop Planetarium
+ -------------------
+ begin : 2015-05-27
+ copyright : (C) 2015 by M.S.Adityan
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef ConstellationArtComponent_H
+#define ConstellationArtComponent_H
+#include "kstars/Options.h"
+#include "kstars/skyobjects/constellationsart.h"
+#include "skycomponent.h"
+#include <QImage>
+#include <QSqlDatabase>
+#include "kstars/projections/projector.h"
+#include "kstars/auxiliary/dms.h"
+#include "kstars/skymap.h"
+#include "kstars/skyqpainter.h"
+class ConstellationsArt;
+class QColor;
+class SkyMap;
+class SkyPoint;
+class SkyMesh;
+class QImage;
+class dms;
+class Projector;
+class QSqlDatabase;
+class SkyMap;
+class CultureList;
+class SkyQPainter;
+
+class ConstellationArtComponent : public SkyComponent
+{
+public:
+
+ //Constructor
+ explicit ConstellationArtComponent ( SkyComposite*, CultureList* cultures );
+
+ //Destructor
+ ~ConstellationArtComponent();
+
+ /*Read the file constellationsart.txt
+ This catalog has the following columns.
+ Constellation serial number,x1,y1,HD1,x2,y2,HD2,x3,y3,HD3,Abbrev,Image file*/
+ void loadData();
+
+ //Outputs details of the QList
+ void showList();
+
+ virtual void draw( SkyPainter *skyp );
+
+ QList<ConstellationsArt*> m_ConstList;
+
+
+private:
+ QString cultureName;
+ int records;
+};
+
+#endif // ConstellationArtComponent_H
diff --git a/kstars/skycomponents/constellationlines.cpp b/kstars/skycomponents/constellationlines.cpp
index 4c899a8..67dc045 100644
--- a/kstars/skycomponents/constellationlines.cpp
+++ b/kstars/skycomponents/constellationlines.cpp
@@ -17,7 +17,6 @@
#include "constellationlines.h"
#include "linelist.h"
-
#include <QPen>
#include <QDebug>
@@ -33,7 +32,6 @@
#include "skymesh.h"
#include "ksfilereader.h"
-
#include "skypainter.h"
@@ -105,7 +103,6 @@ ConstellationLines::ConstellationLines( SkyComposite *parent, CultureList* cultu
qWarning() << i18n( "Star HD%1 not found." , HDnum);
}
}
-
//Add the last clc component
if( lineList )
appendLine( lineList );
@@ -113,7 +110,6 @@ ConstellationLines::ConstellationLines( SkyComposite *parent, CultureList* cultu
m_reindexInterval = StarObject::reindexInterval( maxPM );
//printf("CLines: maxPM = %6.1f milliarcsec/year\n", maxPM );
//printf("CLines: Update Interval = %6.1f years\n", m_reindexInterval * 100.0 );
-
summary();
}
diff --git a/kstars/skycomponents/skymapcomposite.cpp b/kstars/skycomponents/skymapcomposite.cpp
index bf19e66..b6fdac3 100644
--- a/kstars/skycomponents/skymapcomposite.cpp
+++ b/kstars/skycomponents/skymapcomposite.cpp
@@ -26,6 +26,7 @@
#include "skyobjects/starobject.h"
#include "skyobjects/deepskyobject.h"
#include "skyobjects/ksplanet.h"
+#include "kstars/skyobjects/constellationsart.h"
#include "targetlistcomponent.h"
#include "constellationboundarylines.h"
@@ -47,6 +48,7 @@
#include "flagcomponent.h"
#include "satellitescomponent.h"
#include "supernovaecomponent.h"
+#include "constellationartcomponent.h"
#include "skymesh.h"
@@ -85,6 +87,7 @@ SkyMapComposite::SkyMapComposite(SkyComposite *parent ) :
addComponent( m_Ecliptic = new Ecliptic( this ));
addComponent( m_Horizon = new HorizonComponent( this ));
addComponent( m_DeepSky = new DeepSkyComponent( this ));
+ addComponent(m_ConstellationArt = new ConstellationArtComponent( this, m_Cultures ));
addComponent( m_ArtificialHorizon = new ArtificialHorizonComponent(this));
@@ -229,9 +232,15 @@ void SkyMapComposite::draw( SkyPainter *skyp )
m_EquatorialCoordinateGrid->draw( skyp );
m_HorizontalCoordinateGrid->draw( skyp );
- // Draw constellation boundary lines only if we draw western constellations
- if ( m_Cultures->current() == "Western" )
+ //Draw constellation boundary lines only if we draw western constellations
+ if ( m_Cultures->current() == "Western" ){
m_CBoundLines->draw( skyp );
+ m_ConstellationArt->draw( skyp );
+ }
+ if ( m_Cultures->current() == "Inuit" ){
+ m_ConstellationArt->draw( skyp );
+ }
+
m_CLines->draw( skyp );
@@ -516,6 +525,14 @@ void SkyMapComposite::reloadCNames( ) {
m_CNames = new ConstellationNamesComponent( this, m_Cultures );
}
+void SkyMapComposite::reloadConstellationArt(){
+ Q_ASSERT( !SkyMapDrawAbstract::drawLock() );
+ SkyMapDrawAbstract::setDrawLock( true );
+ delete m_ConstellationArt;
+ m_ConstellationArt=0;
+ m_ConstellationArt = new ConstellationArtComponent( this, m_Cultures );
+}
+
void SkyMapComposite::reloadDeepSky() {
Q_ASSERT( !SkyMapDrawAbstract::drawLock() );
// Deselect object if selected! If not deselected then InfoBox tries to
diff --git a/kstars/skycomponents/skymapcomposite.h b/kstars/skycomponents/skymapcomposite.h
index 1f15dcf..7745d9e 100644
--- a/kstars/skycomponents/skymapcomposite.h
+++ b/kstars/skycomponents/skymapcomposite.h
@@ -49,10 +49,12 @@ class TargetListComponent;
class TargetListComponent;
class SatellitesComponent;
class SupernovaeComponent;
+class ConstellationArtComponent;
class DeepSkyObject;
class KSPlanetBase;
class KSPlanet;
+class ConstellationsArt;
/** @class SkyMapComposite
*SkyMapComposite is the root object in the object hierarchy of the sky map.
@@ -165,6 +167,7 @@ public:
void reloadComets();
void reloadCLines();
void reloadCNames();
+ void reloadConstellationArt();
FlagComponent* flags();
SatellitesComponent* satellites();
@@ -208,6 +211,7 @@ private:
ConstellationBoundaryLines *m_CBoundLines;
ConstellationNamesComponent *m_CNames;
ConstellationLines *m_CLines;
+ ConstellationArtComponent *m_ConstellationArt;
EquatorialCoordinateGrid *m_EquatorialCoordinateGrid;
HorizontalCoordinateGrid *m_HorizontalCoordinateGrid;
DeepSkyComponent *m_DeepSky;
diff --git a/kstars/skyglpainter.cpp b/kstars/skyglpainter.cpp
index 16e1942..1d2156e 100644
--- a/kstars/skyglpainter.cpp
+++ b/kstars/skyglpainter.cpp
@@ -41,13 +41,14 @@
#include "skycomponents/flagcomponent.h"
#include "skycomponents/satellitescomponent.h"
#include "skycomponents/supernovaecomponent.h"
-
+#include "skycomponents/constellationartcomponent.h"
#include "skyobjects/deepskyobject.h"
#include "skyobjects/kscomet.h"
#include "skyobjects/ksasteroid.h"
#include "skyobjects/trailobject.h"
#include "skyobjects/satellite.h"
#include "skyobjects/supernova.h"
+#include "skyobjects/constellationsart.h"
Vector2f SkyGLPainter::m_vertex[NUMTYPES][6*BUFSIZE];
Vector2f SkyGLPainter::m_texcoord[NUMTYPES][6*BUFSIZE];
@@ -596,6 +597,10 @@ void SkyGLPainter::drawText( int x, int y, const QString text, QFont font, QColo
drawTexturedRectangle( text_image, Vector2f(vx,vy), 0, w, h );
}
+bool SkyGLPainter::drawConstellationArtImage(ConstellationsArt *obj)
+{
+}
+
void SkyGLPainter::drawSkyLine(SkyPoint* a, SkyPoint* b)
{
bool aVisible, bVisible;
diff --git a/kstars/skyglpainter.h b/kstars/skyglpainter.h
index 85ebd4a..f571dfb 100644
--- a/kstars/skyglpainter.h
+++ b/kstars/skyglpainter.h
@@ -51,6 +51,7 @@ public:
virtual void drawSatellite( Satellite* sat );
virtual bool drawSupernova(Supernova* sup);
void drawText( int x, int y, const QString text, QFont font, QColor color );
+ virtual bool drawConstellationArtImage(ConstellationsArt *obj);
private:
bool addItem(SkyPoint* p, int type, float width, char sp = 'a');
void drawBuffer(int type);
diff --git a/kstars/skyobjects/constellationsart.cpp b/kstars/skyobjects/constellationsart.cpp
new file mode 100644
index 0000000..d6d2aba
--- /dev/null
+++ b/kstars/skyobjects/constellationsart.cpp
@@ -0,0 +1,46 @@
+/***************************************************************************
+ constellationsart.cpp - K Desktop Planetarium
+ -------------------
+ begin : 2015-05-27
+ copyright : (C) 2015 by M.S.Adityan
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#include "constellationsart.h"
+#include "kstars/texturemanager.h"
+
+
+ConstellationsArt::ConstellationsArt(dms midpointra, dms midpointdec, double pa, double w, double h, QString abbreviation, QString filename)
+{
+ positionAngle = pa;
+ abbrev = abbreviation;
+ imageFileName = filename;
+
+ width = w;
+ height = h;
+ loadImage();
+
+ //This sets both current and J2000 RA/DEC to the values ra and dec.
+ setRA(midpointra);
+ setDec(midpointdec);
+}
+
+ConstellationsArt::~ConstellationsArt()
+{
+}
+
+void ConstellationsArt::loadImage()
+{
+ unscaled = TextureManager::getImage( imageFileName );
+ constellationArtImage = unscaled.scaled(1024,1024,Qt::IgnoreAspectRatio,Qt::SmoothTransformation);
+ qDebug()<<"The Unscaled image is"<<unscaled.width()<<unscaled.height();
+ qDebug()<<"The scaled image is"<<constellationArtImage.width(),constellationArtImage.height();
+}
diff --git a/kstars/skyobjects/constellationsart.h b/kstars/skyobjects/constellationsart.h
new file mode 100644
index 0000000..52030f7
--- /dev/null
+++ b/kstars/skyobjects/constellationsart.h
@@ -0,0 +1,84 @@
+/***************************************************************************
+ constellationsart.h - K Desktop Planetarium
+ -------------------
+ begin : 2015-05-27
+ copyright : (C) 2015 by M.S.Adityan
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CONSTELLATIONSART_H
+#define CONSTELLATIONSART_H
+
+#include <QDebug>
+#include <QString>
+#include <QImage>
+#include "skycomponent.h"
+#include "culturelist.h"
+#include "kstars/skypainter.h"
+#include "kstars/skyobjects/skyobject.h"
+#include "kstars/skycomponents/constellationartcomponent.h"
+#include "skypoint.h"
+#include "kstars/auxiliary/dms.h"
+
+class QImage;
+class SkyPoint;
+class dms;
+
+/** @class ConstellationsArt
+ * @short Represents images for sky cultures
+ * @author M.S.Adityan
+ */
+
+class ConstellationsArt: public SkyObject{
+
+private:
+ QString abbrev, imageFileName;
+ QImage constellationArtImage,unscaled;
+ double positionAngle, width, height;
+
+public:
+
+ /**
+ *Constructor. Set SkyObject data according to arguments.
+ *@param t Type of object
+ *@param serial Serial number from constellationsart.txt
+ *@param n Primary name
+ */
+ explicit ConstellationsArt(dms midpointra, dms midpointdec, double pa, double w, double h, QString abbreviation,QString filename);
+
+ //Destructor
+ ~ConstellationsArt();
+
+ /** @return an object's image */
+ const QImage& image() const { return constellationArtImage; }
+
+ /** Load the object's image */
+ void loadImage();
+
+
+ /** @return an object's abbreviation */
+ inline QString getAbbrev() const { return abbrev;}
+
+ /** @return an object's image file name*/
+ inline QString getImageFileName() const {return imageFileName;}
+
+ /** @return an object's position angle */
+ inline double pa() const { return positionAngle; }
+
+ inline void setPositionAngle(double pa) { positionAngle = pa; }
+
+ inline double getWidth() {return width; }
+ inline double getHeight() {return height;}
+
+};
+
+#endif // CONSTELLATIONSART_H
diff --git a/kstars/skypainter.cpp b/kstars/skypainter.cpp
index e8e8bdf..ea1bfce 100644
--- a/kstars/skypainter.cpp
+++ b/kstars/skypainter.cpp
@@ -30,6 +30,7 @@
#include "skyobjects/ksasteroid.h"
#include "skyobjects/ksplanetbase.h"
#include "skyobjects/trailobject.h"
+#include "skyobjects/constellationsart.h"
SkyPainter::SkyPainter()
: m_sizeMagLim(10.)
diff --git a/kstars/skypainter.h b/kstars/skypainter.h
index 8152425..e20dc52 100644
--- a/kstars/skypainter.h
+++ b/kstars/skypainter.h
@@ -35,6 +35,7 @@ class LineList;
class LineListLabel;
class Satellite;
class Supernova;
+class ConstellationsArt;
/** @short Draws things on the sky, without regard to backend.
@@ -152,6 +153,14 @@ public:
/** @short Get the width of a star of magnitude mag */
float starWidth(float mag) const;
+
+ /** @short Draw a ConstellationsArt object
+ @param obj the object to draw
+ @param drawConstellationImage if true, try to draw the image of the object
+ @return true if it was drawn
+ */
+ virtual bool drawConstellationArtImage(ConstellationsArt *obj) = 0;
+
protected:
SkyMap *m_sm;
diff --git a/kstars/skyqpainter.cpp b/kstars/skyqpainter.cpp
index 1f2b7fa..ede93c0 100644
--- a/kstars/skyqpainter.cpp
+++ b/kstars/skyqpainter.cpp
@@ -39,7 +39,7 @@
#include "skyobjects/trailobject.h"
#include "skyobjects/satellite.h"
#include "skyobjects/supernova.h"
-
+#include "skyobjects/constellationsart.h"
#include "projections/projector.h"
#include "ksutils.h"
@@ -75,6 +75,15 @@ namespace {
int SkyQPainter::starColorMode = 0;
+dms SkyQPainter::ra = dms(360);
+dms SkyQPainter::dec = dms(90);
+dms SkyQPainter::pa = dms(15);
+dms SkyQPainter::cw = dms(30);
+dms SkyQPainter::ch = dms(30);
+
+
+
+
SkyQPainter::SkyQPainter( QPaintDevice *pd )
: SkyPainter(), QPainter()
{
@@ -446,6 +455,42 @@ void SkyQPainter::drawPointSource(const QPointF& pos, float size, char sp)
}
}
+bool SkyQPainter::drawConstellationArtImage(ConstellationsArt *obj)
+{
+ qDebug() << "ra dms" << ra.toHMSString() << " dec dms " << dec.toDMSString() << " pa " << pa.toDMSString() << " w " << cw.toDMSString() << " h " << ch.toDMSString();
+
+ double zoom = Options::zoomFactor();
+/*
+ obj->setRA(ra);
+ obj->setDec(dec);
+ obj->setPositionAngle(pa.Degrees());
+ float w = cw.Degrees()*60* dms::PI*zoom/10800;
+ float h = ch.Degrees()*60* dms::PI*zoom/10800;
+*/
+
+ bool visible = false;
+ obj->EquatorialToHorizontal(KStarsData::Instance()->lst(), KStarsData::Instance()->geo()->lat());
+ QPointF constellationmidpoint = m_proj->toScreen(obj, true, &visible);
+
+ if ( !visible || !m_proj->onScreen(constellationmidpoint))
+ return false;
+
+ qDebug() << "o->pa() " << obj->pa();
+ float positionangle = m_proj->findPA(obj, constellationmidpoint.x(), constellationmidpoint.y());
+ qDebug() << " final PA " << positionangle;
+
+
+ float w = obj->getWidth()*60*dms::PI*zoom/10800;
+ float h = obj->getHeight()*60*dms::PI*zoom/10800;
+
+ save();
+ translate(constellationmidpoint);
+ rotate(positionangle);
+ drawImage( QRect(-0.5*w, -0.5*h, w, h), obj->image() );
+ restore();
+ return true;
+}
+
bool SkyQPainter::drawDeepSkyObject(DeepSkyObject* obj, bool drawImage)
{
if( !m_proj->checkVisibility(obj) ) return false;
@@ -464,6 +509,9 @@ bool SkyQPainter::drawDeepSkyObject(DeepSkyObject* obj, bool drawImage)
//FIXME: this is probably incorrect
float positionAngle = m_proj->findPA( obj, pos.x(), pos.y() );
+ if (obj->name().startsWith("M 31"))
+ qDebug() << "M 31 PA " << positionAngle;
+
//Draw Image
if ( drawImage && Options::zoomFactor() > 5.*MINZOOM )
drawDeepSkyImage(pos, obj, positionAngle);
diff --git a/kstars/skyqpainter.h b/kstars/skyqpainter.h
index 2865ac4..23e6922 100644
--- a/kstars/skyqpainter.h
+++ b/kstars/skyqpainter.h
@@ -21,11 +21,13 @@
#define SKYQPAINTER_H
#include "skypainter.h"
+// REMOVE THIS TESTING ONLY
+#include "dms.h"
class Projector;
class QWidget;
class QSize;
-
+class QMessageBox;
/** @short The QPainter-based painting backend.
This class implements the SkyPainter interface using a QPainter.
For documentation, @see SkyPainter. */
@@ -88,6 +90,9 @@ public:
virtual bool drawSupernova(Supernova* sup);
///This function exists so that we can draw other objects (e.g., planets) as point sources.
virtual void drawPointSource(const QPointF& pos, float size, char sp = 'A');
+ virtual bool drawConstellationArtImage(ConstellationsArt *obj);
+
+ static void setCHelper(dms cra, dms cdec, dms cpa, dms c_w, dms c_h) { ra = cra; dec=cdec; pa=cpa; cw=c_w; ch=c_h; }
private:
virtual bool drawDeepSkyImage (const QPointF& pos, DeepSkyObject* obj,
@@ -97,6 +102,8 @@ private:
bool m_vectorStars;
QSize m_size;
static int starColorMode;
+
+ static dms ra, dec, pa, cw, ch ;
};
#endif
diff --git a/kstars/texturemanager.cpp b/kstars/texturemanager.cpp
index 5997993..5c8843c 100644
--- a/kstars/texturemanager.cpp
+++ b/kstars/texturemanager.cpp
@@ -68,12 +68,25 @@ TextureManager::CacheIter TextureManager::findTexture(const QString& name)
if( !filename.isNull() ) {
return (TextureManager::CacheIter)m_p->m_textures.insert( name, QImage(filename,"PNG") );
} else {
- // Try to load from file in main data directory
- filename = QStandardPaths::locate(QStandardPaths::DataLocation, QString("%1.png").arg(name));
+ //Try to load from the file in 'skycultures/western' subdirectory for western constellation art
+ QString filename = QStandardPaths::locate(QStandardPaths::DataLocation, QString("skycultures/western/%1.png").arg(name));
if( !filename.isNull() ) {
return (TextureManager::CacheIter)m_p->m_textures.insert( name, QImage(filename,"PNG") );
- } else {
- return m_p->m_textures.constEnd();
+ } else {
+ //Try to load from the file in 'skycultures/inuit' subdirectory for Inuit constellation art
+ QString filename = QStandardPaths::locate(QStandardPaths::DataLocation, QString("skycultures/inuit/%1.png").arg(name));
+ if( !filename.isNull() ) {
+ return (TextureManager::CacheIter)m_p->m_textures.insert( name, QImage(filename,"PNG") );
+ }else {
+ // Try to load from file in main data directory
+ filename = QStandardPaths::locate(QStandardPaths::DataLocation, QString("%1.png").arg(name));
+ if( !filename.isNull() ) {
+ return (TextureManager::CacheIter)m_p->m_textures.insert( name, QImage(filename,"PNG") );
+ } else {
+ return m_p->m_textures.constEnd();
+ }
+
+ }
}
}
}