多井,工具条追加“井间距”按钮
This commit is contained in:
parent
6269488569
commit
2c70f61b6f
|
|
@ -655,6 +655,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
QIcon zoominIcon(::GetImagePath()+"icon/zoomin.png");
|
||||
QIcon zoomoutIcon(::GetImagePath()+"icon/zoomout.png");
|
||||
QIcon wellTopAlignIcon(::GetImagePath()+"WellInterp/井顶对齐.png");
|
||||
QIcon wellsSpaceIcon(::GetImagePath()+"WellInterp/井间距离.png");
|
||||
|
||||
//Main工具栏
|
||||
m_selectWellAc = new QAction(selectWellIcon, "设置井", this);
|
||||
|
|
@ -674,6 +675,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
m_autorollAc = new QAction(autorollIcon, "图像自滚", this);
|
||||
m_PreviewPrintAc = new QAction(blackIcon, "预览图", this);
|
||||
m_wellTopAlignAc = new QAction(wellTopAlignIcon, "井顶对齐", this);
|
||||
m_wellsSpaceAc = new QAction(wellsSpaceIcon, "井间距", this);
|
||||
m_ModuleOpenAc = new QAction(ModuleOpenIcon, "处理方法", this);
|
||||
|
||||
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧
|
||||
|
|
@ -700,6 +702,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
ui->mainToolBar->addSeparator();
|
||||
//
|
||||
ui->mainToolBar->addAction(m_wellTopAlignAc); //井顶对齐
|
||||
ui->mainToolBar->addAction(m_wellsSpaceAc); //井间距
|
||||
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
|
||||
|
||||
// 设置为可选中
|
||||
|
|
@ -732,6 +735,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
connect(m_autorollAc, &QAction::triggered, this, &MainWindowCurve::s_Autoroll);
|
||||
connect(m_PreviewPrintAc, &QAction::triggered, this, &MainWindowCurve::s_PreviewPrint);
|
||||
connect(m_wellTopAlignAc, &QAction::triggered, this, &MainWindowCurve::s_wellTopAlign);
|
||||
connect(m_wellsSpaceAc, &QAction::triggered, this, &MainWindowCurve::s_wellsSpace);
|
||||
connect(m_ModuleOpenAc, &QAction::triggered, this, &MainWindowCurve::s_ModuleOpen);
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_SaveAsPicture()), this, SLOT(s_SaveAsPicture()));
|
||||
|
|
@ -3128,6 +3132,36 @@ void MainWindowCurve::s_wellTopAlign()
|
|||
}
|
||||
}
|
||||
|
||||
//井间距
|
||||
void MainWindowCurve::s_wellsSpace()
|
||||
{
|
||||
bool ok=0;
|
||||
QString Formtiom=QInputDialog::getText(NULL,"井位间距设置","井位等间距(mm)",QLineEdit::Normal,"",&ok);
|
||||
if(!ok) return;
|
||||
if(Formtiom.toFloat())
|
||||
{
|
||||
float dSpace=Formtiom.toFloat();//mm
|
||||
|
||||
int iNewWidth = static_cast<int>(dSpace/10.0 * g_dPixelPerCm);
|
||||
//设置列宽
|
||||
int columnCount = ui->tableWidget_2->columnCount();//总列数
|
||||
for(int i=0; i<columnCount; i++)
|
||||
{
|
||||
if(i%2==0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
//空白列
|
||||
}
|
||||
|
||||
//调整井宽
|
||||
ui->tableWidget_2->setColumnWidth(i, iNewWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//预览图
|
||||
void MainWindowCurve::s_PreviewPrint()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ public:
|
|||
QAction* m_autorollAc = nullptr; //图像自滚
|
||||
QAction* m_PreviewPrintAc = nullptr; //预览图
|
||||
QAction* m_wellTopAlignAc = nullptr; //井顶对齐
|
||||
QAction* m_wellsSpaceAc = nullptr; //井间距
|
||||
QAction* m_ModuleOpenAc = nullptr; //处理方法
|
||||
|
||||
public slots:
|
||||
|
|
@ -342,6 +343,7 @@ public slots:
|
|||
void s_Autoroll(); //图像自滚
|
||||
void s_PreviewPrint(); //预览图
|
||||
void s_wellTopAlign(); //井顶对齐
|
||||
void s_wellsSpace(); //井间距
|
||||
void s_ModuleOpen(); //处理算法
|
||||
//
|
||||
void _slotExport(QPrinter &printer, int IsBmp, QString pngName, QString strTmpName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user