X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FCAM%2FCAM_Module.h;h=3cb43c1616f826df5d00b4d12278eb9418bb54b1;hb=5204b0c67ebf51714353b53f585ff7aafe70af30;hp=138bb5da87a46f2427518f1f08b1625b46b89640;hpb=bb8609caf7881d966fbb88dec0a7822736da93f5;p=modules%2Fgui.git diff --git a/src/CAM/CAM_Module.h b/src/CAM/CAM_Module.h index 138bb5da8..3cb43c161 100755 --- a/src/CAM/CAM_Module.h +++ b/src/CAM/CAM_Module.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // 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. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,6 +29,8 @@ #include #include #include +#include +#include class QAction; class QMenu; @@ -71,6 +73,10 @@ public: virtual void putInfo( const QString&, const int = -1 ); + int showNotification(const QString& message, const QString& title, int timeout = -1); + void hideNotification(const QString& message); + void hideNotification(int id); + bool isActiveModule() const; virtual void setMenuShown( const bool ); @@ -83,6 +89,10 @@ public: virtual void updateModuleVisibilityState(); + virtual bool activateOperation( int actionId ); + virtual bool activateOperation( const QString& actionId ); + virtual bool activateOperation( const QString& actionId, const QString& pluginName ); + // actions/menu/toolbars management QtxActionMenuMgr* menuMgr() const; @@ -93,15 +103,18 @@ public: virtual QAction* createAction( const int, const QString&, const QIcon&, const QString&, const QString&, const int, QObject* = 0, const bool = false, QObject* = 0, const char* = 0, const QString& = QString() ); + virtual QAction* createAction( const int, const QString&, const QIcon&, const QString&, + const QString&, const QKeySequence&, QObject* = 0, + const bool = false, QObject* = 0, const char* = 0, const QString& = QString() ); QtxActionGroup* createActionGroup( const int, const bool = true ); - int createTool( const QString& ); + int createTool( const QString&, const QString& = QString() ); int createTool( const int, const int, const int = -1 ); int createTool( const int, const QString&, const int = -1 ); int createTool( QAction*, const int, const int = -1, const int = -1 ); int createTool( QAction*, const QString&, const int = -1, const int = -1 ); - int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 ); + int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1,QMenu * = 0); int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 ); int createMenu( const int, const int, const int = -1, const int = -1 ); int createMenu( const int, const QString&, const int = -1, const int = -1 ); @@ -135,6 +148,11 @@ protected: int registerAction( const int, QAction* ); bool unregisterAction( const int ); bool unregisterAction( QAction* ); + // IMN 05/03/2015: we copied myActionMap for reset/unset actions accelerator keys + // after activate/deactivate modules + QMap myActionShortcutMap; //!< copy actions shortcut map + + virtual bool abortAllOperations(); private: CAM_Application* myApp; //!< parent application object