Dialog to compute a mesh and show computation errors. More...
#include <SMESHGUI_ComputeDlg.h>

Public Member Functions | |
| SMESHGUI_ComputeDlg (QWidget *, bool) | |
| Dialog to compute a mesh and show computation errors. | |
| virtual | ~SMESHGUI_ComputeDlg () |
| Destructor. | |
| 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 | |
| QFrame * | createMainFrame (QWidget *, bool) |
| SUIT_Desktop * | desktop () const |
| find desktop of active application | |
| SUIT_ResourceMgr * | resourceMgr () const |
| gets resource manager | |
Protected Attributes | |
| QLabel * | myMeshName |
| QGroupBox * | myMemoryLackGroup |
| QGroupBox * | myCompErrorGroup |
| QGroupBox * | myHypErrorGroup |
| QLabel * | myHypErrorLabel |
| QTableWidget * | myTable |
| QPushButton * | myShowBtn |
| QPushButton * | myPublishBtn |
| QPushButton * | myBadMeshBtn |
| SMESHGUI_MeshInfosBox * | myBriefInfo |
| SMESHGUI_MeshInfosBox * | myFullInfo |
Friends | |
| class | SMESHGUI_BaseComputeOp |
| class | SMESHGUI_PrecomputeOp |
Dialog to compute a mesh and show computation errors.
Definition at line 208 of file SMESHGUI_ComputeDlg.h.
Dialog to compute a mesh and show computation errors.
Definition at line 467 of file SMESHGUI_ComputeDlg.cxx.
References createMainFrame(), and SPACING.
: SMESHGUI_Dialog( parent, false, true, Close/* | Help*/ ) { QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame()); aDlgLay->setMargin( 0 ); aDlgLay->setSpacing( SPACING ); QFrame* aMainFrame = createMainFrame(mainFrame(),ForEval); aDlgLay->addWidget(aMainFrame); aDlgLay->setStretchFactor(aMainFrame, 1); }
| SMESHGUI_ComputeDlg::~SMESHGUI_ComputeDlg | ( | ) | [virtual] |
Definition at line 496 of file SMESHGUI_ComputeDlg.cxx.
References COL_BAD_MESH, COL_ERROR, COL_PUBLISHED, COL_SHAPEID, MARGIN, myBadMeshBtn, myBriefInfo, myCompErrorGroup, myFullInfo, myHypErrorGroup, myHypErrorLabel, myMemoryLackGroup, myMeshName, myPublishBtn, myShowBtn, myTable, NB_COLUMNS, SMESHGUI_Dialog.resourceMgr(), and SPACING.
Referenced by SMESHGUI_ComputeDlg().
{
QFrame* aFrame = new QFrame(theParent);
SUIT_ResourceMgr* rm = resourceMgr();
QPixmap iconCompute (rm->loadPixmap("SMESH", tr("ICON_COMPUTE")));
// constructor
QGroupBox* aPixGrp;
if(ForEval) {
aPixGrp = new QGroupBox(tr("EVAL_DLG"), aFrame);
}
else {
aPixGrp = new QGroupBox(tr("CONSTRUCTOR"), aFrame);
}
QButtonGroup* aBtnGrp = new QButtonGroup(this);
QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
aPixGrpLayout->setMargin(MARGIN); aPixGrpLayout->setSpacing(SPACING);
QRadioButton* aRBut = new QRadioButton(aPixGrp);
aRBut->setIcon(iconCompute);
aRBut->setChecked(true);
aPixGrpLayout->addWidget(aRBut);
aBtnGrp->addButton(aRBut, 0);
// Mesh name
QGroupBox* nameBox = new QGroupBox(tr("SMESH_MESHINFO_NAME"), aFrame );
QHBoxLayout* nameBoxLayout = new QHBoxLayout(nameBox);
nameBoxLayout->setMargin(MARGIN); nameBoxLayout->setSpacing(SPACING);
myMeshName = new QLabel(nameBox);
nameBoxLayout->addWidget(myMeshName);
// Mesh Info
myBriefInfo = new SMESHGUI_MeshInfosBox(false, aFrame);
myFullInfo = new SMESHGUI_MeshInfosBox(true, aFrame);
// Computation errors
myCompErrorGroup = new QGroupBox(tr("ERRORS"), aFrame);
myTable = new QTableWidget( 1, NB_COLUMNS, myCompErrorGroup);
myShowBtn = new QPushButton(tr("SHOW_SHAPE"), myCompErrorGroup);
myPublishBtn = new QPushButton(tr("PUBLISH_SHAPE"), myCompErrorGroup);
myBadMeshBtn = new QPushButton(tr("SHOW_BAD_MESH"), myCompErrorGroup);
//myTable->setReadOnly( true ); // VSR: check
myTable->setEditTriggers( QAbstractItemView::NoEditTriggers );
myTable->hideColumn( COL_PUBLISHED );
myTable->hideColumn( COL_SHAPEID );
myTable->hideColumn( COL_BAD_MESH );
myTable->horizontalHeader()->setResizeMode( COL_ERROR, QHeaderView::Interactive );
QStringList headers;
headers << tr( "COL_ALGO_HEADER" );
headers << tr( "COL_SHAPE_HEADER" );
headers << tr( "COL_ERROR_HEADER" );
headers << tr( "COL_SHAPEID_HEADER" );
headers << tr( "COL_PUBLISHED_HEADER" );
myTable->setHorizontalHeaderLabels( headers );
// layouting
QGridLayout* grpLayout = new QGridLayout(myCompErrorGroup);
grpLayout->setSpacing(SPACING);
grpLayout->setMargin(MARGIN);
grpLayout->addWidget( myTable, 0, 0, 4, 1 );
grpLayout->addWidget( myShowBtn, 0, 1 );
grpLayout->addWidget( myPublishBtn, 1, 1 );
grpLayout->addWidget( myBadMeshBtn, 2, 1 );
grpLayout->setRowStretch( 3, 1 );
// Hypothesis definition errors
myHypErrorGroup = new QGroupBox(tr("SMESH_WRN_MISSING_PARAMETERS"), aFrame);
QHBoxLayout* myHypErrorGroupLayout = new QHBoxLayout(myHypErrorGroup);
myHypErrorGroupLayout->setMargin(MARGIN);
myHypErrorGroupLayout->setSpacing(SPACING);
myHypErrorLabel = new QLabel(myHypErrorGroup);
myHypErrorGroupLayout->addWidget(myHypErrorLabel);
// Memory Lack Label
myMemoryLackGroup = new QGroupBox(tr("ERRORS"), aFrame);
QVBoxLayout* myMemoryLackGroupLayout = new QVBoxLayout(myMemoryLackGroup);
myMemoryLackGroupLayout->setMargin(MARGIN);
myMemoryLackGroupLayout->setSpacing(SPACING);
QLabel* memLackLabel = new QLabel(tr("MEMORY_LACK"), myMemoryLackGroup);
QFont bold = memLackLabel->font(); bold.setBold(true);
memLackLabel->setFont( bold );
memLackLabel->setMinimumWidth(300);
myMemoryLackGroupLayout->addWidget(memLackLabel);
// add all widgets to aFrame
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
aLay->setMargin( 0 );
aLay->setSpacing( 0 );
aLay->addWidget( aPixGrp );
aLay->addWidget( nameBox );
aLay->addWidget( myBriefInfo );
aLay->addWidget( myFullInfo );
aLay->addWidget( myHypErrorGroup );
aLay->addWidget( myCompErrorGroup );
aLay->addWidget( myMemoryLackGroup );
aLay->setStretchFactor( myCompErrorGroup, 1 );
((QPushButton*) button( OK ))->setDefault( true );
return aFrame;
}
| SUIT_Desktop * SMESHGUI_Dialog::desktop | ( | ) | const [protected, inherited] |
find desktop of active application
Definition at line 93 of file SMESHGUI_Dialog.cxx.
References ex13_hole1partial.d.
| int SMESHGUI_Dialog::prefix | ( | const QString & | name | ) | [static, inherited] |
Return hard-coded prefix using to differ overlapping types.
Definition at line 110 of file SMESHGUI_Dialog.cxx.
Referenced by SMESHGUI_Dialog.SMESHGUI_Dialog(), and SMESHGUI_SelectionOp.typeById().
| SUIT_ResourceMgr * SMESHGUI_Dialog::resourceMgr | ( | ) | const [protected, inherited] |
gets resource manager
Definition at line 126 of file SMESHGUI_Dialog.cxx.
Referenced by createMainFrame(), and SMESHGUI_GroupOnShapeDlg.SMESHGUI_GroupOnShapeDlg().
{
return SUIT_Session::session()->resourceMgr();
}
| void SMESHGUI_Dialog::setContentActive | ( | const bool | active | ) | [virtual, inherited] |
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, inherited] |
Definition at line 69 of file SMESHGUI_Dialog.cxx.
Referenced by SMESHGUI_MeshOp.onCloseShapeByMeshDlg(), SMESHGUI_MeshOp.onPublishShapeByMeshDlg(), SMESHGUI_BaseComputeOp.showComputeResult(), SMESHGUI_BaseComputeOp.showEvaluateResult(), SMESHGUI_ShapeByMeshOp.startOperation(), SMESHGUI_MeshOrderOp.startOperation(), SMESHGUI_MeshOp.startOperation(), SMESHGUI_MakeNodeAtPointOp.startOperation(), SMESHGUI_GroupOnShapeOp.startOperation(), SMESHGUI_FindElemByPointOp.startOperation(), and SMESHGUI_ConvToQuadOp.startOperation().
{
adjustSize();
LightApp_Dialog::show();
}
friend class SMESHGUI_BaseComputeOp [friend] |
Definition at line 232 of file SMESHGUI_ComputeDlg.h.
friend class SMESHGUI_PrecomputeOp [friend] |
Definition at line 233 of file SMESHGUI_ComputeDlg.h.
QPushButton* SMESHGUI_ComputeDlg.myBadMeshBtn [protected] |
Definition at line 227 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
SMESHGUI_MeshInfosBox* SMESHGUI_ComputeDlg.myBriefInfo [protected] |
Definition at line 229 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QGroupBox* SMESHGUI_ComputeDlg.myCompErrorGroup [protected] |
Definition at line 221 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
SMESHGUI_MeshInfosBox* SMESHGUI_ComputeDlg.myFullInfo [protected] |
Definition at line 230 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QGroupBox* SMESHGUI_ComputeDlg.myHypErrorGroup [protected] |
Definition at line 222 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QLabel* SMESHGUI_ComputeDlg.myHypErrorLabel [protected] |
Definition at line 223 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QGroupBox* SMESHGUI_ComputeDlg.myMemoryLackGroup [protected] |
Definition at line 220 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QLabel* SMESHGUI_ComputeDlg.myMeshName [protected] |
Definition at line 219 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), and SMESHGUI_PrecomputeOp.onPreview().
QPushButton* SMESHGUI_ComputeDlg.myPublishBtn [protected] |
Definition at line 226 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QPushButton* SMESHGUI_ComputeDlg.myShowBtn [protected] |
Definition at line 225 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().
QTableWidget* SMESHGUI_ComputeDlg.myTable [protected] |
Definition at line 224 of file SMESHGUI_ComputeDlg.h.
Referenced by createMainFrame(), SMESHGUI_BaseComputeOp.showComputeResult(), and SMESHGUI_BaseComputeOp.showEvaluateResult().