+
+//=================================================================================
+// function : setConstructorId( id )
+// purpose :
+//=================================================================================
+void GEOMBase_Skeleton::setConstructorId( const int id )
+{
+ if ( myRBGroup && myRBGroup->button( id ) )
+ myRBGroup->button( id )->setChecked( true );
+}
+
+//=================================================================================
+// function : unsetConstructorId
+// purpose :
+//=================================================================================
+void GEOMBase_Skeleton::unsetConstructorId()
+{
+ // 0020428: EDF 906 GEOM : Performance for Group creation in GEOM
+ // uncheck all buttons
+ // workaround, because setChecked( false ) does not result in Qt4
+ bool isExclusive = myRBGroup->exclusive();
+ myRBGroup->setExclusive( false );
+ QList<QAbstractButton*> btnList = myRBGroup->buttons();
+ for ( int j = 0; j < 2; j++ )
+ {
+ QList<QAbstractButton*>::const_iterator it = btnList.constBegin();
+ for ( ; it != btnList.constEnd(); ++it )
+ (*it)->setCheckable( j == 1 );
+ }
+ myRBGroup->setExclusive( isExclusive );
+}
+
+//=================================================================================
+// function : ClickOnHelp()
+// purpose :
+//=================================================================================
+void GEOMBase_Skeleton::ClickOnHelp()
+{
+ LightApp_Application* app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() );
+
+ QString context;
+ if(myHelpContext.isEmpty()) {
+ context = myGeomGUI ? app->moduleName( myGeomGUI->moduleName() ) : QString("");
+ } else {
+ context = myHelpContext;
+ }
+ if ( app )
+ app->onHelpContextModule( context , myHelpFileName );
+ else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
+ SUIT_MessageBox::warning( 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 : setHelpFileName()
+// purpose : set name for help file html
+//=================================================================================
+void GEOMBase_Skeleton::setHelpFileName( const QString& theName )
+{
+ myHelpFileName = theName;
+}
+
+GEOMBase_DlgSkeleton* GEOMBase_Skeleton::mainFrame()
+{
+ return myMainFrame;
+}
+
+QWidget* GEOMBase_Skeleton::centralWidget()
+{
+ return myMainFrame->GroupMedium;
+}
+
+QPushButton* GEOMBase_Skeleton::buttonCancel() const
+{
+ return myMainFrame->buttonCancel;
+}
+
+QPushButton* GEOMBase_Skeleton::buttonOk() const
+{
+ return myMainFrame->buttonOk;
+}
+
+QPushButton* GEOMBase_Skeleton::buttonApply() const
+{
+ return myMainFrame->buttonApply;
+}
+
+QPushButton* GEOMBase_Skeleton::buttonHelp() const
+{
+ return myMainFrame->buttonHelp;
+}
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose :
+//=================================================================================
+void GEOMBase_Skeleton::keyPressEvent( QKeyEvent* e )
+{
+ QDialog::keyPressEvent( e );
+ if ( e->isAccepted() )
+ return;
+
+ if ( e->key() == Qt::Key_F1 ) {
+ e->accept();
+ ClickOnHelp();
+ }
+}
+
+//=================================================================================
+// function : showOnlyPreviewControl()
+// purpose : display only CheckBoxPreview check box,
+// hide CheckBoxRestoreSS and CheckBoxAddPrefix
+//=================================================================================
+void GEOMBase_Skeleton::showOnlyPreviewControl(){
+ mainFrame()->GroupBoxPublish->show();
+ mainFrame()->CheckBoxRestoreSS->hide();
+ mainFrame()->CheckBoxAddPrefix->hide();
+}
+
+//=================================================================================
+// function : processPreview()
+// purpose : Display preview if CheckBoxPreview is checked
+//=================================================================================
+void GEOMBase_Skeleton::processPreview() {
+ displayPreview(mainFrame()->CheckBoxPreview->isChecked());
+}