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_TOOL_H
20 #define HYDROGUI_TOOL_H
22 #include <HYDROData_Entity.h>
25 class TCollection_AsciiString;
26 class HYDROData_Document;
28 class TCollection_HAsciiString;
29 class TCollection_HExtendedString;
34 namespace HYDROGUI_Tool
36 QString ToQString( const TCollection_AsciiString& );
37 QString ToQString( const TCollection_ExtendedString& );
38 QString ToQString( const Handle(TCollection_HAsciiString)& );
39 QString ToQString( const Handle(TCollection_HExtendedString)& );
40 TCollection_AsciiString ToAsciiString( const QString& );
41 TCollection_ExtendedString ToExtString( const QString& );
42 Handle(TCollection_HAsciiString) ToHAsciiString( const QString& );
43 Handle(TCollection_HExtendedString) ToHExtString( const QString& );
45 QString GetTempDir( const bool theToCreate );
47 QDockWidget* WindowDock( QWidget* wid );
49 QStringList FindExistingObjectsNames( const Handle(HYDROData_Document)& theDoc,
50 const ObjectKind theObjectKind,
51 bool isCheckValidProfile = false );
52 QString GetCoordinateString( const double theNumber, bool isInLocale );
54 Handle(Image_PixMap) Pixmap( const QImage& theImage );
56 void GetObjectReferences( const Handle(HYDROData_Entity)& theObj,
57 HYDROData_SequenceOfObjects& theRefObjects,
58 QStringList& theRefNames );
59 HYDROData_SequenceOfObjects GetObjectBackReferences( const Handle(HYDROData_Entity)& theObj );
60 QMap<QString,HYDROData_SequenceOfObjects> GetObjectsBackReferences
61 ( const Handle(HYDROData_Document)& theDocument, const QStringList& theObjectNames );