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_Image theReferenced ) [void (Handle_HYDROData_Image)];
114 Handle(HYDROData_Image) anImage =
115 Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
116 if ( !anImage.IsNull() )
118 Py_BEGIN_ALLOW_THREADS
119 sipSelfWasArg ? sipCpp->HYDROData_Image::AppendReference( anImage ) :
120 sipCpp->AppendReference( anImage );
127 * Returns the number of referenced images
128 * \return zero if there is no references
133 * Returns reference by index.
134 * \param theIndex number of reference [0; NbReference)
135 * \returns the referenced image, or Null if index is invalid
137 HYDROData_Image Reference( const int theIndex ) const [Handle_HYDROData_Image (const int)];
140 Handle(HYDROData_Image) anImage;
142 Py_BEGIN_ALLOW_THREADS
143 sipSelfWasArg ? sipCpp->HYDROData_Image::Reference( a0 ) :
144 sipCpp->Reference( a0 );
147 sipRes = dynamic_cast<HYDROData_Image*>( createPointer( anImage ) );
152 * Updates reference by index. If index is one-bigger than \a NbReferences,
153 * this method appends it to the end (NbReferences is incremented).
154 * \param theIndex number of reference [0; NbReference]
155 * \param theReferenced the image referenced by this
157 void ChangeReference( const int theIndex, HYDROData_Image theReferenced ) [void (const int, Handle_HYDROData_Image)];
160 Handle(HYDROData_Image) anImage =
161 Handle(HYDROData_Image)::DownCast( createHandle( a1 ) );
162 if ( !anImage.IsNull() )
164 Py_BEGIN_ALLOW_THREADS
165 sipSelfWasArg ? sipCpp->HYDROData_Image::ChangeReference( a0, anImage ) :
166 sipCpp->ChangeReference( a0, anImage );
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.