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.
This commit is contained in:
Jean-Paul Chaput 2016-06-03 17:19:46 +02:00
parent fac3474d55
commit 747027f23a
10 changed files with 232 additions and 192 deletions

View File

@ -63,10 +63,10 @@ stylesTable = \
# Group: MIM6. # Group: MIM6.
, (Group , 'MIM6') , (Group , 'MIM6')
, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale })
, (Drawing, 'botmim6', { 'color':'Aqua' , 'pattern':'light_antihash0.8', '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, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale })
, (Drawing, 'alucap' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale })
# Group: Blockages. # Group: Blockages.
, (Group , 'Blockages') , (Group , 'Blockages')
@ -169,10 +169,10 @@ stylesTable = \
# MIM6. # MIM6.
, (Group , 'MIM6') , (Group , 'MIM6')
, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.32' , 'threshold':0.80*scale }) #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.32' , 'threshold':0.80*scale })
, (Drawing, 'botmim6', { 'color':'Aqua' , 'pattern':'light_antihash0.8' , '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, 'padopen', { 'color':'LightPink', 'pattern':'light_antihash1.8' , 'threshold':0.80*scale })
, (Drawing, 'alucap' , { 'color':'Green' , 'pattern':'light_antihash2.8' , 'threshold':0.80*scale }) , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8' , 'threshold':0.80*scale })
# Blockages. # Blockages.
, (Group , 'Blockages') , (Group , 'Blockages')
@ -345,10 +345,10 @@ stylesTable = \
# Group: MIM6. # Group: MIM6.
, (Group , 'MIM6') , (Group , 'MIM6')
, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale })
, (Drawing, 'botmim6', { 'color':'Aqua' , 'pattern':'light_antihash0.8', '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, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale })
, (Drawing, 'alucap' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale })
# Group: Blockages. # Group: Blockages.
, (Group , 'Blockages') , (Group , 'Blockages')

View File

@ -53,10 +53,10 @@ realLayersTable = \
, ('metal7' , BasicLayer.Material.metal ) , ('metal7' , BasicLayer.Material.metal )
, ('cut7' , BasicLayer.Material.cut ) , ('cut7' , BasicLayer.Material.cut )
, ('metal8' , BasicLayer.Material.metal ) , ('metal8' , BasicLayer.Material.metal )
, ('topmim6' , BasicLayer.Material.other ) # For Capacitances & Pads. #, ('topmim6' , BasicLayer.Material.other ) # For Capacitances & Pads.
, ('botmim6' , BasicLayer.Material.other ) #, ('metbot' , BasicLayer.Material.other )
, ('padopen' , BasicLayer.Material.other ) #, ('padopen' , BasicLayer.Material.other )
, ('alucap' , BasicLayer.Material.other ) #, ('alucap' , BasicLayer.Material.other )
, ('text.cell' , BasicLayer.Material.other ) # Misc. non-physical layers. , ('text.cell' , BasicLayer.Material.other ) # Misc. non-physical layers.
, ('text.instance', BasicLayer.Material.other ) # Used by the software for visualization , ('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. # This is a simple list of Real & Symbolic layers.
workingLayersTable = \ workingLayersTable = \
[ 'cut0', 'cut1' , 'cut2' , 'cut3' , 'cut4' , 'cut5' [ 'cut0', 'cut1' , 'cut2' , 'cut3' , 'cut4' , 'cut5' , 'cut6'
, 'POLY', 'POLY2' , 'POLY', 'POLY2'
, 'METAL1' , 'METAL2' , 'METAL3' , 'METAL4' , 'METAL5' , 'METAL6' , 'METAL7' , 'METAL8' , 'METAL1' , 'METAL2' , 'METAL3' , 'METAL4' , 'METAL5' , 'METAL6' , 'METAL7' , 'METAL8'
, 'BLOCKAGE1', 'BLOCKAGE2', 'BLOCKAGE3', 'BLOCKAGE4', 'BLOCKAGE5', 'BLOCKAGE6', 'BLOCKAGE7', 'BLOCKAGE8' , 'BLOCKAGE1', 'BLOCKAGE2', 'BLOCKAGE3', 'BLOCKAGE4', 'BLOCKAGE5', 'BLOCKAGE6', 'BLOCKAGE7', 'BLOCKAGE8'

View File

@ -43,9 +43,10 @@ namespace CRL {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "FrameworkObserver". // 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 if (flags & (AllianceFramework::AddedLibrary
|AllianceFramework::RemovedLibrary)) { |AllianceFramework::RemovedLibrary)) {
manager->getLibrariesWidget()->update(); manager->getLibrariesWidget()->update();

View File

@ -43,29 +43,14 @@ namespace CRL {
class LibraryManager; class LibraryManager;
// -------------------------------------------------------------------
// Class : "FrameworkObserver".
class FrameworkObserver : public Observer<LibraryManager> {
public:
inline FrameworkObserver ( LibraryManager* );
virtual void notify ( unsigned int flags );
private:
FrameworkObserver ( const FrameworkObserver& );
};
inline FrameworkObserver::FrameworkObserver ( LibraryManager* owner )
: Observer<LibraryManager>(owner)
{ }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "LibraryManager". // Class : "LibraryManager".
class LibraryManager : public QWidget { class LibraryManager : public QWidget {
Q_OBJECT; Q_OBJECT;
public:
static void notify ( LibraryManager*, unsigned int flags );
public: public:
LibraryManager ( QWidget* parent=NULL ); LibraryManager ( QWidget* parent=NULL );
~LibraryManager (); ~LibraryManager ();
@ -78,12 +63,12 @@ namespace CRL {
CellViewer* openCell ( Cell*, unsigned int flags ); CellViewer* openCell ( Cell*, unsigned int flags );
void updateLibrary ( Cell* ); void updateLibrary ( Cell* );
private: private:
FrameworkObserver _frameworkObserver; Observer<LibraryManager> _frameworkObserver;
LibrariesWidget* _librariesWidget; LibrariesWidget* _librariesWidget;
CellsWidget* _cellsWidget; CellsWidget* _cellsWidget;
ViewsWidget* _viewsWidget; ViewsWidget* _viewsWidget;
CellViewer* _cellViewer; CellViewer* _cellViewer;
QLabel* _libPath; QLabel* _libPath;
}; };

View File

@ -30,44 +30,44 @@ namespace Hurricane {
class BaseObserver { class BaseObserver {
public: public:
virtual void notify ( unsigned int flags ); virtual void notify ( unsigned int flags );
template< typename T >
inline T* as ();
}; };
template< typename T> template< typename OwnerT>
inline T* BaseObserver::as () { return dynamic_cast<T*>(this); }
template< typename T>
class Observer : public BaseObserver { class Observer : public BaseObserver {
public: public:
inline Observer ( const T* owner ); inline Observer ( const OwnerT* owner );
inline T* getOwner () const; inline OwnerT* getOwner () const;
virtual void notify ( unsigned int flags );
private: private:
Observer ( const Observer& ); Observer ( const Observer& );
Observer& operator= ( const Observer& );
private: private:
static int _ownerOffset; static int _ownerOffset;
}; };
template< typename T> template< typename OwnerT>
int Observer<T>::_ownerOffset = -1; int Observer<OwnerT>::_ownerOffset = -1;
template< typename T> template< typename OwnerT>
inline Observer<T>::Observer ( const T* owner ) inline Observer<OwnerT>::Observer ( const OwnerT* owner )
: BaseObserver() : BaseObserver()
{ {
if (owner == NULL) 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) if (_ownerOffset < 0) _ownerOffset = (unsigned long)this - (unsigned long)owner;
_ownerOffset = (unsigned long)this - (unsigned long)owner;
} }
template< typename T> template< typename OwnerT>
inline T* Observer<T>::getOwner () const { return reinterpret_cast<T*>((unsigned long)this - _ownerOffset); } inline OwnerT* Observer<OwnerT>::getOwner () const
{ return reinterpret_cast<OwnerT*>((unsigned long)this - _ownerOffset); }
template< typename OwnerT>
void Observer<OwnerT>::notify ( unsigned int flags )
{ OwnerT::notify( getOwner(), flags ); }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -104,6 +104,65 @@ namespace Hurricane {
} }
// -------------------------------------------------------------------
// Class : "StaticObservable".
template<size_t slotsNb>
class StaticObservable {
public:
inline StaticObservable ();
inline const std::array<BaseObserver*,slotsNb>&
getObservers () const;
inline void setObserver ( size_t slot, BaseObserver* );
inline void notify ( unsigned int flags );
template<typename OwnerT>
inline OwnerT* getObserver ( size_t slot ) const;
private:
StaticObservable ( const StaticObservable& );
StaticObservable& operator= ( const StaticObservable& );
private:
std::array<BaseObserver*,slotsNb> _observers;
};
template<size_t slotsNb>
inline StaticObservable<slotsNb>::StaticObservable ()
: _observers()
{ }
template<size_t slotsNb>
inline const std::array<BaseObserver*,slotsNb>& StaticObservable<slotsNb>::getObservers () const
{ return _observers; }
template<size_t slotsNb>
inline void StaticObservable<slotsNb>::notify ( unsigned int flags )
{
for ( BaseObserver* iobserver : _observers ) {
if (iobserver) iobserver->notify( flags );
}
}
template<size_t slotsNb>
inline void StaticObservable<slotsNb>::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<size_t slotsNb>
template<typename OwnerT>
inline OwnerT* StaticObservable<slotsNb>::getObserver ( size_t slot ) const
{ return (slot < _observers.size()) ? static_cast< Observer<OwnerT>* >(_observers[slot])->getOwner() : NULL; }
} // Hurricane namespace. } // Hurricane namespace.
#endif #endif

View File

@ -62,9 +62,12 @@ namespace Hurricane {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "CellObserver". // 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 switch ( flags & (Cell::Flags::CellAboutToChange
|Cell::Flags::CellChanged |Cell::Flags::CellChanged
|Cell::Flags::CellDestroyed) ) { |Cell::Flags::CellDestroyed) ) {

View File

@ -1042,7 +1042,7 @@ namespace Hurricane {
// Class : "Hurricane::CellWidget". // Class : "Hurricane::CellWidget".
int CellWidget::_initialSide = 250; int CellWidget::_initialSide = 500;
CellWidget::CellWidget ( QWidget* parent ) CellWidget::CellWidget ( QWidget* parent )

View File

@ -661,9 +661,11 @@ namespace Hurricane {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "ControllerWidget::GraphicsObserver". // 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) { if (flags & Graphics::ChangedDisplayStyles) {
controller->graphicsUpdated(); controller->graphicsUpdated();
} }

View File

@ -57,18 +57,18 @@ namespace Hurricane {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "CellObserver". // Class : "CellObserver".
class CellObserver : public Observer<CellViewer> { // class CellObserver : public Observer<CellViewer> {
public: // public:
inline CellObserver ( CellViewer* ); // inline CellObserver ( CellViewer* );
virtual void notify ( unsigned int flags ); // virtual void notify ( unsigned int flags );
private: // private:
CellObserver ( const CellObserver& ); // CellObserver ( const CellObserver& );
}; // };
inline CellObserver::CellObserver ( CellViewer* owner ) // inline CellObserver::CellObserver ( CellViewer* owner )
: Observer<CellViewer>(owner) // : Observer<CellViewer>(owner)
{ } // { }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -86,90 +86,92 @@ namespace Hurricane {
typedef std::map< const QString, boost::any > ActionLut; typedef std::map< const QString, boost::any > ActionLut;
typedef bool (QWidget::* SlotMethod)(); typedef bool (QWidget::* SlotMethod)();
public: public:
CellViewer ( QWidget* parent=NULL ); static void notify ( CellViewer*, unsigned int flags );
virtual ~CellViewer (); public:
inline bool isToolInterrupted () const; CellViewer ( QWidget* parent=NULL );
QMenu* createDebugMenu (); virtual ~CellViewer ();
bool hasMenu ( const QString& path ) const; inline bool isToolInterrupted () const;
bool hasMenuAction ( const QString& path ) const; QMenu* createDebugMenu ();
QMenu* addMenu ( const QString& path bool hasMenu ( const QString& path ) const;
, std::string text bool hasMenuAction ( const QString& path ) const;
, unsigned int flags=NoFlags QMenu* addMenu ( const QString& path
); , std::string text
bool addToMenu ( const QString& path ); , unsigned int flags=NoFlags
QAction* addToMenu ( const QString& path );
, std::string text bool addToMenu ( const QString& path );
, std::string textTip QAction* addToMenu ( const QString& path
, std::function< void() > , std::string text
, QIcon icon=QIcon() ); , std::string textTip
QAction* addToMenu ( const QString& path , std::function< void() >
, std::string text , QIcon icon=QIcon() );
, std::string textTip QAction* addToMenu ( const QString& path
, std::string scriptPath ); , std::string text
QAction* addToMenu ( QString path , std::string textTip
, QString text , std::string scriptPath );
, QString textTip QAction* addToMenu ( QString path
, const QKeySequence& shortCut , QString text
, QIcon icon =QIcon()); , QString textTip
inline void setEnableRedrawInterrupt ( bool ); , const QKeySequence& shortCut
inline void setApplicationName ( const QString& ); , QIcon icon =QIcon());
inline CellObserver* getCellObserver (); inline void setEnableRedrawInterrupt ( bool );
Cell* getCell () const; inline void setApplicationName ( const QString& );
virtual void setCell ( Cell* ); inline Observer<CellViewer>* getCellObserver ();
void renameCell ( const char* ); Cell* getCell () const;
virtual Cell* getCellFromDb ( const char* ); virtual void setCell ( Cell* );
inline CellWidget* getCellWidget (); void renameCell ( const char* );
inline const CellWidget* getCellWidget () const; virtual Cell* getCellFromDb ( const char* );
inline ControllerWidget* getControllerWidget (); inline CellWidget* getCellWidget ();
void setAnonNetSelectable ( bool ); inline const CellWidget* getCellWidget () const;
void select ( Occurrence& ); inline ControllerWidget* getControllerWidget ();
void unselect ( Occurrence& ); void setAnonNetSelectable ( bool );
void unselectAll (); void select ( Occurrence& );
inline void setLayerVisible ( const Name& layer, bool visible ); void unselect ( Occurrence& );
void runScript ( QString scriptPath ); void unselectAll ();
virtual CellViewer* vcreate () const; inline void setLayerVisible ( const Name& layer, bool visible );
virtual std::string _getString () const; void runScript ( QString scriptPath );
public slots: virtual CellViewer* vcreate () const;
void doAction (); virtual std::string _getString () const;
void doGoto (); public slots:
void changeSelectionMode (); void doAction ();
void setShowSelection ( bool ); void doGoto ();
void setState ( shared_ptr<CellWidget::State>& ); void changeSelectionMode ();
void removeHistory ( Cell* ); void setShowSelection ( bool );
void openHistoryCell (); void setState ( shared_ptr<CellWidget::State>& );
void openDesignBlob (); void removeHistory ( Cell* );
void saveDesignBlob (); void openHistoryCell ();
void printDisplay (); void openDesignBlob ();
void print ( QPrinter* ); void saveDesignBlob ();
void imageDisplay (); void printDisplay ();
void raiseToolInterrupt (); void print ( QPrinter* );
void clearToolInterrupt (); void imageDisplay ();
void runScriptWidget (); void raiseToolInterrupt ();
void runStressScript (); void clearToolInterrupt ();
inline void emitCellAboutToChange (); void runScriptWidget ();
inline void emitCellChanged (); void runStressScript ();
inline void emitCellPreModificated (); inline void emitCellAboutToChange ();
inline void emitCellPostModificated (); inline void emitCellChanged ();
signals: inline void emitCellPreModificated ();
void cellLoadedFromDisk ( Cell* ); inline void emitCellPostModificated ();
void showSelectionToggled ( bool ); signals:
void stateChanged ( shared_ptr<CellWidget::State>& ); void cellLoadedFromDisk ( Cell* );
void redrawCellWidget (); void showSelectionToggled ( bool );
void cellPreModificated (); void stateChanged ( shared_ptr<CellWidget::State>& );
void cellPostModificated (); void redrawCellWidget ();
protected: void cellPreModificated ();
void createMenus (); void cellPostModificated ();
void refreshTitle (); protected:
void refreshHistory (); void createMenus ();
void rebuildHistory (); void refreshTitle ();
private: void refreshHistory ();
QString _getAbsWidgetPath ( const QString& relPath ) const; void rebuildHistory ();
QMenu* _getParentMenu ( const QString& ) const; private:
void _runScript ( QString scriptPath ); QString _getAbsWidgetPath ( const QString& relPath ) const;
QMenu* _getParentMenu ( const QString& ) const;
void _runScript ( QString scriptPath );
protected: protected:
static QString _prefixWPath; static QString _prefixWPath;
CellObserver _cellObserver; Observer<CellViewer> _cellObserver;
QString _applicationName; QString _applicationName;
QAction* _openAction; QAction* _openAction;
QAction* _cellHistoryAction[CellHistorySize]; QAction* _cellHistoryAction[CellHistorySize];
@ -198,17 +200,17 @@ namespace Hurricane {
// Inline Functions. // Inline Functions.
inline bool CellViewer::isToolInterrupted () const { return _toolInterrupt; } inline bool CellViewer::isToolInterrupted () const { return _toolInterrupt; }
inline CellObserver* CellViewer::getCellObserver () { return &_cellObserver; } inline Observer<CellViewer>* CellViewer::getCellObserver () { return &_cellObserver; }
inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; } inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; }
inline const CellWidget* CellViewer::getCellWidget () const { return _cellWidget; } inline const CellWidget* CellViewer::getCellWidget () const { return _cellWidget; }
inline ControllerWidget* CellViewer::getControllerWidget () { return _controller; } inline ControllerWidget* CellViewer::getControllerWidget () { return _controller; }
inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; } 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::setLayerVisible ( const Name& layer, bool visible ) { _cellWidget->setLayerVisible(layer,visible); }
inline void CellViewer::emitCellAboutToChange () { _flags |= InCellChange; emit cellPreModificated(); } inline void CellViewer::emitCellAboutToChange () { _flags |= InCellChange; emit cellPreModificated(); }
inline void CellViewer::emitCellChanged () { _flags &= ~InCellChange; emit cellPostModificated(); } inline void CellViewer::emitCellChanged () { _flags &= ~InCellChange; emit cellPostModificated(); }
inline void CellViewer::emitCellPreModificated () { emit cellPreModificated(); } inline void CellViewer::emitCellPreModificated () { emit cellPreModificated(); }
inline void CellViewer::emitCellPostModificated () { emit cellPostModificated(); } inline void CellViewer::emitCellPostModificated () { emit cellPostModificated(); }
inline void CellViewer::setEnableRedrawInterrupt ( bool state ) inline void CellViewer::setEnableRedrawInterrupt ( bool state )
{ _cellWidget->setEnableRedrawInterrupt(state); } { _cellWidget->setEnableRedrawInterrupt(state); }

View File

@ -296,16 +296,9 @@ namespace Hurricane {
class ControllerWidget : public QTabWidget { class ControllerWidget : public QTabWidget {
Q_OBJECT; Q_OBJECT;
public:
class GraphicsObserver : public Observer<ControllerWidget> {
public:
inline GraphicsObserver ( ControllerWidget* );
virtual void notify ( unsigned int flags );
private:
GraphicsObserver ( const GraphicsObserver& );
};
public:
static void notify ( ControllerWidget*, unsigned int flags );
public: public:
ControllerWidget ( QWidget* parent=NULL ); ControllerWidget ( QWidget* parent=NULL );
inline CellWidget* getCellWidget (); inline CellWidget* getCellWidget ();
@ -328,16 +321,16 @@ namespace Hurricane {
void toggleShow (); void toggleShow ();
protected: protected:
GraphicsObserver _observer; Observer<ControllerWidget> _observer;
CellWidget* _cellWidget; CellWidget* _cellWidget;
TabGraphics* _tabGraphics; TabGraphics* _tabGraphics;
TabPalette* _tabPalette; TabPalette* _tabPalette;
TabDisplayFilter* _tabDisplayFilter; TabDisplayFilter* _tabDisplayFilter;
TabNetlist* _tabNetlist; TabNetlist* _tabNetlist;
TabHierarchy* _tabHierarchy; TabHierarchy* _tabHierarchy;
TabSelection* _tabSelection; TabSelection* _tabSelection;
TabInspector* _tabInspector; TabInspector* _tabInspector;
TabSettings* _tabSettings; TabSettings* _tabSettings;
}; };
@ -351,11 +344,6 @@ namespace Hurricane {
inline InspectorWidget* ControllerWidget::getInspectorWidget () { return _tabInspector->getInspectorWidget(); } inline InspectorWidget* ControllerWidget::getInspectorWidget () { return _tabInspector->getInspectorWidget(); }
inline TabSettings* ControllerWidget::getSettings () { return _tabSettings; } inline TabSettings* ControllerWidget::getSettings () { return _tabSettings; }
//inline int ControllerWidget::addSetting ( QWidget* page, const QString& label ) { return _tabSettings->addSetting(page,label); } //inline int ControllerWidget::addSetting ( QWidget* page, const QString& label ) { return _tabSettings->addSetting(page,label); }
inline ControllerWidget::GraphicsObserver::GraphicsObserver ( ControllerWidget* owner )
: Observer<ControllerWidget>(owner)
{ }
} // End of Hurricane namespace. } // End of Hurricane namespace.