This commit is contained in:
crqiqi77 2026-04-08 16:42:37 +08:00
commit aee47ed25a
6 changed files with 206 additions and 258 deletions

View File

@ -894,7 +894,7 @@ void ParameterEditorModel::ChangeMXParam(float depth,float minX,float maxX,QStri
} }
if(no<0||no>9) { if(no<0||no>9) {
if(paramName=="SHFG") continue; if(paramName=="SHFG") continue;
// AfxMessageBox("SHFG无对应曲线或对应曲线不唯一无法设置极值\n您可采用选中待改字段在曲线窗口用CCTRL+鼠标左击进行修正!"); // QMessageBox::information(NULL,"提示","SHFG无对应曲线或对应曲线不唯一无法设置极值\n您可采用选中待改字段在曲线窗口用CCTRL+鼠标左击进行修正!");
} }
//else //else
{ {
@ -973,7 +973,7 @@ void ParameterEditorModel::AddDepth(float sdep,QString ID)
CCompositeParameterItem* Zones=pArrayItem; CCompositeParameterItem* Zones=pArrayItem;
int count=Zones->GetChildCount(); int count=Zones->GetChildCount();
if(count<1) { if(count<1) {
AfxMessageBox("初始参数缺失,不能生成层段!"); QMessageBox::information(NULL,"提示","初始参数缺失,不能生成层段!");
return; return;
} }
for(int i=0;i<count;i++){ for(int i=0;i<count;i++){
@ -987,14 +987,14 @@ void ParameterEditorModel::AddDepth(float sdep,QString ID)
QString val=pItem1->GetStringValue().c_str(); QString val=pItem1->GetStringValue().c_str();
float val1=val.toFloat(); float val1=val.toFloat();
if(sdep==val1) { if(sdep==val1) {
AfxMessageBox("当前深度段已存在!"); QMessageBox::information(NULL,"提示","当前深度段已存在!");
return; return;
} }
sdeps.push_back(val1); sdeps.push_back(val1);
val=pItem2->GetStringValue().c_str(); val=pItem2->GetStringValue().c_str();
val1=val.toFloat(); val1=val.toFloat();
if(sdep==val1) { if(sdep==val1) {
AfxMessageBox("当前深度段已存在!"); QMessageBox::information(NULL,"提示","当前深度段已存在!");
return; return;
} }
edeps.push_back(val1); edeps.push_back(val1);
@ -1220,7 +1220,7 @@ void ParameterEditorModel::DeleteDepth(float sdep,QString ID)
CCompositeParameterItem* Zones=pArrayItem; CCompositeParameterItem* Zones=pArrayItem;
int count=Zones->GetChildCount(); int count=Zones->GetChildCount();
if(count<2) { if(count<2) {
AfxMessageBox("当前层段数小于2段,不可以删除!"); QMessageBox::information(NULL,"提示","当前层段数小于2段,不可以删除!");
return; return;
} }
for(int i=0;i<count;i++){ for(int i=0;i<count;i++){
@ -1359,7 +1359,7 @@ void ParameterEditorModel::slotOnArrayItemButtonClicked(QAbstractButton * pButto
if(!pArrayCategory) return; if(!pArrayCategory) return;
if(pArrayItem->GetChildCount()<2) if(pArrayItem->GetChildCount()<2)
{ {
AfxMessageBox("层段数为1不可以删除!"); QMessageBox::information(NULL,"提示","层段数为1不可以删除!");
return; return;
} }
ParameterProperty *pP1=ParameterPropertyFromIndex(m_currentindex); ParameterProperty *pP1=ParameterPropertyFromIndex(m_currentindex);

View File

@ -16,6 +16,8 @@
#include "ParameterItem.h" #include "ParameterItem.h"
#include <QTextCodec> #include <QTextCodec>
#include <QAction> #include <QAction>
#include <QMessageBox>
// void OSGFRAMEWORK_EXPORT AppendConsole(pai::log::Priority priority,const QString &output); // void OSGFRAMEWORK_EXPORT AppendConsole(pai::log::Priority priority,const QString &output);
using namespace pai::module; using namespace pai::module;
@ -134,7 +136,7 @@ float PELibraryModule::GetFloatParam(CModuleParameter * pModulePara,QString &par
QStringList strlst=str1.split("/"); QStringList strlst=str1.split("/");
int no=strlst.indexOf(val); int no=strlst.indexOf(val);
if(no<0) { if(no<0) {
AfxMessageBox("设计错误:选择项"+val+"不存在!"); QMessageBox::information(NULL,"提示","设计错误:选择项"+val+"不存在!");
no=0; no=0;
} }
str=QString::number(no); str=QString::number(no);
@ -147,7 +149,7 @@ float PELibraryModule::GetFloatParam(CModuleParameter * pModulePara,QString &par
int no=strlst.indexOf(val); int no=strlst.indexOf(val);
if(no<0) { if(no<0) {
str=val; str=val;
// AfxMessageBox("设计错误:选择项"+val+"不存在!"); // QMessageBox::information(NULL,"提示","设计错误:选择项"+val+"不存在!");
no=0; no=0;
} }
else str=QString::number(no); else str=QString::number(no);
@ -170,7 +172,7 @@ float PELibraryModule::GetFloatParam(CModuleParameter * pModulePara,QString &par
QString name=paramName; QString name=paramName;
int i=paramName.lastIndexOf("."); int i=paramName.lastIndexOf(".");
if(i>-1) name=paramName.mid(i+1); if(i>-1) name=paramName.mid(i+1);
// AfxMessageBox("参数"+name+"不存在!"); // QMessageBox::information(NULL,"提示","参数"+name+"不存在!");
str="0"; str="0";
return 0.0; return 0.0;
} }
@ -312,7 +314,7 @@ bool PELibraryModule::LoadParamFromLines(QStringList lines)
} }
if(!flag) if(!flag)
{ {
AfxMessageBox("错误,参数卡为空或无效值!\n请修改参数卡保存后,执行刷新参数或重新打开处理模块!"); QMessageBox::information(NULL,"提示","错误,参数卡为空或无效值!\n请修改参数卡保存后,执行刷新参数或重新打开处理模块!");
} }
return true; return true;
} }
@ -751,7 +753,7 @@ bool PELibraryModule::InitProcessMessage(struct INC_STRU *Inc,struct OUTC_STRU
QString anames=incnames.join(","); QString anames=incnames.join(",");
QString errorMsg=QString::fromStdString(GetMetaData()->GetName())+m_libraryfilename+"_"+strDLLFun+":模块编写不正常,其输入曲线定义与数目不匹配:"+"\n"; QString errorMsg=QString::fromStdString(GetMetaData()->GetName())+m_libraryfilename+"_"+strDLLFun+":模块编写不正常,其输入曲线定义与数目不匹配:"+"\n";
errorMsg=errorMsg+"输入曲线名为:"+ anames +"\n" +"输入曲线数目为:"+QString::number(Inc->Noi); errorMsg=errorMsg+"输入曲线名为:"+ anames +"\n" +"输入曲线数目为:"+QString::number(Inc->Noi);
AfxMessageBox(errorMsg); QMessageBox::information(NULL,"提示",errorMsg);
// AppendConsole(pai::log::PAI_WARN,errorMsg); // AppendConsole(pai::log::PAI_WARN,errorMsg);
return false; return false;
} }
@ -779,7 +781,7 @@ bool PELibraryModule::InitProcessMessage(struct INC_STRU *Inc,struct OUTC_STRU
QString errorMsg=QString::fromStdString(GetMetaData()->GetName())+m_libraryfilename+"_"+strDLLFun+":模块编写异常,其输出曲线定义与数目不匹配:"+"\n"; QString errorMsg=QString::fromStdString(GetMetaData()->GetName())+m_libraryfilename+"_"+strDLLFun+":模块编写异常,其输出曲线定义与数目不匹配:"+"\n";
errorMsg=errorMsg+"输出曲线名为:"+ anames +"\n" +"输出曲线数为:"+QString::number(Outc->Noo); errorMsg=errorMsg+"输出曲线名为:"+ anames +"\n" +"输出曲线数为:"+QString::number(Outc->Noo);
// AppendConsole(pai::log::PAI_WARN,errorMsg); // AppendConsole(pai::log::PAI_WARN,errorMsg);
AfxMessageBox(errorMsg); QMessageBox::information(NULL,"提示",errorMsg);
return false; return false;
} }
if(Outc){ if(Outc){
@ -977,7 +979,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
lpfnDllFunc = (LPFNDLLFUNC)(Methodlib.resolve(strDLLFun.toStdString().c_str()));//strDLLFun.toStdString().c_str()) lpfnDllFunc = (LPFNDLLFUNC)(Methodlib.resolve(strDLLFun.toStdString().c_str()));//strDLLFun.toStdString().c_str())
if(!lpfnDllFunc) if(!lpfnDllFunc)
{ {
AfxMessageBox("处理函数"+strDLLFun+"不存在,请检查配置文件!"); QMessageBox::information(NULL,"提示","处理函数"+strDLLFun+"不存在,请检查配置文件!");
m_pMemRdWt->Close(); m_pMemRdWt->Close();
return 0; return 0;
//入口函数不存在 //入口函数不存在
@ -986,7 +988,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
m_pMemRdWt->ZoneSdep=sdep; m_pMemRdWt->ZoneSdep=sdep;
m_pMemRdWt->ZoneEdep=edep; m_pMemRdWt->ZoneEdep=edep;
if(m_pMemRdWt->Const()<0) { if(m_pMemRdWt->Const()<0) {
AfxMessageBox("参数卡有误,运行被停止!"); QMessageBox::information(NULL,"提示","参数卡有误,运行被停止!");
m_pMemRdWt->Close(); m_pMemRdWt->Close();
return 0; return 0;
} }
@ -994,7 +996,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
if(errorinf) { if(errorinf) {
if(errorinf->ErrorNo<0) if(errorinf->ErrorNo<0)
{ {
AfxMessageBox(errorinf->ErrorStr); QMessageBox::information(NULL,"提示",errorinf->ErrorStr);
m_pMemRdWt->Close(); m_pMemRdWt->Close();
return 0; return 0;
} }
@ -1012,7 +1014,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
//mDP.CreatProgress(Hd->Stdep,Hd->Endep); //mDP.CreatProgress(Hd->Stdep,Hd->Endep);
DepthProgress DepthProgress; DepthProgress DepthProgress;
DepthProgress.CreatProgress(Hd->Stdep,Hd->Endep,"数据处理中...."); DepthProgress.CreatProgress(Hd->Stdep,Hd->Endep,"数据处理中....");
CString cs; QString cs;
int flag=1; int flag=1;
while ( 1 ) while ( 1 )
{ {
@ -1023,7 +1025,8 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
{ {
if ( errorinf->ErrorNo <=0 ) if ( errorinf->ErrorNo <=0 )
{ {
cs.Format("提示 : %s ",errorinf->ErrorStr); cs = QString("提示 : %s ").arg(errorinf->ErrorStr);
// cs.Format("提示 : %s ",errorinf->ErrorStr);
if(i<0)flag=i; if(i<0)flag=i;
else flag=errorinf->ErrorNo; else flag=errorinf->ErrorNo;
break; break;
@ -1067,7 +1070,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
if(flag>=0) { if(flag>=0) {
cs="处理完毕!"; cs="处理完毕!";
} }
else AfxMessageBox(cs); else QMessageBox::information(NULL,"提示",cs);
return flag; return flag;
} }
UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模块DLL UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模块DLL
@ -1077,7 +1080,7 @@ UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模
lpfnDllFunc = (LPFNDLLFUNC)(Methodlib.resolve(strDLLFun.toStdString().c_str()));//strDLLFun.toStdString().c_str()) lpfnDllFunc = (LPFNDLLFUNC)(Methodlib.resolve(strDLLFun.toStdString().c_str()));//strDLLFun.toStdString().c_str())
if(!lpfnDllFunc) if(!lpfnDllFunc)
{ {
AfxMessageBox("处理函数"+strDLLFun+"不存在,请检查配置文件!"); QMessageBox::information(NULL,"提示","处理函数"+strDLLFun+"不存在,请检查配置文件!");
//入口函数不存在 //入口函数不存在
m_pMemRdWt->Close(); m_pMemRdWt->Close();
return 0; return 0;
@ -1094,7 +1097,7 @@ UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模
m_pMemRdWt->ZoneSdep=sdep; m_pMemRdWt->ZoneSdep=sdep;
m_pMemRdWt->ZoneEdep=edep; m_pMemRdWt->ZoneEdep=edep;
if(m_pMemRdWt->Const()<0) { if(m_pMemRdWt->Const()<0) {
AfxMessageBox("参数卡有误,运行被停止!"); QMessageBox::information(NULL,"提示","参数卡有误,运行被停止!");
m_pMemRdWt->Close(); m_pMemRdWt->Close();
return 0; return 0;
} }
@ -1102,12 +1105,13 @@ UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模
if(edep!=-99999) Hd->EndDep=edep; if(edep!=-99999) Hd->EndDep=edep;
int i = lpfnDllFunc(); int i = lpfnDllFunc();
CString cs; QString cs;
if ( i < 0||(errorinf&&errorinf->ErrorNo<0) ) //运算出错 if ( i < 0||(errorinf&&errorinf->ErrorNo<0) ) //运算出错
{ {
if ( errorinf&&errorinf->ErrorNo <=0 ) if ( errorinf&&errorinf->ErrorNo <=0 )
{ {
cs.Format("提示 : %s ",errorinf->ErrorStr); cs = QString("提示 : %s ").arg(errorinf->ErrorStr);
// cs.Format("提示 : %s ",errorinf->ErrorStr);
if(i<0)flag=i; if(i<0)flag=i;
else flag=errorinf->ErrorNo; else flag=errorinf->ErrorNo;
} }
@ -1141,7 +1145,7 @@ UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模
// } // }
if(flag>=0) { if(flag>=0) {
} }
else AfxMessageBox(cs); else QMessageBox::information(NULL,"提示",cs);
return flag; return flag;
} }
@ -1317,7 +1321,7 @@ bool PELibraryModule::InitModule(QWidget*pWidget)
m_pMemRdWt=NULL; m_pMemRdWt=NULL;
if(strlen(errorinf->ErrorStr)) if(strlen(errorinf->ErrorStr))
{ {
AfxMessageBox(errorinf->ErrorStr); QMessageBox::information(NULL,"提示",errorinf->ErrorStr);
} }
Methodlib.unload(); Methodlib.unload();
iscreatemem=0; iscreatemem=0;
@ -1383,7 +1387,7 @@ bool PELibraryModule::InitModule(QWidget*pWidget)
// 如果dll中的输出曲线条数和名称数对不上则退出 // 如果dll中的输出曲线条数和名称数对不上则退出
// 如果dll中的参数个数和名称数对不上则退出 // 如果dll中的参数个数和名称数对不上则退出
if(!Conc) { if(!Conc) {
// AfxMessageBox("处理模块缺少参数名结构CONC_STRCT"); // QMessageBox::information(NULL,"提示","处理模块缺少参数名结构CONC_STRCT");
if(parDialog) if(parDialog)
{ {
parDialog->setParent(NULL); parDialog->setParent(NULL);
@ -1856,7 +1860,7 @@ QString PELibraryModule::GetINPParamCard(CMemRdWt *pMemrdWt,char *p,bool isSave
} }
strcpy(tempcon.stryy,stryy.toStdString().c_str()); strcpy(tempcon.stryy,stryy.toStdString().c_str());
} }
else AfxMessageBox("内部错误:井段"+QString(strPartIndex.c_str())); else QMessageBox::information(NULL,"提示","内部错误:井段"+QString(strPartIndex.c_str()));
} }
if(toTable){ if(toTable){
char strTmp[5] = "EDEP"; char strTmp[5] = "EDEP";
@ -1868,7 +1872,7 @@ QString PELibraryModule::GetINPParamCard(CMemRdWt *pMemrdWt,char *p,bool isSave
if(zoneCount<1) if(zoneCount<1)
{ {
result="0 0\r\n"; result="0 0\r\n";
if(Conc->Noc>0) AfxMessageBox("可视化参数为空!"); if(Conc->Noc>0) QMessageBox::information(NULL,"提示","可视化参数为空!");
} }
result=result+"END\r\n"; result=result+"END\r\n";
if(isSaveToEdit&&pEdit) { if(isSaveToEdit&&pEdit) {
@ -2014,7 +2018,7 @@ bool PELibraryModule::GetPARAM_TAB()
} }
if(!m_pMemRdWt->Open(GetSlfFileName().toStdString().c_str())) if(!m_pMemRdWt->Open(GetSlfFileName().toStdString().c_str()))
{ {
//AfxMessageBox("您还没有选择井文件或井文件不存在!在您运行之前,请选择井文件!"); //QMessageBox::information(NULL,"提示","您还没有选择井文件或井文件不存在!在您运行之前,请选择井文件!");
return false; return false;
} }
QString parmacard=GetINPParamCard(NULL,NULL,false); QString parmacard=GetINPParamCard(NULL,NULL,false);
@ -2031,7 +2035,7 @@ bool PELibraryModule::InitMemRdWt(double sdep,double edep,char*Zone,bool isSaveC
} }
if(!m_pMemRdWt->Open(GetSlfFileName().toStdString().c_str())) if(!m_pMemRdWt->Open(GetSlfFileName().toStdString().c_str()))
{ {
//AfxMessageBox("您还没有选择井文件或井文件不存在!在您运行之前,请选择井文件!"); //QMessageBox::information(NULL,"提示","您还没有选择井文件或井文件不存在!在您运行之前,请选择井文件!");
return false; return false;
} }
@ -2118,7 +2122,7 @@ QString PELibraryModule::ReadParamCardFromSLF(CMemRdWt *pMemRdWt,char *pParamNam
QFile file( paramSettingFileName ); QFile file( paramSettingFileName );
if(!file.exists()) { if(!file.exists()) {
// AfxMessageBox(paramSettingFileName+"常用参数配置文件不存在!"); // QMessageBox::information(NULL,"提示",paramSettingFileName+"常用参数配置文件不存在!");
} }
if (file.exists()&& file.open( QIODevice::ReadOnly ) ) { if (file.exists()&& file.open( QIODevice::ReadOnly ) ) {
QTextStream stream( &file ); QTextStream stream( &file );

View File

@ -179,6 +179,7 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
} }
else else
{ {
curv->m_bX2Y = false;
//curv->initWave2(m_strSlfName, strLineName); //curv->initWave2(m_strSlfName, strLineName);
curv->changePropertyWaveUpdate(); curv->changePropertyWaveUpdate();
} }
@ -2992,6 +2993,7 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
//绑定m_formTrack方便关联formInfo //绑定m_formTrack方便关联formInfo
curv->m_formTrack = m_formTrack; curv->m_formTrack = m_formTrack;
curv->m_strUuid = m_strUuid; curv->m_strUuid = m_strUuid;
curv->m_bX2Y = false;
//背景设置成透明色 //背景设置成透明色
curv->setBackground(Qt::transparent); curv->setBackground(Qt::transparent);
curv->setStyleSheet("background: transparent;"); curv->setStyleSheet("background: transparent;");
@ -4855,19 +4857,22 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st
widget->m_iY1 = m_iY1; widget->m_iY1 = m_iY1;
widget->m_iY2 = m_iY2; widget->m_iY2 = m_iY2;
// //
widget->xAxis->setRange(vmin, vmax); if (!widget->m_bX2Y)
widget->yAxis->setRange(m_iY1, m_iY2); {
widget->axisRect()->setupFullAxesBox(); widget->xAxis->setRange(vmin, vmax);
// widget->yAxis->setRange(m_iY1, m_iY2);
widget->xAxis->ticker()->setTickCount(10);//x个主刻度 widget->axisRect()->setupFullAxesBox();
widget->yAxis->ticker()->setTickCount(60);//y个主刻度 //
widget->xAxis->ticker()->setTickCount(10);//x个主刻度
//对调XY轴在最前面设置 widget->yAxis->ticker()->setTickCount(60);//y个主刻度
QCPAxis *yAxis = widget->yAxis;
QCPAxis *xAxis = widget->xAxis;
widget->xAxis = yAxis;
widget->yAxis = xAxis;
//对调XY轴在最前面设置
QCPAxis *yAxis = widget->yAxis;
QCPAxis *xAxis = widget->xAxis;
widget->xAxis = yAxis;
widget->yAxis = xAxis;
widget->m_bX2Y = true;
}
// //
// 横向点数,全部绘制 // 横向点数,全部绘制
int nPoint = _nSamples; int nPoint = _nSamples;
@ -5653,14 +5658,14 @@ void FormDraw::initResult(QMyCustomPlot *widget, QString strSlfName, QString str
m_LeftVal = 0; m_LeftVal = 0;
m_RightVal = 90; m_RightVal = 90;
//隐藏刻度 //隐藏刻度
widget->xAxis->setTicks(true); widget->xAxis->setTicks(false);
widget->yAxis->setTicks(true); widget->yAxis->setTicks(false);
widget->xAxis2->setTicks(true); widget->xAxis2->setTicks(false);
widget->yAxis2->setTicks(true); widget->yAxis2->setTicks(false);
widget->xAxis->setTickLabels(true); widget->xAxis->setTickLabels(false);
widget->yAxis->setTickLabels(true); widget->yAxis->setTickLabels(false);
widget->xAxis2->setTickLabels(true); widget->xAxis2->setTickLabels(false);
widget->xAxis2->setTickLabels(true); widget->xAxis2->setTickLabels(false);
// //
LoadFromSLF_Result(widget, strSlfName, strLineName); LoadFromSLF_Result(widget, strSlfName, strLineName);
@ -5930,15 +5935,14 @@ void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString str
void FormDraw::initDepth(QMyCustomPlot *curv) void FormDraw::initDepth(QMyCustomPlot *curv)
{ {
// x轴隐藏 // x轴隐藏
curv->xAxis->setTicks(false); curv->yAxis->setTicks(true);
curv->xAxis->setSubTicks(false); curv->yAxis->setTickLabels(true);
curv->xAxis->setTickLabels(false);
curv->yAxis->setTickLabelSide(QCPAxis::lsInside); curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
QFont font1("微软雅黑", 8); QFont font1("微软雅黑", 8);
curv->yAxis->setTickLabelFont(font1); curv->yAxis->setTickLabelFont(font1);
curv->yAxis->setRange(qAbs(m_iY1), m_iY2); curv->yAxis->setRange(m_iY1, m_iY2);
curv->yAxis->setRangeReversed(true); //curv->yAxis->setRangeReversed(true);
curv->axisRect()->setupFullAxesBox(); curv->axisRect()->setupFullAxesBox();
curv->yAxis->ticker()->setTickCount(60);//y个主刻度 curv->yAxis->ticker()->setTickCount(60);//y个主刻度

View File

@ -146,7 +146,7 @@ public:
bool m_bShowScale; // 显示刻度 bool m_bShowScale; // 显示刻度
float m_fWaveBase = 0.0f; // 波列基值 float m_fWaveBase = 0.0f; // 波列基值
int m_nWaveJg = 100; // 波形间隔 int m_nWaveJg = 10; // 波形间隔
float m_fWaveHei = 1; // 波形高度 float m_fWaveHei = 1; // 波形高度
int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数 int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数

View File

@ -65,9 +65,14 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
yAxis->setTickLabels(false); yAxis->setTickLabels(false);
} }
// //
xAxis->setTickLabels(false); xAxis->setTicks(false);
xAxis2->setTickLabels(false); yAxis->setTicks(false);
yAxis2->setTickLabels(false); xAxis2->setTicks(false);
yAxis2->setTicks(false);
xAxis->setTickLabels(false);
yAxis->setTickLabels(false);
xAxis2->setTickLabels(false);
xAxis2->setTickLabels(false);
//套管组件 //套管组件
zoneOrder_Tubing.clear(); zoneOrder_Tubing.clear();
@ -216,11 +221,13 @@ void QMyCustomPlot::changePropertyWaveUpdate()
else if (m_nDrawType == 2) else if (m_nDrawType == 2)
{ {
if (this->m_colorMap) if (this->m_colorMap)
{
this->m_colorMap->setVisible(true); this->m_colorMap->setVisible(true);
this->m_colorMap->data()->clear();
}
clearGraphs(); clearGraphs();
clearItems(); clearItems();
this->m_bX2Y = true;
this->initWave(m_strSlfName, m_strLineName); this->initWave(m_strSlfName, m_strLineName);
} }
} }
@ -242,12 +249,15 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
float _SDep, _EDep, _Rlev; float _SDep, _EDep, _Rlev;
_SDep = _wave.StartDepth; _SDep = _wave.StartDepth;
_EDep = _wave.EndDepth; _EDep = _wave.EndDepth;
m_SDep = _SDep;
m_EDep = _EDep;
// _SDep = 0.0 - m_iY2; // _SDep = 0.0 - m_iY2;
// _EDep = 0.0 - m_iY1; // _EDep = 0.0 - m_iY1;
_Rlev = _wave.DepLevel; _Rlev = _wave.DepLevel;
int m_Record = (float)(fabs((_EDep - _SDep) / _Rlev + 0.5)); int m_Record = (float)(fabs((_EDep - _SDep) / _Rlev + 0.5));
int _nSamples = _wave.TimeSamples; int _nSamples = _wave.TimeSamples;
m_nSamples = _nSamples;
if (m_fScaleV <= 0.0f) if (m_fScaleV <= 0.0f)
m_fScaleV = _nSamples; m_fScaleV = _nSamples;
char *value = new char[(_nSamples + 1)*m_Record*_wave.CodeLen + 1]; char *value = new char[(_nSamples + 1)*m_Record*_wave.CodeLen + 1];
@ -258,16 +268,33 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
bool bFistValue = false; bool bFistValue = false;
float vmax = -9999;//(float)_nSamples; float vmax = -9999;//(float)_nSamples;
float vmin = -9999; float vmin = -9999;
//
#define W_NEW
#ifdef W_NEW
float detp = _SDep; float detp = _SDep;
float edepc = _EDep; float edepc = _EDep;
if (m_nWaveJg < 10) if (m_nWaveJg < 10)
m_nWaveJg = 10; m_nWaveJg = 10;
float m_r = _Rlev * m_nWaveJg; float m_r = _Rlev * m_nWaveJg;
float m_MoveDep = 0.0f; float m_MoveDep = 0.0f;
QVector< QVector <double>> vecWave;
float yscale = 1;
if (m_nWaveHei > 1)
{
float DifBase = 1;
if (m_nDrawType == 2 || m_nDrawType == 6 || m_nDrawType == 10) {
DifBase = (m_MaxRange - m_Base) / m_nColorNum;
}
else {
DifBase = (m_MaxRange - m_Base) / 1;
}
if (fabs(DifBase) <= 1e-6) DifBase = 1;
yscale = m_nWaveHei + DifBase;
yscale = yscale / DifBase;
}
//QVector< QVector <double>> vecWave;
m_vecWaveData.clear();
for (float dep1 = detp - 10 * m_r; dep1 < edepc + m_MoveDep + 10 * m_r; dep1 += m_r) for (float dep1 = detp - 10 * m_r; dep1 < edepc + m_MoveDep + 10 * m_r; dep1 += m_r)
{ {
int iIndex = Slf_Int(dep1 + m_MoveDep, _SDep, _Rlev); int iIndex = Slf_Int(dep1 + m_MoveDep, _SDep, _Rlev);
@ -282,7 +309,8 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
for (int kk = 0; kk < _nSamples; kk++) for (int kk = 0; kk < _nSamples; kk++)
{ {
double val = GetData(_wave.RepCode, (char *)&value[iIndex * _nSamples*_wave.CodeLen + kk * _wave.CodeLen]); double val = GetData(_wave.RepCode, (char *)&value[iIndex * _nSamples*_wave.CodeLen + kk * _wave.CodeLen]);
ve[kk] = val; //ve[kk] = val;
ve[kk] = (int)((val - m_Base)*yscale);
if (val == -9999) if (val == -9999)
{ {
continue; continue;
@ -298,33 +326,9 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
if (vmax < val)vmax = val; if (vmax < val)vmax = val;
if (vmin > val)vmin = val; if (vmin > val)vmin = val;
} }
vecWave << ve; m_vecWaveData << ve;
} }
#else
double** wavedata = widget->getWavedata(_nSamples, m_Record);
for (int i = 0; i < m_Record; i++)
{
for (int kk = 0; kk < _nSamples; kk++)
{
double val = GetData(_wave.RepCode, (char *)&value[(kk)*_wave.CodeLen + i * _nSamples*_wave.CodeLen]);
wavedata[kk][i] = val;
if (val == -9999)
{
continue;
}
if (bFistValue == false)
{
//最大值,最小值默认采用第一个有效值
bFistValue = true;
vmax = vmin = val;
}
//
if (vmax < val)vmax = val;
if (vmin > val)vmin = val;
}
}
#endif
delete[] value; delete[] value;
float f = 264 / 269.0f; float f = 264 / 269.0f;
@ -334,24 +338,31 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
widget->m_iY1 = m_iY1; widget->m_iY1 = m_iY1;
widget->m_iY2 = m_iY2; widget->m_iY2 = m_iY2;
// //
widget->xAxis->setRange(vmin, vmax); if (!widget->m_bX2Y)
widget->yAxis->setRange(m_iY1, m_iY2); {
widget->axisRect()->setupFullAxesBox(); widget->xAxis->setRange(vmin, vmax);
// widget->yAxis->setRange(m_iY1, m_iY2);
widget->xAxis->ticker()->setTickCount(10);//x个主刻度 widget->axisRect()->setupFullAxesBox();
widget->yAxis->ticker()->setTickCount(60);//y个主刻度 //
widget->xAxis->ticker()->setTickCount(10);//x个主刻度
widget->yAxis->ticker()->setTickCount(60);//y个主刻度
widget->xAxis->setTicks(false); widget->xAxis->setTicks(false);
widget->yAxis->setTicks(false); widget->yAxis->setTicks(false);
widget->xAxis2->setTicks(false); widget->xAxis2->setTicks(false);
widget->yAxis2->setTicks(false); widget->yAxis2->setTicks(false);
widget->xAxis->setTickLabels(false);
//对调XY轴在最前面设置 widget->yAxis->setTickLabels(false);
QCPAxis *yAxis = widget->yAxis; widget->xAxis2->setTickLabels(false);
QCPAxis *xAxis = widget->xAxis; widget->xAxis2->setTickLabels(false);
widget->xAxis = yAxis;
widget->yAxis = xAxis;
//对调XY轴在最前面设置
QCPAxis *yAxis = widget->yAxis;
QCPAxis *xAxis = widget->xAxis;
widget->xAxis = yAxis;
widget->yAxis = xAxis;
widget->m_bX2Y = true;
}
widget->m_fmin = vmin; widget->m_fmin = vmin;
widget->m_fmax = vmax * f; widget->m_fmax = vmax * f;
@ -362,53 +373,8 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
QCPColorMap *colorMap = new QCPColorMap(widget->xAxis, widget->yAxis); QCPColorMap *colorMap = new QCPColorMap(widget->xAxis, widget->yAxis);
widget->m_colorMap = colorMap; widget->m_colorMap = colorMap;
int nx = m_Record;
int ny = _nSamples;
#ifdef W_NEW
nx = vecWave.size();
#endif
colorMap->data()->setSize(nx, ny); // 我们希望彩色地图有nx*ny的数据点
//colorMap->data()->setRange(QCPRange(m_iY1, m_iY2), QCPRange(vmin, vmax)); // 并在键x和值y维上跨越坐标范围-4..4
colorMap->data()->setRange(QCPRange(0 - _EDep, 0 - _SDep), QCPRange(vmin, widget->m_fmax));
#ifdef W_NEW
double x, y, z;
for (int xIndex = 0; xIndex < nx; ++xIndex)
{
for (int yIndex = 0; yIndex < ny; ++yIndex)
{
double dz = vecWave[xIndex][yIndex];
if (m_nMode == 0)
{
if (dz == -9999)
{
dz = m_fmax;
}
}
else if (m_nMode == 1)
{
if (dz == -9999)
{
dz = m_fmin;
}
}
else if (m_nMode == 2)
{
if (dz == -9999)
{
dz = m_fmax;
}
else
{
dz = m_fmin;
}
}
m_colorMap->data()->setCell(nx - xIndex - 1, yIndex, dz);
}
}
#else
// 现在我们通过访问颜色贴图的QCPColorMapData实例来分配一些数据 // 现在我们通过访问颜色贴图的QCPColorMapData实例来分配一些数据
this->updateWave(); this->updateWave();
#endif // W_NEW
// 添加色标: // 添加色标:
QCPColorScale *colorScale = new QCPColorScale(widget); QCPColorScale *colorScale = new QCPColorScale(widget);
@ -445,11 +411,6 @@ void QMyCustomPlot::initWave2(QString strSlfName, QString strWaveName)
widget->xAxis->setRange(vmin, vmax); widget->xAxis->setRange(vmin, vmax);
widget->yAxis->setRange(m_iY1, m_iY2); widget->yAxis->setRange(m_iY1, m_iY2);
widget->axisRect()->setupFullAxesBox(); widget->axisRect()->setupFullAxesBox();
//
widget->xAxis->setTicks(false);
widget->yAxis->setTicks(false);
widget->xAxis2->setTicks(false);
widget->yAxis2->setTicks(false);
//注意不对调XY轴 //注意不对调XY轴
widget->m_bX2Y = false; widget->m_bX2Y = false;
@ -643,58 +604,36 @@ void QMyCustomPlot::setSchemeIndex(int nidx, int colorNum)
m_colorMap->setGradient(gradient); m_colorMap->setGradient(gradient);
} }
double** QMyCustomPlot::getWavedata(int nrow, int ncol)
{
if (nrow > 0 && m_wavedata)
{
for (int i = 0; i < m_nRow; i++)
{
if (m_wavedata[i])
{
delete[] m_wavedata[i];
}
}
delete[] m_wavedata;
m_wavedata = NULL;
}
m_nRow = nrow;
m_nCol = ncol;
m_wavedata = new double*[nrow];
for (int kk = 0; kk < nrow; kk++) {
m_wavedata[kk] = new double[ncol];
}
return m_wavedata;
}
QCPColorMap * QMyCustomPlot::updateWave() QCPColorMap * QMyCustomPlot::updateWave()
{ {
int nx = m_nCol; int nx = m_vecWaveData.size();
int ny = m_nRow; int ny = m_nSamples;
m_colorMap->data()->setSize(nx, ny); // 我们希望彩色地图有nx*ny的数据点
m_colorMap->data()->setRange(QCPRange(0 - m_EDep, 0 - m_SDep), QCPRange(this->m_fmin, this->m_fmax));
// 现在我们通过访问颜色贴图的QCPColorMapData实例来分配一些数据
double x, y, z;
for (int xIndex = 0; xIndex < nx; ++xIndex) for (int xIndex = 0; xIndex < nx; ++xIndex)
{ {
for (int yIndex = 0; yIndex < ny; ++yIndex) for (int yIndex = 0; yIndex < ny; ++yIndex)
{ {
double dz = m_wavedata[yIndex][xIndex]; double dz = m_vecWaveData[xIndex][yIndex];
if (m_nMode == 0) if (m_nMode == 0)
{ {
if (m_wavedata[yIndex][xIndex] == -9999) if (dz == -9999)
{ {
dz = m_fmax; dz = m_fmax;
} }
} }
else if (m_nMode == 1) else if (m_nMode == 1)
{ {
if (m_wavedata[yIndex][xIndex] == -9999) if (dz == -9999)
{ {
dz = m_fmin; dz = m_fmin;
} }
} }
else if (m_nMode == 2) else if (m_nMode == 2)
{ {
if (m_wavedata[yIndex][xIndex] == -9999) if (dz == -9999)
{ {
dz = m_fmax; dz = m_fmax;
} }

View File

@ -58,28 +58,27 @@ public:
{ {
} }
void initGeometry(QString strUuid, int nscale, int nW); void initGeometry(QString strUuid, int nscale, int nW);
void changePropertyWaveUpdate(); void changePropertyWaveUpdate();
// 绘图类型-变密度(成像) // 绘图类型-变密度(成像)
void initWave(QString strSlfName, QString strWaveName); void initWave(QString strSlfName, QString strWaveName);
// 绘图类型-波形 // 绘图类型-波形
void initWave2(QString strSlfName, QString strWaveName); void initWave2(QString strSlfName, QString strWaveName);
void initColorTable(); void initColorTable();
void setSchemeIndex(int nidx, int colorNum); void setSchemeIndex(int nidx, int colorNum);
double** getWavedata(int nrow, int ncol); QCPColorMap * updateWave();
QCPColorMap * updateWave();
float getScaleV(); float getScaleV();
void groupBeginResult(float fEndDepth, float fStartDepth); void groupBeginResult(float fEndDepth, float fStartDepth);
void groupEndResult(); void groupEndResult();
// 设置解释结论属性 // 设置解释结论属性
void setShowProperty(QVariant val, int ntag); void setShowProperty(QVariant val, int ntag);
void setConclusionProportion(int nCopro); void setConclusionProportion(int nCopro);
void setShowPos(int nSPos); void setShowPos(int nSPos);
//道宽改变后,避免井壁取心等组件变形,需要重新刷新 //道宽改变后,避免井壁取心等组件变形,需要重新刷新
void resetPosition(); void resetPosition();
@ -96,7 +95,7 @@ protected:
//virtual void mouseMoveEvent(QMouseEvent *event); //virtual void mouseMoveEvent(QMouseEvent *event);
public: public:
// 井UUID // 井UUID
QString m_strUuid; QString m_strUuid;
QString m_strSlfName; QString m_strSlfName;
QString m_strWellName; QString m_strWellName;
@ -108,8 +107,8 @@ public:
// //
float m_iX1, m_iX2; float m_iX1, m_iX2;
float m_iY1, m_iY2; float m_iY1, m_iY2;
qint8 m_nLeftCross = 0; // 左跨道个数 qint8 m_nLeftCross = 0; // 左跨道个数
qint8 m_nRightCross = 0; // 右跨道个数 qint8 m_nRightCross = 0; // 右跨道个数
//填充曲线 //填充曲线
QCPGraph *graph_Fill=nullptr; QCPGraph *graph_Fill=nullptr;
@ -150,38 +149,38 @@ public:
bool singleDragMove = false; bool singleDragMove = false;
float singleOldPosition = 0; float singleOldPosition = 0;
QCPColorMap *m_colorMap = NULL; QCPColorMap *m_colorMap = NULL;
QCPColorScale * m_colorScale = NULL; QCPColorScale * m_colorScale = NULL;
double** m_wavedata = NULL; QVector< QVector <double>> m_vecWaveData;
int m_nRow = 0; int m_nRow = 0;
int m_nCol = 0; int m_nCol = 0;
int m_nDrawType = 2; // 绘图类型 int m_nDrawType = 2; // 绘图类型
// 0.全周 1.正半周 2.负半周 // 0.全周 1.正半周 2.负半周
int m_nMode = 1; int m_nMode = 1;
float m_fScaleV = 0.0f; float m_fScaleV = 0.0f;
float m_fmin; float m_fmin;
float m_fmax; float m_fmax;
int m_nColorNum = 256; int m_nColorNum = 256;
int m_nSchemeIndex = 1; int m_nSchemeIndex = 1;
bool m_bDrawDepth = false; // 绘制波深度 bool m_bDrawDepth = false; // 绘制波深度
bool m_bDrawBase = false; // 绘制波基线 bool m_bDrawBase = false; // 绘制波基线
bool m_bOddEven = false; // 奇偶配色 bool m_bOddEven = false; // 奇偶配色
float m_Base = 0.0f; // 波列基值 float m_Base = 0.0f; // 波列基值
float m_MaxRange = 1023.0f; float m_MaxRange = 1023.0f;
int m_nWaveJg = 1; int m_nWaveJg = 1;
int m_nWaveHei = 1; int m_nWaveHei = 1;
// 深度 第三个轴 // 深度 第三个轴
QCPAxis *m_yAxis2 = nullptr; QCPAxis *m_yAxis2 = nullptr;
QCPAxis *m_yAxis3 = nullptr; // 保存指针 QCPAxis *m_yAxis3 = nullptr; // 保存指针
public: public:
bool m_bEditor = false; // 编辑状态 bool m_bEditor = false; // 编辑状态
QCPItemStraightLine* m_pAddLine1 = NULL; QCPItemStraightLine* m_pAddLine1 = NULL;
QCPItemStraightLine* m_pAddLine2 = NULL; QCPItemStraightLine* m_pAddLine2 = NULL;
QString m_strGroupUid = ""; QString m_strGroupUid = "";
// 解释结论终止深度 // 解释结论终止深度
float m_fResultEndDepth = 0.0f; float m_fResultEndDepth = 0.0f;
QVector<double> m_x; QVector<double> m_x;
QVector<double> m_y; QVector<double> m_y;
int m_iCurNum=0; int m_iCurNum=0;
@ -192,8 +191,8 @@ public:
bool m_bFirstTimeConnect=true; //初次绑定编辑曲线信号槽。 bool m_bFirstTimeConnect=true; //初次绑定编辑曲线信号槽。
bool m_bPriviewRightList=false; //当前是否正在预览曲线。 bool m_bPriviewRightList=false; //当前是否正在预览曲线。
// 组 // 组
QMap<QString, QObject*> m_mapDragGroup; QMap<QString, QObject*> m_mapDragGroup;
QMap<QString, QObject*> m_mapDraggable_Rect; //文字结论 QMap<QString, QObject*> m_mapDraggable_Rect; //文字结论
QMap<QString, QObject*> m_mapDraggable_Layer; //地质分层 QMap<QString, QObject*> m_mapDraggable_Layer; //地质分层
@ -348,7 +347,7 @@ public:
void addLayerToPlot(double left_Low, double right_Hight, const QString strText, bool bRefresh=true, QColor crColor=QColor(255, 255, 255, 80)); void addLayerToPlot(double left_Low, double right_Hight, const QString strText, bool bRefresh=true, QColor crColor=QColor(255, 255, 255, 80));
//解释结论 //解释结论
TransparentGroupResult* addResultGroup(double left_Low, double right_Hight, QString &strUuid, QString strText = ""); TransparentGroupResult* addResultGroup(double left_Low, double right_Hight, QString &strUuid, QString strText = "");
void addResultToPlot(double left_Low, double right_Hight, QString myResult, QString &strUuid, QString strText=""); void addResultToPlot(double left_Low, double right_Hight, QString myResult, QString &strUuid, QString strText="");
//录井剖面 //录井剖面
@ -381,7 +380,7 @@ public:
void addRightListToPlot( QList<double> new_DepthList, QList<double> new_ValueList); void addRightListToPlot( QList<double> new_DepthList, QList<double> new_ValueList);
public slots: public slots:
void slotSelectionRectAccepted(const QRect &rect, QMouseEvent *event); void slotSelectionRectAccepted(const QRect &rect, QMouseEvent *event);
void s_LineClicked(int index); void s_LineClicked(int index);
void onResetZoom(); void onResetZoom();
@ -513,23 +512,23 @@ public slots:
void DeleteItems_Tubing();//全部清空 void DeleteItems_Tubing();//全部清空
void RefreshItems_Tubing(); //刷新数据 void RefreshItems_Tubing(); //刷新数据
//右键--解释结论 //右键--解释结论
void onOpenEditResult(); void onOpenEditResult();
void onCloseEditResult(); void onCloseEditResult();
void DeleteItemGroup(); void DeleteItemGroup();
void updateGroupZone(); //更新层号 void updateGroupZone(); //更新层号
bool SaveToSLF_Result(); bool SaveToSLF_Result();
TransparentGroupResult* getCurGroupResult(double x_val); TransparentGroupResult* getCurGroupResult(double x_val);
// 筛选出选中的Group 并且排序 // 筛选出选中的Group 并且排序
QMap<double, TransparentGroupResult*> getSelectGroupResult(); QMap<double, TransparentGroupResult*> getSelectGroupResult();
void segmentationInnerLayer(); // 分割为层内层 void segmentationInnerLayer(); // 分割为层内层
void segmentationIndependentLayer(); // 分割为独立层 void segmentationIndependentLayer(); // 分割为独立层
void splitIndependentLayer(); // 拆分复合层成独立层 void splitIndependentLayer(); // 拆分复合层成独立层
void megResultLayer();// 合并 void megResultLayer();// 合并
bool getIsEditor(); bool getIsEditor();
// //
void addItems_Core(); void addItems_Core();
@ -548,7 +547,7 @@ public slots:
//Plot重新加载数据 //Plot重新加载数据
void s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName); void s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName);
void s_changeDrawProperty(QVariantList vlist); void s_changeDrawProperty(QVariantList vlist);
// 深度 // 深度
void s_changeDepthProperty(QVariantList vlist); void s_changeDepthProperty(QVariantList vlist);
@ -593,10 +592,10 @@ public:
bool mKedou = false; bool mKedou = false;
// //
bool mMousePress = false; bool mMousePress = false;
double m_dPressX = 0; double m_dPressX = 0;
QPoint mLastPos; QPoint mLastPos;
QCPSizeHandleManager *mSizeHandleManager; QCPSizeHandleManager *mSizeHandleManager;
virtual void mouseDoubleClickEvent(QMouseEvent *event); virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent *event); virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event); virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event); virtual void mouseReleaseEvent(QMouseEvent *event);
@ -639,6 +638,8 @@ public:
QString m_qsWellName,m_qsTable; QString m_qsWellName,m_qsTable;
QString m_qsDepth,m_qsDIP,m_qsDIR,m_qsID,m_qsProperty; // 控制曲线 QString m_qsDepth,m_qsDIP,m_qsDIR,m_qsID,m_qsProperty; // 控制曲线
float m_SDep,m_EDep,m_Rlev; float m_SDep,m_EDep,m_Rlev;
int m_nSamples = 0;
// 频率统计图 csCurveGrad曲线名 LeftVal3最小值 RightVal3最大值 nArc扇形 nR圆半径 crArc圆颜色 nArcLineWidth圆线宽度 bFill是否填充 // 频率统计图 csCurveGrad曲线名 LeftVal3最小值 RightVal3最大值 nArc扇形 nR圆半径 crArc圆颜色 nArcLineWidth圆线宽度 bFill是否填充
void drawFgrq(bool bTableData, QString csCurveDDIR, QString csCurveDANG, QString csCurveGrad, double LeftVal3, double RightVal3, int nArc, double nR, QColor crArc, int nArcLineWidth, bool bFill, QColor crFill, void drawFgrq(bool bTableData, QString csCurveDDIR, QString csCurveDANG, QString csCurveGrad, double LeftVal3, double RightVal3, int nArc, double nR, QColor crArc, int nArcLineWidth, bool bFill, QColor crFill,
int lineNumber, double lineHeight, int lineThickness, QColor lineColor, bool drawAnnotation, bool drawHistogram, int lineNumber, double lineHeight, int lineThickness, QColor lineColor, bool drawAnnotation, bool drawHistogram,