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/FITKInterfacePhysics/FITKModelWire.h

204 lines
6.4 KiB
C

/**
*
* @file FITKModelWire.h
* @brief 线
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*
*/
#ifndef __FITK_MODEL_LOCATION_H___
#define __FITK_MODEL_LOCATION_H___
#include <QList>
#include <QPair>
#include "FITKInterfacePhysicsAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
#include "FITK_Interface/FITKInterfaceModel/FITKModelEnum.h"
namespace Interface
{
class FITKAbstractModel;
/**
* @brief 线ID+/ID
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
class FITKInterfacePhysicsAPI FITKModelWire
: public Core::FITKAbstractNDataObject
{
public:
/**
* @brief Construct a new FITKModelWire object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
explicit FITKModelWire() = default;
/**
* @brief Destroy the FITKModelWire object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
virtual ~FITKModelWire() = default;
/**
* @brief
* @param[i] obj
* @return true
* @return false
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
virtual bool copy(FITKAbstractDataObject* obj) override;
/**
* @brief
* @param[i] type
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void setLocationType(FITKModelEnum::FITKModelSetType type);
/**
* @brief
* @return FITKModelEnum::FITKModelSetType
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
FITKModelEnum::FITKModelSetType getLocationType();
/**
* @brief
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
int getMemberCount();
/**
* @brief ID
* @param[i] index
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
int getModelID(const int index);
/**
* @brief ID
* @param[i] index
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
int getMemberID(const int index);
/**
* @brief
* @param[i] modelID ID
* @param[i] memberID ID
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void appendMember(const int modelID, const int memberID);
/**
* @brief
* @param[i] index
* @return FITKAbstractModel*
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
FITKAbstractModel* getModel(const int index);
/**
* @brief
* @param[i] index
* @param[i] model ID
* @param[i] member ID
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void setModelMember(const int index, const int model, const int member);
/**
* @brief
* @param[i] index
* @return QString
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
QString getModelName(const int index);
/**
* @brief
* @param[i] index
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void removeMember(const int index);
/**
* @brief
* @param[i] modelID ID
* @param[i] memberID ID
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void removeMember(const int modelID, const int member);
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void swap();
/**
* @brief +[/ID]
* @param[i] index
* @return QString
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
QString getTextLabel(const int index);
/**
* @brief
* @param[i] index
* @param[o] coor
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
void getPointCoor(const int index, double* coor);
private:
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
FITKModelEnum::FITKModelSetType _locType{ FITKModelEnum::FMSNode };
/**
* @brief ID + ID
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
QList<QPair<int, int>> _memberLoc{};
};
/**
* @brief 线
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
class FITKInterfacePhysicsAPI FITKModelWireManager
: public Core::FITKAbstractDataManager<FITKModelWire>
{
public:
/**
* @brief Construct a new FITKModelWireManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
explicit FITKModelWireManager() = default;
/**
* @brief Destroy the FITKModelWireManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-20
*/
virtual ~FITKModelWireManager() = default;
};
}
#endif