[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Thu Sep 15 16:05:24 CEST 2005
SVN commit 460852 by staikos:
add a notifier LED in the statusbar (yay, a real-world use for KLed!) that
illuminates when new data arrives. could use a bit of cosmetic and performance
work, which is documented
M +1 -0 Makefile.am
M +11 -0 kst.cpp
M +3 -0 kst.h
A kstdatanotifier.cpp [License: GPL (v2+)]
A kstdatanotifier.h [License: GPL (v2+)]
M +1 -1 kstdoc.cpp
--- trunk/extragear/graphics/kst/kst/Makefile.am #460851:460852
@@ -222,6 +222,7 @@
quickstartdialog.ui \
monochromedialog.ui \
kstdebugnotifier.cpp \
+ kstdatanotifier.cpp \
kst.cpp
include_HEADERS = kstdatasource.h kstobject.h kst_export.h kstsharedptr.h rwlock.h
--- trunk/extragear/graphics/kst/kst/kst.cpp #460851:460852
@@ -51,6 +51,7 @@
#include "kstcurvedialog_i.h"
#include "kstcsddialog_i.h"
#include "kstdatamanager_i.h"
+#include "kstdatanotifier.h"
#include "kstdebugdialog_i.h"
#include "kstdebugnotifier.h"
#include "kstdoc.h"
@@ -849,6 +850,9 @@
void KstApp::initStatusBar() {
+ _dataNotifier = new KstDataNotifier(statusBar());
+ statusBar()->addWidget(_dataNotifier, 0, true);
+
_dataBar = new StatusLabel(QString::null, statusBar());
_dataBar->setTextFormat(Qt::PlainText);
statusBar()->addWidget(_dataBar, 5, true);
@@ -1958,6 +1962,13 @@
}
+void KstApp::updateDataNotifier() {
+ if (_dataNotifier) {
+ _dataNotifier->arrived();
+ }
+}
+
+
void KstApp::updateDataDialogs(bool dm) {
if (!viewScalarsDialog->isHidden()) {
viewScalarsDialog->updateViewScalarsDialog();
--- trunk/extragear/graphics/kst/kst/kst.h #460851:460852
@@ -43,6 +43,7 @@
class KstChangeNptsDialogI;
class KstChooseColorDialogI;
class KstDataManagerI;
+class KstDataNotifier;
class KstDebugDialogI;
class KstDebugNotifier;
class KstDoc;
@@ -348,6 +349,7 @@
void updateDialogs(bool onlyVisible = true);
void updateDataDialogs(bool dataManager = true);
void updateDialogsForWindow();
+ void updateDataNotifier();
/*** shows doc as modified, updates doc and dialogs */
void registerDocChange();
@@ -544,6 +546,7 @@
KstTopLevelView::ViewMode _viewMode;
QGuardedPtr<KstDebugNotifier> _debugNotifier;
+ QGuardedPtr<KstDataNotifier> _dataNotifier;
};
#endif // KST_H
--- trunk/extragear/graphics/kst/kst/kstdoc.cpp #460851:460852
@@ -928,8 +928,8 @@
switch (te->_eventType) {
case ThreadEvent::UpdateDataDialogs:
{
- //kdDebug() << "Update data dialogs" << endl;
emit dataChanged();
+ KstApp::inst()->updateDataNotifier();
// HACK: remove me later
KMdiIterator<KMdiChildView*> *it = KstApp::inst()->createIterator();
if (it) {
More information about the Kst
mailing list