[Kstars-devel] UI For Memory Management

Akarsh Simha akarshsimha at gmail.com
Wed Jul 16 21:51:28 CEST 2008


Hi

I tried designing a UI for memory management, to set star density,
etc.

I will still need to work out the math behind the sliders, but I tried
to make the interface a little more intuitive, by replacing the Faint
Magnitude when Zoomed Out spin box with a slider called "Light
Pollution Level". The slider goes from 1 to 9 representing the Bortle
Sky Brightness Scale. We could set the Faint Magnitude Limit when
Zoomed Out appropriately, using the Bortle Sky Class. Of course, the
Bortle scale is a very vague scale, but I felt this would be more
intuitive and appreciated by a user. Of course, the real meaning of
this slider will become apparent when the Label next to "Faint Limit
when Zoomed Out", which is currently blank, changes to the maglim when
zoomed out.

I don't know whether this is the right way to go. I will fill in the
details in the implementation on 18th.

Regards
Akarsh
-------------- next part --------------
<ui version="4.0" >
 <class>OpsCatalog</class>
 <widget class="QWidget" name="OpsCatalog" >
  <property name="geometry" >
   <rect>
    <x>0</x>
    <y>0</y>
    <width>531</width>
    <height>686</height>
   </rect>
  </property>
  <layout class="QVBoxLayout" >
   <item>
    <widget class="QGroupBox" name="StarBox" >
     <property name="title" >
      <string/>
     </property>
     <layout class="QHBoxLayout" >
      <item>
       <layout class="QVBoxLayout" >
        <item>
         <widget class="QCheckBox" name="kcfg_ShowStars" >
          <property name="text" >
           <string>Display &amp;Stars</string>
          </property>
         </widget>
        </item>
        <item>
         <layout class="QGridLayout" >
          <property name="margin" >
           <number>0</number>
          </property>
          <property name="spacing" >
           <number>6</number>
          </property>
          <item row="0" column="0" >
           <widget class="QLabel" name="LabelMemUsageSliderText" >
            <property name="text" >
             <string>Memory Usage:</string>
            </property>
           </widget>
          </item>
          <item row="0" column="1" >
           <widget class="QSlider" name="kcfg_MemUsage" >
            <property name="minimum" >
             <number>0</number>
            </property>
            <property name="maximum" >
             <number>10</number>
            </property>
            <property name="singleStep" >
             <number>1</number>
            </property>
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="tickPosition" >
             <enum>QSlider::NoTicks</enum>
            </property>
            <property name="tickInterval" >
             <number>1</number>
            </property>
           </widget>
          </item>
          <item rowspan="2" row="1" column="0" >
           <widget class="QLabel" name="LabelMagStarsZoomOutSliderText" >
            <property name="text" >
             <string>Light Pollution Level:</string>
            </property>
           </widget>
          </item>
          <item rowspan="2" row="1" column="2" >
           <widget class="QLabel" name="LabelMagStarsZoomOutText" >
            <property name="text" >
             <string>Faint Limit when Zoomed Out:</string>
            </property>
           </widget>
          </item>
          <item rowspan="2" row="1" column="1" >
           <widget class="QSlider" name="kcfg_LightPollutionLevel" >
            <property name="layoutDirection" >
             <enum>Qt::LeftToRight</enum>
            </property>
            <property name="minimum" >
             <number>1</number>
            </property>
            <property name="maximum" >
             <number>9</number>
            </property>
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
           </widget>
          </item>
          <item rowspan="2" row="1" column="3" >
           <widget class="QLabel" name="LabelMagStarsZoomOut" >
            <property name="sizePolicy" >
             <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
            <property name="minimumSize" >
             <size>
              <width>50</width>
              <height>0</height>
             </size>
            </property>
            <property name="text" >
             <string/>
            </property>
           </widget>
          </item>
          <item row="0" column="2" >
           <widget class="QLabel" name="LabelMemUsageText" >
            <property name="text" >
             <string>Estimated Memory Usage:</string>
            </property>
           </widget>
          </item>
          <item row="0" column="3" >
           <widget class="QLabel" name="LabelMemUsage" >
            <property name="sizePolicy" >
             <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
            <property name="minimumSize" >
             <size>
              <width>50</width>
              <height>0</height>
             </size>
            </property>
            <property name="text" >
             <string/>
            </property>
           </widget>
          </item>
         </layout>
        </item>
        <item>
         <layout class="QGridLayout" >
          <property name="margin" >
           <number>0</number>
          </property>
          <property name="spacing" >
           <number>6</number>
          </property>
          <item row="0" column="1" >
           <widget class="QCheckBox" name="kcfg_ShowStarNames" >
            <property name="text" >
             <string>Show &amp;name</string>
            </property>
           </widget>
          </item>
          <item row="1" column="1" >
           <widget class="QCheckBox" name="kcfg_ShowStarMagnitudes" >
            <property name="text" >
             <string>Show ma&amp;gnitude</string>
            </property>
           </widget>
          </item>
          <item row="0" column="0" >
           <spacer>
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeType" >
             <enum>QSizePolicy::Fixed</enum>
            </property>
            <property name="sizeHint" stdset="0" >
             <size>
              <width>16</width>
              <height>20</height>
             </size>
            </property>
           </spacer>
          </item>
          <item row="1" column="0" >
           <spacer>
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeType" >
             <enum>QSizePolicy::Fixed</enum>
            </property>
            <property name="sizeHint" stdset="0" >
             <size>
              <width>16</width>
              <height>20</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </item>
        <item>
         <layout class="QHBoxLayout" >
          <item>
           <spacer>
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeType" >
             <enum>QSizePolicy::Fixed</enum>
            </property>
            <property name="sizeHint" stdset="0" >
             <size>
              <width>40</width>
              <height>20</height>
             </size>
            </property>
           </spacer>
          </item>
          <item>
           <widget class="QLabel" name="LabelDensity" >
            <property name="text" >
             <string>Label density:</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QSlider" name="kcfg_StarLabelDensity" >
            <property name="maximum" >
             <number>20</number>
            </property>
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
           </widget>
          </item>
         </layout>
        </item>
       </layout>
      </item>
     </layout>
    </widget>
   </item>
   <item>
    <widget class="QGroupBox" name="DeepSkyBox" >
     <property name="title" >
      <string/>
     </property>
     <layout class="QVBoxLayout" >
      <property name="spacing" >
       <number>6</number>
      </property>
      <property name="margin" >
       <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="margin" >
         <number>0</number>
        </property>
        <item>
         <widget class="QListWidget" name="CatalogList" >
          <property name="verticalScrollBarPolicy" >
           <enum>Qt::ScrollBarAlwaysOn</enum>
          </property>
         </widget>
        </item>
        <item>
         <layout class="QVBoxLayout" >
          <property name="spacing" >
           <number>6</number>
          </property>
          <property name="margin" >
           <number>0</number>
          </property>
          <item>
           <widget class="KPushButton" name="AddCatalog" >
            <property name="text" >
             <string>Import Catalog...</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="KPushButton" name="LoadCatalog" >
            <property name="text" >
             <string>Load Catalog...</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="KPushButton" name="RemoveCatalog" >
            <property name="enabled" >
             <bool>false</bool>
            </property>
            <property name="text" >
             <string>Remove Catalog...</string>
            </property>
           </widget>
          </item>
          <item>
           <spacer>
            <property name="orientation" >
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0" >
             <size>
              <width>20</width>
              <height>40</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </item>
       </layout>
      </item>
      <item>
       <layout class="QHBoxLayout" >
        <property name="spacing" >
         <number>6</number>
        </property>
        <property name="margin" >
         <number>0</number>
        </property>
        <item>
         <layout class="QGridLayout" >
          <property name="margin" >
           <number>0</number>
          </property>
          <property name="spacing" >
           <number>6</number>
          </property>
          <item row="1" column="0" >
           <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="LabelMag3" >
            <property name="text" >
             <string>mag</string>
            </property>
           </widget>
          </item>
          <item row="1" column="2" >
           <widget class="QLabel" name="LabelMag4" >
            <property name="text" >
             <string>mag</string>
            </property>
           </widget>
          </item>
          <item row="0" column="0" >
           <widget class="QLabel" name="LabelMagDeepSky" >
            <property name="text" >
             <string>Faint limit zoomed in:</string>
            </property>
           </widget>
          </item>
          <item row="0" column="1" >
           <widget class="MagnitudeSpinBox" name="kcfg_MagLimitDrawDeepSky" />
          </item>
          <item row="1" column="1" >
           <widget class="MagnitudeSpinBox" name="kcfg_MagLimitDrawDeepSkyZoomOut" />
          </item>
         </layout>
        </item>
        <item>
         <spacer>
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
          <property name="sizeHint" stdset="0" >
           <size>
            <width>40</width>
            <height>20</height>
           </size>
          </property>
         </spacer>
        </item>
       </layout>
      </item>
     </layout>
    </widget>
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>KPushButton</class>
   <extends>QPushButton</extends>
   <header>kpushbutton.h</header>
  </customwidget>
  <customwidget>
   <class>MagnitudeSpinBox</class>
   <extends>KDoubleNumInput</extends>
   <header>widgets/magnitudespinbox.h</header>
  </customwidget>
 </customwidgets>
 <resources/>
 <connections/>
</ui>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20080717/3a5eb4a1/attachment.pgp 


More information about the Kstars-devel mailing list