LAMPCAE/src/GmshModule/DialogLocalSetting.h

197 lines
4.6 KiB
C
Raw Normal View History

2023-05-08 06:32:41 +00:00
/**
* @file DialogLocalSetting.h
* @brief
* @author LAMPCAE(LAMPCAE@diso.cn)
2023-05-08 06:32:41 +00:00
* @version 2.5.0
* @date 2022-04-01 09:23
* @copyright Copyright (c) Since 2020 All rights reserved.
*
* ============================================================================
* Program: LAMPCAE
2023-05-08 06:32:41 +00:00
*
* Copyright (c) Since 2020 All rights reserved.
* See License or http://www.LAMPCAE.com/ for details.
2023-05-08 06:32:41 +00:00
*
* BSD 3-Clause License
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* ==================================================================================
*/
#ifndef LOCALSETTING_DIALOG_H_
#define LOCALSETTING_DIALOG_H_
#include <QDialog>
#include <QList>
#include <QButtonGroup>
#include <QMultiHash>
class QTableWidget;
namespace Ui
{
class LocalSettingDialog;
}
namespace GUI
{
class MainWindow;
}
namespace MainWidget
{
class PreWindow;
}
namespace GeometryWidget
{
class GeoPointWidget;
}
namespace Geometry
{
class GeometrySet;
}
enum LocalSettingType
{
UnDefineType = 0,
Points,
FieldsBox,
FieldsBall,
FieldsCylinder,
FieldsSolid,
FieldsFrustum,
};
namespace Gmsh
{
class LocalPoint;
class GmshDialogBase;
class LocalField;
class LocalDensity;
class Cylinder;
/**
* @brief
* @since 2.5.0
*/
class LocalSettingDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief
* @param parent
* @param m
* @param p
* @since 2.5.0
*/
LocalSettingDialog(GmshDialogBase *parent, GUI::MainWindow *m, MainWidget::PreWindow *p);
/**
* @brief
* @since 2.5.0
*/
~LocalSettingDialog();
signals:
/**
* @brief 使
* @since 2.5.0
*/
void setSelectMode(int);
/**
* @brief
* @since 2.5.0
*/
void highLightGeometrySolidSig(Geometry::GeometrySet *, int, bool);
//清空所有高亮对象
void clearGeometryHighLightSig();
private slots:
/**
* @brief
* @since 2.5.0
*/
void on_okPushButton_clicked();
/**
* @brief
* @since 2.5.0
*/
void on_cancelPushButton_clicked();
/**
* @brief
* @since 2.5.0
*/
void on_geoSelectSurface_clicked();
/**
* @brief
* @param type
* @since 2.5.0
*/
void updateInterface(int type);
/**
* @brief 线
* @since 2.5.0
*/
void onCustomChecked();
// void changeData(int, int);
void shapeSlected(Geometry::GeometrySet *set, int index);
private:
void showEvent(QShowEvent *e) override;
/**
* @brief
* @since 2.5.0
*/
void updateLocalInterface();
void updatePointsInterface();
void updateBoxInterface();
void updateBallInterface();
void updateCylinderInterface();
void updateCylinderAxisData(double xa, double ya, double za);
void updateValueInterface(int n);
void showValueInterface(int n);
void hideValueInterface(int n);
void updateSolidFieldInterface();
void updateFrustumFieldInterface();
void clearInterfaceData();
void cylinderSelectVisiable(bool b = false);
void cylinderAxisVisiable(bool b = false);
/*更新不同类型的局部密度界面*/
/*添加局部密度数据,修改局部密度数据*/
void addLocalData(LocalDensity *loc);
void addPointsData();
void addBoxData();
void addBallData();
void addCylinderData();
void addSolidFieldsData();
void addFrustumFieldData();
/*添加局部密度数据,修改局部密度数据*/
/*数据信息展示*/
// void updateTab();
// void updateLocals(int n);
// void deleteItem(int row);
// void operateLocalData(int row);
/*数据信息展示*/
private:
Ui::LocalSettingDialog *_ui{};
QList<LocalPoint *> *_points{};
GeometryWidget::GeoPointWidget *_pointWidget{};
// QTableWidget* _tab{};
QList<LocalField *> *_fields{};
LocalSettingType _localType{Points};
QList<LocalDensity *> *_locals{};
LocalDensity *_currentLocal{};
bool _selectSolid{false};
QMultiHash<Geometry::GeometrySet *, int> _solidHash{};
};
}
#endif