#include "MeshBaseTypeWidgetBase.h" #include "MeshBaseWidget.h" #include "CompBaseBoundary.h" #include "CompBaseBoundaryLineEdit.h" #include "OperatorsInterface/GraphEventOperator.h" #include "GUIFrame/MainWindow.h" #include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h" #include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h" #include "FITK_Kernel/FITKCore/FITKOperatorRepo.h" #include "FITK_Interface/FITKInterfaceMeshGen/FITKRegionMeshSize.h" namespace GUI { MeshBaseTypeWidgetBase::MeshBaseTypeWidgetBase(QWidget* parent) : Core::FITKWidget(parent) { _meshBaseWidget = dynamic_cast(parent); _mainWin = dynamic_cast(FITKAPP->getGlobalData()->getMainWindow()); } MeshBaseTypeWidgetBase::~MeshBaseTypeWidgetBase() { } void MeshBaseTypeWidgetBase::slotMouseMove() { if (_graphObj == nullptr)return; EventOper::GraphEventOperator* graphOper = FITKOPERREPO->getOperatorT("GraphPreprocess"); if (graphOper == nullptr)return; int rowIndex = -1; CompBaseBoundaryLabel* label = dynamic_cast(sender()); CompBaseBoundaryComboBox* comBox = dynamic_cast(sender()); CompBaseBoundaryLineEdit* lineEdit = dynamic_cast(sender()); QWidget* comParent = nullptr; if (label) { rowIndex = label->getPos(); comParent = dynamic_cast(label->parent()); } else if (comBox) { rowIndex = comBox->getPos(); comParent = dynamic_cast(comBox->parent()); } else if (lineEdit) { rowIndex = lineEdit->getPos(); comParent = dynamic_cast(lineEdit->parent()); } if (comParent) { clearBoundaryBackgroudColor(); comParent->setStyleSheet("background-color: #e0e0e0;"); } //清除高亮 graphOper->clearHighlight(); getDataFromWidget(_graphObj); QVector ids = {}; ids.append(rowIndex); graphOper->advHighlight(_graphObj->getDataObjectID(), ids); graphOper->reRender(true); } }