Skip to content
Permalink
Browse files

Add missing overrides

  • Loading branch information
nyalldawson committed Aug 3, 2015
1 parent 6a2df33 commit f7b4315f9c1d0482e6cc48f0444b95ba6a7bac5b
@@ -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();
@@ -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();
@@ -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() )
@@ -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
@@ -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;

0 comments on commit f7b4315

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