23 qDebug() <<
"Constructing" <<
this;
29 qDebug() <<
"Constructing" <<
this <<
"with" <<
m_points.size() <<
"points.";
37 m_dataKindX(data_kind_x),
38 m_dataKindY(data_kind_y)
40 qDebug() <<
"Constructing" <<
this <<
"with" <<
m_points.size() <<
"points."
41 <<
"data_kind_x:" <<
static_cast<int>(data_kind_x)
42 <<
"data_kind_y:" <<
static_cast<int>(data_kind_y);
46 m_points(other.m_points),
47 m_dataKindX(other.m_dataKindX),
48 m_dataKindY(other.m_dataKindY)
54 qDebug() <<
"Destructing" <<
this;
96 qFatal(
"The rhomboid has not four points.");
98 double top_most_y_value = std::numeric_limits<double>::min();
102 if(the_point.y() > top_most_y_value)
104 top_most_y_value = the_point.y();
117 qFatal(
"The rhomboid has not four points.");
127 qFatal(
"Failed to get the top most point.");
130 points.push_back(point);
141 if(the_point == point)
144 if(the_point.y() == point.y())
147 points.push_back(the_point);
153 if(points.size() == 1)
155 else if(points.size() == 2)
157 else if(points.size() > 2)
169 qFatal(
"The rhomboid has not four points.");
171 double bottom_most_y_value = std::numeric_limits<double>::max();
175 if(the_point.y() < bottom_most_y_value)
177 bottom_most_y_value = the_point.y();
189 qFatal(
"The rhomboid has not four points.");
199 qFatal(
"Failed to get the bottom most point.");
202 points.push_back(point);
213 if(the_point == point)
216 if(the_point.y() == point.y())
219 points.push_back(the_point);
225 if(points.size() == 1)
227 else if(points.size() == 2)
229 else if(points.size() > 2)
241 qFatal(
"The rhomboid has not four points.");
243 double left_most_x = std::numeric_limits<double>::max();
247 if(the_point.x() < left_most_x)
249 left_most_x = the_point.x();
261 qFatal(
"The rhomboid has not four points.");
271 qFatal(
"Failed to get at least one left most point.");
274 points.push_back(point);
285 if(the_point == point)
288 if(the_point.x() == point.x())
291 points.push_back(the_point);
297 if(points.size() == 1)
299 else if(points.size() == 2)
301 else if(points.size() > 2)
313 qFatal(
"The rhomboid has not four points.");
315 double greatest_x = std::numeric_limits<double>::min();
319 if(the_point.x() > greatest_x)
321 greatest_x = the_point.x();
333 qFatal(
"The rhomboid has not four points.");
343 qFatal(
"Failed to get at least one left most point.");
346 points.push_back(point);
357 if(the_point == point)
360 if(the_point.x() == point.x())
363 points.push_back(the_point);
369 if(points.size() == 1)
371 else if(points.size() == 2)
373 else if(points.size() > 2)
385 qFatal(
"The rhomboid has not four points.");
387 std::vector<QPointF> points;
395 qFatal(
"Failed to get the top most points.");
401 if(points.size() != 2)
402 qFatal(
"We should have gotten two points.");
404 if(points.at(0).x() < points.at(1).x())
405 point = points.at(0);
407 point = points.at(1);
418 qFatal(
"Failed to get the left most points.");
424 if(points.size() != 2)
425 qFatal(
"We should have gotten two points.");
427 if(points.at(0).y() > points.at(1).y())
428 point = points.at(0);
430 point = points.at(1);
440 qFatal(
"This point should never be reached.");
448 qFatal(
"This point should never be reached.");
450 return scope_features;
457 qFatal(
"The rhomboid has not four points.");
459 std::vector<QPointF> points;
467 qFatal(
"Failed to get the bottom most points.");
473 if(points.size() != 2)
474 qFatal(
"We should have gotten two points.");
476 if(points.at(0).x() < points.at(1).x())
477 point = points.at(0);
479 point = points.at(1);
489 qFatal(
"Failed to get the left most points.");
495 if(points.size() != 2)
496 qFatal(
"We should have gotten two points.");
498 if(points.at(0).y() < points.at(1).y())
499 point = points.at(0);
501 point = points.at(1);
511 qFatal(
"This point should never be reached.");
519 qFatal(
"This point should never be reached.");
521 return scope_features;
528 qFatal(
"The rhomboid has not four points.");
530 std::vector<QPointF> points;
538 qFatal(
"Failed to get the top most points.");
544 if(points.size() != 2)
545 qFatal(
"We should have gotten two points.");
547 if(points.at(0).x() > points.at(1).x())
548 point = points.at(0);
550 point = points.at(1);
560 qFatal(
"Failed to get the right most points.");
566 if(points.size() != 2)
567 qFatal(
"We should have gotten two points.");
569 if(points.at(0).y() > points.at(1).y())
570 point = points.at(0);
572 point = points.at(1);
582 qFatal(
"This point should never be reached.");
590 qFatal(
"This point should never be reached.");
592 return scope_features;
599 qFatal(
"The rhomboid has not four points.");
601 std::vector<QPointF> points;
609 qFatal(
"Failed to get the bottom most points.");
615 if(points.size() != 2)
616 qFatal(
"We should have gotten two points.");
618 if(points.at(0).x() > points.at(1).x())
619 point = points.at(0);
621 point = points.at(1);
631 qFatal(
"Failed to get the right most points.");
637 if(points.size() != 2)
638 qFatal(
"We should have gotten two points.");
640 if(points.at(0).y() < points.at(1).y())
641 point = points.at(0);
643 point = points.at(1);
653 qFatal(
"This point should never be reached.");
661 qFatal(
"This point should never be reached.");
663 return scope_features;
670 qFatal(
"The IntegrationScopeRhomb has less than four points.");
717 QPointF left_most_point;
718 QPointF right_most_point;
721 qFatal(
"Failed to get the left most point.");
724 qFatal(
"Failed to get the right most point.");
726 width = fabs(right_most_point.x() - left_most_point.x());
737 qFatal(
"The IntegrationScopeRhomb has less than four points.");
741 QPointF top_most_point;
742 QPointF bottom_most_point;
745 qFatal(
"Failed to get the top most point.");
748 qFatal(
"Failed to get the bottom most point.");
750 height = fabs(top_most_point.y() - bottom_most_point.y());
759 qFatal(
"The IntegrationScopeRhomb has less than four points.");
818 std::vector<QPointF> points;
823 qDebug() <<
"The rhomboid integration scope:" <<
toString();
828 qFatal(
"Failed to get top most points.");
830 qDebug() <<
"getTopMostPoints() got" << points.size() <<
"points.";
840 size = fabs(points.at(0).x() - points.at(1).x());
842 else if(scope_features &
849 return scope_features;
868 std::vector<QPointF> points;
873 qDebug() <<
"The rhomboid integration scope:" <<
toString();
878 qFatal(
"Failed to get left most points.");
880 qDebug() <<
"getLeftMostPoints() got" << points.size() <<
"points.";
895 size = fabs(points.at(0).y() - points.at(1).y());
898 return scope_features;
906 QPointF left_most_point;
908 qFatal(
"Failed to get left-most point.");
910 QPointF right_most_point;
913 qFatal(
"Failed to get right-most point.");
915 start = left_most_point.x();
916 end = right_most_point.x();
922 QPointF bottom_most_point;
925 qFatal(
"Failed to get bottom-most point.");
927 QPointF top_most_point;
929 qFatal(
"Failed to get top-most point.");
931 start = bottom_most_point.y();
932 end = top_most_point.y();
998 std::vector<QPointF> transposed_points;
1001 transposed_points.push_back(QPointF(point.y(), point.x()));
1004 m_points.assign(transposed_points.begin(), transposed_points.end());
1022 bool is_inside =
false;
1024 int vertex_count =
m_points.size();
1026 for(i = 0, j = vertex_count - 1; i < vertex_count; j = i++)
1028 if(((
m_points.at(i).y() > point.y()) !=
1029 (
m_points.at(j).y() > point.y())) &&
1034 is_inside = !is_inside;
1059 text.append(QString(
"(%1, %2)").arg(point.x()).arg(point.y()));
1062 text.append(QString(
"(%1, %2)").arg(point.x()).arg(point.y()));
1066 text.append(QString(
"(%1, %2)").arg(point.x()).arg(point.y()));
1069 text.append(QString(
"(%1, %2)").arg(point.x()).arg(point.y()));
1074 text.append(QString(
"(%1, %2)").arg(point.x()).arg(point.y()));
1078 qDebug() <<
"Returning toString():" << text;
virtual bool getPoints(std::vector< QPointF > &points) const override
virtual void setDataKindX(DataKind data_kind) override
virtual IntegrationScopeFeatures getWidth(double &width) const override
virtual IntegrationScopeFeatures getBottomMostPoints(std::vector< QPointF > &points) const override
virtual void reset() override
virtual ~IntegrationScopeRhomb()
std::vector< QPointF > m_points
virtual QString toString() const override
virtual IntegrationScopeFeatures getBottomMostPoint(QPointF &point) const override
virtual void setDataKindY(DataKind data_kind) override
virtual IntegrationScopeFeatures getRightMostPoints(std::vector< QPointF > &points) const override
virtual bool isRhomboid() const override
virtual IntegrationScopeFeatures getTopMostPoints(std::vector< QPointF > &points) const override
virtual IntegrationScopeFeatures getRightMostTopPoint(QPointF &point) const override
bool is2D() const override
virtual IntegrationScopeFeatures getTopMostPoint(QPointF &point) const override
virtual std::size_t addPoint(QPointF point)
virtual bool getDataKindX(DataKind &data_kind) override
virtual IntegrationScopeFeatures getRhombVerticalSize(double &size) const override
virtual IntegrationScopeFeatures getHeight(double &height) const override
virtual IntegrationScopeFeatures getLeftMostPoint(QPointF &point) const override
virtual bool getDataKindY(DataKind &data_kind) override
virtual bool transpose() override
bool is1D() const override
virtual bool range(Axis axis, double &start, double &end) const override
virtual IntegrationScopeFeatures getLeftMostPoints(std::vector< QPointF > &points) const override
virtual bool getPoint(QPointF &point) const override
virtual IntegrationScopeFeatures getLeftMostTopPoint(QPointF &point) const override
virtual IntegrationScopeRhomb & operator=(const IntegrationScopeRhomb &other)
virtual IntegrationScopeFeatures getLeftMostBottomPoint(QPointF &point) const override
virtual IntegrationScopeFeatures getRhombHorizontalSize(double &size) const override
virtual IntegrationScopeFeatures getRightMostPoint(QPointF &point) const override
virtual IntegrationScopeFeatures getRightMostBottomPoint(QPointF &point) const override
virtual bool contains(const QPointF &point) const override
virtual bool isRectangle() const override
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...