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_Entity
30 %ConvertToSubClassCode
31 switch ( sipCpp->GetKind() )
34 sipClass = sipClass_HYDROData_Image;
38 // We don't recognise the type.
44 #include <HYDROData_Image.h>
51 * \param theImage new image
53 void SetImage( const QImage& theImage );
56 * Load the image from file
57 * \param theFilePath path to image
59 bool LoadImage( const QString& theFilePath );
62 * Returns the kept image
67 * Stores the image transformation
68 * \param theTrsf new transformation
70 void SetTrsf( const QTransform& theTrsf );
73 * Returns the kept transformation, or "identity" if not yet stored
78 * Stores the image transformation points (3 input + 3 output)
79 * \param thePointAIn input point A
80 * \param thePointBIn input point B
81 * \param thePointCIn input point C
82 * \param thePointAOut output point A
83 * \param thePointBOut output point B
84 * \param thePointCOut output point C
86 void SetTrsfPoints( const QPoint& thePointAIn,
87 const QPoint& thePointBIn,
88 const QPoint& thePointCIn,
89 const QPointF& thePointAOut,
90 const QPointF& thePointBOut,
91 const QPointF& thePointCOut );
94 * Returns the image transformation points (3 input + 3 output)
95 * \param thePointAIn input point A
96 * \param thePointBIn input point B
97 * \param thePointCIn input point C
98 * \param thePointAOut output point A
99 * \param thePointBOut output point B
100 * \param thePointCOut output point C
102 void TrsfPoints( QPoint& thePointAIn,
105 QPointF& thePointAOut,
106 QPointF& thePointBOut,
107 QPointF& thePointCOut );
110 * Returns the number of referenced images
111 * \return zero if there is no references
116 * Appends reference to other image.
117 * \param theReferenced the image referenced by this
119 void AppendReference( HYDROData_Entity theReferenced ) [void (Handle_HYDROData_Entity)];
122 Handle(HYDROData_Entity) aRefObj = createHandle( a0 );
123 if ( !aRefObj.IsNull() )
125 Py_BEGIN_ALLOW_THREADS
126 sipSelfWasArg ? sipCpp->HYDROData_Image::AppendReference( aRefObj ) :
127 sipCpp->AppendReference( aRefObj );
134 * Returns reference by index.
135 * \param theIndex number of reference [0; NbReference)
136 * \returns the referenced image, or Null if index is invalid
138 HYDROData_Entity Reference( const int theIndex ) const [Handle_HYDROData_Entity (const int)];
141 Handle(HYDROData_Entity) aRefObj;
143 Py_BEGIN_ALLOW_THREADS
144 aRefObj = sipSelfWasArg ? sipCpp->HYDROData_Image::Reference( a0 ) :
145 sipCpp->Reference( a0 );
148 sipRes = createPointer( aRefObj );
153 * Updates reference by index. If index is one-bigger than \a NbReferences,
154 * this method appends it to the end (NbReferences is incremented).
155 * \param theIndex number of reference [0; NbReference]
156 * \param theReferenced the image referenced by this
158 void ChangeReference( const int theIndex, HYDROData_Entity theReferenced ) [void (const int, Handle_HYDROData_Entity)];
161 Handle(HYDROData_Entity) aRefObj = createHandle( a1 );
162 if ( !aRefObj.IsNull() )
164 Py_BEGIN_ALLOW_THREADS
165 sipSelfWasArg ? sipCpp->HYDROData_Image::ChangeReference( a0, aRefObj ) :
166 sipCpp->ChangeReference( a0, aRefObj );
173 * Removes reference by index
174 * \param theIndex number of reference [0; NbReference)
176 void RemoveReference( const int theIndex );
179 * Removes all references.
181 void ClearReferences();
184 * Stores the operator name
185 * \param theOpName name of the operator that must be executed for image update
187 void SetOperatorName( const QString theOpName );
190 * Returns the operator name
191 * \returns the name of the operator that must be executed for image update
193 QString OperatorName();
196 * Stores the operator arguments
197 * \param theArgs array that stores the operator arguments, needed for execution
199 void SetArgs( const QByteArray& theArgs );
202 * Returns the operator arguments
203 * \returns array that stores the operator arguments, needed for execution
208 * Sets the "MustBeUpdated" flag: if image is depended on updated features.
209 * \param theFlag is true for images that must be updated, false for up-to-date
211 void MustBeUpdated( bool theFlag );
214 * Returns the "MustBeUpdated" flag: is image must be recomputed or not
215 * \returns false if image is up to date
217 bool MustBeUpdated();
223 * Creates new object in the internal data structure. Use higher level objects
224 * to create objects with real content.
229 * Destructs properties of the object and object itself, removes it from the document.