Loading...
Searching...
No Matches
pappso::IntegrationScopeRect Class Reference

`#include <integrationscoperect.h>`

Inheritance diagram for pappso::IntegrationScopeRect:

## Public Member Functions

| IntegrationScopeRect ()
| IntegrationScopeRect (const QPointF &point, double width, double height)
| IntegrationScopeRect (const QPointF &point, double width, Enums::DataKind data_kind_x, double height, Enums::DataKind data_kind_y)
| IntegrationScopeRect (const IntegrationScopeRect &other)
virtual | ~IntegrationScopeRect ()
virtual IntegrationScopeRect & | operator= (const IntegrationScopeRect &other)
virtual IntegrationScopeFeatures | getTopMostPoint (QPointF &point) const override
virtual IntegrationScopeFeatures | getBottomMostPoint (QPointF &point) const override
virtual void | setHeight (double height)
virtual IntegrationScopeFeatures | getHeight (double &height) const override
virtual bool | range (Enums::Axis axis, double &start, double &end) const override
virtual void | setDataKindX (Enums::DataKind data_kind) override
virtual bool | getDataKindX (Enums::DataKind &data_kind) override
virtual void | setDataKindY (Enums::DataKind data_kind) override
virtual bool | getDataKindY (Enums::DataKind &data_kind) override
bool | is1D () const override
bool | is2D () const override
virtual bool | isRectangle () const override
virtual bool | isRhomboid () const override
virtual bool | transpose () override
virtual void | update (const QPointF &point, double width, double height)
virtual bool | contains (const QPointF &point) const override
virtual QString | toString () const override
virtual void | reset () override
Public Member Functions inherited from pappso::IntegrationScopeBase
| IntegrationScopeBase (QObject *parent_p=nullptr)
| IntegrationScopeBase (const IntegrationScopeBase &other, QObject *parent_p=nullptr)
virtual | ~IntegrationScopeBase ()
virtual bool | getPoints (std::vector< QPointF > &points) const
virtual IntegrationScopeFeatures | getLeftMostPoints (std::vector< QPointF > &points) const
virtual IntegrationScopeFeatures | getLeftMostTopPoint (QPointF &point) const
virtual IntegrationScopeFeatures | getLeftMostBottomPoint (QPointF &point) const
virtual IntegrationScopeFeatures | getRightMostPoints (std::vector< QPointF > &points) const
virtual IntegrationScopeFeatures | getRightMostTopPoint (QPointF &point) const
virtual IntegrationScopeFeatures | getRightMostBottomPoint (QPointF &point) const
virtual IntegrationScopeFeatures | getTopMostPoints (std::vector< QPointF > &points) const
virtual IntegrationScopeFeatures | getBottomMostPoints (std::vector< QPointF > &points) const
virtual IntegrationScopeFeatures | getRhombHorizontalSize (double &size) const
virtual IntegrationScopeFeatures | getRhombVerticalSize (double &size) const

## Protected Attributes

double | m_height
Enums::DataKind | m_dataKindY = Enums::DataKind::unset
Protected Attributes inherited from pappso::IntegrationScope
QPointF | m_point
double | m_width
Enums::DataKind | m_dataKindX = Enums::DataKind::unset

## Additional Inherited Members

Signals inherited from pappso::IntegrationScope
void | pointChanged ()
void | widthChanged ()
Properties inherited from pappso::IntegrationScope
QPointF | point

## Detailed Description

Definition at line 44 of file integrationscoperect.h.

## Constructor & Destructor Documentation

## IntegrationScopeRect() [1/4]

pappso::IntegrationScopeRect::IntegrationScopeRect | ( |  | ) |

Definition at line 20 of file integrationscoperect.cpp.

: IntegrationScope()
{
// qDebug() << "Constructing" << this;
}
pappso::IntegrationScope::IntegrationScope
WRITE setPoint() NOTIFY pointChanged() FINAL) Q_PROPERTY(double width READ getWidth() WRITE setWidth() NOTIFY widthChanged() FINAL) public IntegrationScope(const QPointF &point, double width, QObject *parent_p=nullptr)
Definition integrationscope.cpp:27

