From 529594618e9287e219b289251635422b2870075c Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 9 Jan 2009 15:18:26 +0000 Subject: [PATCH] * ./hurricane/src/hurricane : - New feature: support for breakpoints with a selectable stop level. See Breakpoint.h. Graphical popup automatically when Graphics is enabled. User can select what to do when a breakpoint is reached and valid through a callback mechanism. A disabled example is avalaible in GraphicKatabaticEngine.cpp. - Ergonomy : reverse the zooming direction of the mouse weel (some said it's like in MS Word...). - Bug: accept zoom when bottom right is below lower left (absolute value). --- hurricane/src/hurricane/Breakpoint.cpp | 131 ++++++++++++++++++ hurricane/src/hurricane/CMakeLists.txt | 2 + .../src/hurricane/hurricane/Breakpoint.h | 65 +++++++++ hurricane/src/hviewer/BreakpointWidget.cpp | 101 ++++++++++++++ hurricane/src/hviewer/CMakeLists.txt | 3 + hurricane/src/hviewer/CellViewer.qrc | 1 + hurricane/src/hviewer/CellWidget.cpp | 38 +++-- hurricane/src/hviewer/Graphics.cpp | 30 ++-- hurricane/src/hviewer/ZoomCommand.cpp | 6 +- .../hurricane/viewer/BreakpointWidget.h | 59 ++++++++ .../src/hviewer/hurricane/viewer/CellWidget.h | 14 +- .../src/hviewer/hurricane/viewer/Graphics.h | 85 ++++++------ 12 files changed, 456 insertions(+), 79 deletions(-) create mode 100644 hurricane/src/hurricane/Breakpoint.cpp create mode 100644 hurricane/src/hurricane/hurricane/Breakpoint.h create mode 100644 hurricane/src/hviewer/BreakpointWidget.cpp create mode 100644 hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h diff --git a/hurricane/src/hurricane/Breakpoint.cpp b/hurricane/src/hurricane/Breakpoint.cpp new file mode 100644 index 00000000..401d60ae --- /dev/null +++ b/hurricane/src/hurricane/Breakpoint.cpp @@ -0,0 +1,131 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// +// =================================================================== +// +// $Id$ +// +// x-----------------------------------------------------------------x +// | | +// | H U R R I C A N E | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul Chaput | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Module : "./Breakpoint.cpp" | +// | *************************************************************** | +// | U p d a t e s | +// | | +// x-----------------------------------------------------------------x + + +# include "hurricane/Breakpoint.h" + + +namespace { + + + using namespace std; + using namespace Hurricane; + + + bool simpleStopCb ( const string& message ) + { + cerr << "[STOP] " << message << endl; + + char answer = '?'; + while ( answer == '?' ) { + cerr << " Type to continue, to abort: (y) "; + cerr.flush (); + + cin >> answer; + switch ( answer ) { + case 'Y': + case 'y': answer = 'y'; break; + case 'N': + case 'n': answer = 'n'; break; + default: answer = '?'; + } + } + return (answer == 'y'); + } + + +} // End of anonymous namespace. + + +namespace Hurricane { + + +// ------------------------------------------------------------------- +// Class : "Hurricane::Breakpoint". + + + Breakpoint* Breakpoint::_singleton = NULL; + Breakpoint::StopCb_t* Breakpoint::_stopCb = NULL; + unsigned int Breakpoint::_stopLevel = 0; + + + Breakpoint::Breakpoint () + { } + + + Breakpoint::~Breakpoint () + { + delete _singleton; + } + + + Breakpoint* Breakpoint::get () + { + if ( !_singleton ) { + _singleton = new Breakpoint (); + if ( !_stopCb ) + _singleton->setStopCb ( simpleStopCb ); + } + + return _singleton; + } + + + void Breakpoint::setStopCb ( Breakpoint::StopCb_t* cb ) + { + cerr << "Breakpoint::setStopCb() - " << (void*)cb << endl; + _stopCb = cb; + } + + + bool Breakpoint::stop ( unsigned int level, const string message ) + { + return get()->_stop ( level, message ); + } + + + void Breakpoint::setStopLevel ( unsigned int level ) + { + _stopLevel = level; + } + + + unsigned int Breakpoint::getStopLevel () + { + return _stopLevel; + } + + + bool Breakpoint::_stop ( unsigned int level, const string& message ) + { + if ( _stopCb && ( level <= _stopLevel ) ) + return _stopCb ( message ); + + return false; + } + + + + +} // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/CMakeLists.txt b/hurricane/src/hurricane/CMakeLists.txt index 53ce6d6f..58cfb045 100644 --- a/hurricane/src/hurricane/CMakeLists.txt +++ b/hurricane/src/hurricane/CMakeLists.txt @@ -23,6 +23,7 @@ hurricane/Bug.h hurricane/Error.h hurricane/Exception.h + hurricane/Breakpoint.h hurricane/Filter.h hurricane/Go.h hurricane/Gos.h hurricane/ExtensionGo.h hurricane/ExtensionGos.h @@ -88,6 +89,7 @@ Exception.cpp Bug.cpp Error.cpp + Breakpoint.cpp DRCError.cpp Warning.cpp Interruption.cpp diff --git a/hurricane/src/hurricane/hurricane/Breakpoint.h b/hurricane/src/hurricane/hurricane/Breakpoint.h new file mode 100644 index 00000000..8c8fe92b --- /dev/null +++ b/hurricane/src/hurricane/hurricane/Breakpoint.h @@ -0,0 +1,65 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// +// =================================================================== +// +// $Id$ +// +// x-----------------------------------------------------------------x +// | | +// | H U R R I C A N E | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul Chaput | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./Breakpoint.h" | +// | *************************************************************** | +// | U p d a t e s | +// | | +// x-----------------------------------------------------------------x + + +# ifndef __HURRICANE_BREAKPOINT__ +# define __HURRICANE_BREAKPOINT__ + +#include "hurricane/Commons.h" + + +namespace Hurricane { + + + class Breakpoint { + + public: + typedef bool ( StopCb_t )( const string& ); + + public: + static Breakpoint* get (); + static void setStopCb ( StopCb_t* ); + static bool stop ( unsigned int, const string ); + static void setStopLevel ( unsigned int ); + static unsigned int getStopLevel (); + protected: + bool _stop ( unsigned int, const string& ); + + protected: + static Breakpoint* _singleton; + static StopCb_t* _stopCb; + static unsigned int _stopLevel; + + protected: + Breakpoint (); + Breakpoint ( const Breakpoint& ); + Breakpoint& operator= ( const Breakpoint& ); + ~Breakpoint (); + }; + + +} // End of Hurricane namespace. + + +# endif // __HURRICANE_BREAKPOINT__ diff --git a/hurricane/src/hviewer/BreakpointWidget.cpp b/hurricane/src/hviewer/BreakpointWidget.cpp new file mode 100644 index 00000000..ed82469a --- /dev/null +++ b/hurricane/src/hviewer/BreakpointWidget.cpp @@ -0,0 +1,101 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// +// =================================================================== +// +// $Id$ +// +// x-----------------------------------------------------------------x +// | | +// | C O R I O L I S | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Module : "./BreakpointWidget.cpp" | +// | *************************************************************** | +// | U p d a t e s | +// | | +// x-----------------------------------------------------------------x + + +#include +#include +#include +#include +#include + +#include "hurricane/Breakpoint.h" +#include "hurricane/viewer/BreakpointWidget.h" + + +namespace Hurricane { + + + BreakpointWidget::BreakpointWidget ( QWidget* parent ) + : QDialog (parent) + , _message (new QLabel()) + , _stopLevel(new QSpinBox()) + { + setModal ( true ); + setWindowTitle ( "Breakpoint" ); + setToolTip ( "Crush the Mush to continue..." ); + + _message->setTextFormat ( Qt::RichText ); + _message->setText ( "No Message Yet" ); + + QLabel* stopLabel = new QLabel (); + stopLabel->setText ( "Adjust Stop Level:" ); + + QPushButton* ok = new QPushButton (); + ok->setIcon ( QIcon(":/images/gnome-gmush.png") ); + ok->setFlat ( true ); + ok->setIconSize ( QSize(48,48) ); + + QFrame* vLine = new QFrame (); + vLine->setFrameShape ( QFrame::VLine ); + vLine->setFrameShadow ( QFrame::Sunken ); + + QGridLayout* layout = new QGridLayout (); + layout->addWidget ( ok , 0, 0, 2, 1, Qt::AlignVCenter ); + layout->addWidget ( vLine , 0, 1, 2, 1 ); + layout->addWidget ( _message , 0, 2 ); + layout->addWidget ( stopLabel , 1, 2 ); + layout->addWidget ( _stopLevel, 1, 3 ); + setLayout ( layout ); + + connect ( ok , SIGNAL(clicked()) , this, SLOT(accept()) ); + connect ( _stopLevel, SIGNAL(valueChanged(int)), this, SLOT(updateStopLevel(int)) ); + } + + + void BreakpointWidget::setMessage ( const QString& message ) + { + _message->setText ( message ); + } + + + void BreakpointWidget::setStopLevel ( int level ) + { + _stopLevel->setValue ( level ); + } + + + int BreakpointWidget::getStopLevel () const + { + return _stopLevel->value (); + } + + + void BreakpointWidget::updateStopLevel ( int value ) + { + unsigned int stopLevel = (value<0) ? 0 : value; + Breakpoint::setStopLevel ( stopLevel ); + } + + +} // End of Hurricane Namespace. diff --git a/hurricane/src/hviewer/CMakeLists.txt b/hurricane/src/hviewer/CMakeLists.txt index ec54b891..e7531dab 100644 --- a/hurricane/src/hviewer/CMakeLists.txt +++ b/hurricane/src/hviewer/CMakeLists.txt @@ -10,6 +10,7 @@ hurricane/viewer/PaletteExtensionGoItem.h hurricane/viewer/PaletteWidget.h hurricane/viewer/GraphicsWidget.h + hurricane/viewer/BreakpointWidget.h hurricane/viewer/DynamicLabel.h hurricane/viewer/MousePositionWidget.h hurricane/viewer/SelectCommand.h @@ -31,6 +32,7 @@ hurricane/viewer/ColorScale.h hurricane/viewer/Graphics.h hurricane/viewer/GraphicsWidget.h + hurricane/viewer/BreakpointWidget.h hurricane/viewer/Selector.h hurricane/viewer/Command.h hurricane/viewer/AreaCommand.h @@ -56,6 +58,7 @@ ColorScale.cpp Graphics.cpp GraphicsWidget.cpp + BreakpointWidget.cpp PaletteItem.cpp PaletteNamedItem.cpp PaletteLayerItem.cpp diff --git a/hurricane/src/hviewer/CellViewer.qrc b/hurricane/src/hviewer/CellViewer.qrc index 62427ecf..fb7e6985 100644 --- a/hurricane/src/hviewer/CellViewer.qrc +++ b/hurricane/src/hviewer/CellViewer.qrc @@ -9,5 +9,6 @@ images/gtk-go-forward-rtl.png images/gtk-go-forward-ltr.png images/swiss-knife.png + images/gnome-gmush.png diff --git a/hurricane/src/hviewer/CellWidget.cpp b/hurricane/src/hviewer/CellWidget.cpp index 6d079e00..3803b157 100644 --- a/hurricane/src/hviewer/CellWidget.cpp +++ b/hurricane/src/hviewer/CellWidget.cpp @@ -541,7 +541,7 @@ namespace Hurricane { , _cellWidget(widget) , _drawExtensionGo(NULL) , _goCount(0) - , _goExtensionCount(0) + , _extensionGoCount(0) , _instanceCount(0) { } @@ -633,7 +633,7 @@ namespace Hurricane { ) { if ( _drawExtensionGo ) { - _goExtensionCount++; + _extensionGoCount++; _drawExtensionGo ( widget, go, basicLayer, area, transformation ); } } @@ -1029,7 +1029,7 @@ namespace Hurricane { Box redrawBox = displayToDbuBox ( redrawArea ); _drawingQuery.resetGoCount (); - _drawingQuery.resetGoExtensionCount(); + _drawingQuery.resetExtensionGoCount(); _drawingQuery.resetInstanceCount(); _drawingQuery.setExtensionMask ( 0 ); _drawingQuery.setArea ( redrawBox ); @@ -1129,9 +1129,9 @@ namespace Hurricane { << " (" << setprecision(3) << (timer.getCombTime()/_drawingQuery.getGoCount()) << " s/go)"; else cerr << " 0 Gos"; - if ( _drawingQuery.getGoExtensionCount() ) - cerr << " " << _drawingQuery.getGoExtensionCount() - << " (" << setprecision(3) << (timer.getCombTime()/_drawingQuery.getGoExtensionCount()) << " s/ego)"; + if ( _drawingQuery.getExtensionGoCount() ) + cerr << " " << _drawingQuery.getExtensionGoCount() + << " (" << setprecision(3) << (timer.getCombTime()/_drawingQuery.getExtensionGoCount()) << " s/ego)"; else cerr << " 0 eGos"; if ( _drawingQuery.getInstanceCount() ) @@ -1751,23 +1751,21 @@ namespace Hurricane { QRect CellWidget::dbuToDisplayRect ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2, bool usePoint ) const { + int width, height; + if ( usePoint ) { - int width = dbuToDisplayX(x2) - dbuToDisplayX(x1); - int height = dbuToDisplayY(y1) - dbuToDisplayY(y2); - return QRect ( dbuToDisplayX(x1) - , dbuToDisplayY(y2) - , width?width:1 - , height?height:1 - ); + width = dbuToDisplayX(x2) - dbuToDisplayX(x1); + height = dbuToDisplayY(y1) - dbuToDisplayY(y2); } else { - int width = dbuToDisplayLength ( x2 - x1 ); - int height = dbuToDisplayLength ( y2 - y1 ); - return QRect ( dbuToDisplayX(x1) - , dbuToDisplayY(y2) - , width?width:1 - , height?height:1 - ); + width = dbuToDisplayLength ( x2 - x1 ); + height = dbuToDisplayLength ( y2 - y1 ); } + + return QRect ( dbuToDisplayX(x1) + , dbuToDisplayY(y2) + , width ? width : 1 + , height ? height : 1 + ); } diff --git a/hurricane/src/hviewer/Graphics.cpp b/hurricane/src/hviewer/Graphics.cpp index aa329a10..77da2c0e 100644 --- a/hurricane/src/hviewer/Graphics.cpp +++ b/hurricane/src/hviewer/Graphics.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved // // =================================================================== // @@ -25,15 +25,15 @@ # include -# include -# include -# include -# include +#include +#include +#include +#include -# include "hurricane/Name.h" +#include "hurricane/Name.h" -# include "hurricane/viewer/DisplayStyle.h" -# include "hurricane/viewer/Graphics.h" +#include "hurricane/viewer/DisplayStyle.h" +#include "hurricane/viewer/Graphics.h" @@ -104,6 +104,8 @@ namespace Hurricane { _styles[si]->qtAllocate (); _fireColorScale.qtAllocate (); + + Breakpoint::setStopCb ( Graphics::breakpointStopCb ); } @@ -271,6 +273,18 @@ namespace Hurricane { } + bool Graphics::breakpointStopCb ( const string& message ) + { + static BreakpointWidget* bpw = NULL; + + if ( !bpw ) + bpw = new BreakpointWidget (); + bpw->setMessage ( message.c_str() ); + + return ( bpw->exec() == QDialog::Accepted ); + } + + } // End of Hurricane namespace. diff --git a/hurricane/src/hviewer/ZoomCommand.cpp b/hurricane/src/hviewer/ZoomCommand.cpp index 4c5145e4..b9a79995 100644 --- a/hurricane/src/hviewer/ZoomCommand.cpp +++ b/hurricane/src/hviewer/ZoomCommand.cpp @@ -60,8 +60,8 @@ namespace Hurricane { bool ZoomCommand::keyPressEvent ( CellWidget* widget, QKeyEvent* event ) { switch ( event->key() ) { - case Qt::Key_Z: widget->setScale ( widget->getScale()*2.0 ); return true; - case Qt::Key_M: widget->setScale ( widget->getScale()/2.0 ); return true; + case Qt::Key_Z: widget->setScale ( widget->getScale()/2.0 ); return true; + case Qt::Key_M: widget->setScale ( widget->getScale()*2.0 ); return true; } return false; } @@ -89,7 +89,7 @@ namespace Hurricane { setDrawingEnabled ( false ); QRect zoomArea = QRect ( _startPoint, _stopPoint ); - if ( ( zoomArea.width() > 10 ) && ( zoomArea.height() > 10 ) ) + if ( ( abs(zoomArea.width()) > 10 ) && ( abs(zoomArea.height()) > 10 ) ) widget->reframe ( widget->screenToDbuBox(zoomArea) ); else { cerr << Warning("Rejecting too small zoom request.") << endl; diff --git a/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h b/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h new file mode 100644 index 00000000..adc2ca51 --- /dev/null +++ b/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h @@ -0,0 +1,59 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// +// =================================================================== +// +// $Id$ +// +// x-----------------------------------------------------------------x +// | | +// | C O R I O L I S | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Header : "./BreakpointWidget.h" | +// | *************************************************************** | +// | U p d a t e s | +// | | +// x-----------------------------------------------------------------x + + +#ifndef __HURRICANE_BREAKPOINT_WIDGET__ +#define __HURRICANE_BREAKPOINT_WIDGET__ + + +#include +class QLabel; +class QSpinBox; + + +namespace Hurricane { + + + class BreakpointWidget : public QDialog { + Q_OBJECT; + + public: + BreakpointWidget ( QWidget* parent=NULL); + void setMessage ( const QString& ); + int getStopLevel () const; + void setStopLevel ( int ); + public slots: + void updateStopLevel ( int ); + + private: + QLabel* _message; + QSpinBox* _stopLevel; + }; + + + +} // End of Hurricane namespace. + + +#endif // __HURRICANE_BREAKPOINT_WIDGET__ diff --git a/hurricane/src/hviewer/hurricane/viewer/CellWidget.h b/hurricane/src/hviewer/hurricane/viewer/CellWidget.h index 5c06b71b..f5d90333 100644 --- a/hurricane/src/hviewer/hurricane/viewer/CellWidget.h +++ b/hurricane/src/hviewer/hurricane/viewer/CellWidget.h @@ -386,10 +386,10 @@ namespace Hurricane { , const Transformation& transformation ); inline unsigned int getGoCount () const; - inline unsigned int getGoExtensionCount () const; + inline unsigned int getExtensionGoCount () const; inline unsigned int getInstanceCount () const; inline void resetGoCount (); - inline void resetGoExtensionCount (); + inline void resetExtensionGoCount (); inline void resetInstanceCount (); protected: @@ -398,7 +398,7 @@ namespace Hurricane { map > _drawExtensionGos; unsigned int _goCount; - unsigned int _goExtensionCount; + unsigned int _extensionGoCount; unsigned int _instanceCount; }; @@ -511,8 +511,8 @@ namespace Hurricane { { _goCount = 0; } - inline void CellWidget::DrawingQuery::resetGoExtensionCount () - { _goExtensionCount = 0; } + inline void CellWidget::DrawingQuery::resetExtensionGoCount () + { _extensionGoCount = 0; } inline void CellWidget::DrawingQuery::resetInstanceCount () @@ -523,8 +523,8 @@ namespace Hurricane { { return _goCount; } - inline unsigned int CellWidget::DrawingQuery::getGoExtensionCount () const - { return _goExtensionCount; } + inline unsigned int CellWidget::DrawingQuery::getExtensionGoCount () const + { return _extensionGoCount; } inline unsigned int CellWidget::DrawingQuery::getInstanceCount () const diff --git a/hurricane/src/hviewer/hurricane/viewer/Graphics.h b/hurricane/src/hviewer/hurricane/viewer/Graphics.h index 7bafd262..a53d33b5 100644 --- a/hurricane/src/hviewer/hurricane/viewer/Graphics.h +++ b/hurricane/src/hviewer/hurricane/viewer/Graphics.h @@ -30,8 +30,10 @@ #include #include +#include "hurricane/Breakpoint.h" #include "hurricane/viewer/DisplayStyle.h" #include "hurricane/viewer/ColorScale.h" +#include "hurricane/viewer/BreakpointWidget.h" #include @@ -52,27 +54,28 @@ namespace Hurricane { public: // Accessors. - static Graphics* getGraphics (); - static bool isEnabled (); - static const QFont getFixedFont ( int weight=QFont::Normal, bool italic=false, bool underline=false ); - static const QFont getNormalFont ( bool bold=false, bool italic=false, bool underline=false ); - static const Name& getGroup ( const Name& key ); - static QColor getColor ( const Name& key, int darkening=100 ); - static QPen getPen ( const Name& key, int darkening=100 ); - static QBrush getBrush ( const Name& key, int darkening=100 ); - static const string& getPattern ( const Name& key ); - static float getThreshold ( const Name& key ); - static int getDarkening (); - static const ColorScale& getColorScale ( ColorScale::ScaleType ); + static Graphics* getGraphics (); + static bool isEnabled (); + static const QFont getFixedFont ( int weight=QFont::Normal, bool italic=false, bool underline=false ); + static const QFont getNormalFont ( bool bold=false, bool italic=false, bool underline=false ); + static const Name& getGroup ( const Name& key ); + static QColor getColor ( const Name& key, int darkening=100 ); + static QPen getPen ( const Name& key, int darkening=100 ); + static QBrush getBrush ( const Name& key, int darkening=100 ); + static const string& getPattern ( const Name& key ); + static float getThreshold ( const Name& key ); + static int getDarkening (); + static const ColorScale& getColorScale ( ColorScale::ScaleType ); + static bool breakpointStopCb ( const string& message ); // Modifiers. - static void addStyle ( DisplayStyle* displayStyle ); - static void setStyle ( const Name& key ); - static void setStyle ( size_t id ); - static DisplayStyle* getStyle ( const Name& key ); - static DisplayStyle* getStyle (); - static const vector& getStyles (); - static void enable (); + static void addStyle ( DisplayStyle* displayStyle ); + static void setStyle ( const Name& key ); + static void setStyle ( size_t id ); + static DisplayStyle* getStyle ( const Name& key ); + static DisplayStyle* getStyle (); + static const vector& getStyles (); + static void enable (); // Internals - Attributes. protected: @@ -83,28 +86,28 @@ namespace Hurricane { bool _qtEnabled; // Internals - Constructors & Destructors. - Graphics (); - Graphics ( const Graphics& ); - Graphics& operator= ( const Graphics& ); - ~Graphics (); - - // Internals - Methods. - size_t _findStyle ( const Name& key ) const; - void _addStyle ( DisplayStyle* displayStyle ); - void _setStyle ( const Name& key ); - void _setStyle ( size_t id ); - DisplayStyle* _getStyle ( const Name& key ); - DisplayStyle* _getStyle () const; - inline const vector& _getStyles () const; - inline const Name& _getGroup ( const Name& key ) const; - inline QColor _getColor ( const Name& key, int darkening ) const; - inline QPen _getPen ( const Name& key, int darkening ) const; - inline QBrush _getBrush ( const Name& key, int darkening ) const; - inline const string& _getPattern ( const Name& key ) const; - inline float _getThreshold ( const Name& key ) const; - inline int _getDarkening () const; - inline const ColorScale& _getColorScale ( ColorScale::ScaleType ) const; - inline void _enable (); + Graphics (); + Graphics ( const Graphics& ); + Graphics& operator= ( const Graphics& ); + ~Graphics (); + + // Internals - Methods. + size_t _findStyle ( const Name& key ) const; + void _addStyle ( DisplayStyle* displayStyle ); + void _setStyle ( const Name& key ); + void _setStyle ( size_t id ); + DisplayStyle* _getStyle ( const Name& key ); + DisplayStyle* _getStyle () const; + inline const vector& _getStyles () const; + inline const Name& _getGroup ( const Name& key ) const; + inline QColor _getColor ( const Name& key, int darkening ) const; + inline QPen _getPen ( const Name& key, int darkening ) const; + inline QBrush _getBrush ( const Name& key, int darkening ) const; + inline const string& _getPattern ( const Name& key ) const; + inline float _getThreshold ( const Name& key ) const; + inline int _getDarkening () const; + inline const ColorScale& _getColorScale ( ColorScale::ScaleType ) const; + inline void _enable (); };