波列属性道重新实现。 使用QPainter
This commit is contained in:
parent
5901527c6e
commit
8fbbe54c02
|
|
@ -14,10 +14,6 @@
|
|||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOL
|
||||
#define BOOL bool
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE false
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -772,14 +772,14 @@ void CInDefTableDlg::InitList1()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CInDefTableDlg::mIsNumber(QString str)//判断字符串是否为数值
|
||||
bool CInDefTableDlg::mIsNumber(QString str)//判断字符串是否为数值
|
||||
{
|
||||
QByteArray ba = str.toLatin1();//QString 转换为 char*
|
||||
const char *buf = ba.data();
|
||||
int len=strlen(str.toStdString().c_str());//str.length();//whp change 2020.3.16
|
||||
int dig[30];
|
||||
int DotNum=0;//小数点个数
|
||||
BOOL IsDigital=1;
|
||||
bool IsDigital=1;
|
||||
for(int i=0;i<len;i++)
|
||||
{
|
||||
if(i==0&&buf[i]=='-')continue;//可能是负数
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@
|
|||
#define SECTIONVIEW_NUM 255
|
||||
#define SYSTEM_INPOLATION 65 // 系统缺省颜色需要插值成的数目
|
||||
|
||||
enum AxisType
|
||||
{
|
||||
AXIS_LINEAR = 0,//线性坐标系
|
||||
AXIS_LOGARITHMIC = 1,//对数坐标系
|
||||
AXIS_DIP = 2, //倾角坐标系
|
||||
};
|
||||
|
||||
struct My_ColorItem
|
||||
{
|
||||
QRgb color; // 颜色值
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ signals:
|
|||
void sig_New();
|
||||
void sig_Open();
|
||||
|
||||
void sig_ResizeHeight(QString strUuid, int nHei);
|
||||
void sig_ResizeDepth(QString strUuid, int nHei, float fDepthLowerY);
|
||||
void sig_Risize();
|
||||
void sig_AddOne();
|
||||
void sig_AddLine(int indexID);
|
||||
|
|
|
|||
|
|
@ -10,12 +10,6 @@ class LogmudItemDrawer
|
|||
public:
|
||||
LogmudItemDrawer();
|
||||
|
||||
enum AxisType
|
||||
{
|
||||
AXIS_LINEAR = 0,//线性坐标系
|
||||
AXIS_LOGARITHMIC = 1,//对数坐标系
|
||||
AXIS_DIP = 2, //倾角坐标系
|
||||
};
|
||||
/**
|
||||
* @brief 绘制每一个井壁取心分段的方法
|
||||
* @param painter 绘制设备
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "PickFrac.h"
|
||||
#include "formline.h"
|
||||
#include "formlogmud.h"
|
||||
#include "formwave.h"
|
||||
#include "PropertyWidget.h"
|
||||
#include "DrawTvd.h"
|
||||
#include "DepthProgress.h"
|
||||
|
|
@ -156,6 +157,16 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
//道-对象
|
||||
FormInfo* pInfo = m_formTrack->setDrawDt(listdt, objInfo);
|
||||
|
||||
if ("waveObject" == strType)
|
||||
{
|
||||
FormWave *pwave = new FormWave(this, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
pwave->setDepthY(m_iY1, m_iY2);
|
||||
pwave->initGeometry(m_strUuid, m_iScale, dW, m_nObjDrawH);
|
||||
pwave->m_formTrack = m_formTrack;
|
||||
pwave->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
|
|
@ -452,7 +463,7 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
curv->replot();
|
||||
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
}
|
||||
QTimer::singleShot(100, this, [=]() {
|
||||
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||
});
|
||||
|
|
@ -3615,22 +3626,38 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
return;
|
||||
}
|
||||
|
||||
int _nSamples = 0;
|
||||
double nW = m_nTrackW;
|
||||
if (nW <= 0)
|
||||
nW = g_iOneWidth;
|
||||
|
||||
bool bDraw = true;
|
||||
if (bDraw)
|
||||
{
|
||||
FormWave *pwave = new FormWave(this, strSlfName, strWellName, strTrackName, strWaveName);
|
||||
pwave->setDepthY(m_iY1, m_iY2);
|
||||
pwave->initGeometry(m_strUuid, m_iScale, nW, m_nObjDrawH);
|
||||
pwave->m_formTrack = m_formTrack;
|
||||
pwave->show();
|
||||
//pwave->replot();
|
||||
_nSamples = 264;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strWaveName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
double nW = m_nTrackW;
|
||||
if (nW <= 0)
|
||||
nW = g_iOneWidth;
|
||||
curv->initGeometry(m_strUuid, m_iScale, nW);
|
||||
|
||||
curv->m_bX2Y = false;
|
||||
|
||||
curv->show();
|
||||
|
||||
int _nSamples = 0;
|
||||
|
||||
if (g_iSupport3D)
|
||||
{
|
||||
initWave_3D(curv, strSlfName, strWaveName, _nSamples);
|
||||
|
|
@ -3643,21 +3670,13 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
|
||||
curv->initWave(strSlfName, strWaveName);
|
||||
|
||||
// 圆柱渲染器
|
||||
// CylindricalImageMap* cylinderMap = new CylindricalImageMap(curv->xAxis, curv->yAxis);
|
||||
// cylinderMap->setData(curv->m_colorMap->data());
|
||||
// cylinderMap->setCylinderRadius(2.0);
|
||||
// cylinderMap->setSourceColorMap(curv->m_colorMap); // 共享梯度
|
||||
// cylinderMap->setAzimuth(45);
|
||||
// cylinderMap->setElevation(30);
|
||||
// // 隐藏原始的矩形色图
|
||||
// curv->m_colorMap->setVisible(false);
|
||||
//cylinderMap->rescaleAxes();
|
||||
|
||||
_nSamples = curv->getScaleV();
|
||||
}
|
||||
curv->replot();
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
}
|
||||
m_listLineName.push_back(strWaveName);
|
||||
|
||||
QTimer::singleShot(100, this, [=]() {
|
||||
if (m_iY2 == 0.0)
|
||||
|
|
@ -3671,8 +3690,6 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
}
|
||||
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||
});
|
||||
//
|
||||
m_listLineName.push_back(strWaveName);
|
||||
|
||||
QString strAliasName = "";
|
||||
QString strUnit = "mv";
|
||||
|
|
@ -3816,6 +3833,15 @@ void FormDraw::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit
|
|||
form->replot();//屏蔽,缩减时间
|
||||
}
|
||||
}
|
||||
else if (strObjName == "FormWave")
|
||||
{
|
||||
FormWave *formWave = qobject_cast<FormWave*>(childWidget);
|
||||
if (formWave)
|
||||
{
|
||||
formWave->updateDepthY(m_iY1, m_iY2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
@ -6624,8 +6650,8 @@ void FormDraw::initDCA(QMyCustomPlot *widget, QString m_csCurveFd, QString m_csC
|
|||
if ( edepc > m_EDep ) edepc = m_EDep;
|
||||
if(edepc<sdepc) edepc=sdepc;
|
||||
|
||||
float m_PlotSdep=sdepc;
|
||||
float m_PlotEdep=edepc;
|
||||
//float m_PlotSdep=sdepc;
|
||||
//float m_PlotEdep=edepc;
|
||||
|
||||
m_LeftVal = m_dca_left_azimuth_curve;
|
||||
m_RightVal = m_dca_right_azimuth_curve;
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public slots:
|
|||
public:
|
||||
QString m_strTrackName;
|
||||
double m_nTrackW = 0;
|
||||
int m_nObjDrawH = 0;
|
||||
|
||||
int m_iScale=200;
|
||||
double m_iY1=0;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "geometryutils.h"
|
||||
#include "qtColorSchemeComboBox.h"
|
||||
#include "DrawTvd.h"
|
||||
#include "formwave.h"
|
||||
|
||||
//曲线名称(单个)
|
||||
FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor) :
|
||||
|
|
@ -2635,6 +2636,10 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val, QString strGp)
|
|||
// }
|
||||
|
||||
this->update();
|
||||
if (m_pWave)
|
||||
{
|
||||
m_pWave->update();
|
||||
}
|
||||
return bDraw;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace Ui {
|
|||
class FormInfo;
|
||||
}
|
||||
|
||||
class FormWave;
|
||||
class CDrawTvd;
|
||||
class FormInfo : public QWidget
|
||||
{
|
||||
|
|
@ -173,6 +174,7 @@ public:
|
|||
|
||||
int m_nJg;
|
||||
|
||||
int m_nCurveMode=0; // 曲线类型
|
||||
int m_nDrawType; // 绘图类型
|
||||
int m_nFillType; // 填充类型
|
||||
|
||||
|
|
@ -180,7 +182,7 @@ public:
|
|||
bool m_bDrawBase = false; // 绘制波基线
|
||||
bool m_bOddEven = false; // 奇偶配色
|
||||
|
||||
QString m_strAmp; // 幅度刻度
|
||||
QString m_strAmp = "ABC"; // 幅度刻度
|
||||
float m_fMaxAmp; // 最大振幅
|
||||
bool m_bShowScale; // 显示刻度
|
||||
|
||||
|
|
@ -188,6 +190,15 @@ public:
|
|||
int m_nWaveJg = 10; // 波形间隔
|
||||
float m_fWaveHei = 1; // 波形高度
|
||||
|
||||
int m_FirstRange = 4; // 起始波列
|
||||
int m_EndRange = 20; // 终止波列
|
||||
|
||||
int m_ArrayNum = 1; // 绘制阵列数
|
||||
QColor m_FillColor = Qt::black; // 波形填充颜色
|
||||
QColor m_WaveColor = Qt::black; // 波列曲线的颜色
|
||||
|
||||
float m_midValue = 0; // 归一化极值
|
||||
|
||||
int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数
|
||||
int m_nSchemeIndex = 1; // 调色板参数设置-色板
|
||||
|
||||
|
|
@ -240,6 +251,7 @@ public:
|
|||
|
||||
//斜井三图一表(井斜数据表参数)
|
||||
CDrawTvd *m_pTvd;
|
||||
FormWave* m_pWave = NULL;
|
||||
|
||||
// 深度
|
||||
QColor m_sdRulerColor; // 标尺颜色
|
||||
|
|
|
|||
1447
logPlus/formwave.cpp
Normal file
1447
logPlus/formwave.cpp
Normal file
File diff suppressed because it is too large
Load Diff
114
logPlus/formwave.h
Normal file
114
logPlus/formwave.h
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
#ifndef FormWave_H
|
||||
#define FormWave_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVariant>
|
||||
#include <QSharedMemory>
|
||||
|
||||
#include "BaseFun.h"
|
||||
#include "MemRdWt.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui {
|
||||
class FormWave;
|
||||
}
|
||||
|
||||
class FormTrack;
|
||||
class FormInfo;
|
||||
class FormWave : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormWave(QWidget *parent = nullptr, QString strSlfName="", QString strWellName="", QString strTrackName="", QString strLineName="");
|
||||
~FormWave();
|
||||
|
||||
void initGeometry(QString strUuid, int nscale, double fW, int nH);
|
||||
|
||||
void setDepthY(float fy1, float fy2);
|
||||
//改变深度更新绘图
|
||||
void updateDepthY(float fy1, float fy2);
|
||||
|
||||
bool LoadFromSLF_wave();
|
||||
bool SaveToSLF_LogMud();
|
||||
|
||||
void changeColor(int nidx, int ncolorNum);
|
||||
private:
|
||||
Ui::FormWave *ui;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
|
||||
void DrawWave(QPainter* pdc, QRectF mrt);
|
||||
|
||||
double GetData(int i, int j, char *buffer);
|
||||
double GetData(int repCode, char *buffer, int repLen = 0);
|
||||
void SetData(int repCode, char *buffer, double yy);
|
||||
|
||||
bool IsFiniteNumber(float v)
|
||||
{
|
||||
return qIsFinite(v) != 0;
|
||||
}
|
||||
|
||||
public:
|
||||
QString m_strUuid;
|
||||
QString m_strSlfName;
|
||||
QString m_strWellName;
|
||||
QString m_strTrackName;
|
||||
QString m_strLineName;
|
||||
|
||||
QWidget *m_parent;
|
||||
|
||||
FormTrack *m_formTrack = NULL;
|
||||
FormInfo* m_pInfo = NULL;
|
||||
|
||||
float m_iY1, m_iY2;
|
||||
int m_iScale = 200;
|
||||
double m_wellTop = 0.0;
|
||||
double m_dTopDepth = 0.0;
|
||||
|
||||
QSharedMemory m_sharedMemory;
|
||||
|
||||
PFLOATPROPERTY m_vMD;
|
||||
PFLOATPROPERTY m_vProperty;
|
||||
MyDataTypeEnum vVdl;
|
||||
|
||||
Slf_WAVE waveinfo;
|
||||
float m_SDep, m_EDep, m_Rlev;
|
||||
float m_PlotSdep = 0.0f;
|
||||
int m_nSamples; //每深度间隔的数据点
|
||||
int m_PointNum;
|
||||
QVector <double> valMin, valMax;
|
||||
double m_TopDepth;
|
||||
double m_BottomDepth;
|
||||
|
||||
QVector<float> selfcolorrank;
|
||||
QColor m_Color[256]; //定义颜色数组
|
||||
char m_strValue[200];
|
||||
int CtrlCurve = 0;
|
||||
int PickFlag = 0;
|
||||
float m_fTopY = 0.0f;
|
||||
float m_fDepthLowerY = 0.0f;
|
||||
float m_fAddY = 29.0f;
|
||||
|
||||
int schemIndex = 1;
|
||||
int colornum = 256;
|
||||
public:
|
||||
//void DrawWave(QPainter* pdc, QRectF mrt1);
|
||||
|
||||
public slots:
|
||||
void s_ResizeDepth(QString strUuid, int nHeight, float fDepthLowerY);
|
||||
|
||||
//斜井三图一表
|
||||
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strGroup, QString strProperty, QVariant variant);
|
||||
|
||||
//滚动条
|
||||
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
|
||||
void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen);
|
||||
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
|
||||
};
|
||||
|
||||
#endif // FormWave_H
|
||||
33
logPlus/formwave.ui
Normal file
33
logPlus/formwave.ui
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormWave</class>
|
||||
<widget class="QWidget" name="FormWave">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -299,6 +299,7 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
formDraw->m_formTrack = formTrack;
|
||||
formDraw->m_iScale = m_iScale;
|
||||
formDraw->m_nTrackW = dW;
|
||||
formDraw->m_nObjDrawH = m_nObjDrawH;
|
||||
|
||||
ui->tableWidget->setCellWidget(i, columnCount, formDraw);//默认用formDraw填充满
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
QString m_strWellName;
|
||||
QString m_strSlfName="";
|
||||
int m_nObjLyrH = 100;
|
||||
int m_nObjDrawH = 0;
|
||||
int m_iScale=200;
|
||||
double m_iY1=0;
|
||||
double m_iY2=0;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ SOURCES += \
|
|||
forminfo.cpp \
|
||||
formline.cpp \
|
||||
formlogmud.cpp \
|
||||
formwave.cpp \
|
||||
formmultiheads.cpp \
|
||||
formtrack.cpp \
|
||||
formtracktop.cpp \
|
||||
|
|
@ -142,6 +143,7 @@ HEADERS += \
|
|||
forminfo.h \
|
||||
formline.h \
|
||||
formlogmud.h \
|
||||
formwave.h \
|
||||
formmultiheads.h \
|
||||
formtrack.h \
|
||||
formtracktop.h \
|
||||
|
|
@ -175,6 +177,7 @@ FORMS += \
|
|||
forminfo.ui \
|
||||
formline.ui \
|
||||
formlogmud.ui \
|
||||
formwave.ui \
|
||||
formmultiheads.ui \
|
||||
formtrack.ui \
|
||||
formtracktop.ui \
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="formwave.h" />
|
||||
<ClInclude Include="LogmuditemDrawer.h" />
|
||||
<QtMoc Include="LogmudResultItem.h" />
|
||||
<QtMoc Include="selectlinedialog.h" />
|
||||
|
|
@ -173,6 +174,7 @@
|
|||
<ClCompile Include="formtitle.cpp" />
|
||||
<ClCompile Include="formtrack.cpp" />
|
||||
<ClCompile Include="formtracktop.cpp" />
|
||||
<ClCompile Include="formwave.cpp" />
|
||||
<ClCompile Include="formwell.cpp" />
|
||||
<ClCompile Include="fracsel.cpp" />
|
||||
<ClCompile Include="GeoIndicatorGenerator.cpp" />
|
||||
|
|
@ -237,6 +239,7 @@
|
|||
<QtUic Include="formtitle.ui" />
|
||||
<QtUic Include="formtrack.ui" />
|
||||
<QtUic Include="formtracktop.ui" />
|
||||
<QtUic Include="formwave.ui" />
|
||||
<QtUic Include="formwell.ui" />
|
||||
<QtUic Include="fracsel.ui" />
|
||||
<QtUic Include="InDefTable.ui" />
|
||||
|
|
|
|||
|
|
@ -322,6 +322,9 @@
|
|||
<QtMoc Include="LogmudResultItem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formwave.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="backgrounddelegate.cpp">
|
||||
|
|
@ -675,6 +678,9 @@
|
|||
<ClCompile Include="LogmudItemDrawer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formwave.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="logplus.qrc">
|
||||
|
|
@ -748,5 +754,8 @@
|
|||
<QtUic Include="formlogmud.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="formwave.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
public:
|
||||
virtual void closeEvent(QCloseEvent *event);
|
||||
|
||||
protected:
|
||||
//样式
|
||||
void loadStyle(const QString &qssFile);
|
||||
|
||||
|
|
|
|||
|
|
@ -215,6 +215,23 @@ MainWindowCurve::~MainWindowCurve()
|
|||
|
||||
void MainWindowCurve::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
int nhei = 0;
|
||||
Qt::ToolBarArea area = this->toolBarArea(ui->mainToolBar);
|
||||
if (area == Qt::BottomToolBarArea || area == Qt::TopToolBarArea)
|
||||
{
|
||||
nhei = ui->mainToolBar->height();
|
||||
if (ui->centralwidget->layout())
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
ui->centralwidget->layout()->getContentsMargins(&left, &top, &right, &bottom);
|
||||
nhei += top;
|
||||
nhei += bottom;
|
||||
}
|
||||
}
|
||||
QSize sz = event->size();
|
||||
m_nObjDrawH = sz.height() - nhei - m_nObjLayerH - 100 - 100;
|
||||
// nhei mainToolBar的高度 m_nObjLyrH,对象单元格高度 100头高度,100井头高度
|
||||
emit CallManage::getInstance()->sig_ResizeHeight(m_strUuid, m_nObjDrawH);
|
||||
}
|
||||
|
||||
QToolBar * MainWindowCurve::getPluginToolBar()
|
||||
|
|
@ -3656,6 +3673,7 @@ void MainWindowCurve::s_NewWell(QString strWellName, QString strSlfName)
|
|||
widgetWell->m_strUuid = m_strUuid;
|
||||
widgetWell->m_strSlfName = strSlfName;
|
||||
widgetWell->m_nObjLyrH = m_nObjLayerH;
|
||||
widgetWell->m_nObjDrawH = m_nObjDrawH;
|
||||
widgetWell->m_iScale = m_iScale;
|
||||
widgetWell->setWellHeader(wellH);
|
||||
//
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public:
|
|||
QLineEdit *spinbox2;
|
||||
QLineEdit *spinbox3;
|
||||
|
||||
int m_nObjDrawH = 0; // 绘制层高度
|
||||
int m_nObjLayerH = 104; // 对象层高度
|
||||
int m_iScale=200;
|
||||
double m_iY1=-1000;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
|
|
@ -46,16 +46,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
|
|
|
|||
|
|
@ -134,6 +134,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, int)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, int)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ResizeHeight(QString, int)), this, SLOT(s_ResizeHeight(QString, int)));
|
||||
|
||||
//曲线选中,置顶
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString)));
|
||||
//颜色
|
||||
|
|
@ -779,7 +781,7 @@ void QMyCustomPlot::updateImage(float fTopY, FormInfo* pInfo)
|
|||
|
||||
float flDep;
|
||||
int i, ii, j, nPoint = 0, m;
|
||||
QRectF rt, wrt;
|
||||
QRectF wrt;
|
||||
float dep, ch;
|
||||
double ratio;
|
||||
CString cs;
|
||||
|
|
@ -1627,7 +1629,7 @@ void QMyCustomPlot::mouseMoveEvent(QMouseEvent *event)
|
|||
y_val = xAxis->pixelToCoord(y_pos);
|
||||
else
|
||||
y_val = yAxis->pixelToCoord(y_pos);
|
||||
|
||||
//qDebug() << "MouseMove:" << y_pos;
|
||||
emit CallManage::getInstance()->sig_MouseMove(m_strUuid, m_strWellName, m_strTrackName, 0-y_val);
|
||||
}
|
||||
}
|
||||
|
|
@ -12933,6 +12935,18 @@ void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double val
|
|||
return;
|
||||
}
|
||||
|
||||
void QMyCustomPlot::s_ResizeHeight(QString strUuid, int nPixVal)
|
||||
{
|
||||
if (m_strUuid == strUuid)
|
||||
{
|
||||
if (m_bX2Y)
|
||||
m_fBottomY = xAxis->pixelToCoord(nPixVal);
|
||||
else
|
||||
m_fBottomY = yAxis->pixelToCoord(nPixVal);
|
||||
emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, nPixVal, m_fBottomY);
|
||||
}
|
||||
}
|
||||
|
||||
//自定义滚动条
|
||||
void QMyCustomPlot::vertScrollBarChanged(QString strUuid, double value, double low, double upper)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ public:
|
|||
float m_iX1, m_iX2;
|
||||
float m_iY1, m_iY2;
|
||||
float m_fTopY = 0; // 显示深度upper
|
||||
float m_fBottomY = 0; // 显示深度lower
|
||||
qint8 m_nLeftCross = 0; // 左跨道个数
|
||||
qint8 m_nRightCross = 0; // 右跨道个数
|
||||
|
||||
|
|
@ -424,6 +425,8 @@ public slots:
|
|||
//自定义滚动条
|
||||
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
|
||||
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
|
||||
|
||||
void s_ResizeHeight(QString strUuid, int nPixVal);
|
||||
//信号槽刷新
|
||||
void slot_replot();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user