mainform.ui.h

来自「读取Segy格式地震数据的类SegyReader, 在segy.h文件中有」· C头文件 代码 · 共 93 行

H
93
字号
/****************************************************************************
** 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 + =
减小字号Ctrl + -
显示快捷键?