Skip to content

Commit

Permalink
Adjusted clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
AmonRaNet committed Dec 22, 2023
1 parent 45e2cae commit 44c9722
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 28 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ BinPackParameters : false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 8
IndentWidth: 4
AllowShortBlocksOnASingleLine: true
...
Empty file modified lib/include/QGeoView/QGVUtils.h
100755 → 100644
Empty file.
19 changes: 12 additions & 7 deletions lib/src/QGVCamera.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ QGVCameraState::QGVCameraState(const QGVCameraState& other)
, mAzimuth(other.mAzimuth)
, mProjRect(other.mProjRect)
, mAnimation(other.mAnimation)
{}
{
}

QGVCameraState::QGVCameraState(const QGVCameraState&& other)
: mGeoMap(std::move(other.mGeoMap))
, mScale(std::move(other.mScale))
, mAzimuth(std::move(other.mAzimuth))
, mProjRect(std::move(other.mProjRect))
, mAnimation(std::move(other.mAnimation))
{}
{
}

QGVCameraState& QGVCameraState::operator=(const QGVCameraState& other)
{
Expand Down Expand Up @@ -221,7 +223,8 @@ QGVCameraAnimation::QGVCameraAnimation(const QGVCameraActions& actions, QObject*
: QAbstractAnimation(parent)
, mDuration(1000)
, mActions(actions)
{}
{
}

void QGVCameraAnimation::setDuration(int msecs)
{
Expand All @@ -239,10 +242,12 @@ QGVCameraActions& QGVCameraAnimation::actions()
}

void QGVCameraAnimation::onStart()
{}
{
}

void QGVCameraAnimation::onStop()
{}
{
}

double QGVCameraAnimation::interpolateScale(double from, double to, double progress)
{
Expand Down Expand Up @@ -310,7 +315,8 @@ void QGVCameraAnimation::onStateChanged(QGV::MapState state)
QGVCameraSimpleAnimation::QGVCameraSimpleAnimation(const QGVCameraActions& actions, QObject* parent)
: QGVCameraAnimation(actions, parent)
, mEasing(QEasingCurve::Linear)
{}
{
}

void QGVCameraSimpleAnimation::setEasingCurve(const QEasingCurve& easing)
{
Expand Down Expand Up @@ -357,7 +363,6 @@ void QGVCameraFlyAnimation::onProgress(double progress, QGVCameraActions& target
target.scaleTo(interpolateScale(actions().origin().scale(), mFlyScale, flyInter));
const double moveInter = moveCurve.valueForProgress(flyInter);
target.moveTo(interpolatePos(actions().origin().projCenter(), mFlyAnchor, moveInter));

} else {
const double flyInter = (progress - switchThr) / (1.0 - switchThr);
target.scaleTo(interpolateScale(mFlyScale, actions().scale(), flyInter));
Expand Down
15 changes: 10 additions & 5 deletions lib/src/QGVDrawItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ double highlightScale = 1.15;

QGVDrawItem::QGVDrawItem()
: mDirty{ false }
{}
{
}

void QGVDrawItem::setFlags(QGV::ItemFlags flags)
{
Expand Down Expand Up @@ -161,7 +162,8 @@ QString QGVDrawItem::projDebug()
}

void QGVDrawItem::projOnFlags()
{}
{
}

void QGVDrawItem::projOnMouseClick(const QPointF& projPos)
{
Expand All @@ -180,13 +182,16 @@ void QGVDrawItem::projOnMouseDoubleClick(const QPointF& projPos)
}

void QGVDrawItem::projOnObjectStartMove(const QPointF& /*projPos*/)
{}
{
}

void QGVDrawItem::projOnObjectStopMove(const QPointF& /*projPos*/)
{}
{
}

void QGVDrawItem::projOnObjectMovePos(const QPointF& /*projPos*/)
{}
{
}

void QGVDrawItem::onProjection(QGVMap* geoMap)
{
Expand Down
30 changes: 20 additions & 10 deletions lib/src/QGVGlobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ namespace QGV {
GeoPos::GeoPos()
: mLat(0)
, mLon(0)
{}
{
}

GeoPos::GeoPos(double lat, double lon)
{
Expand All @@ -45,12 +46,14 @@ GeoPos::GeoPos(double lat, double lon)
GeoPos::GeoPos(const GeoPos& other)
: mLat(other.latitude())
, mLon(other.longitude())
{}
{
}

GeoPos::GeoPos(const GeoPos&& other)
: mLat(std::move(other.latitude()))
, mLon(std::move(other.longitude()))
{}
{
}

GeoPos& GeoPos::operator=(const GeoPos& other)
{
Expand Down Expand Up @@ -173,7 +176,8 @@ QString GeoPos::latToString(double lat, const QString& format)
}

GeoRect::GeoRect()
{}
{
}

GeoRect::GeoRect(double lat1, double lon1, double lat2, double lon2)
{
Expand All @@ -190,12 +194,14 @@ GeoRect::GeoRect(GeoPos const& pos1, GeoPos const& pos2)
GeoRect::GeoRect(const GeoRect& other)
: mTopLeft(other.mTopLeft)
, mBottomRight(other.mBottomRight)
{}
{
}

GeoRect::GeoRect(const GeoRect&& other)
: mTopLeft(std::move(other.mTopLeft))
, mBottomRight(std::move(other.mBottomRight))
{}
{
}

GeoRect& GeoRect::operator=(const GeoRect& other)
{
Expand Down Expand Up @@ -272,22 +278,26 @@ bool GeoRect::intersects(const GeoRect& rect) const

GeoTilePos::GeoTilePos()
: mZoom(-1)
{}
{
}

GeoTilePos::GeoTilePos(int zoom, const QPoint& pos)
: mZoom(zoom)
, mPos(pos)
{}
{
}

GeoTilePos::GeoTilePos(const GeoTilePos& other)
: mZoom(other.mZoom)
, mPos(other.mPos)
{}
{
}

GeoTilePos::GeoTilePos(const GeoTilePos&& other)
: mZoom(std::move(other.mZoom))
, mPos(std::move(other.mPos))
{}
{
}

GeoTilePos& GeoTilePos::operator=(const GeoTilePos& other)
{
Expand Down
3 changes: 2 additions & 1 deletion lib/src/QGVImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

QGVImage::QGVImage()
: mGeometryType(GeometryType::ByRect)
{}
{
}

void QGVImage::setGeometry(const QGV::GeoRect& geoRect)
{
Expand Down
3 changes: 2 additions & 1 deletion lib/src/QGVItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ void QGVItem::onCamera(const QGVCameraState& oldState, const QGVCameraState& new
}

void QGVItem::onUpdate()
{}
{
}

void QGVItem::onClean()
{
Expand Down
3 changes: 2 additions & 1 deletion lib/src/QGVMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class RootItem : public QGVItem
public:
explicit RootItem(QGVMap* geoMap)
: mGeoMap(geoMap)
{}
{
}
virtual ~RootItem();

QGVMap* getMap() const override final
Expand Down
3 changes: 2 additions & 1 deletion lib/src/QGVProjection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ QGVProjection::QGVProjection(const QString& id, const QString& name, const QStri
: mID(id)
, mName(name)
, mDescription(description)
{}
{
}

QString QGVProjection::getID() const
{
Expand Down
6 changes: 4 additions & 2 deletions lib/src/QGVWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ void QGVWidget::anchoreWidget()
}

void QGVWidget::onProjection(QGVMap* /*geoMap*/)
{}
{
}

void QGVWidget::onCamera(const QGVCameraState& /*oldState*/, const QGVCameraState& /*newState*/)
{}
{
}

void QGVWidget::resizeEvent(QResizeEvent* /*event*/)
{
Expand Down

0 comments on commit 44c9722

Please sign in to comment.