?? 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;
}
//根據(jù)選擇的數(shù)據(jù)文件名,得到索引文件名,
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); //根據(jù)炮號定位數(shù)據(jù)
for(int i=0;i<3; i++) { //打印道頭數(shù)據(jù)
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()
{
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -