-This is the version 1.4.0 of SUPERV
+This is the version 1.4.1 of SUPERV
Compatible with :
- - KERNEL 1.4.0
+ - KERNEL 1.4.1
@COMMENCE@
-SUBDIRS = idl src examples
+SUBDIRS = idl src examples doc
RESOURCES_FILES = \
components.png \
steps.png \
SUPERV_en.xml \
SUPERV_fr.xml \
+SUPERV.config \
SUPERVCatalog.xml \
suspend-resume.gif \
Superv_tree_superv.png
# test if SALOMEconfig.h has changed (contents)
salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
@if ! [ -a $@ ]; then \
- cp -p $< $@; \
+ cp -p -f $< $@; \
fi; \
if ! cmp $< $@; then \
- cp -p $< $@; \
+ cp -p -f $< $@; \
fi; \
include/salome/sstream: salome_adm/unix/sstream
$(INSTALL) -d $(includedir)
@for f in X $(include_list); do \
if test $$f != X; then \
- ($(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
+ ($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1); \
fi; \
done
OMNIORB_IDL = @OMNIORB_IDL@
OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
-OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
+OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@
OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
CORBA_LIBS = @CORBA_LIBS@
CORBA_CXXFLAGS = @CORBA_CXXFLAGS@
-IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
+IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
IDLPYFLAGS = @IDLPYFLAGS@
IDL = @IDL@
sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
incmakedir=${prefix}/salome_adm/unix
-docdir=$(datadir)/doc
+docdir=${prefix}/doc/salome
#
# begin of package rules
#
-.PHONY: all lib bin inc resources data doc tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
+.PHONY: all lib bin inc resources data docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
.SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm
-THIS IS SALOME - SUPERV VERSION: 1.4.0
+THIS IS SALOME - SUPERV VERSION: 1.4.1
fi
# make other build directories
-for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl
+for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl
do
# if test ! -d $rep ; then
# eval mkdir $rep
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
dnl directory
-cd bin
+mkdir -p bin/salome
+cd bin/salome
for i in $ROOT_SRCDIR/bin/*
do
local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
case "$local_bin" in
*.in | *~) ;;
- ./bin/CVS) ;;
- *) ln -fs $i; echo $local_bin ;;
+ ./bin/CVS | ./bin/salome) ;;
+ *) /usr/bin/install -C $i .; echo $local_bin ;;
esac
done
cd $ROOT_BUILDDIR
srcdir=@srcdir@
VPATH=.:@srcdir@
-SUBDIRS=html
+SUBDIRS= salome
-doc:
+@COMMENCE@
+
+docs:
@@SETX@; for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) $@) || exit 1; \
done
@@SETX@; for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) $@) || exit 1; \
done
+
+uninstall:
+ @@SETX@; for d in $(SUBDIRS); do \
+ (cd $$d && $(MAKE) $@) || exit 1; \
+ done
#
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
#
+
#
#
# File : Makefile.in
# Module : idl
-
top_srcdir=@top_srcdir@
top_builddir=..
srcdir=@srcdir@
-VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome
+VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
@COMMENCE@
PY_CLIENT_IDL = $(IDL_FILES)
# we copy all idl file in $(top_builddir)/idl
-inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
+inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
+
+$(top_builddir)/idl/salome:
+ mkdir $@
-$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
+$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
# $(CP) $< $@
- cp -f $< $@
+ cp -f $^ $(top_builddir)/idl/salome
lib: pyidl
$(PYTHON_BUILD_SITE):
$(INSTALL) -d $@
-$(PYTHON_BUILD_SITE)/%_idl.py: %.idl
+$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
install: install-pyidl install-idl
# create directory $(idldir) and copy idl files into it
-install-idl: $(IDL_FILES)
+install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
$(INSTALL) -d $(idldir)
$(INSTALL_DATA) $^ $(idldir)
-install-pyidl: $(IDL_FILES)
+install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
$(INSTALL) -d $(PYTHON_SITE_INSTALL)
@for file in $^ dummy; do \
if [ $$file != "dummy" ]; then \
distclean:
-$(RM) *.py
- -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
+ -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
-$(RM) Makefile
</menu-item>
</menubar>
- <toolbar label-id="Supervision">
+ <toolbar label-id="Supervisor">
<toolbutton-item item-id="301" label-id="Import" icon-id="import.gif" tooltip-id="Import Dataflow" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="302" label-id="Export" icon-id="export.gif" tooltip-id="Export Dataflow" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="303" label-id="New" icon-id="edit.png" tooltip-id="New Dataflow" accel-id="" toggle-id="" execute-action=""/>
//info = new SUPERVGUI_Information();
cursor = desktop->cursor();
connect(desktop->getMainFrame(), SIGNAL(windowActivated(QWidget*)), this, SLOT(setMain(QWidget*)));
+
+ int anId = 300;
+ parent->menuBar()->changeItem(anId,parent->getComponentUserName("SUPERV"));
+
};
}
VIEW_GRAPHSUPERV, false);
if (aStudyFrame) {
connect(aStudyFrame,
- SIGNAL(sfBeforeStudyFrameClosing(QAD_StudyFrame*)),
+ SIGNAL(sfStudyFrameClosing(QAD_StudyFrame*)),
&Supervision,
SLOT(onGraphClosed(QAD_StudyFrame*)));
}
compnameV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
compnameV->setMinimumSize( 200, 0 );
compnameV->setReadOnly( true/*isReadOnly*/ );
- compnameV->setText( SUPERV::FNode::_narrow(node)->GetComponentName() );
+ compnameV->setText( QAD_Application::getDesktop()->getComponentUserName(
+ SUPERV::FNode::_narrow(node)->GetComponentName()) );
intnameL = new QLabel( tr( "INTERFACE_NAME_LBL" ), TopGroup );
intnameV = new QLineEdit( TopGroup );
myThread = new SUPERVGUI_Thread();
myThread->setMain(this);
+ connect(this, SIGNAL(KillMyThread(bool)), myThread, SLOT(KillThread(bool)));
myIsKilled = false;
//myIsRunned = false;
delete notification; // kloss : nota bene : quand un datalow est detruit : verifier que les canaux de notification sont aussi detruit
if (!SUPERV_isNull(dataflow)) {
if (dataflow->IsExecuting()) {
- if (QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"),
+ if (QMessageBox::warning(QAD_Application::getDesktop(),
+ tr("WARNING"),
tr("MSG_DF_RUNNING"),
tr("MSG_DF_EXECUTION"),
tr("MSG_DF_KILL")) == 1) {
- dataflow->Kill();
+ if (dataflow->Kill()) {
+ if (myThread->running())
+ myThread->wait();
+ }
+ }
+ else {
+ emit KillMyThread(true);
+ if (myThread->running())
+ myThread->wait();
}
}
+ else {
+ emit KillMyThread(true);
+ if (myThread->running())
+ myThread->wait();
+ }
}
}
}
}
-
-
/******************************* SUPERVGUI_Thread class ****************************************/
SUPERVGUI_Thread::SUPERVGUI_Thread()
:QThread()
void SUPERVGUI_Thread::stopThread(const char* m)
{
- //myIsActive = false;
- //myMain->sync();
myMain->getMessage()->setMessage(m);
}
myMain = theMain;
}
+void SUPERVGUI_Thread::KillThread(bool theValue)
+{
+ myMutex.lock();
+ myIsActive = !(theValue);
+ myMutex.unlock();
+}
+
void SUPERVGUI_Thread::run()
{
SUPERV_CNode aNode = NULL;
if (aEvent == SUPERV::UndefinedEvent && aState == SUPERV::UndefinedState
||
- aEvent == SUPERV::NoEvent && aState == SUPERV::NoState) {
+ aEvent == SUPERV::NoEvent && aState == SUPERV::NoState
+ ||
+ aEvent == SUPERV::KillEvent && aState == SUPERV::KillState) {
if (myMain->getEventNodes().count()) {
myMain->removeEventNodes();
}
case SUPERV_Error :
stopThread(tr("MSG_GRAPH_ABORTED"));
break;
+
+ case SUPERV_Kill:
+ stopThread(tr("MSG_GRAPH_KILLED"));
+ break;
}
break;
//if list not empty call execute() -> sync()
char * aNodeName = *(myMain->getEventNodes().getFirst());
SUPERV::GraphState aNodeState = *(myMain->getStates().getFirst());
- qApp->lock();
- myMain->execute(aNodeName,aNodeState); //this is from main
- qApp->unlock();
+ if (!qApp->locked()) {
+ qApp->lock();
+ myMain->execute(aNodeName,aNodeState); //this is from main
+ qApp->unlock();
+ }
+ else
+ myMain->execute(aNodeName,aNodeState); //this is from main
+
myMain->removeFirstEN();
myMain->removeFirstS();
}
void lockedGraph(bool theLock) { myIsLocked = theLock; }
bool isLocked() { return myIsLocked; }
+ bool isKilled() { return myIsKilled; }
SUPERV::GraphState getNodeExecState();
void setNodeExecState(SUPERV::GraphState theNodeExecState);
void startTimer();
void executionFinished();
+ signals:
+ void KillMyThread(bool theValue);
+
public slots:
void execute(char * theNodeNode, SUPERV::GraphState theNodeState);
void sync();
void stopThread(const char* m);
void setMain(SUPERVGUI_Main* theMain);
+ public slots:
+ void KillThread(bool theValue);
+
protected:
void run();
private:
bool myIsActive;
SUPERVGUI_Main* myMain;
+ QMutex myMutex;
};
//QHGroupBox* aAddBox = new QHGroupBox(tr("TIT_ADDNODE"), aCorbaPane); //!!
//aAddBox->setInsideSpacing(20); //!!
- QPushButton* aComputeCBtn = new QPushButton(tr("TIT_ADDCNODE"), aCorbaPane); //!!
- connect(aComputeCBtn, SIGNAL(clicked()), this, SLOT(addComputeNode())); //!!
- aComputeCBtn->setDefault(false);
+//NRI QPushButton* aComputeCBtn = new QPushButton(tr("TIT_ADDCNODE"), aCorbaPane); //!!
+//NRI connect(aComputeCBtn, SIGNAL(clicked()), this, SLOT(addComputeNode())); //!!
+//NRI aComputeCBtn->setDefault(false);
QPushButton* aComputeBtn = new QPushButton(tr("TIT_ADDFNODE"), aCorbaPane);
connect(aComputeBtn, SIGNAL(clicked()), this, SLOT(addFactoryNode()));
aComputeBtn->setDefault(true);
aBaseLayout->addWidget(aComputeBtn);
- aBaseLayout->addWidget(aComputeCBtn); //!!
+ //NRI aBaseLayout->addWidget(aComputeCBtn); //!!
aBaseLayoutV->insertLayout(-1, aBaseLayout);
myTabPane->addTab(aCorbaPane, tr("MODULES_PANE"));
long nbComp = lComponents->length();
for (int i=0; i<nbComp; i++) {
SALOME_ModuleCatalog::Acomponent_ptr C = (*aModuleCatalog)->GetComponent((char *)lComponents[i]);
- QListViewItem* myComponentItem = new QListViewItem(components, (char*)lComponents[i]);
+ QListViewItem* myComponentItem = new QListViewItem(components, (char*)C->componentusername());
myComponentItem->setSelectable(false);
QString aIconName = C->component_icone();
if (!aIconName.isEmpty()) {
}
void SUPERVGUI_Service::addComputeNode() {
+ QAD_Desktop* aDesktop = QAD_Application::getDesktop();
SUPERVGUI_Main* aMain = Supervision.getMain();
if (aMain==0) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
+ QMessageBox::warning(aDesktop, tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
} else {
CORBA::Object_ptr obj = naming->Resolve("/Kernel/ModulCatalog");
SALOME_ModuleCatalog::ModuleCatalog_var* aModuleCatalog = new SALOME_ModuleCatalog::ModuleCatalog_var;
const char* service = item->text(0).latin1();
const char* interface = item->parent()->text(0).latin1();
const char* component = item->parent()->parent()->text(0).latin1();
- SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
+ SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(aDesktop->getComponentName(component));
if (myComponent==NULL) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
+ QMessageBox::warning(aDesktop, tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
} else {
const SALOME_ModuleCatalog::Service* myService = myComponent->GetService(interface, service);
b = true;
}
}
if (!b) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NONODE_TOADD"));
+ QMessageBox::warning(aDesktop, tr("WARNING"), tr("MSG_NONODE_TOADD"));
}
}
}
}
void SUPERVGUI_Service::addFactoryNode() {
+ QAD_Desktop* aDesktop = QAD_Application::getDesktop();
SUPERVGUI_Main* aMain = Supervision.getMain();
if (aMain==0) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
+ QMessageBox::warning(aDesktop, tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
} else {
CORBA::Object_ptr obj = naming->Resolve("/Kernel/ModulCatalog");
SALOME_ModuleCatalog::ModuleCatalog_var* aModuleCatalog = new SALOME_ModuleCatalog::ModuleCatalog_var;
if (item->isSelected()) {
const char* service = item->text(0).latin1();
const char* interface = item->parent()->text(0).latin1();
- const char* component = item->parent()->parent()->text(0).latin1();
+ const char* component = aDesktop->getComponentName(item->parent()->parent()->text(0).latin1());
SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
if (myComponent==NULL) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
+ QMessageBox::warning(aDesktop, tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
} else {
const SALOME_ModuleCatalog::Service* myService = myComponent->GetService(interface, service);
b = true;
- SUPERV_FNode node = aMain->getDataflow()->FNode(component, interface, *myService);
- if (CORBA::is_nil(node)) {
- QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
- return;
+ MESSAGE ( " myService->TypeOfNode == " << myService->TypeOfNode )
+
+ if ( myService->TypeOfNode == 0 ) { // ComputeNode
+ SUPERV_CNode node = aMain->getDataflow()->CNode(*myService);
+ if (CORBA::is_nil(node)) {
+ QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
+ return;
+ }
+ node->Coords(myX, myY);
+ myX += NODE_DX;
+ myY += NODE_DY;
+ aMain->addComputeNode(SUPERV::CNode::_narrow(node));
+ } else { // Factory Node
+ SUPERV_FNode node = aMain->getDataflow()->FNode(component, interface, *myService);
+ if (CORBA::is_nil(node)) {
+ QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
+ return;
+ }
+ node->Coords(myX, myY);
+ myX += NODE_DX;
+ myY += NODE_DY;
+ aMain->addComputeNode(SUPERV::CNode::_narrow(node));
+
}
- node->Coords(myX, myY);
- myX += NODE_DX;
- myY += NODE_DY;
- aMain->addComputeNode(SUPERV::CNode::_narrow(node));
- }
+
+// SUPERV_FNode node = aMain->getDataflow()->FNode(component, interface, *myService);
+// if (CORBA::is_nil(node)) {
+// QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
+// return;
+// }
+// node->Coords(myX, myY);
+// myX += NODE_DX;
+// myY += NODE_DY;
+// aMain->addComputeNode(SUPERV::CNode::_narrow(node));
+ }
}
}
if (!b) {
#include "SUPERVGUI_View.h"
#include "SUPERVGUI_Main.h"
#include "QAD_Config.h"
-
+#include <qcolordialog.h>
#if QT_VERSION >= 0x030005
myPopup->insertItem(tr("MSG_COPY_DATAFLOW"), main, SLOT(copy()));
myPopup->insertItem(tr("MSG_FILTER_NOTIFY"), main, SLOT(filterNotification()));
+ myPopup->insertSeparator();
+ myPopup->insertItem(tr("MSG_CHANGE_BACKGROUND"), this, SLOT(changeBackground()));
+
QString aRed = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorRed");
QString aGreen = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorGreen");
QString aBlue = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorBlue");
int SUPERVGUI_View::getLastY() {
return myLastY;
}
+void SUPERVGUI_View::changeBackground()
+{
+ QColor selColor = QColorDialog::getColor(viewport()->paletteBackgroundColor(), this );
+ if ( selColor.isValid() ) {
+ setPaletteBackgroundColor( selColor );
+ }
+}
public slots:
void addToStudy();
+ void changeBackground();
protected:
void viewportMouseMoveEvent(QMouseEvent* theEvent);
msgid "MSG_FILTER_NOTIFY"
msgstr "Filter Notification"
+msgid "MSG_CHANGE_BACKGROUND"
+msgstr "Change background..."
+
msgid "MSG_SWITCH_GRAPH"
msgstr "Switch Graph"
msgstr "Add Compute Node"
msgid "TIT_ADDFNODE"
-msgstr "Add Factory Node"
+msgstr "Add Node"
msgid "BTN_FACTORYNODE"
msgstr "Factory"