You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.3 KiB
C++
85 lines
2.3 KiB
C++
#include "LocalGroupInfoWidget.h"
|
|
#include "ui_LocalGroupInfoWidget.h"
|
|
|
|
#include "GUIFrame/MainWindow.h"
|
|
#include "GUIFrame/PropertyWidget.h"
|
|
#include "OperatorsInterface/ParaWidgetInterfaceOperator.h"
|
|
|
|
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
|
|
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
|
|
#include "FITK_Interface/FITKInterfaceMeshGen/FITKGeometryMeshSize.h"
|
|
|
|
namespace GUI
|
|
{
|
|
LocalGroupInfoWidget::LocalGroupInfoWidget(Interface::FITKGeometryMeshSize * obj, EventOper::ParaWidgetInterfaceOperator * oper) :
|
|
GUIWidgetBase(dynamic_cast<MainWindow*>(FITKAPP->getGlobalData()->getMainWindow())),
|
|
_obj(obj), _oper(oper)
|
|
{
|
|
_ui = new Ui::LocalGroupInfoWidget();
|
|
_ui->setupUi(this);
|
|
|
|
init();
|
|
}
|
|
|
|
LocalGroupInfoWidget::~LocalGroupInfoWidget()
|
|
{
|
|
if (_ui)delete _ui;
|
|
}
|
|
|
|
void LocalGroupInfoWidget::init()
|
|
{
|
|
if (_obj) {
|
|
setDataToWidget();
|
|
}
|
|
}
|
|
|
|
Interface::FITKGeometryMeshSize * LocalGroupInfoWidget::getCurrentGeoMeshObj()
|
|
{
|
|
return _obj;
|
|
}
|
|
|
|
bool LocalGroupInfoWidget::checkValue()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void LocalGroupInfoWidget::setDataToWidget()
|
|
{
|
|
if (_obj == nullptr)return;
|
|
int layer = _obj->getLayerNumber();
|
|
_ui->lineEdit_NoLayers->setText(QString::number(layer));
|
|
|
|
double exp = _obj->getExpansionRatio();
|
|
_ui->lineEdit_Expansion->setText(QString::number(exp));
|
|
|
|
double thick = _obj->getLayerThickness();
|
|
_ui->lineEdit_FirThickness->setText(QString::number(thick));
|
|
}
|
|
|
|
void LocalGroupInfoWidget::getDataFromWidget()
|
|
{
|
|
|
|
}
|
|
|
|
void LocalGroupInfoWidget::on_lineEdit_NoLayers_editingFinished()
|
|
{
|
|
if (_obj == nullptr)return;
|
|
QString layer = _ui->lineEdit_NoLayers->text();
|
|
_obj->setLayerNumber(layer.toInt());
|
|
}
|
|
|
|
void LocalGroupInfoWidget::on_lineEdit_Expansion_editingFinished()
|
|
{
|
|
if (_obj == nullptr)return;
|
|
QString exp = _ui->lineEdit_Expansion->text();
|
|
_obj->setExpansionRatio(exp.toDouble());
|
|
}
|
|
|
|
void LocalGroupInfoWidget::on_lineEdit_FirThickness_editingFinished()
|
|
{
|
|
if (_obj == nullptr)return;
|
|
QString thick = _ui->lineEdit_FirThickness->text();
|
|
_obj->setLayerThickness(thick.toDouble());
|
|
}
|
|
}
|