48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
|
|
#include "ui/Panel/CurvePanel.h"
|
||
|
|
#include "ui/DockWidget.h"
|
||
|
|
#include "common/SpdLogger.h"
|
||
|
|
|
||
|
|
#include <QVBoxLayout>
|
||
|
|
#include <QLabel>
|
||
|
|
#include <QFileInfo>
|
||
|
|
|
||
|
|
CurvePanel::CurvePanel(int index, const QString& filePath, QWidget* parent)
|
||
|
|
: DataPanel(index, FileEntryType::Curve, filePath, parent)
|
||
|
|
{
|
||
|
|
LOG_INFO("Created CurvePanel {} for file: {}", index, filePath.toStdString());
|
||
|
|
}
|
||
|
|
|
||
|
|
CurvePanel::~CurvePanel()
|
||
|
|
{
|
||
|
|
LOG_INFO("Destroyed CurvePanel {}", GetIndex());
|
||
|
|
}
|
||
|
|
|
||
|
|
void CurvePanel::RefreshPanel()
|
||
|
|
{
|
||
|
|
// Implement curve-specific refresh logic here
|
||
|
|
// For now, just call the base class implementation
|
||
|
|
DataPanel::RefreshPanel();
|
||
|
|
|
||
|
|
LOG_INFO("Refreshed CurvePanel {}", GetIndex());
|
||
|
|
}
|
||
|
|
|
||
|
|
void CurvePanel::InitUI()
|
||
|
|
{
|
||
|
|
// Create basic layout
|
||
|
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
||
|
|
|
||
|
|
// Add placeholder label showing panel information
|
||
|
|
QLabel* infoLabel = new QLabel(QString("Curve Panel %1\nFile: %2\n\nCurve Drawing Area\nPlease inherit this class to implement specific drawing functionality")
|
||
|
|
.arg(GetIndex())
|
||
|
|
.arg(QFileInfo(GetFilePath()).fileName()));
|
||
|
|
infoLabel->setAlignment(Qt::AlignCenter);
|
||
|
|
infoLabel->setStyleSheet("QLabel { color: #666; font-size: 12px; padding: 20px; }");
|
||
|
|
|
||
|
|
layout->addWidget(infoLabel);
|
||
|
|
setLayout(layout);
|
||
|
|
}
|
||
|
|
|
||
|
|
QString CurvePanel::GetTypeDisplayName() const
|
||
|
|
{
|
||
|
|
return "Curve";
|
||
|
|
}
|