Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

KdeWatcher Class Reference

#include <kdeapp.h>

Collaboration diagram for KdeWatcher:

Collaboration graph
List of all members.

Public Member Functions

 KdeWatcher (CelestiaCore *core, KdeApp *app)
virtual void notifyChange (CelestiaCore *, int)

Protected Attributes

KdeAppkdeapp

Constructor & Destructor Documentation

KdeWatcher::KdeWatcher CelestiaCore core,
KdeApp app
[inline]
 

Definition at line 57 of file kdeapp.h.

References CelestiaWatcher, and kdeapp.

00057 : CelestiaWatcher(*core),kdeapp(app) {};


Member Function Documentation

void KdeWatcher::notifyChange CelestiaCore ,
int 
[virtual]
 

Definition at line 249 of file kdeapp.cpp.

References KdeApp::appCore, KdeApp::getActionCollection(), CelestiaCore::getTextEnterMode(), kdeapp, KdeApp::resyncAmbient(), KdeApp::resyncFaintest(), KdeApp::resyncHistory(), KdeApp::resyncMenus(), and KdeApp::resyncVerbosity().

00250 {
00251     if ((property & (CelestiaCore::RenderFlagsChanged|
00252                      CelestiaCore::LabelFlagsChanged|
00253                      CelestiaCore::TimeZoneChanged)))
00254         kdeapp->resyncMenus();
00255     if (property & CelestiaCore::AmbientLightChanged)
00256         kdeapp->resyncAmbient();
00257     if (property & CelestiaCore::FaintestChanged)
00258         kdeapp->resyncFaintest();
00259     if (property & CelestiaCore::VerbosityLevelChanged)
00260         kdeapp->resyncVerbosity();
00261     if (property & CelestiaCore::HistoryChanged)
00262         kdeapp->resyncHistory();
00263 
00264     if (property == CelestiaCore::TextEnterModeChanged) {
00265         static std::vector<KAction*> actions;
00266         if (kdeapp->appCore->getTextEnterMode() != CelestiaCore::KbNormal) {
00267             for (unsigned int n=0; n < kdeapp->getActionCollection()->count(); n++) {
00268                 if (kdeapp->getActionCollection()->action(n)->shortcut().count() > 0
00269                     && (kdeapp->getActionCollection()->action(n)->shortcut().seq(0).key(0).modFlags()
00270                     & (KKey::CTRL | KKey::ALT | KKey::WIN )) == 0 ) {
00271                     actions.push_back(kdeapp->getActionCollection()->action(n));
00272                     kdeapp->getActionCollection()->action(n)->setEnabled(false);
00273                 }
00274             }
00275         } else {
00276             for (std::vector<KAction*>::iterator n=actions.begin(); n<actions.end(); n++) {
00277                  (*n)->setEnabled(true);
00278             }
00279             actions.clear();
00280         }
00281     }
00282 }


Member Data Documentation

KdeApp* KdeWatcher::kdeapp [protected]
 

Definition at line 60 of file kdeapp.h.

Referenced by KdeWatcher(), and notifyChange().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:25 2006 for Celestia by  doxygen 1.4.1