X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI.h;h=32b6b231b64104eb72f363de2c4c6beef4ff3b36;hb=ea7f29f75031ca13b9454f5e9ac73730f1f584eb;hp=93e18122d540016eed2436ed3c742eed1e74f5bd;hpb=628503854743434655e81a0b11c9b9955315608e;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI.h b/src/SUPERVGUI/SUPERVGUI.h index 93e1812..32b6b23 100644 --- a/src/SUPERVGUI/SUPERVGUI.h +++ b/src/SUPERVGUI/SUPERVGUI.h @@ -1,14 +1,34 @@ -// File : SUPERVGUI.h -// Created : 31 octobre 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_H #define SUPERVGUI_H -// Acces a l'ihm de SALOME +// Acces a l`ihm de SALOME // ----------------------- #include "QAD_Desktop.h" @@ -19,15 +39,16 @@ #include "SUPERVGUI_Main.h" //#include "SUPERVGUI_Information.h" +#include "SALOMEGUI.h" // Definition de la classe principale du module de supervision // ----------------------------------------------------------- -class SUPERVGUI: public QObject { +class SUPERVGUI: public SALOMEGUI { Q_OBJECT public: - SUPERVGUI(); + SUPERVGUI( const QString&, QObject* = 0 ); virtual ~SUPERVGUI(); QAD_Desktop* getDesktop(); @@ -53,8 +74,19 @@ class SUPERVGUI: public QObject { void init(QAD_Desktop* parent); SUPERVGUI_Main* getMain(); - void customPopup(QPopupMenu* popup); - void activeStudyChanged(); + + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + bool SetSettings(QAD_Desktop* parent); + void DefinePopup(QString & theContext, + QString & theParent, + QString & theObject ) ; + bool CustomPopup(QAD_Desktop* parent, + QPopupMenu* popup, + const QString & theContext, + const QString & theParent, + const QString & theObject); + bool ActiveStudyChanged( QAD_Desktop* parent ); + void SupportedViewType (int* buffer, int bufferSize); bool isContains(QAD_Study* theStudy, const QString theKey); @@ -68,16 +100,34 @@ class SUPERVGUI: public QObject { */ void whatIsSelected(const Handle(SALOME_InteractiveObject)& theObj, bool& theIsOwner, bool& theIsDataflow); + /* asv : bug [VSR Bugs and Improvements in Supervisor] 1.8 : when exporting a file, + a backup copy of an existing file must be created (in case Export fails..) + This method creates a backup file and returns its name or QString::null if it fails + Function is static because it is called from + SUPERVGUI::exportDataflow() and SUPERVGUI_CanvasMacroNode::exportDataflow() + */ + static QString createBackupFile( const QString& theOriginalFileName ); + + signals: + void KillMainThread(bool theValue); + private slots: void setMain(QWidget* w); void displayDataflow(); void renameDataflow(); void deleteObject(); - void onGraphClosed(QAD_StudyFrame* ); + void onGraphClosed(QAD_ViewFrame* ); private: void loadEngine(SALOME_NamingService* namingService); + // enumeration used in newDataflow() method + enum NEW_DF_MODE { Import, Modify, New }; + // method called from importDataflow(), modifyDataflow(), newDataflow() with + // different modes. The behavior of the function is very similar in all 3 cases, + // but some differences still exist. These differences are implemented using NEW_DF_MODE param. + bool createDataflow( const NEW_DF_MODE f ); + static int factory; QAD_Desktop* desktop; QAD_Study* study;