Skip to content
Permalink
Browse files

Tidy up #includes

- move to CaptialWords format for Qt includes
- use forward declarations where possible
- removed many unnecessary #includes in *.h files


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4992 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m
g_j_m committed Mar 10, 2006
1 parent fefbfcd commit 491ea956cc4402d27826e7acc58453684231fee1
@@ -25,27 +25,20 @@
#include <QAction>
#include <QApplication>
#include <QBitmap>
#include <QByteArray>
#include <QCheckBox>
#include <QClipboard>
#include <QColor>
#include <QCursor>
#include <QDesktopWidget>
#include <QDialog>
#include <QDir>
#include <QErrorMessage>
#include <QEvent>
#include <QFile>
#include <QFileInfo>
#include <QGridLayout>
#include <QImage>
#include <QInputDialog>
#include <QKeyEvent>
#include <QLabel>
#include <QLayout>
#include <QLibrary>
#include <QListView>
#include <QMatrix>
#include <QMenu>
#include <QMenuBar>
#include <QMenuItem>
@@ -57,24 +50,15 @@
#include <QPrinter>
#include <QProcess>
#include <QProgressBar>
#include <QPushButton>
#include <QRect>
#include <QRegExp>
#include <QScrollArea>
#include <QSettings>
#include <QSplitter>
#include <QStatusBar>
#include <QStatusBar>
#include <QStringList>
#include <QTcpSocket>
#include <QTextStream>
#include <QTimer>
#include <QToolBar>
#include <QToolBox>
#include <QToolButton>
#include <QToolTip>
#include <QVBoxLayout>
#include <QWhatsThis>
#include <QSplashScreen>
//
// QGIS Specific Includes
//
@@ -119,6 +103,7 @@
#include "qgsvectorfilewriter.h"
#include "qgsvectorlayer.h"
#include "qgisplugin.h"
#include "qgsvectordataprovider.h"
#include "../../images/themes/default/qgis.xpm"

//
@@ -150,11 +135,6 @@
#include "qgsmaptoolzoom.h"
#include "qgsmeasure.h"


//#include "qgssisydialog.h"
// XXX deprecated?? #include "qgslegenditem.h"


//
// Conditional Includes
//
@@ -19,44 +19,35 @@
#ifndef QGISAPP_H
#define QGISAPP_H

//Added by qt3to4:
#include <QMenu>
#include <QKeyEvent>
#include <QEvent>
#include <QPixmap>
#include <QLabel>
#include <QSplashScreen>
class QCanvas;
class QRect;
class QCanvasView;
class QStringList;
class QScrollView;
class QgsPoint;
class QgsLegend;
class QgsLegendView;
class QVBox;
class QCursor;
class QLabel;
class QListView;
class Q3ListViewItem;
class QProgressBar;
class QFileInfo;
class QgsMapLayer;
class QSettings;
class QTcpSocket;
class QCheckBox;
class QToolButton;
class QKeyEvent;
class QMenu;
class QPixmap;
class QSplashScreen;

class QgsPoint;
class QgsLegend;
class QgsMapLayer;
class QgsProviderRegistry;
class QgsHelpViewer;
class QgsMapCanvas;
class QgsMapLayerRegistry;
class QgsRasterLayer;
class QCheckBox;
class QEvent;
class QgsComposer;
class QPushButton;
class QToolButton;

#include "qgisiface.h"
#include "qgsconfig.h"
#include "qgsvectordataprovider.h"
//#include "qgsconfig.h"

#include "qgsclipboard.h"

#include <map>
@@ -522,9 +513,6 @@ public slots:
QMenu *toolPopupDisplay;
//! Popup menu for the capture tools
QMenu *toolPopupCapture;
//! Legend list view control
//doesnt see to be used...(TS)
//QgsLegendView *mLegendView;
//! Map canvas
QgsMapCanvas *mMapCanvas;
//! Map layer registry
@@ -17,7 +17,6 @@
****************************************************************************/
/* $Id$ */

#include <iostream>
#include "qgisinterface.h"
#include "qgisapp.h"

@@ -19,15 +19,13 @@
#ifndef QGISINTERFACE_H
#define QGISINTERFACE_H

#include <qaction.h>
#include <QAction>
#include <QWidget>

#include <qwidget.h>
//Added by qt3to4:
#include <Q3PopupMenu>
#include <map>

class QgisApp;
class QgsMapLayer;
class Q3PopupMenu;
class QgsMapCanvas;
class QgsRasterLayer;
class QgsMapLayerRegistry;
@@ -26,8 +26,8 @@
#include <iostream>
#include <vector>

#include <qstringlist.h>
#include <qdom.h>
#include <QStringList>
#include <QDomElement>

#include "qgsattributeaction.h"
#include "qgsrunprocess.h"
@@ -25,8 +25,8 @@
#ifndef QGSATTRIBUTEACTION_H
#define QGSATTRIBUTEACTION_H

#include <qstring.h>
#include <qobject.h>
#include <QString>
#include <QObject>

