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/OperatorsInterface/GraphEventOperator.h

203 lines
6.3 KiB
C

/*****************************************************************//**
* @file GraphEventOperator.h
* @brief
*
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-06-12
*********************************************************************/
#ifndef __GRAPHEVENTOPERATOR_H__
#define __GRAPHEVENTOPERATOR_H__
#include "FITK_Kernel/FITKCore/FITKAbstractOperator.h"
#include "OperatorsInterfaceAPI.h"
#include <QColor>
#include <QVariant>
// 前置声明
namespace Exchange
{
class FITKFluidVTKGraphObject3D;
}
enum HighlightLevel
{
// 取消高亮。
DisHighlight = 0,
// 高亮。
Highlight,
// 高级高亮
AdvHighlight
};
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-26
*/
struct GraphOperParam
{
// 操作的数据ID。不存在则传入-1
int DataId = -1;
// 隐藏与显示。
bool Visibility = true;
// 强制刷新。
bool ForceUpdate = false;
// 高亮级别。
HighlightLevel HighlightMode = DisHighlight;
// 高级高亮索引或ID列表。高级高亮等功能使用
QVector<int> AdvHighlightIndice;
// 高亮颜色。(缺省)
QColor HighlightColor;
};
namespace EventOper
{
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-06-12
*/
class OperatorsInterfaceAPI GraphEventOperator : public Core::FITKAbstractOperator
{
Q_OBJECT
public:
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-06-12
*/
explicit GraphEventOperator() = default;
/**
* @brief []
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-06-12
*/
virtual ~GraphEventOperator() = default;
// 前处理渲染与窗口功能。
//@{
/**
* @brief ID[]
* @param dataObjIdID
* @param forceUpdate[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-06-12
*/
virtual void updateGraph(int dataObjId, bool forceUpdate = false);
/**
* @brief []
*
* @param type
* @param param[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-26
*/
virtual void updateGraphByType(int type, GraphOperParam param = GraphOperParam());
/**
* @brief ID[]
* @param dataObjIdID
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-23
*/
virtual Exchange::FITKFluidVTKGraphObject3D* getModelGraphObjectByDataId(int dataObjId);
/**
* @brief []
* @param flag
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-30
*/
virtual void setEnableModelTransparent(bool flag);
/**
* @brief []
* @param flag
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-02
*/
virtual void setEnableMeshTransparent(bool flag);
/**
* @brief []
* @param dataObjIdID
* @param visibility
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-02
*/
virtual void setModelVisible(int dataObjId, bool visibility);
/**
* @brief []
* @param dataObjIdID
* @param visibility
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-02
*/
virtual void setMeshVisible(int dataObjId, bool visibility);
//@}
// 高亮功能接口。
//@{
/**
* @brief []
* @param dataObjIdID
* @param info[]
* @param color[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-30
*/
virtual void highlight(int dataObjId, QVariant info = QVariant(), QColor color = QColor());
/**
* @brief []
* @param dataObjIdID
* @param indiceID[]
* @param color[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-30
*/
virtual void advHighlight(int dataObjId, QVector<int> & indice, QColor color = QColor());
/**
* @brief []
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-30
*/
virtual void clearHighlight();
//@}
// 渲染专用接口。
//@{
/**
* @brief []
* @param fitView
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-24
*/
virtual void reRender(bool fitView = false);
//@}
// 工具方法。
//@{
//@}
};
} // namespace EventOper
#endif // __GRAPHEVENTOPERATOR_H__