Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
24af1f53a7
26
WellLogUI/include/TxtEditorDlg.h
Normal file
26
WellLogUI/include/TxtEditorDlg.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
// #include "ui_TxtEditorDlg.h"
|
||||
#include "WellLogUI.h"
|
||||
#include "ObjWellLogINP.h"
|
||||
class QString;
|
||||
namespace Ui
|
||||
{
|
||||
class TxtEditorDlg;
|
||||
}
|
||||
class OSGWELLLOGUI_EXPORT TxtEditorDlg: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TxtEditorDlg(CObjWellLogINP * currentinp);
|
||||
~TxtEditorDlg(void);
|
||||
QString GetEditingTxt() const { return EditingTxt; }
|
||||
void SetEditingTxt(QString val);
|
||||
public:
|
||||
CObjWellLogINP * m_Currentinp;
|
||||
private:
|
||||
Ui::TxtEditorDlg* ui;
|
||||
QString EditingTxt;
|
||||
private slots:
|
||||
void slotOkButtonClicked();
|
||||
};
|
||||
|
||||
31
WellLogUI/src/TxtEditorDlg.cpp
Normal file
31
WellLogUI/src/TxtEditorDlg.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "TxtEditorDlg.h"
|
||||
#include "ui_TxtEditorDlg.h"
|
||||
#include "GeometryUtils.h"
|
||||
|
||||
TxtEditorDlg::TxtEditorDlg(CObjWellLogINP * currentinp)
|
||||
{
|
||||
m_Currentinp=currentinp;
|
||||
ui= new Ui::TxtEditorDlg();
|
||||
ui->setupUi(this);
|
||||
ui->okButton->setIcon(QIcon( ::GetImagePath() + "icon/Save.png"));
|
||||
ui->cancelButton->setIcon(QIcon( ::GetImagePath() + "icon/Cancel.png"));
|
||||
connect(ui->okButton,SIGNAL(clicked()),this,SLOT(slotOkButtonClicked()));
|
||||
//QObject::connect(ui->okButton, SIGNAL(clicked()), this, SLOT(slotSave()));
|
||||
//EditingTxt=txt;
|
||||
}
|
||||
void TxtEditorDlg::slotOkButtonClicked()
|
||||
{
|
||||
EditingTxt=ui->textEdit->toPlainText();
|
||||
m_Currentinp->paramcard=EditingTxt;
|
||||
m_Currentinp->SetModify(true);
|
||||
m_Currentinp->SaveToSLF();
|
||||
delete this;
|
||||
}
|
||||
void TxtEditorDlg::SetEditingTxt(QString val)
|
||||
{
|
||||
EditingTxt = val;
|
||||
ui->textEdit->setText(EditingTxt);
|
||||
}
|
||||
TxtEditorDlg::~TxtEditorDlg(void)
|
||||
{
|
||||
}
|
||||
111
WellLogUI/src/TxtEditorDlg.ui
Normal file
111
WellLogUI/src/TxtEditorDlg.ui
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TxtEditorDlg</class>
|
||||
<widget class="QDialog" name="TxtEditorDlg">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1003</width>
|
||||
<height>809</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>TxtEditorDlg</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>278</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>96</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>TxtEditorDlg</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>369</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>179</x>
|
||||
<y>282</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
@ -185,6 +185,8 @@ void WellLogTableDialogNew::setName(QString strOldPath, QString strOldName, int
|
|||
pWellLog = new CObjWellLogWavefile;
|
||||
if (CURVE_OBJECT == m_ObjectType)
|
||||
pWellLog = new CObjWellLog;
|
||||
if (WAVE_OBJECT != m_ObjectType)
|
||||
m_pUI->horizontalScrollBar->hide();
|
||||
pWellLog->SetSlfFileName(strOldPath);
|
||||
pWellLog->m_name = strOldName;
|
||||
m_pWellLogs.clear();
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ CONFIG(debug, debug|release){
|
|||
FORMS += \
|
||||
AngleAdjTool.ui \
|
||||
SmoothTool.ui \
|
||||
TxtEditorDlg.ui \
|
||||
WellDialog.ui \
|
||||
WellLogProjectDialog.ui \
|
||||
WellLogRoundDialog.ui \
|
||||
|
|
@ -59,6 +60,7 @@ HEADERS += \
|
|||
../CallManage/CallManage.h \
|
||||
../include/CStringType.h \
|
||||
../include/MyWelllogRound.h \
|
||||
../include/TxtEditorDlg.h \
|
||||
../include/WellDialog.h \
|
||||
../include/WellLogDialog.h \
|
||||
../include/WellLogLabel.h \
|
||||
|
|
@ -81,6 +83,7 @@ SOURCES += \
|
|||
MyWelllogRound.cpp \
|
||||
SmoothTool.cpp \
|
||||
TipPop.cpp \
|
||||
TxtEditorDlg.cpp \
|
||||
WellDialog.cpp \
|
||||
WellLogDialog.cpp \
|
||||
WellLogLabel.cpp \
|
||||
|
|
|
|||
|
|
@ -128,22 +128,22 @@ GridDataAdapter::GridDataAdapter(QTableWidget* table,
|
|||
QScrollBar *verticalScrollBar,
|
||||
QObject* parent)
|
||||
: QObject(parent)
|
||||
,m_verScrolValue(0)
|
||||
,m_horScrolValue(0)
|
||||
,m_pageRow(1)
|
||||
,m_pageCol(0)
|
||||
,m_tmodel(NULL)
|
||||
,VerScrollUp(false)
|
||||
,VerScrollChanged(true)
|
||||
,DefRowHeight(20)
|
||||
,DefColWidth(180)
|
||||
,haveDoubleClicked(false)
|
||||
// ,m_pWell(NULL)
|
||||
,m_mgr(NULL)
|
||||
,ifItemWidth(true)
|
||||
,m_nVerScrollValue(0)
|
||||
,m_pAssetCopy(new AssetCopy(this))
|
||||
,DefRowHeight(20)
|
||||
,DefColWidth(180)
|
||||
,canLoadFromSLF(true)
|
||||
,haveDoubleClicked(false)
|
||||
,VerScrollUp(false)
|
||||
,VerScrollChanged(true)
|
||||
,m_pageRow(1)
|
||||
,m_pageCol(0)
|
||||
,ifItemWidth(true)
|
||||
,m_verScrolValue(0)
|
||||
,m_horScrolValue(0)
|
||||
,m_tmodel(NULL)
|
||||
,m_mgr(NULL)
|
||||
,m_nVerScrollValue(0)
|
||||
,m_pAssetCopy(new AssetCopy(this))
|
||||
,canLoadFromSLF(true)
|
||||
{
|
||||
initColWH();
|
||||
|
||||
|
|
@ -2626,17 +2626,17 @@ void GridDataAdapter::initTableWellLogData(DType type,QList<CObjWellLog*> WellLo
|
|||
logio->GetTableFieldInfo(iIndex,field);
|
||||
for(int j=0;j<fc;j++) {
|
||||
QString fieldName;
|
||||
QString unit=field[j].HZUnit;
|
||||
if(unit.isEmpty()) unit=field[j].Unit;
|
||||
QString unit=QString::fromLocal8Bit(field[j].HZUnit);
|
||||
if(unit.isEmpty()) unit=QString::fromLocal8Bit(field[j].Unit);
|
||||
if(unit.isEmpty())
|
||||
{
|
||||
char strTmp[16] = "CurveFamily.ini";
|
||||
QStringList cs=GetSimilarCurves(field[j].Name,strTmp,false);
|
||||
QStringList cs=GetSimilarCurves(QString::fromLocal8Bit(field[j].Name),strTmp,false);
|
||||
if(cs.size()>3) {
|
||||
unit=cs[3];
|
||||
}
|
||||
}
|
||||
fieldName=field[j].Name;
|
||||
fieldName=QString::fromLocal8Bit(field[j].Name);
|
||||
|
||||
int pos=0,pos1=0;
|
||||
if((pos=unit.indexOf("^"))>-1&&(pos1=unit.indexOf("^",pos+1))>-1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user