#include "HEXABLOCKGUI_DocumentModel.hxx"
#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
-#include "HEXABLOCKGUI_DocumentDelegate.hxx"
+//#include "HEXABLOCKGUI_DocumentDelegate.hxx"
#include "HEXABLOCKGUI_DocumentPanel.hxx"
#include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
#include "HEXABLOCKGUI_OccGraphicView.hxx"
#include "HEXABLOCKGUI_GraphicViewsHandler.hxx"
-#include <HEXABLOCK_version.h>
+#include "HEXABLOCK_version.h"
#include "MyBasicGUI_PointDlg.hxx"
HEXABLOCKGUI::HEXABLOCKGUI() :
SalomeApp_Module( "HEXABLOCK" ),
+// LightApp_Module( "HEXABLOCK" ),
_menuId(190),
_dwPattern(0),
_dwAssociation(0),
_dwObjectBrowser(0),
_dwInputPanel(0),
_patternDataTreeView(0),
- _patternBuilderTreeView(0),
+// _patternBuilderTreeView(0),
_patternGeomTreeView(0),
_groupsTreeView(0),
_meshTreeView(0),
- _treeViewDelegate(0),
+// _treeViewDelegate(0),
_isSaved( false ),
moduleActivatedOnce(false),
_vertexDiag(0),
_makeHemiSphereDiag(0),
_modelInfoDiag(NULL),
_addShapeDiag(NULL),
+ _vertexInfoDialog(NULL),
+ _edgeInfoDialog(NULL),
+ _quadInfoDialog(NULL),
+ _hexaInfoDialog(NULL),
+ _vectorInfoDialog(NULL),
+ _groupInfoDialog(NULL),
+ _lawInfoDialog(NULL),
+ _propagationInfoDialog(NULL),
currentDialog(NULL),
lastOccPrs(NULL),
lastVtkDocGView(NULL)
{
docGView->setViewWindow(graphicViewsHandler->createVtkWindow());
docGView->getViewWindow()->installEventFilter(this);
+ showAllMenus();
}
else
docGView->setViewWindow(currentDocGView->getViewWindow());
SVTK_ViewWindow* window = dynamic_cast<SVTK_ViewWindow*>(svw);
if (window != NULL)
{
-
//VTK clean close
if (currentDocGView != NULL && currentDocGView->getViewWindow() == window)
{ //HexaBlock Vtk Window has been closed
if (currentDialog != NULL) currentDialog->close();
- if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
+// if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
if (currentDocGView != NULL)
currentDocGView->setViewWindow(NULL);
if (_edgeAssocDiag != NULL) _edgeAssocDiag->clear();
if (_quadAssocDiag != NULL) _quadAssocDiag->clear();
if (currentDialog != NULL) currentDialog->close();
- if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
+// if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
currentOccGView->getViewWindow()->removeEventFilter(this);
-
currentOccGView->setViewWindow(NULL);
}
}
{
//close opened dialog
if (currentDialog != NULL) currentDialog->close();
- if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
+// if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
initialMenus();
}
QTreeView* theTree = NULL;
if ( sender() == currentGraphicView->getPatternDataSelectionModel() ){
theTree = _patternDataTreeView;
- } else if ( sender() == currentGraphicView->getPatternBuilderSelectionModel() ){
+ }
+ /*else if ( sender() == currentGraphicView->getPatternBuilderSelectionModel() ){
theTree = _patternBuilderTreeView;
- } else if ( sender() == currentGraphicView->getPatternGeomSelectionModel() ) {
+ }*/
+ else if ( sender() == currentGraphicView->getPatternGeomSelectionModel() ) {
theTree = _patternGeomTreeView;
}
else if ( sender() == currentGraphicView->getGroupsSelectionModel() ){
_dwInputPanel = new QDockWidget(aParent);
_dwInputPanel->setVisible(false);
_dwInputPanel->setWindowTitle("Input Panel");
- _dwInputPanel->setMinimumWidth(DWINPUT_MINIMUM_WIDTH); // --- force a minimum until display
+// _dwInputPanel->setMinimumWidth(DWINPUT_MINIMUM_WIDTH); // --- force a minimum until display
- _treeViewDelegate = new DocumentDelegate(_dwInputPanel);
+// _treeViewDelegate = new DocumentDelegate(_dwInputPanel);
//2) ************* document data ( Pattern, Association, Mesh ) in treeview representation
// Pattern
patternLayout->setSizeConstraint(QLayout::SetMaximumSize);
QSplitter *splitter = new QSplitter(Qt::Vertical,patternFrame);
_patternDataTreeView = new QTreeView(patternFrame);//_dwPattern);
- _patternBuilderTreeView = new QTreeView(patternFrame);
+// _patternBuilderTreeView = new QTreeView(patternFrame); // ---> TO REMOVE
_patternGeomTreeView = new QTreeView(patternFrame);
splitter->addWidget(_patternDataTreeView);
- splitter->addWidget(_patternBuilderTreeView);
+// splitter->addWidget(_patternBuilderTreeView); // ---> TO REMOVE
splitter->addWidget(_patternGeomTreeView);
patternLayout->addWidget(splitter);
- _patternDataTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers/*QAbstractItemView::DoubleClicked*/);
+ _patternDataTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers/*QAbstractItemView::DoubleClicked*/);
_patternDataTreeView->setSelectionMode(QAbstractItemView::SingleSelection/*QAbstractItemView::MultiSelection*/);
- _patternDataTreeView->setItemDelegate(_treeViewDelegate);
+// _patternDataTreeView->setItemDelegate(_treeViewDelegate);
- _patternBuilderTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
- _patternBuilderTreeView->setItemDelegate(_treeViewDelegate);
+// _patternBuilderTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+// _patternBuilderTreeView->setItemDelegate(_treeViewDelegate);
_patternGeomTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
_patternGeomTreeView->setSelectionMode(QAbstractItemView::SingleSelection/*QAbstractItemView::MultiSelection*/);
_dwGroups->setWindowTitle("Groups");
_dwGroups->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
_groupsTreeView = new QTreeView(_dwGroups);
- _groupsTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
- _groupsTreeView->setItemDelegate(_treeViewDelegate);
+ _groupsTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+// _groupsTreeView->setItemDelegate(_treeViewDelegate);
_dwGroups->setWidget(_groupsTreeView);
_groupsTreeView->show();
_dwMesh->setWindowTitle("Mesh");
_dwMesh->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
_meshTreeView = new QTreeView(_dwMesh);
- _meshTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+ _meshTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
_meshTreeView->setSelectionMode(QAbstractItemView::SingleSelection);
- _meshTreeView->setItemDelegate(_treeViewDelegate);
+// _meshTreeView->setItemDelegate(_treeViewDelegate);
_dwMesh->setWidget(_meshTreeView);
_meshTreeView->show();
// dock widget position
aParent->addDockWidget( Qt::LeftDockWidgetArea, _dwObjectBrowser );
- aParent->addDockWidget( Qt::LeftDockWidgetArea, _dwInputPanel );
+// aParent->addDockWidget( Qt::LeftDockWidgetArea, _dwInputPanel );
+ aParent->addDockWidget( Qt::RightDockWidgetArea, _dwInputPanel );
aParent->tabifyDockWidget( _dwObjectBrowser, _dwPattern );
aParent->tabifyDockWidget( _dwPattern, _dwGroups );
setToolShown( _computeMesh, show);
}
-void HEXABLOCKGUI::showActor()
-{
- VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
- if (currentVtkGView == NULL || currentVtkGView->getViewWindow() == NULL ||
- currentVtkGView->isEmpty() || currentVtkGView->getDocumentActor() == NULL)
- return;
-
- currentVtkGView->getViewWindow()->setFocus();
- currentVtkGView->getViewWindow()->Display(currentVtkGView->getDocumentActor()->getIO());
- currentVtkGView->update();
- currentVtkGView->getViewWindow()->onFitAll();
-
- //update the visibility state now
- SalomeApp_Study* aStudy = HEXABLOCKGUI::activeStudy();
- SUIT_ViewManager* vman = currentVtkGView->getViewWindow()->getViewManager();
- if (aStudy == NULL || vman == NULL) return;
-
- Handle(SALOME_InteractiveObject) anIO = currentVtkGView->getDocumentActor()->getIO();
- aStudy->setObjectProperty(vman->getId(), anIO->getEntry(), "Visibility", 1 );
- displayer()->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
-}
-
-//SOCC_Prs* currentPrs = NULL;
-void HEXABLOCKGUI::showOnlyActor()
+void HEXABLOCKGUI::showVtkActor()
{
VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
if (currentVtkGView == NULL || currentVtkGView->isEmpty() ||
currentVtkGView->getDocumentActor() == NULL)
return;
+
SVTK_ViewWindow* vtkView = currentVtkGView->getViewWindow();
if (vtkView == NULL)
return;
//show only the current actor -----------------
vtkView->setFocus();
-// vtkView->DisplayOnly(currentVtkGView->getDocumentActor()->getIO());
- Document_Actor *lastDocActor, *currentDocActor = currentVtkGView->getDocumentActor();
+ // vtkView->DisplayOnly(currentVtkGView->getDocumentActor()->getIO());
+ Document_Actor *lastDocActor;
if (lastVtkDocGView != NULL)
{
lastDocActor = lastVtkDocGView->getDocumentActor();
displayer()->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
}
vtkView->onFitAll();
+}
-// //showOnly in occ viewer -------------
-
+void HEXABLOCKGUI::showOccActor()
+{
if (currentOccGView == NULL)
- return;
+ return;
OCCViewer_ViewWindow* occView = currentOccGView->getViewWindow();
if (occView == NULL)
return;
if (vf == NULL)
return;
-// vf->EraseAll();
if (lastOccPrs != NULL)
vf->Erase(lastOccPrs);
currentOccGView->globalSelection();
occView->onFitAll();
}
-void HEXABLOCKGUI::hideActor()
+void HEXABLOCKGUI::hideVtkActor()
{
- // * vtk --
VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
if (currentVtkGView == NULL || currentVtkGView->isEmpty() ||
- currentVtkGView->getViewWindow() == NULL ||
- currentVtkGView->getDocumentActor() == NULL) return;
+ currentVtkGView->getViewWindow() == NULL ||
+ currentVtkGView->getDocumentActor() == NULL) return;
currentVtkGView->getViewWindow()->Erase(currentVtkGView->getDocumentActor()->getIO());
currentVtkGView->getViewWindow()->onResetView();
Handle(SALOME_InteractiveObject) anIO = currentVtkGView->getDocumentActor()->getIO();
aStudy->setObjectProperty(vman->getId(), anIO->getEntry(), "Visibility", 0 );
displayer()->setVisibilityState(anIO->getEntry(), Qtx::HiddenState);
+}
- // * occ --
+void HEXABLOCKGUI::hideOccActor()
+{
OCCViewer_ViewWindow* occView = currentOccGView == NULL ? NULL : currentOccGView->getViewWindow();
- DocumentModel* docModel = currentVtkGView->getDocumentModel();
+ VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
+ DocumentModel* docModel = (currentVtkGView == NULL ? NULL : currentVtkGView->getDocumentModel());
if (occView == NULL || docModel == NULL)
return;
SALOME_View* vf = dynamic_cast<SALOME_View*>(occView->getViewManager()->getViewModel());
if (vf == NULL)
return;
-// vf->EraseAll();
SOCC_Prs* currentOccPrs = getOccPrs(currentDocGView);
if (currentOccPrs != NULL)
vf->Erase(currentOccPrs);
occView->onResetView();
}
+void HEXABLOCKGUI::showOnlyActor()
+{
+ showVtkActor();
+ showOccActor();
+}
+
+void HEXABLOCKGUI::hideActor()
+{
+ hideVtkActor();
+ hideOccActor();
+}
+
void HEXABLOCKGUI::showDockWidgets(bool isVisible)
{
dgview->getPatternDataSelectionModel(), SLOT( salomeSelectionChanged() ), Qt::UniqueConnection );
connect( dgview->getPatternDataSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ), Qt::UniqueConnection );
- connect( dgview->getPatternBuilderSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
- this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ), Qt::UniqueConnection );
+// connect( dgview->getPatternBuilderSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+// this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ), Qt::UniqueConnection );
connect( dgview->getPatternGeomSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ), Qt::UniqueConnection );
connect( dgview->getGroupsSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
dgview->getPatternDataSelectionModel(), SLOT( salomeSelectionChanged() ) );
disconnect( dgview->getPatternDataSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
- disconnect( dgview->getPatternBuilderSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
- this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+// disconnect( dgview->getPatternBuilderSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+// this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
disconnect( dgview->getPatternGeomSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
disconnect( dgview->getGroupsSelectionModel(), SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
//close opened dialog
if (currentDialog != NULL) currentDialog->close();
- if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
+// if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
initialMenus();
if (currentDocGView != dgview) clearDialogs();
_patternDataTreeView->setModel(dgview->getPatternDataModel());
- _patternBuilderTreeView->setModel(dgview->getPatternBuilderModel());
+// _patternBuilderTreeView->setModel(dgview->getPatternBuilderModel());
_patternGeomTreeView->setModel(dgview->getPatternGeomModel());
_groupsTreeView->setModel(dgview->getGroupsModel());
_meshTreeView->setModel(dgview->getMeshModel());
_patternDataTreeView->setSelectionModel(dgview->getPatternDataSelectionModel());
- _patternDataTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+ _patternDataTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
- _patternBuilderTreeView->setSelectionModel(dgview->getPatternBuilderSelectionModel());
- _patternBuilderTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+// _patternBuilderTreeView->setSelectionModel(dgview->getPatternBuilderSelectionModel());
+// _patternBuilderTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
_patternGeomTreeView->setSelectionModel(dgview->getPatternGeomSelectionModel());
_patternGeomTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
_groupsTreeView->setSelectionModel(dgview->getGroupsSelectionModel());
- _groupsTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+ _groupsTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
_meshTreeView->setSelectionModel(dgview->getMeshSelectionModel());
- _meshTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+ _meshTreeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
// = * init occ view * =
currentModelDialogs.insert(diag);
//close the current dialog box info
- if (_treeViewDelegate != NULL)
- _treeViewDelegate->closeDialog();
+// if (_treeViewDelegate != NULL)
+// _treeViewDelegate->closeDialog();
- if (_dwInputPanel->widget())
- _dwInputPanel->widget()->close();
+// if (_dwInputPanel->widget())
+// _dwInputPanel->widget()->close();
//Temporary for debugging EdgeAssoc Faked InfoDialog
if (diag == _edgeAssocDiag)
currentDialog = diag;
diag->setFocus();
+
+ if (currentDocGView != NULL)
+ currentDocGView->getPatternDataSelectionModel()->setInfoMode(false);
+}
+
+void HEXABLOCKGUI::showVertexInfoDialog(HEXA_NS::Vertex* vertex)
+{
+ if (vertex == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_vertexInfoDialog == NULL)
+ _vertexInfoDialog = new VertexDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _vertexInfoDialog->setValue(vertex);
+ _vertexInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _vertexInfoDialog;
+}
+
+void HEXABLOCKGUI::showEdgeInfoDialog(HEXA_NS::Edge* edge)
+{
+ if (edge == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_edgeInfoDialog == NULL)
+ _edgeInfoDialog = new EdgeDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _edgeInfoDialog->setValue(edge);
+ _edgeInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _edgeInfoDialog;
+}
+
+void HEXABLOCKGUI::showQuadInfoDialog(HEXA_NS::Quad* quad)
+{
+ if (quad == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_quadInfoDialog == NULL)
+ _quadInfoDialog = new QuadDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _quadInfoDialog->setValue(quad);
+ _quadInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _quadInfoDialog;
+}
+
+void HEXABLOCKGUI::showHexaInfoDialog(HEXA_NS::Hexa* hexa)
+{
+ if (hexa == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_hexaInfoDialog == NULL)
+ _hexaInfoDialog = new HexaDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _hexaInfoDialog->setValue(hexa);
+ _hexaInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _hexaInfoDialog;
+}
+
+void HEXABLOCKGUI::showVectorInfoDialog(HEXA_NS::Vector* vector)
+{
+ if (vector == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_vectorInfoDialog == NULL)
+ _vectorInfoDialog = new VectorDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _vectorInfoDialog->setValue(vector);
+ _vectorInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _vectorInfoDialog;
+}
+
+void HEXABLOCKGUI::showGroupInfoDialog(HEXA_NS::Group* group)
+{
+ if (group == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_groupInfoDialog == NULL)
+ _groupInfoDialog = new GroupDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _groupInfoDialog->setValue(group);
+ _groupInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _groupInfoDialog;
+}
+
+void HEXABLOCKGUI::showLawInfoDialog(HEXA_NS::Law* law)
+{
+ if (law == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_lawInfoDialog == NULL)
+ _lawInfoDialog = new LawDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _lawInfoDialog->setValue(law);
+ _lawInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _lawInfoDialog;
+}
+
+void HEXABLOCKGUI::showPropagationInfoDialog(HEXA_NS::Propagation* propagation)
+{
+ if (propagation == NULL || _dwInputPanel == NULL)
+ return;
+
+ if (_propagationInfoDialog == NULL)
+ _propagationInfoDialog = new PropagationDialog(_dwInputPanel, HexaBaseDialog::INFO_MODE);
+
+ _propagationInfoDialog->setValue(propagation);
+ _propagationInfoDialog->resetSizeAndShow(_dwInputPanel);
+ currentDialog = _propagationInfoDialog;
}
void HEXABLOCKGUI::addVertex()
_vectorDiag->name_le->setText(doc->getNextName(HEXA_NS::EL_VECTOR).c_str());
}
-void HEXABLOCKGUI::addCylinder()
-{
- if ( !_cylinderDiag ){
- _cylinderDiag = new CylinderDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
- }
- _showDialogBox( _cylinderDiag );
-
- //set default name
- HEXA_NS::Document* doc = getCurrentModel() ? getCurrentModel()->getHexaDocument() : NULL;
- if (_cylinderDiag != NULL && doc != NULL)
- _cylinderDiag->name_le->setText(doc->getNextName(HEXA_NS::EL_CYLINDER).c_str());
-}
-
+//void HEXABLOCKGUI::addCylinder()
+//{
+// if ( !_cylinderDiag ){
+// _cylinderDiag = new CylinderDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+// }
+// _showDialogBox( _cylinderDiag );
+//
+// //set default name
+// HEXA_NS::Document* doc = getCurrentModel() ? getCurrentModel()->getHexaDocument() : NULL;
+// if (_cylinderDiag != NULL && doc != NULL)
+// _cylinderDiag->name_le->setText(doc->getNextName(HEXA_NS::EL_CYLINDER).c_str());
+//}
-void HEXABLOCKGUI::addPipe()
-{
- if ( !_pipeDiag){
- _pipeDiag = new PipeDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
- }
- _showDialogBox( _pipeDiag );
- //set default name
- HEXA_NS::Document* doc = getCurrentModel() ? getCurrentModel()->getHexaDocument() : NULL;
- if (_pipeDiag != NULL && doc != NULL)
- _pipeDiag->name_le->setText(doc->getNextName(HEXA_NS::EL_CYLINDER).c_str());
-}
+//void HEXABLOCKGUI::addPipe()
+//{
+// if ( !_pipeDiag){
+// _pipeDiag = new PipeDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+// }
+// _showDialogBox( _pipeDiag );
+//
+// //set default name
+// HEXA_NS::Document* doc = getCurrentModel() ? getCurrentModel()->getHexaDocument() : NULL;
+// if (_pipeDiag != NULL && doc != NULL)
+// _pipeDiag->name_le->setText(doc->getNextName(HEXA_NS::EL_CYLINDER).c_str());
+//}
void HEXABLOCKGUI::makeGrid()
void HEXABLOCKGUI::setPropagation()
{
- if ( !_propagationDiag ){
+ if ( !_propagationDiag )
_propagationDiag = new PropagationDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
- }
+
_showDialogBox( _propagationDiag );
}
// --------------------------------------------
void HEXABLOCKGUI::computeMesh()
{
- if ( !_computeMeshDiag ){
+ if ( !_computeMeshDiag )
_computeMeshDiag = new ComputeMeshDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
- }
- _computeMeshDiag->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
_showDialogBox( _computeMeshDiag );
}
extern "C"
{
- HEXABLOCKGUI_EXPORT CAM_Module* createModule()
+ HEXABLOCK_EXPORT CAM_Module* createModule()
{
return new HEXABLOCKGUI();
}
- HEXABLOCKGUI_EXPORT char* getModuleVersion()
+ HEXABLOCK_EXPORT char* getModuleVersion()
{
return (char*)HEXABLOCK_VERSION_STR;
}