98 BINNING_TYPE = 1 << 0,
99 BIN_SIZE_MODEL = 1 << 1,
100 BIN_SIZE_DIVISOR = 1 << 2,
101 DECIMAL_PLACES = 1 << 3,
102 BINNING_LOGIC_PARTIAL = (BINNING_TYPE | BIN_SIZE_MODEL),
104 (BINNING_LOGIC_PARTIAL | BIN_SIZE_DIVISOR | DECIMAL_PLACES),
105 REMOVE_ZERO_DATA_POINTS = 1 << 4,
106 FULL = (REMOVE_ZERO_DATA_POINTS | BINNING_LOGIC_FULL),
108 Q_ENUM(InitializationResult)
114 BinningType binningType,
118 bool removeZeroValDataPoints,
119 QObject *parent =
nullptr);
124 InitializationResult initialize(
const QString &text);
126 void initialize(
double minMz,
128 BinningType binningType,
132 bool removeZeroValDataPoints,
133 QObject *parent =
nullptr);
139 InitializationResult initialization_results);
141 void setSmallestMz(
double value);
142 void updateSmallestMz(
double value);
143 double getSmallestMz()
const;
145 void setGreatestMz(
double value);
146 void updateGreatestMz(
double value);
147 double getGreatestMz()
const;
149 void setMzValues(
double smallest,
double greatest);
151 void setBinningType(BinningType binningType);
152 BinningType getBinningType()
const;
157 void setBinSizeDivisor(
int divisor);
158 int getBinSizeDivisor()
const;
160 void setIndicativeBinSize(
double value);
161 double getIndicativeBinSize()
const;
163 void setDecimalPlaces(
int decimal_places);
164 int getDecimalPlaces()
const;
166 void setRemoveZeroValDataPoints(
bool removeOrNot =
true);
167 bool isRemoveZeroValDataPoints()
const;
171 bool isValid()
const;
173 bool hasValidMzRange()
const;
175 std::vector<double> createBins();
178 QString toString(
int offset,
const QString &spacer =
" ")
const;
180 QString toString()
const;
181 QString binsToStringWithDeltas(
const std::vector<double> bins)
const;
196 double m_smallestMz = std::numeric_limits<double>::max();
200 double m_greatestMz = std::numeric_limits<double>::min();
205 double m_indicativeBinSize = 0;
221 int m_binSizeDivisor = 6;
226 int m_decimalPlaces = -1;
231 bool m_removeZeroValDataPoints =
true;
233 std::vector<double> createArbitraryBins();