Skip to content

Commit

Permalink
Move to Qt4 #include sytle
Browse files Browse the repository at this point in the history
Rationalise #includes
Remove Q3 classes


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5492 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed May 27, 2006
1 parent 1445f36 commit 6eea76b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 62 deletions.
4 changes: 2 additions & 2 deletions src/raster/qgsrasterbandstats.h
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
55 changes: 21 additions & 34 deletions src/raster/qgsrasterlayer.cpp
Expand Up @@ -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>

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

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

/*
* END
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
33 changes: 7 additions & 26 deletions src/raster/qgsrasterlayer.h
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -220,7 +200,8 @@ class QgsRasterLayerProperties;
class GDALDataset;
class GDALRasterBand;
class QImage;

class QSlider;
class QLibrary;
//
// Structs
//
Expand Down Expand Up @@ -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
Expand All @@ -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. */
Expand Down

0 comments on commit 6eea76b

Please sign in to comment.