100 lines
2.1 KiB
C++
100 lines
2.1 KiB
C++
#pragma once
|
|
|
|
#include "DataPanel.h"
|
|
#include "workspace/FileEntry.h"
|
|
#include <memory>
|
|
#include "ui/chartPlot/FitCurveChartView.h"
|
|
|
|
namespace Ui {
|
|
class FitCurve;
|
|
}
|
|
/**
|
|
* @file CurvePanel.h
|
|
* @brief Curve Panel Class
|
|
* Specialized panel for curve data visualization and manipulation
|
|
*/
|
|
|
|
/**
|
|
* @brief Curve panel class
|
|
* Specialized panel for curve data, inherits from DataPanel
|
|
*/
|
|
class CurvePanel : public DataPanel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/**
|
|
* @brief Constructor
|
|
* @param index Panel index
|
|
* @param filePath Associated file path
|
|
* @param parent Parent widget
|
|
*/
|
|
explicit CurvePanel(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 CurvePanel(int index, std::shared_ptr<FileEntryCurve> fileEntry, QWidget* parent = nullptr);
|
|
|
|
/**
|
|
* @brief Destructor
|
|
*/
|
|
virtual ~CurvePanel();
|
|
|
|
/**
|
|
* @brief Get file type
|
|
* @return File type (always Curve for this class)
|
|
*/
|
|
FileEntryType GetFileType() const override { return FileEntryType::Curve; }
|
|
|
|
/**
|
|
* @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 initQChartView();
|
|
|
|
void OnDataPanelUpdated(FileEntryCurve* fileEntry);
|
|
|
|
private:
|
|
/**
|
|
* @brief Update curve display based on chart data
|
|
*/
|
|
void UpdateCurveDisplay();
|
|
|
|
private:
|
|
Ui::FitCurve* ui;
|
|
FitCurveChartView* curveChartView;
|
|
QChart* curveChart;
|
|
|
|
bool isPressed = false;
|
|
QPoint pressedPoint;
|
|
|
|
QValueAxis* m_pAxisX = NULL;
|
|
QValueAxis* m_pAxisY = NULL;
|
|
float m_iXMax;
|
|
float m_iXMin;
|
|
float m_iYMax;
|
|
float m_iYMin;
|
|
|
|
QMap<int, QSplineSeries*> m_seriesIDMap;
|
|
|
|
QMap< double, QMap<int, QVariantList> > m_dataWava;
|
|
QMap< double, QMap<int, QPointF> > m_dataReport;
|
|
}; |