1818**
1919****************************************************************************/
2020
21- #ifndef STRUCTURES_H
22- #define STRUCTURES_H
21+ #pragma once
2322
2423#include " zecalculator/parsing/types.h"
25- #include < cmath>
2624#include < cfloat>
2725#include < QtWidgets>
2826
3230#define SOFTWARE_VERSION 3.5
3331#define SOFTWARE_VERSION_STR " v3.5"
3432
35- // TODO put the following 3 defs into an enum
36- #define FROM_CURRENT_GRAPHIC 0
37- #define MANUAL_ENTRY 1
38- #define PREDEFINED_ENTRY 2
39-
40- #define MAX_DOUBLE_PREC 13
41-
4233#define NORMAL 0
4334#define ZOOMER 1
4435#define DEZOOMER 2
5243#define NUM_PREC 7 // default precision while displaying decimal numbers
5344#define MAX_NUM_PREC 8 // the maximum precision in decimal come from imprecision on integration and derivation
5445
55- #define NUM_PREC_DEC 1E-7
5646#define MAX_NUM_PREC_DEC 1E-8
5747
58- #define INIT_FREQ 30 // animation update frequency
59- #define INIT_INCR_PERIOD 100 // animation incremental period
60- #define PAR_DRAW_LIMIT 500
61-
62- #define INVALID_COLOR " #FF9980"
63- #define VALID_COLOR " #B2FFB2"
64-
65- #define EPSILON 0.001
66- #define MAX_SAVED_SEQ_VALS 1000000
67-
6848#define RELATIVE_MIN_SIZE 0.25 // How much the graph can be smaller than its container sheet/background
6949
7050#define CM_PER_INCH 2.54
7151
72- #define ROMBERG_MAX_STEPS 500
73-
74- // Maximum and minimum relative size between the abscissa text and the horizontal tick spacing
75- #define MAX_REL_TICK_SPACING 0.8
76- #define MIN_REL_TICK_SPACING 0.2
77-
7852// / @brief type of math objects to use in ZeCalculator
7953inline constexpr zc::parsing::Type zc_t = zc::parsing::Type::RPN;
8054
@@ -264,12 +238,6 @@ struct ZeAppSettings
264238 QColor validSyntax = Qt::darkGreen, invalidSyntax = Qt::darkRed, warningSyntax = Qt::darkYellow;
265239};
266240
267- struct FuncMap
268- {
269- bool funcType;
270- short id;
271- };
272-
273241struct Range
274242{
275243 Range () : start(0 ), end(0 ), step(1 ) {}
@@ -293,30 +261,6 @@ struct Point
293261
294262bool ptCompY (const Point &pt1, const Point &pt2);
295263
296- struct ParametricInfo
297- {
298- bool isParametric;
299- Range range;
300- int originalDrawsNum, currentDrawsNum;
301- };
302-
303- struct Color
304- {
305- short r, g, b;
306- };
307-
308- struct ValuesTableParameters
309- {
310- short funcType, id, entryType, emptyCellsCount;
311- Range range;
312- QString name;
313- };
314-
315- struct ParEqValues
316- {
317- QList<double > tValues, xValues, yValues;
318- };
319-
320264// N.B: enum values are used as indexes in a vector!
321265enum struct PointStyle : unsigned int { Rhombus = 0 , Disc, Square, Triangle, Cross };
322266
@@ -340,15 +284,6 @@ struct UserData
340284 DataStyle style;
341285};
342286
343- struct SelectorPos
344- {
345- bool inbetween;
346- int index;
347- };
348-
349- QPointF toQPointF (const Point &pt);
350-
351- Point operator *(Point &pt1, const Point &pt2);
352287
353288template <class Number >
354289Number int_pow (Number a, int b)
@@ -369,5 +304,3 @@ Number int_pow(Number a, int b)
369304}
370305
371306Point operator * (const Point &pt1, const Point &pt2);
372-
373- #endif // STRUCTURES_H
0 commit comments