* ./hurricane/src/hviewer :

- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
       Shows in Qt debug mode (catched by an assert).
   - Bug : SelectCommand now keep the Selection check button in sync.
   - Change : Palette doesn't show at start.

 * ./hurricane :
   - Now choice between static and dynamic linking. Note that thoses options are
       mutually exclusives.

 * ./coriolis/src/crlcore :
   - New choice between static and dynamic linking.
   - New feature : XmlParser optional warning when file not found (default is
       to warn).
   - New feature : now read environment from user's optional configuration file :
       ~/.environment.alliance.xml
   - Potential bug : when loading/parsing file, the XmlReader hangs if the opened
       file is a directory, and QFile allows directory opening :-(
This commit is contained in:
Jean-Paul Chaput 2008-09-08 08:46:18 +00:00
parent f6eee66fcb
commit 7bce78379c
18 changed files with 1280 additions and 44 deletions

View File

@ -11,6 +11,20 @@ SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-pg" CACHE STRING "Debug options."
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg" CACHE STRING "Debug options." FORCE) SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg" CACHE STRING "Debug options." FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-pg" CACHE STRING "Debug options." FORCE) SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-pg" CACHE STRING "Debug options." FORCE)
OPTION(BUILD_STATIC "Build static version of libraries & binaries" OFF)
IF(BUILD_STATIC)
MESSAGE(STATUS "Building static libraries.")
# check for qmake
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake-qt4 qmake PATHS
/opt/qt4-static-4.3.2/bin
NO_DEFAULT_PATH
)
MESSAGE(STATUS "qmake: ${QT_QMAKE_EXECUTABLE}")
ELSE(BUILD_STATIC)
MESSAGE(STATUS "Building dynamic libraries.")
ENDIF(BUILD_STATIC)
SET(QT_USE_QTXML "true") SET(QT_USE_QTXML "true")
FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project

View File

