25 class LDDocument; |
25 class LDDocument; |
26 class QColor; |
26 class QColor; |
27 class QAction; |
27 class QAction; |
28 |
28 |
29 // Simplifies the given fraction. |
29 // Simplifies the given fraction. |
30 void Simplify (int& numer, int& denom); |
30 void Simplify(int& numer, int& denom); |
31 |
31 |
32 using ApplyToMatrixFunction = std::function<void (int, double&)>; |
32 using ApplyToMatrixFunction = std::function<void(int, double&)>; |
33 using ApplyToMatrixConstFunction = std::function<void (int, double)>; |
33 using ApplyToMatrixConstFunction = std::function<void(int, double)>; |
34 |
34 |
35 void RoundToDecimals (double& a, int decimals); |
35 void RoundToDecimals(double& a, int decimals); |
36 void ApplyToMatrix (Matrix& a, ApplyToMatrixFunction func); |
36 void ApplyToMatrix(Matrix& a, ApplyToMatrixFunction func); |
37 void ApplyToMatrix (const Matrix& a, ApplyToMatrixConstFunction func); |
37 void ApplyToMatrix(const Matrix& a, ApplyToMatrixConstFunction func); |
38 |
38 |
39 double GetCoordinateOf (const Vertex& a, Axis ax); |
39 double GetCoordinateOf(const Vertex& a, Axis ax); |
40 QString MakePrettyFileSize (qint64 size); |
40 QString MakePrettyFileSize(qint64 size); |
41 |
41 |
42 QString Join (QList<StringFormatArg> vals, QString delim = " "); |
42 QString Join(QList<StringFormatArg> vals, QString delim = " "); |
43 |
43 |
44 // Grid stuff |
44 // Grid stuff |
45 float gridCoordinateSnap(); |
45 float gridCoordinateSnap(); |
46 float gridAngleSnap(); |
46 float gridAngleSnap(); |
47 float gridBezierCurveSegments(); |
47 float gridBezierCurveSegments(); |