Compare commits
No commits in common. "0fb6395f06a7de70ce0f8470f187bcb1e12b65e1" and "885212c7d2d093037b5fa8ed7fc4eed0e8968260" have entirely different histories.
0fb6395f06
...
885212c7d2
@ -30,8 +30,6 @@
|
|||||||
<file>res/default/menu_uisetting.png</file>
|
<file>res/default/menu_uisetting.png</file>
|
||||||
<file>res/default/menu_window_manager.png</file>
|
<file>res/default/menu_window_manager.png</file>
|
||||||
<file>res/default/menu_window_setting.png</file>
|
<file>res/default/menu_window_setting.png</file>
|
||||||
<file>res/default/Command.png</file>
|
|
||||||
<file>res/default/polar.png</file>
|
|
||||||
<file>res/models/aircraft_carrier.png</file>
|
<file>res/models/aircraft_carrier.png</file>
|
||||||
<file>res/models/chaff_interference.png</file>
|
<file>res/models/chaff_interference.png</file>
|
||||||
<file>res/models/missile.png</file>
|
<file>res/models/missile.png</file>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB |
@ -18,16 +18,16 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>20</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="sys_title">
|
<widget class="QLabel" name="sys_title">
|
||||||
|
|||||||
@ -41,7 +41,6 @@ void FileManagerMenu::InitConnect() {
|
|||||||
connect(ui->menu_surface_file, &QToolButton::clicked, this, &FileManagerMenu::AddSurfaceFile);
|
connect(ui->menu_surface_file, &QToolButton::clicked, this, &FileManagerMenu::AddSurfaceFile);
|
||||||
connect(ui->menu_table_file, &QToolButton::clicked, this, &FileManagerMenu::AddTableFile);
|
connect(ui->menu_table_file, &QToolButton::clicked, this, &FileManagerMenu::AddTableFile);
|
||||||
connect(ui->menu_light_file, &QToolButton::clicked, this, &FileManagerMenu::AddLightFile);
|
connect(ui->menu_light_file, &QToolButton::clicked, this, &FileManagerMenu::AddLightFile);
|
||||||
connect(ui->menu_polar_file, &QToolButton::clicked, this, &FileManagerMenu::AddPolarFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileManagerMenu::NewWorkSpace() {
|
void FileManagerMenu::NewWorkSpace() {
|
||||||
@ -95,41 +94,38 @@ void FileManagerMenu::AddWaveFile() {
|
|||||||
// Show curve file addition dialog
|
// Show curve file addition dialog
|
||||||
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Curve, &MainFrame::Get());
|
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Curve, &MainFrame::Get());
|
||||||
if (dialog && dialog->exec() == QDialog::Accepted) {
|
if (dialog && dialog->exec() == QDialog::Accepted) {
|
||||||
|
QString selectedPath = dialog->getSelectedFilePath();
|
||||||
SaveWorkSpace();
|
|
||||||
|
// Create file entry using factory function
|
||||||
//QString selectedPath = dialog->getSelectedFilePath();
|
auto fileEntry = CreateFileEntryCurve(selectedPath);
|
||||||
//
|
if (!fileEntry) {
|
||||||
//// Create file entry using factory function
|
QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
||||||
//auto fileEntry = CreateFileEntryCurve(selectedPath);
|
QObject::tr("Failed to create file entry"));
|
||||||
//if (!fileEntry) {
|
return;
|
||||||
// QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
}
|
||||||
// QObject::tr("Failed to create file entry"));
|
|
||||||
// return;
|
// Add to workspace
|
||||||
//}
|
switch (current->SetFileEntry(fileEntry)) {
|
||||||
//
|
case WorkSpace::FileEntryResult::Ok:
|
||||||
//// Add to workspace
|
// Success - no action needed
|
||||||
//switch (current->SetFileEntry(fileEntry)) {
|
break;
|
||||||
//case WorkSpace::FileEntryResult::Ok:
|
case WorkSpace::FileEntryResult::LimitExceeded:
|
||||||
// // Success - no action needed
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("up to 9 files allowed for this type"));
|
||||||
//case WorkSpace::FileEntryResult::LimitExceeded:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::Duplicate:
|
||||||
// QObject::tr("up to 9 files allowed for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("file already added for this type"));
|
||||||
//case WorkSpace::FileEntryResult::Duplicate:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::CopyFailed:
|
||||||
// QObject::tr("file already added for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("copy file failed"));
|
||||||
//case WorkSpace::FileEntryResult::CopyFailed:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::InvalidFile:
|
||||||
// QObject::tr("copy file failed"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("invalid file"));
|
||||||
//case WorkSpace::FileEntryResult::InvalidFile:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
}
|
||||||
// QObject::tr("invalid file"));
|
|
||||||
// break;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,41 +139,38 @@ void FileManagerMenu::AddSurfaceFile() {
|
|||||||
// Show surface file addition dialog
|
// Show surface file addition dialog
|
||||||
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Surface, &MainFrame::Get());
|
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Surface, &MainFrame::Get());
|
||||||
if (dialog && dialog->exec() == QDialog::Accepted) {
|
if (dialog && dialog->exec() == QDialog::Accepted) {
|
||||||
|
QString selectedPath = dialog->getSelectedFilePath();
|
||||||
SaveWorkSpace();
|
|
||||||
|
// Create file entry using factory function
|
||||||
//QString selectedPath = dialog->getSelectedFilePath();
|
auto fileEntry = CreateFileEntrySurface(selectedPath);
|
||||||
//
|
if (!fileEntry) {
|
||||||
//// Create file entry using factory function
|
QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
||||||
//auto fileEntry = CreateFileEntrySurface(selectedPath);
|
QObject::tr("Failed to create file entry"));
|
||||||
//if (!fileEntry) {
|
return;
|
||||||
// QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
}
|
||||||
// QObject::tr("Failed to create file entry"));
|
|
||||||
// return;
|
// Add to workspace
|
||||||
//}
|
switch (current->SetFileEntry(fileEntry)) {
|
||||||
//
|
case WorkSpace::FileEntryResult::Ok:
|
||||||
//// Add to workspace
|
// Success - no action needed
|
||||||
//switch (current->SetFileEntry(fileEntry)) {
|
break;
|
||||||
//case WorkSpace::FileEntryResult::Ok:
|
case WorkSpace::FileEntryResult::LimitExceeded:
|
||||||
// // Success - no action needed
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("up to 9 files allowed for this type"));
|
||||||
//case WorkSpace::FileEntryResult::LimitExceeded:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::Duplicate:
|
||||||
// QObject::tr("up to 9 files allowed for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("file already added for this type"));
|
||||||
//case WorkSpace::FileEntryResult::Duplicate:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::CopyFailed:
|
||||||
// QObject::tr("file already added for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("copy file failed"));
|
||||||
//case WorkSpace::FileEntryResult::CopyFailed:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::InvalidFile:
|
||||||
// QObject::tr("copy file failed"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("invalid file"));
|
||||||
//case WorkSpace::FileEntryResult::InvalidFile:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
}
|
||||||
// QObject::tr("invalid file"));
|
|
||||||
// break;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,41 +184,38 @@ void FileManagerMenu::AddTableFile() {
|
|||||||
// Show table file addition dialog
|
// Show table file addition dialog
|
||||||
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Table, &MainFrame::Get());
|
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Table, &MainFrame::Get());
|
||||||
if (dialog && dialog->exec() == QDialog::Accepted) {
|
if (dialog && dialog->exec() == QDialog::Accepted) {
|
||||||
|
QString selectedPath = dialog->getSelectedFilePath();
|
||||||
SaveWorkSpace();
|
|
||||||
|
// Create file entry using factory function
|
||||||
//QString selectedPath = dialog->getSelectedFilePath();
|
auto fileEntry = CreateFileEntryTable(selectedPath);
|
||||||
//
|
if (!fileEntry) {
|
||||||
//// Create file entry using factory function
|
QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
||||||
//auto fileEntry = CreateFileEntryTable(selectedPath);
|
QObject::tr("Failed to create file entry"));
|
||||||
//if (!fileEntry) {
|
return;
|
||||||
// QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
}
|
||||||
// QObject::tr("Failed to create file entry"));
|
|
||||||
// return;
|
// Add to workspace
|
||||||
//}
|
switch (current->SetFileEntry(fileEntry)) {
|
||||||
//
|
case WorkSpace::FileEntryResult::Ok:
|
||||||
//// Add to workspace
|
// Success - no action needed
|
||||||
//switch (current->SetFileEntry(fileEntry)) {
|
break;
|
||||||
//case WorkSpace::FileEntryResult::Ok:
|
case WorkSpace::FileEntryResult::LimitExceeded:
|
||||||
// // Success - no action needed
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("up to 9 files allowed for this type"));
|
||||||
//case WorkSpace::FileEntryResult::LimitExceeded:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::Duplicate:
|
||||||
// QObject::tr("up to 9 files allowed for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("file already added for this type"));
|
||||||
//case WorkSpace::FileEntryResult::Duplicate:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::CopyFailed:
|
||||||
// QObject::tr("file already added for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("copy file failed"));
|
||||||
//case WorkSpace::FileEntryResult::CopyFailed:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::InvalidFile:
|
||||||
// QObject::tr("copy file failed"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("invalid file"));
|
||||||
//case WorkSpace::FileEntryResult::InvalidFile:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
}
|
||||||
// QObject::tr("invalid file"));
|
|
||||||
// break;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,55 +229,37 @@ void FileManagerMenu::AddLightFile() {
|
|||||||
// Show light file addition dialog
|
// Show light file addition dialog
|
||||||
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Light, &MainFrame::Get());
|
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Light, &MainFrame::Get());
|
||||||
if (dialog && dialog->exec() == QDialog::Accepted) {
|
if (dialog && dialog->exec() == QDialog::Accepted) {
|
||||||
|
QString selectedPath = dialog->getSelectedFilePath();
|
||||||
SaveWorkSpace();
|
|
||||||
|
// Create file entry using factory function
|
||||||
//QString selectedPath = dialog->getSelectedFilePath();
|
auto fileEntry = CreateFileEntryLight(selectedPath);
|
||||||
//
|
if (!fileEntry) {
|
||||||
//// Create file entry using factory function
|
QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
||||||
//auto fileEntry = CreateFileEntryLight(selectedPath);
|
QObject::tr("Failed to create file entry"));
|
||||||
//if (!fileEntry) {
|
return;
|
||||||
// QMessageBox::warning(&MainFrame::Get(), QObject::tr("Error"),
|
}
|
||||||
// QObject::tr("Failed to create file entry"));
|
|
||||||
// return;
|
// Add to workspace
|
||||||
//}
|
switch (current->SetFileEntry(fileEntry)) {
|
||||||
//
|
case WorkSpace::FileEntryResult::Ok:
|
||||||
//// Add to workspace
|
// Success - no action needed
|
||||||
//switch (current->SetFileEntry(fileEntry)) {
|
break;
|
||||||
//case WorkSpace::FileEntryResult::Ok:
|
case WorkSpace::FileEntryResult::LimitExceeded:
|
||||||
// // Success - no action needed
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("up to 9 files allowed for this type"));
|
||||||
//case WorkSpace::FileEntryResult::LimitExceeded:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::Duplicate:
|
||||||
// QObject::tr("up to 9 files allowed for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("file already added for this type"));
|
||||||
//case WorkSpace::FileEntryResult::Duplicate:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::CopyFailed:
|
||||||
// QObject::tr("file already added for this type"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("copy file failed"));
|
||||||
//case WorkSpace::FileEntryResult::CopyFailed:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
case WorkSpace::FileEntryResult::InvalidFile:
|
||||||
// QObject::tr("copy file failed"));
|
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
||||||
// break;
|
QObject::tr("invalid file"));
|
||||||
//case WorkSpace::FileEntryResult::InvalidFile:
|
break;
|
||||||
// QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"),
|
}
|
||||||
// QObject::tr("invalid file"));
|
|
||||||
// break;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileManagerMenu::AddPolarFile() {
|
|
||||||
auto current = WorkSpaceManager::Get().GetCurrent();
|
|
||||||
if (nullptr == current) {
|
|
||||||
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"), QObject::tr("please create workspace first"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show light file addition dialog
|
|
||||||
auto dialog = AddFileDialogFactory::createDialog(FileEntryType::Polar, &MainFrame::Get());
|
|
||||||
if (dialog && dialog->exec() == QDialog::Accepted) {
|
|
||||||
|
|
||||||
SaveWorkSpace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -25,7 +25,6 @@ protected:
|
|||||||
void AddSurfaceFile();
|
void AddSurfaceFile();
|
||||||
void AddTableFile();
|
void AddTableFile();
|
||||||
void AddLightFile();
|
void AddLightFile();
|
||||||
void AddPolarFile();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void LoadDyt(const QString& path);
|
void LoadDyt(const QString& path);
|
||||||
|
|||||||
@ -94,16 +94,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="menu_polar_file">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>new polar file</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
@ -82,8 +82,6 @@ QString DataPanel::GetTypeDisplayName() const
|
|||||||
return "Table";
|
return "Table";
|
||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
return "Light";
|
return "Light";
|
||||||
case FileEntryType::Polar:
|
|
||||||
return "Polar";
|
|
||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,10 +4,9 @@
|
|||||||
#include "common/SpdLogger.h"
|
#include "common/SpdLogger.h"
|
||||||
|
|
||||||
// Forward declarations for future panel types
|
// Forward declarations for future panel types
|
||||||
#include "SurfacePanel.h"
|
#include "SurfacePanel.h"
|
||||||
#include "TablePanel.h"
|
#include "TablePanel.h"
|
||||||
#include "LightPanel.h"
|
#include "LightPanel.h"
|
||||||
#include "PolarPanel.h"
|
|
||||||
|
|
||||||
DataPanel* DataPanelFactory::CreatePanel(FileEntryType fileType, int index, const QString& filePath, QWidget* parent)
|
DataPanel* DataPanelFactory::CreatePanel(FileEntryType fileType, int index, const QString& filePath, QWidget* parent)
|
||||||
{
|
{
|
||||||
@ -31,11 +30,6 @@ DataPanel* DataPanelFactory::CreatePanel(FileEntryType fileType, int index, cons
|
|||||||
// TODO: Implement LightPanel
|
// TODO: Implement LightPanel
|
||||||
LOG_WARN("LightPanel not implemented yet, creating base DataPanel");
|
LOG_WARN("LightPanel not implemented yet, creating base DataPanel");
|
||||||
return new LightPanel(index, filePath, parent);
|
return new LightPanel(index, filePath, parent);
|
||||||
|
|
||||||
case FileEntryType::Polar:
|
|
||||||
// TODO: Implement LightPanel
|
|
||||||
LOG_WARN("PolarPanel not implemented yet, creating base DataPanel");
|
|
||||||
return new PolarPanel(index, filePath, parent);
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unsupported file type: {}", static_cast<int>(fileType));
|
LOG_ERROR("Unsupported file type: {}", static_cast<int>(fileType));
|
||||||
@ -57,7 +51,6 @@ bool DataPanelFactory::IsTypeSupported(FileEntryType fileType)
|
|||||||
case FileEntryType::Surface:
|
case FileEntryType::Surface:
|
||||||
case FileEntryType::Table:
|
case FileEntryType::Table:
|
||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
case FileEntryType::Polar:
|
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@ -75,8 +68,6 @@ QString DataPanelFactory::GetTypeDisplayName(FileEntryType fileType)
|
|||||||
return "Table";
|
return "Table";
|
||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
return "Light";
|
return "Light";
|
||||||
case FileEntryType::Polar:
|
|
||||||
return "Polar";
|
|
||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,6 @@ void DataPanelManager::SetWorkspace(WorkSpace* workspace)
|
|||||||
UpdatePanelsForType(FileEntryType::Surface);
|
UpdatePanelsForType(FileEntryType::Surface);
|
||||||
UpdatePanelsForType(FileEntryType::Table);
|
UpdatePanelsForType(FileEntryType::Table);
|
||||||
UpdatePanelsForType(FileEntryType::Light);
|
UpdatePanelsForType(FileEntryType::Light);
|
||||||
UpdatePanelsForType(FileEntryType::Polar);
|
|
||||||
} else {
|
} else {
|
||||||
ClearAllPanels();
|
ClearAllPanels();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,344 +0,0 @@
|
|||||||
#include "ui/Panel/PolarPanel.h"
|
|
||||||
#include "ui/DockWidget.h"
|
|
||||||
#include "ui/DockTitleBar.h"
|
|
||||||
#include "common/SpdLogger.h"
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
PolarPanel::PolarPanel(int index, const QString& filePath, QWidget* parent)
|
|
||||||
: DataPanel(index, FileEntryType::Polar, filePath, parent)
|
|
||||||
{
|
|
||||||
m_pChart = NULL;
|
|
||||||
m_pThetaAxis = NULL;
|
|
||||||
m_pRadiusAxis = NULL;
|
|
||||||
|
|
||||||
m_iThetaMax = 0;
|
|
||||||
m_iThetaMin = 0;
|
|
||||||
m_iRadiusMax = 0;
|
|
||||||
m_iRadiusMin = 0;
|
|
||||||
|
|
||||||
m_unitTheta = "";
|
|
||||||
m_unitRadius = "";
|
|
||||||
|
|
||||||
LOG_INFO("Created PolarPanel {} for file: {}", index, filePath.toStdString());
|
|
||||||
}
|
|
||||||
|
|
||||||
PolarPanel::PolarPanel(int index, std::shared_ptr<FileEntryPolar> fileEntry, QWidget* parent)
|
|
||||||
: DataPanel(index, fileEntry, parent)
|
|
||||||
{
|
|
||||||
m_pChart = NULL;
|
|
||||||
m_pThetaAxis = NULL;
|
|
||||||
m_pRadiusAxis = NULL;
|
|
||||||
|
|
||||||
m_iThetaMax = 0;
|
|
||||||
m_iThetaMin = 0;
|
|
||||||
m_iRadiusMax = 0;
|
|
||||||
m_iRadiusMin = 0;
|
|
||||||
|
|
||||||
m_unitTheta = "";
|
|
||||||
m_unitRadius = "";
|
|
||||||
|
|
||||||
if (fileEntry) {
|
|
||||||
LOG_INFO("Created PolarPanel {} for chart: {}", index, fileEntry->GetName().toStdString());
|
|
||||||
// Override the title with chart name
|
|
||||||
title_ = QString("Polar Panel %1 - %2").arg(index).arg(fileEntry->GetName());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LOG_WARN("Created PolarPanel {} with null chart data", index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PolarPanel::~PolarPanel()
|
|
||||||
{
|
|
||||||
LOG_INFO("Destroyed PolarPanel {}", GetIndex());
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::RefreshPanel()
|
|
||||||
{
|
|
||||||
// Implement curve-specific refresh logic here
|
|
||||||
DataPanel::RefreshPanel();
|
|
||||||
|
|
||||||
if (auto fileEntry = fileEntry_->AsPolar()) {
|
|
||||||
OnDataPanelUpdated(fileEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_INFO("Refreshed TablePanel {}", GetIndex());
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::InitUI()
|
|
||||||
{
|
|
||||||
m_pChart = new QPolarChart();
|
|
||||||
//mPolarChart->addSeries(mCurveData);
|
|
||||||
//m_pChart->legend()->hide();
|
|
||||||
m_pChart->layout()->setContentsMargins(0, 0, 0, 0);
|
|
||||||
m_pChart->setBackgroundRoundness(0);
|
|
||||||
m_pChart->setTheme(QChart::ChartThemeBlueIcy);
|
|
||||||
|
|
||||||
//×ø±êÖá
|
|
||||||
m_pThetaAxis = new QValueAxis();
|
|
||||||
m_pThetaAxis->setTickCount(13);
|
|
||||||
m_pThetaAxis->setLabelFormat("%d");
|
|
||||||
m_pThetaAxis->setRange(0, 360);
|
|
||||||
m_pChart->addAxis(m_pThetaAxis, QPolarChart::PolarOrientationAngular);
|
|
||||||
|
|
||||||
m_pRadiusAxis = new QValueAxis();
|
|
||||||
m_pRadiusAxis->setTickCount(6);
|
|
||||||
m_pRadiusAxis->setLabelFormat("%d");
|
|
||||||
m_pRadiusAxis->setRange(0, 30);
|
|
||||||
m_pChart->addAxis(m_pRadiusAxis, QPolarChart::PolarOrientationRadial);
|
|
||||||
|
|
||||||
QChartView *mChartView = new QChartView();
|
|
||||||
mChartView->setChart(m_pChart);
|
|
||||||
mChartView->setRenderHint(QPainter::Antialiasing);
|
|
||||||
|
|
||||||
QHBoxLayout* mainLayout = new QHBoxLayout(this);
|
|
||||||
mainLayout->setContentsMargins(0, 0, 0, 0);
|
|
||||||
mainLayout->addWidget(mChartView);
|
|
||||||
setLayout(mainLayout);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString PolarPanel::GetTypeDisplayName() const
|
|
||||||
{
|
|
||||||
return "Polar";
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::OnDataPanelUpdated(FileEntryPolar* fileEntry)
|
|
||||||
{
|
|
||||||
QString strName = fileEntry->GetName();
|
|
||||||
updateTitle(strName);
|
|
||||||
|
|
||||||
FileEntryPolar::ChartProperties propChart = fileEntry->GetChartProperties();
|
|
||||||
updateTitleAxis(propChart.AngularTitle, propChart.RadialTitle);
|
|
||||||
updateMinMaxTheta(propChart.AngularMin, propChart.AngularMax, propChart.AngularCount, propChart.AngularUnit);
|
|
||||||
updateMinMaxRadius(propChart.RadialMin, propChart.RadialMax, propChart.RadialCount, propChart.RadialUnit);
|
|
||||||
|
|
||||||
QString strFile = fileEntry->GetPath() + "/" + fileEntry->GetFileName();
|
|
||||||
FileEntryPolar::LineProperties propCurves = fileEntry->GetLineProperties();
|
|
||||||
updateParseFile(strFile, propChart.timeParam, propCurves);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::OnTimeChanged(double time)
|
|
||||||
{
|
|
||||||
if (m_data.size() > 0)
|
|
||||||
{
|
|
||||||
for (QMap<int, QLineSeries *>::Iterator itSeries = m_seriesIDMap.begin(); itSeries != m_seriesIDMap.end(); itSeries++)
|
|
||||||
{
|
|
||||||
QLineSeries * pSeries = itSeries.value();
|
|
||||||
if (pSeries)
|
|
||||||
{
|
|
||||||
pSeries->clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QMap< double, QMap<int, QPointF> >::const_iterator ite = m_data.lowerBound(time);
|
|
||||||
if (ite != m_data.end())
|
|
||||||
{
|
|
||||||
ite++;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (QMap< double, QMap<int, QPointF> >::Iterator itA = m_data.begin(); itA != ite; itA++)
|
|
||||||
{
|
|
||||||
double dTime = itA.key();
|
|
||||||
QMap<int, QPointF> mapData = itA.value();
|
|
||||||
for (QMap<int, QPointF>::Iterator it = mapData.begin(); it != mapData.end(); it++)
|
|
||||||
{
|
|
||||||
int nIndex = it.key();
|
|
||||||
QPointF data = it.value();
|
|
||||||
|
|
||||||
QLineSeries * pSeries = m_seriesIDMap.value(nIndex);
|
|
||||||
if (pSeries)
|
|
||||||
{
|
|
||||||
pSeries->append(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_pChart->update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::updateTitle(const QString & title)
|
|
||||||
{
|
|
||||||
if (nullptr != dockWidget_)
|
|
||||||
{
|
|
||||||
dockWidget_->setWindowTitle(title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::updateTitleAxis(const QString& thetaTitle, const QString& radiusTitle)
|
|
||||||
{
|
|
||||||
if (m_pThetaAxis)
|
|
||||||
{
|
|
||||||
if (!thetaTitle.isEmpty())
|
|
||||||
{
|
|
||||||
m_pThetaAxis->setTitleText(thetaTitle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_pRadiusAxis)
|
|
||||||
{
|
|
||||||
if (!radiusTitle.isEmpty())
|
|
||||||
{
|
|
||||||
m_pRadiusAxis->setTitleText(radiusTitle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::updateMinMaxTheta(float min, float max, int count, const QString& unit)
|
|
||||||
{
|
|
||||||
if (m_pThetaAxis)
|
|
||||||
{
|
|
||||||
if (max > min)
|
|
||||||
{
|
|
||||||
m_iThetaMax = max;
|
|
||||||
m_iThetaMin = min;
|
|
||||||
|
|
||||||
m_pThetaAxis->setRange(min, max);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count > 0)
|
|
||||||
{
|
|
||||||
m_pThetaAxis->setTickCount(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!unit.isEmpty())
|
|
||||||
{
|
|
||||||
m_pThetaAxis->setLabelFormat("%d" + unit);
|
|
||||||
|
|
||||||
m_unitTheta = unit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::updateMinMaxRadius(float min, float max, int count, const QString& unit)
|
|
||||||
{
|
|
||||||
if (m_pRadiusAxis)
|
|
||||||
{
|
|
||||||
if (max > min)
|
|
||||||
{
|
|
||||||
m_iRadiusMax = max;
|
|
||||||
m_iRadiusMin = min;
|
|
||||||
|
|
||||||
m_pRadiusAxis->setRange(min, max);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count > 0)
|
|
||||||
{
|
|
||||||
m_pRadiusAxis->setTickCount(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!unit.isEmpty())
|
|
||||||
{
|
|
||||||
m_pRadiusAxis->setLabelFormat("%d" + unit);
|
|
||||||
|
|
||||||
m_unitRadius = unit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PolarPanel::updateParseFile(const QString& strFile, int nT, FileEntryPolar::LineProperties listCurve)
|
|
||||||
{
|
|
||||||
if (strFile.isEmpty())
|
|
||||||
{
|
|
||||||
QMessageBox::information(nullptr, QStringLiteral("Error"), QStringLiteral("Please check file path"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_seriesIDMap.clear();
|
|
||||||
|
|
||||||
QFile file(strFile);
|
|
||||||
if (file.open(QIODevice::ReadOnly))
|
|
||||||
{
|
|
||||||
bool bResetAxisTheta = false;
|
|
||||||
if (m_iThetaMax == m_iThetaMin)
|
|
||||||
{
|
|
||||||
bResetAxisTheta = true;
|
|
||||||
}
|
|
||||||
bool bResetAxisRadius = false;
|
|
||||||
if (m_iRadiusMax == m_iRadiusMin)
|
|
||||||
{
|
|
||||||
bResetAxisRadius = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
float maxTheta = -10000000.0;
|
|
||||||
float minTheta = 10000000.0;
|
|
||||||
float maxRadius = -10000000.0;
|
|
||||||
float minRadius = 10000000.0;
|
|
||||||
|
|
||||||
while (!file.atEnd())
|
|
||||||
{
|
|
||||||
QString strLine = file.readLine().simplified();
|
|
||||||
if (!strLine.isEmpty())
|
|
||||||
{
|
|
||||||
QStringList listLine = strLine.split(" ");
|
|
||||||
double t = listLine.at(nT).toDouble();
|
|
||||||
|
|
||||||
QMap<int, QPointF> mapData;
|
|
||||||
for (int nI = 0; nI < listCurve.size(); nI++)
|
|
||||||
{
|
|
||||||
FileEntryPolar::LineProperty propCurve = listCurve.at(nI);
|
|
||||||
|
|
||||||
double Angular = listLine.at(propCurve.Angular).toDouble();
|
|
||||||
double Radial = listLine.at(propCurve.Radial).toDouble();
|
|
||||||
|
|
||||||
QPointF ptData = QPointF(Angular, Radial);
|
|
||||||
mapData.insert(nI, ptData);
|
|
||||||
|
|
||||||
if (bResetAxisTheta)
|
|
||||||
{
|
|
||||||
if (Angular < minTheta)
|
|
||||||
{
|
|
||||||
minTheta = Angular;
|
|
||||||
}
|
|
||||||
if (Angular > maxTheta)
|
|
||||||
{
|
|
||||||
maxTheta = Angular;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (bResetAxisRadius)
|
|
||||||
{
|
|
||||||
if (Radial < minRadius)
|
|
||||||
{
|
|
||||||
minRadius = Radial;
|
|
||||||
}
|
|
||||||
if (Radial > maxRadius)
|
|
||||||
{
|
|
||||||
maxRadius = Radial;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_data.insert(t, mapData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bResetAxisTheta)
|
|
||||||
{
|
|
||||||
updateMinMaxTheta(minTheta * 0.9, maxTheta * 1.1, 0, m_unitTheta);
|
|
||||||
}
|
|
||||||
if (bResetAxisRadius)
|
|
||||||
{
|
|
||||||
updateMinMaxRadius(minRadius * 0.9, maxRadius * 1.1, 0, m_unitRadius);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int nI = 0; nI < listCurve.size(); nI++)
|
|
||||||
{
|
|
||||||
FileEntryPolar::LineProperty propCurve = listCurve.at(nI);
|
|
||||||
|
|
||||||
QLineSeries *pSeries = new QLineSeries(this);
|
|
||||||
pSeries->setName(propCurve.name);
|
|
||||||
pSeries->setColor(propCurve.color);
|
|
||||||
pSeries->setUseOpenGL(true);
|
|
||||||
m_pChart->addSeries(pSeries);
|
|
||||||
m_seriesIDMap.insert(nI, pSeries);
|
|
||||||
|
|
||||||
QPen pen(propCurve.color);
|
|
||||||
pen.setWidth(2);
|
|
||||||
pSeries->setPen(pen);
|
|
||||||
|
|
||||||
pSeries->attachAxis(m_pThetaAxis);
|
|
||||||
pSeries->attachAxis(m_pRadiusAxis);
|
|
||||||
}
|
|
||||||
|
|
||||||
file.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "DataPanel.h"
|
|
||||||
#include "workspace/FileEntry.h"
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include <QtCharts>
|
|
||||||
|
|
||||||
class PolarPanel : public DataPanel
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief Constructor
|
|
||||||
* @param index Panel index
|
|
||||||
* @param filePath Associated file path
|
|
||||||
* @param parent Parent widget
|
|
||||||
*/
|
|
||||||
explicit PolarPanel(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 PolarPanel(int index, std::shared_ptr<FileEntryPolar> fileEntry, QWidget* parent = nullptr);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Destructor
|
|
||||||
*/
|
|
||||||
virtual ~PolarPanel();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get file type
|
|
||||||
* @return File type (always Curve for this class)
|
|
||||||
*/
|
|
||||||
FileEntryType GetFileType() const override { return FileEntryType::Table; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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(FileEntryPolar* fileEntry);
|
|
||||||
|
|
||||||
virtual void OnTimeChanged(double time);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateTitle(const QString& title);
|
|
||||||
void updateTitleAxis(const QString& thetaTitle, const QString& radiusTitle);
|
|
||||||
void updateMinMaxTheta(float min, float max, int count, const QString& unit);
|
|
||||||
void updateMinMaxRadius(float min, float max, int count, const QString& unit);
|
|
||||||
|
|
||||||
void updateParseFile(const QString& strFile, int nT, FileEntryPolar::LineProperties listCurve);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QPolarChart *m_pChart;
|
|
||||||
QValueAxis *m_pThetaAxis;
|
|
||||||
QValueAxis *m_pRadiusAxis;
|
|
||||||
|
|
||||||
float m_iThetaMax;
|
|
||||||
float m_iThetaMin;
|
|
||||||
float m_iRadiusMax;
|
|
||||||
float m_iRadiusMin;
|
|
||||||
|
|
||||||
QString m_unitTheta;
|
|
||||||
QString m_unitRadius;
|
|
||||||
|
|
||||||
QMap<int, QLineSeries *> m_seriesIDMap;
|
|
||||||
|
|
||||||
QMap< double, QMap<int, QPointF> > m_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
@ -7967,15 +7967,6 @@ public:
|
|||||||
QMap<const QtProperty*, QVector<QtProperty*>> m_properyToLightPaths;
|
QMap<const QtProperty*, QVector<QtProperty*>> m_properyToLightPaths;
|
||||||
QMap<const QtProperty*, QtProperty*> m_lightPathToPropery;
|
QMap<const QtProperty*, QtProperty*> m_lightPathToPropery;
|
||||||
QMap<const QtProperty*, int> m_lightPathIndex;
|
QMap<const QtProperty*, int> m_lightPathIndex;
|
||||||
|
|
||||||
// Polar
|
|
||||||
QMap<const QtProperty*, QtProperty*> m_properyToPolarGroup;
|
|
||||||
QMap<const QtProperty*, QtProperty*> m_polarGroupToPropery;
|
|
||||||
QMap<const QtProperty*, QtProperty*> m_properyToPolarCount;
|
|
||||||
QMap<const QtProperty*, QtProperty*> m_polarCountToPropery;
|
|
||||||
QMap<const QtProperty*, QVector<QtProperty*>> m_properyToPolarPaths;
|
|
||||||
QMap<const QtProperty*, QtProperty*> m_polarPathToPropery;
|
|
||||||
QMap<const QtProperty*, int> m_polarPathIndex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void QtWorkspacePropertyManagerPrivate::slotStringChanged(QtProperty* property, QString value) {
|
void QtWorkspacePropertyManagerPrivate::slotStringChanged(QtProperty* property, QString value) {
|
||||||
@ -8035,12 +8026,7 @@ void QtWorkspacePropertyManagerPrivate::slotStringChanged(QtProperty* property,
|
|||||||
int idx = m_lightPathIndex.value(property, 0);
|
int idx = m_lightPathIndex.value(property, 0);
|
||||||
c.SetFileEntryPath(FileEntryType::Light, idx, value);
|
c.SetFileEntryPath(FileEntryType::Light, idx, value);
|
||||||
q_ptr->setValue(prop, c);
|
q_ptr->setValue(prop, c);
|
||||||
} else if (QtProperty* prop = m_polarPathToPropery.value(property, 0)) {
|
}
|
||||||
QWorkspaceAttribute c = m_values[prop];
|
|
||||||
int idx = m_polarPathIndex.value(property, 0);
|
|
||||||
c.SetFileEntryPath(FileEntryType::Polar, idx, value);
|
|
||||||
q_ptr->setValue(prop, c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtWorkspacePropertyManagerPrivate::slotIntChanged(QtProperty* property, int value) {
|
void QtWorkspacePropertyManagerPrivate::slotIntChanged(QtProperty* property, int value) {
|
||||||
@ -8066,7 +8052,6 @@ void QtWorkspacePropertyManagerPrivate::slotIntChanged(QtProperty* property, int
|
|||||||
case FileEntryType::Surface: title = QObject::tr("Surface[%1]").arg(i + 1); break;
|
case FileEntryType::Surface: title = QObject::tr("Surface[%1]").arg(i + 1); break;
|
||||||
case FileEntryType::Table: title = QObject::tr("Table[%1]").arg(i + 1); break;
|
case FileEntryType::Table: title = QObject::tr("Table[%1]").arg(i + 1); break;
|
||||||
case FileEntryType::Light: title = QObject::tr("Light[%1]").arg(i + 1); break;
|
case FileEntryType::Light: title = QObject::tr("Light[%1]").arg(i + 1); break;
|
||||||
case FileEntryType::Polar: title = QObject::tr("Polar[%1]").arg(i + 1); break;
|
|
||||||
}
|
}
|
||||||
p->setPropertyName(title);
|
p->setPropertyName(title);
|
||||||
group->addSubProperty(p);
|
group->addSubProperty(p);
|
||||||
@ -8095,7 +8080,6 @@ void QtWorkspacePropertyManagerPrivate::slotIntChanged(QtProperty* property, int
|
|||||||
handleType(FileEntryType::Surface, m_surfaceCountToPropery, m_properyToSurfacePaths, m_surfacePathToPropery, m_surfacePathIndex, m_properyToSurfaceGroup);
|
handleType(FileEntryType::Surface, m_surfaceCountToPropery, m_properyToSurfacePaths, m_surfacePathToPropery, m_surfacePathIndex, m_properyToSurfaceGroup);
|
||||||
handleType(FileEntryType::Table, m_tableCountToPropery, m_properyToTablePaths, m_tablePathToPropery, m_tablePathIndex, m_properyToTableGroup);
|
handleType(FileEntryType::Table, m_tableCountToPropery, m_properyToTablePaths, m_tablePathToPropery, m_tablePathIndex, m_properyToTableGroup);
|
||||||
handleType(FileEntryType::Light, m_lightCountToPropery, m_properyToLightPaths, m_lightPathToPropery, m_lightPathIndex, m_properyToLightGroup);
|
handleType(FileEntryType::Light, m_lightCountToPropery, m_properyToLightPaths, m_lightPathToPropery, m_lightPathIndex, m_properyToLightGroup);
|
||||||
handleType(FileEntryType::Polar, m_polarCountToPropery, m_properyToPolarPaths, m_polarPathToPropery, m_polarPathIndex, m_properyToPolarGroup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtWorkspacePropertyManagerPrivate::slotPropertyDestroyed(QtProperty* property) {
|
void QtWorkspacePropertyManagerPrivate::slotPropertyDestroyed(QtProperty* property) {
|
||||||
@ -8289,7 +8273,6 @@ void QtWorkspacePropertyManager::setValue(QtProperty* property, const QWorkspace
|
|||||||
syncGroup(FileEntryType::Surface, d_ptr->m_properyToSurfaceGroup, d_ptr->m_properyToSurfaceCount, d_ptr->m_properyToSurfacePaths, d_ptr->m_surfacePathToPropery, d_ptr->m_surfacePathIndex);
|
syncGroup(FileEntryType::Surface, d_ptr->m_properyToSurfaceGroup, d_ptr->m_properyToSurfaceCount, d_ptr->m_properyToSurfacePaths, d_ptr->m_surfacePathToPropery, d_ptr->m_surfacePathIndex);
|
||||||
syncGroup(FileEntryType::Table, d_ptr->m_properyToTableGroup, d_ptr->m_properyToTableCount, d_ptr->m_properyToTablePaths, d_ptr->m_tablePathToPropery, d_ptr->m_tablePathIndex);
|
syncGroup(FileEntryType::Table, d_ptr->m_properyToTableGroup, d_ptr->m_properyToTableCount, d_ptr->m_properyToTablePaths, d_ptr->m_tablePathToPropery, d_ptr->m_tablePathIndex);
|
||||||
syncGroup(FileEntryType::Light, d_ptr->m_properyToLightGroup, d_ptr->m_properyToLightCount, d_ptr->m_properyToLightPaths, d_ptr->m_lightPathToPropery, d_ptr->m_lightPathIndex);
|
syncGroup(FileEntryType::Light, d_ptr->m_properyToLightGroup, d_ptr->m_properyToLightCount, d_ptr->m_properyToLightPaths, d_ptr->m_lightPathToPropery, d_ptr->m_lightPathIndex);
|
||||||
syncGroup(FileEntryType::Polar, d_ptr->m_properyToPolarGroup, d_ptr->m_properyToPolarCount, d_ptr->m_properyToPolarPaths, d_ptr->m_polarPathToPropery, d_ptr->m_polarPathIndex);
|
|
||||||
|
|
||||||
emit propertyChanged(property);
|
emit propertyChanged(property);
|
||||||
emit valueChanged(property, value);
|
emit valueChanged(property, value);
|
||||||
@ -8425,9 +8408,6 @@ void QtWorkspacePropertyManager::initializeProperty(QtProperty* property) {
|
|||||||
addGroup(FileEntryType::Light, tr("Lights"), d_ptr->m_properyToLightGroup, d_ptr->m_lightGroupToPropery,
|
addGroup(FileEntryType::Light, tr("Lights"), d_ptr->m_properyToLightGroup, d_ptr->m_lightGroupToPropery,
|
||||||
d_ptr->m_properyToLightCount, d_ptr->m_lightCountToPropery,
|
d_ptr->m_properyToLightCount, d_ptr->m_lightCountToPropery,
|
||||||
d_ptr->m_properyToLightPaths, d_ptr->m_lightPathToPropery, d_ptr->m_lightPathIndex);
|
d_ptr->m_properyToLightPaths, d_ptr->m_lightPathToPropery, d_ptr->m_lightPathIndex);
|
||||||
addGroup(FileEntryType::Polar, tr("Polars"), d_ptr->m_properyToPolarGroup, d_ptr->m_polarGroupToPropery,
|
|
||||||
d_ptr->m_properyToPolarCount, d_ptr->m_polarCountToPropery,
|
|
||||||
d_ptr->m_properyToPolarPaths, d_ptr->m_polarPathToPropery, d_ptr->m_polarPathIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -8539,9 +8519,6 @@ void QtWorkspacePropertyManager::uninitializeProperty(QtProperty* property) {
|
|||||||
cleanupGroup(d_ptr->m_properyToLightGroup, d_ptr->m_lightGroupToPropery,
|
cleanupGroup(d_ptr->m_properyToLightGroup, d_ptr->m_lightGroupToPropery,
|
||||||
d_ptr->m_properyToLightCount, d_ptr->m_lightCountToPropery,
|
d_ptr->m_properyToLightCount, d_ptr->m_lightCountToPropery,
|
||||||
d_ptr->m_properyToLightPaths, d_ptr->m_lightPathToPropery, d_ptr->m_lightPathIndex);
|
d_ptr->m_properyToLightPaths, d_ptr->m_lightPathToPropery, d_ptr->m_lightPathIndex);
|
||||||
cleanupGroup(d_ptr->m_properyToPolarGroup, d_ptr->m_polarGroupToPropery,
|
|
||||||
d_ptr->m_properyToPolarCount, d_ptr->m_polarCountToPropery,
|
|
||||||
d_ptr->m_properyToPolarPaths, d_ptr->m_polarPathToPropery, d_ptr->m_polarPathIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>789</height>
|
<height>705</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -22,12 +22,6 @@
|
|||||||
<layout class="QGridLayout" name="fileGridLayout">
|
<layout class="QGridLayout" name="fileGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="filePathLabel">
|
<widget class="QLabel" name="filePathLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Path:</string>
|
<string>File Path:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -35,12 +29,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="filePathEdit">
|
<widget class="QLineEdit" name="filePathEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -51,12 +39,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QToolButton" name="selectFileBtn">
|
<widget class="QToolButton" name="selectFileBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -64,12 +46,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="fileNameLabel">
|
<widget class="QLabel" name="fileNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Name:</string>
|
<string>File Name:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -77,12 +53,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="fileNameValue">
|
<widget class="QLabel" name="fileNameValue">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -90,12 +60,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="fileSizeLabel">
|
<widget class="QLabel" name="fileSizeLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Size:</string>
|
<string>File Size:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -103,12 +67,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="2">
|
<item row="2" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="fileSizeValue">
|
<widget class="QLabel" name="fileSizeValue">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -125,12 +83,6 @@
|
|||||||
<layout class="QGridLayout" name="chartGridLayout">
|
<layout class="QGridLayout" name="chartGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="chartNameLabel">
|
<widget class="QLabel" name="chartNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Chart Name:</string>
|
<string>Chart Name:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -138,12 +90,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="chartNameEdit">
|
<widget class="QLineEdit" name="chartNameEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Chart 1</string>
|
<string>Chart 1</string>
|
||||||
</property>
|
</property>
|
||||||
@ -154,35 +100,16 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="chartTypeLabel">
|
<widget class="QLabel" name="chartTypeLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Chart Type:</string>
|
<string>Chart Type:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="chartTypeComboBox">
|
<widget class="QComboBox" name="chartTypeComboBox"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="xTitleLabel">
|
<widget class="QLabel" name="xTitleLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Axis Title:</string>
|
<string>X Axis Title:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -190,12 +117,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="xTitleEdit">
|
<widget class="QLineEdit" name="xTitleEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Enter X axis title...</string>
|
<string>Enter X axis title...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -203,12 +124,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="yTitleLabel">
|
<widget class="QLabel" name="yTitleLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y Axis Title:</string>
|
<string>Y Axis Title:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -216,12 +131,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="yTitleEdit">
|
<widget class="QLineEdit" name="yTitleEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Enter Y axis title...</string>
|
<string>Enter Y axis title...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -229,26 +138,13 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="timeParamLabel">
|
<widget class="QLabel" name="timeParamLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Time:</string>
|
<string>Time:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QSpinBox" name="timeParamSpinBox">
|
<widget class="QSpinBox" name="timeParamSpinBox"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -261,12 +157,6 @@
|
|||||||
<layout class="QGridLayout" name="axisRangeGridLayout">
|
<layout class="QGridLayout" name="axisRangeGridLayout">
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QDoubleSpinBox" name="yMaxSpinBox">
|
<widget class="QDoubleSpinBox" name="yMaxSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-999999.000000000000000</double>
|
<double>-999999.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
@ -280,12 +170,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QSpinBox" name="xCountSpinBox">
|
<widget class="QSpinBox" name="xCountSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
@ -299,12 +183,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="xCountLabel">
|
<widget class="QLabel" name="xCountLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Tick Count:</string>
|
<string>X Tick Count:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -312,12 +190,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="xMinSpinBox">
|
<widget class="QDoubleSpinBox" name="xMinSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-999999.000000000000000</double>
|
<double>-999999.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
@ -331,12 +203,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="xMinLabel">
|
<widget class="QLabel" name="xMinLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Min:</string>
|
<string>X Min:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -344,12 +210,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="yMaxLabel">
|
<widget class="QLabel" name="yMaxLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y Max:</string>
|
<string>Y Max:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -357,12 +217,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="yMinLabel">
|
<widget class="QLabel" name="yMinLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y Min:</string>
|
<string>Y Min:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -370,12 +224,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="3">
|
<item row="3" column="3">
|
||||||
<widget class="QSpinBox" name="yCountSpinBox">
|
<widget class="QSpinBox" name="yCountSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
@ -383,18 +231,12 @@
|
|||||||
<number>50</number>
|
<number>50</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>9</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="yMinSpinBox">
|
<widget class="QDoubleSpinBox" name="yMinSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-999999.000000000000000</double>
|
<double>-999999.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
@ -408,12 +250,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QDoubleSpinBox" name="xMaxSpinBox">
|
<widget class="QDoubleSpinBox" name="xMaxSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-999999.000000000000000</double>
|
<double>-999999.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
@ -427,12 +263,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="xMaxLabel">
|
<widget class="QLabel" name="xMaxLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Max:</string>
|
<string>X Max:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -440,12 +270,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QLabel" name="xCountLabel_2">
|
<widget class="QLabel" name="xCountLabel_2">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y Tick Count:</string>
|
<string>Y Tick Count:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -484,12 +308,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addCurveBtn">
|
<widget class="QPushButton" name="addCurveBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>80</width>
|
<width>80</width>
|
||||||
@ -503,12 +321,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="removeCurveBtn">
|
<widget class="QPushButton" name="removeCurveBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>60</width>
|
<width>60</width>
|
||||||
@ -546,12 +358,6 @@
|
|||||||
<layout class="QGridLayout" name="curvePropertiesGridLayout">
|
<layout class="QGridLayout" name="curvePropertiesGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="curveNameLabel">
|
<widget class="QLabel" name="curveNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Curve Name:</string>
|
<string>Curve Name:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -559,12 +365,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="curveNameEdit">
|
<widget class="QLineEdit" name="curveNameEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Enter curve name...</string>
|
<string>Enter curve name...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -572,12 +372,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="curveColorLabel">
|
<widget class="QLabel" name="curveColorLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Curve Color:</string>
|
<string>Curve Color:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -587,12 +381,6 @@
|
|||||||
<layout class="QHBoxLayout" name="colorLayout">
|
<layout class="QHBoxLayout" name="colorLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="colorButton">
|
<widget class="QPushButton" name="colorButton">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -637,12 +425,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="dataStartLabel">
|
<widget class="QLabel" name="dataStartLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Data Start:</string>
|
<string>Data Start:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -650,12 +432,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QSpinBox" name="dataStartSpinBox">
|
<widget class="QSpinBox" name="dataStartSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -669,12 +445,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="dataStopLabel">
|
<widget class="QLabel" name="dataStopLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Data Stop:</string>
|
<string>Data Stop:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -682,12 +452,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QSpinBox" name="dataStopSpinBox">
|
<widget class="QSpinBox" name="dataStopSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -774,12 +538,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addBtn">
|
<widget class="QPushButton" name="addBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add File</string>
|
<string>Add File</string>
|
||||||
</property>
|
</property>
|
||||||
@ -790,12 +548,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cancelBtn">
|
<widget class="QPushButton" name="cancelBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cancel</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
#include "AddSurfaceFileDlg.h"
|
#include "AddSurfaceFileDlg.h"
|
||||||
#include "AddTableFileDlg.h"
|
#include "AddTableFileDlg.h"
|
||||||
#include "AddLightFileDlg.h"
|
#include "AddLightFileDlg.h"
|
||||||
#include "AddPolarFileDlg.h"
|
|
||||||
|
|
||||||
BaseAddFileDlg* AddFileDialogFactory::createDialog(FileEntryType type, QWidget* parent) {
|
BaseAddFileDlg* AddFileDialogFactory::createDialog(FileEntryType type, QWidget* parent) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -17,8 +16,6 @@ BaseAddFileDlg* AddFileDialogFactory::createDialog(FileEntryType type, QWidget*
|
|||||||
return new AddTableFileDlg(parent);
|
return new AddTableFileDlg(parent);
|
||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
return new AddLightFileDlg(parent);
|
return new AddLightFileDlg(parent);
|
||||||
case FileEntryType::Polar:
|
|
||||||
return new AddPolarFileDlg(parent);
|
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,8 +29,6 @@ AddLightFileDlg::AddLightFileDlg(QWidget* parent)
|
|||||||
// Update color previews
|
// Update color previews
|
||||||
updateOpenColorPreview(openColor_);
|
updateOpenColorPreview(openColor_);
|
||||||
updateCloseColorPreview(closeColor_);
|
updateCloseColorPreview(closeColor_);
|
||||||
|
|
||||||
ui->editDataBtn->setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddLightFileDlg::~AddLightFileDlg() {
|
AddLightFileDlg::~AddLightFileDlg() {
|
||||||
@ -346,14 +344,6 @@ QString AddLightFileDlg::getDialogTitle() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AddLightFileDlg::onSure() {
|
void AddLightFileDlg::onSure() {
|
||||||
|
|
||||||
QString sName = ui->ChartNameEdit->text();
|
|
||||||
// Validate table-specific parameters
|
|
||||||
if (sName.isEmpty()) {
|
|
||||||
QMessageBox::warning(this, tr("Warning"), tr("Please enter a Chart name."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save current light properties if any light is selected
|
// Save current light properties if any light is selected
|
||||||
if (currentLightIndex_ >= 0) {
|
if (currentLightIndex_ >= 0) {
|
||||||
saveLightProperties();
|
saveLightProperties();
|
||||||
@ -374,8 +364,6 @@ void AddLightFileDlg::onSure() {
|
|||||||
// Create FileEntryLight and set properties
|
// Create FileEntryLight and set properties
|
||||||
auto lightEntry = CreateFileEntryLight(getSelectedFilePath());
|
auto lightEntry = CreateFileEntryLight(getSelectedFilePath());
|
||||||
if (lightEntry) {
|
if (lightEntry) {
|
||||||
lightEntry->SetName(sName);
|
|
||||||
|
|
||||||
// Set color properties
|
// Set color properties
|
||||||
lightEntry->SetColorProperties(colorProperties_);
|
lightEntry->SetColorProperties(colorProperties_);
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>607</height>
|
<height>516</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -22,12 +22,6 @@
|
|||||||
<layout class="QGridLayout" name="fileGridLayout">
|
<layout class="QGridLayout" name="fileGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="filePathLabel">
|
<widget class="QLabel" name="filePathLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Path:</string>
|
<string>File Path:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -35,12 +29,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="filePathEdit">
|
<widget class="QLineEdit" name="filePathEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -58,12 +46,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="fileNameLabel">
|
<widget class="QLabel" name="fileNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Name:</string>
|
<string>File Name:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -71,12 +53,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="fileNameValue">
|
<widget class="QLabel" name="fileNameValue">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -84,12 +60,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="fileSizeLabel">
|
<widget class="QLabel" name="fileSizeLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Size:</string>
|
<string>File Size:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -105,44 +75,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="lightPropertiesGroupBox_2">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Chart Properties</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lightNameLabel_2">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Chart Names:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="ChartNameEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="colorPropertiesGroupBox">
|
<widget class="QGroupBox" name="colorPropertiesGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -340,12 +272,6 @@
|
|||||||
<layout class="QGridLayout" name="lightPropertiesGridLayout">
|
<layout class="QGridLayout" name="lightPropertiesGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="lightNameLabel">
|
<widget class="QLabel" name="lightNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Light Names:</string>
|
<string>Light Names:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -353,12 +279,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="lightNameEdit">
|
<widget class="QLineEdit" name="lightNameEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Enter light names (comma separated)...</string>
|
<string>Enter light names (comma separated)...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -366,14 +286,8 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lightDataLabel">
|
<widget class="QLabel" name="lightDataLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Light Datas:</string>
|
<string>Light Data:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -381,12 +295,6 @@
|
|||||||
<layout class="QHBoxLayout" name="lightDataLayout">
|
<layout class="QHBoxLayout" name="lightDataLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lightDataEdit">
|
<widget class="QLineEdit" name="lightDataEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Enter data values (comma separated integers)...</string>
|
<string>Enter data values (comma separated integers)...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -409,12 +317,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="rowIndexLabel">
|
<widget class="QLabel" name="rowIndexLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Row Index:</string>
|
<string>Row Index:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -452,12 +354,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addFileBtn">
|
<widget class="QPushButton" name="addFileBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add File</string>
|
<string>Add File</string>
|
||||||
</property>
|
</property>
|
||||||
@ -465,12 +361,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cancelBtn">
|
<widget class="QPushButton" name="cancelBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cancel</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -1,810 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>AddPolarDlg</class>
|
|
||||||
<widget class="QWidget" name="AddPolarDlg">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>600</width>
|
|
||||||
<height>789</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Add Polar</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="fileGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>File Selection</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="fileGridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="filePathLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>File Path:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="filePathEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Select curve data file...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QToolButton" name="selectFileBtn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="fileNameLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>File Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" colspan="2">
|
|
||||||
<widget class="QLabel" name="fileNameValue">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>-</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="fileSizeLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>File Size:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="2">
|
|
||||||
<widget class="QLabel" name="fileSizeValue">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>-</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="chartGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Chart Properties</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="chartGridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="chartNameLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Chart Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="chartNameEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Chart 1</string>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Enter chart name...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="chartTypeLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Chart Type:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="chartTypeComboBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="xTitleLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X Axis Title:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="xTitleEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Enter X axis title...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="yTitleLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y Axis Title:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="yTitleEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Enter Y axis title...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="timeParamLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Time:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QSpinBox" name="timeParamSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="axisRangeGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Axis Range Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="axisRangeGridLayout">
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QDoubleSpinBox" name="yMaxSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>800.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSpinBox" name="xCountSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>50</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="xCountLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X Tick Count:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="xMinSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>0.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="xMinLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X Min:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLabel" name="yMaxLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y Max:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="yMinLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y Min:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="3">
|
|
||||||
<widget class="QSpinBox" name="yCountSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>50</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="yMinSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>-800.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QDoubleSpinBox" name="xMaxSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>250.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="xMaxLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X Max:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2">
|
|
||||||
<widget class="QLabel" name="xCountLabel_2">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y Tick Count:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="curveGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Curve Management</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="curveVerticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="curveButtonLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="curveListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Curves:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="curveButtonSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="addCurveBtn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Add Curve</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="removeCurveBtn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>60</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="curveListWidget">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>120</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="curvePropertiesGroupBox">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Selected Curve Properties</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="curvePropertiesGridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="curveNameLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Curve Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="curveNameEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Enter curve name...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="curveColorLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Curve Color:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="colorLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="colorButton">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select Color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="colorPreview">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string>background-color: rgb(255, 0, 0); border: 1px solid black;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="colorSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="dataStartLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Data Start:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QSpinBox" name="dataStartSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>999999</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="dataStopLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Data Stop:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSpinBox" name="dataStopSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>999999</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>241</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="xValueLabel">
|
|
||||||
<property name="visible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X Value:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="xValueSpinBox">
|
|
||||||
<property name="visible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>0.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="yValueLabel">
|
|
||||||
<property name="visible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y Value:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="yValueSpinBox">
|
|
||||||
<property name="visible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>0.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="buttonLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="addBtn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Add File</string>
|
|
||||||
</property>
|
|
||||||
<property name="default">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="cancelBtn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Cancel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@ -1,225 +0,0 @@
|
|||||||
#include "AddPolarFileDlg.h"
|
|
||||||
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QColorDialog>
|
|
||||||
#include <QListWidget>
|
|
||||||
|
|
||||||
#include "workspace/WorkSpace.h"
|
|
||||||
#include "workspace/WorkSpaceManager.h"
|
|
||||||
|
|
||||||
#include "ui_AddPolarDlg.h"
|
|
||||||
|
|
||||||
AddPolarFileDlg::AddPolarFileDlg(QWidget* parent)
|
|
||||||
: BaseAddFileDlg(FileEntryType::Polar, parent)
|
|
||||||
, ui(new Ui::AddPolarDlg)
|
|
||||||
, currentCurveIndex_(-1)
|
|
||||||
, selectedColor_(255, 0, 0) { // Default to red color
|
|
||||||
|
|
||||||
SetupUI(ui);
|
|
||||||
SetTitle(getDialogTitle());
|
|
||||||
|
|
||||||
//setupConnections();
|
|
||||||
//updateCurvePropertiesUI(); // Initialize UI based on default chart type
|
|
||||||
}
|
|
||||||
|
|
||||||
AddPolarFileDlg::~AddPolarFileDlg() {
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString AddPolarFileDlg::getFileFilter() const {
|
|
||||||
return "Data Files (*.txt *.csv *.dat);;All Files (*.*)";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString AddPolarFileDlg::getDialogTitle() const {
|
|
||||||
return "Add Polar Data File";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AddPolarFileDlg::validateSpecificParams() {
|
|
||||||
// File path validation
|
|
||||||
const QString& selectFilePath = getSelectedFilePath();
|
|
||||||
if (selectFilePath.isEmpty()) {
|
|
||||||
QMessageBox::warning(this, tr("Validation Error"), tr("Please select a data file."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// File existence validation
|
|
||||||
QFileInfo fileInfo(selectFilePath);
|
|
||||||
if (!fileInfo.exists()) {
|
|
||||||
QMessageBox::warning(this, tr("Validation Error"), tr("Selected file does not exist."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// File readability validation
|
|
||||||
if (!fileInfo.isReadable()) {
|
|
||||||
QMessageBox::warning(this, tr("Validation Error"), tr("Selected file is not readable. Please check file permissions."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// File size validation (avoid memory issues with large files)
|
|
||||||
if (fileInfo.size() > 100 * 1024 * 1024) { // 100MB limit
|
|
||||||
QMessageBox::warning(this, tr("Validation Error"), tr("File is too large (over 100MB). Please select a smaller file."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Curve count validation
|
|
||||||
if (curves_.isEmpty()) {
|
|
||||||
QMessageBox::warning(this, tr("Validation Error"), tr("At least one curve must be defined."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//// Save current curve properties
|
|
||||||
//if (currentCurveIndex_ >= 0) {
|
|
||||||
// saveCurveProperties();
|
|
||||||
//}
|
|
||||||
|
|
||||||
//// Curve name uniqueness validation
|
|
||||||
//QStringList curveNames;
|
|
||||||
//for (int i = 0; i < curves_.size(); ++i) {
|
|
||||||
// const FileEntryCurve::CurveProperty& curve = curves_[i];
|
|
||||||
|
|
||||||
// if (curve.name.isEmpty()) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve %1 name cannot be empty.").arg(i + 1));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (curveNames.contains(curve.name)) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve name '%1' is duplicated. Please use different names.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// curveNames.append(curve.name);
|
|
||||||
|
|
||||||
// // Curve name length validation
|
|
||||||
// if (curve.name.length() > 50) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve name '%1' is too long. Please limit to 50 characters.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Data range validation based on chart type
|
|
||||||
// if (chartProperties_.chartType == ChartType::Wave) {
|
|
||||||
// if (curve.data.wave.start < 1 || curve.data.wave.stop < 1) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve '%1' start and stop values must be greater than 0.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (curve.data.wave.start > curve.data.wave.stop) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve '%1' start value cannot be greater than stop value.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Data range reasonableness validation
|
|
||||||
// if (curve.data.wave.stop - curve.data.wave.start < 1) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve '%1' data range is too small. At least 2 data points are required.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (curve.data.wave.stop > 1000000) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve '%1' stop value is too large. Please ensure it does not exceed 1000000.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// // Report type validation - ensure x and y values are reasonable
|
|
||||||
// if (curve.data.report.x < -1000000 || curve.data.report.x > 1000000) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (curve.data.report.y < -1000000 || curve.data.report.y > 1000000) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"),
|
|
||||||
// tr("Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000.").arg(curve.name));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//// Chart properties validation
|
|
||||||
//if (ui->chartNameEdit->text().isEmpty()) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("Chart name cannot be empty."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (ui->chartNameEdit->text().length() > 100) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("Chart name is too long. Please limit to 100 characters."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//// Axis title validation
|
|
||||||
//if (ui->xTitleEdit->text().length() > 50) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("X axis title is too long. Please limit to 50 characters."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (ui->yTitleEdit->text().length() > 50) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("Y axis title is too long. Please limit to 50 characters."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//// Axis range validation
|
|
||||||
//double xMin = ui->xMinSpinBox->value();
|
|
||||||
//double xMax = ui->xMaxSpinBox->value();
|
|
||||||
//double yMin = ui->yMinSpinBox->value();
|
|
||||||
//double yMax = ui->yMaxSpinBox->value();
|
|
||||||
|
|
||||||
//if (xMin >= xMax) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("X axis minimum value must be less than maximum value."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (yMin >= yMax) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("Y axis minimum value must be less than maximum value."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
//// Time parameter validation
|
|
||||||
//double timeParam = ui->timeParamSpinBox->value();
|
|
||||||
//if (timeParam < 0) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("Time parameter cannot be negative."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//// X axis tick count validation
|
|
||||||
//int xTickCount = ui->xCountSpinBox->value();
|
|
||||||
//if (xTickCount < 2) {
|
|
||||||
// QMessageBox::warning(this, tr("Validation Error"), tr("X axis tick count must be at least 2."));
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddPolarFileDlg::updateFileInfo(const QString& filePath) {
|
|
||||||
QFileInfo fileInfo(filePath);
|
|
||||||
if (fileInfo.exists()) {
|
|
||||||
ui->fileNameValue->setText(fileInfo.fileName());
|
|
||||||
qint64 size = fileInfo.size();
|
|
||||||
QString sizeText;
|
|
||||||
if (size < 1024) {
|
|
||||||
sizeText = QString("%1 B").arg(size);
|
|
||||||
}
|
|
||||||
else if (size < 1024 * 1024) {
|
|
||||||
sizeText = QString("%1 KB").arg(size / 1024.0, 0, 'f', 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
sizeText = QString("%1 MB").arg(size / (1024.0 * 1024.0), 0, 'f', 1);
|
|
||||||
}
|
|
||||||
ui->fileSizeValue->setText(sizeText);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ui->fileNameValue->setText("-");
|
|
||||||
ui->fileSizeValue->setText("-");
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->filePathEdit->setText(filePath);
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "BaseAddFileDlg.h"
|
|
||||||
#include "workspace/FileEntry.h"
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QComboBox;
|
|
||||||
class QLineEdit;
|
|
||||||
class QSpinBox;
|
|
||||||
class QDoubleSpinBox;
|
|
||||||
class QListWidget;
|
|
||||||
class QPushButton;
|
|
||||||
class QLabel;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class AddPolarDlg;
|
|
||||||
}
|
|
||||||
|
|
||||||
class AddPolarFileDlg : public BaseAddFileDlg
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit AddPolarFileDlg(QWidget* parent = nullptr);
|
|
||||||
~AddPolarFileDlg() override;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QString getFileFilter() const override;
|
|
||||||
QString getDialogTitle() const override;
|
|
||||||
bool validateSpecificParams() override;
|
|
||||||
void updateFileInfo(const QString& filePath) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::AddPolarDlg* ui;
|
|
||||||
int currentCurveIndex_;
|
|
||||||
QColor selectedColor_;
|
|
||||||
|
|
||||||
FileEntryPolar::ChartProperties chartProperties_;
|
|
||||||
FileEntryPolar::LineProperties curves_;
|
|
||||||
};
|
|
||||||
|
|
||||||
@ -23,19 +23,19 @@ AddSurfaceFileDlg::AddSurfaceFileDlg(QWidget *parent)
|
|||||||
setupConnections();
|
setupConnections();
|
||||||
|
|
||||||
// Initialize chart properties with default values
|
// Initialize chart properties with default values
|
||||||
chartProperties_.xCount = 7;
|
chartProperties_.xCount = 100;
|
||||||
chartProperties_.yCount = 0;
|
chartProperties_.yCount = 100;
|
||||||
chartProperties_.zCount = 7;
|
chartProperties_.zCount = 100;
|
||||||
chartProperties_.xMin = 0.0;
|
chartProperties_.xMin = 0.0;
|
||||||
chartProperties_.xMax = 14000;
|
chartProperties_.xMax = 1.0;
|
||||||
chartProperties_.yMin = 0.0;
|
chartProperties_.yMin = 0.0;
|
||||||
chartProperties_.yMax = 0.0;
|
chartProperties_.yMax = 1.0;
|
||||||
chartProperties_.zMin = 0.0;
|
chartProperties_.zMin = 0.0;
|
||||||
chartProperties_.zMax = 70;
|
chartProperties_.zMax = 1.0;
|
||||||
chartProperties_.timeParam = 0.0;
|
chartProperties_.timeParam = 0.0;
|
||||||
chartProperties_.xTitle = "Y Axis";
|
chartProperties_.xTitle = "X Axis";
|
||||||
chartProperties_.yTitle = "Z Axis";
|
chartProperties_.yTitle = "Y Axis";
|
||||||
chartProperties_.zTitle = "X Axis";
|
chartProperties_.zTitle = "Z Axis";
|
||||||
|
|
||||||
// Set default UI values
|
// Set default UI values
|
||||||
ui->xCountSpinBox->setValue(chartProperties_.xCount);
|
ui->xCountSpinBox->setValue(chartProperties_.xCount);
|
||||||
@ -57,12 +57,6 @@ AddSurfaceFileDlg::AddSurfaceFileDlg(QWidget *parent)
|
|||||||
|
|
||||||
// Clear surface properties initially
|
// Clear surface properties initially
|
||||||
clearSurfaceProperties();
|
clearSurfaceProperties();
|
||||||
|
|
||||||
ui->dataFormatGroupBox->setVisible(false);
|
|
||||||
|
|
||||||
ui->comboBox_x->setCurrentText("y");
|
|
||||||
ui->comboBox_y->setCurrentText("z");
|
|
||||||
ui->comboBox_z->setCurrentText("x");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddSurfaceFileDlg::~AddSurfaceFileDlg()
|
AddSurfaceFileDlg::~AddSurfaceFileDlg()
|
||||||
@ -87,10 +81,6 @@ void AddSurfaceFileDlg::setupConnections()
|
|||||||
connect(ui->surfaceNameLineEdit, &QLineEdit::textChanged, this, &AddSurfaceFileDlg::onSurfaceNameChanged);
|
connect(ui->surfaceNameLineEdit, &QLineEdit::textChanged, this, &AddSurfaceFileDlg::onSurfaceNameChanged);
|
||||||
connect(ui->surfaceStartSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
connect(ui->surfaceStartSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
||||||
connect(ui->surfaceStopSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
connect(ui->surfaceStopSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
||||||
|
|
||||||
connect(ui->comboBox_x, QOverload<const QString &>::of(&QComboBox::currentTextChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
|
||||||
connect(ui->comboBox_y, QOverload<const QString &>::of(&QComboBox::currentTextChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
|
||||||
connect(ui->comboBox_z, QOverload<const QString &>::of(&QComboBox::currentTextChanged), this, &AddSurfaceFileDlg::onSurfaceDataChanged);
|
|
||||||
|
|
||||||
// Chart properties connections (save to member variables when changed)
|
// Chart properties connections (save to member variables when changed)
|
||||||
connect(ui->xCountSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) { chartProperties_.xCount = value; });
|
connect(ui->xCountSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) { chartProperties_.xCount = value; });
|
||||||
@ -102,7 +92,7 @@ void AddSurfaceFileDlg::setupConnections()
|
|||||||
connect(ui->yMaxSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.yMax = value; });
|
connect(ui->yMaxSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.yMax = value; });
|
||||||
connect(ui->zMinSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.zMin = value; });
|
connect(ui->zMinSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.zMin = value; });
|
||||||
connect(ui->zMaxSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.zMax = value; });
|
connect(ui->zMaxSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.zMax = value; });
|
||||||
connect(ui->timeParamSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) { chartProperties_.timeParam = value; });
|
connect(ui->timeParamSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) { chartProperties_.timeParam = value; });
|
||||||
connect(ui->xTitleLineEdit, &QLineEdit::textChanged, [this](const QString& text) { chartProperties_.xTitle = text; });
|
connect(ui->xTitleLineEdit, &QLineEdit::textChanged, [this](const QString& text) { chartProperties_.xTitle = text; });
|
||||||
connect(ui->yTitleLineEdit, &QLineEdit::textChanged, [this](const QString& text) { chartProperties_.yTitle = text; });
|
connect(ui->yTitleLineEdit, &QLineEdit::textChanged, [this](const QString& text) { chartProperties_.yTitle = text; });
|
||||||
connect(ui->zTitleLineEdit, &QLineEdit::textChanged, [this](const QString& text) { chartProperties_.zTitle = text; });
|
connect(ui->zTitleLineEdit, &QLineEdit::textChanged, [this](const QString& text) { chartProperties_.zTitle = text; });
|
||||||
@ -119,7 +109,7 @@ QString AddSurfaceFileDlg::getFileFilter() const
|
|||||||
|
|
||||||
QString AddSurfaceFileDlg::getDialogTitle() const
|
QString AddSurfaceFileDlg::getDialogTitle() const
|
||||||
{
|
{
|
||||||
return tr("Add Surface Dialog");
|
return tr("Select Surface Data File");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddSurfaceFileDlg::validateSpecificParams()
|
bool AddSurfaceFileDlg::validateSpecificParams()
|
||||||
@ -186,10 +176,10 @@ void AddSurfaceFileDlg::onAddSurfaceClicked()
|
|||||||
surface.name = generateSurfaceName();
|
surface.name = generateSurfaceName();
|
||||||
surface.color = generateSurfaceColor();
|
surface.color = generateSurfaceColor();
|
||||||
surface.start = 0;
|
surface.start = 0;
|
||||||
surface.stop = 0;
|
surface.stop = 1000;
|
||||||
surface.x = ui->comboBox_x->currentText();
|
surface.x = QString::number(ui->xColumnSpinBox->value());
|
||||||
surface.y = ui->comboBox_y->currentText();
|
surface.y = QString::number(ui->yColumnSpinBox->value());
|
||||||
surface.z = ui->comboBox_z->currentText();
|
surface.z = QString::number(ui->zColumnSpinBox->value());
|
||||||
|
|
||||||
surfaces_.append(surface);
|
surfaces_.append(surface);
|
||||||
addSurfaceToList(surface);
|
addSurfaceToList(surface);
|
||||||
@ -259,10 +249,6 @@ void AddSurfaceFileDlg::onSurfaceDataChanged()
|
|||||||
if (currentSurfaceIndex_ >= 0 && currentSurfaceIndex_ < surfaces_.size()) {
|
if (currentSurfaceIndex_ >= 0 && currentSurfaceIndex_ < surfaces_.size()) {
|
||||||
surfaces_[currentSurfaceIndex_].start = ui->surfaceStartSpinBox->value();
|
surfaces_[currentSurfaceIndex_].start = ui->surfaceStartSpinBox->value();
|
||||||
surfaces_[currentSurfaceIndex_].stop = ui->surfaceStopSpinBox->value();
|
surfaces_[currentSurfaceIndex_].stop = ui->surfaceStopSpinBox->value();
|
||||||
|
|
||||||
surfaces_[currentSurfaceIndex_].x = ui->comboBox_x->currentText();
|
|
||||||
surfaces_[currentSurfaceIndex_].y = ui->comboBox_y->currentText();
|
|
||||||
surfaces_[currentSurfaceIndex_].z = ui->comboBox_z->currentText();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,10 +280,6 @@ void AddSurfaceFileDlg::updateSurfaceProperties()
|
|||||||
ui->surfaceNameLineEdit->setText(surface.name);
|
ui->surfaceNameLineEdit->setText(surface.name);
|
||||||
ui->surfaceStartSpinBox->setValue(surface.start);
|
ui->surfaceStartSpinBox->setValue(surface.start);
|
||||||
ui->surfaceStopSpinBox->setValue(surface.stop);
|
ui->surfaceStopSpinBox->setValue(surface.stop);
|
||||||
|
|
||||||
ui->comboBox_x->setCurrentText(surface.x);
|
|
||||||
ui->comboBox_y->setCurrentText(surface.y);
|
|
||||||
ui->comboBox_z->setCurrentText(surface.z);
|
|
||||||
|
|
||||||
selectedColor_ = surface.color;
|
selectedColor_ = surface.color;
|
||||||
updateColorPreview(ui->surfaceColorButton, selectedColor_);
|
updateColorPreview(ui->surfaceColorButton, selectedColor_);
|
||||||
@ -322,8 +304,8 @@ void AddSurfaceFileDlg::clearSurfaceProperties()
|
|||||||
{
|
{
|
||||||
ui->surfaceNameLineEdit->clear();
|
ui->surfaceNameLineEdit->clear();
|
||||||
ui->surfaceStartSpinBox->setValue(0);
|
ui->surfaceStartSpinBox->setValue(0);
|
||||||
ui->surfaceStopSpinBox->setValue(0);
|
ui->surfaceStopSpinBox->setValue(1000);
|
||||||
selectedColor_ = QColor(61, 38, 168);
|
selectedColor_ = Qt::blue;
|
||||||
updateColorPreview(ui->surfaceColorButton, selectedColor_);
|
updateColorPreview(ui->surfaceColorButton, selectedColor_);
|
||||||
ui->surfacePropertiesGroupBox->setEnabled(false);
|
ui->surfacePropertiesGroupBox->setEnabled(false);
|
||||||
}
|
}
|
||||||
@ -336,7 +318,7 @@ QString AddSurfaceFileDlg::generateSurfaceName() const
|
|||||||
QColor AddSurfaceFileDlg::generateSurfaceColor() const
|
QColor AddSurfaceFileDlg::generateSurfaceColor() const
|
||||||
{
|
{
|
||||||
// Generate different colors for each surface
|
// Generate different colors for each surface
|
||||||
static const QColor colors[] = { QColor(61, 38, 168),
|
static const QColor colors[] = {
|
||||||
Qt::blue, Qt::red, Qt::green, Qt::magenta, Qt::cyan, Qt::yellow,
|
Qt::blue, Qt::red, Qt::green, Qt::magenta, Qt::cyan, Qt::yellow,
|
||||||
Qt::darkBlue, Qt::darkRed, Qt::darkGreen, Qt::darkMagenta, Qt::darkCyan, Qt::darkYellow
|
Qt::darkBlue, Qt::darkRed, Qt::darkGreen, Qt::darkMagenta, Qt::darkCyan, Qt::darkYellow
|
||||||
};
|
};
|
||||||
@ -370,13 +352,6 @@ QString AddSurfaceFileDlg::GetDescription() const
|
|||||||
|
|
||||||
void AddSurfaceFileDlg::accept()
|
void AddSurfaceFileDlg::accept()
|
||||||
{
|
{
|
||||||
QString sName = ui->NameLineEdit->text();
|
|
||||||
// Validate table-specific parameters
|
|
||||||
if (sName.isEmpty()) {
|
|
||||||
QMessageBox::warning(this, tr("Warning"), tr("Please enter a Surface name."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!validateSpecificParams()) {
|
if (!validateSpecificParams()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -391,8 +366,6 @@ void AddSurfaceFileDlg::accept()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fileEntry->SetName(sName);
|
|
||||||
|
|
||||||
// Set chart properties
|
// Set chart properties
|
||||||
fileEntry->SetChartProperties(chartProperties_);
|
fileEntry->SetChartProperties(chartProperties_);
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>794</width>
|
<width>800</width>
|
||||||
<height>748</height>
|
<height>726</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -22,12 +22,6 @@
|
|||||||
<layout class="QHBoxLayout" name="fileLayout">
|
<layout class="QHBoxLayout" name="fileLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="filePathLineEdit">
|
<widget class="QLineEdit" name="filePathLineEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Select surface data file...</string>
|
<string>Select surface data file...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -35,12 +29,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="browseButton">
|
<widget class="QPushButton" name="browseButton">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Browse...</string>
|
<string>Browse...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -54,122 +42,68 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Chart Properties</string>
|
<string>Chart Properties</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="chartPropertiesLayout">
|
||||||
<item row="1" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="xTitleLabel">
|
<widget class="QLabel" name="xTitleLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Axis Title:</string>
|
<string>X Axis Title:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="xTitleLineEdit">
|
<widget class="QLineEdit" name="xTitleLineEdit"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="yTitleLabel">
|
<widget class="QLabel" name="yTitleLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y Axis Title:</string>
|
<string>Y Axis Title:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QLineEdit" name="yTitleLineEdit">
|
<widget class="QLineEdit" name="yTitleLineEdit"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="zTitleLabel">
|
<widget class="QLabel" name="zTitleLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Z Axis Title:</string>
|
<string>Z Axis Title:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="zTitleLineEdit">
|
<widget class="QLineEdit" name="zTitleLineEdit"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="timeParamLabel">
|
<widget class="QLabel" name="timeParamLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Time Parameter:</string>
|
<string>Time Parameter:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QSpinBox" name="timeParamSpinBox">
|
<widget class="QDoubleSpinBox" name="timeParamSpinBox">
|
||||||
<property name="minimumSize">
|
<property name="decimals">
|
||||||
<size>
|
<number>6</number>
|
||||||
<width>0</width>
|
</property>
|
||||||
<height>25</height>
|
<property name="minimum">
|
||||||
</size>
|
<double>-999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="xRangeLabel">
|
<widget class="QLabel" name="xRangeLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Range:</string>
|
<string>X Range:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="1">
|
||||||
<layout class="QHBoxLayout" name="xRangeLayout">
|
<layout class="QHBoxLayout" name="xRangeLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="xMinSpinBox">
|
<widget class="QDoubleSpinBox" name="xMinSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
@ -183,12 +117,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="xToLabel">
|
<widget class="QLabel" name="xToLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>to</string>
|
<string>to</string>
|
||||||
</property>
|
</property>
|
||||||
@ -196,12 +124,70 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="xMaxSpinBox">
|
<widget class="QDoubleSpinBox" name="xMaxSpinBox">
|
||||||
<property name="minimumSize">
|
<property name="decimals">
|
||||||
<size>
|
<number>6</number>
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QLabel" name="xCountLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>X Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QSpinBox" name="xCountSpinBox">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="yRangeLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Y Range:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="yRangeLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSpinBox" name="yMinSpinBox">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="yToLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>to</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSpinBox" name="yMaxSpinBox">
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
@ -216,26 +202,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QLabel" name="xCountLabel">
|
<widget class="QLabel" name="yCountLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X Count:</string>
|
<string>Y Count:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3">
|
<item row="3" column="3">
|
||||||
<widget class="QSpinBox" name="xCountSpinBox">
|
<widget class="QSpinBox" name="yCountSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -248,28 +222,16 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="yRangeLabel">
|
<widget class="QLabel" name="zRangeLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y Range:</string>
|
<string>Z Range:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<layout class="QHBoxLayout" name="yRangeLayout">
|
<layout class="QHBoxLayout" name="zRangeLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="yMinSpinBox">
|
<widget class="QDoubleSpinBox" name="zMinSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
@ -282,26 +244,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="yToLabel">
|
<widget class="QLabel" name="zToLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>to</string>
|
<string>to</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="yMaxSpinBox">
|
<widget class="QDoubleSpinBox" name="zMaxSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
@ -316,129 +266,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="4" column="2">
|
||||||
<widget class="QLabel" name="yCountLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y Count:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="3">
|
|
||||||
<widget class="QSpinBox" name="yCountSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>10000</number>
|
|
||||||
</property>
|
|
||||||
<property name="stepType">
|
|
||||||
<enum>QAbstractSpinBox::DefaultStepType</enum>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="zRangeLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Z Range:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="zRangeLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSpinBox" name="zMinSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="zToLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>to</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSpinBox" name="zMaxSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2">
|
|
||||||
<widget class="QLabel" name="zCountLabel">
|
<widget class="QLabel" name="zCountLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Z Count:</string>
|
<string>Z Count:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="3">
|
<item row="4" column="3">
|
||||||
<widget class="QSpinBox" name="zCountSpinBox">
|
<widget class="QSpinBox" name="zCountSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -450,33 +285,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="4">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="surfaceNameLabel_2">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="NameLineEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -490,12 +298,6 @@
|
|||||||
<layout class="QVBoxLayout" name="surfaceListLayout">
|
<layout class="QVBoxLayout" name="surfaceListLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addSurfaceButton">
|
<widget class="QPushButton" name="addSurfaceButton">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add Surface</string>
|
<string>Add Surface</string>
|
||||||
</property>
|
</property>
|
||||||
@ -513,12 +315,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="removeSurfaceButton">
|
<widget class="QPushButton" name="removeSurfaceButton">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Remove</string>
|
<string>Remove</string>
|
||||||
</property>
|
</property>
|
||||||
@ -531,38 +327,19 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Surface Properties</string>
|
<string>Surface Properties</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="surfacePropertiesLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="surfaceNameLabel">
|
<widget class="QLabel" name="surfaceNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name:</string>
|
<string>Name:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="surfaceNameLineEdit">
|
<widget class="QLineEdit" name="surfaceNameLineEdit"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="surfaceColorLabel">
|
<widget class="QLabel" name="surfaceColorLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Color:</string>
|
<string>Color:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -583,12 +360,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="surfaceStartLabel">
|
<widget class="QLabel" name="surfaceStartLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start Point:</string>
|
<string>Start Point:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -596,12 +367,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QSpinBox" name="surfaceStartSpinBox">
|
<widget class="QSpinBox" name="surfaceStartSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -612,12 +377,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="surfaceStopLabel">
|
<widget class="QLabel" name="surfaceStopLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>End Point:</string>
|
<string>End Point:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -625,12 +384,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QSpinBox" name="surfaceStopSpinBox">
|
<widget class="QSpinBox" name="surfaceStopSpinBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -639,120 +392,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="x_map">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X-Map:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBox_x">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>x</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>y</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>z</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="y_map">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Y-Map:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBox_y">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>x</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>y</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>z</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="z_map">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Z-Map:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBox_z">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>x</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>y</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>z</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -936,4 +575,4 @@
|
|||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
@ -17,14 +17,10 @@ AddTableFileDlg::AddTableFileDlg(QWidget* parent)
|
|||||||
: BaseAddFileDlg(FileEntryType::Table, parent)
|
: BaseAddFileDlg(FileEntryType::Table, parent)
|
||||||
, ui(new Ui::AddTableFileDlg)
|
, ui(new Ui::AddTableFileDlg)
|
||||||
, m_currentCurveIndex(-1) {
|
, m_currentCurveIndex(-1) {
|
||||||
|
|
||||||
SetupUI(ui);
|
SetupUI(ui);
|
||||||
SetTitle(getDialogTitle());
|
SetTitle(getDialogTitle());
|
||||||
setupConnections();
|
setupConnections();
|
||||||
|
|
||||||
ui->paramsGroupBox->setVisible(false);
|
|
||||||
ui->curvesGroupBox->setVisible(false);
|
|
||||||
ui->hasHeaderCheckBox->setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTableFileDlg::~AddTableFileDlg() {
|
AddTableFileDlg::~AddTableFileDlg() {
|
||||||
@ -302,38 +298,35 @@ bool AddTableFileDlg::validateSpecificParams() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate curves
|
// Validate curves
|
||||||
//if (m_curves.isEmpty()) {
|
if (m_curves.isEmpty()) {
|
||||||
// QMessageBox::warning(this, tr("Warning"),
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
// tr("Please add at least one curve."));
|
tr("Please add at least one curve."));
|
||||||
// return false;
|
return false;
|
||||||
//}
|
}
|
||||||
|
|
||||||
if (m_curves.size() > 0)
|
// Validate each curve's data
|
||||||
{
|
for (int i = 0; i < m_curves.size(); ++i) {
|
||||||
// Validate each curve's data
|
const CurveData& curve = m_curves[i];
|
||||||
for (int i = 0; i < m_curves.size(); ++i) {
|
|
||||||
const CurveData& curve = m_curves[i];
|
if (curve.name.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
if (curve.name.isEmpty()) {
|
tr("Curve %1 name cannot be empty.").arg(i + 1));
|
||||||
QMessageBox::warning(this, tr("Warning"),
|
return false;
|
||||||
tr("Curve %1 name cannot be empty.").arg(i + 1));
|
}
|
||||||
return false;
|
|
||||||
}
|
if (curve.data.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
if (curve.data.isEmpty()) {
|
tr("Curve '%1' data cannot be empty.").arg(curve.name));
|
||||||
QMessageBox::warning(this, tr("Warning"),
|
return false;
|
||||||
tr("Curve '%1' data cannot be empty.").arg(curve.name));
|
}
|
||||||
return false;
|
|
||||||
}
|
if (curve.data.size() != headers.size()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
if (curve.data.size() != headers.size()) {
|
tr("Curve '%1' data count (%2) doesn't match headers count (%3).")
|
||||||
QMessageBox::warning(this, tr("Warning"),
|
.arg(curve.name).arg(curve.data.size()).arg(headers.size()));
|
||||||
tr("Curve '%1' data count (%2) doesn't match headers count (%3).")
|
return false;
|
||||||
.arg(curve.name).arg(curve.data.size()).arg(headers.size()));
|
}
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -352,13 +345,13 @@ QString AddTableFileDlg::getSelectedFilePath() const {
|
|||||||
|
|
||||||
void AddTableFileDlg::accept()
|
void AddTableFileDlg::accept()
|
||||||
{
|
{
|
||||||
QString tableName = ui->tableNameEdit->text();
|
|
||||||
// Validate table-specific parameters
|
// Validate table-specific parameters
|
||||||
if (tableName.isEmpty()) {
|
if (ui->tableNameEdit->text().isEmpty()) {
|
||||||
QMessageBox::warning(this, tr("Warning"), tr("Please enter a table name."));
|
QMessageBox::warning(this, tr("Warning"), tr("Please enter a table name."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create FileEntryTable using factory function
|
// Create FileEntryTable using factory function
|
||||||
auto fileEntry = CreateFileEntryTable(getSelectedFilePath());
|
auto fileEntry = CreateFileEntryTable(getSelectedFilePath());
|
||||||
if (!fileEntry) {
|
if (!fileEntry) {
|
||||||
@ -376,8 +369,6 @@ void AddTableFileDlg::accept()
|
|||||||
//fileEntry->SetTableHeaders(headers);
|
//fileEntry->SetTableHeaders(headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileEntry->SetName(tableName);
|
|
||||||
|
|
||||||
// Set chart properties
|
// Set chart properties
|
||||||
FileEntryTable::ChartProperties chartProps;
|
FileEntryTable::ChartProperties chartProps;
|
||||||
chartProps.headerString = headersText;
|
chartProps.headerString = headersText;
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>667</width>
|
<width>676</width>
|
||||||
<height>533</height>
|
<height>600</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -29,12 +29,6 @@
|
|||||||
<layout class="QGridLayout" name="fileGridLayout">
|
<layout class="QGridLayout" name="fileGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="filePathLabel">
|
<widget class="QLabel" name="filePathLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Path:</string>
|
<string>File Path:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -42,12 +36,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="filePathEdit">
|
<widget class="QLineEdit" name="filePathEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -58,12 +46,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QToolButton" name="selectFileBtn">
|
<widget class="QToolButton" name="selectFileBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -71,12 +53,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="fileNameLabel">
|
<widget class="QLabel" name="fileNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Name:</string>
|
<string>File Name:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -84,12 +60,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="fileNameValue">
|
<widget class="QLabel" name="fileNameValue">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -97,12 +67,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="fileSizeLabel">
|
<widget class="QLabel" name="fileSizeLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Size:</string>
|
<string>File Size:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -110,12 +74,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="2">
|
<item row="2" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="fileSizeValue">
|
<widget class="QLabel" name="fileSizeValue">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -130,14 +88,24 @@
|
|||||||
<string>Basic Information</string>
|
<string>Basic Information</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="basicInfoGridLayout">
|
<layout class="QGridLayout" name="basicInfoGridLayout">
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QDoubleSpinBox" name="timeParamSpinBox">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1" colspan="2">
|
<item row="0" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="tableNameEdit">
|
<widget class="QLineEdit" name="tableNameEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Enter table name...</string>
|
<string>Enter table name...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -145,12 +113,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="tableNameLabel">
|
<widget class="QLabel" name="tableNameLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Table Name:</string>
|
<string>Table Name:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -158,27 +120,11 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="timeParamLabel">
|
<widget class="QLabel" name="timeParamLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Time Parameter:</string>
|
<string>Time Parameter:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
|
||||||
<widget class="QSpinBox" name="timeParamSpinBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -190,12 +136,6 @@
|
|||||||
<layout class="QVBoxLayout" name="headersVerticalLayout">
|
<layout class="QVBoxLayout" name="headersVerticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="hasHeaderCheckBox">
|
<widget class="QCheckBox" name="hasHeaderCheckBox">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File has header row</string>
|
<string>File has header row</string>
|
||||||
</property>
|
</property>
|
||||||
@ -206,12 +146,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="headersLabel">
|
<widget class="QLabel" name="headersLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Headers (comma-separated):</string>
|
<string>Headers (comma-separated):</string>
|
||||||
</property>
|
</property>
|
||||||
@ -219,12 +153,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="headersEdit">
|
<widget class="QLineEdit" name="headersEdit">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>e.g., Time, Value1, Value2, Value3...</string>
|
<string>e.g., Time, Value1, Value2, Value3...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -232,12 +160,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="headersHintLabel">
|
<widget class="QLabel" name="headersHintLabel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color: gray; font-size: 11px;</string>
|
<string notr="true">color: gray; font-size: 11px;</string>
|
||||||
</property>
|
</property>
|
||||||
@ -509,12 +431,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addBtn">
|
<widget class="QPushButton" name="addBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add File</string>
|
<string>Add File</string>
|
||||||
</property>
|
</property>
|
||||||
@ -525,12 +441,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cancelBtn">
|
<widget class="QPushButton" name="cancelBtn">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cancel</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>632</width>
|
<width>528</width>
|
||||||
<height>418</height>
|
<height>418</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -18,12 +18,6 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
</property>
|
</property>
|
||||||
@ -31,12 +25,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="leName">
|
<widget class="QLineEdit" name="leName">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@ -51,12 +39,6 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Path</string>
|
<string>Path</string>
|
||||||
</property>
|
</property>
|
||||||
@ -64,12 +46,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lePath">
|
<widget class="QLineEdit" name="lePath">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@ -83,12 +59,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="tbPath">
|
<widget class="QToolButton" name="tbPath">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -100,12 +70,6 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>commond Path</string>
|
<string>commond Path</string>
|
||||||
</property>
|
</property>
|
||||||
@ -113,12 +77,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="leCommondPath">
|
<widget class="QLineEdit" name="leCommondPath">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@ -132,12 +90,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="tbCommondPath">
|
<widget class="QToolButton" name="tbCommondPath">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -149,12 +101,6 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>describe</string>
|
<string>describe</string>
|
||||||
</property>
|
</property>
|
||||||
@ -182,12 +128,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pbSure">
|
<widget class="QPushButton" name="pbSure">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sure</string>
|
<string>Sure</string>
|
||||||
</property>
|
</property>
|
||||||
@ -195,12 +135,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pbCancel">
|
<widget class="QPushButton" name="pbCancel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cancel</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -44,8 +44,6 @@ std::shared_ptr<FileEntry> CreateFileEntry(FileEntryType type, const QString& fi
|
|||||||
return CreateFileEntryTable(filePath);
|
return CreateFileEntryTable(filePath);
|
||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
return CreateFileEntryLight(filePath);
|
return CreateFileEntryLight(filePath);
|
||||||
case FileEntryType::Polar:
|
|
||||||
return CreateFileEntryPolar(filePath);
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unknown FileEntryType: {}", static_cast<int>(type));
|
LOG_ERROR("Unknown FileEntryType: {}", static_cast<int>(type));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -108,20 +106,6 @@ std::shared_ptr<FileEntryLight> CreateFileEntryLight(const QString& filePath) {
|
|||||||
return fileEntry;
|
return fileEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<FileEntryPolar> CreateFileEntryPolar(const QString& filePath) {
|
|
||||||
QFileInfo fileInfo(filePath);
|
|
||||||
if (!fileInfo.exists()) {
|
|
||||||
LOG_ERROR("File does not exist: {}", filePath.toUtf8().constData());
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto fileEntry = std::make_shared<FileEntryPolar>();
|
|
||||||
fileEntry->SetPath(filePath);
|
|
||||||
fileEntry->SetName(fileInfo.baseName()); // Use base name as default display name
|
|
||||||
|
|
||||||
return fileEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Factory functions for creating empty FileEntry objects (for XML parsing)
|
// Factory functions for creating empty FileEntry objects (for XML parsing)
|
||||||
std::shared_ptr<FileEntry> CreateEmptyFileEntry(FileEntryType type) {
|
std::shared_ptr<FileEntry> CreateEmptyFileEntry(FileEntryType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -133,8 +117,6 @@ std::shared_ptr<FileEntry> CreateEmptyFileEntry(FileEntryType type) {
|
|||||||
return CreateEmptyFileEntryTable();
|
return CreateEmptyFileEntryTable();
|
||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
return CreateEmptyFileEntryLight();
|
return CreateEmptyFileEntryLight();
|
||||||
case FileEntryType::Polar:
|
|
||||||
return CreateEmptyFileEntryPolar();
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unknown FileEntryType: {}", static_cast<int>(type));
|
LOG_ERROR("Unknown FileEntryType: {}", static_cast<int>(type));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -165,12 +147,6 @@ std::shared_ptr<FileEntryLight> CreateEmptyFileEntryLight() {
|
|||||||
return fileEntry;
|
return fileEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<FileEntryPolar> CreateEmptyFileEntryPolar() {
|
|
||||||
auto fileEntry = std::make_shared<FileEntryPolar>();
|
|
||||||
// Don't set path or name - these will be set during XML parsing
|
|
||||||
return fileEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FileEntrySurface method implementations
|
// FileEntrySurface method implementations
|
||||||
void FileEntrySurface::SetChartProperties(const ChartProperties& properties) {
|
void FileEntrySurface::SetChartProperties(const ChartProperties& properties) {
|
||||||
chartProperties_ = properties;
|
chartProperties_ = properties;
|
||||||
@ -673,134 +649,3 @@ bool FileEntryCurve::ParseFiles(const tinyxml2::XMLElement* chartElement) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FileEntryPolar* FileEntryPolar::AsPolar() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileEntryPolar::SetChartProperties(const ChartProperties& properties) {
|
|
||||||
chartProperties_ = properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FileEntryPolar::ChartProperties& FileEntryPolar::GetChartProperties() const {
|
|
||||||
return chartProperties_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileEntryPolar::AddLineProperty(const LineProperty& line) {
|
|
||||||
lineProperties_.append(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileEntryPolar::RemoveLineProperty(int index) {
|
|
||||||
if (index >= 0 && index < lineProperties_.size()) {
|
|
||||||
lineProperties_.removeAt(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileEntryPolar::SetLineProperty(int index, const LineProperty& line) {
|
|
||||||
if (index >= 0 && index < lineProperties_.size()) {
|
|
||||||
lineProperties_[index] = line;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const FileEntryPolar::LineProperties& FileEntryPolar::GetLineProperties() const {
|
|
||||||
return lineProperties_;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileEntryPolar::SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) {
|
|
||||||
if (!scene || !doc) {
|
|
||||||
LOG_ERROR("Invalid XML parameters");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建 <chart> 元素
|
|
||||||
tinyxml2::XMLElement* chartElement = doc->NewElement("chart");
|
|
||||||
scene->InsertEndChild(chartElement);
|
|
||||||
|
|
||||||
// 设置chart属性
|
|
||||||
chartElement->SetAttribute("name", name_.toUtf8().constData());
|
|
||||||
chartElement->SetAttribute("path", fileName_.toUtf8().constData());
|
|
||||||
chartElement->SetAttribute("AngularCount", chartProperties_.AngularCount);
|
|
||||||
chartElement->SetAttribute("RadialCount", chartProperties_.RadialCount);
|
|
||||||
chartElement->SetAttribute("AngularTitle", chartProperties_.AngularTitle.toUtf8().constData());
|
|
||||||
chartElement->SetAttribute("RadialTitle", chartProperties_.RadialTitle.toUtf8().constData());
|
|
||||||
chartElement->SetAttribute("AngularMin", chartProperties_.AngularMin);
|
|
||||||
chartElement->SetAttribute("AngularMax", chartProperties_.AngularMax);
|
|
||||||
chartElement->SetAttribute("RadialMin", chartProperties_.RadialMin);
|
|
||||||
chartElement->SetAttribute("RadialMax", chartProperties_.RadialMax);
|
|
||||||
chartElement->SetAttribute("AngularUnit", chartProperties_.AngularUnit.toUtf8().constData());
|
|
||||||
chartElement->SetAttribute("RadialUnit", chartProperties_.RadialUnit.toUtf8().constData());
|
|
||||||
chartElement->SetAttribute("t", chartProperties_.timeParam);
|
|
||||||
|
|
||||||
// 为每个CurveProperty创建<curve>元素
|
|
||||||
for (const auto& curve : lineProperties_) {
|
|
||||||
tinyxml2::XMLElement* curveElement = doc->NewElement("curve");
|
|
||||||
chartElement->InsertEndChild(curveElement);
|
|
||||||
|
|
||||||
curveElement->SetAttribute("name", curve.name.toUtf8().constData());
|
|
||||||
curveElement->SetAttribute("color", QColorToString(curve.color).toUtf8().constData());
|
|
||||||
curveElement->SetAttribute("Angular", curve.Angular);
|
|
||||||
curveElement->SetAttribute("Radial", curve.Radial);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileEntryPolar::ParseFiles(const tinyxml2::XMLElement* chartElement) {
|
|
||||||
if (!chartElement) {
|
|
||||||
LOG_ERROR("Invalid XML element");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析chart属性
|
|
||||||
const char* nameAttr = chartElement->Attribute("name");
|
|
||||||
const char* pathAttr = chartElement->Attribute("path");
|
|
||||||
if (nameAttr) name_ = QString::fromUtf8(nameAttr);
|
|
||||||
if (pathAttr) {
|
|
||||||
QString fullPath = QString::fromUtf8(pathAttr);
|
|
||||||
QFileInfo fileInfo(fullPath);
|
|
||||||
fileName_ = fileInfo.fileName();
|
|
||||||
path_ = fileInfo.absolutePath();
|
|
||||||
}
|
|
||||||
|
|
||||||
chartProperties_.AngularCount = chartElement->IntAttribute("AngularCount", 0);
|
|
||||||
chartProperties_.RadialCount = chartElement->IntAttribute("RadialCount", 0);
|
|
||||||
|
|
||||||
const char* AngularTitleAttr = chartElement->Attribute("AngularTitle");
|
|
||||||
const char* RadialTitleAttr = chartElement->Attribute("RadialTitle");
|
|
||||||
if (AngularTitleAttr) chartProperties_.AngularTitle = QString::fromUtf8(AngularTitleAttr);
|
|
||||||
if (RadialTitleAttr) chartProperties_.RadialTitle = QString::fromUtf8(RadialTitleAttr);
|
|
||||||
|
|
||||||
chartProperties_.AngularMin = chartElement->DoubleAttribute("AngularMin", 0.0);
|
|
||||||
chartProperties_.AngularMax = chartElement->DoubleAttribute("AngularMax", 0.0);
|
|
||||||
chartProperties_.RadialMin = chartElement->DoubleAttribute("RadialMin", 0.0);
|
|
||||||
chartProperties_.RadialMax = chartElement->DoubleAttribute("RadialMax", 0.0);
|
|
||||||
|
|
||||||
const char* AngularUnitAttr = chartElement->Attribute("AngularUnit");
|
|
||||||
const char* RadialUnitAttr = chartElement->Attribute("RadialUnit");
|
|
||||||
if (AngularUnitAttr) chartProperties_.AngularUnit = QString::fromUtf8(AngularUnitAttr);
|
|
||||||
if (RadialUnitAttr) chartProperties_.RadialUnit = QString::fromUtf8(RadialUnitAttr);
|
|
||||||
|
|
||||||
chartProperties_.timeParam = chartElement->DoubleAttribute("t", 0.0);
|
|
||||||
|
|
||||||
// 解析所有<light>元素
|
|
||||||
lineProperties_.clear();
|
|
||||||
for (const tinyxml2::XMLElement* curveElement = chartElement->FirstChildElement("curve");
|
|
||||||
curveElement != nullptr;
|
|
||||||
curveElement = curveElement->NextSiblingElement("curve")) {
|
|
||||||
|
|
||||||
LineProperty prop;
|
|
||||||
|
|
||||||
const char* curveNameAttr = curveElement->Attribute("name");
|
|
||||||
const char* colorAttr = curveElement->Attribute("color");
|
|
||||||
if (curveNameAttr) prop.name = QString::fromUtf8(curveNameAttr);
|
|
||||||
if (colorAttr) prop.color = StringToQColor(QString::fromUtf8(colorAttr));
|
|
||||||
|
|
||||||
prop.Angular = curveElement->IntAttribute("Angular", 0.0);
|
|
||||||
prop.Radial = curveElement->IntAttribute("Radial", 0.0);
|
|
||||||
|
|
||||||
lineProperties_.append(prop);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@ -8,8 +8,7 @@ enum class FileEntryType {
|
|||||||
Curve,
|
Curve,
|
||||||
Surface,
|
Surface,
|
||||||
Table,
|
Table,
|
||||||
Light,
|
Light
|
||||||
Polar
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ChartType {
|
enum class ChartType {
|
||||||
@ -38,7 +37,6 @@ inline const char* FileEntryTypeToString(FileEntryType t) {
|
|||||||
case FileEntryType::Surface: return "surface";
|
case FileEntryType::Surface: return "surface";
|
||||||
case FileEntryType::Table: return "table";
|
case FileEntryType::Table: return "table";
|
||||||
case FileEntryType::Light: return "light";
|
case FileEntryType::Light: return "light";
|
||||||
case FileEntryType::Polar: return "polar";
|
|
||||||
}
|
}
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
@ -49,7 +47,6 @@ inline bool FileEntryTypeFromString(const char* s, FileEntryType& out) {
|
|||||||
if (0 == strcmp(s, "surface")) { out = FileEntryType::Surface; return true; }
|
if (0 == strcmp(s, "surface")) { out = FileEntryType::Surface; return true; }
|
||||||
if (0 == strcmp(s, "table")) { out = FileEntryType::Table; return true; }
|
if (0 == strcmp(s, "table")) { out = FileEntryType::Table; return true; }
|
||||||
if (0 == strcmp(s, "light")) { out = FileEntryType::Light; return true; }
|
if (0 == strcmp(s, "light")) { out = FileEntryType::Light; return true; }
|
||||||
if (0 == strcmp(s, "polar")) { out = FileEntryType::Polar; return true; }
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +54,6 @@ class FileEntryCurve;
|
|||||||
class FileEntryLight;
|
class FileEntryLight;
|
||||||
class FileEntrySurface;
|
class FileEntrySurface;
|
||||||
class FileEntryTable;
|
class FileEntryTable;
|
||||||
class FileEntryPolar;
|
|
||||||
|
|
||||||
class FileEntry {
|
class FileEntry {
|
||||||
public:
|
public:
|
||||||
@ -79,7 +75,6 @@ public:
|
|||||||
virtual FileEntryLight* AsLight() { return nullptr; }
|
virtual FileEntryLight* AsLight() { return nullptr; }
|
||||||
virtual FileEntrySurface* AsSurface() { return nullptr; }
|
virtual FileEntrySurface* AsSurface() { return nullptr; }
|
||||||
virtual FileEntryTable* AsTable() { return nullptr; }
|
virtual FileEntryTable* AsTable() { return nullptr; }
|
||||||
virtual FileEntryPolar* AsPolar() { return nullptr; }
|
|
||||||
|
|
||||||
virtual bool ParseFiles(const tinyxml2::XMLElement* element) { return false; }
|
virtual bool ParseFiles(const tinyxml2::XMLElement* element) { return false; }
|
||||||
virtual bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) { return false; }
|
virtual bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) { return false; }
|
||||||
@ -100,7 +95,6 @@ std::shared_ptr<FileEntryCurve> CreateFileEntryCurve(const QString& filePath);
|
|||||||
std::shared_ptr<FileEntry> CreateFileEntrySurface(const QString& filePath);
|
std::shared_ptr<FileEntry> CreateFileEntrySurface(const QString& filePath);
|
||||||
std::shared_ptr<FileEntryTable> CreateFileEntryTable(const QString& filePath);
|
std::shared_ptr<FileEntryTable> CreateFileEntryTable(const QString& filePath);
|
||||||
std::shared_ptr<FileEntryLight> CreateFileEntryLight(const QString& filePath);
|
std::shared_ptr<FileEntryLight> CreateFileEntryLight(const QString& filePath);
|
||||||
std::shared_ptr<FileEntryPolar> CreateFileEntryPolar(const QString& filePath);
|
|
||||||
|
|
||||||
// Factory functions for creating empty FileEntry objects (for XML parsing)
|
// Factory functions for creating empty FileEntry objects (for XML parsing)
|
||||||
std::shared_ptr<FileEntry> CreateEmptyFileEntry(FileEntryType type);
|
std::shared_ptr<FileEntry> CreateEmptyFileEntry(FileEntryType type);
|
||||||
@ -108,7 +102,6 @@ std::shared_ptr<FileEntryCurve> CreateEmptyFileEntryCurve();
|
|||||||
std::shared_ptr<FileEntry> CreateEmptyFileEntrySurface();
|
std::shared_ptr<FileEntry> CreateEmptyFileEntrySurface();
|
||||||
std::shared_ptr<FileEntryTable> CreateEmptyFileEntryTable();
|
std::shared_ptr<FileEntryTable> CreateEmptyFileEntryTable();
|
||||||
std::shared_ptr<FileEntryLight> CreateEmptyFileEntryLight();
|
std::shared_ptr<FileEntryLight> CreateEmptyFileEntryLight();
|
||||||
std::shared_ptr<FileEntryPolar> CreateEmptyFileEntryPolar();
|
|
||||||
|
|
||||||
|
|
||||||
class FileEntryCurve : public FileEntry {
|
class FileEntryCurve : public FileEntry {
|
||||||
@ -302,52 +295,3 @@ private:
|
|||||||
LightRowProperties lightProperties_;
|
LightRowProperties lightProperties_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileEntryPolar : public FileEntry {
|
|
||||||
public:
|
|
||||||
struct ChartProperties {
|
|
||||||
int AngularCount;
|
|
||||||
int RadialCount;
|
|
||||||
QString AngularTitle;
|
|
||||||
QString RadialTitle;
|
|
||||||
double AngularMin;
|
|
||||||
double AngularMax;
|
|
||||||
double RadialMin;
|
|
||||||
double RadialMax;
|
|
||||||
QString AngularUnit;
|
|
||||||
QString RadialUnit;
|
|
||||||
double timeParam; // 对应XML的t
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LineProperty {
|
|
||||||
QString name;
|
|
||||||
QColor color;
|
|
||||||
int Angular;
|
|
||||||
int Radial;
|
|
||||||
};
|
|
||||||
|
|
||||||
using LineProperties = QList<LineProperty>;
|
|
||||||
|
|
||||||
public:
|
|
||||||
FileEntryPolar() { type_ = FileEntryType::Polar; }
|
|
||||||
|
|
||||||
// Chart properties management
|
|
||||||
void SetChartProperties(const ChartProperties& properties);
|
|
||||||
const ChartProperties& GetChartProperties() const;
|
|
||||||
|
|
||||||
// Line properties management
|
|
||||||
void AddLineProperty(const LineProperty& line);
|
|
||||||
void RemoveLineProperty(int index);
|
|
||||||
void SetLineProperty(int index, const LineProperty& line);
|
|
||||||
const LineProperties& GetLineProperties() const;
|
|
||||||
|
|
||||||
// Type conversion
|
|
||||||
FileEntryPolar* AsPolar() override;
|
|
||||||
|
|
||||||
// XML处理方法
|
|
||||||
bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) override;
|
|
||||||
bool ParseFiles(const tinyxml2::XMLElement* element) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
ChartProperties chartProperties_;
|
|
||||||
LineProperties lineProperties_;
|
|
||||||
};
|
|
||||||
@ -221,9 +221,6 @@ bool WorkSpace::SetFileEntryCount(FileEntryType type, int count) {
|
|||||||
case FileEntryType::Light:
|
case FileEntryType::Light:
|
||||||
fileEntry = std::make_shared<FileEntryLight>();
|
fileEntry = std::make_shared<FileEntryLight>();
|
||||||
break;
|
break;
|
||||||
case FileEntryType::Polar:
|
|
||||||
fileEntry = std::make_shared<FileEntryPolar>();
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return false; // Invalid type
|
return false; // Invalid type
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user