modify chatplot menu ui
This commit is contained in:
parent
69caff5ce7
commit
57f8c1b6af
@ -120,34 +120,6 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CodeEdtUI</name>
|
||||
<message>
|
||||
<location filename="../ui/Layout/CodeEdtUI.cpp" line="74"/>
|
||||
<source>matlab editor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Layout/CodeEdtUI.cpp" line="82"/>
|
||||
<source>&bat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Layout/CodeEdtUI.cpp" line="102"/>
|
||||
<source>&Control</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Layout/CodeEdtUI.cpp" line="104"/>
|
||||
<source>&Run</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Layout/CodeEdtUI.cpp" line="107"/>
|
||||
<source>&Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CodeEdtUIClass</name>
|
||||
<message>
|
||||
@ -959,48 +931,48 @@
|
||||
<context>
|
||||
<name>QtConeWaveComponentManager</name>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8941"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8950"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8823"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8832"/>
|
||||
<source>ConeWaveComponent</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9038"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8920"/>
|
||||
<source>Height</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9045"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8927"/>
|
||||
<source>Radius</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9052"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8934"/>
|
||||
<source>waveCount</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9062"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8944"/>
|
||||
<source>waveSpeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9069"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8951"/>
|
||||
<source>baseColor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9076"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8958"/>
|
||||
<source>waveColor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9083"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8965"/>
|
||||
<source>ringBrightAlpha</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9090"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8972"/>
|
||||
<source>ringDarkAlpha</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1106,28 +1078,28 @@
|
||||
<context>
|
||||
<name>QtDashedLineComponentManager</name>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9282"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9291"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9164"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9173"/>
|
||||
<source>DashedLineComponent</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9360"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9242"/>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9367"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9249"/>
|
||||
<source>End</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9374"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9256"/>
|
||||
<source>Radius</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9381"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9263"/>
|
||||
<source>Color</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1143,17 +1115,17 @@
|
||||
<context>
|
||||
<name>QtEntityPropertyManager</name>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8385"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8268"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8392"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8275"/>
|
||||
<source>Visible</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8399"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8282"/>
|
||||
<source>Transform</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1235,13 +1207,13 @@
|
||||
<context>
|
||||
<name>QtMeshComponetManager</name>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8516"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8525"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8399"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8408"/>
|
||||
<source>MeshComponent</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8598"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8481"/>
|
||||
<source>Mesh</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1290,13 +1262,13 @@
|
||||
<context>
|
||||
<name>QtPathComponentManager</name>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8675"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8684"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8558"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8567"/>
|
||||
<source>PathComponent</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8757"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8640"/>
|
||||
<source>Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1546,45 +1518,20 @@
|
||||
<context>
|
||||
<name>QtWorkspacePropertyManager</name>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8095"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8048"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8102"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8055"/>
|
||||
<source>Description</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8109"/>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8062"/>
|
||||
<source>Timestep</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8116"/>
|
||||
<source>SimMatlab</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8123"/>
|
||||
<source>MatlabParam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8130"/>
|
||||
<source>Wave</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8137"/>
|
||||
<source>RD</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8144"/>
|
||||
<source>Report</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignalIndicatorLampUI</name>
|
||||
|
@ -71,7 +71,7 @@ void CodeEdtUI::AttachDock(DockWidget* dockWidget)
|
||||
|
||||
DockTitleBar* dockTitleBar = new DockTitleBar;
|
||||
|
||||
dockTitleBar->SetTitle(tr("matlab editor"));
|
||||
dockTitleBar->SetTitle(u8"bat文件");
|
||||
|
||||
dockWidget->SetDockWidgetTitleBar(dockTitleBar);
|
||||
}
|
||||
@ -79,7 +79,7 @@ void CodeEdtUI::AttachDock(DockWidget* dockWidget)
|
||||
void CodeEdtUI::InitBat()
|
||||
{
|
||||
{
|
||||
QMenu* fileMenu = menuBar()->addMenu(tr("&bat"));
|
||||
QMenu* fileMenu = menuBar()->addMenu(u8"文件");
|
||||
|
||||
QDir dir(RecourceHelper::Get().GetBasePath() + "/bat");
|
||||
QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks);
|
||||
@ -99,12 +99,12 @@ void CodeEdtUI::InitBat()
|
||||
}
|
||||
|
||||
{
|
||||
QMenu* ctrlMenu = menuBar()->addMenu(tr("&Control"));
|
||||
QMenu* ctrlMenu = menuBar()->addMenu(u8"控制");
|
||||
|
||||
QAction* runAction = new QAction(tr("&Run"), this);
|
||||
QAction* runAction = new QAction(tr(u8"执行"), this);
|
||||
ctrlMenu->addAction(runAction);
|
||||
|
||||
QAction* saveAction = new QAction(tr("&Save"), this);
|
||||
QAction* saveAction = new QAction(u8"保存", this);
|
||||
ctrlMenu->addAction(saveAction);
|
||||
|
||||
connect(runAction, &QAction::triggered, this, &CodeEdtUI::runFile);
|
||||
|
@ -336,14 +336,14 @@ void MainWindow::AddDockArea(const QString& strArea) {
|
||||
}
|
||||
|
||||
void MainWindow::OnTabifiedDockWidgetActivated(QDockWidget* dockWidget) {
|
||||
if (dockWidget) {
|
||||
QMainWindow* mainWindow = qobject_cast<QMainWindow*>(dockWidget->parentWidget());
|
||||
if (mainWindow) {
|
||||
mainWindow->removeDockWidget(dockWidget);
|
||||
}
|
||||
//if (dockWidget) {
|
||||
// QMainWindow* mainWindow = qobject_cast<QMainWindow*>(dockWidget->parentWidget());
|
||||
// if (mainWindow) {
|
||||
// mainWindow->removeDockWidget(dockWidget);
|
||||
// }
|
||||
|
||||
// tabWidget_->setCurrentWidget(dockWidget->parentWidget());
|
||||
}
|
||||
// // tabWidget_->setCurrentWidget(dockWidget->parentWidget());
|
||||
//}
|
||||
}
|
||||
|
||||
void MainWindow::slotShowUISetting() {
|
||||
|
@ -33,7 +33,7 @@ void ChartPlotMenu::InitMenu()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请检查仿真文件路径是否存在!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请检查仿真文件路径是否存在!"));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -41,30 +41,30 @@ void ChartPlotMenu::InitMenu()
|
||||
connect(ui.toolButton_2, &QToolButton::clicked, this, [=] {
|
||||
auto current = WorkSpaceManager::Get().GetCurrent();
|
||||
if (nullptr == current) {
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
return;
|
||||
}
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择仿真运行文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.m");
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择仿真运行文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.m");
|
||||
if (strSel.isEmpty()) {
|
||||
LOG_WARN("选择文件为空");
|
||||
LOG_WARN("选择文件为空");
|
||||
return;
|
||||
}
|
||||
|
||||
const QString old = current->GetSimMatlab();
|
||||
if (old == strSel) {
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
return;
|
||||
} else if (!old.isEmpty()) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前仿真文件!"),
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前仿真文件!"),
|
||||
QMessageBox::Yes | QMessageBox::No)
|
||||
) {
|
||||
if (!QFile::remove(old)) {
|
||||
LOG_WARN("删除文件失败");
|
||||
LOG_WARN("删除文件失败");
|
||||
QMessageBox::information(nullptr,
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -76,32 +76,34 @@ void ChartPlotMenu::InitMenu()
|
||||
connect(ui.toolButton_5, &QToolButton::clicked, this, [=] {
|
||||
auto current = WorkSpaceManager::Get().GetCurrent();
|
||||
if (nullptr == current) {
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
return;
|
||||
}
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择Wave文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.txt");
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择Wave文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.txt");
|
||||
if (strSel.isEmpty()) {
|
||||
LOG_WARN("选择文件为空");
|
||||
LOG_WARN("选择文件为空");
|
||||
return;
|
||||
}
|
||||
|
||||
const QString old = current->GetWavePath();
|
||||
if (old == strSel) {
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
return;
|
||||
}
|
||||
else if (!old.isEmpty()) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前Wave文件!"),
|
||||
QMessageBox::Yes | QMessageBox::No)
|
||||
) {
|
||||
if (!QFile::remove(old)) {
|
||||
LOG_WARN("删除文件失败");
|
||||
QMessageBox::information(nullptr,
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
return;
|
||||
if (QFileInfo(old).isFile() && QFile::exists(old)) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前Wave文件!"),
|
||||
QMessageBox::Yes | QMessageBox::No)
|
||||
) {
|
||||
if (!QFile::remove(old)) {
|
||||
LOG_WARN("删除文件失败");
|
||||
QMessageBox::information(nullptr,
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -112,32 +114,32 @@ void ChartPlotMenu::InitMenu()
|
||||
connect(ui.toolButton_3, &QToolButton::clicked, this, [=] {
|
||||
auto current = WorkSpaceManager::Get().GetCurrent();
|
||||
if (nullptr == current) {
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
return;
|
||||
}
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择RD文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.txt");
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择RD文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.txt");
|
||||
if (strSel.isEmpty()) {
|
||||
LOG_WARN("选择文件为空");
|
||||
LOG_WARN("选择文件为空");
|
||||
return;
|
||||
}
|
||||
|
||||
const QString old = current->GetRDPath();
|
||||
if (old == strSel) {
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
return;
|
||||
}
|
||||
else if (!old.isEmpty()) {
|
||||
if (QFileInfo(old).isFile()) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前RD文件!"),
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前RD文件!"),
|
||||
QMessageBox::Yes | QMessageBox::No)
|
||||
) {
|
||||
if (!QFile::remove(old)) {
|
||||
LOG_WARN("删除文件失败");
|
||||
LOG_WARN("删除文件失败");
|
||||
QMessageBox::information(nullptr,
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -150,31 +152,31 @@ void ChartPlotMenu::InitMenu()
|
||||
connect(ui.toolButton_4, &QToolButton::clicked, this, [=] {
|
||||
auto current = WorkSpaceManager::Get().GetCurrent();
|
||||
if (nullptr == current) {
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请先创建空间!"));
|
||||
return;
|
||||
}
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择Report文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.txt");
|
||||
QString strSel = QFileDialog::getOpenFileName(this, u8"选择Report文件", RecourceHelper::Get().GetBasePath() + "/workspace/", "*.txt");
|
||||
if (strSel.isEmpty()) {
|
||||
LOG_WARN("选择文件为空");
|
||||
LOG_WARN("选择文件为空");
|
||||
return;
|
||||
}
|
||||
|
||||
const QString old = current->GetReportPath();
|
||||
if (old == strSel) {
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
return;
|
||||
}
|
||||
else if (!old.isEmpty()) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前Report文件!"),
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前Report文件!"),
|
||||
QMessageBox::Yes | QMessageBox::No)
|
||||
) {
|
||||
if (!QFile::remove(old)) {
|
||||
LOG_WARN("删除文件失败");
|
||||
LOG_WARN("删除文件失败");
|
||||
QMessageBox::information(nullptr,
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
QString::fromLocal8Bit("提示"),
|
||||
QString::fromLocal8Bit("删除文件失败!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -7911,22 +7911,10 @@ public:
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToName;
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToDescription;
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToTimestep;
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToSimMatlab;
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToMatlabParam;
|
||||
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToWave;
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToReport;
|
||||
QMap<const QtProperty*, QtProperty*> m_properyToRD;
|
||||
|
||||
QMap<const QtProperty*, QtProperty*> m_nameToPropery;
|
||||
QMap<const QtProperty*, QtProperty*> m_descriptionToPropery;
|
||||
QMap<const QtProperty*, QtProperty*> m_timestepToPropery;
|
||||
QMap<const QtProperty*, QtProperty*> m_simMatlabToPropery;
|
||||
QMap<const QtProperty*, QtProperty*> m_matlabParamToPropery;
|
||||
|
||||
QMap<const QtProperty*, QtProperty*> m_waveToPropery;
|
||||
QMap<const QtProperty*, QtProperty*> m_reportToPropery;
|
||||
QMap<const QtProperty*, QtProperty*> m_rdToPropery;
|
||||
};
|
||||
|
||||
void QtWorkspacePropertyManagerPrivate::slotStringChanged(QtProperty* property, QString value) {
|
||||
@ -7942,11 +7930,7 @@ void QtWorkspacePropertyManagerPrivate::slotStringChanged(QtProperty* property,
|
||||
QWorkspaceAttribute c = m_values[prop];
|
||||
c.SetTimeStep(value);
|
||||
q_ptr->setValue(prop, c);
|
||||
} else if (QtProperty* prop = m_simMatlabToPropery.value(property, 0)) {
|
||||
QWorkspaceAttribute c = m_values[prop];
|
||||
c.SetSimMatlab(value);
|
||||
q_ptr->setValue(prop, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QtWorkspacePropertyManagerPrivate::slotPropertyDestroyed(QtProperty* property) {
|
||||
@ -7964,31 +7948,6 @@ void QtWorkspacePropertyManagerPrivate::slotPropertyDestroyed(QtProperty* proper
|
||||
m_timestepToPropery[subProp] = 0;
|
||||
m_timestepToPropery.remove(property);
|
||||
}
|
||||
|
||||
if (QtProperty* subProp = m_simMatlabToPropery.value(property, nullptr)) {
|
||||
m_simMatlabToPropery[subProp] = 0;
|
||||
m_simMatlabToPropery.remove(property);
|
||||
}
|
||||
|
||||
if (QtProperty* subProp = m_matlabParamToPropery.value(property, nullptr)) {
|
||||
m_matlabParamToPropery[subProp] = 0;
|
||||
m_matlabParamToPropery.remove(property);
|
||||
}
|
||||
|
||||
if (QtProperty* subProp = m_waveToPropery.value(property, nullptr)) {
|
||||
m_waveToPropery[subProp] = 0;
|
||||
m_waveToPropery.remove(property);
|
||||
}
|
||||
|
||||
if (QtProperty* subProp = m_reportToPropery.value(property, nullptr)) {
|
||||
m_reportToPropery[subProp] = 0;
|
||||
m_reportToPropery.remove(property);
|
||||
}
|
||||
|
||||
if (QtProperty* subProp = m_rdToPropery.value(property, nullptr)) {
|
||||
m_rdToPropery[subProp] = 0;
|
||||
m_rdToPropery.remove(property);
|
||||
}
|
||||
}
|
||||
|
||||
QtWorkspacePropertyManager::QtWorkspacePropertyManager(QObject* parent)
|
||||
@ -8073,12 +8032,6 @@ void QtWorkspacePropertyManager::setValue(QtProperty* property, const QWorkspace
|
||||
d_ptr->m_stringProperyManager->setValue(d_ptr->m_properyToName[property], value.GetName());
|
||||
d_ptr->m_stringProperyManager->setValue(d_ptr->m_properyToDescription[property], value.GetDescription());
|
||||
d_ptr->m_filesProperyManager->setValue(d_ptr->m_properyToTimestep[property], value.GetTimeStep());
|
||||
d_ptr->m_filesProperyManager->setValue(d_ptr->m_properyToSimMatlab[property], value.GetSimMatlab());
|
||||
d_ptr->m_filesProperyManager->setValue(d_ptr->m_properyToMatlabParam[property], value.GetMatlabParam());
|
||||
|
||||
d_ptr->m_filesProperyManager->setValue(d_ptr->m_properyToWave[property], value.GetWavePath());
|
||||
d_ptr->m_filesProperyManager->setValue(d_ptr->m_properyToReport[property], value.GetReportPath());
|
||||
d_ptr->m_filesProperyManager->setValue(d_ptr->m_properyToRD[property], value.GetRDPath());
|
||||
|
||||
emit propertyChanged(property);
|
||||
emit valueChanged(property, value);
|
||||
@ -8111,41 +8064,6 @@ void QtWorkspacePropertyManager::initializeProperty(QtProperty* property) {
|
||||
d_ptr->m_properyToTimestep[property] = prop;
|
||||
d_ptr->m_timestepToPropery[prop] = property;
|
||||
property->addSubProperty(prop);
|
||||
|
||||
prop = d_ptr->m_filesProperyManager->addProperty();
|
||||
prop->setPropertyName(tr("SimMatlab"));
|
||||
d_ptr->m_filesProperyManager->setValueOnly(prop, val.GetSimMatlab());
|
||||
d_ptr->m_properyToSimMatlab[property] = prop;
|
||||
d_ptr->m_simMatlabToPropery[prop] = property;
|
||||
property->addSubProperty(prop);
|
||||
|
||||
prop = d_ptr->m_filesProperyManager->addProperty();
|
||||
prop->setPropertyName(tr("MatlabParam"));
|
||||
d_ptr->m_filesProperyManager->setValueOnly(prop, val.GetMatlabParam());
|
||||
d_ptr->m_properyToMatlabParam[property] = prop;
|
||||
d_ptr->m_matlabParamToPropery[prop] = property;
|
||||
property->addSubProperty(prop);
|
||||
|
||||
prop = d_ptr->m_filesProperyManager->addProperty();
|
||||
prop->setPropertyName(tr("Wave"));
|
||||
d_ptr->m_filesProperyManager->setValueOnly(prop, val.GetWavePath());
|
||||
d_ptr->m_properyToWave[property] = prop;
|
||||
d_ptr->m_waveToPropery[prop] = property;
|
||||
property->addSubProperty(prop);
|
||||
|
||||
prop = d_ptr->m_filesProperyManager->addProperty();
|
||||
prop->setPropertyName(tr("RD"));
|
||||
d_ptr->m_filesProperyManager->setValueOnly(prop, val.GetRDPath());
|
||||
d_ptr->m_properyToRD[property] = prop;
|
||||
d_ptr->m_rdToPropery[prop] = property;
|
||||
property->addSubProperty(prop);
|
||||
|
||||
prop = d_ptr->m_filesProperyManager->addProperty();
|
||||
prop->setPropertyName(tr("Report"));
|
||||
d_ptr->m_filesProperyManager->setValueOnly(prop, val.GetReportPath());
|
||||
d_ptr->m_properyToReport[property] = prop;
|
||||
d_ptr->m_reportToPropery[prop] = property;
|
||||
property->addSubProperty(prop);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -8172,41 +8090,6 @@ void QtWorkspacePropertyManager::uninitializeProperty(QtProperty* property) {
|
||||
delete prop;
|
||||
}
|
||||
d_ptr->m_properyToTimestep.remove(property);
|
||||
|
||||
prop = d_ptr->m_simMatlabToPropery[property];
|
||||
if (prop) {
|
||||
d_ptr->m_simMatlabToPropery.remove(prop);
|
||||
delete prop;
|
||||
}
|
||||
d_ptr->m_properyToSimMatlab.remove(property);
|
||||
|
||||
prop = d_ptr->m_matlabParamToPropery[property];
|
||||
if (prop) {
|
||||
d_ptr->m_matlabParamToPropery.remove(prop);
|
||||
delete prop;
|
||||
}
|
||||
d_ptr->m_properyToMatlabParam.remove(property);
|
||||
|
||||
prop = d_ptr->m_waveToPropery[property];
|
||||
if (prop) {
|
||||
d_ptr->m_waveToPropery.remove(prop);
|
||||
delete prop;
|
||||
}
|
||||
d_ptr->m_properyToWave.remove(property);
|
||||
|
||||
prop = d_ptr->m_reportToPropery[property];
|
||||
if (prop) {
|
||||
d_ptr->m_reportToPropery.remove(prop);
|
||||
delete prop;
|
||||
}
|
||||
d_ptr->m_properyToReport.remove(property);
|
||||
|
||||
prop = d_ptr->m_rdToPropery[property];
|
||||
if (prop) {
|
||||
d_ptr->m_rdToPropery.remove(prop);
|
||||
delete prop;
|
||||
}
|
||||
d_ptr->m_properyToRD.remove(property);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@ -8917,9 +8800,8 @@ QtConeWaveComponentManager::QtConeWaveComponentManager(QObject* parent)
|
||||
this, SLOT(slotPropertyDestroyed(QtProperty*)));
|
||||
|
||||
d_ptr->m_intProperyManager = new QtIntPropertyManager(this);
|
||||
bool intConnected = connect(d_ptr->m_intProperyManager, SIGNAL(valueChanged(QtProperty*, int)),
|
||||
connect(d_ptr->m_intProperyManager, SIGNAL(valueChanged(QtProperty*, int)),
|
||||
this, SLOT(slotIntChanged(QtProperty*, int)));
|
||||
qDebug() << "Int manager connection result:" << intConnected;
|
||||
connect(d_ptr->m_intProperyManager, SIGNAL(propertyDestroyed(QtProperty*)),
|
||||
this, SLOT(slotPropertyDestroyed(QtProperty*)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user