Commit de28ab0a authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: using pragma once at formeditor files

 - also clean up some empty lines and include orders

Change-Id: Ia076951a6b0060ae70c53f213bdb5d6a12abd319
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent a75a97db
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#define QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#pragma once
#include "abstractformeditortool.h"
......@@ -43,5 +41,3 @@ public:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef ABSTRACTFORMEDITORTOOL_H
#define ABSTRACTFORMEDITORTOOL_H
#pragma once
#include "formeditoritem.h"
......@@ -104,6 +102,4 @@ private:
QList<FormEditorItem*> m_itemList;
};
}
#endif // ABSTRACTFORMEDITORTOOL_H
} // namespace QmlDesigner
......@@ -22,14 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef QMLDESIGNER_ANCHORINDICATOR_H
#define QMLDESIGNER_ANCHORINDICATOR_H
#include <QPointer>
#include "layeritem.h"
#include "formeditoritem.h"
#include <QPointer>
namespace QmlDesigner {
......@@ -62,5 +60,3 @@ private:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ANCHORINDICATOR_H
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef QMLDESIGNER_ANCHORINDICATORGRAPHICSITEM_H
#define QMLDESIGNER_ANCHORINDICATORGRAPHICSITEM_H
#pragma once
#include <QGraphicsObject>
......@@ -65,5 +63,3 @@ private:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ANCHORINDICATORGRAPHICSITEM_H
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef QMLDESIGNER_BACKGROUNDACTION_H
#define QMLDESIGNER_BACKGROUNDACTION_H
#pragma once
#include <QWidgetAction>
......@@ -56,5 +54,3 @@ private:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_BACKGROUNDACTION_H
......@@ -22,14 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef QMLDESIGNER_BINDINGINDICATOR_H
#define QMLDESIGNER_BINDINGINDICATOR_H
#include <QPointer>
#include "layeritem.h"
#include "formeditoritem.h"
#include <QPointer>
namespace QmlDesigner {
class FormEditorItem;
......@@ -44,7 +43,6 @@ public:
void show();
void hide();
void clear();
void setItems(const QList<FormEditorItem*> &itemList);
......@@ -60,5 +58,3 @@ private:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_BINDINGINDICATOR_H
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef QMLDESIGNER_BINDINGINDICATORGRAPHICSITEM_H
#define QMLDESIGNER_BINDINGINDICATORGRAPHICSITEM_H
#pragma once
#include <QGraphicsObject>
......@@ -47,5 +45,3 @@ private:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_BINDINGINDICATORGRAPHICSITEM_H
......@@ -22,14 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef QMLDESIGNER_CONTENTNOTEDITABLEINDICATOR_H
#define QMLDESIGNER_CONTENTNOTEDITABLEINDICATOR_H
#include "layeritem.h"
#include "formeditoritem.h"
#include <QPointer>
#include <QGraphicsRectItem>
#include "layeritem.h"
#include "formeditoritem.h"
namespace QmlDesigner {
......@@ -57,5 +56,3 @@ private:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_CONTENTNOTEDITABLEINDICATOR_H
......@@ -22,14 +22,10 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef CONTROLELEMENT_H
#define CONTROLELEMENT_H
#pragma once
#include <QGraphicsRectItem>
namespace QmlDesigner {
class LayerItem;
......@@ -41,13 +37,10 @@ public:
~ControlElement();
void hide();
void setBoundingRect(const QRectF &rect);
private:
QGraphicsRectItem *m_controlShape;
};
}
#endif // CONTROLELEMENT_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef DRAGTOOL_H
#define DRAGTOOL_H
#pragma once
#include "abstractformeditortool.h"
#include "movemanipulator.h"
......@@ -100,6 +98,4 @@ private:
bool m_isAborted;
};
}
#endif // DRAGTOOL_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef FORMEDITORGRAPHICSVIEW_H
#define FORMEDITORGRAPHICSVIEW_H
#pragma once
#include <QGraphicsView>
......@@ -63,5 +61,3 @@ private:
};
} // namespace QmlDesigner
#endif // FORMEDITORGRAPHICSVIEW_H
......@@ -22,14 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef FORMEDITORITEM_H
#define FORMEDITORITEM_H
#include <qmlitemnode.h>
#include "snappinglinecreator.h"
#include <QPointer>
#include <QGraphicsWidget>
#include <qmlitemnode.h>
#include "snappinglinecreator.h"
QT_BEGIN_NAMESPACE
class QTimeLine;
......@@ -142,6 +141,4 @@ inline int FormEditorItem::type() const
return UserType + 0xfffa;
}
}
#endif // FORMEDITORITEM_H
} // namespace QmlDesigner
......@@ -22,10 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef FORMEDITORNODEINSTANCE_H
#define FORMEDITORNODEINSTANCE_H
#pragma once
#include <nodeinstanceview.h>
......@@ -41,6 +38,4 @@ public:
~FormEditorNodeInstanceView();
};
}
#endif //FORMEDITORNODEINSTANCE_H
} // namespace QmlDesigner
......@@ -22,16 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef FORMEDITORSCENE_H
#define FORMEDITORSCENE_H
#include <qmlitemnode.h>
#include "abstractformeditortool.h"
#include <QGraphicsScene>
#include <QPointer>
#include <QHash>
#include <qmlitemnode.h>
#include "abstractformeditortool.h"
QT_BEGIN_NAMESPACE
class QGraphicsSceneMouseEvent;
......@@ -126,9 +124,4 @@ private:
bool m_showBoundingRects;
};
}
#endif //FORMEDITORSCENE_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef FORMEDITORSUBWINDOW_H
#define FORMEDITORSUBWINDOW_H
#pragma once
#include <QMdiSubWindow>
......@@ -37,5 +35,3 @@ public:
};
} // namespace QmlDesigner
#endif // FORMEDITORSUBWINDOW_H
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef FORMEDITORVIEW_H
#define FORMEDITORVIEW_H
#pragma once
#include <abstractview.h>
......@@ -138,6 +136,4 @@ private: //variables
int m_transactionCounter;
};
}
#endif //FORMEDITORVIEW_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef FORMEDITORWIDGET_H
#define FORMEDITORWIDGET_H
#pragma once
#include <QWidget>
#include <QPointer>
......@@ -103,7 +101,4 @@ private:
QPointer<QAction> m_resetAction;
};
}
#endif //FORMEDITORWIDGET_H
} // namespace QmlDesigner
......@@ -22,13 +22,11 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef ITEMUTILFUNCTIONS_H
#define ITEMUTILFUNCTIONS_H
#include <QRectF>
#include "formeditoritem.h"
#include <QRectF>
namespace QmlDesigner {
......@@ -38,6 +36,4 @@ ModelNode parentNodeSemanticallyChecked(const ModelNode &childNode, const ModelN
FormEditorItem* mapGraphicsViewToGraphicsScene(FormEditorItem* item);
}
#endif // ITEMUTILFUNCTIONS_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef LAYERITEM_H
#define LAYERITEM_H
#pragma once
#include <QGraphicsObject>
......@@ -56,6 +54,4 @@ inline int LayerItem::type() const
return Type;
}
}
#endif // LAYERITEM_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef LINEEDITACTION_H
#define LINEEDITACTION_H
#pragma once
#include <QWidgetAction>
......@@ -52,5 +50,3 @@ private:
};
} // namespace QmlDesigner
#endif // LINEEDITACTION_H
......@@ -22,9 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef MOVEMANIPULATOR_H
#define MOVEMANIPULATOR_H
#include "formeditoritem.h"
#include "rewritertransaction.h"
#include "snapper.h"
#include "formeditorview.h"
#include <QPointer>
#include <QGraphicsItem>
......@@ -32,11 +35,6 @@
#include <QPointF>
#include <QRectF>
#include "formeditoritem.h"
#include "rewritertransaction.h"
#include "snapper.h"
#include "formeditorview.h"
namespace QmlDesigner {
class ModelNodeChangeSet;
......@@ -115,5 +113,4 @@ private:
QPointF m_lastPosition;
};
}
#endif // MOVEMANIPULATOR_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef MOVETOOL_H
#define MOVETOOL_H
#pragma once
#include "abstractformeditortool.h"
#include "movemanipulator.h"
......@@ -36,7 +34,6 @@
namespace QmlDesigner {
class MoveTool : public AbstractFormEditorTool
{
public:
......@@ -90,5 +87,4 @@ private:
QList<FormEditorItem*> m_movingItems;
};
}
#endif // MOVETOOL_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef NUMBERSERIESACTION_H
#define NUMBERSERIESACTION_H
#pragma once
#include <QWidgetAction>
#include <QPointer>
......@@ -60,6 +58,4 @@ private:
int m_comboBoxModelIndex;
};
} // namespace QKinecticDesigner
#endif // NUMBERSERIESACTION_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef ONEDIMENSIONALCLUSTER_H
#define ONEDIMENSIONALCLUSTER_H
#pragma once
#include <QList>
......@@ -43,8 +41,6 @@ private:
double mean() const;
double first() const;
static QList<OneDimensionalCluster> createOneDimensionalClusterList(const QList<double> & oneDimensionalCoordinateList);
static QList<OneDimensionalCluster> reduceOneDimensionalClusterList(const QList<OneDimensionalCluster> & unreducedClusterList, double maximumDistance);
......@@ -58,9 +54,7 @@ inline bool operator < (const OneDimensionalCluster & firstCluster, const OneDim
inline OneDimensionalCluster operator+(const OneDimensionalCluster & firstCluster, const OneDimensionalCluster & secondCluster)
{
return OneDimensionalCluster(firstCluster.m_coordinateList + secondCluster.m_coordinateList);
}
}
#endif // ONEDIMENSIONALCLUSTER_H
} // namespace QmlDesigner
......@@ -22,24 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef RESIZECONTROLLER_H
#define RESIZECONTROLLER_H
#pragma once
#include <QWeakPointer>
#include <QSharedPointer>
namespace QmlDesigner {
class FormEditorItem;
class LayerItem;
class ResizeHandleItem;
class ResizeControllerData;
class WeakResizeController;
class ResizeController
{
friend class WeakResizeController;
......@@ -73,7 +68,6 @@ public:
WeakResizeController toWeakResizeController() const;
private: // functions
ResizeController(const QSharedPointer<ResizeControllerData> &data);
private: // variables
......@@ -97,6 +91,4 @@ private: // variables
QWeakPointer<ResizeControllerData> m_data;
};
}
#endif // RESIZECONTROLLER_H
} // namespace QmlDesigner
......@@ -22,15 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#ifndef RESIZEHANDLEITEM_H
#define RESIZEHANDLEITEM_H
#include <QGraphicsItem>
#include "resizecontroller.h"
#include <qmldesignercorelib_global.h>
#include "resizecontroller.h"
#include <QGraphicsItem>
namespace QmlDesigner {
......@@ -42,7 +40,6 @@ public:
Type = 0xEAEA
};
ResizeHandleItem(QGraphicsItem *parent, const ResizeController &resizeController);
~ResizeHandleItem();
void setHandlePosition(const QPointF & globalPosition, const QPointF & itemSpacePosition);
......@@ -77,6 +74,4 @@ inline int ResizeHandleItem::type() const
return Type;
}
}
#endif // RESIZEHANDLEITEM_H
} // namespace QmlDesigner
......@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#ifndef RESIZEINDICATOR_H
#define RESIZEINDICATOR_H
#pragma once
#include "resizecontroller.h"
......@@ -51,7 +49,6 @@ public:
void show();
void hide();
void clear();
void setItems(const QList<FormEditorItem*> &itemList);
......@@ -59,10 +56,7 @@ public:
private:
QHash<FormEditorItem*, ResizeController> m_itemControllerHash;
LayerItem *m_layerItem;
};
} // namespace QmlDesigner
#endif // SCALEINDICATOR_H