References pappso::IntegrationScope::IntegrationScope().

Referenced by IntegrationScopeRect(), and operator=().

## IntegrationScopeRect() [2/4]

pappso::IntegrationScopeRect::IntegrationScopeRect | ( | const QPointF & | point,
|  | double | width,
|  | double | height )

Definition at line 25 of file integrationscoperect.cpp.

: IntegrationScope(point, width), m_height(height)
{
// qDebug() << "Constructing" << this << "point:" << point << "width:" << width
// << "height:" << height;
}
pappso::IntegrationScopeRect::m_height
double m_height
Definition integrationscoperect.h:89
pappso::IntegrationScope::point
QPointF point
Definition integrationscope.h:39

References pappso::IntegrationScope::IntegrationScope(), m_height, and pappso::IntegrationScope::point.

## IntegrationScopeRect() [3/4]

pappso::IntegrationScopeRect::IntegrationScopeRect | ( | const QPointF & | point,
|  | double | width,
|  | Enums::DataKind | data_kind_x,
|  | double | height,
|  | Enums::DataKind | data_kind_y )

Definition at line 33 of file integrationscoperect.cpp.

: IntegrationScope(point, width, data_kind_x), m_height(height), m_dataKindY(data_kind_y)
{
// qDebug() << "Constructing" << this << "point:" << point << "width:" << width
// << "height:" << height
// << "data_kind_x:" << static_cast<int>(data_kind_x)
// << "data_kind_y:" << static_cast<int>(data_kind_y);
}
pappso::IntegrationScopeRect::m_dataKindY
Enums::DataKind m_dataKindY
Definition integrationscoperect.h:90

References pappso::IntegrationScope::IntegrationScope(), m_dataKindY, m_height, and pappso::IntegrationScope::point.

## IntegrationScopeRect() [4/4]

pappso::IntegrationScopeRect::IntegrationScopeRect | ( | const IntegrationScopeRect & | other | ) |

Definition at line 46 of file integrationscoperect.cpp.

: IntegrationScope(other.m_point, other.m_width, other.m_dataKindX),
m_height(other.m_height),
m_dataKindY(other.m_dataKindY)
{
// qDebug() << "Constructing" << this << "point:" << point << "width:" << width
// << "height:" << height
// << "data_kind_x:" << static_cast<int>(data_kind_x)
// << "data_kind_y:" << static_cast<int>(data_kind_y);
}

References pappso::IntegrationScope::IntegrationScope(), IntegrationScopeRect(), pappso::IntegrationScope::m_dataKindX, m_dataKindY, m_height, pappso::IntegrationScope::m_point, and pappso::IntegrationScope::m_width.

## ~IntegrationScopeRect()

pappso::IntegrationScopeRect::~IntegrationScopeRect | ( |  | ) |

virtual

Definition at line 57 of file integrationscoperect.cpp.

{
// qDebug() << "Destructing" << this;
}

## Member Function Documentation

## contains()

