Compare commits

..

No commits in common. "54fdcf3caecb4162a46f3982f5846ba04f1b00dc" and "4a7ce91f659c01c1129c67421d26b8e85e5364ca" have entirely different histories.

3 changed files with 27 additions and 26 deletions

View file

@ -35,6 +35,8 @@
#include "fvavailableupdate.h" #include "fvavailableupdate.h"
#include "fvupdatewindow.h" #include "fvupdatewindow.h"
#include "../vmisc/defglobal.h"
class FvUpdater final : public QObject class FvUpdater final : public QObject
{ {
Q_OBJECT // NOLINT Q_OBJECT // NOLINT
@ -56,11 +58,11 @@ public:
public slots: public slots:
// Check for updates // Check for updates
bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true); // NOLINT(modernize-use-trailing-return-type) auto CheckForUpdates(bool silentAsMuchAsItCouldGet = true) -> bool;
// Aliases // Aliases
bool CheckForUpdatesSilent(); // NOLINT(modernize-use-trailing-return-type) auto CheckForUpdatesSilent() -> bool;
bool CheckForUpdatesNotSilent(); // NOLINT(modernize-use-trailing-return-type) auto CheckForUpdatesNotSilent() -> bool;
protected: protected:
friend class FvUpdateWindow; // Uses GetProposedUpdate() and others friend class FvUpdateWindow; // Uses GetProposedUpdate() and others

View file

@ -62,8 +62,8 @@ protected:
private slots: private slots:
void on_actionNew_triggered(); void on_actionNew_triggered();
bool on_actionSaveAs_triggered(); // NOLINT(modernize-use-trailing-return-type) auto on_actionSaveAs_triggered() -> bool;
bool on_actionSave_triggered(); // NOLINT(modernize-use-trailing-return-type) auto on_actionSave_triggered() -> bool;
void on_actionOpen_triggered(); void on_actionOpen_triggered();
void on_actionExit_triggered(); void on_actionExit_triggered();

View file

@ -29,11 +29,10 @@
#include "../vgeometry/vabstractcurve.h" #include "../vgeometry/vabstractcurve.h"
#include "qmath.h" #include "qmath.h"
#include "vpiecegrainline_p.h" #include "vpiecegrainline_p.h"
#include <QPolygonF>
#include <QTransform>
#include <algorithm> #include <algorithm>
#include <QTransform>
namespace namespace
{ {
constexpr qreal arrowAngle = M_PI/9; constexpr qreal arrowAngle = M_PI/9;
@ -217,10 +216,10 @@ auto VPieceGrainline::ArrowUp() const -> QPolygonF
const QPointF pt = mainLine.p2(); const QPointF pt = mainLine.p2();
return { return {
{pt, pt,
QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)),
QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)),
pt}}; pt};
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -231,10 +230,10 @@ auto VPieceGrainline::ArrowDown() const -> QPolygonF
const QPointF pt = mainLine.p1(); const QPointF pt = mainLine.p1();
return { return {
{pt, pt,
QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)),
QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)),
pt}}; pt};
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -244,10 +243,10 @@ auto VPieceGrainline::ArrowLeft() const -> QPolygonF
const QPointF pt = SecondaryLine().p1(); const QPointF pt = SecondaryLine().p1();
return { return {
{pt, pt,
QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)),
QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)),
pt}}; pt};
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -257,10 +256,10 @@ auto VPieceGrainline::ArrowRight() const -> QPolygonF
const QPointF pt = SecondaryLine().p2(); const QPointF pt = SecondaryLine().p2();
return { return {
{pt, pt,
QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation + arrowAngle), pt.y() - arrowLength * sin(rotation + arrowAngle)),
QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)), QPointF(pt.x() + arrowLength * cos(rotation - arrowAngle), pt.y() - arrowLength * sin(rotation - arrowAngle)),
pt}}; pt};
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -404,7 +403,7 @@ auto VPieceGrainline::IsPositionValid(const QVector<QPointF> &contourPoints) con
grainLine = {mainLine}; grainLine = {mainLine};
for (auto line : qAsConst(grainLine)) for (auto line : grainLine)
{ {
QVector<QPointF> points = VAbstractCurve::CurveIntersectLine(contourPoints, line); QVector<QPointF> points = VAbstractCurve::CurveIntersectLine(contourPoints, line);
for (auto &point : points) for (auto &point : points)
@ -417,7 +416,7 @@ auto VPieceGrainline::IsPositionValid(const QVector<QPointF> &contourPoints) con
} }
QPainterPath grainLinePath; QPainterPath grainLinePath;
for (auto line : qAsConst(grainLine)) for (auto line : grainLine)
{ {
grainLinePath.addPath(VGObject::PainterPath(QVector<QPointF>{line.p1(), line.p2()})); grainLinePath.addPath(VGObject::PainterPath(QVector<QPointF>{line.p1(), line.p2()}));
} }