@ -6,9 +6,9 @@
# HURRICANE_LIBRARIES - The path to where the Hurricane library files are. # HURRICANE_LIBRARIES - The path to where the Hurricane library files are.
SET(HURRICANE_INCLUDE_PATH_DESCRIPTION "directory containing the Hurricane include files. E.g /usr/local/include or /asim/coriolis/include") SET(HURRICANE_INCLUDE_PATH_DESCRIPTION "The directory containing the Hurricane include files. E.g /usr/local/include or /asim/coriolis/include")
SET(HURRICANE_LIBRARY_PATH_DESCRIPTION "The directory containing the Hurricane library files. E.g /usr/local/lib or /asim/coriolis/lib")
SET(HURRICANE_DIR_MESSAGE "Set the HURRICANE_INCLUDE_DIR cmake cache entry to the ${HURRICANE_INCLUDE_PATH_DESCRIPTION}") SET(HURRICANE_DIR_MESSAGE "Set the HURRICANE_INCLUDE_DIR cmake cache entry to the ${HURRICANE_INCLUDE_PATH_DESCRIPTION}")
# don't even bother under WIN32 # don't even bother under WIN32
IF(UNIX) IF(UNIX)
@ -26,7 +26,7 @@ IF(UNIX)
${HURRICANE_DIR_SEARCH} ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES include PATH_SUFFIXES include
# Help the user find it if we cannot. # Help the user find it if we cannot.
DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" DOC "${HURRICANE_INCLUDE_PATH_DESCRIPTION}"
) )
FIND_LIBRARY(HURRICANE_LIBRARY_PATH FIND_LIBRARY(HURRICANE_LIBRARY_PATH
@ -34,7 +34,15 @@ IF(UNIX)
PATHS ${HURRICANE_DIR_SEARCH} PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES lib PATH_SUFFIXES lib
# Help the user find it if we cannot. # Help the user find it if we cannot.
DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
)
FIND_LIBRARY(HURRICANE_STATIC_LIBRARY_PATH
NAMES hurricane-static
PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES lib
# Help the user find it if we cannot.
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
) )
FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH
@ -42,7 +50,7 @@ IF(UNIX)
PATHS ${HURRICANE_DIR_SEARCH} PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES include PATH_SUFFIXES include
# Help the user find it if we cannot. # Help the user find it if we cannot.
DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
) )
FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH
@ -50,12 +58,22 @@ IF(UNIX)
PATHS ${HURRICANE_DIR_SEARCH} PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES lib PATH_SUFFIXES lib
# Help the user find it if we cannot. # Help the user find it if we cannot.
DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
)
FIND_LIBRARY(HURRICANE_VIEWER_STATIC_LIBRARY_PATH
NAMES hviewer-static
PATHS ${HURRICANE_DIR_SEARCH}
PATH_SUFFIXES lib
# Help the user find it if we cannot.
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
) )
# Assume we didn't find it. # Assume we didn't find it.
SET(HURRICANE_FOUND 0) SET(HURRICANE_FOUND "NOTFOUND")
SET(HURRICANE_GRAPHICAL_FOUND 0) SET(HURRICANE_STATIC_FOUND "NOTFOUND")
SET(HURRICANE_GRAPHICAL_FOUND "NOTFOUND")
SET(HURRICANE_GRAPHICAL_STATIC_FOUND "NOTFOUND")
IF(HURRICANE_INCLUDE_PATH) IF(HURRICANE_INCLUDE_PATH)
IF(HURRICANE_LIBRARY_PATH) IF(HURRICANE_LIBRARY_PATH)
@ -67,6 +85,15 @@ IF(UNIX)
${HURRICANE_LIBRARY_PATH} ${HURRICANE_LIBRARY_PATH}
) )
ENDIF(HURRICANE_LIBRARY_PATH) ENDIF(HURRICANE_LIBRARY_PATH)
IF(HURRICANE_STATIC_LIBRARY_PATH)
SET(HURRICANE_STATIC_FOUND "YES")
SET(HURRICANE_INCLUDE_DIR
${HURRICANE_INCLUDE_PATH}
)
SET(HURRICANE_STATIC_LIBRARIES
${HURRICANE_STATIC_LIBRARY_PATH}
)
ENDIF(HURRICANE_STATIC_LIBRARY_PATH)
ENDIF(HURRICANE_INCLUDE_PATH) ENDIF(HURRICANE_INCLUDE_PATH)
IF(HURRICANE_VIEWER_INCLUDE_PATH) IF(HURRICANE_VIEWER_INCLUDE_PATH)
@ -79,23 +106,34 @@ IF(UNIX)
${HURRICANE_VIEWER_LIBRARY_PATH} ${HURRICANE_VIEWER_LIBRARY_PATH}
) )
ENDIF(HURRICANE_VIEWER_LIBRARY_PATH) ENDIF(HURRICANE_VIEWER_LIBRARY_PATH)
IF(HURRICANE_VIEWER_STATIC_LIBRARY_PATH)
SET(HURRICANE_GRAPHICAL_STATIC_FOUND "YES")
SET(HURRICANE_GRAPHICAL_INCLUDE_DIR
${HURRICANE_VIEWER_INCLUDE_PATH}
)
SET(HURRICANE_GRAPHICAL_STATIC_LIBRARIES
${HURRICANE_VIEWER_STATIC_LIBRARY_PATH}
)
ENDIF(HURRICANE_VIEWER_STATIC_LIBRARY_PATH)
ENDIF(HURRICANE_VIEWER_INCLUDE_PATH) ENDIF(HURRICANE_VIEWER_INCLUDE_PATH)
IF(HURRICANE_FOUND) IF(HURRICANE_FOUND OR HURRICANE_STATIC_FOUND)
IF(NOT HURRICANE_FIND_QUIETLY) IF(NOT HURRICANE_FIND_QUIETLY)
MESSAGE(STATUS "Found HURRICANE : ${HURRICANE_LIBRARIES}") MESSAGE(STATUS "Found HURRICANE : ${HURRICANE_LIBRARIES}")
ENDIF(NOT HURRICANE_FIND_QUIETLY) ENDIF(NOT HURRICANE_FIND_QUIETLY)
ELSE(HURRICANE_FOUND) ELSE(HURRICANE_FOUND OR HURRICANE_STATIC_FOUND)
IF(HURRICANE_FIND_REQUIRED) IF(HURRICANE_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}") MESSAGE(FATAL_ERROR "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}")
ENDIF(HURRICANE_FIND_REQUIRED) ENDIF(HURRICANE_FIND_REQUIRED)
ENDIF(HURRICANE_FOUND) ENDIF(HURRICANE_FOUND OR HURRICANE_STATIC_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
HURRICANE_INCLUDE_PATH HURRICANE_INCLUDE_PATH
HURRICANE_LIBRARY_PATH HURRICANE_LIBRARY_PATH
HURRICANE_STATIC_LIBRARY_PATH
HURRICANE_GRAPHICAL_INCLUDE_PATH HURRICANE_GRAPHICAL_INCLUDE_PATH
HURRICANE_VIEWER_LIBRARY_PATH HURRICANE_VIEWER_LIBRARY_PATH
HURRICANE_VIEWER_STATIC_LIBRARY_PATH
) )
ENDIF(UNIX) ENDIF(UNIX)