bool pappso::IntegrationScopeRect::contains | ( | const QPointF & | point | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 214 of file integrationscoperect.cpp.

{
return (point.x() >= m_point.x() && point.x() <= m_point.x() + m_width &&
point.y() >= m_point.y() && point.y() <= m_point.y() + m_height);
}
pappso::IntegrationScope::m_width
double m_width
Definition integrationscope.h:93
pappso::IntegrationScope::m_point
QPointF m_point
Definition integrationscope.h:92

References m_height, pappso::IntegrationScope::m_point, pappso::IntegrationScope::m_width, and pappso::IntegrationScope::point.

## getBottomMostPoint()

IntegrationScopeFeatures pappso::IntegrationScopeRect::getBottomMostPoint | ( | QPointF & | point | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 86 of file integrationscoperect.cpp.

{
point = m_point;
return IntegrationScopeFeatures::SUCCESS;
}
pappso::SUCCESS
@ SUCCESS
Definition integrationscopebase.h:51

References pappso::IntegrationScope::m_point, pappso::IntegrationScope::point, and pappso::SUCCESS.

## getDataKindX()

bool pappso::IntegrationScopeRect::getDataKindX | ( | Enums::DataKind & | data_kind | ) |

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 139 of file integrationscoperect.cpp.

{
data_kind = m_dataKindX;
return true;
}
pappso::IntegrationScope::m_dataKindX
Enums::DataKind m_dataKindX
Definition integrationscope.h:94

References pappso::IntegrationScope::m_dataKindX.

## getDataKindY()

bool pappso::IntegrationScopeRect::getDataKindY | ( | Enums::DataKind & | data_kind | ) |

override virtual

Reimplemented from pappso::IntegrationScopeBase.

Definition at line 146 of file integrationscoperect.cpp.

{
data_kind = m_dataKindY;
return true;
}

References m_dataKindY.

## getHeight()

IntegrationScopeFeatures pappso::IntegrationScopeRect::getHeight | ( | double & | height | ) | const

override virtual

Reimplemented from pappso::IntegrationScopeBase.

Definition at line 99 of file integrationscoperect.cpp.

{
height = m_height;
return IntegrationScopeFeatures::SUCCESS;
}

References m_height, and pappso::SUCCESS.

## getTopMostPoint()

IntegrationScopeFeatures pappso::IntegrationScopeRect::getTopMostPoint | ( | QPointF & | point | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 79 of file integrationscoperect.cpp.

{
point = QPointF(m_point.x(), m_point.y() + m_height);
return IntegrationScopeFeatures::SUCCESS;
}

References m_height, pappso::IntegrationScope::m_point, pappso::IntegrationScope::point, and pappso::SUCCESS.

## is1D()

bool pappso::IntegrationScopeRect::is1D | ( |  | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 153 of file integrationscoperect.cpp.

{
return false;
}

Referenced by is2D().

## is2D()

bool pappso::IntegrationScopeRect::is2D | ( |  | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 159 of file integrationscoperect.cpp.

{
return !is1D();
}
pappso::IntegrationScopeRect::is1D
bool is1D() const override
Definition integrationscoperect.cpp:153

References is1D().

## isRectangle()

bool pappso::IntegrationScopeRect::isRectangle | ( |  | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 165 of file integrationscoperect.cpp.

{
return true;
}

## isRhomboid()

bool pappso::IntegrationScopeRect::isRhomboid | ( |  | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 171 of file integrationscoperect.cpp.

{
return false;
}

## operator=()

IntegrationScopeRect & pappso::IntegrationScopeRect::operator= | ( | const IntegrationScopeRect & | other | ) |

virtual

Definition at line 63 of file integrationscoperect.cpp.

{
if(this == &other)
return *this;
IntegrationScope::operator=(other);
m_height = other.m_height;
m_dataKindX = other.m_dataKindX;
m_dataKindY = other.m_dataKindY;
return *this;
}
pappso::IntegrationScope::operator=
virtual IntegrationScope & operator=(const IntegrationScope &other)
Definition integrationscope.cpp:62

References IntegrationScopeRect(), pappso::IntegrationScope::m_dataKindX, m_dataKindY, m_height, and pappso::IntegrationScope::operator=().

## range()

bool pappso::IntegrationScopeRect::range | ( | Enums::Axis | axis,
|  | double & | start,
|  | double & | end ) const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 106 of file integrationscoperect.cpp.

{
if(axis == Enums::Axis::x)
{
start = m_point.x();
end = start + m_width;
return true;
}
else if(axis == Enums::Axis::y)
{
start = m_point.y();
end = start + m_height;
return true;
}
return false;
}
pappso::Enums::Axis::y
@ y
Definition types.h:261
pappso::Enums::Axis::x
@ x
Definition types.h:260

References m_height, pappso::IntegrationScope::m_point, pappso::IntegrationScope::m_width, pappso::Enums::x, and pappso::Enums::y.

## reset()

void pappso::IntegrationScopeRect::reset | ( |  | ) |

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 239 of file integrationscoperect.cpp.

{
IntegrationScope::reset();
m_height = 0;
}
pappso::IntegrationScope::reset
virtual void reset() override
Definition integrationscope.cpp:205

References m_height, and pappso::IntegrationScope::reset().

## setDataKindX()

void pappso::IntegrationScopeRect::setDataKindX | ( | Enums::DataKind | data_kind | ) |

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 127 of file integrationscoperect.cpp.

{
m_dataKindX = data_kind;
}

References pappso::IntegrationScope::m_dataKindX.

## setDataKindY()

void pappso::IntegrationScopeRect::setDataKindY | ( | Enums::DataKind | data_kind | ) |

override virtual

Reimplemented from pappso::IntegrationScopeBase.

Definition at line 133 of file integrationscoperect.cpp.

{
m_dataKindY = data_kind;
}

References m_dataKindY.

## setHeight()

void pappso::IntegrationScopeRect::setHeight | ( | double | height | ) |

virtual

Definition at line 93 of file integrationscoperect.cpp.

{
m_height = height;
}

References m_height.

## toString()

QString pappso::IntegrationScopeRect::toString | ( |  | ) | const

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 221 of file integrationscoperect.cpp.

{
QString text = "[";
text.append(QString("(%1, %2)").arg(m_point.x(), 0, 'f', 3).arg(m_point.y(), 0, 'f', 3));
text.append("->");
text.append(QString("(%1, %2)")
.arg(m_point.x() + m_width, 0, 'f', 3)
.arg(m_point.y() + m_height, 0, 'f', 3));
text.append("]");
return text;
}

References m_height, pappso::IntegrationScope::m_point, and pappso::IntegrationScope::m_width.

## transpose()

bool pappso::IntegrationScopeRect::transpose | ( |  | ) |

override virtual

Reimplemented from pappso::IntegrationScope.

Definition at line 177 of file integrationscoperect.cpp.

{
Enums::DataKind was_data_kind_y = m_dataKindY;
m_dataKindY = m_dataKindX;
m_dataKindX = was_data_kind_y;
// qDebug() << "Point before rectangle transposition:" << m_point;
// Transpose the point.
QPointF transposed_point(m_point.y(), m_point.x());
m_point = transposed_point;
// qDebug() << "Point after rectangle transposition:" << m_point;
// qDebug() << "Before transposition: width is" << m_width << "and height is"
// << m_height;
// Tranpose width <--> height
double was_height = m_height;
m_height = m_width;
m_width = was_height;
// qDebug() << "After transposition: width is" << m_width << "and height is"
// << m_height;
return true;
}
pappso::Enums::DataKind
DataKind
Definition types.h:249

References pappso::IntegrationScope::m_dataKindX, m_dataKindY, m_height, pappso::IntegrationScope::m_point, and pappso::IntegrationScope::m_width.

## update()

void pappso::IntegrationScopeRect::update | ( | const QPointF & | point,
|  | double | width,
|  | double | height )

virtual

Definition at line 206 of file integrationscoperect.cpp.

{
IntegrationScope::m_point = point;
IntegrationScope::m_width = width;
m_height = height;
}

References m_height, pappso::IntegrationScope::m_point, pappso::IntegrationScope::m_width, and pappso::IntegrationScope::point.

## Member Data Documentation

## m_dataKindY

Enums::DataKind pappso::IntegrationScopeRect::m_dataKindY = Enums::DataKind::unset

protected

Definition at line 90 of file integrationscoperect.h.

Referenced by IntegrationScopeRect(), IntegrationScopeRect(), getDataKindY(), operator=(), setDataKindY(), and transpose().

## m_height

double pappso::IntegrationScopeRect::m_height

protected

Definition at line 89 of file integrationscoperect.h.

Referenced by IntegrationScopeRect(), IntegrationScopeRect(), IntegrationScopeRect(), contains(), getHeight(), getTopMostPoint(), operator=(), range(), reset(), setHeight(), toString(), transpose(), and update().

The documentation for this class was generated from the following files:

- pappsomspp/core/processing/combiners/integrationscoperect.h
- pappsomspp/core/processing/combiners/integrationscoperect.cpp