* ./hurricane/src/hviewer :

- Bug: Bad detection of libraries in HURRICANE_CHECK_LIBRARY macro.
    - New feature : add a "selectable" characteric on drawable objects. Allows
        to selectively select objects through dragging. Note that it's implemented
        in term of BasicLayer & ExtensionGo. If an object (Component) has a Layer
        composed of more than one BasicLayer it will become selectable as soon as
        one of it's BasicLayer is selectable.
This commit is contained in:
Jean-Paul Chaput 2008-12-12 13:28:19 +00:00
parent a23a682c64
commit 8845533c25
15 changed files with 304 additions and 107 deletions

View File

@ -30,21 +30,26 @@ MACRO(SET_LIBRARIES_PATH configname library)
ENDIF(NOT ${library}_INCLUDE_PATH)
ENDMACRO ( SET_LIBRARIES_PATH )
MACRO(HURRICANE_CHECK_LIBRARIES package)
IF(${package}_FOUND OR ${package}_STATIC_FOUND)
IF(NOT ${package}_FIND_QUIETLY)
IF(${package}_FOUND)
MESSAGE(STATUS "Found ${package} : ${${package}_LIBRARIES}")
ENDIF(${package}_FOUND)
IF(${package}_STATIC_FOUND)
MESSAGE(STATUS "Found ${package} (static): ${${package}_STATIC_LIBRARIES}")
ENDIF(${package}_STATIC_FOUND)
ENDIF(NOT ${package}_FIND_QUIETLY)
ELSE(${package}_FOUND OR ${package}_STATIC_FOUND)
IF(${package}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${package} was not found. ${${package}_DIR_MESSAGE}")
ENDIF(${package}_FIND_REQUIRED)
ENDIF(${package}_FOUND OR ${package}_STATIC_FOUND)
MACRO(HURRICANE_CHECK_LIBRARIES)
IF(ARGC LESS 2)
SET(REQUIRED ${argv0}_FIND_REQUIRED)
ELSE(ARGC LESS 2)
SET(REQUIRED ${argv1})
ENDIF(ARGC LESS 2)
IF(${argv0}_FOUND OR ${argv0}_STATIC_FOUND)
IF(NOT ${argv0}_FIND_QUIETLY)
IF(${argv0}_FOUND)
MESSAGE(STATUS "Found ${argv0} : ${${argv0}_LIBRARIES}")
ENDIF(${argv0}_FOUND)
IF(${argv0}_STATIC_FOUND)
MESSAGE(STATUS "Found ${argv0} (static): ${${argv0}_STATIC_LIBRARIES}")
ENDIF(${argv0}_STATIC_FOUND)
ENDIF(NOT ${argv0}_FIND_QUIETLY)
ELSE(${argv0}_FOUND OR ${argv0}_STATIC_FOUND)
IF(REQUIRED)
MESSAGE(FATAL_ERROR "${argv0} was not found. ${${argv0}_DIR_MESSAGE}")
ENDIF(REQUIRED)
ENDIF(${argv0}_FOUND OR ${argv0}_STATIC_FOUND)
ENDMACRO(HURRICANE_CHECK_LIBRARIES)
@ -87,15 +92,15 @@ IF(UNIX)
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
)
FIND_PATH(HURRICANE_GRAPHICAL_INCLUDE_PATH
NAMES hurricane/viewer/CellViewer.h hurricane/viewer/HInspectorWidget.h
FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH
NAMES hurricane/viewer/CellWidget.h
PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES include
# Help the user find it if we cannot.
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
)
FIND_LIBRARY(HURRICANE_GRAPHICAL_LIBRARY_PATH
FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH
NAMES hviewer
PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES lib
@ -103,7 +108,7 @@ IF(UNIX)
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
)
FIND_LIBRARY(HURRICANE_GRAPHICAL_STATIC_LIBRARY_PATH
FIND_LIBRARY(HURRICANE_VIEWER_STATIC_LIBRARY_PATH
NAMES hviewer-static
PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES lib
@ -131,6 +136,8 @@ IF(UNIX)
SET_LIBRARIES_PATH(HURRICANE_GRAPHICAL HURRICANE_VIEWER)
SET_LIBRARIES_PATH(HURRICANE_PYTHON HURRICANE_PYTHON)
HURRICANE_CHECK_LIBRARIES(HURRICANE)
HURRICANE_CHECK_LIBRARIES(HURRICANE )
HURRICANE_CHECK_LIBRARIES(HURRICANE_GRAPHICAL ${HURRICANE_FIND_REQUIRED})
HURRICANE_CHECK_LIBRARIES(HURRICANE_PYTHON ${HURRICANE_FIND_REQUIRED})
ENDIF(UNIX)

View File

@ -7,6 +7,7 @@
set ( mocincludes hurricane/viewer/PaletteItem.h
hurricane/viewer/PaletteNamedItem.h
hurricane/viewer/PaletteLayerItem.h
hurricane/viewer/PaletteExtensionGoItem.h
hurricane/viewer/PaletteWidget.h
hurricane/viewer/GraphicsWidget.h
hurricane/viewer/DynamicLabel.h
@ -59,6 +60,7 @@
PaletteItem.cpp
PaletteNamedItem.cpp
PaletteLayerItem.cpp
PaletteExtensionGoItem.cpp
PaletteWidget.cpp
DynamicLabel.cpp
MousePositionWidget.cpp

View File

@ -41,6 +41,7 @@
#include "hurricane/Contact.h"
#include "hurricane/Pad.h"
#include "hurricane/RoutingPad.h"
#include "hurricane/ExtensionGo.h"
#include "hurricane/viewer/Graphics.h"
#include "hurricane/viewer/PaletteItem.h"
@ -55,6 +56,75 @@
namespace Hurricane {
// -------------------------------------------------------------------
// Collections.
typedef Hurricane::Filter<Occurrence> OccurrenceHF;
typedef Hurricane::Locator<Occurrence> OccurrenceHL;
typedef Hurricane::Collection<Occurrence> OccurrenceHC;
// -------------------------------------------------------------------
// Class : "Occurrences_IsSelectable".
class Occurrences_IsSelectable : public OccurrenceHF {
public:
inline Occurrences_IsSelectable ( const CellWidget* );
inline Occurrences_IsSelectable ( const Occurrences_IsSelectable& );
virtual OccurrenceHF* getClone () const;
virtual bool accept ( Occurrence ) const;
virtual string _getString () const;
private:
const CellWidget* _cellWidget;
};
inline Occurrences_IsSelectable::Occurrences_IsSelectable ( const CellWidget* widget )
: OccurrenceHF()
, _cellWidget(widget)
{ }
inline Occurrences_IsSelectable::Occurrences_IsSelectable ( const Occurrences_IsSelectable& rhs )
: OccurrenceHF()
, _cellWidget(rhs._cellWidget)
{ }
OccurrenceHF* Occurrences_IsSelectable::getClone () const
{
return new Occurrences_IsSelectable(_cellWidget);
}
bool Occurrences_IsSelectable::accept ( Occurrence occurrence ) const
{
Entity* entity = occurrence.getEntity();
if ( !entity ) return false;
ExtensionGo* eGo = dynamic_cast<ExtensionGo*>(entity);
if ( eGo )
return _cellWidget->isSelectable ( eGo->getName() );
Component* component = dynamic_cast<Component*>(entity);
if ( component ) {
return _cellWidget->isSelectable ( component->getLayer() );
}
return true;
}
string Occurrences_IsSelectable::_getString () const
{
return "<Occurrences_IsSelectable>";
}
// -------------------------------------------------------------------
// Class : "Hurricane::CellWidget::Spot".
@ -778,7 +848,7 @@ namespace Hurricane {
{
PaletteItem* item = (_palette) ? _palette->find(layerName) : NULL;
return (!item || item->isChecked())
return (!item || item->isItemVisible())
&& ( Graphics::getThreshold(layerName)/DbU::lambda(1.0) < _scale );
}
@ -787,7 +857,27 @@ namespace Hurricane {
{
PaletteItem* item = (_palette) ? _palette->find(extensionName) : NULL;
return (!item || item->isChecked());
return (!item || item->isItemVisible());
}
bool CellWidget::isSelectable ( const Name& name ) const
{
PaletteItem* item = (_palette) ? _palette->find(name) : NULL;
return (!item || item->isItemSelectable());
}
bool CellWidget::isSelectable ( const Layer* layer ) const
{
PaletteItem* item = NULL;
forEach ( BasicLayer*, ilayer, layer->getBasicLayers() ) {
item = (_palette) ? _palette->find(ilayer->getName()) : NULL;
if ( item && item->isItemSelectable() )
return true;
}
return false;
}
@ -1272,6 +1362,12 @@ namespace Hurricane {
}
Occurrences CellWidget::getOccurrencesUnder ( const Box& area ) const
{
return getCell()->getOccurrencesUnder(area).getSubSet(Occurrences_IsSelectable(this));
}
void CellWidget::select ( const Net* net, bool delayRedraw )
{
++_delaySelectionChanged;
@ -1434,7 +1530,7 @@ namespace Hurricane {
void CellWidget::_selectOccurrencesUnder ( Box selectArea )
{
forEach ( Occurrence, ioccurrence, _cell->getOccurrencesUnder(selectArea) )
forEach ( Occurrence, ioccurrence, getOccurrencesUnder(selectArea) )
select ( *ioccurrence );
}

View File

@ -35,6 +35,8 @@ namespace Hurricane {
PaletteExtensionGoItem::PaletteExtensionGoItem ( const Name& name )
: PaletteItem()
, _visible(NULL)
, _selectable(NULL)
, _name(name)
{ }
@ -52,15 +54,23 @@ namespace Hurricane {
QHBoxLayout* layout = new QHBoxLayout ();
layout->setContentsMargins ( 0, 0, 0, 0 );
_checkBox = new QCheckBox ( this );
_checkBox->setChecked ( false );
_checkBox->setText ( getString(getName()).c_str() );
_checkBox->setFont ( Graphics::getFixedFont() );
layout->addWidget ( _checkBox );
_visible = new QCheckBox ( this );
_visible->setChecked ( false );
_visible->setText ( getString(getName()).c_str() );
_visible->setFont ( Graphics::getFixedFont() );
_selectable = new QCheckBox ( this );
_selectable->setFixedWidth ( 23 );
_selectable->setChecked ( true );
_selectable->setStyleSheet ( "QCheckBox { background-color: red;"
" padding: 5px }" );
layout->addWidget ( _selectable );
layout->addWidget ( _visible );
setLayout ( layout );
connect ( _checkBox, SIGNAL(clicked()), this, SIGNAL(toggled()) );
connect ( _visible , SIGNAL(clicked()), this, SIGNAL(visibleToggled ()) );
connect ( _selectable, SIGNAL(clicked()), this, SIGNAL(selectableToggled()) );
}
@ -70,15 +80,27 @@ namespace Hurricane {
}
bool PaletteExtensionGoItem::isChecked () const
bool PaletteExtensionGoItem::isItemVisible () const
{
return _checkBox->isChecked ();
return _visible->isChecked ();
}
void PaletteExtensionGoItem::setChecked ( bool state )
void PaletteExtensionGoItem::setItemVisible ( bool state )
{
_checkBox->setChecked ( state );
_visible->setChecked ( state );
}
bool PaletteExtensionGoItem::isItemSelectable () const
{
return _selectable->isChecked ();
}
void PaletteExtensionGoItem::setItemSelectable ( bool state )
{
_visible->setChecked ( state );
}

View File

@ -78,4 +78,14 @@ namespace Hurricane {
{ }
bool PaletteItem::isItemSelectable () const
{
return true;
}
void PaletteItem::setItemSelectable ( bool )
{ }
} // End of Hurricane namespace.

View File

@ -35,30 +35,40 @@
namespace Hurricane {
PaletteLayerItem::PaletteLayerItem ( BasicLayer* basicLayer, bool checked )
PaletteLayerItem::PaletteLayerItem ( BasicLayer* basicLayer, bool visible )
: PaletteItem()
, _basicLayer(basicLayer)
, _visible (new QCheckBox())
, _selectable(new QCheckBox())
{
QHBoxLayout* layout = new QHBoxLayout ();
layout->setContentsMargins ( 0, 0, 0, 0 );
layout->addWidget ( new DrawingStyleSample(this) );
_checkBox = new QCheckBox ( this );
_checkBox->setChecked ( checked );
_checkBox->setText ( getString(getName()).c_str() );
_checkBox->setFont ( Graphics::getFixedFont() );
layout->addWidget ( _checkBox );
_visible->setChecked ( visible );
_visible->setText ( getString(getName()).c_str() );
_visible->setFont ( Graphics::getFixedFont() );
_selectable->setFixedWidth ( 23 );
_selectable->setChecked ( true );
_selectable->setStyleSheet ( "QCheckBox { background-color: red;"
" padding: 5px }" );
layout->addWidget ( _selectable );
//layout->addSpacing ( -15 );
layout->addWidget ( _visible );
layout->addStretch ();
setLayout ( layout );
connect ( _checkBox, SIGNAL(clicked()), this, SIGNAL(toggled()) );
connect ( _visible , SIGNAL(clicked()), this, SIGNAL(visibleToggled ()) );
connect ( _selectable, SIGNAL(clicked()), this, SIGNAL(selectableToggled()) );
}
PaletteLayerItem* PaletteLayerItem::create ( BasicLayer* basicLayer, bool checked )
PaletteLayerItem* PaletteLayerItem::create ( BasicLayer* basicLayer, bool visible )
{
PaletteLayerItem* item = new PaletteLayerItem ( basicLayer, checked );
PaletteLayerItem* item = new PaletteLayerItem ( basicLayer, visible );
return item;
}
@ -69,15 +79,27 @@ namespace Hurricane {
}
bool PaletteLayerItem::isChecked () const
bool PaletteLayerItem::isItemVisible () const
{
return _checkBox->isChecked ();
return _visible->isChecked ();
}
void PaletteLayerItem::setChecked ( bool state )
void PaletteLayerItem::setItemVisible ( bool state )
{
_checkBox->setChecked ( state );
_visible->setChecked ( state );
}
bool PaletteLayerItem::isItemSelectable () const
{
return _selectable->isChecked ();
}
void PaletteLayerItem::setItemSelectable ( bool state )
{
_selectable->setChecked ( state );
}

View File

@ -33,28 +33,28 @@
namespace Hurricane {
PaletteNamedItem::PaletteNamedItem ( const Name& name, bool checked )
PaletteNamedItem::PaletteNamedItem ( const Name& name, bool visible )
: PaletteItem()
, _name(name)
, _visible (new QCheckBox(this))
, _name (name)
{
QHBoxLayout* layout = new QHBoxLayout ();
layout->setContentsMargins ( 0, 0, 0, 0 );
_checkBox = new QCheckBox ( this );
_checkBox->setChecked ( checked );
_checkBox->setText ( getString(getName()).c_str() );
_checkBox->setFont ( Graphics::getFixedFont() );
layout->addWidget ( _checkBox );
_visible->setChecked ( visible );
_visible->setText ( getString(getName()).c_str() );
_visible->setFont ( Graphics::getFixedFont() );
layout->addWidget ( _visible );
setLayout ( layout );
connect ( _checkBox, SIGNAL(clicked()), this, SIGNAL(toggled()) );
connect ( _visible, SIGNAL(clicked()), this, SIGNAL(visibleToggled()) );
}
PaletteNamedItem* PaletteNamedItem::create ( const Name& name, bool checked )
PaletteNamedItem* PaletteNamedItem::create ( const Name& name, bool visible )
{
PaletteNamedItem* item = new PaletteNamedItem ( name, checked );
PaletteNamedItem* item = new PaletteNamedItem ( name, visible );
return item;
}
@ -65,15 +65,15 @@ namespace Hurricane {
}
bool PaletteNamedItem::isChecked () const
bool PaletteNamedItem::isItemVisible () const
{
return _checkBox->isChecked ();
return _visible->isChecked ();
}
void PaletteNamedItem::setChecked ( bool state )
void PaletteNamedItem::setItemVisible ( bool state )
{
_checkBox->setChecked ( state );
_visible->setChecked ( state );
}

View File

@ -39,8 +39,9 @@
#include "hurricane/viewer/Graphics.h"
#include "hurricane/viewer/PaletteItem.h"
#include "hurricane/viewer/PaletteLayerItem.h"
#include "hurricane/viewer/PaletteNamedItem.h"
#include "hurricane/viewer/PaletteLayerItem.h"
#include "hurricane/viewer/PaletteExtensionGoItem.h"
#include "hurricane/viewer/PaletteWidget.h"
@ -145,7 +146,7 @@ namespace Hurricane {
PaletteNamedItem* PaletteWidget::_createNamedItem ( const Name& name, bool checked )
{
PaletteNamedItem* item = PaletteNamedItem::create ( name, checked );
connect ( item, SIGNAL(toggled()), this, SIGNAL(paletteChanged()) );
connect ( item, SIGNAL(visibleToggled()), this, SIGNAL(paletteChanged()) );
return item;
}
@ -153,7 +154,15 @@ namespace Hurricane {
PaletteLayerItem* PaletteWidget::_createLayerItem ( BasicLayer* layer, bool checked )
{
PaletteLayerItem* item = PaletteLayerItem::create ( layer, checked );
connect ( item, SIGNAL(toggled()), this, SIGNAL(paletteChanged()) );
connect ( item, SIGNAL(visibleToggled()), this, SIGNAL(paletteChanged()) );
return item;
}
PaletteExtensionGoItem* PaletteWidget::_createExtensionGoItem ( const Name& name, bool checked )
{
PaletteExtensionGoItem* item = PaletteExtensionGoItem::create ( name );
connect ( item, SIGNAL(visibleToggled()), this, SIGNAL(paletteChanged()) );
return item;
}
@ -297,7 +306,7 @@ namespace Hurricane {
gridBuffer.addSection ( _extensionGroup, Qt::AlignHCenter );
forEach ( ExtensionSlice*, extension, cell->getExtensionSlices() ) {
PaletteNamedItem* item = _createNamedItem ( (*extension)->getName(), false );
PaletteExtensionGoItem* item = _createExtensionGoItem ( (*extension)->getName(), false );
gridBuffer.addWidget ( item );
_extensionGoItems [ item->getName() ] = item;
}
@ -309,7 +318,17 @@ namespace Hurricane {
{
PaletteItem* item = find ( name );
if ( item )
return item->isChecked ();
return item->isItemVisible ();
return false;
}
bool PaletteWidget::isSelectable ( const Name& name ) const
{
PaletteItem* item = find ( name );
if ( item )
return item->isItemSelectable ();
return false;
}
@ -319,11 +338,11 @@ namespace Hurricane {
{
PaletteItems::iterator iitem = _layerItems.begin();
for ( ; iitem != _layerItems.end() ; iitem++ )
iitem->second->setChecked ( true );
iitem->second->setItemVisible ( true );
iitem = _extensionGoItems.begin();
for ( ; iitem != _extensionGoItems.end() ; iitem++ )
iitem->second->setChecked ( true );
iitem->second->setItemVisible ( true );
emit paletteChanged();
}
@ -333,11 +352,11 @@ namespace Hurricane {
{
PaletteItems::iterator iitem = _layerItems.begin();
for ( ; iitem != _layerItems.end() ; iitem++ )
iitem->second->setChecked ( false );
iitem->second->setItemVisible ( false );
iitem = _extensionGoItems.begin();
for ( ; iitem != _extensionGoItems.end() ; iitem++ )
iitem->second->setChecked ( false );
iitem->second->setItemVisible ( false );
emit paletteChanged();
}

View File

@ -76,10 +76,9 @@ namespace Hurricane {
setDrawingEnabled ( true );
} else if ( event->modifiers() == Qt::ControlModifier ) {
QRect selectArea ( event->pos() - QPoint(2,2), QSize(4,4) );
forEach ( Occurrence, ioccurrence
, widget->getCell()->getOccurrencesUnder(widget->screenToDbuBox(selectArea)) ) {
forEach ( Occurrence, ioccurrence, widget->getOccurrencesUnder(selectArea) )
_selectionPopup->add ( *ioccurrence );
}
_selectionPopup->updateLayout ();
_selectionPopup->move ( event->globalPos() );
_selectionPopup->popup ();

View File

@ -105,6 +105,8 @@ namespace Hurricane {
inline bool showBoundaries () const;
inline bool showSelection () const;
inline bool cumulativeSelection () const;
inline Occurrences getOccurrencesUnder ( const QRect& ) const;
Occurrences getOccurrencesUnder ( const Box& ) const;
inline set<Selector*>& getSelectorSet ();
inline void setStartLevel ( int );
inline void setStopLevel ( int );
@ -115,6 +117,8 @@ namespace Hurricane {
inline float getScale () const;
bool isDrawableLayer ( const Name& );
bool isDrawableExtension ( const Name& );
bool isSelectable ( const Name& ) const;
bool isSelectable ( const Layer* ) const;
void drawBox ( DbU::Unit, DbU::Unit, DbU::Unit, DbU::Unit );
void drawBox ( const Box& );
void drawLine ( DbU::Unit, DbU::Unit, DbU::Unit, DbU::Unit );
@ -491,6 +495,10 @@ namespace Hurricane {
{ return _selectors; }
Occurrences CellWidget::getOccurrencesUnder ( const QRect& area ) const
{ return getOccurrencesUnder(screenToDbuBox(area)); }
inline QPoint& CellWidget::getOffsetVA ()
{ return _offsetVA; }

View File

@ -43,11 +43,14 @@ namespace Hurricane {
public:
static PaletteExtensionGoItem* create ( const Name& );
virtual const Name& getName () const;
virtual bool isChecked () const;
virtual void setChecked ( bool );
virtual bool isItemVisible () const;
virtual bool isItemSelectable () const;
virtual void setItemVisible ( bool state );
virtual void setItemSelectable ( bool state );
protected:
QCheckBox* _checkBox;
QCheckBox* _visible;
QCheckBox* _selectable;
Name _name;
protected:

View File

@ -69,16 +69,19 @@ namespace Hurricane {
Q_OBJECT;
public:
virtual const Name& getName () const = 0;
virtual bool isChecked () const = 0;
virtual void setChecked ( bool state ) = 0;
virtual const Name& getName () const = 0;
virtual bool isItemVisible () const = 0;
virtual bool isItemSelectable () const;
virtual void setItemVisible ( bool ) = 0;
virtual void setItemSelectable ( bool );
signals:
virtual void toggled ();
void visibleToggled ();
void selectableToggled ();
protected:
PaletteItem ();
PaletteItem ( const PaletteItem& );
PaletteItem& operator= ( const PaletteItem& );
PaletteItem ();
PaletteItem ( const PaletteItem& );
PaletteItem& operator= ( const PaletteItem& );
};

View File

@ -42,19 +42,22 @@ namespace Hurricane {
Q_OBJECT;
public:
static PaletteLayerItem* create ( BasicLayer*, bool checked=true );
virtual const Name& getName () const;
virtual bool isChecked () const;
virtual void setChecked ( bool state );
protected:
BasicLayer* _basicLayer;
QCheckBox* _checkBox;
protected:
PaletteLayerItem ( BasicLayer*, bool checked );
PaletteLayerItem ( const PaletteLayerItem& );
PaletteLayerItem& operator= ( const PaletteLayerItem& );
static PaletteLayerItem* create ( BasicLayer*, bool visible=true );
virtual const Name& getName () const;
virtual bool isItemVisible () const;
virtual bool isItemSelectable () const;
virtual void setItemVisible ( bool state );
virtual void setItemSelectable ( bool state );
protected:
BasicLayer* _basicLayer;
QCheckBox* _visible;
QCheckBox* _selectable;
protected:
PaletteLayerItem ( BasicLayer*, bool visible );
PaletteLayerItem ( const PaletteLayerItem& );
PaletteLayerItem& operator= ( const PaletteLayerItem& );
};

View File

@ -41,17 +41,17 @@ namespace Hurricane {
// Constructor.
public:
static PaletteNamedItem* create ( const Name&, bool checked=true );
static PaletteNamedItem* create ( const Name&, bool visible=true );
virtual const Name& getName () const;
virtual bool isChecked () const;
virtual void setChecked ( bool );
virtual bool isItemVisible () const;
virtual void setItemVisible ( bool );
protected:
QCheckBox* _checkBox;
QCheckBox* _visible;
Name _name;
protected:
PaletteNamedItem ( const Name&, bool checked );
PaletteNamedItem ( const Name&, bool visible );
PaletteNamedItem ( const PaletteNamedItem& );
PaletteNamedItem& operator= ( const PaletteNamedItem& );
};

View File

@ -49,6 +49,7 @@ namespace Hurricane {
class PaletteItem;
class PaletteNamedItem;
class PaletteLayerItem;
class PaletteExtensionGoItem;
class PaletteWidget : public QScrollArea {
@ -60,6 +61,7 @@ namespace Hurricane {
PaletteWidget ( QWidget* parent=NULL );
PaletteItem* find ( const Name& name ) const;
bool isDrawable ( const Name& name ) const;
bool isSelectable ( const Name& name ) const;
signals:
void paletteChanged ();
public slots:
@ -78,12 +80,13 @@ namespace Hurricane {
QWidget* _extensionGroup;
protected:
PaletteWidget ( const PaletteWidget& );
PaletteWidget& operator= ( const PaletteWidget& );
protected:
QWidget* _createGroupItem ( const Name& );
PaletteNamedItem* _createNamedItem ( const Name&, bool checked=true );
PaletteLayerItem* _createLayerItem ( BasicLayer*, bool checked=true );
PaletteWidget ( const PaletteWidget& );
PaletteWidget& operator= ( const PaletteWidget& );
protected:
QWidget* _createGroupItem ( const Name& );
PaletteNamedItem* _createNamedItem ( const Name&, bool checked=true );
PaletteLayerItem* _createLayerItem ( BasicLayer*, bool checked=true );
PaletteExtensionGoItem* _createExtensionGoItem ( const Name&, bool checked=true );
};