FillPits/fillpits.cpp

Go to the documentation of this file.
00001 #include <QtGui>
00002 #include "fillpits.h"
00003 #include "./../pihmRasterLIBS/flood.h"
00004 fillpitsDlg::fillpitsDlg(QWidget *parent)
00005 {
00006         setupUi(this);
00007         connect(inputBrowseButton, SIGNAL(clicked()), this, SLOT(inputBrowse()));
00008         connect(outputBrowseButton, SIGNAL(clicked()), this, SLOT(outputBrowse()));
00009         connect(runButton, SIGNAL(clicked()), this, SLOT(run()));
00010         connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
00011         connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
00012 }
00013 
00014 void fillpitsDlg::inputBrowse()
00015 {
00016         QString str = QFileDialog::getOpenFileName(this, "Choose File", "~/","DEM Grid File(*.adf *.asc)");
00017         inputFileLineEdit->setText(str);
00018 }
00019 
00020 void fillpitsDlg::outputBrowse()
00021 {
00022         QString temp = QFileDialog::getSaveFileName(this, "Choose File", "~/","DEM Grid File(*.adf *.asc)");
00023         QString tmp = temp;
00024         if(!(tmp.toLower()).endsWith(".asc")){
00025         tmp.append(".asc");
00026         temp = tmp;
00027         }
00028         
00029         outputFileLineEdit->setText(temp);
00030 }
00031 
00032 void fillpitsDlg::run()
00033 {
00034         QString inputFileName((inputFileLineEdit->text()));
00035         QString outputFileName((outputFileLineEdit->text()));
00036         int err = flood((char *)inputFileName.ascii(), "dummy", (char *)outputFileName.ascii() );
00037         if(showPF_DFrame->isChecked() == 1){
00038         //QgsRasterLayer *tempLayer = new QgsRasterLayer("/backup/pihm/RasterProcessing/FillPits", "morgedem.asc");
00039         }
00040         
00041 }
00042 
00043 void fillpitsDlg::help()
00044 {
00045 
00046 }

Generated on Sun Aug 5 17:33:58 2007 for PIHMgis by  doxygen 1.5.2