[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Sun Aug 12 21:47:30 CEST 2007
SVN commit 699344 by harris:
Adding a HideLabels user option, which will optionally hide name
labels while the display is in motion. The default will be "true",
which is what the current behavior is in the htm branch.
CCMAIL: kstars-devel at kde.org
M +5 -0 kstars.kcfg
M +1 -0 kstarsdcop.cpp
M +0 -11 opsadvanced.cpp
M +87 -28 opsadvanced.ui
M +3 -1 skymapdraw.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kstars.kcfg #699343:699344
@@ -329,6 +329,11 @@
<whatsthis>Toggle whether faint stars are hidden while the display is in motion.</whatsthis>
<default>true</default>
</entry>
+ <entry name="HideLabels" type="Bool">
+ <label>Hide object name labels while moving?</label>
+ <whatsthis>Toggle whether name labels are hidden while the display is in motion.</whatsthis>
+ <default>true</default>
+ </entry>
<entry name="ShowAsteroids" type="Bool">
<label>Draw asteroids in the sky map?</label>
<whatsthis>Toggle whether asteroids are drawn in the sky map.</whatsthis>
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdcop.cpp #699343:699344
@@ -295,6 +295,7 @@
if ( op == "HideCLines" && bOk ) Options::setHideCLines( bVal );
if ( op == "HideCBounds" && bOk ) Options::setHideCBounds( bVal );
if ( op == "HideGrid" && bOk ) Options::setHideGrid( bVal );
+ if ( op == "HideLabels" && bOk ) Options::setHideLabels( bVal );
if ( op == "UseAltAz" && bOk ) Options::setUseAltAz( bVal );
if ( op == "UseRefraction" && bOk ) Options::setUseRefraction( bVal );
--- trunk/KDE/kdeedu/kstars/kstars/opsadvanced.cpp #699343:699344
@@ -47,17 +47,6 @@
textLabelHideTimeStep->setEnabled( kcfg_HideOnSlew->isChecked() );
SlewTimeScale->setEnabled( kcfg_HideOnSlew->isChecked() );
HideBox->setEnabled( kcfg_HideOnSlew->isChecked() );
-/* kcfg_MagLimitHideStar->setEnabled( kcfg_HideOnSlew->isChecked() );
- textLabelMag1->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HidePlanets->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideMessier->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideNGC->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideIC->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideMilkyWay->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideCNames->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideCLines->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideCBounds->setEnabled( kcfg_HideOnSlew->isChecked() );
- kcfg_HideGrid->setEnabled( kcfg_HideOnSlew->isChecked() );*/
}
#include "opsadvanced.moc"
--- trunk/KDE/kdeedu/kstars/kstars/opsadvanced.ui #699343:699344
@@ -5,17 +5,26 @@
<rect>
<x>0</x>
<y>0</y>
- <width>478</width>
+ <width>484</width>
<height>582</height>
</rect>
</property>
<layout class="QVBoxLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <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>
<widget class="QCheckBox" name="kcfg_UseRefraction" >
<property name="toolTip" >
@@ -84,12 +93,21 @@
<string>Observing List Labels</string>
</property>
<layout class="QHBoxLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <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>
<widget class="QRadioButton" name="kcfg_ObsListSymbol" >
<property name="text" >
@@ -141,12 +159,21 @@
</item>
<item>
<layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <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>
<widget class="QLabel" name="textLabelHideTimeStep" >
<property name="text" >
@@ -181,20 +208,38 @@
<string>Configure Hidden Objects</string>
</property>
<layout class="QVBoxLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <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>
<layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <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>
<widget class="QCheckBox" name="kcfg_HideStars" >
<property name="toolTip" >
@@ -251,12 +296,24 @@
</item>
<item>
<layout class="QGridLayout" >
- <property name="margin" >
+ <property name="leftMargin" >
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="topMargin" >
+ <number>0</number>
+ </property>
+ <property name="rightMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
+ <property name="horizontalSpacing" >
<number>6</number>
</property>
+ <property name="verticalSpacing" >
+ <number>6</number>
+ </property>
<item rowspan="2" row="4" column="0" >
<widget class="QCheckBox" name="kcfg_HideIC" >
<property name="toolTip" >
@@ -368,6 +425,13 @@
</property>
</widget>
</item>
+ <item row="6" column="0" >
+ <widget class="QCheckBox" name="kcfg_HideLabels" >
+ <property name="text" >
+ <string>Object labels</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
@@ -394,20 +458,15 @@
<layoutdefault spacing="6" margin="11" />
<customwidgets>
<customwidget>
+ <class>MagnitudeSpinBox</class>
+ <extends>KDoubleNumInput</extends>
+ <header>widgets/magnitudespinbox.h</header>
+ </customwidget>
+ <customwidget>
<class>TimeStepBox</class>
<extends>QSpinBox</extends>
<header>widgets/timestepbox.h</header>
</customwidget>
- <customwidget>
- <class>KDoubleNumInput</class>
- <extends>QWidget</extends>
- <header>knuminput.h</header>
- </customwidget>
- <customwidget>
- <class>MagnitudeSpinBox</class>
- <extends>KDoubleNumInput</extends>
- <header>widgets/magnitudespinbox.h</header>
- </customwidget>
</customwidgets>
<tabstops>
<tabstop>kcfg_UseRefraction</tabstop>
--- trunk/KDE/kdeedu/kstars/kstars/skymapdraw.cpp #699343:699344
@@ -268,12 +268,14 @@
}
void SkyMap::drawObjectLabels( QList<SkyObject*>& labelObjects, QPainter &psky, double scale ) {
+ bool checkSlewing = ( slewing || ( clockSlewing && data->clock()->isActive() ) ) && Options::hideOnSlew();
+ if ( checkSlewing && Options::hideLabels() ) return;
+
float Width = scale * width();
float Height = scale * height();
psky.setPen( data->colorScheme()->colorNamed( "UserLabelColor" ) );
- bool checkSlewing = ( slewing || ( clockSlewing && data->clock()->isActive() ) ) && Options::hideOnSlew();
bool drawPlanets( Options::showSolarSystem() && !(checkSlewing && Options::hidePlanets() ) );
bool drawComets( drawPlanets && Options::showComets() );
bool drawAsteroids( drawPlanets && Options::showAsteroids() );
More information about the Kstars-devel
mailing list