summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelarkode Suresh Adityan <[email protected]>2015-07-01 00:18:13 +0530
committerMelarkode Suresh Adityan <[email protected]>2015-07-01 00:18:13 +0530
commitaf63e6ff3d03631b80da22370e49aef428f649b9 (patch)
tree08af6cda2fe297bd030332e258e42fd7b7cbf4e8
parentced802a023958ab73532e44f23d70f89b505c7a3 (diff)
Added button to toggle constellation art. Not working.
-rw-r--r--kstars/icons/22-actions-kstars_constellationart.pngbin0 -> 434 bytes
-rw-r--r--kstars/icons/32-actions-kstars_constellationart.pngbin0 -> 661 bytes
-rw-r--r--kstars/icons/48-actions-kstars_constellationart.pngbin0 -> 1157 bytes
-rw-r--r--kstars/icons/64-actions-kstars_constellationart.pngbin0 -> 1694 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.cpp6
-rw-r--r--kstars/kstarsinit.cpp4
-rw-r--r--kstars/options/opsguides.cpp7
-rw-r--r--kstars/options/opsguides.h1
-rw-r--r--kstars/options/opsguides.ui38
12 files changed, 56 insertions, 10 deletions
diff --git a/kstars/icons/22-actions-kstars_constellationart.png b/kstars/icons/22-actions-kstars_constellationart.png
new file mode 100644
index 0000000..6cb254a
--- /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..b8dead0
--- /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..67b0726
--- /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..ca2b726
--- /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 7267f6c..e6a86ff 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
@@ -16,6 +17,7 @@ ecm_install_icons(ICONS
22-actions-kstars_ekos.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
@@ -29,6 +31,7 @@ ecm_install_icons(ICONS
32-actions-kstars_ekos.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
@@ -45,6 +48,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 c450807..092a095 100644
--- a/kstars/kstars.cpp
+++ b/kstars/kstars.cpp
@@ -194,6 +194,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 1771f29..9e914a3 100644
--- a/kstars/kstars.kcfg
+++ b/kstars/kstars.kcfg
@@ -437,6 +437,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 bf06286..0a85f01 100644
--- a/kstars/kstarsactions.cpp
+++ b/kstars/kstarsactions.cpp
@@ -166,6 +166,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 ) {
@@ -618,6 +623,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() {
diff --git a/kstars/kstarsinit.cpp b/kstars/kstarsinit.cpp
index f12fca9..1948c8a 100644
--- a/kstars/kstarsinit.cpp
+++ b/kstars/kstarsinit.cpp
@@ -497,6 +497,10 @@ void KStars::initActions() {
<< xi18nc("Toggle Constellation Boundaries in the display", "C. Boundaries" )
<< QIcon::fromTheme("kstars_cbound" )
<< ToolTip( xi18n("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() ) )
<< xi18nc("Toggle Milky Way in the display", "Milky Way" )
<< QIcon::fromTheme("kstars_mw" )
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>