Skip to content

Commit

Permalink
rename params of virtual methods to match parent class, add missing p…
Browse files Browse the repository at this point in the history
…rivate cond
  • Loading branch information
3nids committed Oct 24, 2018
1 parent fa92f41 commit 745526d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/gui/layout/qgslayoutmousehandles.cpp
Expand Up @@ -33,6 +33,8 @@
#include <QWidget>
#include <limits>

///@cond PRIVATE

QgsLayoutMouseHandles::QgsLayoutMouseHandles( QgsLayout *layout, QgsLayoutView *view )
: QObject( nullptr )
, QGraphicsRectItem( nullptr )
Expand All @@ -53,10 +55,10 @@ QgsLayoutMouseHandles::QgsLayoutMouseHandles( QgsLayout *layout, QgsLayoutView *
layout->addItem( mVerticalSnapLine );
}

void QgsLayoutMouseHandles::paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
void QgsLayoutMouseHandles::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
{
Q_UNUSED( itemStyle );
Q_UNUSED( pWidget );
Q_UNUSED( option );
Q_UNUSED( widget );

if ( !mLayout->renderContext().isPreviewRender() )
{
Expand Down Expand Up @@ -1164,3 +1166,5 @@ void QgsLayoutMouseHandles::resizeMouseMove( QPointF currentPosition, bool lockR
//show current size of selection in status bar
mView->pushStatusMessage( tr( "width: %1 mm height: %2 mm" ).arg( rect().width() ).arg( rect().height() ) );
}

///@endcond PRIVATE
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutmousehandles.h
Expand Up @@ -98,7 +98,7 @@ class GUI_EXPORT QgsLayoutMouseHandles: public QObject, public QGraphicsRectItem
*/
QgsLayout *layout() { return mLayout; }

void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ) override;
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr ) override;

//! Finds out which mouse move action to choose depending on the scene cursor position
QgsLayoutMouseHandles::MouseAction mouseActionForScenePos( QPointF sceneCoordPos );
Expand Down
9 changes: 8 additions & 1 deletion src/gui/layout/qgslayoutreportsectionlabel.cpp
Expand Up @@ -23,6 +23,8 @@
#include <QWidget>
#include <QBrush>

///@cond PRIVATE

QgsLayoutReportSectionLabel::QgsLayoutReportSectionLabel( QgsLayout *layout, QgsLayoutView *view )
: QGraphicsRectItem( nullptr )
, mLayout( layout )
Expand All @@ -31,8 +33,11 @@ QgsLayoutReportSectionLabel::QgsLayoutReportSectionLabel( QgsLayout *layout, Qgs
setCacheMode( QGraphicsItem::DeviceCoordinateCache );
}

void QgsLayoutReportSectionLabel::paint( QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * )
void QgsLayoutReportSectionLabel::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
{
Q_UNUSED( option );
Q_UNUSED( widget );

if ( !mLayout || !mLayout->renderContext().isPreviewRender() )
{
//don't draw label in outputs
Expand Down Expand Up @@ -92,3 +97,5 @@ void QgsLayoutReportSectionLabel::setLabel( const QString &label )
mLabel = label;
update();
}

///@endcond PRIVATE
3 changes: 2 additions & 1 deletion src/gui/layout/qgslayoutreportsectionlabel.h
Expand Up @@ -44,8 +44,9 @@ class GUI_EXPORT QgsLayoutReportSectionLabel: public QGraphicsRectItem
*/
QgsLayoutReportSectionLabel( QgsLayout *layout, QgsLayoutView *view );

void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ) override;
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr ) override;

//! Sets the \a label.
void setLabel( const QString &label );

private:
Expand Down

0 comments on commit 745526d

Please sign in to comment.