表格边框隐藏,曲线追加鼠标滚动后,可视解释窗口上下滚动处理
This commit is contained in:
parent
f6a1c49c5d
commit
d30053b9c4
|
|
@ -73,6 +73,9 @@ signals:
|
||||||
//鼠标移动,通知状态栏显示深度信息
|
//鼠标移动,通知状态栏显示深度信息
|
||||||
void sig_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep);
|
void sig_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep);
|
||||||
|
|
||||||
|
//鼠标滚动,通知可视解释窗口
|
||||||
|
void sig_mouseWheel(QWheelEvent *event);
|
||||||
|
|
||||||
//
|
//
|
||||||
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,8 @@ AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property");
|
||||||
initForm(curv, strSlfName, strLineName,
|
initForm(curv, strSlfName, strLineName,
|
||||||
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
||||||
|
|
||||||
|
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
|
|
||||||
//
|
//
|
||||||
m_listLineName.push_back(strLineName);
|
m_listLineName.push_back(strLineName);
|
||||||
|
|
||||||
|
|
@ -196,6 +198,11 @@ AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FormDraw::s_mouseWheel(QWheelEvent *event)
|
||||||
|
{
|
||||||
|
emit CallManage::getInstance()->sig_mouseWheel(event);
|
||||||
|
}
|
||||||
|
|
||||||
void FormDraw::s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName)
|
void FormDraw::s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
//井名&道名不一致
|
//井名&道名不一致
|
||||||
|
|
@ -225,7 +232,7 @@ void FormDraw::s_delLine(QString strUuid, QString strWellName, QString strTrackN
|
||||||
// 判断子控件是否为QWidget类型
|
// 判断子控件是否为QWidget类型
|
||||||
if (QWidget *childWidget = qobject_cast<QWidget *>(child)) {
|
if (QWidget *childWidget = qobject_cast<QWidget *>(child)) {
|
||||||
// 打印子控件的信息,使用缩进表示层级关系
|
// 打印子控件的信息,使用缩进表示层级关系
|
||||||
qDebug() << QString("%1").arg(childWidget->objectName());
|
//qDebug() << QString("%1").arg(childWidget->objectName());
|
||||||
QString strObjName = childWidget->objectName();
|
QString strObjName = childWidget->objectName();
|
||||||
if(strObjName=="QMyCustomPlot")
|
if(strObjName=="QMyCustomPlot")
|
||||||
{
|
{
|
||||||
|
|
@ -251,7 +258,7 @@ void FormDraw::s_MouseMove(QString strUuid, QString strWellName, QString strTrac
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << "FormDraw s_MouseMove";
|
//qDebug() << "FormDraw s_MouseMove";
|
||||||
|
|
||||||
//
|
//
|
||||||
QString sss=" depth:"+QString::number(dep);
|
QString sss=" depth:"+QString::number(dep);
|
||||||
|
|
@ -264,7 +271,7 @@ void FormDraw::s_MouseMove(QString strUuid, QString strWellName, QString strTrac
|
||||||
// 判断子控件是否为QWidget类型
|
// 判断子控件是否为QWidget类型
|
||||||
if (QWidget *childWidget = qobject_cast<QWidget *>(child)) {
|
if (QWidget *childWidget = qobject_cast<QWidget *>(child)) {
|
||||||
// 打印子控件的信息,使用缩进表示层级关系
|
// 打印子控件的信息,使用缩进表示层级关系
|
||||||
qDebug() << QString("%1").arg(childWidget->objectName());
|
//qDebug() << QString("%1").arg(childWidget->objectName());
|
||||||
QString strObjName = childWidget->objectName();
|
QString strObjName = childWidget->objectName();
|
||||||
if(strObjName=="QMyCustomPlot")
|
if(strObjName=="QMyCustomPlot")
|
||||||
{
|
{
|
||||||
|
|
@ -660,7 +667,7 @@ void FormDraw::dragEnterEvent(QDragEnterEvent* event)
|
||||||
|
|
||||||
void FormDraw::dragMoveEvent(QDragMoveEvent* event)
|
void FormDraw::dragMoveEvent(QDragMoveEvent* event)
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw dragMoveEvent";
|
//qDebug() << "FormDraw dragMoveEvent";
|
||||||
|
|
||||||
// 可以在这里更新鼠标的位置,根据位置判断是否可以放置
|
// 可以在这里更新鼠标的位置,根据位置判断是否可以放置
|
||||||
// ...
|
// ...
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ public slots:
|
||||||
void dragEnterEvent(QDragEnterEvent* event);
|
void dragEnterEvent(QDragEnterEvent* event);
|
||||||
void dragMoveEvent(QDragMoveEvent* event);
|
void dragMoveEvent(QDragMoveEvent* event);
|
||||||
void dropEvent(QDropEvent* event);
|
void dropEvent(QDropEvent* event);
|
||||||
|
//
|
||||||
|
void s_mouseWheel(QWheelEvent *event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
|
|
|
||||||
|
|
@ -138,9 +138,10 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//painter.setBrush(QBrush(Qt::red, Qt::SolidPattern));
|
//painter.setBrush(QBrush(Qt::red, Qt::SolidPattern));
|
||||||
QRect rectRound(rect.left()+2,rect.top()+4, rect.width()-3, rect.height()-4);
|
QRect rectRound(rect.left()+2,rect.top()+4, rect.width()-4, rect.height()-8);
|
||||||
painter.setPen(QPen(m_lineColor, m_dWidth, m_lineStyle));
|
painter.setPen(QPen(m_lineColor, m_dWidth, m_lineStyle));
|
||||||
painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框
|
//painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框
|
||||||
|
painter.drawRect(rectRound);
|
||||||
|
|
||||||
painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡
|
painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡
|
||||||
QFont font1("微软雅黑", 10, false, false); //fontSize 10
|
QFont font1("微软雅黑", 10, false, false); //fontSize 10
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "formtrack.h"
|
#include "formtrack.h"
|
||||||
#include "ui_formtrack.h"
|
#include "ui_formtrack.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include "CallManage.h"
|
||||||
|
|
||||||
//曲线名称栏(表格)
|
//曲线名称栏(表格)
|
||||||
FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName) :
|
FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName) :
|
||||||
|
|
@ -12,6 +13,16 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
|
||||||
m_strWellName = strWellName;
|
m_strWellName = strWellName;
|
||||||
m_strTrackName = strTrackName;
|
m_strTrackName = strTrackName;
|
||||||
|
|
||||||
|
//单元格委托
|
||||||
|
//m_delegate = new NoLRBorderDelegate();
|
||||||
|
//隐藏网格线
|
||||||
|
ui->tableWidget->setShowGrid(false);
|
||||||
|
//设置样式表,竖直边框宽度为0,隐藏
|
||||||
|
ui->tableWidget->setStyleSheet( "QTableView::item {border-left: 0px solid black;} \
|
||||||
|
QTableView::item:selected {border-left: 0px solid black;}\
|
||||||
|
QTableView::item {border-right: 0px solid black;} \
|
||||||
|
QTableView::item:selected {border-right: 0px solid black;}");
|
||||||
|
|
||||||
//表格绑定井名,道名
|
//表格绑定井名,道名
|
||||||
ui->tableWidget->m_strWellName = strWellName;
|
ui->tableWidget->m_strWellName = strWellName;
|
||||||
ui->tableWidget->m_strTrackName = strTrackName;
|
ui->tableWidget->m_strTrackName = strTrackName;
|
||||||
|
|
@ -31,6 +42,23 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
|
||||||
connect(this, SIGNAL(sig_AddLine(QString, QString, QString, QString, QColor, double, float, float)),
|
connect(this, SIGNAL(sig_AddLine(QString, QString, QString, QString, QColor, double, float, float)),
|
||||||
this, SLOT(s_addLine(QString, QString, QString, QString, QColor, double, float, float)));
|
this, SLOT(s_addLine(QString, QString, QString, QString, QColor, double, float, float)));
|
||||||
|
|
||||||
|
//曲线选中,置顶
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormTrack::s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
|
{
|
||||||
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strWellName == strWellName &&
|
||||||
|
m_strTrackName == strTrackName)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//取消表格选中状态
|
||||||
|
ui->tableWidget->clearSelection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FormTrack::~FormTrack()
|
FormTrack::~FormTrack()
|
||||||
|
|
@ -64,9 +92,12 @@ void FormTrack::s_addLine(QString strSlfName, QString strWellName, QString strTr
|
||||||
formInfo->setBackColor(QColor(255,255,255));
|
formInfo->setBackColor(QColor(255,255,255));
|
||||||
//设置高度
|
//设置高度
|
||||||
ui->tableWidget->setRowHeight(row, 100);
|
ui->tableWidget->setRowHeight(row, 100);
|
||||||
|
//单元格委托
|
||||||
|
//ui->tableWidget->setItemDelegateForRow(row, m_delegate);
|
||||||
//
|
//
|
||||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------
|
//------------------------------------
|
||||||
// QFont font("微软雅黑", 10, QFont::Bold, false);
|
// QFont font("微软雅黑", 10, QFont::Bold, false);
|
||||||
// //
|
// //
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "forminfo.h"
|
#include "forminfo.h"
|
||||||
|
#include <QStyledItemDelegate>
|
||||||
|
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
|
@ -10,6 +11,36 @@ namespace Ui {
|
||||||
class FormTrack;
|
class FormTrack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//class NoLRBorderDelegate : public QStyledItemDelegate
|
||||||
|
//{
|
||||||
|
//public:
|
||||||
|
// void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
|
||||||
|
// {
|
||||||
|
// // 获取原始矩形大小
|
||||||
|
// QRect rect = option.rect;
|
||||||
|
|
||||||
|
// // 修改矩形大小,去除左右边框
|
||||||
|
// rect.setX(rect.x()+3);
|
||||||
|
// rect.setWidth(rect.width()-4);
|
||||||
|
// //rect.setWidth(0);
|
||||||
|
// rect.setY(rect.y()+4);
|
||||||
|
// rect.setHeight(rect.height()-7);
|
||||||
|
|
||||||
|
|
||||||
|
// // 构造新的选项
|
||||||
|
// QStyleOptionViewItem newOption(option);
|
||||||
|
// newOption.rect = rect;
|
||||||
|
|
||||||
|
// // 绘制单元格内部内容
|
||||||
|
// QStyledItemDelegate::paint(painter, newOption, index);
|
||||||
|
|
||||||
|
// // 绘制上下边框线
|
||||||
|
//// painter->setPen(QPen(Qt::gray));
|
||||||
|
//// painter->drawLine(option.rect.topLeft(), option.rect.topRight());
|
||||||
|
//// painter->drawLine(option.rect.bottomLeft(), option.rect.bottomRight());
|
||||||
|
// }
|
||||||
|
//};
|
||||||
|
|
||||||
class FormTrack : public QWidget
|
class FormTrack : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
@ -25,6 +56,8 @@ public:
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
QString m_strWellName;
|
QString m_strWellName;
|
||||||
QString m_strTrackName;
|
QString m_strTrackName;
|
||||||
|
// 创建自定义单元格委托
|
||||||
|
//NoLRBorderDelegate *m_delegate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, float vmax, float vmin);
|
void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, float vmax, float vmin);
|
||||||
|
|
@ -36,6 +69,9 @@ signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, float vmax, float vmin);
|
void s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, float vmax, float vmin);
|
||||||
|
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // FORMTRACK_H
|
#endif // FORMTRACK_H
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ FormWell::FormWell(QWidget *parent, QString strWellName) :
|
||||||
//关联信号槽
|
//关联信号槽
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_NewTrack_No_Line(QString, QString, QString)), this, SLOT(s_NewTrack_No_Line(QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_NewTrack_No_Line(QString, QString, QString)), this, SLOT(s_NewTrack_No_Line(QString, QString, QString)));
|
||||||
|
|
||||||
//s_NewTrack(m_strWellName);
|
//曲线选中,置顶
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
FormWell::~FormWell()
|
FormWell::~FormWell()
|
||||||
|
|
@ -37,6 +38,13 @@ FormWell::~FormWell()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormWell::s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
|
{
|
||||||
|
//选中了曲线置顶
|
||||||
|
//取消表格选中状态
|
||||||
|
ui->tableWidget->clearSelection();
|
||||||
|
}
|
||||||
|
|
||||||
void FormWell::s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName)
|
void FormWell::s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName)
|
||||||
{
|
{
|
||||||
//判断当前井是否与自己同名
|
//判断当前井是否与自己同名
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ public slots:
|
||||||
void s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName);
|
void s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName);
|
||||||
//新建空白道,没有曲线
|
//新建空白道,没有曲线
|
||||||
void s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);
|
void s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);
|
||||||
|
|
||||||
|
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FORMWELL_H
|
#endif // FORMWELL_H
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int g_iY1 = -3000;
|
||||||
int g_iY2 = 0;
|
int g_iY2 = 0;
|
||||||
int g_iCanZoom = 0;
|
int g_iCanZoom = 0;
|
||||||
|
|
||||||
int g_iScale = 300;
|
int g_iScale = 1000;
|
||||||
QString g_prjname="";
|
QString g_prjname="";
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
||||||
connect(this, SIGNAL(sig_NewTrackChangeWidth(QString)), this, SLOT(s_NewTrackChangeWidth(QString)));
|
connect(this, SIGNAL(sig_NewTrackChangeWidth(QString)), this, SLOT(s_NewTrackChangeWidth(QString)));
|
||||||
connect(this, SIGNAL(sig_NewWell(QString)), this, SLOT(s_NewWell(QString)));
|
connect(this, SIGNAL(sig_NewWell(QString)), this, SLOT(s_NewWell(QString)));
|
||||||
|
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindowCurve::~MainWindowCurve()
|
MainWindowCurve::~MainWindowCurve()
|
||||||
|
|
@ -90,6 +91,19 @@ MainWindowCurve::~MainWindowCurve()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//鼠标滚动,通知可视解释窗口
|
||||||
|
void MainWindowCurve::s_mouseWheel(QWheelEvent *event)
|
||||||
|
{
|
||||||
|
if (event->angleDelta().y() > 0) {
|
||||||
|
ui->tableWidget_2->verticalScrollBar()->triggerAction(QAbstractSlider::SliderSingleStepSub); // 向下滚动
|
||||||
|
} else {
|
||||||
|
ui->tableWidget_2->verticalScrollBar()->triggerAction(QAbstractSlider::SliderSingleStepAdd); // 向上滚动
|
||||||
|
}
|
||||||
|
|
||||||
|
//verticalScrollBar() horizontalScrollBar()
|
||||||
|
//event->accept(); // 确保事件被处理
|
||||||
|
}
|
||||||
|
|
||||||
//初始化工具栏
|
//初始化工具栏
|
||||||
void MainWindowCurve::initMainToolBar()
|
void MainWindowCurve::initMainToolBar()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ public slots:
|
||||||
//图头
|
//图头
|
||||||
void copy();
|
void copy();
|
||||||
void Paste();
|
void Paste();
|
||||||
|
|
||||||
|
//鼠标滚动,通知可视解释窗口
|
||||||
|
void s_mouseWheel(QWheelEvent *event);
|
||||||
public:
|
public:
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
QStringList m_listWell;
|
QStringList m_listWell;
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
||||||
//刻度类型
|
//刻度类型
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString, QString)));
|
||||||
|
|
||||||
|
//曲线选中,置顶
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
||||||
//颜色
|
//颜色
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QString, QColor)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QString, QColor)));
|
||||||
|
|
@ -239,14 +240,15 @@ void QMyCustomPlot::s_ChangeScaleType(QString strUuid, QString strSlfName, QStri
|
||||||
{
|
{
|
||||||
m_strScaleType = strScaleType;
|
m_strScaleType = strScaleType;
|
||||||
|
|
||||||
if(m_strScaleType=="线性")
|
if(m_strScaleType=="对数")
|
||||||
{
|
|
||||||
yAxis->setScaleType(QCPAxis::stLinear);
|
|
||||||
}
|
|
||||||
else if(m_strScaleType=="对数")
|
|
||||||
{
|
{
|
||||||
yAxis->setScaleType(QCPAxis::stLogarithmic);
|
yAxis->setScaleType(QCPAxis::stLogarithmic);
|
||||||
}
|
}
|
||||||
|
else //if(m_strScaleType=="线性")
|
||||||
|
{
|
||||||
|
yAxis->setScaleType(QCPAxis::stLinear);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
|
|
@ -426,6 +428,16 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
if(newFillMode=="左填充")
|
if(newFillMode=="左填充")
|
||||||
{
|
{
|
||||||
|
// if(m_strScaleType=="对数")
|
||||||
|
// {
|
||||||
|
// float iX1_Tmp=log(m_iX1);
|
||||||
|
// m_iX1 = iX1_Tmp;
|
||||||
|
// //
|
||||||
|
|
||||||
|
// float iX2_Tmp=log(m_iX2);
|
||||||
|
// m_iX2 = iX2_Tmp;
|
||||||
|
// }
|
||||||
|
|
||||||
//其他曲线(左填充)
|
//其他曲线(左填充)
|
||||||
CLogIO *logio=new CLogIO();
|
CLogIO *logio=new CLogIO();
|
||||||
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
||||||
|
|
@ -472,7 +484,14 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
|
|
||||||
//读取基线
|
//读取基线
|
||||||
float BaseY0=0;
|
float BaseY0=0;
|
||||||
|
float BaseY0_Tmp=0;
|
||||||
logio->ReadCurve(indexBaseCurv, 0-x0, 1, &BaseY0);
|
logio->ReadCurve(indexBaseCurv, 0-x0, 1, &BaseY0);
|
||||||
|
// if(m_strScaleType=="对数")
|
||||||
|
// {
|
||||||
|
// BaseY0_Tmp=log(BaseY0);
|
||||||
|
// BaseY0 = BaseY0_Tmp;
|
||||||
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
if(i+1<count)
|
if(i+1<count)
|
||||||
{
|
{
|
||||||
|
|
@ -481,8 +500,15 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
float y1 = (m_iX2-m_iX1)*(val[i+1]-vMin)/(vMax-vMin) + m_iX1;
|
float y1 = (m_iX2-m_iX1)*(val[i+1]-vMin)/(vMax-vMin) + m_iX1;
|
||||||
//读取基线
|
//读取基线
|
||||||
float BaseY1=0;
|
float BaseY1=0;
|
||||||
|
float BaseY1_Tmp=0;
|
||||||
logio->ReadCurve(indexBaseCurv, 0-x1, 1, &BaseY1);
|
logio->ReadCurve(indexBaseCurv, 0-x1, 1, &BaseY1);
|
||||||
|
|
||||||
|
// if(m_strScaleType=="对数")
|
||||||
|
// {
|
||||||
|
// BaseY1_Tmp=log(BaseY1);
|
||||||
|
// BaseY1 = BaseY1_Tmp;
|
||||||
|
// }
|
||||||
|
|
||||||
if(BaseY0<=y0 && BaseY1<=y1)
|
if(BaseY0<=y0 && BaseY1<=y1)
|
||||||
{
|
{
|
||||||
//基线在左,采用基线值
|
//基线在左,采用基线值
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public:
|
||||||
QString m_newHeadFill;
|
QString m_newHeadFill;
|
||||||
float m_vMin;
|
float m_vMin;
|
||||||
float m_vMax;
|
float m_vMax;
|
||||||
QString m_strScaleType;//刻度类型(线性,对数)
|
QString m_strScaleType="线性";//刻度类型(线性,对数)
|
||||||
|
|
||||||
QColor m_frontColor;//岩性前景色
|
QColor m_frontColor;//岩性前景色
|
||||||
QColor m_backColor;//岩性背景色
|
QColor m_backColor;//岩性背景色
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user