可是解释的toolbar,追加图像自滚功能。
This commit is contained in:
parent
be10b64554
commit
865c0da6f0
|
|
@ -309,7 +309,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
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 doubleHeadIcon(::GetImagePath()+"icon/oneortwohead.png");
|
||||||
QIcon runIcon(":/image/capacity.png");
|
QIcon autorollIcon(::GetImagePath()+"icon/Autoroll.png");
|
||||||
QIcon loadIcon(":/image/export.png");
|
QIcon loadIcon(":/image/export.png");
|
||||||
|
|
||||||
//Main工具栏
|
//Main工具栏
|
||||||
|
|
@ -317,14 +317,14 @@ void MainWindowCurve::initMainToolBar()
|
||||||
m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this);
|
m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this);
|
||||||
m_currtempliteAc = new QAction(currtempliteIcon, "加载图文件", this);
|
m_currtempliteAc = new QAction(currtempliteIcon, "加载图文件", this);
|
||||||
m_saveastemplateAc = new QAction(saveastemplateIcon, "另存为图文件", this);
|
m_saveastemplateAc = new QAction(saveastemplateIcon, "另存为图文件", this);
|
||||||
|
m_doubleHeadAc = new QAction(doubleHeadIcon, "单曲线头", this);
|
||||||
m_executeDepthShiftAc = new QAction(executeDepthShiftIcon, "校深", this);
|
m_executeDepthShiftAc = new QAction(executeDepthShiftIcon, "校深", this);
|
||||||
m_joindepthAc = new QAction(joindepthIcon, "拼接", this);
|
m_joindepthAc = new QAction(joindepthIcon, "拼接", this);
|
||||||
|
m_autorollAc = new QAction(autorollIcon, "图像自滚", this);
|
||||||
m_ModuleOpenAc = new QAction(ModuleOpenIcon, "处理方法", this);
|
m_ModuleOpenAc = new QAction(ModuleOpenIcon, "处理方法", this);
|
||||||
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_doubleHeadAc = new QAction(doubleHeadIcon, "单曲线头", this);
|
|
||||||
// m_loadAc = new QAction(loadIcon, "重做", this);
|
|
||||||
//m_openAc = new QAction(openFileIcon, "打开", this);
|
//m_openAc = new QAction(openFileIcon, "打开", this);
|
||||||
|
|
||||||
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧
|
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧
|
||||||
|
|
@ -338,6 +338,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
ui->mainToolBar->addAction(m_doubleHeadAc); //单曲线头
|
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_autorollAc); //图像自滚
|
||||||
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
|
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
|
||||||
ui->mainToolBar->addSeparator();
|
ui->mainToolBar->addSeparator();
|
||||||
ui->mainToolBar->addAction(m_SaveAsPictureAc); //导出长图
|
ui->mainToolBar->addAction(m_SaveAsPictureAc); //导出长图
|
||||||
|
|
@ -351,6 +352,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
m_doubleHeadAc->setCheckable(true); //单曲线头
|
m_doubleHeadAc->setCheckable(true); //单曲线头
|
||||||
m_executeDepthShiftAc->setCheckable(true); //校深
|
m_executeDepthShiftAc->setCheckable(true); //校深
|
||||||
m_joindepthAc->setCheckable(true); //拼接
|
m_joindepthAc->setCheckable(true); //拼接
|
||||||
|
m_autorollAc->setCheckable(true); //图像自滚
|
||||||
|
|
||||||
connect(m_selectWellAc, &QAction::triggered, this, &MainWindowCurve::s_selectWell);
|
connect(m_selectWellAc, &QAction::triggered, this, &MainWindowCurve::s_selectWell);
|
||||||
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
||||||
|
|
@ -360,6 +362,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
connect(m_doubleHeadAc, &QAction::triggered, this, &MainWindowCurve::s_DoubleHead);
|
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);
|
||||||
|
connect(m_autorollAc, &QAction::triggered, this, &MainWindowCurve::s_Autoroll);
|
||||||
|
|
||||||
connect(m_ModuleOpenAc, &QAction::triggered, this, &MainWindowCurve::s_ModuleOpen);
|
connect(m_ModuleOpenAc, &QAction::triggered, this, &MainWindowCurve::s_ModuleOpen);
|
||||||
connect(m_SaveAsPictureAc, &QAction::triggered, this, &MainWindowCurve::s_SaveAsPicture);
|
connect(m_SaveAsPictureAc, &QAction::triggered, this, &MainWindowCurve::s_SaveAsPicture);
|
||||||
|
|
@ -2614,6 +2617,43 @@ void MainWindowCurve::s_DoubleHead()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//图像自滚
|
||||||
|
void MainWindowCurve::s_Autoroll()
|
||||||
|
{
|
||||||
|
if(m_clockTimer) {
|
||||||
|
m_clockTimer->stop();
|
||||||
|
delete m_clockTimer;
|
||||||
|
m_clockTimer = NULL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_clockTimer = new QTimer();
|
||||||
|
connect(m_clockTimer, SIGNAL(timeout()), this, SLOT(onTimer()));
|
||||||
|
m_clockTimer->setInterval(1000);
|
||||||
|
m_clockTimer->start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//图像自滚,定时器处理
|
||||||
|
void MainWindowCurve::onTimer()
|
||||||
|
{
|
||||||
|
int step=ui->verticalScrollBar->pageStep();
|
||||||
|
if(step<1)
|
||||||
|
{
|
||||||
|
step=10;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
int maxval=-m_iY1;
|
||||||
|
int val=ui->verticalScrollBar->value();
|
||||||
|
if(val+step<maxval)
|
||||||
|
{
|
||||||
|
ui->verticalScrollBar->setValue(val+step);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->verticalScrollBar->setValue(-m_iY2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//校深
|
//校深
|
||||||
void MainWindowCurve::s_ExecuteDepthShift()
|
void MainWindowCurve::s_ExecuteDepthShift()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,8 @@ public:
|
||||||
double m_iY1=-1000;
|
double m_iY1=-1000;
|
||||||
double m_iY2=0;
|
double m_iY2=0;
|
||||||
int m_iCurPage = 1;//当前页
|
int m_iCurPage = 1;//当前页
|
||||||
|
//图像自滚定时器
|
||||||
|
QTimer *m_clockTimer = nullptr;
|
||||||
public:
|
public:
|
||||||
//展示所有井
|
//展示所有井
|
||||||
void DisplayWells(QJsonArray wellsArray);
|
void DisplayWells(QJsonArray wellsArray);
|
||||||
|
|
@ -192,6 +194,7 @@ public:
|
||||||
QAction* m_doubleHeadAc = nullptr; //单曲线头
|
QAction* m_doubleHeadAc = nullptr; //单曲线头
|
||||||
QAction* m_executeDepthShiftAc = nullptr; //校深
|
QAction* m_executeDepthShiftAc = nullptr; //校深
|
||||||
QAction* m_joindepthAc = nullptr; //拼接
|
QAction* m_joindepthAc = nullptr; //拼接
|
||||||
|
QAction* m_autorollAc = 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
|
||||||
|
|
@ -280,6 +283,7 @@ public slots:
|
||||||
void s_DoubleHead(); //单曲线头
|
void s_DoubleHead(); //单曲线头
|
||||||
void s_ExecuteDepthShift(); //校深
|
void s_ExecuteDepthShift(); //校深
|
||||||
void s_ExecuteMerge(); //拼接
|
void s_ExecuteMerge(); //拼接
|
||||||
|
void s_Autoroll(); //图像自滚
|
||||||
void s_ModuleOpen(); //处理算法
|
void s_ModuleOpen(); //处理算法
|
||||||
void s_SaveAsPicture(); //导出长图
|
void s_SaveAsPicture(); //导出长图
|
||||||
void s_SaveAsPdf(); //导出PDF
|
void s_SaveAsPdf(); //导出PDF
|
||||||
|
|
@ -288,6 +292,9 @@ public slots:
|
||||||
void _slotExport(QPrinter &printer, int IsBmp, QString pngName, QString strTmpName);
|
void _slotExport(QPrinter &printer, int IsBmp, QString pngName, QString strTmpName);
|
||||||
//打印出图,改变深度
|
//打印出图,改变深度
|
||||||
void changeDepthForPrint();
|
void changeDepthForPrint();
|
||||||
|
|
||||||
|
//图像自滚,定时器处理
|
||||||
|
void onTimer();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOWCURVE_H
|
#endif // MAINWINDOWCURVE_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user