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.
AppFlow/OperatorsGUI/OperGraphPick.h

141 lines
4.5 KiB
C

/*****************************************************************//**
* @file OperGraphPick.h
* @brief
*
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*********************************************************************/
#ifndef __OPERGRAPHPICK_H__
#define __OPERGRAPHPICK_H__
#include "OperatorsInterface/GraphInteractionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"
// 前置声明
class vtkDataSet;
namespace Exchange
{
class FITKFluidVTKGraphObject3D;
class FITKFluidVTKGraphObjectPick;
}
namespace GraphData
{
class PickedDataProvider;
}
namespace GUIOper
{
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
class OperGraphPick : public EventOper::GraphInteractionOperator
{
public:
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
explicit OperGraphPick();
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
~OperGraphPick();
/**
* @brief []
* @param graphWindow
* @param actor
* @param index
* @param pickedWorldPos
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void picked(Comp::FITKGraph3DWindowVTK* graphWindow, vtkActor* actor, int index, double* pickedWorldPos) override;
/**
* @brief []
* @param graphWindow
* @param actors
* @param cutPlane
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void picked(Comp::FITKGraph3DWindowVTK* graphWindow, QList<vtkActor*> actors, vtkPlanes* cutPlane) override;
/**
* @brief []
* @param graphWindow
* @param actor
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void picked(Comp::FITKGraph3DWindowVTK* graphWindow, vtkActor2D* actor) override;
/**
* @brief []
* @param graphWindow[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void clear(Comp::FITKGraph3DWindowVTK* graphWindow = nullptr) override;
/**
* @brief []
* @param color
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void setPickedColor(QColor color) override;
/**
* @brief []
* @param pickObjType
* @param pickMethod
* @param dataObjIdID-1[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void setActorStateByPickInfo(int pickObjType, int pickMethod, int dataObjId = -1) override;
private:
/**
* @brief
* @param obj
* @param graphWidget
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
void addGraphObjectToWidget(Exchange::FITKFluidVTKGraphObject3D* obj, Comp::FITKGraph3DWindowVTK* graphWidget);
private:
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
Exchange::FITKFluidVTKGraphObjectPick* m_graphObjPick{ nullptr };
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-19
*/
GraphData::PickedDataProvider* m_pickedProvider{ nullptr };
};
Register2FITKOPeratorRepo(GraphPick, OperGraphPick);
} // namespace GUIOper
#endif // __OPERGRAPHPICK_H__