92 lines
2.1 KiB
C++
92 lines
2.1 KiB
C++
#pragma once
|
|
|
|
#include "DataPanel.h"
|
|
#include "workspace/FileEntry.h"
|
|
#include <memory>
|
|
|
|
#include <Q3DSurface>
|
|
#include <QValue3DAxis>
|
|
|
|
using namespace QtDataVisualization;
|
|
|
|
class SurfacePanel : public DataPanel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/**
|
|
* @brief Constructor
|
|
* @param index Panel index
|
|
* @param filePath Associated file path
|
|
* @param parent Parent widget
|
|
*/
|
|
explicit SurfacePanel(int index, const QString& filePath, QWidget* parent = nullptr);
|
|
|
|
/**
|
|
* @brief Constructor with chart data
|
|
* @param index Panel index
|
|
* @param chartData Chart data containing curve information
|
|
* @param parent Parent widget
|
|
*/
|
|
explicit SurfacePanel(int index, std::shared_ptr<FileEntrySurface> fileEntry, QWidget* parent = nullptr);
|
|
|
|
/**
|
|
* @brief Destructor
|
|
*/
|
|
virtual ~SurfacePanel();
|
|
|
|
/**
|
|
* @brief Get file type
|
|
* @return File type (always Curve for this class)
|
|
*/
|
|
FileEntryType GetFileType() const override { return FileEntryType::Surface; }
|
|
|
|
/**
|
|
* @brief Refresh panel content
|
|
*/
|
|
void RefreshPanel() override;
|
|
|
|
protected:
|
|
/**
|
|
* @brief Initialize UI for curve-specific layout
|
|
*/
|
|
virtual void InitUI();
|
|
|
|
/**
|
|
* @brief Get type display name
|
|
* @return Display name for curve type
|
|
*/
|
|
QString GetTypeDisplayName() const override;
|
|
|
|
void OnDataPanelUpdated(FileEntrySurface* fileEntry);
|
|
|
|
virtual void OnTimeChanged(double time);
|
|
|
|
private:
|
|
void updateTitle(const QString& title);
|
|
void updateTitleAxis(const QString& xTitle, const QString& yTitle, const QString& zTitle);
|
|
void updateMinMaxX(float min, float max, int count);
|
|
void updateMinMaxY(float min, float max, int count);
|
|
void updateMinMaxZ(float min, float max, int count);
|
|
void updateParseFile(const QString& strFile, int nT, FileEntrySurface::SurfaceProperties listCurve);
|
|
|
|
private:
|
|
Q3DSurface m_Surface;
|
|
|
|
QSurface3DSeries* m_pSeries;
|
|
|
|
QValue3DAxis* m_p3DXAxis;
|
|
QValue3DAxis* m_p3DYAxis;
|
|
QValue3DAxis* m_p3DZAxis;
|
|
|
|
float m_iMinX = 0;
|
|
float m_iMaxX = 10;
|
|
float m_iMinY = 0;
|
|
float m_iMaxY = 10;
|
|
float m_iMinZ = 0;
|
|
float m_iMaxZ = 10;
|
|
|
|
QMap< double, QMap< int, QVector< QVector<QVector3D> > > > m_data;
|
|
};
|
|
|