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 * Returns the kept image
59 * Stores the image transformation
60 * \param theTrsf new transformation
62 void SetTrsf( const QTransform& theTrsf );
65 * Returns the kept transformation, or "identity" if not yet stored
70 * Stores the image transformation points (3 input + 3 output)
71 * \param thePointAIn input point A
72 * \param thePointBIn input point B
73 * \param thePointCIn input point C
74 * \param thePointAOut output point A
75 * \param thePointBOut output point B
76 * \param thePointCOut output point C
78 void SetTrsfPoints( const QPoint& thePointAIn,
79 const QPoint& thePointBIn,
80 const QPoint& thePointCIn,
81 const QPointF& thePointAOut,
82 const QPointF& thePointBOut,
83 const QPointF& thePointCOut );
86 * Returns the image transformation points (3 input + 3 output)
87 * \param thePointAIn input point A
88 * \param thePointBIn input point B
89 * \param thePointCIn input point C
90 * \param thePointAOut output point A
91 * \param thePointBOut output point B
92 * \param thePointCOut output point C
94 void TrsfPoints( QPoint& thePointAIn,
97 QPointF& thePointAOut,
98 QPointF& thePointBOut,
99 QPointF& thePointCOut );
102 * Appends reference to other image.
103 * \param theReferenced the image referenced by this
105 void AppendReference( HYDROData_Image theReferenced ) [void (Handle_HYDROData_Image)];
108 Handle(HYDROData_Image) anImage =
109 Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
110 if ( !anImage.IsNull() )
112 Py_BEGIN_ALLOW_THREADS
113 sipSelfWasArg ? sipCpp->HYDROData_Image::AppendReference( anImage ) :
114 sipCpp->AppendReference( anImage );
121 * Returns the number of referenced images
122 * \return zero if there is no references
127 * Returns reference by index.
128 * \param theIndex number of reference [0; NbReference)
129 * \returns the referenced image, or Null if index is invalid
131 HYDROData_Image Reference( const int theIndex ) const [Handle_HYDROData_Image (const int)];
134 Handle(HYDROData_Image) anImage;
136 Py_BEGIN_ALLOW_THREADS
137 sipSelfWasArg ? sipCpp->HYDROData_Image::Reference( a0 ) :
138 sipCpp->Reference( a0 );
141 sipRes = dynamic_cast<HYDROData_Image*>( createPointer( anImage ) );
146 * Updates reference by index. If index is one-bigger than \a NbReferences,
147 * this method appends it to the end (NbReferences is incremented).
148 * \param theIndex number of reference [0; NbReference]
149 * \param theReferenced the image referenced by this
151 void ChangeReference( const int theIndex, HYDROData_Image theReferenced ) [void (const int, Handle_HYDROData_Image)];
154 Handle(HYDROData_Image) anImage =
155 Handle(HYDROData_Image)::DownCast( createHandle( a1 ) );
156 if ( !anImage.IsNull() )
158 Py_BEGIN_ALLOW_THREADS
159 sipSelfWasArg ? sipCpp->HYDROData_Image::ChangeReference( a0, anImage ) :
160 sipCpp->ChangeReference( a0, anImage );
167 * Removes reference by index
168 * \param theIndex number of reference [0; NbReference)
170 void RemoveReference( const int theIndex );
173 * Removes all references.
175 void ClearReferences();
178 * Stores the operator name
179 * \param theOpName name of the operator that must be executed for image update
181 void SetOperatorName( const QString theOpName );
184 * Returns the operator name
185 * \returns the name of the operator that must be executed for image update
187 QString OperatorName();
190 * Stores the operator arguments
191 * \param theArgs array that stores the operator arguments, needed for execution
193 void SetArgs( const QByteArray& theArgs );
196 * Returns the operator arguments
197 * \returns array that stores the operator arguments, needed for execution
202 * Sets the "MustBeUpdated" flag: if image is depended on updated features.
203 * \param theFlag is true for images that must be updated, false for up-to-date
205 void MustBeUpdated( bool theFlag );
208 * Returns the "MustBeUpdated" flag: is image must be recomputed or not
209 * \returns false if image is up to date
211 bool MustBeUpdated();
217 * Creates new object in the internal data structure. Use higher level objects
218 * to create objects with real content.
223 * Destructs properties of the object and object itself, removes it from the document.