wiering the tet dialog
This commit is contained in:
parent
3cca1594da
commit
5f8f9842e4
|
@ -72,23 +72,32 @@ void TaskDlgMeshShapeNetgen::open()
|
|||
|
||||
}
|
||||
|
||||
void TaskDlgMeshShapeNetgen::clicked(int button)
|
||||
{
|
||||
try {
|
||||
if(QDialogButtonBox::Apply == button)
|
||||
{
|
||||
// May throw an exception which we must handle here
|
||||
FemMeshShapeNetgenObject->execute();
|
||||
}
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Base::Console().Warning("FemMeshShapeNetgenObject::execute(): %s\n", e.what());
|
||||
}
|
||||
}
|
||||
|
||||
bool TaskDlgMeshShapeNetgen::accept()
|
||||
{
|
||||
//try {
|
||||
// FemSetNodesObject->Nodes.setValues(param->tempSet);
|
||||
// FemSetNodesObject->recompute();
|
||||
// //Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
// //if(doc)
|
||||
// // doc->resetEdit();
|
||||
// param->MeshViewProvider->resetHighlightNodes();
|
||||
// FemSetNodesObject->Label.setValue(name->name);
|
||||
// Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
try {
|
||||
FemMeshShapeNetgenObject->recompute();
|
||||
//FemSetNodesObject->Label.setValue(name->name);
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
|
||||
// return true;
|
||||
//}
|
||||
//catch (const Base::Exception& e) {
|
||||
// Base::Console().Warning("TaskDlgMeshShapeNetgen::accept(): %s\n", e.what());
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Base::Console().Warning("TaskDlgMeshShapeNetgen::accept(): %s\n", e.what());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -100,8 +109,8 @@ bool TaskDlgMeshShapeNetgen::reject()
|
|||
// //if(doc)
|
||||
// // doc->resetEdit();
|
||||
//param->MeshViewProvider->resetHighlightNodes();
|
||||
//Gui::Command::abortCommand();
|
||||
//Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::abortCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ public:
|
|||
public:
|
||||
/// is called the TaskView when the dialog is opened
|
||||
virtual void open();
|
||||
/// is called by the framework if an button is clicked which has no accept or rject role
|
||||
virtual void clicked(int);
|
||||
/// is called by the framework if the dialog is accepted (Ok)
|
||||
virtual bool accept();
|
||||
/// is called by the framework if the dialog is rejected (Cancel)
|
||||
|
@ -57,7 +59,7 @@ public:
|
|||
|
||||
/// returns for Close and Help button
|
||||
virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const
|
||||
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; }
|
||||
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Apply; }
|
||||
|
||||
protected:
|
||||
TaskTetParameter *param;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Gui/Utilities.h>
|
||||
#include <Mod/Fem/App/FemMeshShapeNetgenObject.h>
|
||||
|
||||
|
||||
using namespace FemGui;
|
||||
|
@ -60,9 +61,8 @@ TaskTetParameter::TaskTetParameter(Fem::FemMeshShapeNetgenObject *pcObject,QWidg
|
|||
|
||||
this->groupLayout()->addWidget(proxy);
|
||||
|
||||
//QObject::connect(ui->toolButton_Poly,SIGNAL(clicked()),this,SLOT(Poly()));
|
||||
//QObject::connect(ui->toolButton_Pick,SIGNAL(clicked()),this,SLOT(Pick()));
|
||||
//QObject::connect(ui->comboBox,SIGNAL(activated (int)),this,SLOT(SwitchMethod(int)));
|
||||
QObject::connect(ui->doubleSpinBox_MaxSize,SIGNAL(valueChanged(double)),this,SLOT(maxSizeValueChanged(double)));
|
||||
QObject::connect(ui->comboBox_Fineness,SIGNAL(activated (int)),this,SLOT(SwitchMethod(int)));
|
||||
|
||||
|
||||
}
|
||||
|
@ -74,15 +74,12 @@ TaskTetParameter::~TaskTetParameter()
|
|||
|
||||
void TaskTetParameter::SwitchMethod(int Value)
|
||||
{
|
||||
//if(Value == 1){
|
||||
// ui->groupBox_AngleSearch->setEnabled(true);
|
||||
// ui->toolButton_Pick->setEnabled(true);
|
||||
// ui->toolButton_Poly->setEnabled(false);
|
||||
//}else{
|
||||
// ui->groupBox_AngleSearch->setEnabled(false);
|
||||
// ui->toolButton_Pick->setEnabled(false);
|
||||
// ui->toolButton_Poly->setEnabled(true);
|
||||
//}
|
||||
pcObject->Fininess.setValue(Value);
|
||||
}
|
||||
|
||||
void TaskTetParameter::maxSizeValueChanged(double Value)
|
||||
{
|
||||
pcObject->MaxSize.setValue(Value);
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,5 +87,4 @@ void TaskTetParameter::SwitchMethod(int Value)
|
|||
|
||||
|
||||
|
||||
|
||||
#include "moc_TaskTetParameter.cpp"
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
|
||||
private Q_SLOTS:
|
||||
void SwitchMethod(int Value);
|
||||
void maxSizeValueChanged(double Value);
|
||||
|
||||
protected:
|
||||
Fem::FemMeshShapeNetgenObject *pcObject;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox"/>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_MaxSize"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue
Block a user