File diff suppressed because it is too large Load Diff

View File

@ -144,7 +144,14 @@
Timer.cpp Timer.cpp
) )
add_library ( hurricane SHARED ${cpps} )
if ( BUILD_STATIC )
add_library ( hurricane-static STATIC ${cpps} )
install ( TARGETS hurricane-static DESTINATION /lib)
else ( BUILD_STATIC )
add_library ( hurricane SHARED ${cpps} )
install ( TARGETS hurricane DESTINATION /lib)
endif ( BUILD_STATIC )
install ( FILES ${includes} DESTINATION /include/hurricane) install ( FILES ${includes} DESTINATION /include/hurricane)
install ( TARGETS hurricane DESTINATION /lib)

View File

@ -133,12 +133,14 @@ namespace Hurricane {
//else //else
// cerr << " TopCell: " << getMasterCell() << " " << getTransformation() << endl; // cerr << " TopCell: " << getMasterCell() << " " << getTransformation() << endl;
forEach ( Slice*, islice, getMasterCell()->getSlices() ) { if ( !getMasterCell()->isTerminal() || (_filter & DoTerminalCells) ) {
if ( !(*islice)->getLayer()->contains(getBasicLayer()) ) continue; forEach ( Slice*, islice, getMasterCell()->getSlices() ) {
if ( !(*islice)->getBoundingBox().intersect(getArea()) ) continue; if ( !(*islice)->getLayer()->contains(getBasicLayer()) ) continue;
if ( !(*islice)->getBoundingBox().intersect(getArea()) ) continue;
forEach ( Go*, igo, (*islice)->getGosUnder(_stack.getArea()) ) forEach ( Go*, igo, (*islice)->getGosUnder(_stack.getArea()) )
goCallback ( *igo ); goCallback ( *igo );
}
} }
} }

View File

