]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1015: The validate icon must be greyed and inactive instead of red and active
authornds <nds@opencascade.com>
Tue, 24 May 2016 08:40:56 +0000 (11:40 +0300)
committernds <nds@opencascade.com>
Tue, 24 May 2016 08:40:56 +0000 (11:40 +0300)
Actions contain information for Status bar

src/XGUI/XGUI_ModuleConnector.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

index 326117bab4f249d6c5c7c04ad19c9837959d643a..8fd52e598bfc06d6568a75d85aea966398421a86 100644 (file)
@@ -118,17 +118,9 @@ void XGUI_ModuleConnector::setSelected(const QList<ModuleBase_ViewerPrsPtr>& the
   }    
 }
 
-#include <QMainWindow>
-#include <QStatusBar>
 void XGUI_ModuleConnector::setStatusBarMessage(const QString& theMessage)
 {
-#ifdef HAVE_SALOME
-  //return myWorkshop->salomeConnector()->featureInfo(theId);
-#else
-  QMainWindow* aDesktop = desktop();
-  aDesktop->statusBar()->showMessage(theMessage);
-
-#endif
+  myWorkshop->setStatusBarMessage(theMessage);
 }
 
 bool XGUI_ModuleConnector::canStartOperation(QString theId)
index 8e8b92f5faeda6eb176a4215495a10fa0c121341..fe2d68b54d9a0d5a0a05c30d56fbf06498bd1baf 100755 (executable)
@@ -1890,6 +1890,15 @@ QList<ActionInfo> XGUI_Workshop::processHistoryList(const std::list<std::string>
   return aResult;
 }
 
+void XGUI_Workshop::setStatusBarMessage(const QString& theMessage)
+{
+#ifdef HAVE_SALOME
+  return salomeConnector()->desktop();
+#else
+  myMainWindow->putInfo(theMessage, -1);
+#endif
+}
+
 void XGUI_Workshop::synchronizeViewer()
 {
   SessionPtr aMgr = ModelAPI_Session::get();
index c969da8c046b8ffb776da98681e9afc0a5e46336..835816cf41c8d5b64b2321ff1f33db093391f3cf 100755 (executable)
@@ -261,6 +261,10 @@ Q_OBJECT
   /// \param theFeature a feature
   bool isFeatureOfNested(const FeaturePtr& theFeature);
 
+  //! Shows the message in the status bar
+  //! \param theMessage a message
+  void setStatusBarMessage(const QString& theMessage);
+
   /// Has to be called in order to display objects with visibility status = true
   void synchronizeViewer();