1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #include <HYDROData_Image.h>
27 class HYDROData_Image : HYDROData_Object
30 %ConvertToSubClassCode
31 if ( !Handle(HYDROData_Image)::DownCast( sipCpp ).IsNull() )
32 sipClass = sipClass_HYDROData_Image;
38 #include <HYDROData_Image.h>
43 const ObjectKind GetKind() const;
49 * \param theImage new image
51 void SetImage( const QImage& theImage );
54 * Load the image from file
55 * \param theFilePath path to image
57 bool LoadImage( const QString& theFilePath );
60 * Returns the kept image
65 * Stores the image transformation
66 * \param theTrsf new transformation
68 void SetTrsf( const QTransform& theTrsf );
71 * Returns the kept transformation, or "identity" if not yet stored
76 * Stores the image transformation points (3 input + 3 output)
77 * \param thePointAIn input point A
78 * \param thePointBIn input point B
79 * \param thePointCIn input point C
80 * \param thePointAOut output point A
81 * \param thePointBOut output point B
82 * \param thePointCOut output point C
84 void SetTrsfPoints( const QPoint& thePointAIn,
85 const QPoint& thePointBIn,
86 const QPoint& thePointCIn,
87 const QPointF& thePointAOut,
88 const QPointF& thePointBOut,
89 const QPointF& thePointCOut );
92 * Returns the image transformation points (3 input + 3 output)
93 * \param thePointAIn input point A
94 * \param thePointBIn input point B
95 * \param thePointCIn input point C
96 * \param thePointAOut output point A
97 * \param thePointBOut output point B
98 * \param thePointCOut output point C
100 void TrsfPoints( QPoint& thePointAIn,
103 QPointF& thePointAOut,
104 QPointF& thePointBOut,
105 QPointF& thePointCOut );
108 * Appends reference to other image.
109 * \param theReferenced the image referenced by this
111 void AppendReference( HYDROData_Object theReferenced ) [void (Handle_HYDROData_Object)];
114 Handle(HYDROData_Object) aRefObj = createHandle( a0 );
115 if ( !aRefObj.IsNull() )
117 Py_BEGIN_ALLOW_THREADS
118 sipSelfWasArg ? sipCpp->HYDROData_Image::AppendReference( aRefObj ) :
119 sipCpp->AppendReference( aRefObj );
126 * Returns the number of referenced images
127 * \return zero if there is no references
132 * Returns reference by index.
133 * \param theIndex number of reference [0; NbReference)
134 * \returns the referenced image, or Null if index is invalid
136 HYDROData_Object Reference( const int theIndex ) const [Handle_HYDROData_Object (const int)];
139 Handle(HYDROData_Object) aRefObj;
141 Py_BEGIN_ALLOW_THREADS
142 aRefObj = sipSelfWasArg ? sipCpp->HYDROData_Image::Reference( a0 ) :
143 sipCpp->Reference( a0 );
146 sipRes = createPointer( aRefObj );
151 * Updates reference by index. If index is one-bigger than \a NbReferences,
152 * this method appends it to the end (NbReferences is incremented).
153 * \param theIndex number of reference [0; NbReference]
154 * \param theReferenced the image referenced by this
156 void ChangeReference( const int theIndex, HYDROData_Object theReferenced ) [void (const int, Handle_HYDROData_Object)];
159 Handle(HYDROData_Object) aRefObj = createHandle( a1 );
160 if ( !aRefObj.IsNull() )
162 Py_BEGIN_ALLOW_THREADS
163 sipSelfWasArg ? sipCpp->HYDROData_Image::ChangeReference( a0, aRefObj ) :
164 sipCpp->ChangeReference( a0, aRefObj );
171 * Removes reference by index
172 * \param theIndex number of reference [0; NbReference)
174 void RemoveReference( const int theIndex );
177 * Removes all references.
179 void ClearReferences();
182 * Stores the operator name
183 * \param theOpName name of the operator that must be executed for image update
185 void SetOperatorName( const QString theOpName );
188 * Returns the operator name
189 * \returns the name of the operator that must be executed for image update
191 QString OperatorName();
194 * Stores the operator arguments
195 * \param theArgs array that stores the operator arguments, needed for execution
197 void SetArgs( const QByteArray& theArgs );
200 * Returns the operator arguments
201 * \returns array that stores the operator arguments, needed for execution
206 * Sets the "MustBeUpdated" flag: if image is depended on updated features.
207 * \param theFlag is true for images that must be updated, false for up-to-date
209 void MustBeUpdated( bool theFlag );
212 * Returns the "MustBeUpdated" flag: is image must be recomputed or not
213 * \returns false if image is up to date
215 bool MustBeUpdated();
221 * Creates new object in the internal data structure. Use higher level objects
222 * to create objects with real content.
227 * Destructs properties of the object and object itself, removes it from the document.