参照合同,toolbar追加单曲线头按钮,出图时支持只打印1个曲线头
This commit is contained in:
parent
1563ef410c
commit
e039ee426f
|
|
@ -305,8 +305,8 @@ void MainWindowCurve::initMainToolBar()
|
||||||
QIcon SaveAsPictureIcon(::GetImagePath()+"icon/SaveAsPicture.png");
|
QIcon SaveAsPictureIcon(::GetImagePath()+"icon/SaveAsPicture.png");
|
||||||
QIcon SaveAsPdfIcon(::GetImagePath()+"icon/ExportPDF.png");
|
QIcon SaveAsPdfIcon(::GetImagePath()+"icon/ExportPDF.png");
|
||||||
QIcon SaveAsSvgIcon(::GetImagePath()+"icon/ExportSVG.png");
|
QIcon SaveAsSvgIcon(::GetImagePath()+"icon/ExportSVG.png");
|
||||||
|
QIcon doubleHeadIcon(::GetImagePath()+"icon/oneortwohead.png");
|
||||||
QIcon runIcon(":/image/capacity.png");
|
QIcon runIcon(":/image/capacity.png");
|
||||||
QIcon debugIcon(":/image/anaysis.png");
|
|
||||||
QIcon loadIcon(":/image/export.png");
|
QIcon loadIcon(":/image/export.png");
|
||||||
|
|
||||||
//Main工具栏
|
//Main工具栏
|
||||||
|
|
@ -320,7 +320,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
m_SaveAsPictureAc = new QAction(SaveAsPictureIcon, "导出长图", this);
|
m_SaveAsPictureAc = new QAction(SaveAsPictureIcon, "导出长图", this);
|
||||||
m_SaveAsPdfAc = new QAction(SaveAsPdfIcon, "导出PDF", this);
|
m_SaveAsPdfAc = new QAction(SaveAsPdfIcon, "导出PDF", this);
|
||||||
m_SaveAsSvgAc = new QAction(SaveAsSvgIcon, "导出SVG", this);
|
m_SaveAsSvgAc = new QAction(SaveAsSvgIcon, "导出SVG", this);
|
||||||
// m_debugAc = new QAction(debugIcon, "撤销", this);
|
m_doubleHeadAc = new QAction(doubleHeadIcon, "单曲线头", this);
|
||||||
// m_loadAc = new QAction(loadIcon, "重做", this);
|
// m_loadAc = new QAction(loadIcon, "重做", this);
|
||||||
//m_openAc = new QAction(openFileIcon, "打开", this);
|
//m_openAc = new QAction(openFileIcon, "打开", this);
|
||||||
|
|
||||||
|
|
@ -331,18 +331,21 @@ void MainWindowCurve::initMainToolBar()
|
||||||
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc); //锁头
|
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc); //锁头
|
||||||
//ui->mainToolBar->addAction(m_currtempliteAc);
|
//ui->mainToolBar->addAction(m_currtempliteAc);
|
||||||
ui->mainToolBar->addAction(m_saveastemplateAc); //另存为图文件
|
ui->mainToolBar->addAction(m_saveastemplateAc); //另存为图文件
|
||||||
|
ui->mainToolBar->addSeparator();
|
||||||
|
ui->mainToolBar->addAction(m_doubleHeadAc); //单曲线头
|
||||||
ui->mainToolBar->addAction(m_executeDepthShiftAc); //校深
|
ui->mainToolBar->addAction(m_executeDepthShiftAc); //校深
|
||||||
ui->mainToolBar->addAction(m_joindepthAc); //拼接
|
ui->mainToolBar->addAction(m_joindepthAc); //拼接
|
||||||
ui->mainToolBar->addAction(m_ModuleOpenAc);
|
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
|
||||||
ui->mainToolBar->addAction(m_SaveAsPictureAc);//导出长图
|
ui->mainToolBar->addSeparator();
|
||||||
ui->mainToolBar->addAction(m_SaveAsPdfAc);//导出PDF
|
ui->mainToolBar->addAction(m_SaveAsPictureAc); //导出长图
|
||||||
ui->mainToolBar->addAction(m_SaveAsSvgAc);//导出SVG
|
ui->mainToolBar->addAction(m_SaveAsPdfAc); //导出PDF
|
||||||
// ui->mainToolBar->addAction(m_debugAc);
|
ui->mainToolBar->addAction(m_SaveAsSvgAc); //导出SVG
|
||||||
// ui->mainToolBar->addAction(m_loadAc);
|
// ui->mainToolBar->addAction(m_loadAc);
|
||||||
//ui->mainToolBar->addAction(m_openAc);
|
//ui->mainToolBar->addAction(m_openAc);
|
||||||
|
|
||||||
// 设置为可选中
|
// 设置为可选中
|
||||||
m_fixwellsectionHeaderAc->setCheckable(true); //锁头
|
m_fixwellsectionHeaderAc->setCheckable(true); //锁头
|
||||||
|
m_doubleHeadAc->setCheckable(true); //单曲线头
|
||||||
m_executeDepthShiftAc->setCheckable(true); //校深
|
m_executeDepthShiftAc->setCheckable(true); //校深
|
||||||
m_joindepthAc->setCheckable(true); //拼接
|
m_joindepthAc->setCheckable(true); //拼接
|
||||||
|
|
||||||
|
|
@ -350,6 +353,8 @@ void MainWindowCurve::initMainToolBar()
|
||||||
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
||||||
connect(m_currtempliteAc, &QAction::triggered, this, &MainWindowCurve::s_currtemplite);
|
connect(m_currtempliteAc, &QAction::triggered, this, &MainWindowCurve::s_currtemplite);
|
||||||
connect(m_saveastemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Save);
|
connect(m_saveastemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Save);
|
||||||
|
|
||||||
|
connect(m_doubleHeadAc, &QAction::triggered, this, &MainWindowCurve::s_DoubleHead);
|
||||||
connect(m_executeDepthShiftAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteDepthShift);
|
connect(m_executeDepthShiftAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteDepthShift);
|
||||||
connect(m_joindepthAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteMerge);
|
connect(m_joindepthAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteMerge);
|
||||||
|
|
||||||
|
|
@ -2600,6 +2605,12 @@ void MainWindowCurve::s_Save()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//单曲线头
|
||||||
|
void MainWindowCurve::s_DoubleHead()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//校深
|
//校深
|
||||||
void MainWindowCurve::s_ExecuteDepthShift()
|
void MainWindowCurve::s_ExecuteDepthShift()
|
||||||
{
|
{
|
||||||
|
|
@ -3022,6 +3033,12 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
||||||
int iTableSize_Head = 0;
|
int iTableSize_Head = 0;
|
||||||
getTableSize_Head(iTableSize_Head);
|
getTableSize_Head(iTableSize_Head);
|
||||||
//
|
//
|
||||||
|
bool bDoubleHead = true;
|
||||||
|
if(m_doubleHeadAc->isChecked())
|
||||||
|
{
|
||||||
|
bDoubleHead = false;
|
||||||
|
}
|
||||||
|
|
||||||
int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head -1;
|
int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head -1;
|
||||||
//图片高度
|
//图片高度
|
||||||
int iTotalSize_Height = iHight_Head+iHight_Tail;
|
int iTotalSize_Height = iHight_Head+iHight_Tail;
|
||||||
|
|
@ -3032,8 +3049,14 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
||||||
dLastHeight = (m_iY2-m_iY1) *100.0/(double)m_iScale * g_dPixelPerCm - iNum*iHeightOfScreen;
|
dLastHeight = (m_iY2-m_iY1) *100.0/(double)m_iScale * g_dPixelPerCm - iNum*iHeightOfScreen;
|
||||||
iNum++;
|
iNum++;
|
||||||
}
|
}
|
||||||
iTotalSize_Height += iTableWellTrack_height*2 + (iNum-1)*iHeightOfScreen + (int)dLastHeight;//双道头
|
//双道头
|
||||||
|
if(bDoubleHead)
|
||||||
|
{
|
||||||
|
iTotalSize_Height += iTableWellTrack_height*2 + (iNum-1)*iHeightOfScreen + (int)dLastHeight;//双道头
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
iTotalSize_Height += iTableWellTrack_height + (iNum-1)*iHeightOfScreen + (int)dLastHeight;//单道头
|
||||||
|
}
|
||||||
QString filename;
|
QString filename;
|
||||||
filename=GetProjectFolder();
|
filename=GetProjectFolder();
|
||||||
filename+="temp.tif";
|
filename+="temp.tif";
|
||||||
|
|
@ -3079,7 +3102,14 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
||||||
}
|
}
|
||||||
|
|
||||||
//中间
|
//中间
|
||||||
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, 1);//道头是第1页
|
//双道头
|
||||||
|
if(bDoubleHead)
|
||||||
|
{
|
||||||
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, 1);//道头是第1页
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+1, 1);//道头是第1页
|
||||||
|
}
|
||||||
mDepthProgress.SetShowName(s);
|
mDepthProgress.SetShowName(s);
|
||||||
mDepthProgress.SetDepth(1);
|
mDepthProgress.SetDepth(1);
|
||||||
//
|
//
|
||||||
|
|
@ -3108,7 +3138,15 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
||||||
int iLoop = 0;
|
int iLoop = 0;
|
||||||
for(iLoop = 0; iLoop<iNum; iLoop++)
|
for(iLoop = 0; iLoop<iNum; iLoop++)
|
||||||
{
|
{
|
||||||
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, iLoop+2);//道头是第1页
|
//双道头
|
||||||
|
if(bDoubleHead)
|
||||||
|
{
|
||||||
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, iLoop+2);//道头是第1页
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+1, iLoop+2);//道头是第1页
|
||||||
|
}
|
||||||
|
|
||||||
mDepthProgress.SetShowName(s);
|
mDepthProgress.SetShowName(s);
|
||||||
mDepthProgress.SetDepth(iLoop+2);
|
mDepthProgress.SetDepth(iLoop+2);
|
||||||
|
|
||||||
|
|
@ -3172,28 +3210,53 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
||||||
{
|
{
|
||||||
//pdf,svg
|
//pdf,svg
|
||||||
//双道头
|
//双道头
|
||||||
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
|
if(bDoubleHead)
|
||||||
mDepthProgress.SetShowName(s);
|
{
|
||||||
mDepthProgress.SetDepth(iNumShow+2);
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
|
||||||
//
|
mDepthProgress.SetShowName(s);
|
||||||
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_wellTrackInfo);
|
mDepthProgress.SetDepth(iNumShow+2);
|
||||||
//尾
|
//
|
||||||
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail);
|
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_wellTrackInfo);
|
||||||
//结束
|
//尾
|
||||||
painter.end();
|
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail);
|
||||||
|
//结束
|
||||||
|
painter.end();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+1, iNumShow+1);
|
||||||
|
mDepthProgress.SetShowName(s);
|
||||||
|
mDepthProgress.SetDepth(iNumShow+1);
|
||||||
|
//尾
|
||||||
|
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail);
|
||||||
|
//结束
|
||||||
|
painter.end();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//双道头
|
//双道头
|
||||||
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
|
if(bDoubleHead)
|
||||||
mDepthProgress.SetShowName(s);
|
|
||||||
mDepthProgress.SetDepth(iNumShow+2);
|
|
||||||
//
|
|
||||||
images.append(convertToQImage(pPixmap_wellTrackInfo)); // 将QPixmap转换为QImage并存储到列表中
|
|
||||||
//尾
|
|
||||||
if(iHight_Tail)
|
|
||||||
{
|
{
|
||||||
images.append(convertToQImage(pPixmap_Tail)); // 将QPixmap转换为QImage并存储到列表中
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
|
||||||
|
mDepthProgress.SetShowName(s);
|
||||||
|
mDepthProgress.SetDepth(iNumShow+2);
|
||||||
|
//
|
||||||
|
images.append(convertToQImage(pPixmap_wellTrackInfo)); // 将QPixmap转换为QImage并存储到列表中
|
||||||
|
//尾
|
||||||
|
if(iHight_Tail)
|
||||||
|
{
|
||||||
|
images.append(convertToQImage(pPixmap_Tail)); // 将QPixmap转换为QImage并存储到列表中
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sprintf(s,"图片生成中,共计%d页,正在生成第%d页..", iNumShow+1, iNumShow+1);
|
||||||
|
mDepthProgress.SetShowName(s);
|
||||||
|
mDepthProgress.SetDepth(iNumShow+1);
|
||||||
|
//尾
|
||||||
|
if(iHight_Tail)
|
||||||
|
{
|
||||||
|
images.append(convertToQImage(pPixmap_Tail)); // 将QPixmap转换为QImage并存储到列表中
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -189,13 +189,13 @@ public:
|
||||||
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
|
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
|
||||||
QAction* m_currtempliteAc = nullptr; //加载图文件
|
QAction* m_currtempliteAc = nullptr; //加载图文件
|
||||||
QAction* m_saveastemplateAc = nullptr; //另存为图文件
|
QAction* m_saveastemplateAc = nullptr; //另存为图文件
|
||||||
|
QAction* m_doubleHeadAc = nullptr; //单曲线头
|
||||||
QAction* m_executeDepthShiftAc = nullptr; //校深
|
QAction* m_executeDepthShiftAc = nullptr; //校深
|
||||||
QAction* m_joindepthAc = nullptr; //拼接
|
QAction* m_joindepthAc = nullptr; //拼接
|
||||||
QAction* m_ModuleOpenAc = nullptr; //处理方法
|
QAction* m_ModuleOpenAc = nullptr; //处理方法
|
||||||
QAction* m_SaveAsPictureAc = nullptr; //导出长图
|
QAction* m_SaveAsPictureAc = nullptr; //导出长图
|
||||||
QAction* m_SaveAsPdfAc = nullptr; //导出PDF
|
QAction* m_SaveAsPdfAc = nullptr; //导出PDF
|
||||||
QAction* m_SaveAsSvgAc = nullptr; //导出SVG
|
QAction* m_SaveAsSvgAc = nullptr; //导出SVG
|
||||||
//QAction* m_doubleHeadAc = nullptr; //单曲线头
|
|
||||||
// QAction* m_debugAc = nullptr; //
|
// QAction* m_debugAc = nullptr; //
|
||||||
// QAction* m_loadAc = nullptr; //加载
|
// QAction* m_loadAc = nullptr; //加载
|
||||||
|
|
||||||
|
|
@ -277,6 +277,7 @@ public slots:
|
||||||
void s_showHeadTable(); //显示/隐藏图头
|
void s_showHeadTable(); //显示/隐藏图头
|
||||||
void s_currtemplite(); //加载图文件
|
void s_currtemplite(); //加载图文件
|
||||||
void s_Save(); //保存图文件
|
void s_Save(); //保存图文件
|
||||||
|
void s_DoubleHead(); //单曲线头
|
||||||
void s_ExecuteDepthShift(); //校深
|
void s_ExecuteDepthShift(); //校深
|
||||||
void s_ExecuteMerge(); //拼接
|
void s_ExecuteMerge(); //拼接
|
||||||
void s_ModuleOpen(); //处理算法
|
void s_ModuleOpen(); //处理算法
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user