Salome HOME
refs #497: redesign of HYDRO main menu.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_InputPanel.cxx
index ceb9f28dff77883ff2a370aa405ecc4e6db02e6c..a496a82d7c416e31d2e9832ebab8dd8b45edd65f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  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
@@ -22,7 +22,6 @@
 
 #include "HYDROGUI_InputPanel.h"
 #include "HYDROGUI_Module.h"
-#include "HYDROGUI_RunBrowser.h"
 
 #include <CAM_Application.h>
 #include <SUIT_Desktop.h>
@@ -84,6 +83,16 @@ HYDROGUI_Module* HYDROGUI_InputPanel::module() const
   return myModule;
 }
 
+bool HYDROGUI_InputPanel::isApplyEnabled() const
+{
+    return myApply->isEnabled();
+}
+
+void HYDROGUI_InputPanel::setApplyEnabled( bool on )
+{
+    myApply->setEnabled( on );
+}
+
 void HYDROGUI_InputPanel::onApply()
 {
   emit panelApply(); 
@@ -96,20 +105,7 @@ void HYDROGUI_InputPanel::onCancel()
 
 void HYDROGUI_InputPanel::onHelp()
 {
-  QString aModuleName = myModule->moduleName();
-
-  QString aPagePath = HYDROGUI_RunBrowser::getPagePath( aModuleName );
-
-  QString aPageName = "";
-  QString aWindowTitle = windowTitle();
-  if ( !aWindowTitle.isEmpty() )
-  {
-    aPageName = QStringList( aWindowTitle.split( " " ) ).join( "_" ).append( ".html" );
-    aPageName.toLower();
-  }
-
-  QString aPage = aPagePath + QDir::separator() + aPageName;
-  HYDROGUI_RunBrowser::showPage( myModule->getApp(), aPage );
+  emit panelHelp();
 }
 
 void HYDROGUI_InputPanel::closeEvent ( QCloseEvent * event )