INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
platformfocusmanager.h00001 #ifndef HYDROQGUI_PLATFORMFOCUSMANAGER_H 00002 #define HYDROQGUI_PLATFORMFOCUSMANAGER_H 00003 00004 #include <QString> 00005 #include <vector> 00006 #include <hydroutil/uncopyable.h> 00007 #include <IceUtil/IceUtil.h> 00008 00009 namespace hydroqgui { 00010 00011 class PlatformFocusManager; 00012 00019 class PlatformFocusChangeReceiver : public hydroutil::Uncopyable 00020 { 00021 public: 00022 00023 PlatformFocusChangeReceiver( PlatformFocusManager &platformFocusManager ); 00024 virtual ~PlatformFocusChangeReceiver(); 00025 00026 virtual void platformFocusChanged( const QString &newPlatformName )=0; 00027 00028 private: 00029 00030 PlatformFocusManager &platformFocusManager_; 00031 }; 00032 00040 class PlatformFocusManager : public hydroutil::Uncopyable 00041 { 00042 00043 public: 00044 00045 PlatformFocusManager(); 00046 00047 const QString &platformInFocus() const { return platformInFocus_; } 00048 00050 void setFocusPlatform( const QString &platformName, PlatformFocusChangeReceiver *receiver=NULL ); 00051 00052 void registerForPlatformFocusChanges( PlatformFocusChangeReceiver *receiver ); 00053 void unRegisterForPlatformFocusChanges( PlatformFocusChangeReceiver *receiver ); 00054 00055 private: 00056 00057 QString platformInFocus_; 00058 std::vector<PlatformFocusChangeReceiver*> changeReceivers_; 00059 00060 IceUtil::Mutex mutex_; 00061 }; 00062 00063 } 00064 00065 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)