X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_Main.h;h=d319f2adfa80d82f7287b93e4bcbf2f030e432ee;hb=cbb0219fe6d6bf11f98f2306c2855fef1eaa2d44;hp=b8140ecf5b5e07d81544d710d7efb3cbcfb3e7d3;hpb=b7b531f894fd0a967071ce2b05e0ced7b4743f3b;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_Main.h b/src/SUPERVGUI/SUPERVGUI_Main.h index b8140ec..d319f2a 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.h +++ b/src/SUPERVGUI/SUPERVGUI_Main.h @@ -28,14 +28,11 @@ #ifndef SUPERVGUI_Main_H #define SUPERVGUI_Main_H -//#include "SUPERVGUI.h" #include "SUPERVGraph_ViewFrame.h" -#include "SUPERVGUI_Array.h" -#include "SUPERVGUI_Graph.h" #include "QAD_Desktop.h" -#include "SUPERVGUI_Port.h" #include "SUPERVGUI_Canvas.h" #include "SUPERVGUI_CanvasView.h" +#include "SUPERVGUI_ArrayView.h" #include #include @@ -44,15 +41,20 @@ class QAD_Study; class QAD_ObjectBrowser; class QAD_Message; +class QAD_SpinBoxDbl; +class QLineEdit; +class QComboBox; class NOTIFICATION_Consumer; class SUPERVGUI_Thread; class SUPERVGUI_Main: public SUPERVGraph_View { Q_OBJECT + // asv : 18.11.04 : making Thread class a friend in order to allow it to modify + // a private field myGUIEventLoopFinished + friend class SUPERVGUI_Thread; + public: - SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, bool fromIOR); - SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, bool isModify, const char* filename); SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, SUPERV_Graph); virtual ~SUPERVGUI_Main(); @@ -61,14 +63,12 @@ class SUPERVGUI_Main: public SUPERVGraph_View { void kill(); void suspendResume(); void stopRestart(); - bool exportDataflow(QString theFile); void openSubGraph(SUPERV_CNode theNode, bool correct = false); bool putDataStudy(SUPERV_Port port, const char* inout); - void setData(SUPERVGUI_PortIn* p); - SUPERVGUI_Graph* getGraph(); - SUPERVGUI_Array* getArray(); + SUPERVGUI_CanvasArray* getCanvasArray(); + SUPERVGUI_ArrayView* getArrayView(); SUPERVGUI_Canvas* getCanvas(); SUPERVGUI_CanvasView* getCanvasView(); SUPERV_Graph getDataflow(); @@ -127,6 +127,11 @@ 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 + signals: void KillMyThread(bool theValue); @@ -139,10 +144,11 @@ class SUPERVGUI_Main: public SUPERVGraph_View { void addNode(); void changeInformation(); void copy(); - void showTable(); - void showFullGraph(); + + void showCanvasTable(); void showContolFlow(); void showCanvas(); + void filterNotification(); void changeDSGraphParameters(); void onSubGraphClosed(QAD_StudyFrame* ); @@ -156,6 +162,7 @@ class SUPERVGUI_Main: public SUPERVGraph_View { void init(QAD_Desktop* parent); void syncNotification(); bool isFiltered(char* graph, char* node, char* type, char* message, char* sender, long counter, char* date, long stamp); + void closeEvent(QCloseEvent*); SUPERV_Graph dataflow; @@ -166,15 +173,14 @@ class SUPERVGUI_Main: public SUPERVGraph_View { QAD_Study* study; QAD_ObjectBrowser* objectBrowser; QAD_Message* message; - SUPERVGUI_Graph* graph; GraphViewType myCurrentView; - SUPERVGUI_Array* array; + SUPERVGUI_CanvasArray* myArray; + SUPERVGUI_ArrayView* myArrayView; SUPERVGUI_Canvas* myCanvas; SUPERVGUI_CanvasView* myCanvasView; bool choosing; - SUPERVGUI_PortIn* portIn; QString myHashCode; @@ -202,6 +208,12 @@ class SUPERVGUI_Main: public SUPERVGraph_View { 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; }; class SUPERVGUI_Thread : public QObject, public QThread { @@ -227,7 +239,9 @@ class SUPERVGUI_Thread : public QObject, public QThread { }; -//************************************************************** +/** + * A dialog for setting Graph execution parameters + */ class SUPERVGUI_DSGraphParameters: public QDialog { Q_OBJECT @@ -239,9 +253,9 @@ class SUPERVGUI_DSGraphParameters: public QDialog { void accept(); private: - + void setData(); - + QAD_SpinBoxDbl* myDeltaTime; QLineEdit* myTimeOut; QComboBox* myDataStreamTrace;