2) Fix for bug PAL7037 : "Filter Notification" functionality doesn't work.
updateObjBrowser();
//QApplication::restoreOverrideCursor();
+
+ // mkr : PAL7037 => rename engine of the graph (i.e. corresponding SUPERV_Graph) -->
+ if ( obj->FindAttribute(anAttr, "AttributeIOR") ) {
+ _PTR(AttributeIOR) anIOR ( anAttr );
+ SUPERV_Graph aDataFlow = engine->getGraph(anIOR->Value().c_str());
+ if ( !SUPERV_isNull(aDataFlow) ) {
+ if ( aDataFlow->IsStreamGraph() ) {
+ SUPERV_StreamGraph aStreamDataFlow = aDataFlow->ToStreamGraph();
+ if ( !SUPERV_isNull(aStreamDataFlow) )
+ aStreamDataFlow->SetName( nm.latin1() );
+ }
+ else
+ aDataFlow->SetName( nm.latin1() );
+ }
+ }
+ // mkr : PAL7037 <--
}
}
}
QMap<QString, QString> SUPERVGUI::getInterfaceNameMap() const {
return myInterfaceNameMap;
}
+
+bool SUPERVGUI::updateDataFlowSOName( SUPERV::Graph_ptr theDataflow ) {
+ if ( !SUPERV_isNull(theDataflow) ) {
+ _PTR(Study) aStudy = (( SalomeApp_Study* )study)->studyDS();
+ _PTR(SObject) aSO ( aStudy->FindObjectIOR( theDataflow->getIOR() ) );
+
+ _PTR(GenericAttribute) anAttr;
+ if ( aSO ) // i.e. if theDataflow is in study
+ if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
+ _PTR(AttributeName) aName ( anAttr );
+ aName->SetValue( theDataflow->Name() );
+ updateObjBrowser();
+ return true;
+ }
+ }
+ return false;
+}
QColor getIVFBackgroundColor() { return myIVFBackgroundColor; }
void setIVFBackgroundColor( QColor theColor ) { if ( myInitialViewFrame ) myIVFBackgroundColor = theColor; }
+ // mkr : PAL7037
+ /*!
+ * \brief The method update name of the given dataflow, if this dataflow is in study.
+ * Returns true if update was done.
+ */
+ bool updateDataFlowSOName( SUPERV::Graph_ptr theDataflow );
+
signals:
void KillMainThread(bool theValue);
QString aLabelTxt(myPort->Name());
- SUPERV_CNode aNode = myPort->Node();
+ /*SUPERV_CNode aNode = myPort->Node();
SALOME_ModuleCatalog::Service* aService = aNode->Service();
SALOME_ModuleCatalog::ListOfServicesParameter aList;
aList = (myPort->IsInput())? aService->ServiceinParameter : aService->ServiceoutParameter;
break;
}
}
-
- aLabelTxt += QString(":");
+ aLabelTxt += QString(":");*/
+
+ // mkr : the following way is easyer to get ports' type than commented above
+ QString aPortType = QString(myPort->Type());
+ aLabelTxt += QString(" (") + aPortType + QString("):");
+
myLabel = new QLabel(aLabelTxt, theParent );
myValue = new QLineEdit( theParent );
aPalette.setInactive(aPalette.disabled());
aPalette.setActive(aPalette.disabled());
myValue->setPalette(aPalette);
- }
+ }
+ // mkr : PAL6276 -->
+ else {
+ if ( !aPortType.compare(QString("boolean")) )
+ myValue->setValidator( new QIntValidator( 0, 1, theParent ) );
+
+ if ( !aPortType.compare(QString("short")) || !aPortType.compare(QString("int")) || !aPortType.compare(QString("long")) )
+ myValue->setValidator( new QIntValidator( theParent ) );
+
+ if ( !aPortType.compare(QString("float")) || !aPortType.compare(QString("double")) )
+ myValue->setValidator( new QDoubleValidator( theParent ) );
+
+ if ( !aPortType.compare(QString("char")) ) {
+ QRegExp aRX( "." );
+ myValue->setValidator( new QRegExpValidator( aRX, theParent ) );
+
+ }
+ }
+ // mkr : PAL6276 <--
myValue->installEventFilter( this );
}
// Module : SUPERV
#include "SUPERVGUI_Information.h"
+#include "SUPERVGUI.h"
#include "CAM_Application.h"
#include "SUIT_Desktop.h"
#include <qgroupbox.h>
#include <qlayout.h>
-
/*!
Constructor
*/
Trace("SUPERVGUI_Information::okButton");
//mkr : modifications for fixing bug IPAL9972
bool aIsAccept = true;
- if ( QString( myNode->Name() ).compare( nameV->text() ) != 0 )
+ if ( QString( myNode->Name() ).compare( nameV->text() ) != 0 ) {
if ( !myNode->SetName( nameV->text().latin1()) ) {
QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr( "ERROR" ), tr( "MSG_CANT_RENAMENODE" ) );
aIsAccept = false;
}
+ // mkr : PAL7037 => update dataflow name in object browser if this dialog called for the dataflow and the dataflow is in study -->
+ if ( myNode->IsGraph() || myNode->IsStreamGraph() ) {
+ SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+ if ( aSupMod ) aSupMod->updateDataFlowSOName(SUPERV::Graph::_narrow(myNode));
+ }
+ // mkr : PAL7037 <--
+ }
myNode->SetAuthor( authV->text().latin1() );
if (myNode->IsFactory()) {
SUPERV_FNode aFNode = SUPERV::FNode::_narrow(myNode);
myMainNotif->setVerbose( false );
/* nodes notification */
- QObjectList* ihmList = myMain->/*getGraph()->*/queryList( "SUPERVGUI_CanvasNode" );
+ // mkr : PAL7037 -->
+ //QObjectList* ihmList = myMain->/*getGraph()->*/queryList( "SUPERVGUI_CanvasNode" );
+ QObjectList* ihmList;
+ if ( myMain->getViewType() == CANVASTABLE )
+ ihmList = myMain->getCanvasArray()->queryList( "SUPERVGUI_CanvasNode" );
+ else
+ ihmList = myMain->getCanvas()->queryList( "SUPERVGUI_CanvasNode" );
+ // mkr : PAL7037 <--
QObjectListIt i( *ihmList );
SUPERVGUI_CanvasNode* theNode;
while ( ( theNode = ( ( SUPERVGUI_CanvasNode* )i.current() ) ) != 0) {