From 747027f23ac5e206598beef3f77a109cdfaf4c6e Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 3 Jun 2016 17:19:46 +0200 Subject: [PATCH] Simplification of the Hurricane::Observer mechanism. * Change: In Hurricane::Observer, simplification of the template so that we can use it directly instead of creating a derived class with an implementation of Observer::notify(). Now the implemenation is the same for all and just calls a notify() method on the owner object. Create a StaticObservable for fast access of the observers. This is mainly a fixed size table (array<>) with oberservers at known indexes. This way we can go from the obervable to the observer owner in one indirect access (or so I hope). * Change: In Hurricane::CellViewer, use the new observers. * Change: In Hurricane::ControllerWidget, use the new observers. * Change: In Hurricane::CellWidget, set the winidow initial size to a more sensible 500px. * Change: In CRL::LibraryManager, use the new observers. * Change: In CRL::LibraryManager, use the new observers. * Change: In CRL, in display.conf & technology.conf, modification for the ST hcmos9gp capacitors. --- crlcore/etc/common/display.conf | 24 +- crlcore/etc/common/technology.conf | 10 +- crlcore/src/LibraryManager/LibraryManager.cpp | 5 +- .../LibraryManager/crlcore/LibraryManager.h | 31 +-- hurricane/src/hurricane/hurricane/Observer.h | 97 +++++++-- hurricane/src/viewer/CellViewer.cpp | 7 +- hurricane/src/viewer/CellWidget.cpp | 2 +- hurricane/src/viewer/ControllerWidget.cpp | 6 +- .../src/viewer/hurricane/viewer/CellViewer.h | 206 +++++++++--------- .../hurricane/viewer/ControllerWidget.h | 36 +-- 10 files changed, 232 insertions(+), 192 deletions(-) diff --git a/crlcore/etc/common/display.conf b/crlcore/etc/common/display.conf index a44e6fc5..f4415a5d 100644 --- a/crlcore/etc/common/display.conf +++ b/crlcore/etc/common/display.conf @@ -63,10 +63,10 @@ stylesTable = \ # Group: MIM6. , (Group , 'MIM6') - , (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) - , (Drawing, 'botmim6', { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) - , (Drawing, 'padopen', { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) - , (Drawing, 'alucap' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) + #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) + , (Drawing, 'metbot' , { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) + , (Drawing, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) + , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) # Group: Blockages. , (Group , 'Blockages') @@ -169,10 +169,10 @@ stylesTable = \ # MIM6. , (Group , 'MIM6') - , (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.32' , 'threshold':0.80*scale }) - , (Drawing, 'botmim6', { 'color':'Aqua' , 'pattern':'light_antihash0.8' , 'threshold':0.80*scale }) - , (Drawing, 'padopen', { 'color':'LightPink', 'pattern':'light_antihash1.8' , 'threshold':0.80*scale }) - , (Drawing, 'alucap' , { 'color':'Green' , 'pattern':'light_antihash2.8' , 'threshold':0.80*scale }) + #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.32' , 'threshold':0.80*scale }) + , (Drawing, 'metbot' , { 'color':'Aqua' , 'pattern':'light_antihash0.8' , 'threshold':0.80*scale }) + #, (Drawing, 'padopen', { 'color':'LightPink', 'pattern':'light_antihash1.8' , 'threshold':0.80*scale }) + , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8' , 'threshold':0.80*scale }) # Blockages. , (Group , 'Blockages') @@ -345,10 +345,10 @@ stylesTable = \ # Group: MIM6. , (Group , 'MIM6') - , (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) - , (Drawing, 'botmim6', { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) - , (Drawing, 'padopen', { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) - , (Drawing, 'alucap' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) + #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) + , (Drawing, 'metbot' , { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) + , (Drawing, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) + , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) # Group: Blockages. , (Group , 'Blockages') diff --git a/crlcore/etc/common/technology.conf b/crlcore/etc/common/technology.conf index 42c7349d..a122865e 100644 --- a/crlcore/etc/common/technology.conf +++ b/crlcore/etc/common/technology.conf @@ -53,10 +53,10 @@ realLayersTable = \ , ('metal7' , BasicLayer.Material.metal ) , ('cut7' , BasicLayer.Material.cut ) , ('metal8' , BasicLayer.Material.metal ) - , ('topmim6' , BasicLayer.Material.other ) # For Capacitances & Pads. - , ('botmim6' , BasicLayer.Material.other ) - , ('padopen' , BasicLayer.Material.other ) - , ('alucap' , BasicLayer.Material.other ) + #, ('topmim6' , BasicLayer.Material.other ) # For Capacitances & Pads. + #, ('metbot' , BasicLayer.Material.other ) + #, ('padopen' , BasicLayer.Material.other ) + #, ('alucap' , BasicLayer.Material.other ) , ('text.cell' , BasicLayer.Material.other ) # Misc. non-physical layers. , ('text.instance', BasicLayer.Material.other ) # Used by the software for visualization @@ -134,7 +134,7 @@ symbolicLayersTable = \ # This is a simple list of Real & Symbolic layers. workingLayersTable = \ - [ 'cut0', 'cut1' , 'cut2' , 'cut3' , 'cut4' , 'cut5' + [ 'cut0', 'cut1' , 'cut2' , 'cut3' , 'cut4' , 'cut5' , 'cut6' , 'POLY', 'POLY2' , 'METAL1' , 'METAL2' , 'METAL3' , 'METAL4' , 'METAL5' , 'METAL6' , 'METAL7' , 'METAL8' , 'BLOCKAGE1', 'BLOCKAGE2', 'BLOCKAGE3', 'BLOCKAGE4', 'BLOCKAGE5', 'BLOCKAGE6', 'BLOCKAGE7', 'BLOCKAGE8' diff --git a/crlcore/src/LibraryManager/LibraryManager.cpp b/crlcore/src/LibraryManager/LibraryManager.cpp index 2c0bced1..14ac9604 100644 --- a/crlcore/src/LibraryManager/LibraryManager.cpp +++ b/crlcore/src/LibraryManager/LibraryManager.cpp @@ -43,9 +43,10 @@ namespace CRL { // ------------------------------------------------------------------- // Class : "FrameworkObserver". - void FrameworkObserver::notify ( unsigned int flags ) +//void FrameworkObserver::notify ( unsigned int flags ) + void LibraryManager::notify ( LibraryManager* manager, unsigned int flags ) { - LibraryManager* manager = getOwner(); + //LibraryManager* manager = getOwner(); if (flags & (AllianceFramework::AddedLibrary |AllianceFramework::RemovedLibrary)) { manager->getLibrariesWidget()->update(); diff --git a/crlcore/src/LibraryManager/crlcore/LibraryManager.h b/crlcore/src/LibraryManager/crlcore/LibraryManager.h index cd5a9c34..e7a33161 100644 --- a/crlcore/src/LibraryManager/crlcore/LibraryManager.h +++ b/crlcore/src/LibraryManager/crlcore/LibraryManager.h @@ -43,29 +43,14 @@ namespace CRL { class LibraryManager; -// ------------------------------------------------------------------- -// Class : "FrameworkObserver". - - class FrameworkObserver : public Observer { - public: - inline FrameworkObserver ( LibraryManager* ); - virtual void notify ( unsigned int flags ); - private: - FrameworkObserver ( const FrameworkObserver& ); - }; - - - inline FrameworkObserver::FrameworkObserver ( LibraryManager* owner ) - : Observer(owner) - { } - - // ------------------------------------------------------------------- // Class : "LibraryManager". class LibraryManager : public QWidget { Q_OBJECT; + public: + static void notify ( LibraryManager*, unsigned int flags ); public: LibraryManager ( QWidget* parent=NULL ); ~LibraryManager (); @@ -78,12 +63,12 @@ namespace CRL { CellViewer* openCell ( Cell*, unsigned int flags ); void updateLibrary ( Cell* ); private: - FrameworkObserver _frameworkObserver; - LibrariesWidget* _librariesWidget; - CellsWidget* _cellsWidget; - ViewsWidget* _viewsWidget; - CellViewer* _cellViewer; - QLabel* _libPath; + Observer _frameworkObserver; + LibrariesWidget* _librariesWidget; + CellsWidget* _cellsWidget; + ViewsWidget* _viewsWidget; + CellViewer* _cellViewer; + QLabel* _libPath; }; diff --git a/hurricane/src/hurricane/hurricane/Observer.h b/hurricane/src/hurricane/hurricane/Observer.h index ae0693a8..f08dd0c7 100644 --- a/hurricane/src/hurricane/hurricane/Observer.h +++ b/hurricane/src/hurricane/hurricane/Observer.h @@ -30,44 +30,44 @@ namespace Hurricane { class BaseObserver { public: virtual void notify ( unsigned int flags ); - template< typename T > - inline T* as (); }; - template< typename T> - inline T* BaseObserver::as () { return dynamic_cast(this); } - - - template< typename T> + template< typename OwnerT> class Observer : public BaseObserver { public: - inline Observer ( const T* owner ); - inline T* getOwner () const; + inline Observer ( const OwnerT* owner ); + inline OwnerT* getOwner () const; + virtual void notify ( unsigned int flags ); private: - Observer ( const Observer& ); + Observer ( const Observer& ); + Observer& operator= ( const Observer& ); private: static int _ownerOffset; }; - template< typename T> - int Observer::_ownerOffset = -1; + template< typename OwnerT> + int Observer::_ownerOffset = -1; - template< typename T> - inline Observer::Observer ( const T* owner ) + template< typename OwnerT> + inline Observer::Observer ( const OwnerT* owner ) : BaseObserver() { if (owner == NULL) - throw Hurricane::Error( "Observer::Observer(), attempt to create with NULL owner." ); + throw Error( "Observer::Observer(), attempt to create with NULL owner." ); - if (_ownerOffset < 0) - _ownerOffset = (unsigned long)this - (unsigned long)owner; + if (_ownerOffset < 0) _ownerOffset = (unsigned long)this - (unsigned long)owner; } - template< typename T> - inline T* Observer::getOwner () const { return reinterpret_cast((unsigned long)this - _ownerOffset); } + template< typename OwnerT> + inline OwnerT* Observer::getOwner () const + { return reinterpret_cast((unsigned long)this - _ownerOffset); } + + template< typename OwnerT> + void Observer::notify ( unsigned int flags ) + { OwnerT::notify( getOwner(), flags ); } // ------------------------------------------------------------------- @@ -104,6 +104,65 @@ namespace Hurricane { } +// ------------------------------------------------------------------- +// Class : "StaticObservable". + + template + class StaticObservable { + public: + inline StaticObservable (); + inline const std::array& + getObservers () const; + inline void setObserver ( size_t slot, BaseObserver* ); + inline void notify ( unsigned int flags ); + template + inline OwnerT* getObserver ( size_t slot ) const; + private: + StaticObservable ( const StaticObservable& ); + StaticObservable& operator= ( const StaticObservable& ); + private: + std::array _observers; + }; + + + template + inline StaticObservable::StaticObservable () + : _observers() + { } + + + template + inline const std::array& StaticObservable::getObservers () const + { return _observers; } + + + template + inline void StaticObservable::notify ( unsigned int flags ) + { + for ( BaseObserver* iobserver : _observers ) { + if (iobserver) iobserver->notify( flags ); + } + } + + + template + inline void StaticObservable::setObserver ( size_t slot, BaseObserver* observer ) + { + if (slot < _observers.size()) _observers[slot] = observer; + else + throw Error( "StaticObserver::setObserver(): Trying to access out of range slot %u (size:%u)." + , slot, _observers.size() + ); + } + + + template + template + inline OwnerT* StaticObservable::getObserver ( size_t slot ) const + { return (slot < _observers.size()) ? static_cast< Observer* >(_observers[slot])->getOwner() : NULL; } + + + } // Hurricane namespace. #endif diff --git a/hurricane/src/viewer/CellViewer.cpp b/hurricane/src/viewer/CellViewer.cpp index 1934e3c9..7bfb12c5 100644 --- a/hurricane/src/viewer/CellViewer.cpp +++ b/hurricane/src/viewer/CellViewer.cpp @@ -62,9 +62,12 @@ namespace Hurricane { // ------------------------------------------------------------------- // Class : "CellObserver". - void CellObserver::notify ( unsigned int flags ) +// void CellObserver::notify ( unsigned int flags ) + void CellViewer::notify ( CellViewer* viewer, unsigned int flags ) { - CellViewer* viewer = getOwner(); + cdebug.log(111) << "CellViewer::notify() " << viewer << endl; + + //CellViewer* viewer = getOwner(); switch ( flags & (Cell::Flags::CellAboutToChange |Cell::Flags::CellChanged |Cell::Flags::CellDestroyed) ) { diff --git a/hurricane/src/viewer/CellWidget.cpp b/hurricane/src/viewer/CellWidget.cpp index 66a06822..4de94401 100644 --- a/hurricane/src/viewer/CellWidget.cpp +++ b/hurricane/src/viewer/CellWidget.cpp @@ -1042,7 +1042,7 @@ namespace Hurricane { // Class : "Hurricane::CellWidget". - int CellWidget::_initialSide = 250; + int CellWidget::_initialSide = 500; CellWidget::CellWidget ( QWidget* parent ) diff --git a/hurricane/src/viewer/ControllerWidget.cpp b/hurricane/src/viewer/ControllerWidget.cpp index 203d0d2a..1a46733c 100644 --- a/hurricane/src/viewer/ControllerWidget.cpp +++ b/hurricane/src/viewer/ControllerWidget.cpp @@ -661,9 +661,11 @@ namespace Hurricane { // ------------------------------------------------------------------- // Class : "ControllerWidget::GraphicsObserver". - void ControllerWidget::GraphicsObserver::notify ( unsigned int flags ) +//void ControllerWidget::GraphicsObserver::notify ( unsigned int flags ) + void ControllerWidget::notify ( ControllerWidget* controller, unsigned int flags ) { - ControllerWidget* controller = getOwner(); + cdebug.log(111) << "ControllerWidget::notify()" << endl; + //ControllerWidget* controller = getOwner(); if (flags & Graphics::ChangedDisplayStyles) { controller->graphicsUpdated(); } diff --git a/hurricane/src/viewer/hurricane/viewer/CellViewer.h b/hurricane/src/viewer/hurricane/viewer/CellViewer.h index ec067f3c..e1f9ac32 100644 --- a/hurricane/src/viewer/hurricane/viewer/CellViewer.h +++ b/hurricane/src/viewer/hurricane/viewer/CellViewer.h @@ -57,18 +57,18 @@ namespace Hurricane { // ------------------------------------------------------------------- // Class : "CellObserver". - class CellObserver : public Observer { - public: - inline CellObserver ( CellViewer* ); - virtual void notify ( unsigned int flags ); - private: - CellObserver ( const CellObserver& ); - }; + // class CellObserver : public Observer { + // public: + // inline CellObserver ( CellViewer* ); + // virtual void notify ( unsigned int flags ); + // private: + // CellObserver ( const CellObserver& ); + // }; - inline CellObserver::CellObserver ( CellViewer* owner ) - : Observer(owner) - { } + // inline CellObserver::CellObserver ( CellViewer* owner ) + // : Observer(owner) + // { } // ------------------------------------------------------------------- @@ -86,90 +86,92 @@ namespace Hurricane { typedef std::map< const QString, boost::any > ActionLut; typedef bool (QWidget::* SlotMethod)(); public: - CellViewer ( QWidget* parent=NULL ); - virtual ~CellViewer (); - inline bool isToolInterrupted () const; - QMenu* createDebugMenu (); - bool hasMenu ( const QString& path ) const; - bool hasMenuAction ( const QString& path ) const; - QMenu* addMenu ( const QString& path - , std::string text - , unsigned int flags=NoFlags - ); - bool addToMenu ( const QString& path ); - QAction* addToMenu ( const QString& path - , std::string text - , std::string textTip - , std::function< void() > - , QIcon icon=QIcon() ); - QAction* addToMenu ( const QString& path - , std::string text - , std::string textTip - , std::string scriptPath ); - QAction* addToMenu ( QString path - , QString text - , QString textTip - , const QKeySequence& shortCut - , QIcon icon =QIcon()); - inline void setEnableRedrawInterrupt ( bool ); - inline void setApplicationName ( const QString& ); - inline CellObserver* getCellObserver (); - Cell* getCell () const; - virtual void setCell ( Cell* ); - void renameCell ( const char* ); - virtual Cell* getCellFromDb ( const char* ); - inline CellWidget* getCellWidget (); - inline const CellWidget* getCellWidget () const; - inline ControllerWidget* getControllerWidget (); - void setAnonNetSelectable ( bool ); - void select ( Occurrence& ); - void unselect ( Occurrence& ); - void unselectAll (); - inline void setLayerVisible ( const Name& layer, bool visible ); - void runScript ( QString scriptPath ); - virtual CellViewer* vcreate () const; - virtual std::string _getString () const; - public slots: - void doAction (); - void doGoto (); - void changeSelectionMode (); - void setShowSelection ( bool ); - void setState ( shared_ptr& ); - void removeHistory ( Cell* ); - void openHistoryCell (); - void openDesignBlob (); - void saveDesignBlob (); - void printDisplay (); - void print ( QPrinter* ); - void imageDisplay (); - void raiseToolInterrupt (); - void clearToolInterrupt (); - void runScriptWidget (); - void runStressScript (); - inline void emitCellAboutToChange (); - inline void emitCellChanged (); - inline void emitCellPreModificated (); - inline void emitCellPostModificated (); - signals: - void cellLoadedFromDisk ( Cell* ); - void showSelectionToggled ( bool ); - void stateChanged ( shared_ptr& ); - void redrawCellWidget (); - void cellPreModificated (); - void cellPostModificated (); - protected: - void createMenus (); - void refreshTitle (); - void refreshHistory (); - void rebuildHistory (); - private: - QString _getAbsWidgetPath ( const QString& relPath ) const; - QMenu* _getParentMenu ( const QString& ) const; - void _runScript ( QString scriptPath ); + static void notify ( CellViewer*, unsigned int flags ); + public: + CellViewer ( QWidget* parent=NULL ); + virtual ~CellViewer (); + inline bool isToolInterrupted () const; + QMenu* createDebugMenu (); + bool hasMenu ( const QString& path ) const; + bool hasMenuAction ( const QString& path ) const; + QMenu* addMenu ( const QString& path + , std::string text + , unsigned int flags=NoFlags + ); + bool addToMenu ( const QString& path ); + QAction* addToMenu ( const QString& path + , std::string text + , std::string textTip + , std::function< void() > + , QIcon icon=QIcon() ); + QAction* addToMenu ( const QString& path + , std::string text + , std::string textTip + , std::string scriptPath ); + QAction* addToMenu ( QString path + , QString text + , QString textTip + , const QKeySequence& shortCut + , QIcon icon =QIcon()); + inline void setEnableRedrawInterrupt ( bool ); + inline void setApplicationName ( const QString& ); + inline Observer* getCellObserver (); + Cell* getCell () const; + virtual void setCell ( Cell* ); + void renameCell ( const char* ); + virtual Cell* getCellFromDb ( const char* ); + inline CellWidget* getCellWidget (); + inline const CellWidget* getCellWidget () const; + inline ControllerWidget* getControllerWidget (); + void setAnonNetSelectable ( bool ); + void select ( Occurrence& ); + void unselect ( Occurrence& ); + void unselectAll (); + inline void setLayerVisible ( const Name& layer, bool visible ); + void runScript ( QString scriptPath ); + virtual CellViewer* vcreate () const; + virtual std::string _getString () const; + public slots: + void doAction (); + void doGoto (); + void changeSelectionMode (); + void setShowSelection ( bool ); + void setState ( shared_ptr& ); + void removeHistory ( Cell* ); + void openHistoryCell (); + void openDesignBlob (); + void saveDesignBlob (); + void printDisplay (); + void print ( QPrinter* ); + void imageDisplay (); + void raiseToolInterrupt (); + void clearToolInterrupt (); + void runScriptWidget (); + void runStressScript (); + inline void emitCellAboutToChange (); + inline void emitCellChanged (); + inline void emitCellPreModificated (); + inline void emitCellPostModificated (); + signals: + void cellLoadedFromDisk ( Cell* ); + void showSelectionToggled ( bool ); + void stateChanged ( shared_ptr& ); + void redrawCellWidget (); + void cellPreModificated (); + void cellPostModificated (); + protected: + void createMenus (); + void refreshTitle (); + void refreshHistory (); + void rebuildHistory (); + private: + QString _getAbsWidgetPath ( const QString& relPath ) const; + QMenu* _getParentMenu ( const QString& ) const; + void _runScript ( QString scriptPath ); protected: static QString _prefixWPath; - CellObserver _cellObserver; + Observer _cellObserver; QString _applicationName; QAction* _openAction; QAction* _cellHistoryAction[CellHistorySize]; @@ -198,17 +200,17 @@ namespace Hurricane { // Inline Functions. - inline bool CellViewer::isToolInterrupted () const { return _toolInterrupt; } - inline CellObserver* CellViewer::getCellObserver () { return &_cellObserver; } - inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; } - inline const CellWidget* CellViewer::getCellWidget () const { return _cellWidget; } - inline ControllerWidget* CellViewer::getControllerWidget () { return _controller; } - inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; } - inline void CellViewer::setLayerVisible ( const Name& layer, bool visible ) { _cellWidget->setLayerVisible(layer,visible); } - inline void CellViewer::emitCellAboutToChange () { _flags |= InCellChange; emit cellPreModificated(); } - inline void CellViewer::emitCellChanged () { _flags &= ~InCellChange; emit cellPostModificated(); } - inline void CellViewer::emitCellPreModificated () { emit cellPreModificated(); } - inline void CellViewer::emitCellPostModificated () { emit cellPostModificated(); } + inline bool CellViewer::isToolInterrupted () const { return _toolInterrupt; } + inline Observer* CellViewer::getCellObserver () { return &_cellObserver; } + inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; } + inline const CellWidget* CellViewer::getCellWidget () const { return _cellWidget; } + inline ControllerWidget* CellViewer::getControllerWidget () { return _controller; } + inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; } + inline void CellViewer::setLayerVisible ( const Name& layer, bool visible ) { _cellWidget->setLayerVisible(layer,visible); } + inline void CellViewer::emitCellAboutToChange () { _flags |= InCellChange; emit cellPreModificated(); } + inline void CellViewer::emitCellChanged () { _flags &= ~InCellChange; emit cellPostModificated(); } + inline void CellViewer::emitCellPreModificated () { emit cellPreModificated(); } + inline void CellViewer::emitCellPostModificated () { emit cellPostModificated(); } inline void CellViewer::setEnableRedrawInterrupt ( bool state ) { _cellWidget->setEnableRedrawInterrupt(state); } diff --git a/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h b/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h index c611055d..dbc974ed 100644 --- a/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h +++ b/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h @@ -296,16 +296,9 @@ namespace Hurricane { class ControllerWidget : public QTabWidget { Q_OBJECT; - - public: - class GraphicsObserver : public Observer { - public: - inline GraphicsObserver ( ControllerWidget* ); - virtual void notify ( unsigned int flags ); - private: - GraphicsObserver ( const GraphicsObserver& ); - }; + public: + static void notify ( ControllerWidget*, unsigned int flags ); public: ControllerWidget ( QWidget* parent=NULL ); inline CellWidget* getCellWidget (); @@ -328,16 +321,16 @@ namespace Hurricane { void toggleShow (); protected: - GraphicsObserver _observer; - CellWidget* _cellWidget; - TabGraphics* _tabGraphics; - TabPalette* _tabPalette; - TabDisplayFilter* _tabDisplayFilter; - TabNetlist* _tabNetlist; - TabHierarchy* _tabHierarchy; - TabSelection* _tabSelection; - TabInspector* _tabInspector; - TabSettings* _tabSettings; + Observer _observer; + CellWidget* _cellWidget; + TabGraphics* _tabGraphics; + TabPalette* _tabPalette; + TabDisplayFilter* _tabDisplayFilter; + TabNetlist* _tabNetlist; + TabHierarchy* _tabHierarchy; + TabSelection* _tabSelection; + TabInspector* _tabInspector; + TabSettings* _tabSettings; }; @@ -351,11 +344,6 @@ namespace Hurricane { inline InspectorWidget* ControllerWidget::getInspectorWidget () { return _tabInspector->getInspectorWidget(); } inline TabSettings* ControllerWidget::getSettings () { return _tabSettings; } //inline int ControllerWidget::addSetting ( QWidget* page, const QString& label ) { return _tabSettings->addSetting(page,label); } - - - inline ControllerWidget::GraphicsObserver::GraphicsObserver ( ControllerWidget* owner ) - : Observer(owner) - { } } // End of Hurricane namespace.