#include "HYDROGUI_ColorWidget.h"
+#include <QApplication>
#include <QColorDialog>
HYDROGUI_ColorWidget::HYDROGUI_ColorWidget( QWidget* parent )
setPalette( aPalette );
}
+void HYDROGUI_ColorWidget::resetColor()
+{
+ QPalette aDefPalette = QApplication::palette();
+ QColor aColor = aDefPalette.color( QPalette::Window );
+ setColor( aColor );
+}
+
void HYDROGUI_ColorWidget::mouseDoubleClickEvent( QMouseEvent* )
{
QColor c = QColorDialog::getColor( color(), this );
QColor color() const;
/** Sets color value */
void setColor( const QColor& );
+ /** Resets the default color value */
+ void resetColor();
/** \return color value in the integer form */
//int intColor() const;
/** Sets color value in the integer form */
bool HYDROGUI_DataModel::isModified() const
{
- int aStudyId = module()->application()->activeStudy()->id();
- return HYDROData_Document::Document( aStudyId )->IsModified();
+ return getDocument()->IsModified();
}
bool HYDROGUI_DataModel::isSaved() const
Handle(HYDROData_Object) HYDROGUI_DataModel::objectByEntry( const QString& theEntry,
const ObjectKind theObjectKind )
{
- const int aStudyId = module()->application()->activeStudy()->id();
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
+ Handle(HYDROData_Document) aDocument = getDocument();
if( !aDocument.IsNull() )
{
HYDROData_Iterator anIterator( aDocument, theObjectKind );
void HYDROGUI_Displayer::DisplayAll( const int theViewerId,
const bool theIsForced )
{
- HYDROGUI_DataModel* aModel = (HYDROGUI_DataModel*)myModule->dataModel();
- if( aModel )
- {
- HYDROData_SequenceOfObjects aSeq;
- HYDROGUI_Tool::GetPrsSubObjects( aModel, theViewerId, aSeq );
- Update( aSeq, theViewerId, theIsForced );
- }
+ HYDROData_SequenceOfObjects aSeq;
+ HYDROGUI_Tool::GetPrsSubObjects( myModule, theViewerId, aSeq );
+ Update( aSeq, theViewerId, theIsForced );
}
void HYDROGUI_Displayer::Update( const HYDROData_SequenceOfObjects& theObjs,
aMappingLayout->setColumnStretch( 7, 2 ); // seconds (double with 4 digits)
// Common
- addWidget( myFileNameGroup, 0, 0 );
- addWidget( myImageNameGroup, 1, 0 );
- addWidget( myMappingGroup, 2, 0 );
-
- setRowStretch();
+ addWidget( myFileNameGroup );
+ addWidget( myImageNameGroup );
+ addWidget( myMappingGroup );
+ addStretch();
connect( aBrowseBtn, SIGNAL( clicked() ), this, SLOT( onBrowse() ) );
}
#include "HYDROGUI_Tool.h"
#include "HYDROGUI_UpdateFlags.h"
-#include <HYDROData_Document.h>
-
#include <GraphicsView_ViewManager.h>
#include <GraphicsView_ViewPort.h>
#include <GraphicsView_Viewer.h>
if( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anImageName ) )
{
// check that there are no other objects with the same name in the document
- Handle(HYDROData_Object) anObject = findObjectByName( anImageName, KIND_UNKNOWN );
+ Handle(HYDROData_Object) anObject = HYDROGUI_Tool::FindObjectByName( module(), anImageName );
if( !anObject.IsNull() )
{
theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anImageName );
anImageName = myEditedObject->GetName();
}
else
- {
- int anImageId = 1;
- while( anImageId < 100 )
- {
- anImageName = QString( "Image_%1" ).arg( QString::number( anImageId++ ) );
-
- // check that there are no other objects with the same name in the document
- Handle(HYDROData_Object) anObject = findObjectByName( anImageName, KIND_UNKNOWN );
- if( anObject.IsNull() )
- break;
- }
- }
+ anImageName = HYDROGUI_Tool::GenerateObjectName( module(), "Image" );
aPanel->setImageName( anImageName );
aPanel->initializePointSelection();
setWidget( aFrame );
QVBoxLayout* aLayout = new QVBoxLayout( aFrame );
- myMainFrame = new QFrame( this );
- QGridLayout* aMainLayout = new QGridLayout( myMainFrame );
+ myMainFrame = new QFrame( aFrame );
+ QBoxLayout* aMainLayout = new QVBoxLayout( myMainFrame );
aMainLayout->setMargin( 0 );
aMainLayout->setSpacing( 5 );
- myBtnFrame = new QFrame( this );
+ myBtnFrame = new QFrame( aFrame );
aLayout->addWidget( myMainFrame, 1 );
aLayout->addWidget( myBtnFrame, 0 );
{
}
-void HYDROGUI_InputPanel::addWidget( const QString& theLabel, QWidget* theWidget )
+void HYDROGUI_InputPanel::addWidget( QWidget* theWidget )
{
- QGridLayout* aMainLayout = dynamic_cast<QGridLayout*>( myMainFrame->layout() );
- int aRow = aMainLayout->rowCount();
- aMainLayout->addWidget( new QLabel( theLabel, this ), aRow, 0 );
- aMainLayout->addWidget( theWidget, aRow, 1 );
+ QBoxLayout* aMainLayout = dynamic_cast<QBoxLayout*>( myMainFrame->layout() );
+ aMainLayout->addWidget( theWidget );
}
-void HYDROGUI_InputPanel::addWidget( QWidget* theWidget,
- const int theRow,
- const int theColumn )
+void HYDROGUI_InputPanel::addStretch()
{
- QGridLayout* aMainLayout = dynamic_cast<QGridLayout*>( myMainFrame->layout() );
- aMainLayout->addWidget( theWidget, theRow, theColumn );
-}
-
-void HYDROGUI_InputPanel::addSeparator()
-{
- QGridLayout* aMainLayout = dynamic_cast<QGridLayout*>( myMainFrame->layout() );
- int aRow = aMainLayout->rowCount();
-
- QFrame* aLine = new QFrame();
- aLine->setFrameShape( QFrame::HLine );
- aLine->setFrameShadow( QFrame::Sunken );
-
- aMainLayout->addWidget( aLine, aRow, 0, 1, 2 );
-}
-
-void HYDROGUI_InputPanel::setRowStretch()
-{
- QGridLayout* aMainLayout = dynamic_cast<QGridLayout*>( myMainFrame->layout() );
- int aRow = aMainLayout->rowCount();
- aMainLayout->setRowStretch( aRow, 1 );
+ QBoxLayout* aMainLayout = dynamic_cast<QBoxLayout*>( myMainFrame->layout() );
+ aMainLayout->addStretch();
}
HYDROGUI_InputPanel( HYDROGUI_Module* theModule, const QString& theTitle );
virtual ~HYDROGUI_InputPanel();
- void addWidget( const QString& theLabel, QWidget* theWidget );
- void addWidget( QWidget* theWidget, const int theRow, const int theColumn );
- void addSeparator();
- void setRowStretch();
+ void addWidget( QWidget* theWidget );
+ void addStretch();
HYDROGUI_Module* module() const;
setUpdateEnabled( false );
if( ( flags & UF_Model ) && getDataModel() )
- {
getDataModel()->update( getStudyId() );
- }
- else
- {
- /* to do
- if( ( flags & UF_ObjBrowser ) && getObjectBrowser() )
- updateObjectBrowser();
- */
- }
+
+ if( ( flags & UF_ObjBrowser ) && getApp() )
+ getApp()->updateObjectBrowser( true );
if( ( flags & UF_Viewer ) )
updateGV( flags & UF_GV_Init,
#include <LightApp_GVSelector.h>
#include <LightApp_SelectionMgr.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+
#include <QLayout>
#include <QLineEdit>
#include <QToolButton>
: QAbstractButton( theParent ), myModule( theModule )
{
QHBoxLayout* aLayout = new QHBoxLayout( this );
+ aLayout->setMargin( 0 );
+ aLayout->setSpacing( 5 );
myBtn = new QToolButton( this );
myBtn->setCheckable( true );
myBtn->setChecked( false );
aLayout->addWidget( myBtn, 0 );
aLayout->addWidget( myObjName, 1 );
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ myBtn->setIcon( QIcon( aResMgr->loadPixmap( "HYDRO", tr( "SELECT_ICO" ) ) ) );
+
SUIT_SelectionMgr* aSelMgr = theModule->getApp()->selectionMgr();
connect( myBtn, SIGNAL( toggled( bool ) ), this, SLOT( OnToggled( bool ) ) );
{
return myObjName->text();
}
+
+void HYDROGUI_ObjSelector::Clear()
+{
+ myObjName->clear();
+ myBtn->setChecked( false );
+}
HYDROGUI_ObjSelector( HYDROGUI_Module* theModule, QWidget* theParent );
virtual ~HYDROGUI_ObjSelector();
+ void Clear();
+
QString GetName() const;
protected:
Handle_HYDROData_Document HYDROGUI_Operation::doc() const
{
- int aStudyId = myModule->application()->activeStudy()->id();
- return HYDROData_Document::Document( aStudyId );
-}
-
-Handle_HYDROData_Object HYDROGUI_Operation::findObjectByName( const QString& theName, int theKind ) const
-{
- HYDROData_Iterator anIt( doc(), theKind );
- for( ; anIt.More(); anIt.Next() )
- {
- if( anIt.Current()->GetName() == theName )
- return anIt.Current();
- }
- return Handle_HYDROData_Object();
+ return HYDROData_Document::Document( myModule->getStudyId() );
}
void HYDROGUI_Operation::onApply()
virtual void processCancel();
Handle_HYDROData_Document doc() const;
- Handle_HYDROData_Object findObjectByName( const QString& theName, int theKind ) const;
protected slots:
virtual void onApply();
HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QString& theTitle )
: HYDROGUI_InputPanel( theModule, theTitle )
{
- CurveCreator_Curve *aStaticCurve = NULL;
+ CurveCreator_Curve *aStaticCurve = NULL;
- aStaticCurve = new CurveCreator_Curve(CurveCreator::Dim3d);
+ aStaticCurve = new CurveCreator_Curve(CurveCreator::Dim3d);
- CurveCreator_Widget *aWidget =
- new CurveCreator_Widget( this, aStaticCurve);
+ CurveCreator_Widget *aWidget =
+ new CurveCreator_Widget( this, aStaticCurve);
- addWidget( aWidget, 0, 0 );
- setRowStretch();
+ addWidget( aWidget );
+ addStretch();
}
HYDROGUI_PolylineDlg::~HYDROGUI_PolylineDlg()
aWorkstack->setActiveWindow( aViewWindow );
}
-void HYDROGUI_Tool::GetPrsSubObjects( const HYDROGUI_DataModel* theModel,
+void HYDROGUI_Tool::GetPrsSubObjects( HYDROGUI_Module* theModule,
const int theViewerId, // currently unused
HYDROData_SequenceOfObjects& theSeq )
{
- if( !theModel )
- return;
-
- const int aStudyId = theModel->module()->application()->activeStudy()->id();
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
if( aDocument.IsNull() )
return;
return aSeq.First();
return NULL;
}
+
+Handle(HYDROData_Object) HYDROGUI_Tool::FindObjectByName( HYDROGUI_Module* theModule,
+ const QString& theName,
+ const ObjectKind theObjectKind )
+{
+ Handle(HYDROData_Object) anObject;
+
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ if( aDocument.IsNull() )
+ return anObject;
+
+ HYDROData_Iterator anIter( aDocument, theObjectKind );
+ for( ; anIter.More(); anIter.Next() )
+ {
+ Handle(HYDROData_Object) anObjectRef = anIter.Current();
+ if( !anObjectRef.IsNull() && anObjectRef->GetName() == theName )
+ {
+ anObject = anObjectRef;
+ break;
+ }
+ }
+ return anObject;
+}
+
+QString HYDROGUI_Tool::GenerateObjectName( HYDROGUI_Module* theModule,
+ const QString& thePrefix )
+{
+ QString aName;
+ int anId = 1;
+ while( anId < 100 )
+ {
+ aName = QString( "%1_%2" ).arg( thePrefix ).arg( QString::number( anId++ ) );
+
+ // check that there are no other objects with the same name in the document
+ Handle(HYDROData_Object) anObject = FindObjectByName( theModule, aName, KIND_UNKNOWN );
+ if( anObject.IsNull() )
+ break;
+ }
+ return aName;
+}
/**
* \brief Get sub-objects to build presentations.
- * \param theModel data model
+ * \param theModule module
* \param theViewerId viewer id
* \param theSeq sequence of sub-objects
*/
- static void GetPrsSubObjects( const HYDROGUI_DataModel* theModel,
+ static void GetPrsSubObjects( HYDROGUI_Module* theModule,
const int theViewerId,
HYDROData_SequenceOfObjects& theSeq );
* \return selected data object
*/
static Handle(HYDROData_Object) GetSelectedObject( HYDROGUI_Module* theModule );
+
+ /**
+ * \brief Find the data object with the specified name.
+ * \param theModule module
+ * \param theName name
+ * \param theObjectKind kind of object
+ * \return data object
+ */
+ static Handle(HYDROData_Object) FindObjectByName( HYDROGUI_Module* theModule,
+ const QString& theName,
+ const ObjectKind theObjectKind = KIND_UNKNOWN );
+
+ /**
+ * \brief Generate name for new object.
+ * \param theModule module
+ * \param thePrefix name prefix
+ * \return generated name
+ */
+ static QString GenerateObjectName( HYDROGUI_Module* theModule,
+ const QString& thePrefix );
};
#endif
#include "HYDROGUI_TwoImagesDlg.h"
-#include "HYDROGUI_ObjSelector.h"
#include "HYDROGUI_ColorWidget.h"
+#include "HYDROGUI_ObjSelector.h"
+#include <QGroupBox>
+#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QRadioButton>
HYDROGUI_TwoImagesDlg::HYDROGUI_TwoImagesDlg( HYDROGUI_Module* theModule, const QString& theTitle )
: HYDROGUI_InputPanel( theModule, theTitle )
{
- myName = new QLineEdit();
- myImage1 = new HYDROGUI_ObjSelector( module(), 0 );
- myImage2 = new HYDROGUI_ObjSelector( module(), 0 );
- myTransparent = new QRadioButton( tr( "TRANSPARENT" ) );
+ // Image name
+ QGroupBox* anImageNameGroup = new QGroupBox( tr( "IMAGE_NAME" ) );
+
+ QLabel* anImageNameLabel = new QLabel( tr( "NAME" ), anImageNameGroup );
+ myImageName = new QLineEdit( anImageNameGroup );
+
+ QBoxLayout* anImageNameLayout = new QHBoxLayout( anImageNameGroup );
+ anImageNameLayout->setMargin( 5 );
+ anImageNameLayout->setSpacing( 5 );
+ anImageNameLayout->addWidget( anImageNameLabel );
+ anImageNameLayout->addWidget( myImageName );
+
+ // Image name
+ QGroupBox* aParamGroup = new QGroupBox( tr( "PARAMETERS" ) );
+
+ QLabel* anImage1Label = new QLabel( tr( "IMAGE_1" ), aParamGroup );
+ myImage1 = new HYDROGUI_ObjSelector( theModule, aParamGroup );
+
+ QLabel* anImage2Label = new QLabel( tr( "IMAGE_2" ), aParamGroup );
+ myImage2 = new HYDROGUI_ObjSelector( theModule, aParamGroup );
+
+ QFrame* aBackgroundFrame = new QFrame( aParamGroup );
+ QLabel* aBackgroundLabel = new QLabel( tr( "BACKGROUND" ), aBackgroundFrame );
+ myTransparent = new QRadioButton( tr( "TRANSPARENT" ), aBackgroundFrame );
myTransparent->setChecked( true );
- myColor = new QRadioButton( tr( "COLOR" ) );
- myColorBox = new HYDROGUI_ColorWidget( 0 );
-
- addWidget( tr( "NAME" ), myName );
- addSeparator();
- addWidget( tr( "IMAGE_1" ), myImage1 );
- addWidget( tr( "IMAGE_2" ), myImage2 );
-
- QFrame* aBackground = new QFrame();
- QGridLayout* aLayout = new QGridLayout( aBackground );
- aLayout->addWidget( myTransparent, 0, 0 );
- aLayout->addWidget( myColor, 1, 0 );
- aLayout->addWidget( myColorBox, 1, 1 );
-
- addWidget( tr( "BACKGROUND" ), aBackground );
- addSeparator();
- setRowStretch();
+ myColor = new QRadioButton( tr( "COLOR" ), aBackgroundFrame );
+ myColorBox = new HYDROGUI_ColorWidget( aBackgroundFrame );
+
+ QGridLayout* aBackgroundLayout = new QGridLayout( aBackgroundFrame );
+ aBackgroundLayout->setMargin( 0 );
+ aBackgroundLayout->setSpacing( 5 );
+ aBackgroundLayout->addWidget( aBackgroundLabel, 0, 0, 2, 1 );
+ aBackgroundLayout->addWidget( myTransparent, 0, 1 );
+ aBackgroundLayout->addWidget( myColor, 1, 1 );
+ aBackgroundLayout->addWidget( myColorBox, 1, 2 );
+
+ QGridLayout* aParamLayout = new QGridLayout( aParamGroup );
+ aParamLayout->setMargin( 5 );
+ aParamLayout->setSpacing( 5 );
+ aParamLayout->addWidget( anImage1Label, 0, 0 );
+ aParamLayout->addWidget( myImage1, 0, 1 );
+ aParamLayout->addWidget( anImage2Label, 1, 0 );
+ aParamLayout->addWidget( myImage2, 1, 1 );
+ aParamLayout->addWidget( aBackgroundFrame, 2, 0, 1, 2 );
+
+ // Common
+ addWidget( anImageNameGroup );
+ addWidget( aParamGroup );
+ addStretch();
}
HYDROGUI_TwoImagesDlg::~HYDROGUI_TwoImagesDlg()
{
}
-QString HYDROGUI_TwoImagesDlg::GetName() const
+void HYDROGUI_TwoImagesDlg::reset()
+{
+ myImageName->clear();
+ myImage1->Clear();
+ myImage2->Clear();
+ myTransparent->setChecked( true );
+ myColorBox->resetColor();
+}
+
+void HYDROGUI_TwoImagesDlg::setImageName( const QString& theName )
+{
+ myImageName->setText( theName );
+}
+
+QString HYDROGUI_TwoImagesDlg::getImageName() const
{
- return myName->text();
+ return myImageName->text();
}
-void HYDROGUI_TwoImagesDlg::GetSelectedImages( QString& theName1, QString& theName2 ) const
+bool HYDROGUI_TwoImagesDlg::getSelectedImages( QString& theName1,
+ QString& theName2 ) const
{
theName1 = myImage1->GetName();
theName2 = myImage2->GetName();
+ return !theName1.isEmpty() && !theName2.isEmpty();
}
HYDROGUI_TwoImagesDlg( HYDROGUI_Module* theModule, const QString& theTitle );
virtual ~HYDROGUI_TwoImagesDlg();
- QString GetName() const;
- void GetSelectedImages( QString& theEntry1, QString& theEntry2 ) const;
+ void reset();
+
+ void setImageName( const QString& theName );
+ QString getImageName() const;
+
+ bool getSelectedImages( QString& theName1,
+ QString& theName2 ) const;
private:
- QLineEdit* myName;
- HYDROGUI_ObjSelector *myImage1, *myImage2;
- QRadioButton *myTransparent, *myColor;
- HYDROGUI_ColorWidget* myColorBox;
+ QLineEdit* myImageName;
+ HYDROGUI_ObjSelector* myImage1;
+ HYDROGUI_ObjSelector* myImage2;
+ QRadioButton* myTransparent;
+ QRadioButton* myColor;
+ HYDROGUI_ColorWidget* myColorBox;
};
#endif
#include "HYDROGUI_TwoImagesOp.h"
#include "HYDROGUI_Module.h"
+#include "HYDROGUI_Tool.h"
#include "HYDROGUI_TwoImagesDlg.h"
#include "HYDROGUI_UpdateFlags.h"
return new HYDROGUI_TwoImagesDlg( module(), getName() );
}
+void HYDROGUI_TwoImagesOp::startOperation()
+{
+ HYDROGUI_Operation::startOperation();
+
+ HYDROGUI_TwoImagesDlg* aPanel = (HYDROGUI_TwoImagesDlg*)inputPanel();
+ aPanel->reset();
+
+ QString anImageName = HYDROGUI_Tool::GenerateObjectName( module(), getName() );
+ aPanel->setImageName( anImageName );
+}
+
bool HYDROGUI_TwoImagesOp::processApply( int& theUpdateFlags,
QString& theErrorMsg )
{
HYDROGUI_TwoImagesDlg* aPanel = dynamic_cast<HYDROGUI_TwoImagesDlg*>( inputPanel() );
- QString aNewName = aPanel->GetName();
+ QString anImageName = aPanel->getImageName();
+ if( anImageName.isEmpty() )
+ return false;
- QString aName1, aName2;
- aPanel->GetSelectedImages( aName1, aName2 );
+ QString aSelectedName1, aSelectedName2;
+ if( !aPanel->getSelectedImages( aSelectedName1, aSelectedName2 ) )
+ return false;
- if( aNewName.isEmpty() || aName1.isEmpty() || aName2.isEmpty() )
+ // check that there are no other objects with the same name in the document
+ Handle(HYDROData_Object) anObject = HYDROGUI_Tool::FindObjectByName( module(), anImageName );
+ if( !anObject.IsNull() )
+ {
+ theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anImageName );
return false;
+ }
Handle(HYDROData_Image) anImage1 = Handle(HYDROData_Image)::DownCast(
- findObjectByName( aName1, KIND_IMAGE ) );
+ HYDROGUI_Tool::FindObjectByName( module(), aSelectedName1, KIND_IMAGE ) );
Handle(HYDROData_Image) anImage2 = Handle(HYDROData_Image)::DownCast(
- findObjectByName( aName2, KIND_IMAGE ) );
+ HYDROGUI_Tool::FindObjectByName( module(), aSelectedName2, KIND_IMAGE ) );
if( anImage1.IsNull() || anImage2.IsNull() )
return false;
if( aResult.IsNull() )
return false;
- aResult->SetName( aNewName );
+ aResult->SetName( anImageName );
aResult->AppendReference( anImage1 );
aResult->AppendReference( anImage2 );
aFactory->UpdateImage( doc(), aResult );
virtual ~HYDROGUI_TwoImagesOp();
protected:
+ virtual void startOperation();
+
virtual HYDROGUI_InputPanel* createInputPanel() const;
- virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg );
+ virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg );
private:
int myType;
<source>REDO_ICO</source>
<translation>icon_redo.png</translation>
</message>
+ <message>
+ <source>SELECT_ICO</source>
+ <translation>icon_select.png</translation>
+ </message>
<message>
<source>UNDO_ICO</source>
<translation>icon_undo.png</translation>
<source>INPUT_VALID_DATA</source>
<translation>Please enter valid data and try again.</translation>
</message>
+ <message>
+ <source>OBJECT_EXISTS_IN_DOCUMENT</source>
+ <translation>Object with name '%1' already exists in the document.</translation>
+ </message>
</context>
<context>
<name>HYDROGUI_DataModel</name>
<source>MAPPING</source>
<translation>Mapping</translation>
</message>
- <message>
- <source>OBJECT_EXISTS_IN_DOCUMENT</source>
- <translation>Object with name '%1' already exists in the document.</translation>
- </message>
<message>
<source>POINTS_A_B_C_BELONG_TO_SINGLE_LINE</source>
<translation>Points A, B, C belong to a single line.</translation>
<source>IMAGE_2</source>
<translation>Image 2</translation>
</message>
+ <message>
+ <source>IMAGE_NAME</source>
+ <translation>Image name</translation>
+ </message>
<message>
<source>NAME</source>
<translation>Name</translation>
</message>
+ <message>
+ <source>PARAMETERS</source>
+ <translation>Parameters</translation>
+ </message>
<message>
<source>TRANSPARENT</source>
<translation>Transparent</translation>
// fill by arguments and process the operation
ImageComposer_Operator* anOp = Operator(theImage);
if (anOp) { // update image only if there is an operation
+ QTransform aTransform;
ImageComposer_Image anImage1; // first referenced image
if (theImage->NbReferences()) {
Handle(HYDROData_Image) anImage = theImage->Reference(0);
anImage1 = anImage->Image();
anImage1.setTransform(anImage->Trsf());
+ aTransform = anImage1.transform();
}
ImageComposer_Image anImage2; // second referenced image
if (theImage->NbReferences() > 1) {
}
ImageComposer_Image aResImg = anOp->process(anImage1, anImage2);
theImage->SetImage(aResImg);
+ theImage->SetTrsf(aTransform);
}
// change the states of this and all depended images
theImage->MustBeUpdated(true);