Remove unneeded includes in libs/flake

parent c9240d54
......@@ -18,6 +18,7 @@
#include <klocale.h>
#include <KoCanvasResourceManager.h>
#include <KoCanvasBase.h>
#include <KoColor.h>
#include <QWidget>
#include <QMenu>
......
......@@ -23,6 +23,7 @@
#include <KoCanvasResourceManager.h>
#include <KoCanvasBase.h>
#include <KoColorSpaceRegistry.h>
#include <KoColor.h>
#include <KoIcon.h>
#include <QFileSystemModel>
......
......@@ -32,6 +32,7 @@
#include <flake/kis_shape_layer.h>
#include <KoCompositeOpRegistry.h>
#include <KoSelection.h>
#include <KoUnit.h>
#include <kis_debug.h>
......
......@@ -19,6 +19,7 @@
#define KIS_SHAPE_LAYER_CANVAS_H
#include <QMutex>
#include <QRegion>
#include <KoCanvasBase.h>
#include <kis_types.h>
......
......@@ -23,6 +23,7 @@
#include <QPainter>
#include <KoShapeManager.h>
#include <KoUnit.h>
KisShapeSelectionCanvas::KisShapeSelectionCanvas()
: KoCanvasBase(0)
......
......@@ -26,6 +26,8 @@
#include <kis_canvas2.h>
#include "kis_input_manager.h"
#include <math.h>
class KisRotateCanvasAction::Private
{
public:
......
......@@ -32,6 +32,7 @@
#include "KoShapePaintingContext.h"
#include "KoStrokeConfigWidget.h"
#include "KoShapeStroke.h"
#include <KoColor.h>
#include <knuminput.h>
#include <klocale.h>
......
......@@ -33,6 +33,8 @@
#include "KoSnapStrategy.h"
#include "KoToolBase_p.h"
#include "math.h"
/// Small helper to keep track of a path point and its parent path shape
struct PathConnectionPoint {
PathConnectionPoint()
......
......@@ -17,7 +17,12 @@
* Boston, MA 02110-1301, USA.
*/
#include "KoAnnotationLayoutManager.h"
#include <KoViewConverter.h>
#include <KoShapeManager.h>
#include <KoCanvasBase.h>
#include <KoShape.h>
#include <QWidget>
#include <QList>
#include <QHash>
#include <QMap>
......@@ -128,7 +133,7 @@ bool KoAnnotationLayoutManager::isAnnotationShape(KoShape *shape)
return false;
}
void KoAnnotationLayoutManager::registerAnnotationRefPosition(KoShape *annotationShape, QPointF pos)
void KoAnnotationLayoutManager::registerAnnotationRefPosition(KoShape *annotationShape, const QPointF &pos)
{
QList< QPair < QPointF, KoShape * > >::iterator it = d->annotationShapePositions.begin();
bool yPositionChanged = false;
......
......@@ -22,13 +22,12 @@
#include "flake_export.h"
#include <QObject>
#include <QPointF>
#include <KoViewConverter.h>
#include <KoShapeManager.h>
#include <KoCanvasBase.h>
#include <KoCanvasController.h>
class KoShapeManager;
class KoCanvasBase;
class QPainter;
class QPointF;
class KoShape;
......@@ -56,7 +55,7 @@ public:
public slots:
/// register the position of an annotation shape.
void registerAnnotationRefPosition(KoShape *annotationShape, QPointF refPosition);
void registerAnnotationRefPosition(KoShape *annotationShape, const QPointF& refPosition);
/// Remove annotation shape.
void removeAnnotationShape(KoShape *annotationShape);
......
......@@ -23,21 +23,14 @@
#ifndef KOCANVASBASE_H
#define KOCANVASBASE_H
#include <KoUnit.h>
#include <QPointF>
#include <QPoint>
#include <QRectF>
#include <QRect>
#include <QWidget>
#include <QCursor>
#include <QObject>
#include "flake_export.h"
class QGraphicsObject;
class KUndo2Command;
class KoUnit;
class KoCanvasResourceManager;
class KoShapeManager;
class KoToolProxy;
......@@ -49,6 +42,11 @@ class KoShape;
class KoSnapGuide;
class KoGuidesData;
class QWidget;
class QCursor;
class QObject;
class QPointF;
class QRectF;
/**
* KoCanvasBase is the interface actual application canvas classes
......
......@@ -36,7 +36,6 @@ class QSize;
class KoShape;
class KoCanvasBase;
class KoView;
class KoCanvasControllerProxyObject;
/**
......
......@@ -50,6 +50,7 @@
#include <QGLWidget>
#endif
#include <math.h>
void KoCanvasControllerWidget::Private::setDocumentOffset()
{
......
......@@ -27,16 +27,11 @@
#include "flake_export.h"
#include <QAbstractScrollArea>
#include <QMap>
#include <QString>
#include "KoCanvasController.h"
class KoShape;
class KoCanvasBase;
class KoView;
class ZoomAndPanTester;
/**
* KoCanvasController implementation for QWidget based canvases
......
......@@ -22,20 +22,17 @@
#define KO_CANVASRESOURCEMANAGER_H
#include <QObject>
#include <QList>
#include <QVariant>
#include <QSizeF>
#include "flake_export.h"
#include <KoColor.h>
#include <KoUnit.h>
class KoShape;
class KoShapeStroke;
class KUndo2Stack;
class KoImageCollection;
class KoOdfDocument;
class KoColor;
class KoUnit;
class QVariant;
class QSizeF;
/**
* The KoCanvasResourceManager contains a set of per-canvas
......
......@@ -21,9 +21,9 @@
#ifndef KOCONNECTIONPOINT_H
#define KOCONNECTIONPOINT_H
#include "KoFlake.h"
#include "flake_export.h"
#include <QPointF>
#include <QMap>
/// Data of a single connection point
struct FLAKE_EXPORT KoConnectionPoint
......
......@@ -20,11 +20,12 @@
#ifndef KOCONNECTIONSHAPECONFIGWIDGET_H
#define KOCONNECTIONSHAPECONFIGWIDGET_H
#include "KoConnectionShape.h"
#include "ui_KoConnectionShapeConfigWidget.h"
#include <KoShapeConfigWidgetBase.h>
class KoConnectionShape;
class KoConnectionShapeConfigWidget : public KoShapeConfigWidgetBase
{
Q_OBJECT
......
......@@ -20,18 +20,16 @@
#ifndef KODEFERREDSHAPEFACTORYBASE_H
#define KODEFERREDSHAPEFACTORYBASE_H
#include <QStringList>
#include <QString>
#include <QList>
#include "flake_export.h"
#include <KoShapeFactoryBase.h>
#include <QObject>
class KoShape;
class KoDocumentResourceManager;
class KoProperties;
class QString;
/**
* A factory for KoShape objects. This factory differs from the public KoShapeFactorBase
* class that this class really creates the shape; it's the plugin entry point for the
......
......@@ -20,11 +20,10 @@
#ifndef KODOCKFACTORY_H
#define KODOCKFACTORY_H
#include <QString>
#include "flake_export.h"
class QDockWidget;
class QString;
/**
* Base class for factories used to create new dock widgets.
......
......@@ -24,8 +24,6 @@
#include "KoDockFactoryBase.h"
#include "flake_export.h"
#include <QObject>
/**
* This singleton class keeps a register of all available dockers,
* or rather, of the factories that can create the QDockWidget instances
......
......@@ -22,20 +22,19 @@
#define KO_DOCUMENTRESOURCEMANAGER_H
#include <QObject>
#include <QList>
#include <QVariant>
#include <QSizeF>
#include "flake_export.h"
#include <KoColor.h>
#include <KoUnit.h>
class KoShape;
class KUndo2Stack;
class KoImageCollection;
class KoOdfDocument;
class KoShapeController;
class KoColor;
class KoUnit;
class QVariant;
class QSizeF;
/**
* The KoResourceManager contains a set of per-canvas <i>or</i> per-document
......
......@@ -20,11 +20,12 @@
#ifndef KODRAGODFSAVEHELPER_H
#define KODRAGODFSAVEHELPER_H
#include <KoShapeSavingContext.h>
#include "flake_export.h"
class KoShapeSavingContext;
class KoXmlWriter;
class KoGenStyles;
class KoEmbeddedDocumentSaver;
class KoDragOdfSaveHelperPrivate;
class FLAKE_EXPORT KoDragOdfSaveHelper
......
......@@ -20,6 +20,8 @@
#ifndef KODRAGODFSAVEHELPER_P_H
#define KODRAGODFSAVEHELPER_P_H
#include <KoShapeSavingContext.h>
class KoDragOdfSaveHelperPrivate
{
public:
......
......@@ -24,7 +24,6 @@
#include "KoXmlReaderForward.h"
class KoShapeLoadingContext;
class KoShapeSavingContext;
class KoToolBase;
/**
* This is the base class for actions that are executed on events.
......
......@@ -21,6 +21,7 @@
#include "KoFilterEffect.h"
#include "KoXmlWriter.h"
#include <QImage>
#include <QString>
#include <QRectF>
......
......@@ -23,9 +23,7 @@
class QImage;
class QString;
class QRect;
class QRectF;
class KoViewConverter;
class KoXmlWriter;
class KoFilterEffectRenderContext;
class KoFilterEffectLoadingContext;
......@@ -33,7 +31,6 @@ class KoXmlElement;
#include "flake_export.h"
#include <QList>
#include <QImage>
/**
* This is the base for filter effect (blur, invert...) that can be applied on a shape.
......
......@@ -22,7 +22,6 @@
#include <KoGenericRegistry.h>
#include <KoFilterEffectFactoryBase.h>
#include <QTransform>
#include "flake_export.h"
......
......@@ -21,6 +21,7 @@
#include "KoFilterEffect.h"
#include "KoXmlWriter.h"
#include <QRectF>
#include <QAtomicInt>
#include <QSet>
#include <QDebug>
......
......@@ -23,11 +23,12 @@
#include "flake_export.h"
#include <QList>
#include <QRectF>
class KoFilterEffect;
class KoXmlWriter;
class QRectF;
/// This class manages a stack of filter effects
class FLAKE_EXPORT KoFilterEffectStack
{
......
......@@ -23,10 +23,9 @@
#include "flake_export.h"
#include <QBrush>
class KoShape;
class QGradient;
class QPointF;
class QSizeF;
/**
* Flake reference
......
......@@ -22,8 +22,9 @@
#include "flake_export.h"
#include "KoXmlReaderForward.h"
class KoShapeLoadingContext;
class KoXmlElement;
class QString;
/**
* @brief Base class for shapes that are saved as a part of a draw:frame.
......
......@@ -24,8 +24,8 @@
#include "flake_export.h"
#include <QTransform>
#include <QGradient>
class QGradient;
class KoGradientBackgroundPrivate;
/// A gradient shape background
......
......@@ -20,8 +20,6 @@
#ifndef KOINPUTDEVICEHANDLERREGISTRY_H
#define KOINPUTDEVICEHANDLERREGISTRY_H
#include <QObject>
#include "KoGenericRegistry.h"
#include <KoInputDeviceHandler.h>
#include "flake_export.h"
......
......@@ -23,6 +23,8 @@
#include "KoDragOdfSaveHelper.h"
#include "flake_export.h"
#include <QList>
class KoShape;
class KoShapeOdfSaveHelperPrivate;
......
......@@ -28,6 +28,7 @@
#include "KoShapeManager.h"
#include "kdebug.h"
#include "KoSnapData.h"
#include "KoUnit.h"
class MockShape : public KoShape
{
......
......@@ -21,6 +21,7 @@
#include "KoCanvasResourceManager.h"
#include "KoPathShape.h"
#include "KoUnit.h"
#include <QSignalSpy>
void TestResourceManager::koShapeResource()
......
......@@ -27,6 +27,7 @@
#include <KoCanvasBase.h>
#include <klocale.h>
#include <limits>
#include <math.h>
KoPathSegmentChangeStrategy::KoPathSegmentChangeStrategy(KoPathTool *tool, const QPointF &pos, const KoPathPointData &segment, qreal segmentParam)
: KoInteractionStrategy(tool)
......
......@@ -59,6 +59,8 @@
#include <QBitmap>
#include <QTabWidget>
#include <math.h>
static unsigned char needle_bits[] = {
0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x01,
0x80, 0x03, 0x80, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3e, 0x00, 0x7e,
......
......@@ -27,6 +27,9 @@
class KoPAViewBase;
class KoPADocument;
class QRect;
class QPainter;
/// Widget that shows a KoPAPage
class KOPAGEAPP_EXPORT KoPACanvasBase : public KoCanvasBase
{
......
......@@ -20,6 +20,8 @@
*/
#include "KoText.h"
#include <KoUnit.h>
#include <klocale.h>
using namespace KoText;
......
......@@ -23,6 +23,7 @@
#include <KoDragOdfSaveHelper.h>
#ifdef SHOULD_BUILD_RDF
#include <Soprano/Soprano>
#include <QSharedPointer>
#endif
#include "kotext_export.h"
......
......@@ -21,6 +21,7 @@
#include "ToCBibGeneratorInfo.h"
#include <KoXmlWriter.h>
#include <KoUnit.h>
IndexEntry::IndexEntry(const QString &_styleName, IndexEntry::IndexEntryName _name)
: styleName(_styleName),
......
......@@ -45,6 +45,7 @@
#include <KoAnnotationLayoutManager.h>
#include <KoAnnotation.h>
#include <KoTextDocument.h>
#include <KoUnit.h>
#include <kdebug.h>
#include <QTextBlock>
......
......@@ -43,6 +43,7 @@
#include <KoDocumentRdfBase.h>
#include <KoStyleStack.h>
#include <KoShape.h>
#include <KoUnit.h>
#include <KoXmlNS.h>
......
......@@ -31,6 +31,7 @@
#include <klocale.h>
#include <limits>
#include <math.h>
ShapeResizeStrategy::ShapeResizeStrategy(KoToolBase *tool,
const QPointF &clicked, KoFlake::SelectionHandle direction )
......
......@@ -25,6 +25,7 @@
#include <QPointF>
#include <QList>
#include <QTransform>
class KoCanvasBase;
class KoToolBase;
......
......@@ -22,6 +22,7 @@
#include "GreyscaleFilterEffect.h"
#include <KoFilterEffectRenderContext.h>
#include <QImage>
GreyscaleFilterEffect::GreyscaleFilterEffect()
: KoFilterEffect(GreyscaleFilterEffectId, "Grayscale effect")
......
......@@ -20,6 +20,8 @@
#include "MonoFilterEffect.h"
#include <KoFilterEffectRenderContext.h>
#include <QImage>
MonoFilterEffect::MonoFilterEffect()
: KoFilterEffect(MonoFilterEffectId, "Mono Effect")
{
......
......@@ -50,6 +50,7 @@
#include <KoSelection.h>
#include <KoShapeManager.h>
#include <KoPointerEvent.h>
#include <KoColor.h>
#include <KoColorBackground.h>
#include <KoColorPopupAction.h>
#include <KoTextDocumentLayout.h>
......
......@@ -25,6 +25,7 @@
#include <KoListLevelProperties.h>
#include <KoImageData.h>
#include <KoImageCollection.h>
#include <KoUnit.h>
#include <kdebug.h>