[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kstars/unfrozen/kstars/kstars
From: Jason Harris <kstars () 30doradus ! org>
Date: 2008-06-25 6:40:47
Message-ID: 1214376047.250658.14001.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 824175 by harris:
Presto, chango!
The statusbar now has a (non-functional) KLed on its
right side. If you want it on the left, move the new
lines to the top of initStatusBar().
The public accessor is KLed* KStars::diskLED()
The relevant functions to call are diskLED()->on() and
diskLed()->off() (or diskLED()->toggle()).
(BTW, FYI: this is going to be used to indicate when the
disk is being accessed to dynamically load more stars.
It will probably be configured to only show up for debug
builds, or at least will be hidden by default)
CCMAIL: kstars-devel@kde.org
M +4 -0 kstars.h
M +6 -1 kstarsinit.cpp
--- branches/kstars/unfrozen/kstars/kstars/kstars.h #824174:824175
@@ -26,6 +26,7 @@
// forward declaration is enough. We only need pointers
class QPalette;
class KActionMenu;
+class KLed;
class dms;
class KStarsData;
@@ -102,6 +103,8 @@
*/
InfoBoxes* infoBoxes();
+ inline KLed* diskLED() { return m_DiskLED; }
+
/**@return pointer to the INDI driver
*/
INDIDriver* getINDIDriver() { return indidriver; }
@@ -705,6 +708,7 @@
QPalette OriginalPalette, DarkPalette;
+ KLed *m_DiskLED;
};
#endif
--- branches/kstars/unfrozen/kstars/kstars/kstarsinit.cpp #824174:824175
@@ -25,6 +25,7 @@
#include <kmenu.h>
#include <kstatusbar.h>
#include <ktip.h>
+#include <kled.h>
#include <kmessagebox.h>
#include <kstandardaction.h>
#include <kstandarddirs.h>
@@ -548,7 +549,7 @@
void KStars::initStatusBar() {
statusBar()->insertPermanentItem( i18n( " Welcome to KStars " ), 0, 1 );
statusBar()->setItemAlignment( 0, Qt::AlignLeft | Qt::AlignVCenter );
-
+
QString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width
if ( Options::showAltAzField() ) {
statusBar()->insertPermanentFixedItem( s, 1 );
@@ -562,6 +563,10 @@
statusBar()->changeItem( QString(), 2 );
}
+ m_DiskLED = new KLed( Qt::red, statusBar() );
+ m_DiskLED->off();
+ statusBar()->addPermanentWidget( m_DiskLED );
+
if ( ! Options::showStatusBar() ) statusBar()->hide();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic