Skip to content
Permalink
Browse files

rename params of virtual methods to match parent class, add missing p…

…rivate cond
  • Loading branch information
3nids committed Oct 24, 2018
1 parent fa92f41 commit 745526dff00c8de1d8e95840588d2c0b9c580690
@@ -33,6 +33,8 @@
#include <QWidget>
#include <limits>

///@cond PRIVATE

QgsLayoutMouseHandles::QgsLayoutMouseHandles( QgsLayout *layout, QgsLayoutView *view )
: QObject( nullptr )
, QGraphicsRectItem( nullptr )
@@ -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() )
{
@@ -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
@@ -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 );
@@ -23,6 +23,8 @@
#include <QWidget>
#include <QBrush>

///@cond PRIVATE

QgsLayoutReportSectionLabel::QgsLayoutReportSectionLabel( QgsLayout *layout, QgsLayoutView *view )
: QGraphicsRectItem( nullptr )
, mLayout( layout )
@@ -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
@@ -92,3 +97,5 @@ void QgsLayoutReportSectionLabel::setLabel( const QString &label )
mLabel = label;
update();
}

///@endcond PRIVATE
@@ -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:

0 comments on commit 745526d

Please sign in to comment.
You can’t perform that action at this time.