整理删除冗余代码文件修改
This commit is contained in:
parent
93f74bdd04
commit
abe30478ed
|
|
@ -1,363 +0,0 @@
|
|||
#pragma warning(push,0)
|
||||
//#include "Family.h"
|
||||
#include <QMessageBox>
|
||||
#include <QObjectList>
|
||||
#include <QLineEdit>
|
||||
//#include "ObjectEvent.h"
|
||||
#include "CurvePropertyEdit.h"
|
||||
#include "ui_CurvePropertyEdit.h"
|
||||
#include "CStringType.h"
|
||||
#include "LogIO.h"
|
||||
//#include "ObjProject.h"
|
||||
#include "ui_CurvePropertyEdit.h"
|
||||
#pragma warning(pop)
|
||||
extern char *DataTypea[];
|
||||
extern int DataLengtha[];
|
||||
|
||||
CCurvePropertyEditDlg::CCurvePropertyEditDlg(QWidget * parent, Qt::WindowFlags flags)
|
||||
: QWidget(parent,flags)
|
||||
{
|
||||
m_pUI = new Ui::CurvePropertyEdit();
|
||||
m_pUI->setupUi(this);
|
||||
int w=width();
|
||||
int h=height();
|
||||
if(NULL != parent)
|
||||
{
|
||||
parent->setFixedSize(w,h);
|
||||
}
|
||||
|
||||
QObject::connect(m_pUI->okbtn, SIGNAL(clicked()), this, SLOT(slotSave()));
|
||||
QObject::connect(m_pUI->cancelbtn, SIGNAL(clicked()), this, SLOT(slotCancel()));
|
||||
tab1=m_pUI->PropertyTab->widget(0);
|
||||
tab2=m_pUI->PropertyTab->widget(1);
|
||||
m_pUI->PropertyTab->setCurrentIndex(0);
|
||||
m_pUI->cancelbtn->hide();
|
||||
/* QObjectList ctls=tab1->children();
|
||||
QLineEdit* liedit=tab1->findChild<QLineEdit*>("lineEdit_CurveName");
|
||||
liedit->setText("11");
|
||||
//foreach (QObject* ctl,ctls)
|
||||
//{
|
||||
// if (ctl->objectName()=="lineEdit_CurveName")
|
||||
// {
|
||||
// QLineEdit* liedit= (QLineEdit*)(ctl);
|
||||
// liedit->setText("11");
|
||||
|
||||
// }
|
||||
//}
|
||||
QObjectList ctls2=tab2->children();
|
||||
foreach (QObject* ctl,ctls2)
|
||||
{
|
||||
if (ctl->objectName()=="lineEdit2_ArrayNum")
|
||||
{
|
||||
QLineEdit* liedit= (QLineEdit*)(ctl);
|
||||
liedit->setText("444");
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
void CCurvePropertyEditDlg::init()
|
||||
{
|
||||
|
||||
//初始化
|
||||
CLogIO logio(FileName.toStdString().c_str(),(unsigned int)CLogIO::modeReadWrite);
|
||||
if(!logio.mFile) return ;
|
||||
int c=12;
|
||||
QString str;
|
||||
for(int i=0;i<c;i++) {
|
||||
if(!i)str+="[";
|
||||
else str+="|[";
|
||||
str+=Rep_STR[i];
|
||||
str+="]";
|
||||
};
|
||||
QRegExp regExp("[A-Z0-9]{0,100}");//正则表达式,第一位数字为a-z的数字,第二位为1-9的数字,后边是0-2位0-9的数字
|
||||
|
||||
if(Type==0)
|
||||
{
|
||||
m_pUI->PropertyTab->setTabEnabled(1,0);
|
||||
m_pUI->PropertyTab->setStyleSheet("QTabBar::tab:disabled {width: 0; color: transparent;}");
|
||||
Slf_CURVE info;
|
||||
int index=logio.OpenCurve(CurveName.toStdString().c_str());
|
||||
if(index<0) return;
|
||||
logio.GetCurveInfo(index,&info);
|
||||
logio.CloseCurve(index);
|
||||
QLineEdit *lineEdit_CurveName=tab1->findChild<QLineEdit*>("lineEdit_CurveName");
|
||||
QLineEdit *lineEdit_CurveName_2=tab1->findChild<QLineEdit*>("lineEdit_CurveName_2");
|
||||
QLineEdit *lineEdit_CurveUnit=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit");
|
||||
QLineEdit *lineEdit_CurveUnit_2=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit_2");
|
||||
QLineEdit *lineEdit_DepthUnit=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit");
|
||||
QLineEdit *lineEdit_DepthUnit_2=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit_2");
|
||||
QLineEdit *lineEdit_Sdep=tab1->findChild<QLineEdit*>("lineEdit_Sdep");
|
||||
QLineEdit *lineEdit_Edep=tab1->findChild<QLineEdit*>("lineEdit_Edep");
|
||||
QLineEdit *lineEdit_Rlev=tab1->findChild<QLineEdit*>("lineEdit_Rlev");
|
||||
QLineEdit *lineEdit_DataType=tab1->findChild<QLineEdit*>("lineEdit_DataType");
|
||||
QLineEdit *lineEdit_Min=tab1->findChild<QLineEdit*>("lineEdit_Min");
|
||||
QLineEdit *lineEdit_Max=tab1->findChild<QLineEdit*>("lineEdit_Max");
|
||||
QLineEdit *lineEdit_DefVal=tab1->findChild<QLineEdit*>("lineEdit_DefVal");
|
||||
lineEdit_CurveName->setText((QLatin1String(info.Name)));
|
||||
QRegExp regExp("[A-Z0-9]{0,100}");//正则表达式,第一位数字为a-z的数字,第二位为1-9的数字,后边是0-2位0-9的数字
|
||||
lineEdit_CurveName->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_CurveName_2->setText(QString::fromLocal8Bit(info.AliasName));
|
||||
lineEdit_CurveName_2->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_CurveUnit->setText(QLatin1String(info.Unit));
|
||||
lineEdit_CurveUnit->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_CurveUnit_2->setText(QString::fromLocal8Bit(info.AliasUnit));//(QLatin1String(info.AliasUnit));
|
||||
lineEdit_CurveUnit_2->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_DepthUnit->setText(QLatin1String(info.DepthUnit));
|
||||
lineEdit_DepthUnit->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_DepthUnit_2->setText(QString::fromLocal8Bit(info.DepthHZUnit));
|
||||
lineEdit_DepthUnit_2->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_Sdep->setText(QString("%1").arg(info.StartDepth));
|
||||
lineEdit_Sdep->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_Edep->setText(QString("%1").arg(info.EndDepth));
|
||||
lineEdit_Edep->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_Rlev->setText(QString("%1").arg(info.DepLevel));
|
||||
lineEdit_Rlev->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
regExp=QRegExp(str);
|
||||
lineEdit_DataType->setText(QLatin1String(Rep_STR[info.RepCode-1]));
|
||||
lineEdit_Sdep->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_Min->setText(QString("%1").arg(info.MinValue));
|
||||
lineEdit_Min->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_Max->setText(QString("%1").arg(info.MaxValue));
|
||||
lineEdit_Max->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_DefVal->setText(QString("%1").arg(info.DefVal));
|
||||
lineEdit_DefVal->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
}
|
||||
else
|
||||
{
|
||||
int index=logio.OpenWave(CurveName.toStdString().c_str());
|
||||
if(index<0) return;
|
||||
Slf_WAVE info;
|
||||
logio.GetWaveInfo(index,&info);
|
||||
logio.CloseWave(index);
|
||||
if(info.RepCode>12) return;
|
||||
QLineEdit *lineEdit_CurveName=tab1->findChild<QLineEdit*>("lineEdit_CurveName");
|
||||
QLineEdit *lineEdit_CurveName_2=tab1->findChild<QLineEdit*>("lineEdit_CurveName_2");
|
||||
QLineEdit *lineEdit_CurveUnit=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit");
|
||||
QLineEdit *lineEdit_CurveUnit_2=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit_2");
|
||||
QLineEdit *lineEdit_DepthUnit=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit");
|
||||
QLineEdit *lineEdit_DepthUnit_2=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit_2");
|
||||
QLineEdit *lineEdit_Sdep=tab1->findChild<QLineEdit*>("lineEdit_Sdep");
|
||||
QLineEdit *lineEdit_Edep=tab1->findChild<QLineEdit*>("lineEdit_Edep");
|
||||
QLineEdit *lineEdit_Rlev=tab1->findChild<QLineEdit*>("lineEdit_Rlev");
|
||||
QLineEdit *lineEdit_DataType=tab1->findChild<QLineEdit*>("lineEdit_DataType");
|
||||
QLineEdit *lineEdit_Min=tab1->findChild<QLineEdit*>("lineEdit_Min");
|
||||
QLineEdit *lineEdit_Max=tab1->findChild<QLineEdit*>("lineEdit_Max");
|
||||
QLineEdit *lineEdit_DefVal=tab1->findChild<QLineEdit*>("lineEdit_DefVal");
|
||||
lineEdit_CurveName->setText((QLatin1String(info.Name)));
|
||||
lineEdit_CurveName->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_CurveName_2->setText(QString::fromLocal8Bit(info.AliasName));
|
||||
lineEdit_CurveName_2->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_CurveUnit->setText(QLatin1String(info.Unit));
|
||||
lineEdit_CurveUnit->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_CurveUnit_2->setText(QString::fromLocal8Bit(info.AliasUnit));
|
||||
lineEdit_CurveUnit_2->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_DepthUnit->setText(QLatin1String(info.DepthUnit));
|
||||
lineEdit_DepthUnit->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_DepthUnit_2->setText(QString::fromLocal8Bit(info.DepthHZUnit));
|
||||
lineEdit_DepthUnit_2->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit_Sdep->setText(QString("%1").arg(info.StartDepth));
|
||||
lineEdit_Sdep->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_Edep->setText(QString("%1").arg(info.EndDepth));
|
||||
lineEdit_Edep->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_Rlev->setText(QString("%1").arg(info.DepLevel));
|
||||
lineEdit_Rlev->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
regExp=QRegExp(str);
|
||||
lineEdit_DataType->setText(QLatin1String(Rep_STR[info.RepCode-1]));
|
||||
lineEdit_Min->setText(QString("%1").arg(info.MinValue));
|
||||
lineEdit_Min->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_Max->setText(QString("%1").arg(info.MaxValue));
|
||||
lineEdit_Max->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit_DefVal->setText(QString("%1").arg(info.DefVal));
|
||||
lineEdit_DefVal->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
|
||||
QLineEdit *lineEdit2_Name=tab2->findChild<QLineEdit*>("lineEdit2_Name");
|
||||
QLineEdit *lineEdit2_Name1=tab2->findChild<QLineEdit*>("lineEdit2_Name1");
|
||||
QLineEdit *lineEdit2_Unit=tab2->findChild<QLineEdit*>("lineEdit2_Unit");
|
||||
QLineEdit *lineEdit2_Unit1=tab2->findChild<QLineEdit*>("lineEdit2_Unit1");
|
||||
QLineEdit *lineEdit2_Start=tab2->findChild<QLineEdit*>("lineEdit2_Start");
|
||||
QLineEdit *lineEdit2_Rlev2=tab2->findChild<QLineEdit*>("lineEdit2_Rlev2");
|
||||
QLineEdit *lineEdit2_ArrayNum=tab2->findChild<QLineEdit*>("lineEdit2_ArrayNum");
|
||||
QLineEdit *lineEdit2_Sample=tab2->findChild<QLineEdit*>("lineEdit2_Sample");
|
||||
QLineEdit *lineEdit2_SampleTotal=tab2->findChild<QLineEdit*>("lineEdit2_SampleTotal");
|
||||
QComboBox *comboBox2_Type=tab2->findChild<QComboBox*>("comboBox2_Type");
|
||||
comboBox2_Type->addItem(QString::fromLocal8Bit("线性刻度"));
|
||||
comboBox2_Type->addItem(QString::fromLocal8Bit("对数刻度"));
|
||||
comboBox2_Type->addItem(QString::fromLocal8Bit("指数刻度"));
|
||||
comboBox2_Type->setCurrentIndex(0);
|
||||
QObject::connect(lineEdit2_ArrayNum, SIGNAL(textChanged(const QString &)), this, SLOT(sampleChanged(const QString &)));
|
||||
QObject::connect(lineEdit2_Sample, SIGNAL(textChanged(const QString &)), this, SLOT(arrayChanged(const QString &)));
|
||||
QRegExp regExp("[A-Za-z0-9]{0,100}");//正则表达式,第一位数字为a-z的数字,第二位为1-9的数字,后边是0-2位0-9的数字
|
||||
lineEdit2_Name->setText(QLatin1String(info.TimeName));
|
||||
lineEdit2_Name->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit2_Name1->setText(QString::fromLocal8Bit(info.TimeHZName));
|
||||
lineEdit2_Name1->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit2_Unit->setText(QLatin1String(info.TimeUnit));
|
||||
lineEdit2_Unit->setValidator(new QRegExpValidator(regExp,this));
|
||||
lineEdit2_Unit1->setText(QString::fromLocal8Bit(info.TimeHZUnit));
|
||||
lineEdit2_Unit1->setValidator(new QRegExpValidator(regExp,this));
|
||||
|
||||
lineEdit2_Start->setText(QString("%1").arg(info.StartTime));
|
||||
lineEdit2_Start->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit2_Rlev2->setText(QString("%1").arg(info.TimeLevel));
|
||||
lineEdit2_Rlev2->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
lineEdit2_ArrayNum->setText(QString("%1").arg(info.ArrayNum));
|
||||
lineEdit2_ArrayNum->setValidator(new QIntValidator(0,9999999,this));
|
||||
lineEdit2_Sample->setText(QString("%1").arg(info.TimeSamples));
|
||||
lineEdit2_Sample->setValidator(new QIntValidator(0,9999999,this));
|
||||
lineEdit2_SampleTotal->setText(QString("%1").arg(info.TimeSamples));
|
||||
lineEdit2_SampleTotal->setValidator(new QIntValidator(0,99999999,this));
|
||||
}
|
||||
logio.Close();
|
||||
}
|
||||
void CCurvePropertyEditDlg::sampleChanged(const QString &str)
|
||||
{
|
||||
QLineEdit *lineEdit2_Sample=tab2->findChild<QLineEdit*>("lineEdit2_Sample");
|
||||
QLineEdit *lineEdit2_SampleTotal=tab2->findChild<QLineEdit*>("lineEdit2_SampleTotal");
|
||||
|
||||
int TotalSample=lineEdit2_SampleTotal->text().toInt();
|
||||
int mSample=lineEdit2_Sample->text().toInt();
|
||||
if(TotalSample==0)return;
|
||||
int arrayNum=str.toInt();
|
||||
int sample=TotalSample;
|
||||
if(sample!=TotalSample)
|
||||
{
|
||||
QMessageBox::warning(NULL,"提示","阵列数不是总元素个数的公约数,请重新输入");
|
||||
QLineEdit *lineEdit2_ArrayNum=tab2->findChild<QLineEdit*>("lineEdit2_ArrayNum");
|
||||
lineEdit2_ArrayNum->setText(QString::number(TotalSample/mSample));
|
||||
}
|
||||
else lineEdit2_Sample->setText(QString::number(sample));
|
||||
}
|
||||
void CCurvePropertyEditDlg::arrayChanged(const QString &str)
|
||||
{
|
||||
QLineEdit *lineEdit2_ArrayNum=tab2->findChild<QLineEdit*>("lineEdit2_ArrayNum");
|
||||
QLineEdit *lineEdit2_SampleTotal=tab2->findChild<QLineEdit*>("lineEdit2_SampleTotal");
|
||||
|
||||
int TotalSample=lineEdit2_SampleTotal->text().toInt();
|
||||
int mArrayNum=lineEdit2_ArrayNum->text().toInt();
|
||||
if(TotalSample==0)return;
|
||||
int sample=str.toInt();
|
||||
int arrayNum=TotalSample/sample;
|
||||
if(arrayNum*sample!=TotalSample)
|
||||
{
|
||||
QMessageBox::warning(this,"提示","您所输入的元素个数不是总元素个数的公约数,请重新输入");
|
||||
QLineEdit *lineEdit2_Sample=tab2->findChild<QLineEdit*>("lineEdit2_Sample");
|
||||
lineEdit2_Sample->setText(QString::number(TotalSample/mArrayNum));
|
||||
}
|
||||
else lineEdit2_ArrayNum->setText(QString::number(arrayNum));
|
||||
}
|
||||
void CCurvePropertyEditDlg::slotSave()
|
||||
{
|
||||
QLineEdit *lineEdit_CurveName=tab1->findChild<QLineEdit*>("lineEdit_CurveName");
|
||||
QString Name=lineEdit_CurveName->text();
|
||||
CLogIO logio(FileName.toStdString().c_str(),(unsigned int)CLogIO::modeReadWrite);
|
||||
if(Name!=CurveName)
|
||||
{
|
||||
if(logio.FindObjectIndex(Name.toStdString().c_str())>=0)
|
||||
{
|
||||
QMessageBox::warning(this,"警告!","名称不能重复!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
Slf_FILE_MESSAGE ms;
|
||||
logio.GetFileMessage(ms);
|
||||
if(Type==0)
|
||||
{
|
||||
Slf_CURVE info;
|
||||
int index=logio.OpenCurve(CurveName.toStdString().c_str());
|
||||
if(index<0) {
|
||||
return;
|
||||
}
|
||||
logio.GetCurveInfo(index,&info);
|
||||
QLineEdit *lineEdit_CurveName=tab1->findChild<QLineEdit*>("lineEdit_CurveName");
|
||||
QLineEdit *lineEdit_CurveName_2=tab1->findChild<QLineEdit*>("lineEdit_CurveName_2");
|
||||
QLineEdit *lineEdit_CurveUnit=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit");
|
||||
QLineEdit *lineEdit_CurveUnit_2=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit_2");
|
||||
QLineEdit *lineEdit_DepthUnit=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit");
|
||||
QLineEdit *lineEdit_DepthUnit_2=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit_2");
|
||||
|
||||
QLineEdit *lineEdit_DefVal=tab1->findChild<QLineEdit*>("lineEdit_DefVal");
|
||||
strcpy(info.Name,lineEdit_CurveName->text().toStdString().c_str());
|
||||
strcpy(info.AliasName,lineEdit_CurveName_2->text().toStdString().c_str());
|
||||
//汉字写回去不对了呀??????
|
||||
strcpy(info.Unit,lineEdit_CurveUnit->text().toStdString().c_str());
|
||||
strcpy(info.AliasUnit,lineEdit_CurveUnit_2->text().toStdString().c_str());
|
||||
strcpy(info.DepthUnit,lineEdit_DepthUnit->text().toStdString().c_str());
|
||||
strcpy(info.DepthHZUnit,lineEdit_DepthUnit_2->text().toStdString().c_str());
|
||||
info.DefVal=lineEdit_DefVal->text().toFloat();
|
||||
logio.SetCurveInfo(index,&info);
|
||||
logio.CloseCurve(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
int index=logio.OpenWave(CurveName.toStdString().c_str());
|
||||
if(index<0) return;
|
||||
Slf_WAVE info;
|
||||
logio.GetWaveInfo(index,&info);
|
||||
|
||||
QLineEdit *lineEdit_CurveName=tab1->findChild<QLineEdit*>("lineEdit_CurveName");
|
||||
QLineEdit *lineEdit_CurveName_2=tab1->findChild<QLineEdit*>("lineEdit_CurveName_2");
|
||||
QLineEdit *lineEdit_CurveUnit=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit");
|
||||
QLineEdit *lineEdit_CurveUnit_2=tab1->findChild<QLineEdit*>("lineEdit_CurveUnit_2");
|
||||
QLineEdit *lineEdit_DepthUnit=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit");
|
||||
QLineEdit *lineEdit_DepthUnit_2=tab1->findChild<QLineEdit*>("lineEdit_DepthUnit_2");
|
||||
|
||||
QLineEdit *lineEdit_DefVal=tab1->findChild<QLineEdit*>("lineEdit_DefVal");
|
||||
strcpy(info.Name,lineEdit_CurveName->text().toStdString().c_str());
|
||||
strcpy(info.AliasName,lineEdit_CurveName_2->text().toStdString().c_str());
|
||||
strcpy(info.Unit,lineEdit_CurveUnit->text().toStdString().c_str());
|
||||
strcpy(info.AliasUnit,lineEdit_CurveUnit_2->text().toStdString().c_str());
|
||||
strcpy(info.DepthUnit,lineEdit_DepthUnit->text().toStdString().c_str());
|
||||
strcpy(info.DepthHZUnit,lineEdit_DepthUnit_2->text().toStdString().c_str());
|
||||
info.DefVal=lineEdit_DefVal->text().toFloat();
|
||||
|
||||
QLineEdit *lineEdit2_Name=tab2->findChild<QLineEdit*>("lineEdit2_Name");
|
||||
QLineEdit *lineEdit2_Name1=tab2->findChild<QLineEdit*>("lineEdit2_Name1");
|
||||
QLineEdit *lineEdit2_Unit=tab2->findChild<QLineEdit*>("lineEdit2_Unit");
|
||||
QLineEdit *lineEdit2_Unit1=tab2->findChild<QLineEdit*>("lineEdit2_Unit1");
|
||||
QLineEdit *lineEdit2_Start=tab2->findChild<QLineEdit*>("lineEdit2_Start");
|
||||
QLineEdit *lineEdit2_Rlev2=tab2->findChild<QLineEdit*>("lineEdit2_Rlev2");
|
||||
QLineEdit *lineEdit2_ArrayNum=tab2->findChild<QLineEdit*>("lineEdit2_ArrayNum");
|
||||
QLineEdit *lineEdit2_Sample=tab2->findChild<QLineEdit*>("lineEdit2_Sample");
|
||||
QLineEdit *lineEdit2_SampleTotal=tab2->findChild<QLineEdit*>("lineEdit2_SampleTotal");
|
||||
QComboBox *comboBox2_Type=tab2->findChild<QComboBox*>("comboBox2_Type");
|
||||
|
||||
strcpy(info.TimeName,lineEdit2_Name->text().toStdString().c_str());
|
||||
strcpy(info.TimeHZName,lineEdit2_Name1->text().toStdString().c_str());
|
||||
strcpy(info.TimeUnit,lineEdit2_Unit->text().toStdString().c_str());
|
||||
strcpy(info.TimeHZUnit,lineEdit2_Unit1->text().toStdString().c_str());
|
||||
info.StartTime=lineEdit2_Start->text().toFloat();
|
||||
info.TimeLevel=lineEdit2_Rlev2->text().toFloat();
|
||||
info.ArrayNum=lineEdit2_ArrayNum->text().toInt();
|
||||
info.TimeSamples=lineEdit2_Sample->text().toInt();
|
||||
logio.SetWaveInfo(index,&info);
|
||||
logio.CloseWave(index);
|
||||
}
|
||||
logio.Close();
|
||||
//GetObjectEvent().OnDeAttchData(FileName,CurveName);
|
||||
//GetObjectEvent().OnRefreshData(FileName,CurveName);
|
||||
if(Name!=CurveName)
|
||||
{
|
||||
QStringList NodeNames;
|
||||
NodeNames.push_back(ms.WellName);
|
||||
NodeNames.push_back(FileName);
|
||||
NodeNames.push_back(CurveName);
|
||||
NodeNames.push_back(Name);
|
||||
//PaiObject::m_EventAgent.ObjectPropertyChanged(GetProject(),"CurvePropertyEdit",NodeNames);
|
||||
}
|
||||
QMessageBox::information(this,"提示","保存成功!");
|
||||
//accept();
|
||||
}
|
||||
/**
|
||||
*@brief 取消槽函数
|
||||
*/
|
||||
void CCurvePropertyEditDlg::slotCancel()
|
||||
{
|
||||
//reject ();
|
||||
}
|
||||
|
||||
void CCurvePropertyEditDlg::closeEvent(QCloseEvent *)
|
||||
{
|
||||
emit signalsCloseed();
|
||||
//throw std::logic_error("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
|
||||
#pragma warning(push,0)
|
||||
#include <cassert>
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
//#include "ConsoleOutputWidget.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
namespace Ui {
|
||||
class CurvePropertyEdit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 表格选择列自定义委托
|
||||
*/
|
||||
class CCurvePropertyEditDlg : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CCurvePropertyEditDlg(QWidget * parent=0, Qt::WindowFlags flags=0);
|
||||
~CCurvePropertyEditDlg()
|
||||
{
|
||||
if(m_pUI) delete m_pUI;
|
||||
}
|
||||
Ui::CurvePropertyEdit *m_pUI;
|
||||
void init();
|
||||
signals:
|
||||
void signalsCloseed();
|
||||
private slots:
|
||||
/**
|
||||
*@brief 保存槽函数
|
||||
*/
|
||||
void slotSave();
|
||||
|
||||
/**
|
||||
*@brief 取消槽函数*/
|
||||
void slotCancel();
|
||||
void sampleChanged(const QString &);
|
||||
void arrayChanged(const QString &);
|
||||
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
|
||||
public:
|
||||
QString FileName;//slf文件名
|
||||
QString CurveName;//曲线名
|
||||
int Type;//曲线类型,0-曲线,1-波列
|
||||
QWidget* tab1;
|
||||
QWidget* tab2;
|
||||
};
|
||||
|
|
@ -1,525 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CurvePropertyEdit</class>
|
||||
<widget class="QWidget" name="CurvePropertyEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>665</width>
|
||||
<height>575</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>曲线属性显示与编辑</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="PropertyTab">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="CurveTab">
|
||||
<attribute name="title">
|
||||
<string>曲线属性</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>曲线名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_CurveName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>曲线别名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_CurveName_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>曲线单位</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_CurveUnit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>曲线别单位</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_CurveUnit_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>深度单位</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_DepthUnit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>深度单位别名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_DepthUnit_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>起始深度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Sdep">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>终止深度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_Edep">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>采样间隔</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Rlev">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>数据类型</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_DataType">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>最小值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Min">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>最大值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_Max">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>缺省值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_DefVal">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="WaveTab">
|
||||
<attribute name="title">
|
||||
<string>波列属性</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>名称</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit2_Name">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>别名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit2_Name1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>单位</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit2_Unit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string>单位别名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit2_Unit1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>起始值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit2_Start">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>增量</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit2_Rlev2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>阵列数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit2_ArrayNum">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>刻度类型</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QComboBox" name="comboBox2_Type">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>元素个数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit2_Sample">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>总元素个数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit2_SampleTotal">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="okbtn">
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelbtn">
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,157 +0,0 @@
|
|||
#ifndef DRAWCURVEVIEW_H
|
||||
#define DRAWCURVEVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPaintEvent>
|
||||
#include "qpushbutton.h"
|
||||
//#include "DataManagger.h"
|
||||
#include "SmoothTool.h"
|
||||
#include "AngleAdjTool.h"
|
||||
#include "editEnd.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
//视图边距
|
||||
#define D_VIEW_MARGIN_LEFT 80//左、下边界
|
||||
#define D_VIEW_MARGIN_BOTTOM 30//左、下边界
|
||||
#define D_VIEW_MARGIN_RIGHT 40//右、上边界
|
||||
#define D_VIEW_MARGIN_TOP 25//上边界
|
||||
|
||||
|
||||
class DrawCurveView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DrawCurveView(QWidget *parent = nullptr);
|
||||
~DrawCurveView();
|
||||
void initView();
|
||||
void setValues(float *values);
|
||||
void setCount(int count);
|
||||
|
||||
signals:
|
||||
void enableEditButtons();
|
||||
void unableEditButtons();
|
||||
void R2L();
|
||||
void verticalSliderUP();
|
||||
void verticalSliderDOWN();
|
||||
void editModeTips();
|
||||
|
||||
public slots:
|
||||
void editIfBegin_Slot();
|
||||
void smoothWin_Slot();
|
||||
void finishEdit_SLOT();
|
||||
void AngAdjWin_SLOT();
|
||||
void overEditSave();
|
||||
|
||||
private slots:
|
||||
void receiveSmoothData(float sd, float ed, int mode, int cal, int count);
|
||||
void cancelSmoothEdit();
|
||||
void saveSmooth_SLOT(int);
|
||||
void receiveAngleData(float,float,float,float,float);
|
||||
void cancelAngleEdit();
|
||||
|
||||
void continueEditNoSave_SLOT();
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *evt);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
private:
|
||||
//绘制坐标
|
||||
void drawCoord(QPainter *painter);
|
||||
|
||||
//波列数据转换为图像坐标
|
||||
QPointF coordCurvePoint(int ix,float value);
|
||||
|
||||
//绘制波列数据点
|
||||
void drawDataPoints(QPainter *painter);
|
||||
|
||||
//绘制鼠标位置线
|
||||
void drawMousePosLine(QPainter *painter);
|
||||
|
||||
//绘制鼠标单点
|
||||
void usevalueDrawPoint(QPainter *painter);
|
||||
|
||||
//曲线操作
|
||||
void initCurveViewQMenu();
|
||||
void initCurveEditQMenu();
|
||||
|
||||
//获取当前鼠标位置的曲线下标
|
||||
int calMousePoint();
|
||||
|
||||
//绘制编辑模式提示字符
|
||||
void drawEditTishi(QPainter *painter);
|
||||
|
||||
void editIfBegin();
|
||||
void initEditPart();//初始化编辑块
|
||||
void initeditIndex();
|
||||
void oriCur2Edit();//载入原有曲线
|
||||
void drawEditLine(QPainter *painter);//绘制编辑曲线
|
||||
void genEditLine();//生成编辑曲线
|
||||
void changeEditStrValue(int temp);//单回合编辑中更新起始编辑点
|
||||
void sortEdit();//顺序
|
||||
bool saveEdit(int Smooth);//保存编辑
|
||||
void overEdit();//结束编辑
|
||||
|
||||
void AngAdjWin();
|
||||
void smoothWin();
|
||||
|
||||
bool isIneditRange(int);
|
||||
private:
|
||||
bool press_noRelease_mode; //点下未抬起状态
|
||||
int press_noRelease_point; //点下未抬起状态下鼠标位置
|
||||
|
||||
float *m_values;
|
||||
int m_count;
|
||||
bool isInit;
|
||||
|
||||
float m_width;
|
||||
float m_height;
|
||||
QPoint lastPos;
|
||||
QPoint frontPos;
|
||||
QList<float> underBarHeight;
|
||||
|
||||
editEnd *msgBox2;
|
||||
bool editLock;
|
||||
bool ifContinue;//继续编辑标
|
||||
int pressPoint, releasePoint;//记录修改上下界
|
||||
int pressEdit,releaseEdit,curEdit,tempCurEdit; //编辑范围
|
||||
int lastEditPos,editIndexNum;
|
||||
int tempPEdit,tempREdit;//备份
|
||||
float *editValue, *tempEditValue;//编辑值
|
||||
int *editIndex;//有编辑过的index
|
||||
|
||||
int editStrValue, onceEditNum;//编辑起始位置,单次编辑量
|
||||
int *onceEditIndex;//单次修改index记录
|
||||
|
||||
bool hasSelect;//选中区域标识
|
||||
int whichMode;
|
||||
bool EditMode;
|
||||
|
||||
SmoothTool *sTool;
|
||||
AngleAdjTool *angTool;
|
||||
|
||||
float mouseDrawDepth, mouseDrawValue;//实时记录鼠标所在深度及数值
|
||||
|
||||
QPoint tishiEdit;
|
||||
float tishiEditTime;
|
||||
public:
|
||||
QString fileName, curveName;
|
||||
|
||||
int PageSize,CurrentPos,userPos;
|
||||
|
||||
float userCurrentPos;
|
||||
float userCurrentValue;
|
||||
|
||||
QRect rthy,rthy1,rthyt;
|
||||
float factor;
|
||||
float m_Xmin,m_Xmax;
|
||||
float sdep,edep,rlev;
|
||||
public:
|
||||
void button_editIfBegin();
|
||||
void button_smoothWin();
|
||||
void button_AngAdjWin();
|
||||
};
|
||||
|
||||
#endif // DRAWCURVEVIEW_H
|
||||
|
|
@ -1,555 +0,0 @@
|
|||
#include "ShowCurve.h"
|
||||
#include "ui_ShowCurve.h"
|
||||
//#include "DrawAPicture.h"
|
||||
#include <QDebug>
|
||||
#include <qtimer.h>
|
||||
#include <QPainter>
|
||||
#include <QComboBox>
|
||||
#include <QTextCodec>
|
||||
#include <QMessageBox>
|
||||
#include <QResizeEvent>
|
||||
#include <qtextbrowser.h>
|
||||
#include <QPropertyAnimation>
|
||||
#include "geometryutils.h"
|
||||
#include "CallManage.h"
|
||||
|
||||
#define R2LTIPS "请拖动数据表格纵向滑块即可完成深度初定位."
|
||||
#define EDITMODETIPS "正处于编辑模式单击右键以完成编辑."
|
||||
|
||||
ShowCurve::ShowCurve(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
m_pUI(new Ui::ShowCurve),vmax(-9999),vmin(-9999),
|
||||
mouseDepth(0),
|
||||
mouseValue(0),
|
||||
getBar(false),
|
||||
locked(true),
|
||||
hasTipsWidth(false)
|
||||
{
|
||||
val=NULL;
|
||||
m_pUI->setupUi(this);
|
||||
int w = width();
|
||||
int h = height();
|
||||
m_timer = new QTimer();
|
||||
|
||||
if(NULL != parent)
|
||||
{
|
||||
parent->setFixedSize(w,h);
|
||||
}
|
||||
|
||||
thisParent = parent;
|
||||
m_view = new DrawCurveView();
|
||||
|
||||
m_pUI->pushButton->setEnabled(false);
|
||||
m_pUI->pushButton_2->setEnabled(false);
|
||||
m_pUI->pushButton_3->setEnabled(false);
|
||||
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ValueChange(int, float)), this, SLOT(linkVerDeptSliderValueChange(int, float)));
|
||||
connect(m_pUI->verticalSlider,SIGNAL(valueChanged(int)),this,SLOT(onVerDeptSliderValueChange(int)));
|
||||
connect(m_view, SIGNAL(verticalSliderUP()), this, SLOT(SliderUP_SLOT()));
|
||||
connect(m_view, SIGNAL(verticalSliderDOWN()), this, SLOT(SliderDOWN_SLOT()));
|
||||
connect(m_view, SIGNAL(editModeTips()), this, SLOT(editModeTips_SLOT()));
|
||||
|
||||
connect(m_pUI->deptEdit->lineEdit_Depth, SIGNAL(textChanged( QString )),this,SLOT(slotChangeDepth(QString)));
|
||||
connect(m_pUI->pushButtonScale, SIGNAL(clicked()), this, SLOT(slotChangeScale()));
|
||||
connect(m_pUI->pushButtonStretch, SIGNAL(clicked()), this, SLOT(slotStretch()));
|
||||
connect(m_pUI->pushButtonCompres, SIGNAL(clicked()), this, SLOT(slotCompres()));
|
||||
|
||||
connect(m_pUI->pushButton, SIGNAL(clicked()), this, SLOT(editSig_SLOT()));
|
||||
connect(m_pUI->pushButton_2, SIGNAL(clicked()), this, SLOT(smoothSig_SLOT()));
|
||||
connect(m_pUI->pushButton_3, SIGNAL(clicked()), this, SLOT(angSig_SLOT()));
|
||||
connect(m_view, SIGNAL(enableEditButtons()), this, SLOT(editButtonsCon_SLOT()));
|
||||
connect(m_view, SIGNAL(unableEditButtons()), this, SLOT(unEditButtonsCon_SLOT()));
|
||||
|
||||
//测试
|
||||
// connect(m_pUI->pushButton_4, SIGNAL(clicked()), this, SLOT(testButton_SLOT()));
|
||||
|
||||
QPixmap pushButton_5Pixmap; pushButton_5Pixmap.load(::GetImagePath() + "/UIMake/R2L.png");
|
||||
m_pUI->pushButton_5->setFixedSize(pushButton_5Pixmap.width(), pushButton_5Pixmap.height());
|
||||
m_pUI->pushButton_5->setIcon(pushButton_5Pixmap);
|
||||
m_pUI->pushButton_5->setIconSize(QSize(pushButton_5Pixmap.width(), pushButton_5Pixmap.height()));
|
||||
//m_pUI->pushButton_5->setFlat(true);
|
||||
connect(m_pUI->pushButton_5, SIGNAL(clicked()), this, SLOT(R2LButton_SLOT()));
|
||||
connect(m_view, SIGNAL(R2L()), this, SLOT(R2LMouse_SLOT()));
|
||||
connect(m_pUI->lineEdit_Value, SIGNAL(returnPressed()), this, SLOT(R2LButton_SLOT()));
|
||||
m_pUI->lineEdit_Value->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
|
||||
QPixmap pushButton_6Pixmap;
|
||||
pushButton_6Pixmap.load(::GetImagePath() + "/UIMake/L2RLock.png");
|
||||
m_pUI->pushButton_6->setFixedSize(pushButton_6Pixmap.width(), pushButton_6Pixmap.height());
|
||||
m_pUI->pushButton_6->setIcon(pushButton_6Pixmap);
|
||||
m_pUI->pushButton_6->setIconSize(QSize(pushButton_6Pixmap.width(), pushButton_6Pixmap.height()));
|
||||
//m_pUI->pushButton_6->setFlat(true);
|
||||
connect(m_pUI->pushButton_6, SIGNAL(clicked()), this, SLOT(lockChange_SLOT()));
|
||||
|
||||
|
||||
QPixmap sizeButtonPixmap;
|
||||
sizeButtonPixmap.load(::GetImagePath() + "/UIMake/UIButtonBig_o.png");
|
||||
m_pUI->pushButtonStretch->setFixedSize(sizeButtonPixmap.width(), sizeButtonPixmap.height());
|
||||
m_pUI->pushButtonStretch->setIcon(sizeButtonPixmap);
|
||||
m_pUI->pushButtonStretch->setIconSize(QSize(sizeButtonPixmap.width(), sizeButtonPixmap.height()));
|
||||
//m_pUI->pushButtonStretch->setStyleSheet("QPushButton:hover{background-color: rgb(254,164,134);}");
|
||||
//m_pUI->pushButtonStretch->setFlat(true);
|
||||
sizeButtonPixmap.load(::GetImagePath() + "/UIMake/UIButtonSmall_o.png");
|
||||
m_pUI->pushButtonCompres->setFixedSize(sizeButtonPixmap.width(), sizeButtonPixmap.height());
|
||||
m_pUI->pushButtonCompres->setIcon(sizeButtonPixmap);
|
||||
m_pUI->pushButtonCompres->setIconSize(QSize(sizeButtonPixmap.width(), sizeButtonPixmap.height()));
|
||||
//m_pUI->pushButtonCompres->setFlat(true);
|
||||
|
||||
tipsHeight = m_pUI->textBrowser->height();
|
||||
//m_pUI->textBrowser->verticalScrollBar()->setVisible(false);
|
||||
//m_pUI->textBrowser->horizontalScrollBar()->setVisible(false);
|
||||
QPalette pa;
|
||||
pa.setColor(QPalette::WindowText, QColor(120,120,120));
|
||||
m_pUI->textBrowser->setPalette(pa);
|
||||
}
|
||||
void ShowCurve::testButton_SLOT()
|
||||
{
|
||||
|
||||
// DrawAPicture *t = new DrawAPicture();
|
||||
// t->show();
|
||||
}
|
||||
|
||||
void ShowCurve::init()
|
||||
{
|
||||
CLogIO *logio=new CLogIO();
|
||||
logio->Open(FileName.toStdString().c_str(),CSlfIO::modeRead);
|
||||
index=logio->OpenCurve(CurveName.toStdString().c_str());
|
||||
if(index<0) {
|
||||
delete logio;
|
||||
return;
|
||||
}
|
||||
logio->GetCurveInfo(index,&curveinfo);
|
||||
sdep=curveinfo.StartDepth;
|
||||
edep=curveinfo.EndDepth;
|
||||
rlev=curveinfo.DepLevel;
|
||||
m_view->sdep = sdep;
|
||||
m_view->edep = edep;
|
||||
m_view->rlev = rlev;
|
||||
m_view->userPos = 0;
|
||||
m_view->fileName = FileName;
|
||||
m_view->curveName = CurveName;
|
||||
curDepth=sdep+(edep-sdep)/2.;
|
||||
|
||||
count=(curveinfo.EndDepth-curveinfo.StartDepth)/curveinfo.DepLevel+1.5;
|
||||
val=new float[count];
|
||||
logio->ReadCurve(index,curveinfo.StartDepth,count,&val[0]);
|
||||
logio->CloseCurve(index);
|
||||
delete logio;
|
||||
|
||||
if(vmax==-9999 && vmin==-9999)
|
||||
if(!getValueRangeFromIni()){
|
||||
vmax=vmin=val[0];
|
||||
for(int i=1;i<count;i++)
|
||||
{
|
||||
if(vmax<val[i])vmax=val[i];
|
||||
if(vmin>val[i])vmin=val[i];
|
||||
}
|
||||
m_view->m_Xmax=vmax,m_view->m_Xmin=vmin;
|
||||
|
||||
m_pUI->lineEdit_Xmax->setText(QString::number(vmax));
|
||||
m_pUI->lineEdit_Xmax->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
m_pUI->lineEdit_Xmin->setText(QString::number(vmin));
|
||||
m_pUI->lineEdit_Xmin->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
}
|
||||
|
||||
m_view->setValues(val);
|
||||
m_view->factor=2;
|
||||
initVerMaxRange = 200;
|
||||
m_view->PageSize = int(count / initVerMaxRange + 100);
|
||||
if(m_view->PageSize < 500) m_view->PageSize=500;
|
||||
//m_view.PageSize=(int)(200./curveinfo.DepLevel+0.5);
|
||||
//for small rlev
|
||||
//if(curveinfo.DepLevel<0.005)m_view.PageSize/=100;
|
||||
//else if(curveinfo.DepLevel<0.05)m_view.PageSize/=10;
|
||||
|
||||
|
||||
QString title= QString( curveinfo.Name)+QString::fromUtf8("曲线预览");
|
||||
m_pUI->label_WfName->setText(title);
|
||||
m_pUI->label_StartDepth->setText(QString::number(sdep));
|
||||
m_pUI->label_EndDepth->setText(QString::number(edep));
|
||||
|
||||
m_pUI->deptEdit->lineEdit_Depth->setText(QString::number(curDepth));
|
||||
m_pUI->deptEdit->lineEdit_Depth->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
|
||||
QPalette pal;
|
||||
m_pUI->widgetPlot->setStyleSheet("background:lightgray");
|
||||
m_pUI->widgetPlot->setPalette(pal);
|
||||
m_view->setParent(m_pUI->widgetPlot);
|
||||
m_view->setCount(count);
|
||||
m_pUI->verticalSlider->setRange(0, initVerMaxRange);
|
||||
m_pUI->verticalSlider->setValue(initVerMaxRange / 2);
|
||||
}
|
||||
|
||||
bool ShowCurve::getValueRangeFromIni()
|
||||
{
|
||||
QString curveFamilyFilePath = ::GetConfPath() + "CurveFamily.ini";
|
||||
QFile curveFamilyFile(curveFamilyFilePath);
|
||||
if(!curveFamilyFile.open(QIODevice::ReadOnly | QIODevice::Text)) return false;
|
||||
|
||||
bool finished = false;
|
||||
while(!curveFamilyFile.atEnd())
|
||||
{
|
||||
QByteArray line = curveFamilyFile.readLine();
|
||||
QString str(line);
|
||||
QStringList strList = str.split("=");
|
||||
if(strList[0] == CurveName)
|
||||
{
|
||||
strList = str.split(",");
|
||||
float minValue = strList[1].toFloat();
|
||||
float maxValue = strList[2].toFloat();
|
||||
if(minValue < -9999 || minValue > 9999) return false;
|
||||
if(maxValue < -9999 || maxValue > 9999) return false;
|
||||
if(maxValue <= minValue) return false;
|
||||
m_view->m_Xmax=maxValue,m_view->m_Xmin=minValue;
|
||||
|
||||
m_pUI->lineEdit_Xmax->setText(QString::number(maxValue));
|
||||
m_pUI->lineEdit_Xmax->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
m_pUI->lineEdit_Xmin->setText(QString::number(minValue));
|
||||
m_pUI->lineEdit_Xmin->setValidator(new QDoubleValidator(-9999999,9999999,6,this));
|
||||
|
||||
finished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
curveFamilyFile.close();
|
||||
|
||||
return finished;
|
||||
}
|
||||
|
||||
void ShowCurve::editSig_SLOT()
|
||||
{
|
||||
m_view->button_editIfBegin();
|
||||
}
|
||||
void ShowCurve::smoothSig_SLOT()
|
||||
{
|
||||
m_view->button_smoothWin();
|
||||
}
|
||||
void ShowCurve::angSig_SLOT()
|
||||
{
|
||||
m_view->button_AngAdjWin();
|
||||
}
|
||||
|
||||
void ShowCurve::editModeTips_SLOT()
|
||||
{
|
||||
if(!hasTipsWidth){
|
||||
tipsWidth = m_pUI->textBrowser->width();
|
||||
hasTipsWidth = true;
|
||||
}
|
||||
tipsText = QString::fromUtf8(EDITMODETIPS);
|
||||
m_pUI->textBrowser->setText(tipsText);
|
||||
m_pUI->textBrowser->setGeometry(QRect( m_pUI->textBrowser->x(),
|
||||
m_pUI->textBrowser->y(),
|
||||
tipsWidth,
|
||||
m_pUI->textBrowser->height()));
|
||||
|
||||
connect(m_timer, SIGNAL(timeout()), SLOT(promptDisplay()));
|
||||
m_timer->setInterval(1000);
|
||||
m_timer->start();
|
||||
return;
|
||||
}
|
||||
|
||||
void ShowCurve::slotChangeDepth(const QString &text)
|
||||
{
|
||||
if(text.toFloat() < sdep || text.toFloat() > edep)
|
||||
{
|
||||
// m_pUI->lineEdit_Depth->setText(QString::number(curDepth));
|
||||
return;
|
||||
}
|
||||
curDepth = text.toFloat();
|
||||
if(curveinfo.EndDepth == curveinfo.StartDepth) {
|
||||
m_view->CurrentPos = 0;
|
||||
}
|
||||
else {
|
||||
m_view->CurrentPos = (curDepth - curveinfo.StartDepth) / (curveinfo.EndDepth - curveinfo.StartDepth) * count;
|
||||
}
|
||||
|
||||
//m_pUI->lineEdit_Value->setText(QString::number(curDepth));
|
||||
m_view->update();
|
||||
}
|
||||
|
||||
void ShowCurve::resizeEvent(QResizeEvent *resize)
|
||||
{
|
||||
QSize orgsize=this->size();
|
||||
QWidget::resizeEvent(resize);
|
||||
|
||||
if(resize->size().isValid())
|
||||
{
|
||||
QSize changeSize=resize->size();
|
||||
int width=changeSize.width()-orgsize.width();
|
||||
int height= changeSize.height()-orgsize.height();
|
||||
|
||||
m_view->resize(changeSize.width()-150,changeSize.height()-100);
|
||||
m_view->initView();
|
||||
m_view->update();
|
||||
}
|
||||
}
|
||||
|
||||
void ShowCurve::onVerDeptSliderValueChange(int value)
|
||||
{
|
||||
curDepth = edep - (edep-sdep) * value / initVerMaxRange;
|
||||
m_pUI->deptEdit->lineEdit_Depth->setText(QString::number(curDepth));
|
||||
m_view->update();
|
||||
|
||||
curDepRange();
|
||||
|
||||
//setCurveTableForce(curDepth);
|
||||
}
|
||||
|
||||
void ShowCurve::SliderUP_SLOT()
|
||||
{
|
||||
m_pUI->verticalSlider->setValue(m_pUI->verticalSlider->value() + 1);
|
||||
}
|
||||
|
||||
void ShowCurve::SliderDOWN_SLOT()
|
||||
{
|
||||
m_pUI->verticalSlider->setValue(m_pUI->verticalSlider->value() - 1);
|
||||
}
|
||||
|
||||
void ShowCurve::mouseMkChange(float depth, float value){
|
||||
mouseDepth = depth;
|
||||
mouseValue = value;
|
||||
//m_pUI->lineEdit_Value->setText(QString::number(depth));
|
||||
//m_pUI->lineEdit_curValue->setText(QString::number(value));
|
||||
}
|
||||
|
||||
void ShowCurve::lineEdit_curValue_Change(float v){
|
||||
//m_pUI->lineEdit_curValue->setText(QString::number(v));
|
||||
}
|
||||
|
||||
//联动
|
||||
void ShowCurve::linkVerDeptSliderValueChange(int value, float tipValue)
|
||||
{
|
||||
if(rlev <= 0 || edep == sdep || locked == false)return;
|
||||
|
||||
m_pUI->deptEdit->lineEdit_Depth->setText(QString::number(tipValue));
|
||||
m_pUI->lineEdit_Value->setText(QString::number(tipValue));
|
||||
|
||||
int pageNo = (edep - tipValue) / (edep-sdep) * initVerMaxRange + m_view->PageSize / 2 * rlev / ((edep-sdep)/initVerMaxRange);
|
||||
if(pageNo > initVerMaxRange) pageNo = initVerMaxRange;
|
||||
|
||||
int curCount = (tipValue - sdep) / rlev + 0.5;
|
||||
//m_pUI->lineEdit_curValue->setText(QString::number(val[curCount]));
|
||||
|
||||
m_pUI->verticalSlider->setValue(pageNo);
|
||||
onVerDeptSliderValueChange(pageNo);
|
||||
|
||||
m_view->userCurrentPos = tipValue;
|
||||
|
||||
m_view->update();
|
||||
}
|
||||
|
||||
void ShowCurve::setTableBro(QScrollBar *p)
|
||||
{
|
||||
getBar = true;
|
||||
tableBro = p;
|
||||
}
|
||||
void ShowCurve::setCurveTable(QTableWidget *t)
|
||||
{
|
||||
curveTable = t;
|
||||
}
|
||||
|
||||
//改变刻度按钮槽
|
||||
void ShowCurve::slotChangeScale()
|
||||
{
|
||||
m_view->m_Xmin=m_pUI->lineEdit_Xmin->text().toFloat();
|
||||
m_view->m_Xmax=m_pUI->lineEdit_Xmax->text().toFloat();
|
||||
m_view->update();
|
||||
}
|
||||
|
||||
void ShowCurve::slotStretch()//深度拉伸
|
||||
{
|
||||
initVerMaxRange *= 1.5;
|
||||
if(initVerMaxRange == 1)initVerMaxRange=2;
|
||||
m_pUI->verticalSlider->setRange(0, initVerMaxRange);
|
||||
|
||||
if(!m_pUI->pushButtonCompres->isEnabled())
|
||||
m_pUI->pushButtonCompres->setEnabled(true);
|
||||
|
||||
m_view->PageSize/=1.5;
|
||||
if(m_view->PageSize < 50)
|
||||
m_pUI->pushButtonStretch->setEnabled(false);
|
||||
|
||||
m_view->update();
|
||||
|
||||
curDepRange();
|
||||
}
|
||||
void ShowCurve::slotCompres()//深度压缩
|
||||
{
|
||||
initVerMaxRange /= 1.5;
|
||||
|
||||
if(initVerMaxRange / 1.5 <= 1)
|
||||
m_pUI->pushButtonCompres->setEnabled(false);
|
||||
|
||||
m_pUI->verticalSlider->setRange(0, initVerMaxRange);
|
||||
|
||||
if(!m_pUI->pushButtonStretch->isEnabled())
|
||||
m_pUI->pushButtonStretch->setEnabled(true);
|
||||
|
||||
m_view->PageSize*=1.5;
|
||||
m_view->update();
|
||||
|
||||
curDepRange();
|
||||
}
|
||||
|
||||
//改变绘制窗口的深度显示
|
||||
void ShowCurve::curDepRange()
|
||||
{
|
||||
float cDR_value = m_pUI->verticalSlider->value();
|
||||
float cDR_startDepth = edep - (edep-sdep) * cDR_value / initVerMaxRange;
|
||||
float cDR_endDepth = cDR_startDepth + m_view->PageSize * rlev;
|
||||
|
||||
m_pUI->label_StartDepth->setText(QString::number(cDR_startDepth));
|
||||
m_pUI->label_EndDepth->setText(QString::number(cDR_endDepth));
|
||||
}
|
||||
|
||||
void ShowCurve::showEvent(QShowEvent *sEvent)
|
||||
{
|
||||
QWidget::showEvent(sEvent);
|
||||
|
||||
QRect rec=m_pUI->widgetPlot->geometry();
|
||||
qDebug()<<"value:"<<rec;
|
||||
int w=rec.width();
|
||||
int h=rec.height();
|
||||
|
||||
m_view->setGeometry(0,0,w,h);
|
||||
|
||||
m_view->initView();
|
||||
|
||||
}
|
||||
|
||||
ShowCurve::~ShowCurve()
|
||||
{
|
||||
delete m_pUI;
|
||||
if(val)delete []val;
|
||||
delete m_view;
|
||||
delete m_timer;
|
||||
}
|
||||
|
||||
void ShowCurve::editButtonsCon_SLOT()
|
||||
{
|
||||
m_pUI->pushButton->setEnabled(true);
|
||||
m_pUI->pushButton_2->setEnabled(true);
|
||||
m_pUI->pushButton_3->setEnabled(true);
|
||||
}
|
||||
void ShowCurve::unEditButtonsCon_SLOT()
|
||||
{
|
||||
m_pUI->pushButton->setEnabled(false);
|
||||
m_pUI->pushButton_2->setEnabled(false);
|
||||
m_pUI->pushButton_3->setEnabled(false);
|
||||
}
|
||||
|
||||
void ShowCurve::R2LButton_SLOT()
|
||||
{
|
||||
if(!getBar){
|
||||
if(!hasTipsWidth){
|
||||
tipsWidth = m_pUI->textBrowser->width();
|
||||
hasTipsWidth = true;
|
||||
}
|
||||
tipsText = QString::fromUtf8(R2LTIPS);
|
||||
m_pUI->textBrowser->setText(tipsText);
|
||||
m_pUI->textBrowser->setGeometry(QRect( m_pUI->textBrowser->x(),
|
||||
m_pUI->textBrowser->y(),
|
||||
tipsWidth,
|
||||
m_pUI->textBrowser->height()));
|
||||
|
||||
connect(m_timer, SIGNAL(timeout()), SLOT(promptDisplay()));
|
||||
m_timer->setInterval(1000);
|
||||
m_timer->start();
|
||||
return;
|
||||
}
|
||||
|
||||
//以输入框深度信息
|
||||
float R2L_depthValue = m_pUI->lineEdit_Value->text().toFloat();
|
||||
m_view->userCurrentPos = R2L_depthValue;
|
||||
|
||||
int pageNo = (edep - R2L_depthValue) / (edep-sdep) * initVerMaxRange + m_view->PageSize / 2 * rlev / ((edep-sdep)/initVerMaxRange);
|
||||
if(pageNo > initVerMaxRange) pageNo = initVerMaxRange;
|
||||
m_pUI->verticalSlider->setValue(pageNo);
|
||||
|
||||
int tv = tableBro->maximum();
|
||||
float oneValue = (edep - sdep) / tv;
|
||||
int bv = (R2L_depthValue - sdep) / oneValue;
|
||||
tableBro->setValue(bv);
|
||||
|
||||
setCurveTableForce(R2L_depthValue);
|
||||
}
|
||||
|
||||
void ShowCurve::R2LMouse_SLOT()
|
||||
{
|
||||
if(!getBar) return;
|
||||
|
||||
//以鼠标位置深度信息
|
||||
m_view->userCurrentPos = mouseDepth;
|
||||
|
||||
m_pUI->lineEdit_Value->setText(QString::number(mouseDepth));
|
||||
//m_pUI->lineEdit_curValue->setText(QString::number(mouseValue));
|
||||
|
||||
int tv = tableBro->maximum();
|
||||
float oneValue = (edep - sdep) / tv;
|
||||
int bv = (mouseDepth - sdep) / oneValue;
|
||||
tableBro->setValue(bv);
|
||||
|
||||
setCurveTableForce(mouseDepth);
|
||||
}
|
||||
|
||||
void ShowCurve::promptDisplay()
|
||||
{
|
||||
m_timer->stop();
|
||||
|
||||
//m_pUI->textBrowser->setText(tipsText);
|
||||
//m_pUI->textBrowser->windowOpacity
|
||||
QPropertyAnimation *tipsAnimation = new QPropertyAnimation(m_pUI->textBrowser, "geometry");
|
||||
tipsAnimation->setDuration(2000);
|
||||
tipsAnimation->setStartValue(QRect( m_pUI->textBrowser->x(),
|
||||
m_pUI->textBrowser->y(),
|
||||
tipsWidth,
|
||||
m_pUI->textBrowser->height()
|
||||
));
|
||||
tipsAnimation->setEndValue(QRect( m_pUI->textBrowser->x(),
|
||||
m_pUI->textBrowser->y(),
|
||||
0,
|
||||
m_pUI->textBrowser->height()
|
||||
));
|
||||
|
||||
tipsAnimation->start();
|
||||
connect(tipsAnimation, SIGNAL(finished()), this, SLOT(clearTips_SLOT()));
|
||||
}
|
||||
|
||||
void ShowCurve::clearTips_SLOT()
|
||||
{
|
||||
m_pUI->textBrowser->setText("");
|
||||
}
|
||||
|
||||
void ShowCurve::setCurveTableForce(float dep)
|
||||
{
|
||||
float tv = tableBro->maximum();
|
||||
float oneValue = (edep - sdep) / tv;
|
||||
int bv = (dep - sdep) / oneValue;
|
||||
|
||||
float SCTF_r = bv / tv;
|
||||
|
||||
int SCTF_pos = (curveTable->rowCount()+1) * SCTF_r;
|
||||
|
||||
qDebug() << "setCurveTableForce" << QString::number(SCTF_pos);
|
||||
curveTable->selectRow(SCTF_pos);
|
||||
}
|
||||
|
||||
void ShowCurve::lockChange_SLOT()
|
||||
{
|
||||
locked = !locked;
|
||||
if(locked){
|
||||
QPixmap pushButton_6Pixmap;
|
||||
pushButton_6Pixmap.load(::GetImagePath() + "/UIMake/L2RLock.png");
|
||||
m_pUI->pushButton_6->setFixedSize(pushButton_6Pixmap.width(), pushButton_6Pixmap.height());
|
||||
m_pUI->pushButton_6->setIcon(pushButton_6Pixmap);
|
||||
m_pUI->pushButton_6->setIconSize(QSize(pushButton_6Pixmap.width(), pushButton_6Pixmap.height()));
|
||||
}
|
||||
else{
|
||||
QPixmap pushButton_6Pixmap;
|
||||
pushButton_6Pixmap.load(::GetImagePath() + "/UIMake/L2RUnlock.png");
|
||||
m_pUI->pushButton_6->setFixedSize(pushButton_6Pixmap.width(), pushButton_6Pixmap.height());
|
||||
m_pUI->pushButton_6->setIcon(pushButton_6Pixmap);
|
||||
m_pUI->pushButton_6->setIconSize(QSize(pushButton_6Pixmap.width(), pushButton_6Pixmap.height()));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
#ifndef WIDGET_H1
|
||||
#define WIDGET_H1
|
||||
|
||||
#include <QDir>
|
||||
#include <QWidget>
|
||||
#include <QFileInfo>
|
||||
#include <QScrollBar>
|
||||
#include <qtablewidget.h>
|
||||
#include <QTableWidgetItem>
|
||||
//#include <windows.h>
|
||||
#include "MemRdWt.h"
|
||||
#include "DrawCurveView.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui {
|
||||
class ShowCurve;
|
||||
}
|
||||
|
||||
class ShowCurve : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ShowCurve(QWidget *parent = 0);
|
||||
~ShowCurve();
|
||||
Slf_CURVE curveinfo;
|
||||
float *val;
|
||||
DWORD count;
|
||||
float sdep,edep,rlev,stime,etime,curTime,curDepth;
|
||||
float vmax,vmin;
|
||||
DrawCurveView *m_view;
|
||||
//void readcurve();
|
||||
void init();
|
||||
QString FileName,CurveName;
|
||||
int index;
|
||||
|
||||
int initVerMaxRange;
|
||||
|
||||
void mouseMkChange(float depth, float value);
|
||||
|
||||
void lineEdit_curValue_Change(float);
|
||||
|
||||
void setTableBro(QScrollBar *p);
|
||||
void setCurveTable(QTableWidget *t);
|
||||
protected:
|
||||
//implement class QWidget
|
||||
virtual void showEvent(QShowEvent *sEvent);
|
||||
virtual void resizeEvent(QResizeEvent *resize);
|
||||
|
||||
public slots:
|
||||
void onVerDeptSliderValueChange(int value);
|
||||
void SliderUP_SLOT();
|
||||
void SliderDOWN_SLOT();
|
||||
void linkVerDeptSliderValueChange(int value,float tipValue);
|
||||
void slotChangeDepth(const QString &text);
|
||||
void slotChangeScale();
|
||||
void slotStretch();
|
||||
void slotCompres();
|
||||
|
||||
void editSig_SLOT();
|
||||
void smoothSig_SLOT();
|
||||
void angSig_SLOT();
|
||||
void editButtonsCon_SLOT();
|
||||
void unEditButtonsCon_SLOT();
|
||||
void R2LButton_SLOT();
|
||||
void R2LMouse_SLOT();
|
||||
private:
|
||||
bool getBar;
|
||||
bool locked;
|
||||
float mouseDepth, mouseValue;
|
||||
QScrollBar *tableBro;
|
||||
QTableWidget *curveTable;
|
||||
QWidget* thisParent;
|
||||
Ui::ShowCurve *m_pUI;
|
||||
float tipsWidth, tipsHeight;
|
||||
bool hasTipsWidth;
|
||||
QTimer *m_timer;
|
||||
QString tipsText;
|
||||
|
||||
void curDepRange();
|
||||
void setCurveTableForce(float dep);
|
||||
bool getValueRangeFromIni();
|
||||
|
||||
private slots:
|
||||
void testButton_SLOT();
|
||||
void lockChange_SLOT();
|
||||
void editModeTips_SLOT();
|
||||
void promptDisplay();
|
||||
void clearTips_SLOT();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,580 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ShowCurve</class>
|
||||
<widget class="QWidget" name="ShowCurve">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>800</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>571</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>曲线预览</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_WfName">
|
||||
<property name="text">
|
||||
<string>曲线:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8" stretch="2,3,2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Xmin">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonScale">
|
||||
<property name="text">
|
||||
<string>改变刻度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Xmax">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QWidget" name="widgetPlot" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>385</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QSlider" name="verticalSlider">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>199</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="DeptLineEdit" name="deptEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>55</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>55</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>曲线绘制</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>平滑处理</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>基线校正</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12" stretch="2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="2,4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>底深(m)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_EndDepth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10" stretch="2,4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>顶深(m)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_StartDepth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>500</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="2,2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonStretch">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:hover{background-color: rgba(0, 170, 255, 80);}
|
||||
QPushButton{background-color: rgba(255, 255, 255, 0);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonCompres">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:hover{background-color: rgba(0, 170, 255, 80);}QPushButton{background-color: rgba(255, 255, 255, 0);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_6">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:hover{background-color: rgba(0, 170, 255, 80);}QPushButton{background-color: rgba(255, 255, 255, 0);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>深度定位(m)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Value">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:hover{background-color: rgba(0, 170, 255, 80);}QPushButton{background-color: rgba(255, 255, 255, 0);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>DeptLineEdit</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header location="global">deptlineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -21,8 +21,6 @@
|
|||
//#include "ConsoleOutputWidget.h"
|
||||
|
||||
#include "ui_WellLogTableDialogNew.h"
|
||||
#include "ShowCurve.h"
|
||||
#include "CurvePropertyEdit.h"
|
||||
#include "CallManage.h"
|
||||
#include "ObjectID.h"
|
||||
//float保留4位小数
|
||||
|
|
@ -255,104 +253,6 @@ bool WellLogTableDialogNew::InitWellLog()
|
|||
return true;
|
||||
}
|
||||
|
||||
//swtichViewSize();
|
||||
int Type=0;
|
||||
//if(TypeName=="波列数据")Type=1;
|
||||
|
||||
QWidget* sPage=findChild<QWidget*>("statisticsPage");
|
||||
QWidget* pPage=findChild<QWidget*>("protoprtyPage");
|
||||
QWidget* cPage=findChild<QWidget*>("computePage");
|
||||
QWidget* pvPage=findChild<QWidget*>("curvePreViewPage");
|
||||
QTabWidget* tabWidget=findChild<QTabWidget*>("tabWidget");
|
||||
if(NULL != sPage && NULL != pPage && NULL != cPage && NULL != pvPage)
|
||||
{
|
||||
if(NULL != tabWidget)
|
||||
{
|
||||
QScrollArea* sScrollArea=tabWidget->findChild<QScrollArea*>("sScrollArea");
|
||||
QScrollArea* pScrollArea=tabWidget->findChild<QScrollArea*>("pScrollArea");
|
||||
QScrollArea* cScrollArea=tabWidget->findChild<QScrollArea*>("cscrollArea");
|
||||
QScrollArea* curveScrollArea=tabWidget->findChild<QScrollArea*>("curveScrollArea");
|
||||
if(NULL != sScrollArea)
|
||||
{
|
||||
sScrollArea->setWidget(sPage);
|
||||
}
|
||||
|
||||
if(NULL != pScrollArea)
|
||||
{
|
||||
pScrollArea->setWidget(pPage);
|
||||
//属性
|
||||
CCurvePropertyEditDlg *pDlg=new CCurvePropertyEditDlg(pPage, 0);
|
||||
//connect(pDlg,SIGNAL(destroyed()),this,SLOT(slotCurvePropertyGc()));
|
||||
pDlg->FileName=FileName;
|
||||
pDlg->CurveName=CurveName;
|
||||
pDlg->Type=Type;
|
||||
//pDlg->init();
|
||||
pDlg->show();
|
||||
}
|
||||
|
||||
if(NULL != cScrollArea)
|
||||
{
|
||||
if(Type==0)cScrollArea->setWidget(cPage);
|
||||
}
|
||||
|
||||
if(NULL != curveScrollArea)
|
||||
{
|
||||
curveScrollArea->setWidget(pvPage);
|
||||
//曲线
|
||||
ShowCurve *pDlg=new ShowCurve(m_pUI->curvePreViewPage);
|
||||
pDlg->setObjectName("curveView");
|
||||
pDlg->FileName=FileName;
|
||||
pDlg->CurveName=CurveName;
|
||||
pDlg->init();
|
||||
pDlg->setCurveTable(m_pUI->tableWidget);
|
||||
pDlg->show();
|
||||
}
|
||||
|
||||
sPage->show();
|
||||
pPage->show();
|
||||
pvPage->show();
|
||||
if(Type==0)
|
||||
{
|
||||
cPage->show();//whp change 2020.5.11 for 波列数据编辑和管理 波列曲线不计算
|
||||
}
|
||||
|
||||
tabWidget->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if(m_pWellLogs.size())
|
||||
// {
|
||||
// if ((m_pWellLogs[0]->GetTypeID()==GetClassID_WellLog()||
|
||||
// m_pWellLogs[0]->GetTypeID()==GetClassID_WellTrajectory())&&m_pWellLogs[0]->m_ObjectType!=TABLE_OBJECT)//非多维数据
|
||||
// {
|
||||
// m_DataTyle=valid_NULL;
|
||||
// m_gridData->initWellLogData(D_WellLogData ,m_pWellLogs);
|
||||
// }
|
||||
// else //多维数据
|
||||
// if (m_pWellLogs[0]->GetTypeID()==GetClassID_WellLogWavefile())
|
||||
// {
|
||||
// m_DataTyle=valid_NULL;
|
||||
// m_gridData->initMultWellLogData(D_MultWellLogData,m_pWellLogs);
|
||||
// }
|
||||
// else if (m_pWellLogs[0]->GetTypeID()==GetClassID_WellLogTDT())
|
||||
// {
|
||||
// m_DataTyle=valid_NULL;
|
||||
// m_gridData->initTDTWellLogData(D_TDTWellLogData,m_pWellLogs);
|
||||
// }
|
||||
// else if (m_pWellLogs[0]->GetTypeID()==GetClassID_WellLogFMT())
|
||||
// {
|
||||
// m_DataTyle=valid_NULL;
|
||||
// m_gridData->initFMTWellLogData(D_FMTWellLogData,m_pWellLogs);
|
||||
// }
|
||||
// else {
|
||||
// m_gridData->addActonMenu(2);
|
||||
|
||||
// m_DataTyle=valid_NULL;
|
||||
// //表格数据
|
||||
// m_gridData->initTableWellLogData(D_TableWellLogData,m_pWellLogs);
|
||||
// }
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,14 +48,11 @@ CONFIG(debug, debug|release){
|
|||
|
||||
FORMS += \
|
||||
AngleAdjTool.ui \
|
||||
CurvePropertyEdit.ui \
|
||||
ShowCurve.ui \
|
||||
SmoothTool.ui \
|
||||
WellDialog.ui \
|
||||
WellLogProjectDialog.ui \
|
||||
WellLogRoundDialog.ui \
|
||||
WellLogTableDialogNew.ui \
|
||||
editEnd.ui
|
||||
WellLogTableDialogNew.ui
|
||||
|
||||
HEADERS += \
|
||||
../../common/geometryutils.h \
|
||||
|
|
@ -73,23 +70,15 @@ HEADERS += \
|
|||
../include/completertextedit.h \
|
||||
../include/griddataadapter.h \
|
||||
AngleAdjTool.h \
|
||||
CurvePropertyEdit.h \
|
||||
DrawCurveView.h \
|
||||
ShowCurve.h \
|
||||
SmoothTool.h \
|
||||
TipPop.h \
|
||||
deptlineedit.h \
|
||||
editEnd.h
|
||||
TipPop.h
|
||||
|
||||
SOURCES += \
|
||||
../../common/geometryutils.cpp \
|
||||
../CallManage/CallManage.cpp \
|
||||
AngleAdjTool.cpp \
|
||||
CStringType.cpp \
|
||||
CurvePropertyEdit.cpp \
|
||||
DrawCurveView.cpp \
|
||||
MyWelllogRound.cpp \
|
||||
ShowCurve.cpp \
|
||||
SmoothTool.cpp \
|
||||
TipPop.cpp \
|
||||
WellDialog.cpp \
|
||||
|
|
@ -100,8 +89,6 @@ SOURCES += \
|
|||
WellLogTableDialogNew.cpp \
|
||||
assetcopy.cpp \
|
||||
completertextedit.cpp \
|
||||
deptlineedit.cpp \
|
||||
editEnd.cpp \
|
||||
griddataadapter.cpp
|
||||
|
||||
INCLUDEPATH += ../include
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
#include "deptlineedit.h"
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QStyleOptionFrameV2>
|
||||
#include <QScrollBar>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QTextCodec>
|
||||
#include <QSpacerItem>
|
||||
|
||||
DeptLineEdit::DeptLineEdit(QWidget *parent)
|
||||
: QGraphicsView(parent)
|
||||
{
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
DeptLineEdit::~DeptLineEdit()
|
||||
{
|
||||
|
||||
}
|
||||
void DeptLineEdit::init()
|
||||
{
|
||||
proxyWidget=NULL;
|
||||
m_depWidget=NULL;
|
||||
m_lbl=NULL;
|
||||
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
m_depWidget=new QWidget();
|
||||
m_depWidget->setFixedSize(200,35);
|
||||
QHBoxLayout *hlayout=new QHBoxLayout();
|
||||
lineEdit_Depth=new QLineEdit(m_depWidget);
|
||||
lineEdit_Depth->setFixedSize(100,30);
|
||||
lineEdit_Depth->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
lineEdit_Depth->setContentsMargins(0,0,0,0);
|
||||
|
||||
lineEdit_Depth->setStyleSheet("border:1px solid gray;");
|
||||
m_lbl=new QLabel(m_depWidget);
|
||||
m_lbl->setFixedHeight(30);
|
||||
m_lbl->setText(tr("当前深度(m):"));//
|
||||
hlayout->addStretch(1);
|
||||
hlayout->addWidget(m_lbl,0,Qt::AlignHCenter);
|
||||
hlayout->addWidget(lineEdit_Depth,1);
|
||||
hlayout->addStretch(1);
|
||||
hlayout->setContentsMargins(0,0,0,0);
|
||||
m_lbl->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
|
||||
m_depWidget->setLayout(hlayout);
|
||||
m_depWidget->setContentsMargins(0,0,0,0);
|
||||
m_scene=new QGraphicsScene();
|
||||
this->setScene(m_scene);
|
||||
|
||||
}
|
||||
void DeptLineEdit::showEvent(QShowEvent *)
|
||||
{
|
||||
m_scene->setSceneRect(rect());
|
||||
|
||||
m_depWidget->setFixedSize(height(),width());
|
||||
proxyWidget= m_scene->addWidget(m_depWidget);
|
||||
this->setContentsMargins(0,0,0,0);
|
||||
proxyWidget->setContentsMargins(0,0,0,0);
|
||||
QPoint point=rect().center();
|
||||
//proxyWidget->translate(0,point.y()+height()/2.+1);
|
||||
proxyWidget->setRotation(-90);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
#ifndef DEPTLINEEDIT_H
|
||||
#define DEPTLINEEDIT_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLineEdit>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QGraphicsView>
|
||||
#include <QLineEdit>
|
||||
#include <QLabel>
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
/*自定义输入控件*/
|
||||
class DeptLineEdit : public QGraphicsView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DeptLineEdit(QWidget *parent);
|
||||
~DeptLineEdit();
|
||||
QLineEdit *lineEdit_Depth;
|
||||
QLabel *m_lbl;
|
||||
// QWidget interface
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
private:
|
||||
void init();
|
||||
private:
|
||||
|
||||
QGraphicsScene *m_scene;
|
||||
private:
|
||||
QRect m_rect;
|
||||
QGraphicsProxyWidget* proxyWidget;
|
||||
QWidget *m_depWidget;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // DEPTLINEEDIT_H
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#include "editEnd.h"
|
||||
#include "ui_editEnd.h"
|
||||
|
||||
editEnd::editEnd(QDialog *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::editEnd)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->radioButton->setChecked(true);
|
||||
|
||||
connect(ui->radioButton, SIGNAL(toggled(bool)), this, SLOT(smChooseChange_SLOT()));
|
||||
connect(ui->radioButton_2, SIGNAL(toggled(bool)), this, SLOT(smChooseChange_SLOT()));
|
||||
connect(ui->radioButton_3, SIGNAL(toggled(bool)), this, SLOT(smChooseChange_SLOT()));
|
||||
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(continueEdit_SLOT()));
|
||||
}
|
||||
|
||||
editEnd::~editEnd()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void editEnd::continueEdit_SLOT()
|
||||
{
|
||||
emit sendContinueSignal();
|
||||
}
|
||||
|
||||
int editEnd::SmoothResult(){
|
||||
if(ui->radioButton_3->isChecked())
|
||||
return 1;
|
||||
else if(ui->radioButton_2->isChecked())
|
||||
return 2;
|
||||
else
|
||||
return 3;
|
||||
}
|
||||
|
||||
void editEnd::smChooseChange_SLOT()
|
||||
{
|
||||
if(ui->radioButton_3->isChecked())
|
||||
emit sendSmData(1);
|
||||
else if(ui->radioButton_2->isChecked())
|
||||
emit sendSmData(2);
|
||||
else
|
||||
emit sendSmData(3);
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#ifndef EDITEND_H
|
||||
#define EDITEND_H
|
||||
|
||||
#include <QDialog>
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui {
|
||||
class editEnd;
|
||||
}
|
||||
|
||||
class editEnd : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
signals:
|
||||
void sendSmData(int);
|
||||
void sendContinueSignal();
|
||||
|
||||
public:
|
||||
explicit editEnd(QDialog *parent = 0);
|
||||
~editEnd();
|
||||
|
||||
int SmoothResult();
|
||||
private:
|
||||
Ui::editEnd *ui;
|
||||
|
||||
private slots:
|
||||
void smChooseChange_SLOT();
|
||||
void continueEdit_SLOT();
|
||||
|
||||
};
|
||||
|
||||
#endif // EDITEND_H
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>editEnd</class>
|
||||
<widget class="QDialog" name="editEnd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>391</width>
|
||||
<height>213</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>70</y>
|
||||
<width>371</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>平滑选项</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>331</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_3">
|
||||
<property name="text">
|
||||
<string>3点平滑</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_2">
|
||||
<property name="text">
|
||||
<string>5点平滑</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton">
|
||||
<property name="text">
|
||||
<string>不平滑</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>10</y>
|
||||
<width>261</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>已完成编辑!是否替换原曲线?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>160</y>
|
||||
<width>369</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="text">
|
||||
<string>是</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>否</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>继续编辑</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>editEnd</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>351</x>
|
||||
<y>38</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>233</x>
|
||||
<y>29</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>editEnd</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>330</x>
|
||||
<y>66</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>197</x>
|
||||
<y>125</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Loading…
Reference in New Issue
Block a user