// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
#include "GEOM_Displayer.h"
#include "GeometryGUI.h"
+#include "LightApp_Application.h"
+#include "LightApp_SelectionMgr.h"
#include "SalomeApp_Application.h"
-#include "SalomeApp_SelectionMgr.h"
#include "SalomeApp_Tools.h"
+#include "SUIT_MessageBox.h"
#include "SUIT_Session.h"
#include "SUIT_OverrideCursor.h"
GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) ),
myGeomGUI( GUI )
{
-
mySelBtn = 0;
mySelEdit = 0;
myDisplayer = 0;
-
+ myHelpFileName = "";
+
if ( !name )
setName( "MeasureGUI_Skeleton" );
buttonClose->setText( tr( "GEOM_BUT_CLOSE" ) );
+ buttonHelp->setText(tr("GEOM_BUT_HELP"));
buttonClose->setAutoDefault( false );
- GroupMedium->close( TRUE );
resize( 350, 0 );
}
connect( buttonClose, SIGNAL( clicked() ),
this, SLOT( ClickOnCancel() ) );
+
+ connect( buttonHelp, SIGNAL( clicked() ),
+ this, SLOT( ClickOnHelp() ) );
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ),
this, SLOT ( DeactivateActiveDialog() ) );
connect( mySelBtn, SIGNAL( clicked() ),
this, SLOT ( SetEditCurrentArgument() ) );
- SalomeApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
+ LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
if ( aSel )
connect( aSel, SIGNAL( currentSelectionChanged() ),
this, SLOT ( SelectionIntoArgument() ) ) ;
close();
}
+//=================================================================================
+// function : ClickOnHelp()
+// purpose :
+//=================================================================================
+void MeasureGUI_Skeleton::ClickOnHelp()
+{
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app)
+ app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName);
+ else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
+ SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
+ QObject::tr("BUT_OK"));
+ }
+}
//=================================================================================
// function : LineEditReturnPressed()
{
setEnabled( false );
- SalomeApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
+ LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
if ( aSel )
disconnect( aSel, 0, this, 0 );
myGeomGUI->SetActiveDialogBox( ( QDialog* )this );
- SalomeApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
+ LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
if ( aSel )
connect( aSel, SIGNAL( currentSelectionChanged() ),
this, SLOT ( SelectionIntoArgument() ) ) ;
//=================================================================================
void MeasureGUI_Skeleton::closeEvent( QCloseEvent* e )
{
- SalomeApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
+ LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
if ( aSel )
disconnect( aSel, 0, this, 0 );
QDialog::closeEvent( e );
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
}
+//=================================================================================
+// function : keyPressEvent()
+// purpose :
+//=================================================================================
+void MeasureGUI_Skeleton::keyPressEvent( QKeyEvent* e )
+{
+ QDialog::keyPressEvent( e );
+ if ( e->isAccepted() )
+ return;
+
+ if ( e->key() == Key_F1 )
+ {
+ e->accept();
+ ClickOnHelp();
+ }
+}