Skip to content
Permalink
Browse files
Move to Qt4 #include sytle
Rationalise #includes
Remove Q3 classes


git-svn-id: http://svn.osgeo.org/qgis/trunk@5492 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed May 27, 2006
1 parent e88ae0a commit 157bd20ac78a56b4436a812e55dcca398b2704bf
Showing with 30 additions and 62 deletions.
  1. +2 −2 src/raster/qgsrasterbandstats.h
  2. +21 −34 src/raster/qgsrasterlayer.cpp
  3. +7 −26 src/raster/qgsrasterlayer.h
@@ -25,7 +25,7 @@
#define QGSRASTERBANDSTATS

#include <QString>
#include <Q3ValueVector>
#include <QVector>

#include "qgscolortable.h"
/** \brief The RasterBandStats struct is a container for statistics about a single
@@ -61,7 +61,7 @@ class QgsRasterBandStats
* TODO: check if NO_DATA are excluded!*/
int elementCountInt;
/** \brief Store the histogram for a given layer */
typedef Q3ValueVector<int> HistogramVector;
typedef QVector<int> HistogramVector;
HistogramVector * histogramVector;
/** \brief whteher histogram values are estimated or completely calculated */
bool histogramEstimatedFlag;
@@ -64,37 +64,30 @@ wish to see edbug messages printed to stdout.
#include <qgslogger.h>
#include "qgsrasterlayer.h"
#include "qgsmaptopixel.h"
//Added by qt3to4:
#include <Q3Frame>
#include <QPixmap>


#include <cstdio>
#include <cmath>
#include <limits>
#include <iostream>

#include <qapplication.h>
#include <qcursor.h>
#include <qpainter.h>
#include <qimage.h>
#include <qfont.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qfontmetrics.h>
#include <qmatrix.h>
#include <q3popupmenu.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qslider.h>
#include <qlabel.h>
#include <qdom.h>
#include <q3listview.h>
#include <qwidget.h>
#include <qwidget.h>
#include <qsettings.h>
#include <qglobal.h>
#include <QIcon>

#include <QApplication>
#include <QCursor>
#include <QPainter>
#include <QImage>
#include <QFont>
#include <QFile>
#include <QFileInfo>
#include <QFontMetrics>
#include <QMatrix>
#include <QMessageBox>
#include <QRegExp>
#include <QSlider>
#include <QLabel>
#include <QDomNode>
#include <QDomElement>
#include <QFrame>
#include <QPixmap>

/*
*
@@ -103,7 +96,7 @@ wish to see edbug messages printed to stdout.
*
*/

#include <qlibrary.h>
#include <QLibrary>

/*
* END
@@ -775,17 +768,11 @@ QDateTime QgsRasterLayer::lastModified ( QString const & name )
if ( f.open ( QIODevice::ReadOnly ) )
{
QString dir = fi.dirPath() + "/../../../";
#if QT_VERSION < 0x040000
QString ln;
while ( f.readLine(ln,100) != -1 )
{
#else
// In Qt4, QFile::readLine now expects a bare char*

char buf[101];
while ( f.readLine(buf,100) != -1 )
{
QString ln = QString(buf);
#endif
QStringList sl = QStringList::split ( ' ', ln.stripWhiteSpace() );
QString map = sl.first();
sl.pop_front();
@@ -3667,7 +3654,7 @@ void QgsRasterLayer::initContextMenu_(QgisApp * theApp)

QLabel * myTransparencyLabel = new QLabel( popMenu );

myTransparencyLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Raised );
myTransparencyLabel->setFrameStyle( QFrame::Panel | QFrame::Raised );
myTransparencyLabel->setText( tr("<center><b>Transparency</b></center>") );

// TODO: Qt4 will have to use a QAction instead
@@ -166,27 +166,10 @@ The [type] part of the variable should be the type class of the variable written
// Includes
//

#include <q3valuevector.h>
#include <q3valuelist.h>
#include <q3valuevector.h>
#include <qslider.h>
#include <qdatetime.h>
#include <QDateTime>
#include <QVector>
#include <QList>


/*
*
* New includes that will convert this class to a data provider interface
* (B Morley)
*
*/

#include <qlibrary.h>

/*
* END
*/


#include "qgspoint.h"
#include "qgsmaplayer.h"
#include "qgscolortable.h"
@@ -202,9 +185,6 @@ The [type] part of the variable should be the type class of the variable written
*/

#include "qgsrasterdataprovider.h"
//Added by qt3to4:
#include <QPixmap>
#include <Q3PopupMenu>

/*
* END
@@ -220,7 +200,8 @@ class QgsRasterLayerProperties;
class GDALDataset;
class GDALRasterBand;
class QImage;

class QSlider;
class QLibrary;
//
// Structs
//
@@ -275,7 +256,7 @@ class QgsRasterLayer : public QgsMapLayer
/** \brief A vector containing one RasterBandStats struct per raster band in this raster layer.
* Note that while very RasterBandStats element will have the name and number of its associated
* band populated, any additional stats are calculated on a need to know basis.*/
typedef Q3ValueVector<QgsRasterBandStats> RasterStatsVector;
typedef QVector<QgsRasterBandStats> RasterStatsVector;


/** \brief A list containing one RasterPyramid struct per
@@ -286,7 +267,7 @@ class QgsRasterLayer : public QgsMapLayer
* we will check to see if a pyramid matching these dimensions already exists
* in the raster layer, and if so mark the exists flag as true. */

typedef Q3ValueList<QgsRasterPyramid> RasterPyramidList;
typedef QList<QgsRasterPyramid> RasterPyramidList;

/** \brief This typedef is used when the showProgress function is passed to gdal as a function
pointer. */

0 comments on commit 157bd20

Please sign in to comment.