Compare commits
2 Commits
1f0b878dcb
...
167968f78a
| Author | SHA1 | Date | |
|---|---|---|---|
| 167968f78a | |||
| d05575bdc9 |
|
|
@ -623,6 +623,24 @@ void MainWindow::s_showView()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString strSlfName = "";
|
||||||
|
QString strWellName = "";
|
||||||
|
QString strLeft = m_projectWidgets->getLeftTreeString();
|
||||||
|
if (strLeft.length() > 0)
|
||||||
|
{
|
||||||
|
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
||||||
|
if (list.size() > 3)
|
||||||
|
{
|
||||||
|
QFileInfo finfo(list[0]);
|
||||||
|
strSlfName = finfo.fileName();
|
||||||
|
strWellName = list[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::warning(this, "提示", "请先选中待处理井次!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Logdata
|
//Logdata
|
||||||
QString folderPath;
|
QString folderPath;
|
||||||
folderPath = GetLogdataPath();
|
folderPath = GetLogdataPath();
|
||||||
|
|
@ -662,6 +680,8 @@ void MainWindow::s_showView()
|
||||||
m_centerWidgets->addTab(mainSplitter, fileName);
|
m_centerWidgets->addTab(mainSplitter, fileName);
|
||||||
|
|
||||||
MainWindowCurve *mainWindowCurve = mainSplitter->getMainWindowCurve();
|
MainWindowCurve *mainWindowCurve = mainSplitter->getMainWindowCurve();
|
||||||
|
mainWindowCurve->m_strSlfName = strSlfName;
|
||||||
|
mainWindowCurve->m_strWellName = strWellName;
|
||||||
mainWindowCurve->Open(fileFull);
|
mainWindowCurve->Open(fileFull);
|
||||||
|
|
||||||
//QFuture<void> future = QtConcurrent::run(std::bind(&MainWindowCurve::s_Open, mainWindowCurve, fileFull));
|
//QFuture<void> future = QtConcurrent::run(std::bind(&MainWindowCurve::s_Open, mainWindowCurve, fileFull));
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,8 @@ void MainWindowCurve::resizeEvent(QResizeEvent *event)
|
||||||
QSize sz = event->size();
|
QSize sz = event->size();
|
||||||
m_nObjDrawH = sz.height() - nhei - m_nObjLayerH - 100 - 100;
|
m_nObjDrawH = sz.height() - nhei - m_nObjLayerH - 100 - 100;
|
||||||
// nhei mainToolBar的高度 m_nObjLyrH,对象单元格高度 100头高度,100井头高度
|
// nhei mainToolBar的高度 m_nObjLyrH,对象单元格高度 100头高度,100井头高度
|
||||||
emit CallManage::getInstance()->sig_ResizeHeight(m_strUuid, m_nObjDrawH);
|
int che = ui->centralwidget->height();
|
||||||
|
emit CallManage::getInstance()->sig_ResizeHeight(m_strUuid, che);
|
||||||
|
|
||||||
emit sig_resizeWindow();
|
emit sig_resizeWindow();
|
||||||
|
|
||||||
|
|
@ -5696,27 +5697,29 @@ void MainWindowCurve::DisplayWells(QJsonArray wellsArray)
|
||||||
//展示其中一口井
|
//展示其中一口井
|
||||||
void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
||||||
{
|
{
|
||||||
QString strWellName = "";
|
QString strWellName = m_strWellName;
|
||||||
QString strSlfName = "";
|
QString strSlfName = m_strSlfName;
|
||||||
QJsonArray tracksArray;
|
QJsonArray tracksArray;
|
||||||
|
if (strSlfName.length() <= 0)
|
||||||
|
{
|
||||||
|
if (wellObjInfo.contains("WellName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = wellObjInfo.value("WellName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strWellName = value.toString();
|
||||||
|
qDebug() << "WellName:" << strWellName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (wellObjInfo.contains("WellName"))
|
if (wellObjInfo.contains("SlfName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = wellObjInfo.value("WellName");
|
QJsonValue value = wellObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
if (value.isString()) {
|
||||||
strWellName = value.toString();
|
strSlfName = value.toString();
|
||||||
qDebug() << "WellName:" << strWellName;
|
qDebug() << "strSlfName:" << strSlfName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (wellObjInfo.contains("SlfName"))
|
|
||||||
{
|
|
||||||
QJsonValue value = wellObjInfo.value("SlfName");
|
|
||||||
if (value.isString()) {
|
|
||||||
strSlfName = value.toString();
|
|
||||||
qDebug() << "strSlfName:" << strSlfName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wellObjInfo.contains("bShowTrackHead"))
|
if (wellObjInfo.contains("bShowTrackHead"))
|
||||||
{
|
{
|
||||||
|
|
@ -5789,6 +5792,8 @@ void MainWindowCurve::DisplayTracks(QJsonArray tracksArray)
|
||||||
if (topVal.isObject() && infoVal.isObject()) {
|
if (topVal.isObject() && infoVal.isObject()) {
|
||||||
QJsonObject topObj = topVal.toObject();
|
QJsonObject topObj = topVal.toObject();
|
||||||
QJsonObject infoObj = infoVal.toObject();
|
QJsonObject infoObj = infoVal.toObject();
|
||||||
|
|
||||||
|
topObj["WellName"] = m_strWellName;
|
||||||
//展示其中一道
|
//展示其中一道
|
||||||
DisplayTrack_Top(id, topObj, infoObj);
|
DisplayTrack_Top(id, topObj, infoObj);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,8 @@ public slots:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindowSplitter* m_pParentWin = NULL;
|
MainWindowSplitter* m_pParentWin = NULL;
|
||||||
|
QString m_strSlfName = "";
|
||||||
|
QString m_strWellName = "";
|
||||||
|
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
QStringList m_listWell;
|
QStringList m_listWell;
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,17 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>681</width>
|
||||||
<height>600</height>
|
<height>513</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>MainWindow</string>
|
<string>MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
|
|
@ -32,8 +35,15 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableWidget" name="tableWidget_2"/>
|
<widget class="QTableWidget" name="tableWidget_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,6">
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,6">
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
||||||
|
|
||||||
// ===== 性能优化: 启用 OpenGL 硬件加速 =====
|
// ===== 性能优化: 启用 OpenGL 硬件加速 =====
|
||||||
// 优先尝试 OpenGL, 如果硬件不支持会自动回退到软件渲染
|
// 优先尝试 OpenGL, 如果硬件不支持会自动回退到软件渲染
|
||||||
this->setOpenGl(true, 16);
|
//this->setOpenGl(true, 16);
|
||||||
|
|
||||||
m_newColor = Qt::black;
|
m_newColor = Qt::black;
|
||||||
// ===== 性能优化: 仅对曲线开抗锯齿, 关闭轴/网格/图例抗锯齿 =====
|
// ===== 性能优化: 仅对曲线开抗锯齿, 关闭轴/网格/图例抗锯齿 =====
|
||||||
|
|
@ -876,7 +876,7 @@ void QMyCustomPlot::mouseMoveEvent(QMouseEvent *event)
|
||||||
y_val = xAxis->pixelToCoord(y_pos);
|
y_val = xAxis->pixelToCoord(y_pos);
|
||||||
else
|
else
|
||||||
y_val = yAxis->pixelToCoord(y_pos);
|
y_val = yAxis->pixelToCoord(y_pos);
|
||||||
//qDebug() << "MouseMove:" << y_pos;
|
//qDebug() << "MouseMove pixel:" << y_pos << "Y轴: " << y_val;
|
||||||
emit CallManage::getInstance()->sig_MouseMove(m_strUuid, m_strWellName, m_strTrackName, 0-y_val);
|
emit CallManage::getInstance()->sig_MouseMove(m_strUuid, m_strWellName, m_strTrackName, 0-y_val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12274,9 +12274,33 @@ void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double val
|
||||||
|
|
||||||
//move(0, -(dPercent*geoRect.height()));
|
//move(0, -(dPercent*geoRect.height()));
|
||||||
setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height());
|
setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height());
|
||||||
|
|
||||||
|
//qDebug() << "visibleTopDepth: " << visibleTopDepth();
|
||||||
|
//qDebug() << "visibleBottomDepth: " << visibleBottomDepth();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float QMyCustomPlot::visibleTopDepth() const
|
||||||
|
{
|
||||||
|
// widget 被父容器从顶部裁切的像素量 = -geometry().y()
|
||||||
|
int pixTop = -geometry().y();
|
||||||
|
if (m_bX2Y)
|
||||||
|
return (float)xAxis->pixelToCoord(pixTop);
|
||||||
|
else
|
||||||
|
return (float)yAxis->pixelToCoord(pixTop);
|
||||||
|
}
|
||||||
|
|
||||||
|
float QMyCustomPlot::visibleBottomDepth() const
|
||||||
|
{
|
||||||
|
QWidget* p = parentWidget();
|
||||||
|
int viewportH = p ? p->height() : height();
|
||||||
|
int pixBottom = -geometry().y() + viewportH;
|
||||||
|
if (m_bX2Y)
|
||||||
|
return (float)xAxis->pixelToCoord(pixBottom);
|
||||||
|
else
|
||||||
|
return (float)yAxis->pixelToCoord(pixBottom);
|
||||||
|
}
|
||||||
|
|
||||||
void QMyCustomPlot::s_ResizeHeight(QString strUuid, int nPixVal)
|
void QMyCustomPlot::s_ResizeHeight(QString strUuid, int nPixVal)
|
||||||
{
|
{
|
||||||
if (m_strUuid == strUuid)
|
if (m_strUuid == strUuid)
|
||||||
|
|
@ -12285,6 +12309,7 @@ void QMyCustomPlot::s_ResizeHeight(QString strUuid, int nPixVal)
|
||||||
m_fBottomY = xAxis->pixelToCoord(nPixVal);
|
m_fBottomY = xAxis->pixelToCoord(nPixVal);
|
||||||
else
|
else
|
||||||
m_fBottomY = yAxis->pixelToCoord(nPixVal);
|
m_fBottomY = yAxis->pixelToCoord(nPixVal);
|
||||||
|
|
||||||
emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, nPixVal, m_fBottomY);
|
emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, nPixVal, m_fBottomY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,9 @@ public:
|
||||||
void setDepthY(float fy1, float fy2);
|
void setDepthY(float fy1, float fy2);
|
||||||
//改变深度更新绘图
|
//改变深度更新绘图
|
||||||
void updateDepthY(float fy1, float fy2);
|
void updateDepthY(float fy1, float fy2);
|
||||||
|
// 获取可视区域顶部/底部深度(滚动偏移后实时有效,基于像素反算)
|
||||||
|
float visibleTopDepth() const;
|
||||||
|
float visibleBottomDepth() const;
|
||||||
//绘制网格
|
//绘制网格
|
||||||
void drawRowGrid(bool b = false);
|
void drawRowGrid(bool b = false);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user