Skip to content
Snippets Groups Projects
Commit f240f597 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

fct names -> camel case

parent 358adacc
No related branches found
No related tags found
1 merge request!2631masks transform along with color map (#988), plus some code cleanup
...@@ -71,7 +71,7 @@ void EllipseOverlay::resizeY(double yl, double yh) ...@@ -71,7 +71,7 @@ void EllipseOverlay::resizeY(double yl, double yh)
//! updates position of view using item properties //! updates position of view using item properties
void EllipseOverlay::update_position() void EllipseOverlay::updatePosition()
{ {
setX(x2pix(m_item->xCenter())); setX(x2pix(m_item->xCenter()));
setY(y2pix(m_item->yCenter())); setY(y2pix(m_item->yCenter()));
...@@ -80,7 +80,7 @@ void EllipseOverlay::update_position() ...@@ -80,7 +80,7 @@ void EllipseOverlay::update_position()
setTransform(QTransform().rotate(-1 * m_item->angle())); setTransform(QTransform().rotate(-1 * m_item->angle()));
} }
QRectF EllipseOverlay::mask_rectangle() QRectF EllipseOverlay::maskRectangle()
{ {
return QRectF(-width() / 2, -height() / 2, width(), height()); return QRectF(-width() / 2, -height() / 2, width(), height());
} }
......
...@@ -41,8 +41,8 @@ private slots: ...@@ -41,8 +41,8 @@ private slots:
private: private:
QPainterPath shape() const override; QPainterPath shape() const override;
void update_position() override; void updatePosition() override;
QRectF mask_rectangle() override; QRectF maskRectangle() override;
qreal width() const override; qreal width() const override;
qreal height() const override; qreal height() const override;
......
...@@ -104,7 +104,7 @@ void IRectangularOverlay::update_view() ...@@ -104,7 +104,7 @@ void IRectangularOverlay::update_view()
{ {
prepareGeometryChange(); prepareGeometryChange();
update_bounding_rect(); update_bounding_rect();
update_position(); updatePosition();
} }
//! updates view's bounding rectangle using item properties //! updates view's bounding rectangle using item properties
...@@ -112,7 +112,7 @@ void IRectangularOverlay::update_view() ...@@ -112,7 +112,7 @@ void IRectangularOverlay::update_view()
void IRectangularOverlay::update_bounding_rect() void IRectangularOverlay::update_bounding_rect()
{ {
if (parameterizedItem()) { if (parameterizedItem()) {
m_mask_rect = mask_rectangle(); m_mask_rect = maskRectangle();
if (is_true_mask()) if (is_true_mask())
m_bounding_rect = m_mask_rect.marginsAdded( m_bounding_rect = m_mask_rect.marginsAdded(
QMarginsF(bbox_margins, bbox_margins, bbox_margins, bbox_margins)); QMarginsF(bbox_margins, bbox_margins, bbox_margins, bbox_margins));
......
...@@ -34,8 +34,8 @@ public slots: ...@@ -34,8 +34,8 @@ public slots:
protected: protected:
void update_view() override; void update_view() override;
virtual void update_position() = 0; virtual void updatePosition() = 0;
virtual QRectF mask_rectangle() = 0; virtual QRectF maskRectangle() = 0;
//... Item properties to scene coordinates //... Item properties to scene coordinates
virtual qreal width() const = 0; virtual qreal width() const = 0;
......
...@@ -69,13 +69,13 @@ void RectangleOverlay::resizeY(double yl, double yh) ...@@ -69,13 +69,13 @@ void RectangleOverlay::resizeY(double yl, double yh)
} }
//! updates position of view using item properties //! updates position of view using item properties
void RectangleOverlay::update_position() void RectangleOverlay::updatePosition()
{ {
setX(x2pix(m_item->xLow())); setX(x2pix(m_item->xLow()));
setY(y2pix(m_item->yUp())); setY(y2pix(m_item->yUp()));
} }
QRectF RectangleOverlay::mask_rectangle() QRectF RectangleOverlay::maskRectangle()
{ {
return {0, 0, width(), height()}; return {0, 0, width(), height()};
} }
......
...@@ -41,8 +41,8 @@ private slots: ...@@ -41,8 +41,8 @@ private slots:
private: private:
QPainterPath shape() const override; QPainterPath shape() const override;
void update_position() override; void updatePosition() override;
QRectF mask_rectangle() override; QRectF maskRectangle() override;
qreal width() const override; qreal width() const override;
qreal height() const override; qreal height() const override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment