多井,工具条追加“井顶对齐”按钮

This commit is contained in:
jiayulong 2026-06-02 11:31:44 +08:00
parent 00a13a6e1a
commit 6269488569
2 changed files with 27 additions and 3 deletions

View File

@ -654,6 +654,7 @@ void MainWindowCurve::initMainToolBar()
QIcon blackIcon(::GetImagePath()+"icon/black.png"); QIcon blackIcon(::GetImagePath()+"icon/black.png");
QIcon zoominIcon(::GetImagePath()+"icon/zoomin.png"); QIcon zoominIcon(::GetImagePath()+"icon/zoomin.png");
QIcon zoomoutIcon(::GetImagePath()+"icon/zoomout.png"); QIcon zoomoutIcon(::GetImagePath()+"icon/zoomout.png");
QIcon wellTopAlignIcon(::GetImagePath()+"WellInterp/井顶对齐.png");
//Main工具栏 //Main工具栏
m_selectWellAc = new QAction(selectWellIcon, "设置井", this); m_selectWellAc = new QAction(selectWellIcon, "设置井", this);
@ -672,6 +673,7 @@ void MainWindowCurve::initMainToolBar()
m_ShowCrossLineAc = new QAction(crossIcon, "显示十字线", this); m_ShowCrossLineAc = new QAction(crossIcon, "显示十字线", this);
m_autorollAc = new QAction(autorollIcon, "图像自滚", this); m_autorollAc = new QAction(autorollIcon, "图像自滚", this);
m_PreviewPrintAc = new QAction(blackIcon, "预览图", this); m_PreviewPrintAc = new QAction(blackIcon, "预览图", this);
m_wellTopAlignAc = new QAction(wellTopAlignIcon, "井顶对齐", this);
m_ModuleOpenAc = new QAction(ModuleOpenIcon, "处理方法", this); m_ModuleOpenAc = new QAction(ModuleOpenIcon, "处理方法", this);
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧 ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧
@ -692,14 +694,17 @@ 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_ShowCrossLineAc); //显示十字线 ui->mainToolBar->addAction(m_ShowCrossLineAc); //显示十字线
ui->mainToolBar->addAction(m_autorollAc); //图像自滚 ui->mainToolBar->addAction(m_autorollAc); //图像自滚
ui->mainToolBar->addAction(m_PreviewPrintAc); //预览图 ui->mainToolBar->addAction(m_PreviewPrintAc); //预览图
ui->mainToolBar->addSeparator();
//
ui->mainToolBar->addAction(m_wellTopAlignAc); //井顶对齐
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法 ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
// 设置为可选中 // 设置为可选中
m_fixwellsectionHeaderAc->setCheckable(true); //锁头 m_fixwellsectionHeaderAc->setCheckable(true); //锁头
m_fixwellsectionHeaderAc->setChecked(true); m_fixwellsectionHeaderAc->setChecked(true); //默认选中-锁头
m_blackAc->setCheckable(true); //黑白图 m_blackAc->setCheckable(true); //黑白图
m_doubleHeadAc->setCheckable(true); //单曲线头 m_doubleHeadAc->setCheckable(true); //单曲线头
m_executeDepthShiftAc->setCheckable(true); //校深 m_executeDepthShiftAc->setCheckable(true); //校深
@ -726,6 +731,7 @@ void MainWindowCurve::initMainToolBar()
connect(m_ShowCrossLineAc, &QAction::triggered, this, &MainWindowCurve::s_ShowCrossLine); connect(m_ShowCrossLineAc, &QAction::triggered, this, &MainWindowCurve::s_ShowCrossLine);
connect(m_autorollAc, &QAction::triggered, this, &MainWindowCurve::s_Autoroll); connect(m_autorollAc, &QAction::triggered, this, &MainWindowCurve::s_Autoroll);
connect(m_PreviewPrintAc, &QAction::triggered, this, &MainWindowCurve::s_PreviewPrint); connect(m_PreviewPrintAc, &QAction::triggered, this, &MainWindowCurve::s_PreviewPrint);
connect(m_wellTopAlignAc, &QAction::triggered, this, &MainWindowCurve::s_wellTopAlign);
connect(m_ModuleOpenAc, &QAction::triggered, this, &MainWindowCurve::s_ModuleOpen); connect(m_ModuleOpenAc, &QAction::triggered, this, &MainWindowCurve::s_ModuleOpen);
connect(CallManage::getInstance(), SIGNAL(sig_SaveAsPicture()), this, SLOT(s_SaveAsPicture())); connect(CallManage::getInstance(), SIGNAL(sig_SaveAsPicture()), this, SLOT(s_SaveAsPicture()));
@ -3106,6 +3112,22 @@ void MainWindowCurve::onTimer()
} }
} }
//井顶对齐
void MainWindowCurve::s_wellTopAlign()
{
if(m_fixwellsectionHeaderAc->isChecked())
{
//锁头2个滚动条都动
ui->verticalScrollBar->setValue(-m_iY2*100);
ui->verticalScrollBar_2->setValue(0);
}
else
{
//不锁头
ui->verticalScrollBar->setValue(-m_iY2*100);
}
}
//预览图 //预览图
void MainWindowCurve::s_PreviewPrint() void MainWindowCurve::s_PreviewPrint()
{ {

View File

@ -245,9 +245,10 @@ 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_ShowCrossLineAc = nullptr; //显示十字线 QAction* m_ShowCrossLineAc = nullptr; //显示十字线
QAction* m_autorollAc = nullptr; //图像自滚 QAction* m_autorollAc = nullptr; //图像自滚
QAction* m_PreviewPrintAc = nullptr; //预览图 QAction* m_PreviewPrintAc = nullptr; //预览图
QAction* m_wellTopAlignAc = nullptr; //井顶对齐
QAction* m_ModuleOpenAc = nullptr; //处理方法 QAction* m_ModuleOpenAc = nullptr; //处理方法
public slots: public slots:
@ -340,6 +341,7 @@ public slots:
void s_ShowCrossLine(); //显示十字线 void s_ShowCrossLine(); //显示十字线
void s_Autoroll(); //图像自滚 void s_Autoroll(); //图像自滚
void s_PreviewPrint(); //预览图 void s_PreviewPrint(); //预览图
void s_wellTopAlign(); //井顶对齐
void s_ModuleOpen(); //处理算法 void s_ModuleOpen(); //处理算法
// //
void _slotExport(QPrinter &printer, int IsBmp, QString pngName, QString strTmpName); void _slotExport(QPrinter &printer, int IsBmp, QString pngName, QString strTmpName);