modified style
This commit is contained in:
parent
7d336212ea
commit
96e1eb328f
@ -2763,32 +2763,25 @@
|
||||
<context>
|
||||
<name>SimuRunMenu</name>
|
||||
<message>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="50"/>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="52"/>
|
||||
<source>no workspace</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="64"/>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="66"/>
|
||||
<source>no commands</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="74"/>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="76"/>
|
||||
<source>Commands</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="93"/>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="95"/>
|
||||
<source>unnamed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="125"/>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="127"/>
|
||||
<location filename="../ui/Menu/SimuRunMenu.cpp" line="187"/>
|
||||
<source>MatlabParam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SimuRunMenuClass</name>
|
||||
|
||||
@ -15,17 +15,13 @@ DockTitleBar::DockTitleBar(QWidget* parent)
|
||||
ui->setupUi(this);
|
||||
connect(ui->sys_close, &QPushButton::clicked, this, &DockTitleBar::signalClose);
|
||||
connect(ui->sys_float, &QPushButton::clicked, this, &DockTitleBar::signalToggleFloating);
|
||||
connect(ui->sys_max, &QPushButton::clicked, this, &DockTitleBar::signalMax);
|
||||
}
|
||||
|
||||
DockTitleBar::~DockTitleBar() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
//QSize DockTitleBar::minimumSizeHint() const {
|
||||
// QSize s = size();
|
||||
// return s;
|
||||
//}
|
||||
|
||||
void DockTitleBar::SetTitle(const QString& title) {
|
||||
ui->sys_title->setText(title);
|
||||
}
|
||||
@ -38,3 +34,17 @@ void DockTitleBar::paintEvent(QPaintEvent* event) {
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
||||
void DockTitleBar::SetFloatVisible(bool bVisible)
|
||||
{
|
||||
ui->sys_float->setVisible(bVisible);
|
||||
}
|
||||
|
||||
void DockTitleBar::SetMaxVisible(bool bVisible)
|
||||
{
|
||||
ui->sys_max->setVisible(bVisible);
|
||||
}
|
||||
|
||||
void DockTitleBar::SetCloseVisible(bool bVisible)
|
||||
{
|
||||
ui->sys_close->setVisible(bVisible);
|
||||
}
|
||||
@ -16,6 +16,9 @@ public:
|
||||
//QSize minimumSizeHint() const override;
|
||||
|
||||
void SetTitle(const QString& title) override;
|
||||
void SetFloatVisible(bool bVisible);
|
||||
void SetMaxVisible(bool bVisible);
|
||||
void SetCloseVisible(bool bVisible);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* event) override;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>213</width>
|
||||
<width>367</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -14,20 +14,17 @@
|
||||
<string>DockTitleBar</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="sys_title">
|
||||
@ -62,6 +59,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="sys_max">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="sys_close">
|
||||
<property name="maximumSize">
|
||||
|
||||
@ -35,12 +35,14 @@ DockWidget::DockWidget(const QString& title, QWidget* parent)
|
||||
windowManagerMenu->AddDockWidget(this);
|
||||
}
|
||||
|
||||
m_bMax = false;
|
||||
//setStyleSheet(QString("border: 1px solid #A2C2DB;"));
|
||||
}
|
||||
|
||||
DockWidget::DockWidget(QWidget* parent)
|
||||
: QDockWidget(parent) {
|
||||
setFeatures(DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable);
|
||||
m_bMax = false;
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +60,7 @@ void DockWidget::SetDockWidgetTitleBar(DockWidgetTitleBar* titleBar) {
|
||||
if (nullptr != titleBar_) {
|
||||
disconnect(titleBar_, &DockWidgetTitleBar::signalClose, this, &DockWidget::close);
|
||||
disconnect(titleBar_, &DockWidgetTitleBar::signalToggleFloating, this, &DockWidget::OnToggleFloat);
|
||||
disconnect(titleBar_, &DockWidgetTitleBar::signalMax, this, &DockWidget::OnMax);
|
||||
}
|
||||
titleBar_ = titleBar;
|
||||
if (nullptr == titleBar_) {
|
||||
@ -68,6 +71,7 @@ void DockWidget::SetDockWidgetTitleBar(DockWidgetTitleBar* titleBar) {
|
||||
titleBar_->SetTitle(windowTitle());
|
||||
connect(titleBar_, &DockWidgetTitleBar::signalClose, this, &DockWidget::OnClose);
|
||||
connect(titleBar_, &DockWidgetTitleBar::signalToggleFloating, this, &DockWidget::OnToggleFloat);
|
||||
connect(titleBar_, &DockWidgetTitleBar::signalMax, this, &DockWidget::OnMax);
|
||||
QDockWidget::setTitleBarWidget(titleBar_);
|
||||
}
|
||||
|
||||
@ -95,6 +99,23 @@ void DockWidget::OnToggleFloat() {
|
||||
setFloating(!isFloating());
|
||||
}
|
||||
|
||||
void DockWidget::OnMax() {
|
||||
if (!isFloating())
|
||||
{
|
||||
setFloating(true);
|
||||
}
|
||||
if (m_bMax)
|
||||
{
|
||||
showNormal();
|
||||
m_bMax = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
showMaximized();
|
||||
m_bMax = true;
|
||||
}
|
||||
}
|
||||
|
||||
void DockWidgetTitleBar::mouseDoubleClickEvent(QMouseEvent* event) {
|
||||
QWidget::mouseDoubleClickEvent(event);
|
||||
emit signalToggleFloating();
|
||||
|
||||
@ -24,6 +24,7 @@ protected:
|
||||
Q_SIGNALS:
|
||||
void signalClose();
|
||||
void signalToggleFloating();
|
||||
void signalMax();
|
||||
};
|
||||
|
||||
class DockWidget : public QDockWidget {
|
||||
@ -49,7 +50,9 @@ protected:
|
||||
private:
|
||||
void OnClose();
|
||||
void OnToggleFloat();
|
||||
void OnMax();
|
||||
|
||||
private:
|
||||
DockWidgetTitleBar* titleBar_{ nullptr };
|
||||
bool m_bMax;
|
||||
};
|
||||
@ -13,6 +13,11 @@
|
||||
<property name="windowTitle">
|
||||
<string>AddParamSetting</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget#AddParamSettingClass {
|
||||
border: 2px solid #7FB3D5;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
|
||||
@ -122,6 +122,8 @@ void MainFrame::InitUI() {
|
||||
MainWindow* mainWindow = new MainWindow(this);
|
||||
layout->addWidget(mainWindow);
|
||||
|
||||
simuRunMenu->SetMainWindow(mainWindow);
|
||||
|
||||
OsgWidget* viewWidget = mainWindow->GetViewWidget();
|
||||
connect(fileMenu, &FileManagerMenu::LoadDyt, viewWidget, &OsgWidget::OnLoadDyt);
|
||||
connect(viewWidget, &OsgWidget::signalResetWorkSpace, mainWindow, &MainWindow::slotResetWorkSpace);
|
||||
|
||||
@ -61,10 +61,10 @@ void MainWindow::InitUI() {
|
||||
DockWidget* model = new DockWidget(tr("model elements"), 0);
|
||||
model->SetDockWidgetTitleBar(new DockTitleBar(model));
|
||||
model->setObjectName("Dock.ModelBrowser");
|
||||
// addDockWidget(pSettingUI->GetArea("ModelBrowser"), model);
|
||||
modelBrowser_ = new ModelBrowser(0);
|
||||
modelBrowser_->AttachDock(model);
|
||||
m_mapDockWidget.insert("ModelBrowser", model);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, model);
|
||||
|
||||
// 创建预制模型面板
|
||||
DockWidget* presetModel = new DockWidget(tr("preset models"), 0);
|
||||
@ -72,6 +72,7 @@ void MainWindow::InitUI() {
|
||||
presetModel->setObjectName("Dock.PresetModelPanel");
|
||||
presetModelPanel_ = new PresetModelPanel(0);
|
||||
presetModelPanel_->AttachDock(presetModel);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, presetModel);
|
||||
m_mapDockWidget.insert("PresetModelPanel", presetModel);
|
||||
|
||||
DockWidget* attribte = new DockWidget(tr("attribte"), 0);
|
||||
@ -96,36 +97,34 @@ void MainWindow::InitUI() {
|
||||
addDockWidget(Qt::LeftDockWidgetArea, viewDock);
|
||||
m_mapDockWidget.insert("MainView", viewDock);
|
||||
|
||||
addDockWidget(Qt::LeftDockWidgetArea, model);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, presetModel);
|
||||
splitDockWidget(model, viewDock, Qt::Horizontal);
|
||||
|
||||
// 将预制模型面板与模型浏览器标签化
|
||||
tabifyDockWidget(model, presetModel);
|
||||
|
||||
QString wavePath ="", speedPath = "", rdPath = "", matlabParam="";
|
||||
if (WorkSpaceManager::Get().GetCurrent())
|
||||
{
|
||||
if (!WorkSpaceManager::Get().GetCurrent()->GetWavePath().isEmpty())
|
||||
{
|
||||
wavePath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetWavePath();
|
||||
}
|
||||
//QString wavePath ="", speedPath = "", rdPath = "", matlabParam="";
|
||||
//if (WorkSpaceManager::Get().GetCurrent())
|
||||
//{
|
||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetWavePath().isEmpty())
|
||||
// {
|
||||
// wavePath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetWavePath();
|
||||
// }
|
||||
|
||||
if (!WorkSpaceManager::Get().GetCurrent()->GetReportPath().isEmpty())
|
||||
{
|
||||
speedPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetReportPath();
|
||||
}
|
||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetReportPath().isEmpty())
|
||||
// {
|
||||
// speedPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetReportPath();
|
||||
// }
|
||||
|
||||
if (!WorkSpaceManager::Get().GetCurrent()->GetRDPath().isEmpty())
|
||||
{
|
||||
rdPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetRDPath();
|
||||
}
|
||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetRDPath().isEmpty())
|
||||
// {
|
||||
// rdPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetRDPath();
|
||||
// }
|
||||
|
||||
if (!WorkSpaceManager::Get().GetCurrent()->GetMatlabParam().isEmpty())
|
||||
{
|
||||
matlabParam = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetMatlabParam();
|
||||
}
|
||||
}
|
||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetMatlabParam().isEmpty())
|
||||
// {
|
||||
// matlabParam = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetMatlabParam();
|
||||
// }
|
||||
//}
|
||||
|
||||
//DockWidget* fitCurveDock = new DockWidget(tr("Wave Curve"), 0);
|
||||
//fitCurveDock->SetDockWidgetTitleBar(new DockTitleBar(fitCurveDock));
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>847</width>
|
||||
<width>1123</width>
|
||||
<height>58</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -16,6 +16,12 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="psbPlay">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>play</string>
|
||||
</property>
|
||||
@ -23,6 +29,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="psbStop">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>stop</string>
|
||||
</property>
|
||||
@ -101,6 +113,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="psbUp">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>up</string>
|
||||
</property>
|
||||
@ -108,6 +126,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="psbDown">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>down</string>
|
||||
</property>
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#include "ui/Menu/SimuRunMenu.h"
|
||||
#include "ui/Layout/AddParamSetting.h"
|
||||
#include "ui/DockWidget.h"
|
||||
#include "ui/DockTitleBar.h"
|
||||
#include "ui/MainWindow.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
@ -13,6 +16,7 @@ SimuRunMenu::SimuRunMenu(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_pParam = NULL;
|
||||
m_mainWindow = NULL;
|
||||
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setContentsMargins(9, 0, 0, 0);
|
||||
@ -122,9 +126,9 @@ void SimuRunMenu::CreateMatlabParam()
|
||||
|
||||
QToolButton *pBtn = new QToolButton();
|
||||
pBtn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
pBtn->setText(tr("MatlabParam"));
|
||||
pBtn->setText(QString::fromLocal8Bit("参数设置"));
|
||||
pBtn->setIcon(QIcon(":/res/default/menu_setting_restore.png"));
|
||||
pBtn->setToolTip(tr("MatlabParam"));
|
||||
pBtn->setToolTip(QString::fromLocal8Bit("设置Matlab的输入参数"));
|
||||
|
||||
connect(pBtn, SIGNAL(clicked()), this, SLOT(slotHandleMatlabParam()));
|
||||
|
||||
@ -180,11 +184,28 @@ void SimuRunMenu::slotHandleMatlabParam()
|
||||
{
|
||||
if (!m_pParam)
|
||||
{
|
||||
m_pParam = new DockWidget(m_mainWindow);
|
||||
m_pParam->setAllowedAreas(Qt::NoDockWidgetArea);
|
||||
|
||||
DockTitleBar* titleBar = new DockTitleBar(m_pParam);
|
||||
titleBar->SetFloatVisible(false);
|
||||
titleBar->SetMaxVisible(false);
|
||||
m_pParam->SetDockWidgetTitleBar(titleBar);
|
||||
m_pParam->setWindowTitle(QString::fromLocal8Bit("参数设置"));
|
||||
|
||||
QString strDir = WorkSpaceManager::Get().GetCurrent()->GetDir();
|
||||
m_pParam = new AddParamSetting(strDir);
|
||||
AddParamSetting *pParam = new AddParamSetting(strDir);
|
||||
m_pParam->setWidget(pParam);
|
||||
|
||||
m_pParam->resize(1000, 600);
|
||||
}
|
||||
|
||||
m_pParam->setWindowTitle(tr("MatlabParam"));
|
||||
m_pParam->setFloating(true);
|
||||
m_pParam->show();
|
||||
}
|
||||
}
|
||||
|
||||
void SimuRunMenu::SetMainWindow(MainWindow* mainWindow)
|
||||
{
|
||||
m_mainWindow = mainWindow;
|
||||
}
|
||||
@ -5,7 +5,8 @@
|
||||
#include "workspace/CommandManager.h"
|
||||
#include "workspace/CommandExecutor.h"
|
||||
|
||||
class AddParamSetting;
|
||||
class DockWidget;
|
||||
class MainWindow;
|
||||
|
||||
class SimuRunMenu : public QWidget {
|
||||
Q_OBJECT
|
||||
@ -14,6 +15,8 @@ public:
|
||||
SimuRunMenu(QWidget *parent = nullptr);
|
||||
~SimuRunMenu();
|
||||
|
||||
void SetMainWindow(MainWindow* mainWindow);
|
||||
|
||||
private slots:
|
||||
void OnWorkspaceChanged(class WorkSpace* ws);
|
||||
|
||||
@ -30,5 +33,6 @@ private:
|
||||
void ClearAllBtn();
|
||||
|
||||
private:
|
||||
AddParamSetting *m_pParam;
|
||||
DockWidget *m_pParam;
|
||||
MainWindow* m_mainWindow;
|
||||
};
|
||||
|
||||
@ -317,6 +317,7 @@ void CurvePanel::initQChartView() {
|
||||
|
||||
curveChart = new QChart();
|
||||
curveChart->setTheme(QChart::ChartThemeBlueIcy);
|
||||
curveChart->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
curveChart->setBackgroundRoundness(0);
|
||||
curveChartView->setChart(curveChart);
|
||||
|
||||
@ -331,9 +332,10 @@ void CurvePanel::initQChartView() {
|
||||
|
||||
curveChartView->setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
QHBoxLayout* pLayout = new QHBoxLayout(this);
|
||||
pLayout->setContentsMargins(0, 0, 0, 0);
|
||||
pLayout->addWidget(curveChartView);
|
||||
QHBoxLayout* mainLayout = new QHBoxLayout(this);
|
||||
mainLayout->setContentsMargins(0, 0, 0, 0);
|
||||
mainLayout->addWidget(curveChartView);
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
void CurvePanel::OnDataPanelUpdated(FileEntryCurve* fileEntry) {
|
||||
|
||||
@ -140,6 +140,8 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
|
||||
m_mapLamp.insert(strKey, pLampLab);
|
||||
}
|
||||
}
|
||||
pMainLyt->setContentsMargins(5, 0, 5, 0);
|
||||
setLayout(pMainLyt);
|
||||
|
||||
while (!file.atEnd())
|
||||
{
|
||||
|
||||
@ -83,6 +83,7 @@ void SurfacePanel::InitUI()
|
||||
containerHandle->setAttribute(Qt::WA_OpaquePaintEvent, true);
|
||||
containerHandle->setAttribute(Qt::WA_NoSystemBackground, false);
|
||||
containerHandle->setUpdatesEnabled(false);
|
||||
containerHandle->setMinimumHeight(100);
|
||||
|
||||
m_pSeries->setBaseColor(Qt::green);
|
||||
m_pSeries->setColorStyle(Q3DTheme::ColorStyleUniform);
|
||||
|
||||
@ -48,7 +48,7 @@ void PresetModelPanel::AttachDock(DockWidget* dockWidget)
|
||||
void PresetModelPanel::InitUI()
|
||||
{
|
||||
mainLayout_ = new QVBoxLayout(this);
|
||||
mainLayout_->setContentsMargins(5, 5, 5, 5);
|
||||
mainLayout_->setContentsMargins(0, 0, 0, 0);
|
||||
mainLayout_->setSpacing(5);
|
||||
|
||||
toolBox_ = new QToolBox(this);
|
||||
@ -70,10 +70,10 @@ QWidget* PresetModelPanel::CreateShipPage()
|
||||
QVBoxLayout* layout = new QVBoxLayout(page);
|
||||
|
||||
QStringList shipModels = {
|
||||
"Destroyer",
|
||||
"Aircraft Carrier",
|
||||
"Frigate",
|
||||
"Submarine"
|
||||
tr("Destroyer"),
|
||||
tr("Aircraft Carrier"),
|
||||
tr("Frigate"),
|
||||
tr("Submarine")
|
||||
};
|
||||
|
||||
shipList_ = CreateModelList(page, "Ship", shipModels);
|
||||
@ -88,10 +88,10 @@ QWidget* PresetModelPanel::CreateSatellitePage()
|
||||
QVBoxLayout* layout = new QVBoxLayout(page);
|
||||
|
||||
QStringList satelliteModels = {
|
||||
"Geostationary Satellite",
|
||||
"Communication Satellite",
|
||||
"Weather Satellite",
|
||||
"Navigation Satellite"
|
||||
tr("Geostationary Satellite"),
|
||||
tr("Communication Satellite"),
|
||||
tr("Weather Satellite"),
|
||||
tr("Navigation Satellite")
|
||||
};
|
||||
|
||||
satelliteList_ = CreateModelList(page, "Satellite", satelliteModels);
|
||||
@ -106,10 +106,10 @@ QWidget* PresetModelPanel::CreateMissilePage()
|
||||
QVBoxLayout* layout = new QVBoxLayout(page);
|
||||
|
||||
QStringList missileModels = {
|
||||
"Hypersonic Missile",
|
||||
"Cruise Missile",
|
||||
"Ballistic Missile",
|
||||
"Anti-Ship Missile"
|
||||
tr("Hypersonic Missile"),
|
||||
tr("Cruise Missile"),
|
||||
tr("Ballistic Missile"),
|
||||
tr("Anti-Ship Missile")
|
||||
};
|
||||
|
||||
missileList_ = CreateModelList(page, "Missile", missileModels);
|
||||
@ -124,10 +124,10 @@ QWidget* PresetModelPanel::CreateJammerPage()
|
||||
QVBoxLayout* layout = new QVBoxLayout(page);
|
||||
|
||||
QStringList jammerModels = {
|
||||
"Passive Jammer",
|
||||
"Active Jammer",
|
||||
"Electronic Warfare Pod",
|
||||
"Decoy System"
|
||||
tr("Passive Jammer"),
|
||||
tr("Active Jammer"),
|
||||
tr("Electronic Warfare Pod"),
|
||||
tr("Decoy System")
|
||||
};
|
||||
|
||||
jammerList_ = CreateModelList(page, "Jammer", jammerModels);
|
||||
|
||||
@ -77,12 +77,18 @@ bool WorkSpaceXMLWrite::SaveTimeStep(tinyxml2::XMLElement* scene) {
|
||||
}
|
||||
|
||||
bool WorkSpaceXMLWrite::SaveLamp(tinyxml2::XMLElement* scene) {
|
||||
tinyxml2::XMLElement* lamp = scene->InsertNewChildElement("lamp");
|
||||
const QString lampPath = workSpace_->GetLampStatus()->GetPath();
|
||||
LampStatus *pLampStatus = workSpace_->GetLampStatus();
|
||||
if (pLampStatus)
|
||||
{
|
||||
const QString lampPath = pLampStatus->GetPath();
|
||||
if (!lampPath.isEmpty()) {
|
||||
tinyxml2::XMLElement* lamp = scene->InsertNewChildElement("lamp");
|
||||
lamp->SetAttribute("path", lampPath.toStdString().c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool WorkSpaceXMLWrite::SaveCommond(tinyxml2::XMLElement* scene) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user