Skip to content

Commit

Permalink
Move some debugging output to QgsLogger::debug
Browse files Browse the repository at this point in the history
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 0c57c55
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 39 deletions.
17 changes: 11 additions & 6 deletions src/plugins/grid_maker/graticulecreator.cpp
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grid_maker/graticulecreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "utils.h"

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

class GraticuleCreator
{
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/grid_maker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand Down
11 changes: 1 addition & 10 deletions src/plugins/grid_maker/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion src/plugins/grid_maker/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#ifndef QGSGRIDMAKERPLUGIN
#define QGSGRIDMAKERPLUGIN
#include "../qgisplugin.h"
#include <qwidget.h>
#include <qgisapp.h>

/**
Expand Down
28 changes: 13 additions & 15 deletions src/plugins/grid_maker/plugingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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())
{
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 0c57c55

Please sign in to comment.