#include "QAD_Application.h"
#include "QAD_OperatorMenus.h"
#include "QAD_Menus.h"
-#include "QAD_HelpWindow.h"
+//NRI#include "QAD_HelpWindow.h"
#include "QAD_Action.h"
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
+#include "SALOME_Selection.h"
// IDL Headers
#include <SALOMEconfig.h>
#include <qfiledialog.h>
#include <qtoolbutton.h>
-// Open CASCADE Includes
-#include <OSD_SharedLibrary.hxx>
-
class QAD_XmlHandler;
+class SALOMEGUI;
+class SALOME_Event;
class QAD_EXPORT QAD_Desktop : public QMainWindow
{
protected:
//NRI - unused - : enum ComponentType {GEOM, MESH, SOLVER, DATA, VISU, OTHER} ;
- enum { FileNewId = 0, FileOpenId, FileLoadId, FileCloseId, FileSaveId, FileSaveAsId, FilePropsId, FileExitId,
+ enum { FileNewId = -1000, FileOpenId, FileLoadId, FileCloseId, FileSaveId, FileSaveAsId, FilePropsId, FileExitId,
ViewStatusBarId,
SelectionPointId, SelectionEdgeId, SelectionCellId, SelectionActorId,
PrefViewerOCCId, PrefViewerVTKId, PrefGraphSupervisorId, PrefViewerPlot2dId,
DefaultViewerOCCId, DefaultViewerVTKId, DefaultGraphSupervisorId, DefaultPlot2dId,
//VRV: T2.5 - add default viewer
PrefViewerTrihedronId, PrefConsoleFontId, PrefObjectBrowserEntryId,
- PrefObjectBrowserIAPPId, PrefObjectBrowserValueId, PrefObjectBrowserCHRONO_SORTId,
- PrefDirsId, PrefMultiFileSave, PrefASCIISave, PrefSaveId,
+ PrefObjectBrowserIAPPId, PrefObjectBrowserValueId, PrefObjectBrowserCHRONO_SORTId,PrefObjectBrowserShowUseCaseId,
+ PrefObjectBrowserNoAutoSizeColumnsId,
+ PrefDirsId, PrefMultiFileSave, PrefASCIISave, PrefUndoLevelId, PrefExternalBrowserId, PrefSaveId,
//NRI : SAL2214
WindowNew3dId, ViewOCCId, ViewVTKId, ViewPlot2dId,
//NRI : SAL2214
WindowCascadeId, WindowTileId,
- HelpContentsId, HelpSearchId, HelpWhatsThisId, HelpAboutId };
+ HelpContentsId, HelpContentsModuleId,
+ HelpSearchId, HelpWhatsThisId, HelpAboutId };
enum UpdateCommand { ActivateApp, DeactivateApp };
/* Desktop can be created only by application */
void definePopup(QString & theContext,
QString & theParent,
QString & theObject );
-
- void createPopup(QPopupMenu* popupFather, QPopupMenu* popup,
- QString text, int popupID, bool separator = false);
void createPopup(QPopupMenu* popup, const QString & theContext,
const QString & theParent, const QString & theObject );
void customPopup(QPopupMenu* popup, const QString & theContext,
const QString & theParent, const QString & theObject);
/* selection mode */
- void SetSelectionMode(int mode, bool activeCompOnly = false);
+ void SetSelectionMode(Selection_Mode mode, bool activeCompOnly = false);
/* desktop */
void showDesktop();
QWorkspaceP* getMainFrame() const;
QString getNewStudyName();
QAD_Study* findStudy( SALOMEDS::Study_ptr theStudy );
-
+ static int getUndoLevel();
/* help actions */
virtual void helpAbout();
- virtual void helpSearch();
+/* virtual void helpSearch();
virtual void helpContents();
virtual void helpContext(const QString& path, const QString& dir = QString::null);
-
+*/
bool loadComponent(QString);
+ bool loadComponentData( const QString& );
+ QString changeXmlInputSourceData(QString theData, QString theComponent);
void activateComponent(const QString& theName, bool isLoadData = true);
+ void deactivateComponent();
void createStudy();
void setSettings();
QAD_Menus* getActiveMenus() {return myActiveMenus;}
QAD_OperatorMenus* getOperatorMenus() {return myOperatorMenus;}
- const OSD_SharedLibrary& getHandle() const {return mySharedLibrary;}// never return sych objects "by value"
const QString& getActiveComponent() const;
+ SALOMEGUI* getActiveGUI();
+ SALOMEGUI* getComponentGUI( const QString& ); // accepts component`s user name
+ QString getComponentDataType() const;
SALOME_NamingService* getNameService() {return myNameService;}
Engines::Component_var getEngine(const char *containerName,
QString getComponentName(const char *componentUserName);
QString getComponentUserName(const char *componentName);
- QAD_HelpWindow* getHelpWindow();
+ //NRI QAD_HelpWindow* getHelpWindow();
void onMouseMove(QMouseEvent*);
bool onMousePress(QMouseEvent*);
virtual void updateCaption( UpdateCommand );
virtual void updateMenu( UpdateCommand );
- bool loadComponentData( const QString& );
-
protected slots:
virtual void onNewStudy();
virtual void onNewStudy(QAD_Application* app);
virtual void onWindowPopupAboutToShow();
void onWindowsPopupActivated( int id );
void onWindowsPopupStatusText( int id );
+ void onHelpModulePopupStatusText(int id);
+
+ void onFilePopupStatusText( int id );
+ void onEditPopupStatusText( int id );
+ void onViewPopupStatusText( int id );
void onSelectionMode();
void onObjectBrowser();
void onMultiFileSave();
void onASCIISave();
+ void onUndoLevel();
+ void onExternalBrowser();
void onActivateApp(QAD_Application* app);
void onDeactivateApp(QAD_Application* app);
void onHelpContents();
- void onHelpSearch();
+ void onHelpContentsModule();
+ /* void onHelpContentsTUI(); */
+/* void onHelpSearch(); */
void onHelpAbout();
void onNewWindow3d();
void onComboActiveComponent( const QString & , bool isLoadData);
void onCascade();
- void onHelpWindowClosed();
+/* NRI void onHelpWindowClosed(); */
protected:
QMenuBar* myMainMenu; /* the main menu bar */
//NRI : SAL2214
QPopupMenu myNewViewPopup;
//NRI : SAL2214
+ QPopupMenu myHelpContentsModulePopup;
+
QPopupMenu myToolsPopup;
QPopupMenu myPrefPopup;
QPopupMenu mySelectionModePopup;
QPopupMenu myWindowPopup; /* not customized by an application */
-
+
ActionMap myStdActions; /* default actions */
QToolBar* myStdToolBar; /* standard toolbar */
QStatusBar* myStatusBar; /* the only status bar */
QList<QAD_Menus> myMenusList;
QAD_Menus* myActiveMenus;
- QAD_HelpWindow* myHelpWindow;
+ //NRI QAD_HelpWindow* myHelpWindow;
QList<QToolButton> myComponentButton;
QMap<QString,QString> mapComponentName;
+private:
+ void processEvent( SALOME_Event* );
+
+private:
+ typedef QMap<QString, SALOMEGUI*> ComponentMap;
+
private:
static QAD_ResourceMgr* resourceMgr;
static QPalette* palette;
void createActions();
void updateActions();
- OSD_SharedLibrary mySharedLibrary;
QAD_XmlHandler* myXmlHandler;
QString myActiveComp;
SALOME_NamingService* myNameService;
SALOME_LifeCycleCORBA * myEnginesLifeCycle;
QComboBox * myCombo;
bool myQueryClose;
+ bool myAboutToClose;
bool _islibso;
+
+ ComponentMap myComponents;
};
/********************************************************************