1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef HYDROGUI_ZONE_H
20 #define HYDROGUI_ZONE_H
22 #include "HYDROGUI_DataObject.h"
24 #include <HYDROData_Zone.h>
30 * \class HYDROGUI_Zone
31 * \brief Browser item presenting a zone, used for object browser tree creation.
33 * This is an Object Browser item that contains reference to a zone data structure
36 class HYDROGUI_Zone : public HYDROGUI_DataObject
41 * \param theParent parent data object
42 * \param theData reference to the corresponding object from data structure
43 * \param theParentEntry entry of the parent data object (for reference objects)
44 * \param theIsInOperation if true then the tree is used for a browser within an operation, it is false by default
46 HYDROGUI_Zone( SUIT_DataObject* theParent,
47 Handle(HYDROData_Zone) theData,
48 const QString& theParentEntry,
49 const bool theIsInOperation = false );
52 * Returns the text for the specified column.
54 QString text( const int = NameId ) const;
57 * Returns the color for the specified column.
59 QColor color( const ColorRole theColorRole, const int theColumnId = NameId ) const;
62 * Return true because zones are draggable.
64 bool isDraggable() const { return true; }
66 bool renameAllowed( const int = NameId ) const;
67 //bool setName( const QString& );
70 * Returns true if it is a zone which needs merge of bathymetries.
72 bool isMergingNeed() const;
75 * Returns the list of source object names.
77 QStringList getObjects() const;
80 * Returns the merging type for conflict altidudes.
82 HYDROData_Zone::MergeType getMergeType() const;
85 * Set the merging type for conflict altidudes/types.
86 * If the type is Merge_Object then use the second parameter to set the merge bathymetry/land cover.
88 void setMergeType( int theMergeType, QString theMergeObjectName = QString() );
91 QString getRefObjectNames() const;
92 QString getObjectName() const;