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_Interface/FITKInterfaceGeometry/FITKGeoCommandList.h

164 lines
4.9 KiB
C

/**
*
* @file FITKGeoCommandList.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*
*/
#ifndef _FITK_GEO_COMMANDLIST__H___
#define _FITK_GEO_COMMANDLIST__H___
#include "FITKInterfaceGeometryAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
#include "FITKAbsGeoCommand.h"
#include "FITKAbsGeoDatum.h"
#include "FITKAbsGeoSketch2D.h"
namespace Interface
{
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
class FITKInterfaceGeometryAPI FITKGeoCommandList : public Core::FITKAbstractDataObject, public FITKGeoCommandManager
{
public:
/**
* @brief Construct a new FITKGeoCommandList object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
explicit FITKGeoCommandList();
/**
* @brief Destroy the FITKGeoCommandList object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
virtual ~FITKGeoCommandList();
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
virtual bool canUndo();
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
virtual bool canRedo();
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-06
*/
virtual bool undo();
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-06
*/
virtual bool redo();
/**
* @brief RedoList[][]
* @param obj
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-06
*/
virtual void appendDataObj(Core::FITKAbstractDataObject* obj) override;
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-30
*/
FITKDatumList* getDatumManager();
/**
* @brief ID
* @param sketchDataIdID-1ID[]
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-04
*/
void setCurrentSketchID(int sketchDataId = -1);
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-04
*/
FITKAbsGeoSketch2D* getCurrentSketchData();
/**
* @brief
* @param[o] minPt
* @param[o] maxPt
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
void getBoundaryBox(double* minPt, double* maxPt);
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-06
*/
FITKGeoCommandManager* getUndoList();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-06
*/
FITKGeoCommandManager* getRedoList();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-07
*/
QList<FITKAbsGeoCommand*> getRootCommandList();
protected:
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-06
*/
FITKGeoCommandManager* m_redoList{ nullptr };
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-30
*/
FITKDatumList* m_datumMgr{ nullptr };
/**
* @brief ID
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-04
*/
int m_currentSketchID = -1;
};
}
#endif