📄 mainform.ui.h
字号:
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
#include <qfile.h>
#include <qdatastream.h>
#include <qfiledialog.h>
#include "segy.h"
#include <iostream.h>
void MainForm::fileNew()
{
}
void MainForm::fileOpen()
{
QString fn = QFileDialog::getOpenFileName(
QString::null,
"Seg-Y Data (*.sgy)",
this,
"open file dialog",
"Choose a file to open" );
if ( !fn.isEmpty() ) {
this->setCaption(QString("FileName=") +fn);
//data=SegyReader::getSegyDataAndChar(thedim,fn.ascii());
dataFileName = fn;
}
//根据选择的数据文件名,得到索引文件名,
QString indexFileName = dataFileName + QString(".idx");
SegyReader segyReader=SegyReader(dataFileName.ascii(), indexFileName.ascii(), 0, 12);
segyReader.buildIndexFile(); //生成索引文件
segyReader.phaseIndexFile(); //解析索引文件
segyReader.printIndexbuf(); //打印索引文件
float * tmpData = segyReader.getSegyData(40507,0); //根据炮号定位数据
for(int i=0;i<3; i++) { //打印道头数据
cout<<"tmpData["<<i<<"]="<<tmpData[i]<<endl;
tableTHead->setText ( i, 0, QString::number(i) );
tableTHead->setText ( i, 1, QString::number(tmpData[i]) );
}
}
void MainForm::fileSave()
{
}
void MainForm::fileSaveAs()
{
}
void MainForm::filePrint()
{
}
void MainForm::fileExit()
{
}
void MainForm::helpIndex()
{
}
void MainForm::helpContents()
{
}
void MainForm::helpAbout()
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -