* In All top level CMakeList :
- Adds a CMAKE_POLICY CMP0003 has we've upgraded to cmake 2.6. * ./hurricane/src/hurricane : - Bug: In Interval, the merge method wasn't working if the "other" Interval was empty (doing merge) instead of nothing. This was a non-symetrical behavior. * ./hurricane/src/hviewer : - New: In CellViewer, adds an accessor to the ControlerWidget widget. - Bug: In CellViewer::imageDisplay(), when using GtkStyle the file dialog seems to core dump if the directory is not specified. Now systematically starts with the current working directory.
This commit is contained in:
parent
cc98bd541d
commit
dbe871fe7e
|
@ -202,9 +202,14 @@ Interval& Interval::merge(const DbU::Unit& v)
|
|||
Interval& Interval::merge(const Interval& interval)
|
||||
// ************************************************
|
||||
{
|
||||
if (!interval.isEmpty()) {
|
||||
_vMin = min(_vMin, interval._vMin);
|
||||
_vMax = max(_vMax, interval._vMax);
|
||||
if ( isEmpty() ) {
|
||||
_vMin = interval._vMin;
|
||||
_vMax = interval._vMax;
|
||||
} else {
|
||||
if (!interval.isEmpty()) {
|
||||
_vMin = min(_vMin, interval._vMin);
|
||||
_vMax = max(_vMax, interval._vMax);
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
// ****************************************************************************************************
|
||||
// File: ./hurricane/CompositeLayers.h
|
||||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
//
|
||||
// This file is part of Hurricane.
|
||||
//
|
||||
// Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||
// Lesser General Public License as published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
|
||||
// General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
|
||||
// not, see <http://www.gnu.org/licenses/>.
|
||||
// ****************************************************************************************************
|
||||
|
||||
#ifndef HURRICANE_COMPOSITE_LAYERS
|
||||
#define HURRICANE_COMPOSITE_LAYERS
|
||||
|
||||
#include "hurricane/Collection.h"
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
class CompositeLayer;
|
||||
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// CompositeLayers declaration
|
||||
// ****************************************************************************************************
|
||||
|
||||
typedef GenericCollection<CompositeLayer*> CompositeLayers;
|
||||
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// CompositeLayerLocator declaration
|
||||
// ****************************************************************************************************
|
||||
|
||||
typedef GenericLocator<CompositeLayer*> CompositeLayerLocator;
|
||||
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// CompositeLayerFilter declaration
|
||||
// ****************************************************************************************************
|
||||
|
||||
typedef GenericFilter<CompositeLayer*> CompositeLayerFilter;
|
||||
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// for_each_composite_layer declaration
|
||||
// ****************************************************************************************************
|
||||
|
||||
#define for_each_composite_layer(compositeLayer, compositeLayers)\
|
||||
/****************************************************************/\
|
||||
{\
|
||||
CompositeLayerLocator _locator = compositeLayers.getLocator();\
|
||||
while (_locator.isValid()) {\
|
||||
CompositeLayer* compositeLayer = _locator.getElement();\
|
||||
_locator.progress();
|
||||
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
#endif // HURRICANE_COMPOSITE_LAYERS
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// ****************************************************************************************************
|
|
@ -23,6 +23,7 @@
|
|||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <QAction>
|
||||
|
@ -457,7 +458,14 @@ namespace Hurricane {
|
|||
QImage image ( _cellWidget->width(), _cellWidget->height(), QImage::Format_RGB32 );
|
||||
_cellWidget->copyToImage ( &image, true ); //true for no scale (use for map congestion)
|
||||
|
||||
QString filePath = QFileDialog::getSaveFileName ( this, tr("Save image as ..."), "", tr("Image PNG ( *.png )") );
|
||||
char workingDirectory [1024];
|
||||
getcwd ( workingDirectory, 1024 );
|
||||
|
||||
QString filePath = QFileDialog::getSaveFileName ( this
|
||||
, tr("Save Image as ...")
|
||||
, workingDirectory
|
||||
, tr("Image (*.png)")
|
||||
);
|
||||
|
||||
image.save ( filePath, "png" );
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ namespace Hurricane {
|
|||
Cell* getCell ();
|
||||
virtual Cell* getCellFromDb ( const char* name );
|
||||
inline CellWidget* getCellWidget ();
|
||||
inline ControllerWidget* getControllerWidget ();
|
||||
void select ( Occurrence& );
|
||||
void unselect ( Occurrence& );
|
||||
void unselectAll ();
|
||||
|
@ -141,8 +142,9 @@ namespace Hurricane {
|
|||
inline void CellViewer::setEnableRedrawInterrupt ( bool state )
|
||||
{ _cellWidget->setEnableRedrawInterrupt(state); }
|
||||
|
||||
inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; }
|
||||
inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; }
|
||||
inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; }
|
||||
inline ControllerWidget* CellViewer::getControllerWidget () { return _controller; }
|
||||
inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; }
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
Loading…
Reference in New Issue