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/FITK_Component/FITKRenderWindowVTK/FITKGraphInteractionStyle.h

199 lines
6.0 KiB
C

/**
*
* @file FITKGraphInteractionStyle.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*
*/
#ifndef _FITKGraphInteractionStyle_H_
#define _FITKGraphInteractionStyle_H_
#include "FITKRenderWindowVTKAPI.h"
#include <QObject>
#include <vtkInteractorStyleRubberBandPick.h>
namespace Comp
{
class FITKGraphOperator;
class FITKGraph3DWindowVTK;
class FITKGraphAreaPicker;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
class FITKRenderWindowVTKAPI FITKGraphInteractionStyle :public QObject, public vtkInteractorStyleRubberBandPick
{
Q_OBJECT
public:
/**
* @brief
* @return FITKGraphInteractionStyle*
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
static FITKGraphInteractionStyle* New();
vtkTypeMacro(FITKGraphInteractionStyle, vtkInteractorStyleRubberBandPick);
/**
* @brief
* @param[i] graphWin
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
void setGraph3DWin(FITKGraph3DWindowVTK* graphWin);
/**
* @brief
* @param[i] interactor My Param doc
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
void setInteractor(vtkRenderWindowInteractor* interactor);
/**
* @brief
* @param[i] renderer
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-19
*/
void setAreaPickRenderer(vtkRenderer* renderer);
/**
* @brief VTK
* @return vtkRenderWindowInteractor*
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-19
*/
vtkRenderWindowInteractor* getInteractor();
/**
* @brief
* @param[i] state true
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-19
*/
void setAredPickerState(bool state);
/**
* @brief
* @param[i] startPos
* @param[i] endPos
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-04-17
*/
virtual void areaPick(int* startPos, int* endPos);
protected:
/**
* @brief Construct a new FITKGraphInteractionStyle object
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
FITKGraphInteractionStyle();
/**
* @brief Destroy the FITKGraphInteractionStyle object
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual ~FITKGraphInteractionStyle();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnLeftButtonDown() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnLeftButtonUp() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnMiddleButtonDown() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnMiddleButtonUp() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnMouseMove() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnMouseWheelForward() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnMouseWheelBackward() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnRightButtonDown() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
virtual void OnRightButtonUp() override;
/**
* @brief
* @return true
* @return false
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
bool isMouseMoved();
protected:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
FITKGraph3DWindowVTK* m_graph3dWin = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
FITKGraphOperator* m_operactor = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
int m_leftButtonDowmPos[2] = { 0,0 };
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-18
*/
int m_leftButtonUpPos[2] = { 0,0 };
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-19
*/
FITKGraphAreaPicker* m_areaPick = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-19
*/
// bool m_pickerState = true;
};
}
#endif