@ -304,9 +304,12 @@ namespace Hurricane {
class Query { class Query {
public: public:
// Types. // Types.
enum QueryFilter { DoMasterCells = 1 enum QueryFilter { DoMasterCells = 1
, DoComponents = 2 , DoTerminalCells = 2
, DoAll = DoMasterCells || DoComponents , DoComponents = 4
, DoAll = DoMasterCells
| DoTerminalCells
| DoComponents
}; };
public: public:
// Constructors & Destructors. // Constructors & Destructors.

View File

@ -79,8 +79,14 @@
qt4_wrap_cpp ( MOC_SRCS ${mocincludes} ) qt4_wrap_cpp ( MOC_SRCS ${mocincludes} )
qt4_add_resources ( RCC_SRCS CellViewer.qrc ) qt4_add_resources ( RCC_SRCS CellViewer.qrc )
add_library ( hviewer SHARED ${cpps} ${MOC_SRCS} ${RCC_SRCS} ) install ( FILES ${exports} DESTINATION /include/hurricane/viewer )
target_link_libraries ( hviewer ${QT_LIBRARIES} hurricane )
install ( FILES ${exports} DESTINATION /include/hurricane/viewer ) if ( BUILD_STATIC )
install ( TARGETS hviewer DESTINATION /lib ) add_library ( hviewer-static STATIC ${cpps} ${MOC_SRCS} ${RCC_SRCS} )
target_link_libraries ( hviewer-static hurricane-static ${QT_LIBRARIES} )
install ( TARGETS hviewer-static DESTINATION /lib )
else ( BUILD_STATIC )
add_library ( hviewer SHARED ${cpps} ${MOC_SRCS} ${RCC_SRCS} )
target_link_libraries ( hviewer ${QT_LIBRARIES} hurricane )
install ( TARGETS hviewer DESTINATION /lib )
endif ( BUILD_STATIC )

View File

@ -95,6 +95,7 @@ namespace Hurricane {
, _fileMenu(NULL) , _fileMenu(NULL)
, _viewMenu(NULL) , _viewMenu(NULL)
, _toolsMenu(NULL) , _toolsMenu(NULL)
, _debugMenu(NULL)
//, _mapView(NULL) //, _mapView(NULL)
, _palette(NULL) , _palette(NULL)
, _mousePosition(NULL) , _mousePosition(NULL)
@ -125,7 +126,6 @@ namespace Hurricane {
_openAction->setObjectName ( "viewer.file.openCell" ); _openAction->setObjectName ( "viewer.file.openCell" );
_openAction->setIcon ( QIcon(":/images/stock_open.png") ); _openAction->setIcon ( QIcon(":/images/stock_open.png") );
_openAction->setStatusTip ( tr("Open (load) a new Cell") ); _openAction->setStatusTip ( tr("Open (load) a new Cell") );
cerr << "_openAction: " << _openAction << endl;
_nextAction = new QAction ( tr("&Next Breakpoint"), this ); _nextAction = new QAction ( tr("&Next Breakpoint"), this );
_nextAction->setObjectName ( "viewer.file.nextBreakpoint" ); _nextAction->setObjectName ( "viewer.file.nextBreakpoint" );
@ -239,6 +239,10 @@ namespace Hurricane {
_toolsMenu->addAction ( _runInspectorOnCell ); _toolsMenu->addAction ( _runInspectorOnCell );
_toolsMenu->addAction ( _browseSelection ); _toolsMenu->addAction ( _browseSelection );
_toolsMenu->addAction ( _browseNetlist ); _toolsMenu->addAction ( _browseNetlist );
_debugMenu = menuBar()->addMenu ( tr("Debug") );
_debugMenu->setObjectName ( "viewer.debug" );
_debugMenu->hide ();
} }
@ -258,6 +262,7 @@ namespace Hurricane {
_cellWidget->bindCommand ( &_selectCommand ); _cellWidget->bindCommand ( &_selectCommand );
_displayFilter->setCellWidget ( _cellWidget ); _displayFilter->setCellWidget ( _cellWidget );
_selectCommand.bindToAction ( _showSelectionAction );
HMousePosition* _mousePosition = new HMousePosition (); HMousePosition* _mousePosition = new HMousePosition ();
statusBar()->addPermanentWidget ( _mousePosition ); statusBar()->addPermanentWidget ( _mousePosition );
@ -299,6 +304,7 @@ namespace Hurricane {
connect ( _cellWidget , SIGNAL(mousePositionChanged(const Point&)) connect ( _cellWidget , SIGNAL(mousePositionChanged(const Point&))
, _mousePosition , SLOT(setPosition(const Point&)) ); , _mousePosition , SLOT(setPosition(const Point&)) );
_showPaletteAction->setChecked ( false );
_cellWidget->redraw (); _cellWidget->redraw ();
} }

View File

@ -345,6 +345,7 @@ namespace Hurricane {
, _offsetVA(_stripWidth,_stripWidth) , _offsetVA(_stripWidth,_stripWidth)
, _drawingPlanes(QSize(6*_stripWidth,6*_stripWidth),this) , _drawingPlanes(QSize(6*_stripWidth,6*_stripWidth),this)
, _drawingQuery(this) , _drawingQuery(this)
, _queryFilter(Query::DoAll)
, _mousePosition(0,0) , _mousePosition(0,0)
, _spot(this) , _spot(this)
, _cell(NULL) , _cell(NULL)
@ -458,7 +459,9 @@ namespace Hurricane {
void CellWidget::redraw ( QRect redrawArea ) void CellWidget::redraw ( QRect redrawArea )
{ {
cerr << "CellWidget::redraw() - " << _selectionHasChanged << endl; // cerr << "CellWidget::redraw() - "
// << _selectionHasChanged << " filter:"
// << _queryFilter << endl;
//_drawingQuery.setStartLevel ( 1 ); //_drawingQuery.setStartLevel ( 1 );
//_drawingQuery.setStopLevel ( 2 ); //_drawingQuery.setStopLevel ( 2 );
@ -493,7 +496,7 @@ namespace Hurricane {
if ( isDrawable((*iLayer)->getName()) ) { if ( isDrawable((*iLayer)->getName()) ) {
//drawCell ( _cell, (*iLayer), redrawBox, Transformation() ); //drawCell ( _cell, (*iLayer), redrawBox, Transformation() );
_drawingQuery.setBasicLayer ( *iLayer ); _drawingQuery.setBasicLayer ( *iLayer );
_drawingQuery.setFilter ( Query::DoComponents ); _drawingQuery.setFilter ( _queryFilter & ~Query::DoMasterCells );
_drawingQuery.doQuery (); _drawingQuery.doQuery ();
} }
} }
@ -503,7 +506,7 @@ namespace Hurricane {
//drawBoundaries ( _cell, redrawBox, Transformation() ); //drawBoundaries ( _cell, redrawBox, Transformation() );
_drawingQuery.setBasicLayer ( NULL ); _drawingQuery.setBasicLayer ( NULL );
_drawingQuery.setFilter ( Query::DoMasterCells ); _drawingQuery.setFilter ( _queryFilter & ~Query::DoComponents );
_drawingQuery.doQuery (); _drawingQuery.doQuery ();
} }
} }

View File

@ -55,7 +55,6 @@
# include <Qt> # include <Qt>
# include <QBrush> # include <QBrush>
# include <QPen> # include <QPen>
# include <QFont>
# include <QApplication> # include <QApplication>
# include "hurricane/Name.h" # include "hurricane/Name.h"

View File

@ -51,6 +51,7 @@
#include <QLabel> #include <QLabel>
#include <QCheckBox>
#include <QSpinBox> #include <QSpinBox>
#include <QGroupBox> #include <QGroupBox>
#include <QGridLayout> #include <QGridLayout>
@ -72,12 +73,13 @@ namespace Hurricane {
, _cellWidget(NULL) , _cellWidget(NULL)
, _startSpinBox(NULL) , _startSpinBox(NULL)
, _stopSpinBox(NULL) , _stopSpinBox(NULL)
, _queryFilter(Query::DoAll)
{ {
setAttribute ( Qt::WA_QuitOnClose, false ); setAttribute ( Qt::WA_QuitOnClose, false );
setWindowTitle ( tr("Display Filter") ); setWindowTitle ( tr("Display Filter") );
setFont ( Graphics::getNormalFont(true) ); setFont ( Graphics::getNormalFont(true) );
QGroupBox* groupBox = new QGroupBox ( tr("Hierarchy Levels") ); QGroupBox* groupBox = new QGroupBox ( tr("Hierarchy Settings") );
QGridLayout* gLayout = new QGridLayout (); QGridLayout* gLayout = new QGridLayout ();
QGridLayout* wLayout = new QGridLayout (); QGridLayout* wLayout = new QGridLayout ();
@ -102,6 +104,35 @@ namespace Hurricane {
gLayout->addWidget ( label , 1, 0 ); gLayout->addWidget ( label , 1, 0 );
gLayout->addWidget ( _stopSpinBox, 1, 1 ); gLayout->addWidget ( _stopSpinBox, 1, 1 );
QFrame* separator = new QFrame ();
separator->setFrameShape ( QFrame::HLine );
separator->setFrameShadow ( QFrame::Sunken );
gLayout->addWidget ( separator, 2, 0, 1, 2 );
QCheckBox* filterBox = new QCheckBox ();
filterBox->setFont ( Graphics::getNormalFont() );
filterBox->setText ( tr("Process Master Cells") );
filterBox->setChecked ( true );
gLayout->addWidget ( filterBox, 3, 0, 1, 2 );
connect ( filterBox, SIGNAL(stateChanged(int)), this, SLOT(setDoMasterCells(int)) );
filterBox = new QCheckBox ();
filterBox->setFont ( Graphics::getNormalFont() );
filterBox->setText ( tr("Process Terminal Cells") );
filterBox->setChecked ( true );
gLayout->addWidget ( filterBox, 4, 0, 1, 2 );
connect ( filterBox, SIGNAL(stateChanged(int)), this, SLOT(setDoTerminalCells(int)) );
filterBox = new QCheckBox ();
filterBox->setFont ( Graphics::getNormalFont() );
filterBox->setText ( tr("Process Components") );
filterBox->setChecked ( true );
gLayout->addWidget ( filterBox, 5, 0, 1, 2 );
connect ( filterBox, SIGNAL(stateChanged(int)), this, SLOT(setDoComponents(int)) );
groupBox->setLayout ( gLayout ); groupBox->setLayout ( gLayout );
wLayout->addWidget ( groupBox, 0, 0 ); wLayout->addWidget ( groupBox, 0, 0 );
setLayout ( wLayout ); setLayout ( wLayout );
@ -150,4 +181,37 @@ namespace Hurricane {
} }
void HDisplayFilter::setDoMasterCells ( int state )
{
if ( state != Qt::Unchecked ) _queryFilter |= Query::DoMasterCells;
else _queryFilter &= ~Query::DoMasterCells;
_cellWidget->setQueryFilter ( _queryFilter );
emit filterChanged();
}
void HDisplayFilter::setDoTerminalCells ( int state )
{
if ( state != Qt::Unchecked ) _queryFilter |= Query::DoTerminalCells;
else _queryFilter &= ~Query::DoTerminalCells;
_cellWidget->setQueryFilter ( _queryFilter );
emit filterChanged();
}
void HDisplayFilter::setDoComponents ( int state )
{
if ( state != Qt::Unchecked ) _queryFilter |= Query::DoComponents;
else _queryFilter &= ~Query::DoComponents;
_cellWidget->setQueryFilter ( _queryFilter );
emit filterChanged();
}
} }

View File

@ -52,6 +52,7 @@
# include <QMouseEvent> # include <QMouseEvent>
# include <QKeyEvent> # include <QKeyEvent>
# include <QAction>
# include "hurricane/Cell.h" # include "hurricane/Cell.h"
@ -68,6 +69,7 @@ namespace Hurricane {
SelectCommand::SelectCommand () SelectCommand::SelectCommand ()
: AreaCommand() : AreaCommand()
, _selectAction(NULL)
{ } { }
@ -75,6 +77,12 @@ namespace Hurricane {
{ } { }
void SelectCommand::bindToAction ( QAction* action )
{
_selectAction = action;
}
bool SelectCommand::mousePressEvent ( CellWidget* widget, QMouseEvent* event ) bool SelectCommand::mousePressEvent ( CellWidget* widget, QMouseEvent* event )
{ {
if ( isActive() ) return true; if ( isActive() ) return true;
@ -105,8 +113,15 @@ namespace Hurricane {
, widget->getCell()->getOccurrencesUnder(widget->screenToDbuBox(selectArea)) ) { , widget->getCell()->getOccurrencesUnder(widget->screenToDbuBox(selectArea)) ) {
widget->select ( *ioccurrence ); widget->select ( *ioccurrence );
} }
widget->setShowSelection ( true ); if ( _selectAction ) {
widget->redraw (); if ( !_selectAction->isChecked() )
_selectAction->setChecked ( true );
else
widget->redraw ();
} else {
widget->setShowSelection ( true );
widget->redraw ();
}
emit selectionChanged(widget->getSelectorSet(),widget->getCell()); emit selectionChanged(widget->getSelectorSet(),widget->getCell());

View File

@ -136,6 +136,7 @@ namespace Hurricane {
QMenu* _fileMenu; QMenu* _fileMenu;
QMenu* _viewMenu; QMenu* _viewMenu;
QMenu* _toolsMenu; QMenu* _toolsMenu;
QMenu* _debugMenu;
//MapView* _mapView; //MapView* _mapView;
HPalette* _palette; HPalette* _palette;
HMousePosition* _mousePosition; HMousePosition* _mousePosition;

View File

@ -131,6 +131,7 @@ namespace Hurricane {
void unselectAll ( bool delayRedraw=true ); void unselectAll ( bool delayRedraw=true );
inline void setStartLevel ( int level ); inline void setStartLevel ( int level );
inline void setStopLevel ( int level ); inline void setStopLevel ( int level );
inline void setQueryFilter ( int filter );
// Painter control & Hurricane objects drawing primitives. // Painter control & Hurricane objects drawing primitives.
inline float getScale () const; inline float getScale () const;
bool isDrawable ( const Name& entryName ); bool isDrawable ( const Name& entryName );
@ -291,6 +292,7 @@ namespace Hurricane {
QPoint _offsetVA; QPoint _offsetVA;
DrawingPlanes _drawingPlanes; DrawingPlanes _drawingPlanes;
DrawingQuery _drawingQuery; DrawingQuery _drawingQuery;
int _queryFilter;
QPoint _mousePosition; QPoint _mousePosition;
Spot _spot; Spot _spot;
Cell* _cell; Cell* _cell;
@ -508,6 +510,10 @@ namespace Hurricane {
{ return _scale; } { return _scale; }
inline void CellWidget::setQueryFilter ( int filter )
{ _queryFilter = filter; }
} // End of Hurricane namespace. } // End of Hurricane namespace.

View File

@ -59,7 +59,8 @@
# include "hurricane/viewer/DisplayStyle.h" # include "hurricane/viewer/DisplayStyle.h"
class QFont; # include <QFont>
class QColor; class QColor;
class QPen; class QPen;
class QBrush; class QBrush;
@ -78,7 +79,7 @@ namespace Hurricane {
public: public:
// Accessors. // Accessors.
static Graphics* getGraphics (); static Graphics* getGraphics ();
static const QFont getFixedFont ( int weight=-1, bool italic=false, bool underline=false ); 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 QFont getNormalFont ( bool bold=false, bool italic=false, bool underline=false );
static const Name& getGroup ( const Name& key ); static const Name& getGroup ( const Name& key );
static QColor getColor ( const Name& key, int darkening=100 ); static QColor getColor ( const Name& key, int darkening=100 );

View File

@ -69,20 +69,24 @@ namespace Hurricane {
Q_OBJECT; Q_OBJECT;
public: public:
HDisplayFilter ( QWidget* parent=NULL ); HDisplayFilter ( QWidget* parent=NULL );
void setCellWidget ( CellWidget* ); void setCellWidget ( CellWidget* );
signals: signals:
void filterChanged (); void filterChanged ();
public slots: public slots:
void startLevelChanged ( int level ); void startLevelChanged ( int level );
void stopLevelChanged ( int level ); void stopLevelChanged ( int level );
void setDoMasterCells ( int state );
void setDoComponents ( int state );
void setDoTerminalCells ( int state );
protected: protected:
CellWidget* _cellWidget; CellWidget* _cellWidget;
QSpinBox* _startSpinBox; QSpinBox* _startSpinBox;
QSpinBox* _stopSpinBox; QSpinBox* _stopSpinBox;
int _queryFilter;
}; };

View File

@ -53,10 +53,12 @@
#ifndef __HURRICANE_SELECT_COMMAND_H__ #ifndef __HURRICANE_SELECT_COMMAND_H__
#define __HURRICANE_SELECT_COMMAND_H__ #define __HURRICANE_SELECT_COMMAND_H__
#include <set>
#include <QObject> #include <QObject>
#include <QPoint> #include <QPoint>
#include <set> class QAction;
#include "hurricane/viewer/AreaCommand.h" #include "hurricane/viewer/AreaCommand.h"
@ -79,8 +81,11 @@ namespace Hurricane {
virtual ~SelectCommand (); virtual ~SelectCommand ();
virtual bool mousePressEvent ( CellWidget*, QMouseEvent* ); virtual bool mousePressEvent ( CellWidget*, QMouseEvent* );
virtual bool mouseReleaseEvent ( CellWidget*, QMouseEvent* ); virtual bool mouseReleaseEvent ( CellWidget*, QMouseEvent* );
void bindToAction ( QAction* action );
signals: signals:
void selectionChanged ( const set<Selector*>&, Cell* ); void selectionChanged ( const set<Selector*>&, Cell* );
private:
QAction* _selectAction;
private: private:
SelectCommand ( const SelectCommand& ); SelectCommand ( const SelectCommand& );
SelectCommand& operator= ( const SelectCommand& ); SelectCommand& operator= ( const SelectCommand& );

View File

@ -79,6 +79,23 @@
hurricane/isobar/PyVertical.h hurricane/isobar/PyVertical.h
) )
install ( FILES ${includes} DESTINATION /include/hurricane/isobar )
if ( BUILD_STATIC )
add_library ( isobar-static STATIC ${sources} )
target_link_libraries ( isobar-static hurricane-static ${PYTHON_LIBRARIES} )
add_library ( Hurricane-static MODULE ${sources} )
set_target_properties ( Hurricane-static PROPERTIES
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
PREFIX ""
)
target_link_libraries ( Hurricane-static isobar-static hurricane-static ${PYTHON_LIBRARIES} )
install ( TARGETS isobar-static DESTINATION /lib )
install ( TARGETS Hurricane-static DESTINATION /lib/python )
else ( BUILD_STATIC )
add_library ( isobar SHARED ${sources} ) add_library ( isobar SHARED ${sources} )
target_link_libraries ( isobar hurricane ${PYTHON_LIBRARIES} ) target_link_libraries ( isobar hurricane ${PYTHON_LIBRARIES} )
@ -91,4 +108,4 @@
install ( TARGETS isobar DESTINATION /lib ) install ( TARGETS isobar DESTINATION /lib )
install ( TARGETS Hurricane DESTINATION /lib/python ) install ( TARGETS Hurricane DESTINATION /lib/python )
install ( FILES ${includes} DESTINATION /include/hurricane/isobar ) endif ( BUILD_STATIC )