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/FITKAbstractSection.h

151 lines
4.2 KiB
C

/**
*
* @file FITKAbstractSection.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*
*/
#ifndef __FITKABSTRACTSEDTION_H__
#define __FITKABSTRACTSEDTION_H__
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
#include "FITKInterfacePhysicsAPI.h"
#include <QList>
namespace Interface
{
class FITKAbstractMaterial;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
class FITKInterfacePhysicsAPI FITKAbstractSection : public Core::FITKAbstractNDataObject
{
public:
/**
* @brief Construct a new FITKAbstractSection object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
explicit FITKAbstractSection();
/**
* @brief Destroy the FITKAbstractSection object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
virtual ~FITKAbstractSection() = 0;
/**
* @brief ID
* @param[i] id id
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
void setMaterial(int id, int index = 0);
/**
* @brief
* @param[i] mat
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
void setMaterial(Core::FITKAbstractDataObject* mat, int index = 0);
/**
* @brief ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
int getMaterialID( int index = 0) const;
/**
* @brief
* @return FITKAbaMaterial*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
FITKAbstractMaterial* getMaterial(int index = 0) const;
/**
* @brief
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
QString getMaterialName( int index = 0) const;
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
int getMaterialCount();
/**
* @brief index
* @param[i] index
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
void removeMaterial(int index);
/**
* @brief UI
* @return QString
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-03-27
*/
virtual QString getTypeString();
/**
* @brief id使id
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-04-03
*/
int getSectionID() const;
private:
/**
* @brief -1
* @param[i] count
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-27
*/
void setSize(int count);
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-27
*/
QList<int> _materialIDs{};
private:
/**
* @brief id使
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-04-03
*/
int _sectionID = -1;
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
class FITKInterfacePhysicsAPI FITKAbstractSectionManager : public Core::FITKAbstractObject,
public Core::FITKAbstractDataManager<FITKAbstractSection>
{
public:
explicit FITKAbstractSectionManager() = default;
virtual ~FITKAbstractSectionManager() = default;
};
}
#endif