X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_Main.h;h=274a179848a2a189abcd66bd2562a18a3f6bcb8b;hb=ea7f29f75031ca13b9454f5e9ac73730f1f584eb;hp=4009f82beadf77d76ebdf759f991cba78c1acf90;hpb=7d3931c54614b3d73351551e662ccbd3be07a0d8;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_Main.h b/src/SUPERVGUI/SUPERVGUI_Main.h index 4009f82..274a179 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.h +++ b/src/SUPERVGUI/SUPERVGUI_Main.h @@ -58,8 +58,7 @@ class SUPERVGUI_Main: public SUPERVGraph_View { SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, SUPERV_Graph); virtual ~SUPERVGUI_Main(); - void run(); - void startExecute(); + void run( const bool andSuspend ); void kill(); void suspendResume(); //void stopRestart(); @@ -85,16 +84,13 @@ class SUPERVGUI_Main: public SUPERVGraph_View { QString getHashCode() { return myHashCode; }; - + + bool isDataflowInStudy() const; bool isEditable() { if (SUPERV_isNull(dataflow)) return false; return !dataflow->IsReadOnly(); }; - bool isFromStudy() { return myIsFromStudy; } - void setAsFromStudy(bool theToStudy); - void checkIsInStudy(); - void addComputeNode(SUPERV_CNode theNode); void addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode, bool Update); void addGOTONode(SUPERV_CNode theNode); @@ -126,13 +122,16 @@ class SUPERVGUI_Main: public SUPERVGraph_View { bool eventFilter( QObject* o, QEvent* e); - bool IsGUIEventLoopFinished() const { return myGUIEventLoopFinished; } - void Editing(); // any Editing operation is to be performed -> // activate Editors data model in Engine + bool ReadyToModify(); // must be called before any modification + // operation - asks to kill execution of dataflow. If returns false - + // modification (==Editing() ) is not allowed. void removeArrayChild(SUPERV::CNode_ptr theNode); + GraphViewType getViewType() { return myCurrentView; } + signals: void KillMyThread(bool theValue); @@ -140,7 +139,7 @@ class SUPERVGUI_Main: public SUPERVGraph_View { void execute(char * theNodeNode, SUPERV::GraphState theNodeState); void sync(); void syncAsync(); - bool addStudy(); + void addDataflowToStudy(); void insertFile(); void addNode(); void changeInformation(); @@ -175,45 +174,39 @@ class SUPERVGUI_Main: public SUPERVGraph_View { QAD_ObjectBrowser* objectBrowser; QAD_Message* message; - GraphViewType myCurrentView; + GraphViewType myCurrentView; SUPERVGUI_CanvasArray* myArray; SUPERVGUI_ArrayView* myArrayView; SUPERVGUI_Canvas* myCanvas; SUPERVGUI_CanvasView* myCanvasView; - bool choosing; + bool choosing; - QString myHashCode; + QString myHashCode; - bool myIsFromStudy; - int myCopyNum; + bool myIsFromStudy; + int myCopyNum; - SALOME_NamingService* myNService; - QDateTime myRunTime; // mpv 23.12.2002: we need time of running of dataflow - // for right Study document modification + SALOME_NamingService* myNService; + QDateTime myRunTime; // mpv 23.12.2002: we need time of running of dataflow + // for correct Study document modification /* notification data */ - NOTIFICATION_Consumer* notification; - bool myFiltered; - bool myLogged; - QString myLogFileName; - FILE* myLogFile; - bool myWarning; - bool myStep; - bool myTrace; - bool myVerbose; - bool myIsLocked; - - SUPERVGUI_Thread* myThread; + NOTIFICATION_Consumer* notification; + bool myFiltered; + bool myLogged; + QString myLogFileName; + FILE* myLogFile; + bool myWarning; + bool myStep; + bool myTrace; + bool myVerbose; + bool myIsLocked; + + SUPERVGUI_Thread* myThread; QPtrList< char * > myEventNodes ; QPtrList< SUPERV::GraphState > myStates ; - QTimer* myTimer; - - // asv : 18.11.04 : fix for bug 6170 : this field is FALSE when SUPERVGUI_Thread - // is inside event loop during graph execution. dataflow->IsDone() returns true - // BEFORE all events are handled (a few of them are still being processed in GUI thread), - // and for bug 6170 it is neccessary to know exactly when GUI events processing stops.. - bool myGUIEventLoopFinished; + QTimer* myTimer; }; class SUPERVGUI_Thread : public QObject, public QThread { @@ -223,7 +216,6 @@ class SUPERVGUI_Thread : public QObject, public QThread { ~SUPERVGUI_Thread(); void startThread(const char* m); - void stopThread(const char* m); void setMain(SUPERVGUI_Main* theMain); public slots: