[Kstars-devel] KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Thu Jun 26 06:56:31 CEST 2008


SVN commit 824546 by harris:

Resolving an inconsistency between toolbar actions and 
the configuration window: the view toolbar provides an 
action to toggle all deep-sky objects on/off, but in the 
configuration window, there were only controls for 
individual catalogs (Messier, NGC, IC, etc).

I added a Checkbox to the configuration window to toggle 
all deep-sky objects.  Unchecking this box will disable 
all deep-sky related widgets in the window, like the 
"Hipparcos star catalog" checkbox does for stars.  The 
checkbox and the toolbar button are properly synced with 
each other.

No new string was added, but there will be a fuzzy: I 
adopted the "Deep-Sky Catalogs" string which was used as 
a group-box title.  The group box now has no title.  For 
consistency, I also removed the (redundant anyway) "Star 
catalog" title from the stars group box.  So that string 
has disappeared.

CCMAIL: kstars-devel at kde.org
CCMAIL: kde-i18n-doc at kde.org



 M  +3 -0      kstarsactions.cpp  
 M  +19 -0     opscatalog.cpp  
 M  +1 -0      opscatalog.h  
 M  +30 -95    opscatalog.ui  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #824545:824546
@@ -111,6 +111,9 @@
         }
     } else if ( a == actionCollection()->action( "show_deepsky" ) ) {
         Options::setShowDeepSky( a->isChecked() );
+        if ( kcd ) {
+            opcatalog->kcfg_ShowDeepSky->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_planets" ) ) {
         Options::setShowSolarSystem( a->isChecked() );
         if ( kcd ) {
--- trunk/KDE/kdeedu/kstars/kstars/opscatalog.cpp #824545:824546
@@ -99,6 +99,7 @@
     connect( kcfg_MagLimitDrawStarZoomOut, SIGNAL( valueChanged(double) ),
              SLOT( slotSetDrawStarZoomOutMagnitude(double) ) );
     connect( kcfg_ShowStars, SIGNAL( toggled(bool) ), SLOT( slotStarWidgets(bool) ) );
+    connect( kcfg_ShowDeepSky, SIGNAL( toggled(bool) ), SLOT( slotDeepSkyWidgets(bool) ) );
     connect( m_ConfigDialog, SIGNAL( applyClicked() ), SLOT( slotApply() ) );
     connect( m_ConfigDialog, SIGNAL( okClicked() ), SLOT( slotApply() ) );
     connect( m_ConfigDialog, SIGNAL( cancelClicked() ), SLOT( slotCancel() ) );
@@ -272,6 +273,24 @@
     kcfg_ShowStarMagnitudes->setEnabled(on);
 }
 
+void OpsCatalog::slotDeepSkyWidgets(bool on) {
+    CatalogList->setEnabled( on );
+    AddCatalog->setEnabled( on );
+    LoadCatalog->setEnabled( on );
+    LabelMagDeepSky->setEnabled( on );
+    LabelMagDeepSkyZoomOut->setEnabled( on );
+    kcfg_MagLimitDrawDeepSky->setEnabled( on );
+    kcfg_MagLimitDrawDeepSkyZoomOut->setEnabled( on );
+    LabelMag3->setEnabled( on );
+    LabelMag4->setEnabled( on );
+    if ( on ) {
+        //Enable RemoveCatalog if the selected catalog is custom
+        selectCatalog();
+    } else {
+        RemoveCatalog->setEnabled( on );
+    }
+}
+
 QString OpsCatalog::getCatalogName( const QString &filename ) {
     QString name = QString();
     QFile f( filename );
--- trunk/KDE/kdeedu/kstars/kstars/opscatalog.h #824545:824546
@@ -53,6 +53,7 @@
     void slotSetDrawStarMagnitude(double newValue);
     void slotSetDrawStarZoomOutMagnitude(double newValue);
     void slotStarWidgets(bool on);
+    void slotDeepSkyWidgets(bool on);
     void slotApply();
     void slotCancel();
 
--- trunk/KDE/kdeedu/kstars/kstars/opscatalog.ui #824545:824546
@@ -13,7 +13,7 @@
    <item>
     <widget class="QGroupBox" name="StarBox" >
      <property name="title" >
-      <string>Stars</string>
+      <string/>
      </property>
      <layout class="QHBoxLayout" >
       <item>
@@ -27,24 +27,12 @@
         </item>
         <item>
          <layout class="QGridLayout" >
-          <property name="leftMargin" >
+          <property name="margin" >
            <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>
-          <property name="horizontalSpacing" >
+          <property name="spacing" >
            <number>6</number>
           </property>
-          <property name="verticalSpacing" >
-           <number>6</number>
-          </property>
           <item row="1" column="0" >
            <widget class="QLabel" name="LabelMagStarsZoomOut" >
             <property name="text" >
@@ -89,7 +77,7 @@
           <property name="sizeType" >
            <enum>QSizePolicy::Fixed</enum>
           </property>
-          <property name="sizeHint" >
+          <property name="sizeHint" stdset="0" >
            <size>
             <width>20</width>
             <height>16</height>
@@ -99,24 +87,12 @@
         </item>
         <item>
          <layout class="QGridLayout" >
-          <property name="leftMargin" >
+          <property name="margin" >
            <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>
-          <property name="horizontalSpacing" >
+          <property name="spacing" >
            <number>6</number>
           </property>
-          <property name="verticalSpacing" >
-           <number>6</number>
-          </property>
           <item row="0" column="1" >
            <widget class="QCheckBox" name="kcfg_ShowStarNames" >
             <property name="text" >
@@ -139,7 +115,7 @@
             <property name="sizeType" >
              <enum>QSizePolicy::Fixed</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>16</width>
               <height>20</height>
@@ -155,7 +131,7 @@
             <property name="sizeType" >
              <enum>QSizePolicy::Fixed</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>16</width>
               <height>20</height>
@@ -175,7 +151,7 @@
             <property name="sizeType" >
              <enum>QSizePolicy::Fixed</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
@@ -209,7 +185,7 @@
         <property name="orientation" >
          <enum>Qt::Horizontal</enum>
         </property>
-        <property name="sizeHint" >
+        <property name="sizeHint" stdset="0" >
          <size>
           <width>40</width>
           <height>20</height>
@@ -223,41 +199,30 @@
    <item>
     <widget class="QGroupBox" name="DeepSkyBox" >
      <property name="title" >
-      <string>Deep-Sky Catalogs</string>
+      <string/>
      </property>
      <layout class="QVBoxLayout" >
       <property name="spacing" >
        <number>6</number>
       </property>
-      <property name="leftMargin" >
+      <property name="margin" >
        <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>
+       <widget class="QCheckBox" name="kcfg_ShowDeepSky" >
+        <property name="text" >
+         <string>Deep-Sky Catalogs</string>
+        </property>
+       </widget>
+      </item>
+      <item>
        <layout class="QHBoxLayout" >
         <property name="spacing" >
          <number>6</number>
         </property>
-        <property name="leftMargin" >
+        <property name="margin" >
          <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>
          <widget class="QListWidget" name="CatalogList" >
           <property name="verticalScrollBarPolicy" >
@@ -270,18 +235,9 @@
           <property name="spacing" >
            <number>6</number>
           </property>
-          <property name="leftMargin" >
+          <property name="margin" >
            <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>
            <widget class="KPushButton" name="AddCatalog" >
             <property name="text" >
@@ -311,7 +267,7 @@
             <property name="orientation" >
              <enum>Qt::Vertical</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>20</width>
               <height>40</height>
@@ -328,61 +284,40 @@
         <property name="spacing" >
          <number>6</number>
         </property>
-        <property name="leftMargin" >
+        <property name="margin" >
          <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>
          <layout class="QGridLayout" >
-          <property name="leftMargin" >
+          <property name="margin" >
            <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>
-          <property name="horizontalSpacing" >
+          <property name="spacing" >
            <number>6</number>
           </property>
-          <property name="verticalSpacing" >
-           <number>6</number>
-          </property>
           <item row="1" column="0" >
-           <widget class="QLabel" name="label_5_2" >
+           <widget class="QLabel" name="LabelMagDeepSkyZoomOut" >
             <property name="text" >
              <string>Faint limit zoomed out:</string>
             </property>
            </widget>
           </item>
           <item row="0" column="2" >
-           <widget class="QLabel" name="label_3_2_2_2" >
+           <widget class="QLabel" name="LabelMag3" >
             <property name="text" >
              <string>mag</string>
             </property>
            </widget>
           </item>
           <item row="1" column="2" >
-           <widget class="QLabel" name="label_3_2_2_2_2" >
+           <widget class="QLabel" name="LabelMag4" >
             <property name="text" >
              <string>mag</string>
             </property>
            </widget>
           </item>
           <item row="0" column="0" >
-           <widget class="QLabel" name="label_5" >
+           <widget class="QLabel" name="LabelMagDeepSky" >
             <property name="text" >
              <string>Faint limit zoomed in:</string>
             </property>
@@ -401,7 +336,7 @@
           <property name="orientation" >
            <enum>Qt::Horizontal</enum>
           </property>
-          <property name="sizeHint" >
+          <property name="sizeHint" stdset="0" >
            <size>
             <width>40</width>
             <height>20</height>


More information about the Kstars-devel mailing list