#include <list>
#include <vector>
@@ -16,22 +16,21 @@
* *
***************************************************************************/
/* $Id$ */
#include <qapplication.h>
#include <qcursor.h>
#include <q3popupmenu.h>
#include <qlabel.h>
#include <qfont.h>
#include <qglobal.h>
#include <qclipboard.h>
#include <QApplication>
#include <QMouseEvent>
#include <Q3PopupMenu>
#include <QKeyEvent>
#include <QLabel>
#include <QFont>
#include <QClipboard>
#include <Q3ValueList>

#include "qgsattributetable.h"
#include "qgsfeature.h"
#include "qgsfield.h"
#include "qgsvectordataprovider.h"
#include "qgsvectorlayer.h"
//Added by qt3to4:
#include <QKeyEvent>
#include <Q3ValueList>
#include <QMouseEvent>

#include <iostream>
#include <stdlib.h>

@@ -19,18 +19,17 @@
#ifndef QGSATTRIBUTETABLE_H
#define QGSATTRIBUTETABLE_H

#include <q3table.h>
#include <qmap.h>
//Added by qt3to4:
#include <QMouseEvent>
#include <QKeyEvent>
#include <Q3PopupMenu>
#include <Q3Table>
#include <QMap>

#include <map>
#include <set>

class Q3PopupMenu;
class QgsVectorLayer;
class QgsFeature;
class QMouseEvent;
class QKeyEvent;

#include "qgsattributeaction.h"

@@ -20,10 +20,10 @@
#include <fstream>
#include <iostream>

#include <qapplication.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qclipboard.h>
#include <QApplication>
#include <QString>
#include <QStringList>
#include <QClipboard>

#include "qgsclipboard.h"

@@ -23,7 +23,10 @@
#include "qgssymbologyutils.h"
#include "qgsmarkercatalogue.h"
#include "qgssymbol.h"
#include <qdom.h>

#include <QDomElement>
#include <QPainter>
#include <QPixmap>

QgsContinuousColorRenderer::QgsContinuousColorRenderer(QGis::VectorType type): mMinimumSymbol(0), mMaximumSymbol(0)
{
@@ -19,14 +19,13 @@
#define QGSCONTINUOUSCOLORRENDERER_H

#include "qgsrenderer.h"
#include <qpainter.h>
#include "qgsmaptopixel.h"
#include "qgspoint.h"
#include "qgsfeature.h"
#include <QPixmap>
#include <iostream>

class QgsSymbol;
class QPainter;
class QPixmap;

/**Renderer class which interpolates rgb values linear between the minimum and maximum value of the classification field*/
class QgsContinuousColorRenderer: public QgsRenderer
@@ -19,7 +19,8 @@
#include "qgscoordinatetransform.h"

//qt includes
#include <qdom.h>
#include <QDomNode>
#include <QDomElement>

// Qt4-only includes to go here
#include <QTextOStream>
@@ -19,7 +19,7 @@
#define QGSCOORDINATETRANSFORM_H

//qt includes
#include <qobject.h>
#include <QObject>

//qgis includes
#include "qgspoint.h"
@@ -17,7 +17,7 @@

#include "qgsdelattrdialog.h"
#include "qgsfield.h"
#include <q3header.h>
#include <Q3Header>

QgsDelAttrDialog::QgsDelAttrDialog(Q3Header* header): QgsDelAttrDialogBase()
{
@@ -22,9 +22,9 @@
#include "qgslegendsymbologyitem.h"
#include "qgssymbologyutils.h"
#include "qgssvgcache.h"
#include <qdom.h>
#include <qpixmap.h>
#include <q3picture.h>
#include <QDomNode>
#include <QDomElement>
#include <QPixmap>


QgsGraduatedSymbolRenderer::QgsGraduatedSymbolRenderer(QGis::VectorType type)
@@ -17,13 +17,13 @@
#include <fstream>
#include <math.h> //needed for win32 build (ts)

#include <qstring.h>
#include <qfont.h>
#include <qfontmetrics.h>
#include <QString>
#include <QFont>
#include <QFontMetrics>

#include <qpainter.h>
#include <qmatrix.h>
#include <qdom.h>
#include <QPainter>
#include <QDomNode>
#include <QDomElement>

#include "qgis.h"
#include "qgsfeature.h"
@@ -18,7 +18,7 @@
/**
* Interface class for map layer plugins
*/
#include <qobject.h>
#include <QObject>
#include "qgisapp.h"
class Q3MainWindow;

@@ -22,7 +22,7 @@

#include <QDir>
#include <QFileDialog>
#include <q3iconview.h>
#include <Q3IconView>
#include <QPixmap>

#include "qgsconfig.h"
@@ -16,10 +16,10 @@
***************************************************************************/
/* $Id$ */
#include <iostream>
#include <qsettings.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qmessagebox.h>

#include <QSettings>
#include <QMessageBox>

#include "qgsnewconnection.h"
#include "qgscontexthelp.h"
extern "C"
@@ -22,6 +22,7 @@
#include "qgisapp.h"
#include "qgslayerprojectionselector.h"
#include "qgssvgcache.h"
#include "qgsspatialrefsys.h"
#include <QFileDialog>
#include <QSettings>
#include <QColorDialog>

0 comments on commit 491ea95

Please sign in to comment.
You can’t perform that action at this time.