Skip to content

Commit

Permalink
Tidy up #includes
Browse files Browse the repository at this point in the history
- 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 committed Mar 10, 2006
1 parent fefbfcd commit 491ea95
Show file tree
Hide file tree
Showing 29 changed files with 81 additions and 126 deletions.
24 changes: 2 additions & 22 deletions src/gui/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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
//
Expand Down Expand Up @@ -119,6 +103,7 @@
#include "qgsvectorfilewriter.h"
#include "qgsvectorlayer.h"
#include "qgisplugin.h"
#include "qgsvectordataprovider.h"
#include "../../images/themes/default/qgis.xpm"

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


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


//
// Conditional Includes
//
Expand Down
38 changes: 13 additions & 25 deletions src/gui/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgisinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
****************************************************************************/
/* $Id$ */

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

Expand Down
8 changes: 3 additions & 5 deletions src/gui/qgisinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsattributeaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <iostream>
#include <vector>

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

#include "qgsattributeaction.h"
#include "qgsrunprocess.h"
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsattributeaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#ifndef QGSATTRIBUTEACTION_H
#define QGSATTRIBUTEACTION_H

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

#include <list>
#include <vector>
Expand Down
21 changes: 10 additions & 11 deletions src/gui/qgsattributetable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
11 changes: 5 additions & 6 deletions src/gui/qgsattributetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 4 additions & 4 deletions src/gui/qgsclipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
5 changes: 4 additions & 1 deletion src/gui/qgscontinuouscolorrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
5 changes: 2 additions & 3 deletions src/gui/qgscontinuouscolorrenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/gui/qgscoordinatetransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#include "qgscoordinatetransform.h"

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

// Qt4-only includes to go here
#include <QTextOStream>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgscoordinatetransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define QGSCOORDINATETRANSFORM_H

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

//qgis includes
#include "qgspoint.h"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsdelattrdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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

QgsDelAttrDialog::QgsDelAttrDialog(Q3Header* header): QgsDelAttrDialogBase()
{
Expand Down
6 changes: 3 additions & 3 deletions src/gui/qgsgraduatedsymbolrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions src/gui/qgslabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaplayerinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Interface class for map layer plugins
*/
#include <qobject.h>
#include <QObject>
#include "qgisapp.h"
class Q3MainWindow;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmarkerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

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

#include "qgsconfig.h"
Expand Down
8 changes: 4 additions & 4 deletions src/gui/qgsnewconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "qgisapp.h"
#include "qgslayerprojectionselector.h"
#include "qgssvgcache.h"
#include "qgsspatialrefsys.h"
#include <QFileDialog>
#include <QSettings>
#include <QColorDialog>
Expand Down
Loading

0 comments on commit 491ea95

Please sign in to comment.