DYTSrouce/src/ui/Panel/DataPanelFactory.h

21 lines
681 B
C++

#pragma once
#include "ui/Panel/DataPanel.h"
#include "workspace/FileEntry.h"
#include <memory>
class DataPanelFactory
{
public:
// Create panel with file path
static DataPanel* CreatePanel(FileEntryType type, int index, const QString& filePath, QWidget* parent = nullptr);
// Create panel with chart data
static DataPanel* CreatePanelWithChartData(FileEntryType type, int index, std::shared_ptr<FileEntryCurve> fileEntry, QWidget* parent = nullptr);
// Check if a panel type is supported
static bool IsTypeSupported(FileEntryType type);
// Get display name for a panel type
static QString GetTypeDisplayName(FileEntryType type);
};