Commit 1bf982f4 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent ac313623
......@@ -57,15 +57,15 @@ namespace Oxygen
public Q_SLOTS:
//* read current configuration
virtual void load( void );
void load( void ) Q_DECL_OVERRIDE;
//* save current configuration
virtual void save( void );
void save( void ) Q_DECL_OVERRIDE;
protected Q_SLOTS:
//* check whether configuration is changed and emit appropriate signal if yes
virtual void updateChanged();
void updateChanged() Q_DECL_OVERRIDE;
private:
......
......@@ -78,7 +78,7 @@ namespace Oxygen
protected:
virtual bool eventFilter( QObject* o, QEvent* e );
bool eventFilter( QObject* o, QEvent* e ) Q_DECL_OVERRIDE;
private:
......
......@@ -53,13 +53,13 @@ namespace Oxygen
//@{
//* return data for a given index
virtual QVariant data(const QModelIndex &index, int role) const;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
//* header data
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
//* number of columns for a given index
virtual int columnCount(const QModelIndex& ) const
int columnCount(const QModelIndex& ) const Q_DECL_OVERRIDE
{ return nColumns; }
//@}
......@@ -67,7 +67,7 @@ namespace Oxygen
protected:
//* sort
virtual void privateSort( int, Qt::SortOrder )
void privateSort( int, Qt::SortOrder ) Q_DECL_OVERRIDE
{}
private:
......
......@@ -55,7 +55,7 @@ namespace Oxygen
{ sort( sortColumn(), sortOrder() ); }
//* sort
virtual void sort( int column, Qt::SortOrder order = Qt::AscendingOrder );
void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ) Q_DECL_OVERRIDE;
//* current sorting column
const int& sortColumn( void ) const
......
......@@ -44,7 +44,7 @@ namespace Oxygen
{}
//* reset all caches
virtual void invalidateCaches();
void invalidateCaches() Q_DECL_OVERRIDE;
//* windeco buttons
virtual QPixmap windecoButton(const QColor &color, const QColor& glow, bool sunken, int size = 21);
......
......@@ -71,7 +71,7 @@ namespace Oxygen
virtual bool registerWidget( QObject* );
//* duration
virtual void setDuration( int );
void setDuration( int ) Q_DECL_OVERRIDE;
//* set object as animated
virtual void setAnimated( const QObject*, bool );
......@@ -84,7 +84,7 @@ namespace Oxygen
public Q_SLOTS:
//* remove widget from map
virtual bool unregisterWidget( QObject* );
bool unregisterWidget( QObject* ) Q_DECL_OVERRIDE;
protected:
......
......@@ -69,7 +69,7 @@ namespace Oxygen
{ return orientation == Qt::Vertical ? verticalOpacity():horizontalOpacity(); }
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{
horizontalAnimation().data()->setDuration( duration );
verticalAnimation().data()->setDuration( duration );
......
......@@ -81,14 +81,14 @@ namespace Oxygen
}
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int value )
void setDuration( int value ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -97,7 +97,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -50,7 +50,7 @@ namespace Oxygen
{}
//! event filter
virtual bool eventFilter( QObject*, QEvent* );
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
};
......
......@@ -59,7 +59,7 @@ namespace Oxygen
{ return _animation; }
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{ _animation.data()->setDuration( duration ); }
//! opacity
......
......@@ -53,7 +53,7 @@ namespace Oxygen
{}
//! duration
void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{
currentIndexAnimation().data()->setDuration( duration );
previousIndexAnimation().data()->setDuration( duration );
......@@ -131,7 +131,7 @@ namespace Oxygen
protected:
//! dirty
virtual void setDirty( void ) const;
void setDirty( void ) const Q_DECL_OVERRIDE;
private:
......
......@@ -70,14 +70,14 @@ namespace Oxygen
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity( point ) : AnimationData::OpacityInvalid; }
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int value )
void setDuration( int value ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -86,7 +86,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -73,7 +73,7 @@ namespace Oxygen
}
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{
currentAnimation().data()->setDuration( duration );
previousAnimation().data()->setDuration( duration );
......
......@@ -83,14 +83,14 @@ namespace Oxygen
}
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int value )
void setDuration( int value ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -100,7 +100,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -85,7 +85,7 @@ namespace Oxygen
{}
//! event filter
virtual bool eventFilter( QObject*, QEvent* );
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
//! animations
virtual const Animation::Pointer& currentAnimation( void ) const
......@@ -132,7 +132,7 @@ namespace Oxygen
{ return index == Current ? currentRect():previousRect(); }
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{
currentAnimation().data()->setDuration( duration );
previousAnimation().data()->setDuration( duration );
......@@ -290,7 +290,7 @@ namespace Oxygen
{}
//! event filter
virtual bool eventFilter( QObject*, QEvent* );
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
//! return animation associated to action at given position, if any
virtual const Animation::Pointer& animation( void ) const
......@@ -301,7 +301,7 @@ namespace Oxygen
{ return _progressAnimation; }
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{ animation().data()->setDuration( duration ); }
//! duration
......@@ -359,7 +359,7 @@ namespace Oxygen
virtual void updateAnimatedRect( void );
//! timer event
virtual void timerEvent( QTimerEvent* );
void timerEvent( QTimerEvent* ) Q_DECL_OVERRIDE;
//!@name current action handling
//@{
......
......@@ -75,10 +75,10 @@ namespace Oxygen
{ return false; }
//! enability
virtual void setEnabled( bool ) = 0;
void setEnabled( bool ) Q_DECL_OVERRIDE = 0;
//! duration
virtual void setDuration( int ) = 0;
void setDuration( int ) Q_DECL_OVERRIDE = 0;
//! duration
virtual void setFollowMouseDuration( int )
......@@ -107,40 +107,40 @@ namespace Oxygen
{}
//! register menubar
virtual bool registerWidget( QWidget* );
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
//! true if widget is animated
virtual bool isAnimated( const QObject* object, const QPoint& point );
bool isAnimated( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE;
//! animation opacity
virtual qreal opacity( const QObject* object, const QPoint& point )
qreal opacity( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity( point ): AnimationData::OpacityInvalid; }
//! return 'hover' rect position when widget is animated
virtual QRect currentRect( const QObject* object, const QPoint& point)
QRect currentRect( const QObject* object, const QPoint& point) Q_DECL_OVERRIDE
{ return isAnimated( object, point ) ? _data.find( object ).data()->currentRect( point ): QRect(); }
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( duration );
_data.setDuration( duration );
}
//! return list of registered widgets
virtual WidgetList registeredWidgets( void ) const;
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
public Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......@@ -171,34 +171,34 @@ namespace Oxygen
{}
//! register menubar
virtual bool registerWidget( QWidget* );
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
//! true if widget is animated
virtual bool isAnimated( const QObject* object, const QPoint& point );
bool isAnimated( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE;
//! animation opacity
virtual qreal opacity( const QObject* object, const QPoint& point )
qreal opacity( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity(): AnimationData::OpacityInvalid; }
//! return 'hover' rect position when widget is animated
virtual QRect currentRect( const QObject*, const QPoint& );
QRect currentRect( const QObject*, const QPoint& ) Q_DECL_OVERRIDE;
//! return 'hover' rect position when widget is animated
virtual QRect animatedRect( const QObject* );
QRect animatedRect( const QObject* ) Q_DECL_OVERRIDE;
//! timer associated to the data
virtual bool isTimerActive( const QObject* );
bool isTimerActive( const QObject* ) Q_DECL_OVERRIDE;
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int value )
void setDuration( int value ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -209,7 +209,7 @@ namespace Oxygen
{ return _followMouseDuration; }
//! duration
virtual void setFollowMouseDuration( int duration )
void setFollowMouseDuration( int duration ) Q_DECL_OVERRIDE
{
_followMouseDuration = duration;
foreach( const DataMap<MenuBarDataV2>::Value& value, _data )
......@@ -217,12 +217,12 @@ namespace Oxygen
}
//! return list of registered widgets
virtual WidgetList registeredWidgets( void ) const;
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
protected Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -57,19 +57,19 @@ namespace Oxygen
protected:
//! menubar enterEvent
virtual void enterEvent( const QObject* object )
void enterEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV1::enterEvent<QMenu>( object ); }
//! menubar enterEvent
virtual void leaveEvent( const QObject* object )
void leaveEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV1::leaveEvent<QMenu>( object ); }
//! menubar mouseMoveEvent
virtual void mouseMoveEvent( const QObject* object )
void mouseMoveEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV1::mouseMoveEvent<QMenu>( object ); }
//! menubar mousePressEvent
virtual void mousePressEvent( const QObject* object )
void mousePressEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV1::mousePressEvent<QMenu>( object ); }
};
......@@ -97,15 +97,15 @@ namespace Oxygen
protected:
//! menubar enterEvent
virtual void enterEvent( const QObject* object )
void enterEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV2::enterEvent<QMenu>( object ); }
//! menubar enterEvent
virtual void leaveEvent( const QObject* object )
void leaveEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV2::leaveEvent<QMenu>( object ); }
//! menubar mouseMoveEvent
virtual void mouseMoveEvent( const QObject* object )
void mouseMoveEvent( const QObject* object ) Q_DECL_OVERRIDE
{ MenuBarDataV2::mouseMoveEvent<QMenu>( object ); }
};
......
......@@ -74,10 +74,10 @@ namespace Oxygen
{ return false; }
//! enability
virtual void setEnabled( bool value ) = 0;
void setEnabled( bool value ) Q_DECL_OVERRIDE = 0;
//! duration
virtual void setDuration( int ) = 0;
void setDuration( int ) Q_DECL_OVERRIDE = 0;
//! duration
virtual void setFollowMouseDuration( int )
......@@ -105,46 +105,46 @@ namespace Oxygen
{}
//! register menubar
virtual bool registerWidget( QWidget* );
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
//! true if widget is animated
virtual bool isAnimated( const QObject* object, WidgetIndex index );
bool isAnimated( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE;
//! animation opacity
virtual qreal opacity( const QObject* object, WidgetIndex index )
qreal opacity( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE
{
if( !isAnimated( object, index ) ) return AnimationData::OpacityInvalid;
else return _data.find(object).data()->opacity( index );
}
//! return 'hover' rect position when widget is animated
virtual QRect currentRect( const QObject* object, WidgetIndex index )
QRect currentRect( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE
{
if( !isAnimated( object, index ) ) return QRect();
else return _data.find(object).data()->currentRect( index );
}
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int duration )
void setDuration( int duration ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( duration );
_data.setDuration( duration );
}
//! return list of registered widgets
virtual WidgetList registeredWidgets( void ) const;
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
public Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......@@ -175,36 +175,36 @@ namespace Oxygen
MenuEngineV2( QObject* parent, MenuBaseEngine* other );
//! register menu
virtual bool registerWidget( QWidget* );
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
//! return timeLine associated to action at given position, if any
virtual bool isAnimated( const QObject*, WidgetIndex );
bool isAnimated( const QObject*, WidgetIndex ) Q_DECL_OVERRIDE;
//! animation opacity
virtual qreal opacity( const QObject* object, WidgetIndex index )
qreal opacity( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE
{
if( !isAnimated( object, index ) ) return AnimationData::OpacityInvalid;
else return _data.find(object).data()->opacity();
}
//! return 'hover' rect position when widget is animated
virtual QRect currentRect( const QObject* object, WidgetIndex index );
QRect currentRect( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE;
//! return 'hover' rect position when widget is animated
virtual QRect animatedRect( const QObject* );
QRect animatedRect( const QObject* ) Q_DECL_OVERRIDE;
//! timer associated to the data
virtual bool isTimerActive( const QObject* );
bool isTimerActive( const QObject* ) Q_DECL_OVERRIDE;
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int value )
void setDuration( int value ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -215,7 +215,7 @@ namespace Oxygen
{ return _followMouseDuration; }
//! duration
virtual void setFollowMouseDuration( int duration )
void setFollowMouseDuration( int duration ) Q_DECL_OVERRIDE
{
_followMouseDuration = duration;
foreach( const DataMap<MenuDataV2>::Value& value, _data )
......@@ -223,12 +223,12 @@ namespace Oxygen
}
//! return list of registered widgets
virtual WidgetList registeredWidgets( void ) const;
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
protected Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -51,7 +51,7 @@ namespace Oxygen
{}
//! event filter
virtual bool eventFilter( QObject*, QEvent* );
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
//! progressbar value (during animation)
virtual int value( void ) const
......
......@@ -64,14 +64,14 @@ namespace Oxygen
{ return isAnimated( object ) ? data( object ).data()->value():0 ; }
//! enability
virtual void setEnabled( bool value )
void setEnabled( bool value ) Q_DECL_OVERRIDE
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
virtual void setDuration( int value )
void setDuration( int value ) Q_DECL_OVERRIDE
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -80,7 +80,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
virtual bool unregisterWidget( QObject* object )
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
{ return _data.unregisterWidget( object ); }
protected:
......