Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions

SMESHGUI_Dialog Class Reference

#include <SMESHGUI_Dialog.h>

Inheritance diagram for SMESHGUI_Dialog:
Inheritance graph
[legend]

Public Member Functions

 SMESHGUI_Dialog (QWidget *=0, const bool modal=false, const bool allowResize=false, const int=OK|Close|Apply|Help)
virtual ~SMESHGUI_Dialog ()
virtual void show ()
virtual void setContentActive (const bool)
 set all content to enable (parameter is true) or disable state

Static Public Member Functions

static int prefix (const QString &)
 Return hard-coded prefix using to differ overlapping types.

Protected Member Functions

SUIT_Desktop * desktop () const
 find desktop of active application
SUIT_ResourceMgr * resourceMgr () const
 gets resource manager

Detailed Description

Definition at line 43 of file SMESHGUI_Dialog.h.


Constructor & Destructor Documentation

SMESHGUI_Dialog::SMESHGUI_Dialog ( QWidget parent = 0,
const bool  modal = false,
const bool  allowResize = false,
const int  flags = OK | Close | Apply | Help 
)

Definition at line 44 of file SMESHGUI_Dialog.cxx.

References ALGORITHM, HYPOTHESIS, and prefix().

: LightApp_Dialog( parent == 0 ? desktop() : parent, "", modal, allowResize, flags )
{
  int pr = prefix( "SMESH" );
  typeName( pr + MESH ) = tr( "DLG_MESH" );
  typeName( pr + HYPOTHESIS ) = tr( "DLG_HYPO" );
  typeName( pr + ALGORITHM ) = tr( "DLG_ALGO" );
  setButtonText(1, tr("SMESH_BUT_APPLY_AND_CLOSE")); //rename OK to Apply and Close
  if ( flags & Close )
    setButtonPosition( Right, Close );
}
SMESHGUI_Dialog::~SMESHGUI_Dialog ( ) [virtual]

Definition at line 61 of file SMESHGUI_Dialog.cxx.

{
}

Member Function Documentation

SUIT_Desktop * SMESHGUI_Dialog::desktop ( ) const [protected]

find desktop of active application

Definition at line 93 of file SMESHGUI_Dialog.cxx.

References ex13_hole1partial.d.

{
  SUIT_Desktop* d = 0;
  SUIT_Session* s = SUIT_Session::session();
  if( s )
  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( s->activeApplication() );
    if( app )
      d = app->desktop();
  }
  return d;
}
int SMESHGUI_Dialog::prefix ( const QString &  name) [static]

Return hard-coded prefix using to differ overlapping types.

Definition at line 110 of file SMESHGUI_Dialog.cxx.

Referenced by SMESHGUI_Dialog(), and SMESHGUI_SelectionOp.typeById().

{
  if( name == "GEOM" )
    return 100;
  else if( name == "SMESH" )
    return 200;
  else if( name == "SMESH element" )
    return 300;
  else
    return 0;
}
SUIT_ResourceMgr * SMESHGUI_Dialog::resourceMgr ( ) const [protected]

gets resource manager

Definition at line 126 of file SMESHGUI_Dialog.cxx.

Referenced by SMESHGUI_ComputeDlg.createMainFrame(), and SMESHGUI_GroupOnShapeDlg.SMESHGUI_GroupOnShapeDlg().

{
  return SUIT_Session::session()->resourceMgr();
}
void SMESHGUI_Dialog::setContentActive ( const bool  active) [virtual]

set all content to enable (parameter is true) or disable state

Definition at line 79 of file SMESHGUI_Dialog.cxx.

Referenced by SMESHGUI_Operation.setDialogActive().

{
  mainFrame()->setEnabled( active );
  setButtonEnabled( active, OK );
  setButtonEnabled( active, Apply );
  setButtonEnabled( active, Cancel );
  setButtonEnabled( active, Close );
  setButtonEnabled( active, Help );
}
void SMESHGUI_Dialog::show ( ) [virtual]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS