modify worksapce mansger onframe
This commit is contained in:
parent
63eeca0086
commit
8f0a32869e
@ -23,6 +23,10 @@ QString Application::GetWorkSpacePath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
QString Application::GetBinPath() {
|
||||
return applicationDirPath();
|
||||
}
|
||||
|
||||
void Application::Init() {
|
||||
Singleton<MeshManager>::Create(this);
|
||||
Singleton<RecourceHelper>::Create(this);
|
||||
@ -30,6 +34,13 @@ void Application::Init() {
|
||||
Singleton<WorkSpaceManager>::Create(this);
|
||||
Singleton<NetDriver>::Create(this);
|
||||
//Singleton<PythonModule>::Create(this);
|
||||
|
||||
connect(&timer_, &QTimer::timeout, this, &Application::OnTimeout);
|
||||
timer_.start(1000 / 60); // 60 FPS
|
||||
}
|
||||
|
||||
void Application::OnTimeout() {
|
||||
WorkSpaceManager::Get().OnFrame();
|
||||
}
|
||||
|
||||
void Application::Uninit() {
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
class Application : public QApplication {
|
||||
Q_OBJECT
|
||||
|
||||
@ -10,7 +12,14 @@ public:
|
||||
~Application() override;
|
||||
|
||||
static QString GetWorkSpacePath();
|
||||
static QString GetBinPath();
|
||||
void Uninit();
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
private:
|
||||
void OnTimeout();
|
||||
|
||||
protected:
|
||||
QTimer timer_;
|
||||
};
|
@ -14,12 +14,14 @@
|
||||
#include <osgViewer/ViewerEventHandlers>
|
||||
|
||||
#include "config.h"
|
||||
#include "app/Application.h"
|
||||
#include "common/SpdLogger.h"
|
||||
#include "common/RecourceHelper.h"
|
||||
#include "scene/ScopedTimer.h"
|
||||
#include "viewer/OsgView.h"
|
||||
#include "viewer/OsgCameraManipulator.h"
|
||||
#include "scene/ScaleBarHandler.h"
|
||||
#include "utils/FileUtils.h"
|
||||
|
||||
const osgEarth::SpatialReference* g_srs_{ nullptr };
|
||||
|
||||
@ -107,7 +109,14 @@ const osgEarth::SpatialReference* OEScene::GetSrs() {
|
||||
}
|
||||
|
||||
void OEScene::Init() {
|
||||
std::string earthPath = "D:/Project/DYT/Tool/TritonSample/TritonSample/triton.earth";
|
||||
QString earthFile = QString("%1/earth/triton.earth").arg(Application::GetBinPath());
|
||||
if (!FileUtils::IsExist(earthFile)) {
|
||||
LOG_ERROR("earth file not found: {}", earthFile.toStdString());
|
||||
return;
|
||||
}
|
||||
|
||||
std::string earthPath(earthFile.toLocal8Bit().constData());
|
||||
LOG_INFO("Loading earth file from: {}", earthPath);
|
||||
// earthRootNode_ = osgDB::readNodeFile("triton.earth");
|
||||
earthRootNode_ = osgDB::readNodeFile(earthPath);
|
||||
dyt_check(nullptr != earthRootNode_);
|
||||
|
@ -418,12 +418,12 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/chartPlot/FitCurveDialog.cpp" line="772"/>
|
||||
<location filename="../ui/chartPlot/FitCurveDialog.cpp" line="773"/>
|
||||
<source>2D Curve</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/chartPlot/FitCurveDialog.cpp" line="776"/>
|
||||
<location filename="../ui/chartPlot/FitCurveDialog.cpp" line="777"/>
|
||||
<source>2D(y(lg)) Curve</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -196,6 +196,7 @@ void SignalIndicatorLampUI::InitLamp(const QString& strFile)
|
||||
|
||||
void SignalIndicatorLampUI::slotUpdateTime(double dTime)
|
||||
{
|
||||
return;
|
||||
if (dTime < 1)
|
||||
{
|
||||
return;
|
||||
@ -240,6 +241,7 @@ void SignalIndicatorLampUI::OnWorkSpaceChanged(WorkSpace* worksapce) {
|
||||
}
|
||||
|
||||
connect(worksapce, &WorkSpace::TimestepChanged, this, &SignalIndicatorLampUI::OnTimestepChanged);
|
||||
InitLamp(worksapce->GetRDPath());
|
||||
}
|
||||
|
||||
void SignalIndicatorLampUI::OnTimestepChanged(Timestep* timestep) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ChartPlotMenu.h"
|
||||
#include "ChartPlotMenu.h"
|
||||
|
||||
#include "../Matlab/MatlabObject.h"
|
||||
#include "../../common/RecourceHelper.h"
|
||||
|
@ -239,6 +239,10 @@ void TargetListWgt::OnWorkSpaceChanged(WorkSpace* worksapce) {
|
||||
}
|
||||
|
||||
connect(worksapce, &WorkSpace::TimestepChanged, this, &TargetListWgt::OnTimestepChanged);
|
||||
Timestep* timestep = worksapce->GetTimestep();
|
||||
if (nullptr != timestep) {
|
||||
InitFile(worksapce->GetReportPath(), timestep->GetSteps().size());
|
||||
}
|
||||
}
|
||||
|
||||
void TargetListWgt::OnTimestepChanged(Timestep* timestep) {
|
||||
@ -247,6 +251,11 @@ void TargetListWgt::OnTimestepChanged(Timestep* timestep) {
|
||||
return;
|
||||
}
|
||||
connect(timestep, SIGNAL(TimeChanged(double)), this, SLOT(slotUpdateTime(double)));
|
||||
|
||||
auto worksapce = timestep->GetWorkSpace();
|
||||
if (nullptr != worksapce) {
|
||||
InitFile(worksapce->GetReportPath(), timestep->GetSteps().size());
|
||||
}
|
||||
}
|
||||
|
||||
void TargetListWgt::slotTimeChanged(double dTime)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "fitcurvedialog.h"
|
||||
#include "fitcurvedialog.h"
|
||||
|
||||
#include <QLogValueAxis>
|
||||
|
||||
@ -31,21 +31,21 @@ FitCurveDialog::FitCurveDialog(int iType, QWidget* parent) :
|
||||
}
|
||||
|
||||
void FitCurveDialog::initQChartView() {
|
||||
//创建图表框架
|
||||
//创建图表框架
|
||||
curveChartView = new FitCurveChartView(this);
|
||||
curveChartView->setMaximumWidth(1730);
|
||||
curveChartView->setMinimumHeight(480);
|
||||
|
||||
curveChart = new QChart();
|
||||
curveChart->setTheme(QChart::ChartThemeBlueIcy);
|
||||
//curveChart->setContentsMargins(0, 0, 0, 0); //设置外边界全部为0, 根据自己实际情况设置
|
||||
//curveChart->setMargins(QMargins(5, -30, 5, 10)); //设置内边界, 根据自己实际情况设置
|
||||
curveChart->setBackgroundRoundness(0); //设置表格边框圆角半径
|
||||
//curveChart->setContentsMargins(0, 0, 0, 0); //设置外边界全部为0, 根据自己实际情况设置
|
||||
//curveChart->setMargins(QMargins(5, -30, 5, 10)); //设置内边界, 根据自己实际情况设置
|
||||
curveChart->setBackgroundRoundness(0); //设置表格边框圆角半径
|
||||
curveChartView->setChart(curveChart);
|
||||
|
||||
//QObject::connect(fitPointsSeriesS, &QSplineSeries::clicked, [=](const QPointF& point)mutable {
|
||||
// QPointF tempPoint;
|
||||
// QVector<QPointF> tempList(fitPointsSeriesS->pointsVector()); //复制曲线中的数据进行计算, 因为直接使用会导致卡顿
|
||||
// QVector<QPointF> tempList(fitPointsSeriesS->pointsVector()); //复制曲线中的数据进行计算, 因为直接使用会导致卡顿
|
||||
// int tempX = qRound(point.x());
|
||||
// int tempY = -999;
|
||||
// for (int i = 0; i < tempList.size(); i++) {
|
||||
@ -65,12 +65,12 @@ void FitCurveDialog::initQChartView() {
|
||||
// }
|
||||
// });
|
||||
|
||||
//创建坐标轴
|
||||
//创建坐标轴
|
||||
m_pAxisX = new QValueAxis;
|
||||
m_pAxisX->setRange(0, 10);
|
||||
m_pAxisX->setTickCount(21);
|
||||
m_pAxisX->setLabelFormat("%d");
|
||||
m_pAxisX->setLabelsAngle(-90); //坐标刻度文字显示角度
|
||||
m_pAxisX->setLabelsAngle(-90); //坐标刻度文字显示角度
|
||||
curveChart->addAxis(m_pAxisX, Qt::AlignBottom);
|
||||
|
||||
//xGuideSeries->attachAxis(m_pAxisX);
|
||||
@ -98,13 +98,13 @@ void FitCurveDialog::initQChartView() {
|
||||
curveChart->addAxis(m_pLgAxisY, Qt::AlignLeft);
|
||||
}
|
||||
|
||||
// axisX->setGridLineVisible(false); //隐藏背景网格X轴框线
|
||||
// axisY->setGridLineVisible(false); //隐藏背景网格Y轴框线
|
||||
// axisX->setGridLineVisible(false); //隐藏背景网格X轴框线
|
||||
// axisY->setGridLineVisible(false); //隐藏背景网格Y轴框线
|
||||
/*curveChart->legend()->markers()[0]->setVisible(false);
|
||||
curveChart->legend()->markers()[1]->setVisible(false);
|
||||
curveChart->legend()->markers()[2]->setVisible(false);
|
||||
curveChart->legend()->markers()[3]->setVisible(false);*/
|
||||
curveChartView->setRenderHint(QPainter::Antialiasing); //除锯齿
|
||||
curveChartView->setRenderHint(QPainter::Antialiasing); //除锯齿
|
||||
connect(curveChartView, &FitCurveChartView::signalMouseEvent, this, &FitCurveDialog::theSlotMouseEvent);
|
||||
connect(curveChartView, &FitCurveChartView::signalWheelEvent, this, &FitCurveDialog::theSlotWheelEvent);
|
||||
|
||||
@ -117,12 +117,12 @@ void FitCurveDialog::initQChartView() {
|
||||
}
|
||||
|
||||
void FitCurveDialog::theSlotMouseEvent(int eventId, QMouseEvent* event) {
|
||||
if (eventId == 0) { //单击按下
|
||||
if (eventId == 0) { //单击按下
|
||||
isPressed = true;
|
||||
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
|
||||
pressedPoint = mouseEvent->pos();
|
||||
}
|
||||
else if (eventId == 1) { //鼠标移动
|
||||
else if (eventId == 1) { //鼠标移动
|
||||
if (isPressed) {
|
||||
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
|
||||
curveChart->scroll(-(mouseEvent->pos().x() - pressedPoint.x()) / 10,
|
||||
@ -130,10 +130,10 @@ void FitCurveDialog::theSlotMouseEvent(int eventId, QMouseEvent* event) {
|
||||
updateXYGuideLine();
|
||||
}
|
||||
}
|
||||
else if (eventId == 2) { //单击抬起
|
||||
else if (eventId == 2) { //单击抬起
|
||||
isPressed = false;
|
||||
}
|
||||
else if (eventId == 3) { //双击
|
||||
else if (eventId == 3) { //双击
|
||||
resetZoomAndScroll();
|
||||
updateXYGuideLine();
|
||||
}
|
||||
@ -153,24 +153,24 @@ void FitCurveDialog::theSlotWheelEvent(QWheelEvent* event) {
|
||||
|
||||
void FitCurveDialog::slotAddSeries(QVariant varSeriesData)
|
||||
{
|
||||
// 数据无效
|
||||
// 数据无效
|
||||
if (!varSeriesData.isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QString strName = varSeriesData.toMap().value("Name").toString(); // 曲线名称
|
||||
QVariantList varCurDataList = varSeriesData.toMap().value("Data").toList(); // 数据
|
||||
int iYType = varSeriesData.toMap().value("yType").toInt(); // y轴类型
|
||||
QColor color = varSeriesData.toMap().value("Color").value<QColor>(); // 曲线颜色
|
||||
QString strXName = varSeriesData.toMap().value("xTitle").toString(); // x轴名称
|
||||
QString strYName = varSeriesData.toMap().value("yTitle").toString(); // y轴名称
|
||||
QString strZName = varSeriesData.toMap().value("zTitle").toString(); // z轴名称
|
||||
int iCurveType = varSeriesData.toMap().value("curveType").toInt(); // 曲线类型
|
||||
int iID = varSeriesData.toMap().value("ID").toInt(); // y轴类型
|
||||
bool bAdd = varSeriesData.toMap().value("Add").toBool(); // 曲线名称
|
||||
QString strName = varSeriesData.toMap().value("Name").toString(); // 曲线名称
|
||||
QVariantList varCurDataList = varSeriesData.toMap().value("Data").toList(); // 数据
|
||||
int iYType = varSeriesData.toMap().value("yType").toInt(); // y轴类型
|
||||
QColor color = varSeriesData.toMap().value("Color").value<QColor>(); // 曲线颜色
|
||||
QString strXName = varSeriesData.toMap().value("xTitle").toString(); // x轴名称
|
||||
QString strYName = varSeriesData.toMap().value("yTitle").toString(); // y轴名称
|
||||
QString strZName = varSeriesData.toMap().value("zTitle").toString(); // z轴名称
|
||||
int iCurveType = varSeriesData.toMap().value("curveType").toInt(); // 曲线类型
|
||||
int iID = varSeriesData.toMap().value("ID").toInt(); // y轴类型
|
||||
bool bAdd = varSeriesData.toMap().value("Add").toBool(); // 曲线名称
|
||||
|
||||
if (iCurveType == 3) // 非二维曲线
|
||||
if (iCurveType == 3) // 非二维曲线
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -180,8 +180,8 @@ void FitCurveDialog::slotAddSeries(QVariant varSeriesData)
|
||||
if (m_seriesIDMap.contains(iID))
|
||||
{
|
||||
pSeries = m_seriesIDMap.value(iID);
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
pSeries->setUseOpenGL(true);
|
||||
}
|
||||
else
|
||||
@ -192,38 +192,38 @@ void FitCurveDialog::slotAddSeries(QVariant varSeriesData)
|
||||
}
|
||||
|
||||
pSeries = new QSplineSeries(this);
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
pSeries->setUseOpenGL(true);
|
||||
|
||||
bNew = true;
|
||||
}
|
||||
|
||||
m_pAxisX->setTitleText(strXName); // 设置x轴名称
|
||||
m_pAxisX->setTitleText(strXName); // 设置x轴名称
|
||||
|
||||
// xy轴的范围
|
||||
m_iXMax = m_pAxisX->max(); // 当前x轴的最大值
|
||||
m_iXMin = m_pAxisX->min(); // 当前x轴的最小值
|
||||
// xy轴的范围
|
||||
m_iXMax = m_pAxisX->max(); // 当前x轴的最大值
|
||||
m_iXMin = m_pAxisX->min(); // 当前x轴的最小值
|
||||
|
||||
if (0 == iYType) // 一般曲线
|
||||
if (0 == iYType) // 一般曲线
|
||||
{
|
||||
m_iYMax = m_pAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pAxisY->min(); // 当前y轴的最大值
|
||||
m_iYMax = m_pAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pAxisY->min(); // 当前y轴的最大值
|
||||
}
|
||||
else // 对数曲线
|
||||
else // 对数曲线
|
||||
{
|
||||
m_iYMax = m_pLgAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pLgAxisY->min(); // 当前y轴的最大值
|
||||
m_iYMax = m_pLgAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pLgAxisY->min(); // 当前y轴的最大值
|
||||
}
|
||||
|
||||
// 曲线数据
|
||||
// 曲线数据
|
||||
QVector<QPointF> listKey;
|
||||
for (size_t i = 0; i < varCurDataList.size(); i++)
|
||||
{
|
||||
QPointF ptKey = varCurDataList[i].toPointF();
|
||||
listKey.push_back(ptKey);
|
||||
|
||||
// 更新x轴最大值最小值
|
||||
// 更新x轴最大值最小值
|
||||
if (m_iXMin > ptKey.x())
|
||||
{
|
||||
m_iXMin = ptKey.x();
|
||||
@ -245,7 +245,7 @@ void FitCurveDialog::slotAddSeries(QVariant varSeriesData)
|
||||
}
|
||||
}
|
||||
|
||||
// 更新x轴范围
|
||||
// 更新x轴范围
|
||||
m_pAxisX->setRange(m_iXMin, m_iXMax);
|
||||
pSeries->replace(listKey);
|
||||
|
||||
@ -254,7 +254,7 @@ void FitCurveDialog::slotAddSeries(QVariant varSeriesData)
|
||||
curveChart->addSeries(pSeries);
|
||||
}
|
||||
|
||||
// 更新y轴范围
|
||||
// 更新y轴范围
|
||||
if (iYType == 0)
|
||||
{
|
||||
m_pAxisY->setRange(m_iYMin, m_iYMax);
|
||||
@ -286,7 +286,7 @@ void FitCurveDialog::slotAddSeries(QVariant varSeriesData)
|
||||
|
||||
//QObject::connect(fitPointsSeriesS, &QSplineSeries::clicked, [=](const QPointF& point)mutable {
|
||||
// QPointF tempPoint;
|
||||
// QVector<QPointF> tempList(fitPointsSeriesS->pointsVector()); //复制曲线中的数据进行计算, 因为直接使用会导致卡顿
|
||||
// QVector<QPointF> tempList(fitPointsSeriesS->pointsVector()); //复制曲线中的数据进行计算, 因为直接使用会导致卡顿
|
||||
// int tempX = qRound(point.x());
|
||||
// int tempY = -999;
|
||||
// for (int i = 0; i < tempList.size(); i++) {
|
||||
@ -388,14 +388,14 @@ void FitCurveDialog::slotUpdateTime(double dTime)
|
||||
|
||||
std::vector<std::vector<float>> batch = m_vecWavePoint[dTime - 1];
|
||||
|
||||
m_pAxisX->setTitleText("x"); // 设置x轴名称
|
||||
m_pAxisX->setTitleText("x"); // 设置x轴名称
|
||||
|
||||
// xy轴的范围
|
||||
m_iXMax = m_pAxisX->max(); // 当前x轴的最大值
|
||||
m_iXMin = m_pAxisX->min(); // 当前x轴的最小值
|
||||
// xy轴的范围
|
||||
m_iXMax = m_pAxisX->max(); // 当前x轴的最大值
|
||||
m_iXMin = m_pAxisX->min(); // 当前x轴的最小值
|
||||
|
||||
m_iYMax = m_pAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pAxisY->min(); // 当前y轴的最大值
|
||||
m_iYMax = m_pAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pAxisY->min(); // 当前y轴的最大值
|
||||
|
||||
|
||||
m_iXMin = 0;
|
||||
@ -416,14 +416,14 @@ void FitCurveDialog::slotUpdateTime(double dTime)
|
||||
bNew = true;
|
||||
}
|
||||
|
||||
QString strName = QString::fromLocal8Bit("目标") + QString::number(i+1);
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
QString strName = QString::fromLocal8Bit("目标") + QString::number(i+1);
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
|
||||
if (bNew)
|
||||
{
|
||||
qsrand(QTime(0, 0, 0).secsTo(QTime::currentTime())); // 初始化随机数生成器
|
||||
qsrand(QTime(0, 0, 0).secsTo(QTime::currentTime())); // 初始化随机数生成器
|
||||
QColor color(QRandomGenerator::global()->bounded(255), QRandomGenerator::global()->bounded(255), QRandomGenerator::global()->bounded(255));
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
}
|
||||
|
||||
pSeries->setUseOpenGL(true);
|
||||
@ -467,7 +467,7 @@ void FitCurveDialog::slotUpdateTime(double dTime)
|
||||
pSeries->attachAxis(m_pAxisY);
|
||||
}
|
||||
|
||||
m_pAxisY->setTitleText(QString::fromLocal8Bit("幅值"));
|
||||
m_pAxisY->setTitleText(QString::fromLocal8Bit("幅值"));
|
||||
|
||||
if (bNew)
|
||||
{
|
||||
@ -497,15 +497,15 @@ void FitCurveDialog::slotUpdateTime(double dTime)
|
||||
|
||||
std::vector<std::vector<float>> batch = m_vecReportPoint[dTime - 1];
|
||||
|
||||
m_pAxisX->setTitleText(QString::fromLocal8Bit("距离")); // 设置x轴名称
|
||||
m_pAxisX->setTitleText(QString::fromLocal8Bit("距离")); // 设置x轴名称
|
||||
|
||||
|
||||
// xy轴的范围
|
||||
m_iXMax = m_pAxisX->max(); // 当前x轴的最大值
|
||||
m_iXMin = m_pAxisX->min(); // 当前x轴的最小值
|
||||
// xy轴的范围
|
||||
m_iXMax = m_pAxisX->max(); // 当前x轴的最大值
|
||||
m_iXMin = m_pAxisX->min(); // 当前x轴的最小值
|
||||
|
||||
m_iYMax = m_pAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pAxisY->min(); // 当前y轴的最大值
|
||||
m_iYMax = m_pAxisY->max(); // 当前y轴的最大值
|
||||
m_iYMin = m_pAxisY->min(); // 当前y轴的最大值
|
||||
|
||||
for (int i = 0; i < batch.size(); i++)
|
||||
{
|
||||
@ -522,14 +522,14 @@ void FitCurveDialog::slotUpdateTime(double dTime)
|
||||
bNew = true;
|
||||
}
|
||||
|
||||
QString strName = QString::fromLocal8Bit("目标") + QString::number(i + 1);
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
QString strName = QString::fromLocal8Bit("目标") + QString::number(i + 1);
|
||||
pSeries->setName(strName); // 设置曲线名称
|
||||
|
||||
if (bNew)
|
||||
{
|
||||
qsrand(QTime(0, 0, 0).secsTo(QTime::currentTime())); // 初始化随机数生成器
|
||||
qsrand(QTime(0, 0, 0).secsTo(QTime::currentTime())); // 初始化随机数生成器
|
||||
QColor color(QRandomGenerator::global()->bounded(255), QRandomGenerator::global()->bounded(255), QRandomGenerator::global()->bounded(255));
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
pSeries->setColor(color); // 设置曲线颜色
|
||||
}
|
||||
|
||||
pSeries->setUseOpenGL(true);
|
||||
@ -575,7 +575,7 @@ void FitCurveDialog::slotUpdateTime(double dTime)
|
||||
pSeries->attachAxis(m_pAxisY);
|
||||
}
|
||||
|
||||
m_pAxisY->setTitleText(QString::fromLocal8Bit("速度"));
|
||||
m_pAxisY->setTitleText(QString::fromLocal8Bit("速度"));
|
||||
|
||||
if (bNew)
|
||||
{
|
||||
@ -648,7 +648,7 @@ void FitCurveDialog::ParseWave(const QString& strFile, std::vector<std::vector<s
|
||||
{
|
||||
if (strFile.isEmpty())
|
||||
{
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请检查数据Wave文件路径!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请检查数据Wave文件路径!"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -690,7 +690,7 @@ void FitCurveDialog::ParseReport(const QString& strFile, std::vector<std::vector
|
||||
{
|
||||
if (strFile.isEmpty())
|
||||
{
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请检查数据Report文件路径!"));
|
||||
QMessageBox::information(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("请检查数据Report文件路径!"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -709,7 +709,7 @@ void FitCurveDialog::ParseReport(const QString& strFile, std::vector<std::vector
|
||||
std::vector<float> vecLine;
|
||||
for (size_t i = 0; i < listLine.size(); i++)
|
||||
{
|
||||
if (12 == i || i == 13) // 距离、速度
|
||||
if (12 == i || i == 13) // 距离、速度
|
||||
{
|
||||
vecLine.push_back(listLine[i].toFloat());
|
||||
}
|
||||
@ -740,6 +740,7 @@ void FitCurveDialog::OnWorkSpaceChanged(WorkSpace* worksapce) {
|
||||
}
|
||||
|
||||
connect(worksapce, &WorkSpace::TimestepChanged, this, &FitCurveDialog::OnTimestepChanged);
|
||||
InitWaveFile(worksapce->GetWavePath());
|
||||
}
|
||||
|
||||
void FitCurveDialog::OnTimestepChanged(Timestep* timestep) {
|
||||
|
@ -287,6 +287,7 @@ void SurfaceDialog::OnWorkSpaceChanged(WorkSpace* worksapce) {
|
||||
}
|
||||
|
||||
connect(worksapce, &WorkSpace::TimestepChanged, this, &SurfaceDialog::OnTimestepChanged);
|
||||
InitRD(worksapce->GetRDPath());
|
||||
}
|
||||
|
||||
void SurfaceDialog::OnTimestepChanged(Timestep* timestep) {
|
||||
|
@ -178,7 +178,6 @@ void OsgWidget::resizeEvent(QResizeEvent* event) {
|
||||
}
|
||||
|
||||
void OsgWidget::paintEvent(QPaintEvent*) {
|
||||
WorkSpaceManager::Get().OnFrame();
|
||||
frame();
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,10 @@ public:
|
||||
void Up();
|
||||
void Down();
|
||||
|
||||
WorkSpace* GetWorkSpace() const {
|
||||
return workSpace_;
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void StatusChanged(int);
|
||||
void StepChanged(double);
|
||||
|
Loading…
Reference in New Issue
Block a user