// 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 "SMDS_Mesh.hxx"
#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
#include "SalomeApp_Application.h"
#include "SalomeApp_Study.h"
#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
+#include "LightApp_Application.h"
#include "LightApp_SelectionMgr.h"
#include "utilities.h"
// IDL Headers
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(SMESH_Group)
+#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
using namespace std;
myPreviewActor->SetMapper( myMapper );
myPreviewActor->SetRepresentation( 3 );
- float anRGB[3];
+ vtkFloatingPointType anRGB[3];
vtkProperty* aProp = vtkProperty::New();
GetColor( "SMESH", "selection_element_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
myPreviewActor->SetProperty( aProp );
- float aFactor,aUnits;
+ vtkFloatingPointType aFactor,aUnits;
myPreviewActor->SetResolveCoincidentTopology(true);
myPreviewActor->GetPolygonOffsetParameters(aFactor,aUnits);
myPreviewActor->SetPolygonOffsetParameters(aFactor,0.2*aUnits);
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
+ buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+ buttonHelp->setText(tr("SMESH_BUT_HELP" ));
+ buttonHelp->setAutoDefault(TRUE);
+ GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
+
SMESHGUI_CreatePolyhedralVolumeDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/
RadioButton1->setChecked( TRUE );
mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
+
+ myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_polyhedrons";
Init();
}
connect(buttonOk, SIGNAL( clicked() ), SLOT( ClickOnOk() ) );
connect(buttonCancel, SIGNAL( clicked() ), SLOT( ClickOnCancel() ) ) ;
connect(buttonApply, SIGNAL( clicked() ), SLOT(ClickOnApply() ) );
+ connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp() ) );
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );
connect(SelectElementsButton, SIGNAL( clicked() ), SLOT( SetEditCurrentArgument() ) ) ;
reject() ;
}
+//=================================================================================
+// function : ClickOnHelp()
+// purpose :
+//=================================================================================
+void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnHelp()
+{
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app)
+ app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
+ else {
+ SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ QObject::tr("BUT_OK"));
+ }
+}
+
//=======================================================================
//function : onTextChange
//purpose :
busy = false;
}
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose :
+//=================================================================================
+void SMESHGUI_CreatePolyhedralVolumeDlg::keyPressEvent( QKeyEvent* e )
+{
+ QDialog::keyPressEvent( e );
+ if ( e->isAccepted() )
+ return;
+
+ if ( e->key() == Key_F1 )
+ {
+ e->accept();
+ ClickOnHelp();
+ }
+}