modify play menu and add label and update sim
This commit is contained in:
parent
57f8c1b6af
commit
63eeca0086
@ -623,7 +623,7 @@
|
||||
<context>
|
||||
<name>ModelTreeWidget</name>
|
||||
<message>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="252"/>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="254"/>
|
||||
<source>Release Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -658,22 +658,27 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="260"/>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="262"/>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="268"/>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="270"/>
|
||||
<source>Add Label Component</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="277"/>
|
||||
<source>Add Mesh Component</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="271"/>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="280"/>
|
||||
<source>Add Path Component</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="278"/>
|
||||
<location filename="../ui/ModelBrowser/ModelTreeWidget.cpp" line="287"/>
|
||||
<source>Delete</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -758,7 +763,6 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="34"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="41"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="63"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="70"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="81"/>
|
||||
@ -768,6 +772,11 @@
|
||||
<source>has not workspace</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="41"/>
|
||||
<source>not timestep</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="48"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="52"/>
|
||||
|
@ -55,6 +55,7 @@ void ChartPlotMenu::InitMenu()
|
||||
LOG_INFO("选择文件与当前文件相同");
|
||||
return;
|
||||
} else if (!old.isEmpty()) {
|
||||
if (QFileInfo(old).isFile() && QFile::exists(old)) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前仿真文件!"),
|
||||
@ -69,6 +70,7 @@ void ChartPlotMenu::InitMenu()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
current->SetSimMatlab(strSel);
|
||||
});
|
||||
@ -129,7 +131,7 @@ void ChartPlotMenu::InitMenu()
|
||||
return;
|
||||
}
|
||||
else if (!old.isEmpty()) {
|
||||
if (QFileInfo(old).isFile()) {
|
||||
if (QFileInfo(old).isFile() && QFile::exists(old)) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前RD文件!"),
|
||||
@ -167,6 +169,7 @@ void ChartPlotMenu::InitMenu()
|
||||
return;
|
||||
}
|
||||
else if (!old.isEmpty()) {
|
||||
if (QFileInfo(old).isFile() && QFile::exists(old)) {
|
||||
if (QMessageBox::Yes == QMessageBox::question(nullptr,
|
||||
QString::fromLocal8Bit("询问"),
|
||||
QString::fromLocal8Bit("替换当前Report文件!"),
|
||||
@ -181,6 +184,7 @@ void ChartPlotMenu::InitMenu()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
current->SetReportPath(strSel);
|
||||
});
|
||||
|
@ -38,7 +38,7 @@ void PlayManagerMenu::OnPlay() {
|
||||
}
|
||||
Timestep* timestep = workSpace_->GetTimestep();
|
||||
if (nullptr == timestep) {
|
||||
QMessageBox::warning(&MainFrame::Get(), tr("warning"), tr("has not workspace"),
|
||||
QMessageBox::warning(&MainFrame::Get(), tr("warning"), tr("not timestep"),
|
||||
QMessageBox::Ok);
|
||||
LOG_INFO("current is nullptr");
|
||||
return;
|
||||
|
@ -208,6 +208,8 @@ void ModelTreeWidget::OnAddMeshEntity(const QString& mesh, const QString& name)
|
||||
int count = currentWorkSpace_->GetEntities().size();
|
||||
entity->SetName(QString("%1_%2").arg(name).arg(count));
|
||||
currentWorkSpace_->AddEntity(entity);
|
||||
|
||||
OnAddComponent("LabelComponent", entity);
|
||||
}
|
||||
|
||||
SceneComponent* ModelTreeWidget::OnAddComponent(const QString& typeName, Entity* entity) {
|
||||
@ -265,7 +267,14 @@ void ModelTreeWidget::PopupEntityMenu(QContextMenuEvent* event, Entity* entity)
|
||||
);
|
||||
}
|
||||
|
||||
QAction* addEntiy = new QAction(tr("Add Mesh Component"), this);
|
||||
QAction* addEntiy = new QAction(tr("Add Label Component"), this);
|
||||
menu.addAction(addEntiy);
|
||||
connect(addEntiy, &QAction::triggered, [this, entity]() {
|
||||
OnAddComponent("LabelComponent", entity);
|
||||
}
|
||||
);
|
||||
|
||||
addEntiy = new QAction(tr("Add Mesh Component"), this);
|
||||
menu.addAction(addEntiy);
|
||||
|
||||
addEntiy = new QAction(tr("Add Path Component"), this);
|
||||
|
@ -178,6 +178,7 @@ void OsgWidget::resizeEvent(QResizeEvent* event) {
|
||||
}
|
||||
|
||||
void OsgWidget::paintEvent(QPaintEvent*) {
|
||||
WorkSpaceManager::Get().OnFrame();
|
||||
frame();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user