src/miscallenous.h

changeset 754
c37564d59ce1
parent 733
cc39df788660
child 755
d2bd4139040c
equal deleted inserted replaced
753:0379f6fca732 754:c37564d59ce1
49 QString join (QList< StringFormatArg > vals, QString delim = " "); 49 QString join (QList< StringFormatArg > vals, QString delim = " ");
50 50
51 // Grid stuff 51 // Grid stuff
52 struct gridinfo 52 struct gridinfo
53 { 53 {
54 const char* const name; 54 const char* const name;
55 float* const confs[4]; 55 Config::FloatType* const coordsnap;
56 Config::FloatType* const anglesnap;
56 }; 57 };
57 58
58 extern_cfg (Int, grid); 59 extern_cfg (Int, grid);
59 static const int g_NumGrids = 3; 60 static const int g_numGrids = 3;
60 extern const gridinfo g_GridInfo[3]; 61 extern const gridinfo g_gridInfo[3];
61 62
62 inline const gridinfo& currentGrid() 63 inline const gridinfo& currentGrid()
63 { 64 {
64 return g_GridInfo[grid]; 65 return g_gridInfo[grid];
65 } 66 }
66 67
67 // ============================================================================= 68 // =============================================================================
68 enum ERotationPoint 69 enum ERotationPoint
69 { 70 {
85 Fine 86 Fine
86 }; 87 };
87 88
88 enum Config 89 enum Config
89 { 90 {
90 X, 91 Coordinate,
91 Y,
92 Z,
93 Angle 92 Angle
94 }; 93 };
95 94
96 double snap (double value, const Grid::Config axis); 95 double snap (double value, const Grid::Config type);
97 } 96 }
98 97
99 // ============================================================================= 98 // =============================================================================
100 // Plural expression 99 // Plural expression
101 template<class T> static inline const char* plural (T n) 100 template<class T> static inline const char* plural (T n)

mercurial