[Kstars-devel] KDE/kdeedu/kstars/kstars
Alexey Khudyakov
alexey.skladnoy at gmail.com
Fri Feb 12 18:06:19 CET 2010
SVN commit 1089196 by khudyakov:
Improve angular ruler.
Display angular distance in InfoBox not in status bar.
It much nicer although it of course could be improved.
CCMAIL: kstars-devel at kde.org
M +10 -5 skymap.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #1089195:1089196
@@ -544,7 +544,6 @@
void SkyMap::slotEndAngularDistance() {
if( angularDistanceMode ) {
- dms angularDistance;
QString sbMessage;
//If the cursor is near a SkyObject, reset the AngularRuler's
@@ -560,13 +559,19 @@
angularDistanceMode=false;
AngularRuler.update( data );
+ dms angularDistance = AngularRuler.angularSize();
+ AngularRuler.clear();
- angularDistance = AngularRuler.angularSize();
sbMessage += i18n( "Angular distance: %1", angularDistance.toDMSString() );
- KStars::Instance()->statusBar()->changeItem( sbMessage, 0 );
-
- AngularRuler.clear();
+ // Create unobsructive message box with suicidal tendencies
+ // to display result.
+ InfoBoxWidget* box = new InfoBoxWidget(
+ true, mapFromGlobal( QCursor::pos() ), 0, QStringList(sbMessage), this);
+ connect(box, SIGNAL( clicked() ), box, SLOT( deleteLater() ));
+ QTimer::singleShot(5000, box, SLOT( deleteLater() ));
+ box->adjust();
+ box->show();
}
}
More information about the Kstars-devel
mailing list