diff -r 413ecd6b9801 -r fa025ba493d8 src/miscallenous.h --- a/src/miscallenous.h Wed Nov 18 19:05:22 2015 +0200 +++ b/src/miscallenous.h Thu Nov 19 00:43:18 2015 +0200 @@ -26,27 +26,9 @@ class QColor; class QAction; -// Simplifies the given fraction. -void Simplify (int& numer, int& denom); - using ApplyToMatrixFunction = std::function; using ApplyToMatrixConstFunction = std::function; -void RoundToDecimals (double& a, int decimals); -void ApplyToMatrix (Matrix& a, ApplyToMatrixFunction func); -void ApplyToMatrix (const Matrix& a, ApplyToMatrixConstFunction func); - -double GetCoordinateOf (const Vertex& a, Axis ax); -QString MakePrettyFileSize (qint64 size); - -QString Join (QList vals, QString delim = " "); - -// Grid stuff -float gridCoordinateSnap(); -float gridAngleSnap(); -float gridBezierCurveSegments(); - -// ============================================================================= enum class RotationPoint { ObjectOrigin, @@ -55,10 +37,6 @@ NumValues }; -Vertex GetRotationPoint (const LDObjectList& objs); -void ConfigureRotationPoint(); - -// ============================================================================= namespace Grid { enum Type @@ -73,6 +51,18 @@ Coordinate, Angle }; +} - double Snap (double value, const Grid::Config type); -} +void applyToMatrix (Matrix& a, ApplyToMatrixFunction func); +void applyToMatrix (const Matrix& a, ApplyToMatrixConstFunction func); +void configureRotationPoint(); +QString formatFileSize (qint64 size); +int gcd (int a, int b); +Vertex getRotationPoint (const LDObjectList& objs); +float gridAngleSnap(); +float gridBezierCurveSegments(); +float gridCoordinateSnap(); +QString joinStrings (QList vals, QString delim = " "); +void roundToDecimals (double& a, int decimals); +void simplify (int& numer, int& denom); +double snapToGrid (double value, const Grid::Config type);