Skip to content
Permalink
Browse files
Move some debugging output to QgsLogger::debug
Remove unnecessary #includes
Move from Qt3 to Qt4 style of includes


git-svn-id: http://svn.osgeo.org/qgis/trunk@5785 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Sep 9, 2006
1 parent 7b05bca commit 0c57c5508ae076860a3ca759a1fd5c4a3ef439f8
@@ -1,16 +1,21 @@
#include "graticulecreator.h"

#include <stdio.h>
#include <cassert>
#include <qtextstream.h>
#include <iostream>
#include <fstream>
#include <qfileinfo.h>
#include <qstringlist.h>

#include <QTextStream>
#include <QFileInfo>
#include <QStringList>

#include <qgis.h>
#include <qgslogger.h>

GraticuleCreator::GraticuleCreator(QString theOutputFileName,ShapeType theType)
{
std::cout << "GraticuleCreator constructor called with " << theOutputFileName.toLocal8Bit().data()
<< " for output file " << std::endl;
QgsLogger::debug("GraticuleCreator constructor called with " +
theOutputFileName + " for output file ");
/* Open and prepare output files */
createDbf(theOutputFileName);
createShapeFile(theOutputFileName,theType);
@@ -80,7 +85,7 @@ void GraticuleCreator::writeDbfRecord ( int theRecordIdInt, QString theLabel)
std::cerr << "DBFWriteStringAttribute failed. : " << theRecordIdInt << " - " << theLabel.toLocal8Bit().data() <<std::endl;
//exit(ERR_DBFWRITEINTEGERATTRIBUTE);
}
std::cerr << " - OK! " << std::endl;
QgsLogger::debug(" - OK! ");
}
//DBFWriteIntegerAttribute(mDbfHandle, theRecordIdInt, 0, theRecordIdInt);
//DBFWriteStringAttribute(mDbfHandle, theRecordIdInt, 1, theLabel);
@@ -5,8 +5,8 @@
#include "utils.h"

//qt includes
#include <qstring.h>
#include <qfile.h>
#include <QString>
//#include <qfile.h>

class GraticuleCreator
{
@@ -2,12 +2,12 @@
#include <qgsconfig.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include "plugingui.h"
#include <qapplication.h>
#include <qtextcodec.h>
#include <qtranslator.h>

#include <QApplication>
#include <QTranslator>
#include <QString>

int main(int argc, char *argv[])
@@ -27,16 +27,7 @@ email : tim@linfiniti.com
#include "qgsmaplayer.h"
#include "plugin.h"


#include <q3toolbar.h>
#include <qmenubar.h>
#include <qmessagebox.h>
#include <q3popupmenu.h>
#include <qlineedit.h>
#include <qaction.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qglobal.h>
#include <QAction>

//non qt includes
#include <iostream>
@@ -20,7 +20,6 @@
#ifndef QGSGRIDMAKERPLUGIN
#define QGSGRIDMAKERPLUGIN
#include "../qgisplugin.h"
#include <qwidget.h>
#include <qgisapp.h>

/**
@@ -12,13 +12,12 @@
#include "plugingui.h"

//qt includes
#include <qpushbutton.h>
#include <qlineedit.h>
#include <QFileDialog>
#include <qmessagebox.h>
#include <qfile.h>
#include <qradiobutton.h>
#include <QMessageBox>

#include "graticulecreator.h"
#include <qgslogger.h>

//standard includes
#include <iostream>

@@ -38,15 +37,14 @@ void QgsGridMakerPluginGui::on_pbnOK_clicked()
{
//check input file exists
//
std::cout << "GrativuleCreator called with: " <<
leOutputShapeFile->text().toLocal8Bit().data() <<
leLongitudeInterval->text().toLocal8Bit().data() <<
leLatitudeInterval->text().toLocal8Bit().data() <<
leOriginLongitude->text().toLocal8Bit().data() <<
leOriginLatitude->text().toLocal8Bit().data() <<
leEndPointLongitude->text().toLocal8Bit().data() <<
leEndPointLatitude->text().toLocal8Bit().data()
<< std::endl;
QgsLogger::debug("GrativuleCreator called with: " +
leOutputShapeFile->text() + " " +
leLongitudeInterval->text() + " " +
leLatitudeInterval->text() + " " +
leOriginLongitude->text() + " " +
leOriginLatitude->text() + " " +
leEndPointLongitude->text() + " " +
leEndPointLatitude->text());

if (leOutputShapeFile->text().isEmpty())
{
@@ -158,7 +156,7 @@ void QgsGridMakerPluginGui::on_pbnOK_clicked()

void QgsGridMakerPluginGui::on_pbnSelectOutputFile_clicked()
{
std::cout << " Gps File Importer Gui::pbnSelectOutputFile_clicked() " << std::endl;
QgsLogger::debug(" Gps File Importer Gui::pbnSelectOutputFile_clicked()");
QString myOutputFileNameQString = QFileDialog::getSaveFileName(
this,
tr("Choose a filename to save under"),

0 comments on commit 0c57c55

Please sign in to comment.