Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add missing overrides
  • Loading branch information
nyalldawson committed Aug 3, 2015
1 parent 6a2df33 commit f7b4315
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/app/nodetool/qgsmaptoolnodetool.h
Expand Up @@ -34,18 +34,18 @@ class QgsMapToolNodeTool: public QgsMapToolEdit
QgsMapToolNodeTool( QgsMapCanvas* canvas );
virtual ~QgsMapToolNodeTool();

void canvasDoubleClickEvent( QMouseEvent * e );
void canvasDoubleClickEvent( QMouseEvent * e ) override;

//! mouse press event in map coordinates (eventually filtered) to be redefined in subclass
void canvasMapPressEvent( QgsMapMouseEvent* e ) override;

//! mouse move event in map coordinates (eventually filtered) to be redefined in subclass
void canvasMapMoveEvent( QgsMapMouseEvent* e ) override;

void keyPressEvent( QKeyEvent* e );
void keyPressEvent( QKeyEvent* e ) override;

//! called when map tool is being deactivated
void deactivate();
void deactivate() override;

public slots:
void selectedFeatureDestroyed();
Expand Down
9 changes: 6 additions & 3 deletions src/app/nodetool/qgsnodeeditor.cpp
Expand Up @@ -36,13 +36,15 @@ static const int MinRadiusRole = Qt::UserRole + 1;
class CoordinateItemDelegate : public QStyledItemDelegate
{
public:
QString displayText( const QVariant & value, const QLocale & locale ) const

QString displayText( const QVariant & value, const QLocale & locale ) const override
{
return locale.toString( value.toDouble(), 'f', 4 );
}

protected:
QWidget* createEditor( QWidget * parent, const QStyleOptionViewItem & /*option*/, const QModelIndex & index ) const

QWidget* createEditor( QWidget * parent, const QStyleOptionViewItem &, const QModelIndex & index ) const override
{
QLineEdit* lineEdit = new QLineEdit( parent );
QDoubleValidator* validator = new QDoubleValidator();
Expand All @@ -51,7 +53,8 @@ class CoordinateItemDelegate : public QStyledItemDelegate
lineEdit->setValidator( validator );
return lineEdit;
}
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const

void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override
{
QLineEdit* lineEdit = qobject_cast<QLineEdit*>( editor );
if ( lineEdit->hasAcceptableInput() )
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgscheckboxwidgetfactory.h
Expand Up @@ -29,7 +29,7 @@ class GUI_EXPORT QgsCheckboxWidgetFactory : public QgsEditorWidgetFactory
QgsEditorConfigWidget* configWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) const override;
QgsEditorWidgetConfig readConfig( const QDomElement& configElement, QgsVectorLayer* layer, int fieldIdx ) override;
void writeConfig( const QgsEditorWidgetConfig& config, QDomElement& configElement, QDomDocument& doc, const QgsVectorLayer* layer, int fieldIdx ) override;
QMap<const char*, int> supportedWidgetTypes();
QMap<const char*, int> supportedWidgetTypes() override;
};

#endif // QGSCHECKBOXWIDGETFACTORY_H
2 changes: 1 addition & 1 deletion src/gui/qgsgeometryrubberband.h
Expand Up @@ -82,7 +82,7 @@ class GUI_EXPORT QgsGeometryRubberBand: public QgsMapCanvasItem
void setIconType( IconType iconType ) { mIconType = iconType; }

protected:
virtual void paint( QPainter* painter );
virtual void paint( QPainter* painter ) override;

private:
QgsAbstractGeometryV2* mGeometry;
Expand Down

0 comments on commit f7b4315

Please sign in to comment.