Commit 212bf2e8 authored by Uwe L. Korn's avatar Uwe L. Korn Committed by Tristan Matthews

qt4: Replace redundant virtual with Q_DECL_OVERRIDE

Declaring a virtual function in a subclass as virtual may be a good
documentation that we are overriding a method from the superclass but
has no effect during compilation. With C++11, we can use the override
keyword for this (which will even trigger a compiler error if we try to
override a non-virtual function).

To stay backwards-compatible, we use Qt5's Q_DECL_OVERRIDE macro to
support C++ <11.
Signed-off-by: default avatarTristan Matthews <le.businessman@gmail.com>
parent 6aaf1e0c
......@@ -25,6 +25,8 @@
# include <config.h>
#endif
#include "qt4.hpp"
#include <QObject>
#include <vlc_common.h>
......@@ -47,7 +49,7 @@ class QVLCPointer : public QVLCVariable
{
Q_OBJECT
private:
virtual void trigger (vlc_value_t, vlc_value_t);
void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCPointer (vlc_object_t *, const char *, bool inherit = false);
......@@ -62,7 +64,7 @@ class QVLCInteger : public QVLCVariable
{
Q_OBJECT
private:
virtual void trigger (vlc_value_t, vlc_value_t);
void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCInteger (vlc_object_t *, const char *, bool inherit = false);
......@@ -77,7 +79,7 @@ class QVLCBool : public QVLCVariable
{
Q_OBJECT
private:
virtual void trigger (vlc_value_t, vlc_value_t);
void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCBool (vlc_object_t *, const char *, bool inherit = false);
......@@ -92,7 +94,7 @@ class QVLCFloat : public QVLCVariable
{
Q_OBJECT
private:
virtual void trigger (vlc_value_t, vlc_value_t);
void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCFloat (vlc_object_t *, const char *, bool inherit = false);
......@@ -107,7 +109,7 @@ class QVLCString : public QVLCVariable
{
Q_OBJECT
private:
virtual void trigger (vlc_value_t, vlc_value_t);
void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCString (vlc_object_t *, const char *, bool inherit = false);
......
......@@ -275,14 +275,14 @@ public slots:
protected:
friend class MainInterface;
virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseReleaseEvent( QMouseEvent *event );
virtual void enterEvent( QEvent *event );
virtual void leaveEvent( QEvent *event );
virtual void keyPressEvent( QKeyEvent *event );
virtual void customEvent( QEvent *event );
void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mouseReleaseEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void enterEvent( QEvent *event ) Q_DECL_OVERRIDE;
void leaveEvent( QEvent *event ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
void customEvent( QEvent *event ) Q_DECL_OVERRIDE;
private slots:
void showFSC();
......
......@@ -102,7 +102,7 @@ public:
void setMuted( bool );
protected:
virtual bool eventFilter( QObject *obj, QEvent *e );
bool eventFilter( QObject *obj, QEvent *e ) Q_DECL_OVERRIDE;
private:
intf_thread_t *p_intf;
......
......@@ -23,6 +23,8 @@
#ifndef EPGCHANNELS_HPP
#define EPGCHANNELS_HPP
#include "qt4.hpp"
#include <QWidget>
class EPGView;
......@@ -39,7 +41,7 @@ public slots:
void removeChannel( QString );
protected:
virtual void paintEvent( QPaintEvent *event );
void paintEvent( QPaintEvent *event ) Q_DECL_OVERRIDE;
private:
EPGView *m_epgView;
......
......@@ -40,8 +40,8 @@ class EPGItem : public QGraphicsItem
public:
EPGItem( vlc_epg_event_t *data, EPGView *view );
virtual QRectF boundingRect() const;
virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
QRectF boundingRect() const Q_DECL_OVERRIDE;
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 ) Q_DECL_OVERRIDE;
const QDateTime& start() const;
QDateTime end() const;
......@@ -60,9 +60,9 @@ public:
bool playsAt( const QDateTime & ) const;
protected:
virtual void focusInEvent( QFocusEvent * event );
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * );
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * );
void focusInEvent( QFocusEvent * event ) Q_DECL_OVERRIDE;
void hoverEnterEvent ( QGraphicsSceneHoverEvent * ) Q_DECL_OVERRIDE;
void hoverLeaveEvent ( QGraphicsSceneHoverEvent * ) Q_DECL_OVERRIDE;
private:
EPGView *m_view;
......
......@@ -24,6 +24,8 @@
#ifndef EPGRULER_H
#define EPGRULER_H
#include "qt4.hpp"
#include <QWidget>
#include <QDateTime>
......@@ -42,7 +44,7 @@ public slots:
void setOffset( int offset );
protected:
virtual void paintEvent( QPaintEvent *event );
void paintEvent( QPaintEvent *event ) Q_DECL_OVERRIDE;
private:
qreal m_scale;
......
......@@ -31,6 +31,7 @@
#include <vlc_common.h>
#include "qt4.hpp"
#include "ui/equalizer.h"
#include "ui/video_effects.h"
......@@ -71,7 +72,7 @@ class ExtV4l2 : public QWidget
public:
ExtV4l2( intf_thread_t *, QWidget * );
virtual void showEvent( QShowEvent *event );
void showEvent( QShowEvent *event ) Q_DECL_OVERRIDE;
private:
intf_thread_t *p_intf;
......@@ -156,13 +157,13 @@ public:
const slider_data_t *p_data, int index );
protected:
virtual float initialValue();
float initialValue() Q_DECL_OVERRIDE;
int index;
QStringList getBandsFromAout() const;
public slots:
virtual void onValueChanged( int i ) const;
virtual void writeToConfig() const;
void onValueChanged( int i ) const Q_DECL_OVERRIDE;
void writeToConfig() const Q_DECL_OVERRIDE;
};
class Equalizer: public AudioFilterControlWidget
......@@ -173,10 +174,10 @@ public:
Equalizer( intf_thread_t *, QWidget * );
protected:
virtual void build();
void build() Q_DECL_OVERRIDE;
protected slots:
virtual void setSaveToConfig( bool );
void setSaveToConfig( bool ) Q_DECL_OVERRIDE;
private:
FilterSliderData *preamp;
......
......@@ -30,6 +30,8 @@
# include "config.h"
#endif
#include "qt4.hpp"
#include <vlc_common.h>
#include <QWidget>
......@@ -113,7 +115,7 @@ class InputStatsPanel: public QWidget
public:
InputStatsPanel( QWidget * );
protected:
virtual void hideEvent( QHideEvent * );
void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
private:
QTreeWidget *StatsTree;
QTreeWidgetItem *input;
......
......@@ -64,7 +64,7 @@ public:
void sync( void );
protected:
virtual QPaintEngine *paintEngine() const
QPaintEngine *paintEngine() const Q_DECL_OVERRIDE
{
return NULL;
}
......@@ -95,10 +95,10 @@ private:
bool b_expandPixmap;
bool b_withart;
QPropertyAnimation *fadeAnimation;
virtual void contextMenuEvent( QContextMenuEvent *event );
void contextMenuEvent( QContextMenuEvent *event ) Q_DECL_OVERRIDE;
protected:
void paintEvent( QPaintEvent *e );
virtual void showEvent( QShowEvent * e );
void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
void showEvent( QShowEvent * e ) Q_DECL_OVERRIDE;
static const int MARGIN = 5;
QString defaultArt;
public slots:
......@@ -118,10 +118,10 @@ public slots:
void animate();
protected:
void paintEvent( QPaintEvent *e );
void showEvent( QShowEvent *e );
void hideEvent( QHideEvent * );
void resizeEvent( QResizeEvent * );
void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
void showEvent( QShowEvent *e ) Q_DECL_OVERRIDE;
void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
void resizeEvent( QResizeEvent * ) Q_DECL_OVERRIDE;
private slots:
void spawnFlakes();
......@@ -161,7 +161,7 @@ class ClickableQLabel : public QLabel
{
Q_OBJECT
public:
virtual void mouseDoubleClickEvent( QMouseEvent *event )
void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
Q_UNUSED( event );
emit doubleClicked();
......@@ -183,13 +183,13 @@ public:
TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType = TimeLabel::Both );
protected:
virtual void mousePressEvent( QMouseEvent *event )
void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
if( displayType == TimeLabel::Elapsed ) return;
toggleTimeDisplay();
event->accept();
}
virtual void mouseDoubleClickEvent( QMouseEvent *event )
void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
if( displayType != TimeLabel::Both ) return;
event->accept();
......@@ -218,7 +218,7 @@ public:
virtual ~SpeedLabel();
protected:
virtual void mousePressEvent ( QMouseEvent * event )
void mousePressEvent ( QMouseEvent * event ) Q_DECL_OVERRIDE
{
showSpeedMenu( event->pos() );
}
......@@ -263,7 +263,7 @@ public:
virtual ~CoverArtLabel();
protected:
virtual void mouseDoubleClickEvent( QMouseEvent *event )
void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
if( ! p_item && qobject_cast<MetaPanel *>(this->window()) == NULL )
{
......
......@@ -102,7 +102,7 @@ class FileOpenPanel: public OpenPanel
public:
FileOpenPanel( QWidget *, intf_thread_t * );
virtual ~FileOpenPanel();
virtual void clear() ;
void clear() Q_DECL_OVERRIDE;
virtual void accept() ;
protected:
bool eventFilter(QObject *, QEvent *event)
......@@ -115,16 +115,16 @@ protected:
}
return false;
}
virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void dragMoveEvent( QDragMoveEvent * );
virtual void dragLeaveEvent( QDragLeaveEvent * );
void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
void dragMoveEvent( QDragMoveEvent * ) Q_DECL_OVERRIDE;
void dragLeaveEvent( QDragLeaveEvent * ) Q_DECL_OVERRIDE;
private:
Ui::OpenFile ui;
FileOpenBox *dialogBox;
void BuildOldPanel();
public slots:
virtual void updateMRL();
void updateMRL() Q_DECL_OVERRIDE;
private slots:
void browseFileSub();
void browseFile();
......@@ -138,14 +138,14 @@ class NetOpenPanel: public OpenPanel
public:
NetOpenPanel( QWidget *, intf_thread_t * );
virtual ~NetOpenPanel();
virtual void clear() ;
virtual void onFocus();
virtual void onAccept();
void clear() Q_DECL_OVERRIDE;
void onFocus() Q_DECL_OVERRIDE;
void onAccept() Q_DECL_OVERRIDE;
private:
Ui::OpenNetwork ui;
bool b_recentList;
public slots:
virtual void updateMRL();
void updateMRL() Q_DECL_OVERRIDE;
};
class DiscOpenPanel: public OpenPanel
......@@ -162,8 +162,8 @@ class DiscOpenPanel: public OpenPanel
public:
DiscOpenPanel( QWidget *, intf_thread_t * );
virtual ~DiscOpenPanel();
virtual void clear() ;
virtual void accept() ;
void clear() Q_DECL_OVERRIDE;
virtual void accept();
#if defined( _WIN32 ) || defined( __OS2__ )
virtual void onFocus();
#endif
......@@ -172,7 +172,7 @@ private:
char *psz_dvddiscpath, *psz_vcddiscpath, *psz_cddadiscpath;
DiscType m_discType;
public slots:
virtual void updateMRL() ;
void updateMRL() Q_DECL_OVERRIDE;
private slots:
void browseDevice();
void updateButtons() ;
......@@ -186,7 +186,7 @@ class CaptureOpenPanel: public OpenPanel
public:
CaptureOpenPanel( QWidget *, intf_thread_t * );
virtual ~CaptureOpenPanel();
virtual void clear() ;
void clear() Q_DECL_OVERRIDE;
private:
Ui::OpenCapture ui;
bool isInitialized;
......@@ -213,7 +213,7 @@ private:
QDoubleSpinBox *screenFPS;
public slots:
virtual void updateMRL();
void updateMRL() Q_DECL_OVERRIDE;
void initialize();
private slots:
void updateButtons();
......
......@@ -72,9 +72,9 @@ private:
protected:
PlaylistWidget( intf_thread_t *_p_i, QWidget * );
virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void closeEvent( QCloseEvent * );
void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
void closeEvent( QCloseEvent * ) Q_DECL_OVERRIDE;
private slots:
void changeView( const QModelIndex& index );
......@@ -100,10 +100,10 @@ public:
SplitterHandle( Qt::Orientation orientation, QSplitter * parent );
protected:
virtual void paintEvent ( QPaintEvent * );
void paintEvent ( QPaintEvent * ) Q_DECL_OVERRIDE;
private:
virtual QSize sizeHint () const;
QSize sizeHint () const Q_DECL_OVERRIDE;
};
#endif /* __APPLE__ */
......@@ -111,9 +111,9 @@ class LocationButton : public QPushButton
{
public:
LocationButton( const QString &, bool bold, bool arrow, QWidget * parent = NULL );
virtual QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
virtual void paintEvent ( QPaintEvent * event );
void paintEvent ( QPaintEvent * event ) Q_DECL_OVERRIDE;
private:
bool b_arrow;
};
......@@ -128,9 +128,9 @@ public:
LocationBar( VLCModel * );
void setIndex( const QModelIndex & );
void setModel( VLCModel * _model ) { model = _model; };
virtual QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
virtual void resizeEvent ( QResizeEvent * event );
void resizeEvent ( QResizeEvent * event ) Q_DECL_OVERRIDE;
private:
void layOut( const QSize& size );
......
......@@ -73,39 +73,39 @@ public:
/*** QAbstractItemModel subclassing ***/
/* Data structure */
virtual QVariant data( const QModelIndex &index, const int role ) const;
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
virtual QModelIndex index( const int r, const int c, const QModelIndex &parent ) const;
virtual QModelIndex parent( const QModelIndex &index ) const;
QVariant data( const QModelIndex &index, const int role ) const Q_DECL_OVERRIDE;
int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
QModelIndex index( const int r, const int c, const QModelIndex &parent ) const Q_DECL_OVERRIDE;
QModelIndex parent( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/* Drag and Drop */
virtual Qt::DropActions supportedDropActions() const;
virtual QMimeData* mimeData( const QModelIndexList &indexes ) const;
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &target );
virtual QStringList mimeTypes() const;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
QMimeData* mimeData( const QModelIndexList &indexes ) const Q_DECL_OVERRIDE;
bool dropMimeData( const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &target );
QStringList mimeTypes() const Q_DECL_OVERRIDE;
/* Sort */
virtual void sort( const int column, Qt::SortOrder order = Qt::AscendingOrder );
void sort( const int column, Qt::SortOrder order = Qt::AscendingOrder ) Q_DECL_OVERRIDE;
/*** VLCModelSubInterface subclassing ***/
virtual void rebuild( playlist_item_t * p = NULL );
virtual void doDelete( QModelIndexList selected );
virtual void createNode( QModelIndex index, QString name );
virtual void renameNode( QModelIndex index, QString name );
virtual void removeAll();
void rebuild( playlist_item_t * p = NULL ) Q_DECL_OVERRIDE;
void doDelete( QModelIndexList selected ) Q_DECL_OVERRIDE;
void createNode( QModelIndex index, QString name ) Q_DECL_OVERRIDE;
void renameNode( QModelIndex index, QString name ) Q_DECL_OVERRIDE;
void removeAll();
/* Lookups */
virtual QModelIndex rootIndex() const;
virtual void filter( const QString& search_text, const QModelIndex & root, bool b_recursive );
virtual QModelIndex currentIndex() const;
virtual QModelIndex indexByPLID( const int i_plid, const int c ) const;
virtual QModelIndex indexByInputItemID( const int i_inputitem_id, const int c ) const;
virtual bool isTree() const;
virtual bool canEdit() const;
virtual bool action( QAction *action, const QModelIndexList &indexes );
virtual bool isSupportedAction( actions action, const QModelIndex & ) const;
QModelIndex rootIndex() const Q_DECL_OVERRIDE;
void filter( const QString& search_text, const QModelIndex & root, bool b_recursive ) Q_DECL_OVERRIDE;
QModelIndex currentIndex() const Q_DECL_OVERRIDE;
QModelIndex indexByPLID( const int i_plid, const int c ) const Q_DECL_OVERRIDE;
QModelIndex indexByInputItemID( const int i_inputitem_id, const int c ) const Q_DECL_OVERRIDE;
bool isTree() const Q_DECL_OVERRIDE;
bool canEdit() const Q_DECL_OVERRIDE;
bool action( QAction *action, const QModelIndexList &indexes ) Q_DECL_OVERRIDE;
bool isSupportedAction( actions action, const QModelIndex & ) const Q_DECL_OVERRIDE;
protected:
/* VLCModel subclassing */
......
......@@ -74,7 +74,7 @@ enum ItemAction {
class SelectorActionButton : public QFramelessButton
{
protected:
virtual void paintEvent( QPaintEvent * );
void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;
};
class PLSelItem : public QWidget
......@@ -124,11 +124,11 @@ public:
int getCurrentItemCategory();
protected:
virtual void drawBranches ( QPainter *, const QRect &, const QModelIndex & ) const;
virtual void dragMoveEvent ( QDragMoveEvent * event );
virtual bool dropMimeData ( QTreeWidgetItem *, int, const QMimeData *, Qt::DropAction );
virtual QStringList mimeTypes () const;
virtual void wheelEvent(QWheelEvent *e);
void drawBranches ( QPainter *, const QRect &, const QModelIndex & ) const Q_DECL_OVERRIDE;
void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
bool dropMimeData ( QTreeWidgetItem *, int, const QMimeData *, Qt::DropAction ) Q_DECL_OVERRIDE;
QStringList mimeTypes () const Q_DECL_OVERRIDE;
void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE;
private:
void createItems();
......
......@@ -75,7 +75,7 @@ public:
protected:
VLCModel *model;
virtual void wheelEvent( QWheelEvent *e );
void wheelEvent( QWheelEvent *e ) Q_DECL_OVERRIDE;
bool popup( const QPoint &point );
private:
......
......@@ -52,9 +52,9 @@ class PlIconViewItemDelegate : public AbstractPlViewItemDelegate
public:
PlIconViewItemDelegate(QWidget *parent = 0) : AbstractPlViewItemDelegate( parent ) {}
virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
virtual QSize sizeHint ( const QStyleOptionViewItem & option = QStyleOptionViewItem(),
const QModelIndex & index = QModelIndex() ) const;
void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
QSize sizeHint ( const QStyleOptionViewItem & option = QStyleOptionViewItem(),
const QModelIndex & index = QModelIndex() ) const Q_DECL_OVERRIDE;
};
class PlListViewItemDelegate : public AbstractPlViewItemDelegate
......@@ -64,8 +64,8 @@ class PlListViewItemDelegate : public AbstractPlViewItemDelegate
public:
PlListViewItemDelegate(QWidget *parent = 0) : AbstractPlViewItemDelegate(parent) {}
virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
};
class PlTreeViewItemDelegate : public AbstractPlViewItemDelegate
......@@ -75,7 +75,7 @@ class PlTreeViewItemDelegate : public AbstractPlViewItemDelegate
public:
PlTreeViewItemDelegate(QWidget *parent = 0) : AbstractPlViewItemDelegate(parent) {}
virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
};
class CellPixmapDelegate : public QStyledItemDelegate
......@@ -84,7 +84,7 @@ class CellPixmapDelegate : public QStyledItemDelegate
public:
CellPixmapDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
};
class PlIconView : public QListView
......@@ -94,9 +94,9 @@ class PlIconView : public QListView
public:
PlIconView( QAbstractItemModel *model, QWidget *parent = 0 );
protected:
virtual void startDrag ( Qt::DropActions supportedActions );
virtual void dragMoveEvent ( QDragMoveEvent * event );
virtual bool viewportEvent ( QEvent * );
void startDrag ( Qt::DropActions supportedActions ) Q_DECL_OVERRIDE;
void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
bool viewportEvent ( QEvent * ) Q_DECL_OVERRIDE;
};
class PlListView : public QListView
......@@ -106,10 +106,10 @@ class PlListView : public QListView
public:
PlListView( QAbstractItemModel *model, QWidget *parent = 0 );
protected:
virtual void startDrag ( Qt::DropActions supportedActions );
virtual void dragMoveEvent ( QDragMoveEvent * event );
virtual void keyPressEvent( QKeyEvent *event );
virtual bool viewportEvent ( QEvent * );
void startDrag ( Qt::DropActions supportedActions ) Q_DECL_OVERRIDE;
void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
bool viewportEvent ( QEvent * ) Q_DECL_OVERRIDE;
};
class PlTreeView : public QTreeView
......@@ -119,10 +119,10 @@ class PlTreeView : public QTreeView
public:
PlTreeView( QAbstractItemModel *, QWidget *parent = 0 );
protected:
virtual void startDrag ( Qt::DropActions supportedActions );
virtual void dragMoveEvent ( QDragMoveEvent * event );
virtual void keyPressEvent( QKeyEvent *event );
virtual void setModel( QAbstractItemModel * );
void startDrag ( Qt::DropActions supportedActions ) Q_DECL_OVERRIDE;
void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
void setModel( QAbstractItemModel * ) Q_DECL_OVERRIDE;
};
class PicFlowView : public QAbstractItemView
......@@ -131,19 +131,19 @@ class PicFlowView : public QAbstractItemView
public:
PicFlowView( QAbstractItemModel *model, QWidget *parent = 0 );
virtual QRect visualRect(const QModelIndex&) const;
virtual void scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint);
virtual QModelIndex indexAt(const QPoint&) const;
virtual void setModel(QAbstractItemModel *model);
QRect visualRect(const QModelIndex&) const Q_DECL_OVERRIDE;
void scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint) Q_DECL_OVERRIDE;
QModelIndex indexAt(const QPoint&) const Q_DECL_OVERRIDE;
void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
protected:
virtual int horizontalOffset() const;
virtual int verticalOffset() const;
virtual QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers);
virtual bool isIndexHidden(const QModelIndex&) const;
virtual QRegion visualRegionForSelection(const QItemSelection&) const;
virtual void setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>);
virtual bool viewportEvent ( QEvent * );
int horizontalOffset() const Q_DECL_OVERRIDE;
int verticalOffset() const Q_DECL_OVERRIDE;
QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) Q_DECL_OVERRIDE;
bool isIndexHidden(const QModelIndex&) const Q_DECL_OVERRIDE;
QRegion visualRegionForSelection(const QItemSelection&) const Q_DECL_OVERRIDE;
void setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>) Q_DECL_OVERRIDE;
bool viewportEvent ( QEvent * ) Q_DECL_OVERRIDE;
private:
PictureFlow *picFlow;
......
......@@ -124,14 +124,14 @@ public:
virtual ~VLCModel();
/*** QAbstractItemModel subclassing ***/
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
QVariant headerData( int, Qt::Orientation, int ) const;
int columnCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
QVariant headerData( int, Qt::Orientation, int ) const Q_DECL_OVERRIDE;
/*** VLCModelSubInterface subclassing ***/
virtual int itemId( const QModelIndex &, int type ) const;
virtual QString getURI( const QModelIndex &index ) const;
virtual input_item_t *getInputItem( const QModelIndex & ) const;
virtual QString getTitle( const QModelIndex &index ) const;
int itemId( const QModelIndex &, int type ) const Q_DECL_OVERRIDE;
QString getURI( const QModelIndex &index ) const Q_DECL_OVERRIDE;
input_item_t *getInputItem( const QModelIndex & ) const Q_DECL_OVERRIDE;
QString getTitle( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/* Custom */
static int columnToMeta( int _column );
......@@ -141,7 +141,7 @@ public:
public slots:
/* slots handlers */
virtual void ensureArtRequested( const QModelIndex &index );
void ensureArtRequested( const QModelIndex &index ) Q_DECL_OVERRIDE;
signals:
void currentIndexChanged( const QModelIndex& );
......
......@@ -82,7 +82,7 @@ private:
void loadCapabilities();
void reset();
protected slots:
virtual void close();
void close() Q_DECL_OVERRIDE;
private slots:
void muxSelected();
void codecSelected();
......
......@@ -66,7 +66,7 @@ class FileDestBox: public VirtualDestBox
Q_OBJECT
public:
FileDestBox( QWidget *_parent = NULL, intf_thread_t * = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *fileEdit;
intf_thread_t *p_intf;
......@@ -79,7 +79,7 @@ class HTTPDestBox: public VirtualDestBox
Q_OBJECT
public:
HTTPDestBox( QWidget *_parent = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *HTTPEdit;
QSpinBox *HTTPPort;
......@@ -90,7 +90,7 @@ class MMSHDestBox: public VirtualDestBox
Q_OBJECT
public:
MMSHDestBox( QWidget *_parent = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *MMSHEdit;
QSpinBox *MMSHPort;
......@@ -101,7 +101,7 @@ class RTSPDestBox: public VirtualDestBox
Q_OBJECT
public:
RTSPDestBox( QWidget *_parent = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *RTSPEdit;
QSpinBox *RTSPPort;
......@@ -112,7 +112,7 @@ class UDPDestBox: public VirtualDestBox
Q_OBJECT
public:
UDPDestBox( QWidget *_parent = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *UDPEdit;
QSpinBox *UDPPort;
......@@ -123,7 +123,7 @@ class RTPDestBox: public VirtualDestBox
Q_OBJECT
public:
RTPDestBox( QWidget *_parent = NULL, const char *mux = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *RTPEdit;
QSpinBox *RTPPort;
......@@ -136,7 +136,7 @@ class ICEDestBox: public VirtualDestBox
Q_OBJECT
public:
ICEDestBox( QWidget *_parent = NULL );
virtual QString getMRL( const QString& );
QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *ICEEdit;
QLineEdit *ICEMountEdit;
......
......@@ -50,8 +50,8 @@ private:
VLCProfileSelector *profile;
QString mrl;
private slots:
virtual void close();
virtual void cancel();
void close() Q_DECL_OVERRIDE;
void cancel() Q_DECL_OVERRIDE;
void fileBrowse();
void setDestinationFileExtension();
void validate();
......
......@@ -106,8 +106,8 @@ private:
void DestroyWidget( extension_widget_t *p_widget, bool b_cond = true );
protected:
virtual void closeEvent( QCloseEvent* );
virtual void keyPressEvent( QKeyEvent* );
void closeEvent( QCloseEvent* ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent* ) Q_DECL_OVERRIDE;
private slots:
int TriggerClick( QObject *object );
......
......@@ -37,8 +37,8 @@ private:
virtual ~GotoTimeDialog();
QTimeEdit *timeEdit;
private slots:
void close();
void cancel();
void close() Q_DECL_OVERRIDE;
void cancel() Q_DECL_OVERRIDE;
void reset();
friend class Singleton<GotoTimeDialog>;
......
......@@ -45,7 +45,7 @@ private:
virtual ~HelpDialog();
public slots:
virtual void close() { toggleVisible(); }
void close() Q_DECL_OVERRIDE { toggleVisible(); }
friend class Singleton<HelpDialog>;
};
......@@ -62,7 +62,7 @@ public slots:
protected:
bool eventFilter(QObject *obj, QEvent *event);
virtual void showEvent ( QShowEvent * );
void showEvent ( QShowEvent * ) Q_DECL_OVERRIDE;
private:
bool b_advanced;
......@@ -93,7 +93,7 @@ private:
bool b_checked;
private slots:
virtual void close() { toggleVisible(); }
void close() Q_DECL_OVERRIDE { toggleVisible(); }
void UpdateOrDownload();
......
......@@ -70,7 +70,7 @@ private slots:
void updateAllTabs( input_item_t * );
void clearAllTabs();
virtual void close();
void close() Q_DECL_OVERRIDE;
void saveMeta();
void updateButtons( int i_tab );
......
......@@ -56,7 +56,7 @@ public:
void showEvent( QShowEvent *ev );
public slots:
virtual void close() { play(); };
void close() Q_DECL_OVERRIDE { play(); };
};
......
......@@ -46,7 +46,7 @@ public:
bool hasPlaylistWidget();
protected:
virtual void hideEvent( QHideEvent * );
void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
private:
PlaylistWidget *playlistWidget;
......
......@@ -87,7 +87,7 @@ public:
};
protected:
virtual void keyPressEvent( QKeyEvent *keyEvent );
void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE;
private:
PluginTab( intf_thread_t *p_intf );
......@@ -108,7 +108,7 @@ class ExtensionTab : public QVLCFrame
Q_OBJECT
protected:
virtual void keyPressEvent( QKeyEvent *keyEvent );
void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE;
private:
ExtensionTab( intf_thread_t *p_intf );
......@@ -195,10 +195,10 @@ public:
FilenameRole
};
virtual QVariant data( const QModelIndex& index, int role ) const;
virtual QModelIndex index( int row, int column = 0,
const QModelIndex& = QModelIndex() ) const;
virtual int rowCount( const QModelIndex& = QModelIndex() ) const;
QVariant data( const QModelIndex& index, int role ) const Q_DECL_OVERRIDE;
QModelIndex index( int row, int column = 0,
const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
int rowCount( const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
protected slots:
void updateList();
......@@ -214,12 +214,12 @@ class AddonsListModel: public ExtensionListModel
public:
AddonsListModel( AddonsManager *AM, QObject *parent = 0 );
virtual QVariant data( const QModelIndex& index, int role ) const;
virtual QModelIndex index( int row, int column = 0,
const QModelIndex& = QModelIndex() ) const;
virtual int rowCount( const QModelIndex& = QModelIndex() ) const;
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
virtual bool setData( const QModelIndex &index, const QVariant &value, int role );
QVariant data( const QModelIndex& index, int role ) const Q_DECL_OVERRIDE;
QModelIndex index( int row, int column = 0,
const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
int rowCount( const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
bool setData( const QModelIndex &index, const QVariant &value, int role ) Q_DECL_OVERRIDE;
enum
{
......@@ -268,7 +268,7 @@ public slots:
virtual void setStatusFilter( int );
protected:
virtual bool filterAcceptsRow( int, const QModelIndex & ) const;
bool filterAcceptsRow( int, const QModelIndex & ) const Q_DECL_OVERRIDE;
private:
int i_type_filter;
......@@ -283,13 +283,13 @@ public:
ExtensionItemDelegate( QObject *parent );
virtual ~ExtensionItemDelegate();
virtual void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
virtual QSize sizeHint( const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
virtual void initStyleOption( QStyleOptionViewItem *option,
const QModelIndex &index ) const;
void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const Q_DECL_OVERRIDE;
QSize sizeHint( const QStyleOptionViewItem &option,
const QModelIndex &index ) const Q_DECL_OVERRIDE;
void initStyleOption( QStyleOptionViewItem *option,
const QModelIndex &index ) const Q_DECL_OVERRIDE;
protected:
QMargins margins;
......@@ -304,15 +304,15 @@ public:
AddonItemDelegate( QObject *parent );
~AddonItemDelegate();
virtual void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
virtual QSize sizeHint( const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const Q_DECL_OVERRIDE;
QSize sizeHint( const QStyleOptionViewItem &option,
const QModelIndex &index ) const Q_DECL_OVERRIDE;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setAnimator( DelegateAnimationHelper *animator );
......
......@@ -59,8 +59,8 @@ public slots:
void setBarsTopPosition( int b );
protected:
virtual void paintEvent(QPaintEvent *);
virtual bool eventFilter(QObject *obj, QEvent *event);
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
private:
QWidget * bars[3];
......@@ -73,7 +73,7 @@ class WidgetListing : public QListWidget
public:
WidgetListing( intf_thread_t *, QWidget *_parent = 0 );
protected:
virtual void startDrag( Qt::DropActions /*supportedActions*/ );
void startDrag( Qt::DropActions /*supportedActions*/ ) Q_DECL_OVERRIDE;
private:
ToolbarEditDialog *parent;
};
......@@ -114,16 +114,16 @@ public:
void resetLine( const QString& );
protected:
virtual void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
buttonType_e i_type, int i_option );
virtual void dragEnterEvent ( QDragEnterEvent * event );
virtual void dragMoveEvent(QDragMoveEvent *event);
virtual void dropEvent ( QDropEvent * event );
virtual void dragLeaveEvent ( QDragLeaveEvent * event );
void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
buttonType_e i_type, int i_option ) Q_DECL_OVERRIDE;
void dragEnterEvent ( QDragEnterEvent * event ) Q_DECL_OVERRIDE;
void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
void dropEvent ( QDropEvent * event ) Q_DECL_OVERRIDE;
void dragLeaveEvent ( QDragLeaveEvent * event ) Q_DECL_OVERRIDE;
virtual void doAction( int );
virtual bool eventFilter( QObject *, QEvent * );
bool eventFilter( QObject *, QEvent * ) Q_DECL_OVERRIDE;
private:
struct doubleInt
......
......@@ -187,7 +187,7 @@ public:
VLMBroadcast( const QString& name, const QString& input,
const QString& inputOptions, const QString& output,
bool _enable, bool _loop, VLMDialog *parent );
void update();
void update() Q_DECL_OVERRIDE;
private:
bool b_looped;
bool b_playing;
......
......@@ -96,15 +96,15 @@ protected:
#ifdef _WIN32
virtual bool winEvent( MSG *, long * );
#endif
virtual void changeEvent( QEvent * );
virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void dragMoveEvent( QDragMoveEvent * );
virtual void dragLeaveEvent( QDragLeaveEvent * );
virtual void closeEvent( QCloseEvent *);
virtual void keyPressEvent( QKeyEvent *);
virtual void wheelEvent( QWheelEvent * );
virtual bool eventFilter(QObject *, QEvent *);
void changeEvent( QEvent * ) Q_DECL_OVERRIDE;
void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
void dragMoveEvent( QDragMoveEvent * ) Q_DECL_OVERRIDE;
void dragLeaveEvent( QDragLeaveEvent * ) Q_DECL_OVERRIDE;
void closeEvent( QCloseEvent *) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent *) Q_DECL_OVERRIDE;
void wheelEvent( QWheelEvent * ) Q_DECL_OVERRIDE;
bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE;
private:
/* Main Widgets Creation */
......
......@@ -23,6 +23,8 @@
#ifndef SEEKSTYLE_HPP
#define SEEKSTYLE_HPP
#include "qt4.hpp"
#include <inttypes.h>
#include <QProxyStyle>
#include <QStyleOptionSlider>
......@@ -44,8 +46,8 @@ public:
public:
SeekStyle();
virtual int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const;
virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const;
int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const Q_DECL_OVERRIDE;
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const Q_DECL_OVERRIDE;
};
#endif // SEEKSTYLE_HPP
......@@ -21,6 +21,8 @@
#ifndef ANIMATORS_HPP
#define ANIMATORS_HPP
#include "qt4.hpp"
#include <QObject>
#include <QList>
#include <QString>
......@@ -38,13 +40,13 @@ class BasicAnimator : public QAbstractAnimation
public:
BasicAnimator( QObject *parent = 0 );
void setFps( int _fps ) { fps = _fps; interval = 1000.0 / fps; }
virtual int duration() const { return 1000; }
int duration() const Q_DECL_OVERRIDE { return 1000; }
signals:
void frameChanged();
protected:
virtual void updateCurrentTime ( int msecs );
void updateCurrentTime ( int msecs ) Q_DECL_OVERRIDE;
int fps;
int interval;
int current_frame;
......@@ -62,11 +64,11 @@ class PixmapAnimator : public BasicAnimator
public:
PixmapAnimator( QWidget *parent, QList<QString> _frames );
virtual int duration() const { return interval * pixmaps.count(); }
int duration() const Q_DECL_OVERRIDE { return interval * pixmaps.count(); }
virtual ~PixmapAnimator();
QPixmap *getPixmap() { return currentPixmap; }
protected:
virtual void updateCurrentTime ( int msecs );
void updateCurrentTime ( int msecs ) Q_DECL_OVERRIDE;
QList<QPixmap *> pixmaps;
QPixmap *currentPixmap;
signals:
......
......@@ -38,6 +38,7 @@
#include <QDial>
#include "animators.hpp"
#include "qt4.hpp"
class QPixmap;
class QWidget;
......@@ -47,9 +48,9 @@ class QFramelessButton : public QPushButton
Q_OBJECT
public:
QFramelessButton( QWidget *parent = NULL );
virtual QSize sizeHint() const { return iconSize(); }
QSize sizeHint() const Q_DECL_OVERRIDE { return iconSize(); }
protected:
virtual void paintEvent( QPaintEvent * event );
void paintEvent( QPaintEvent * event ) Q_DECL_OVERRIDE;
};
class VLCQDial : public QDial
......@@ -58,7 +59,7 @@ class VLCQDial : public QDial
public:
VLCQDial( QWidget *parent = NULL );
protected:
virtual void paintEvent( QPaintEvent * event );
void paintEvent( QPaintEvent * event ) Q_DECL_OVERRIDE;
};
class QToolButtonExt : public QToolButton
......@@ -85,7 +86,7 @@ public:
QWidget * parent = NULL );
void setElideMode( Qt::TextElideMode );
protected:
virtual void paintEvent( QPaintEvent * event );
void paintEvent( QPaintEvent * event ) Q_DECL_OVERRIDE;
private:
Qt::TextElideMode elideMode;
};
......@@ -107,9 +108,9 @@ class QVLCDebugLevelSpinBox : public QSpinBox
public:
QVLCDebugLevelSpinBox( QWidget *parent ) : QSpinBox( parent ) { };
protected:
virtual QString textFromValue( int ) const;
QString textFromValue( int ) const Q_DECL_OVERRIDE;
/* QVLCDebugLevelSpinBox is read-only */
virtual int valueFromText( const QString& ) const { return -1; }
int valueFromText( const QString& ) const Q_DECL_OVERRIDE { return -1; }
};
/** This spinning icon, to the colors of the VLC cone, will show
......
......@@ -59,18 +59,18 @@ public:
void setChapters( SeekPoints * );
protected:
virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent* event );
virtual void mouseReleaseEvent( QMouseEvent *event );
virtual void wheelEvent( QWheelEvent *event );
virtual void enterEvent( QEvent * );
virtual void leaveEvent( QEvent * );
virtual void hideEvent( QHideEvent * );
virtual void paintEvent(QPaintEvent *ev);
void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mousePressEvent( QMouseEvent* event ) Q_DECL_OVERRIDE;
void mouseReleaseEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void wheelEvent( QWheelEvent *event ) Q_DECL_OVERRIDE;
void enterEvent( QEvent * ) Q_DECL_OVERRIDE;
void leaveEvent( QEvent * ) Q_DECL_OVERRIDE;
void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *ev) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject *obj, QEvent *event );
bool eventFilter( QObject *obj, QEvent *event ) Q_DECL_OVERRIDE;
virtual QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
void processReleasedButton();
qreal handleOpacity() const;
......@@ -137,11 +137,11 @@ protected:
const static int paddingL = 3;
const static int paddingR = 2;
virtual void paintEvent( QPaintEvent *);
virtual void wheelEvent( QWheelEvent *event );
virtual void mousePressEvent( QMouseEvent * );
virtual void mouseMoveEvent( QMouseEvent * );
virtual void mouseReleaseEvent( QMouseEvent * );
void paintEvent( QPaintEvent *) Q_DECL_OVERRIDE;
void wheelEvent( QWheelEvent *event ) Q_DECL_OVERRIDE;
void mousePressEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
void mouseMoveEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
void mouseReleaseEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
void processReleasedButton();
......
......@@ -315,8 +315,8 @@ public:
PictureFlowSoftwareRenderer();
~PictureFlowSoftwareRenderer();
virtual void init();
virtual void paint();
void init() Q_DECL_OVERRIDE;
void paint() Q_DECL_OVERRIDE;
private:
QSize size;
......
......@@ -133,7 +133,7 @@ protected:
{
hide();
}
virtual void keyPressEvent( QKeyEvent *keyEvent )
void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE
{
if( keyEvent->key() == Qt::Key_Escape )
{
......@@ -171,7 +171,7 @@ protected:
{
hide();
}
virtual void keyPressEvent( QKeyEvent *keyEvent )
void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE
{
if( keyEvent->key() == Qt::Key_Escape )
{
......
......@@ -58,14 +58,14 @@ class ClickLineEdit : public QLineEdit
Q_PROPERTY( QString clickMessage READ placeholderText WRITE setPlaceholderText )
public:
ClickLineEdit( const QString &msg, QWidget *parent );
void setPlaceholderText( const QString &msg );
const QString& placeholderText() const { return mClickMessage; }
virtual void setText( const QString& txt );
void setPlaceholderText( const QString &msg ) Q_DECL_OVERRIDE;
const QString& placeholderText() const Q_DECLARE_OVERRIDE { return mClickMessage; }
void setText( const QString& txt ) Q_DECLARE_OVERRIDE;
protected:
virtual void paintEvent( QPaintEvent *e );
virtual void dropEvent( QDropEvent *ev );
virtual void focusInEvent( QFocusEvent *ev );
virtual void focusOutEvent( QFocusEvent *ev );
void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
void dropEvent( QDropEvent *ev ) Q_DECL_OVERRIDE;
void focusInEvent( QFocusEvent *ev ) Q_DECL_OVERRIDE;
void focusOutEvent( QFocusEvent *ev ) Q_DECL_OVERRIDE;
private:
QString mClickMessage;
bool mDrawClickMsg;
......@@ -112,7 +112,7 @@ public:
SearchLineEdit(QWidget *parent = 0);
virtual ~SearchLineEdit() {}
virtual QSize sizeHint() const { return QSize(150, 40); }
QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(150, 40); }
public slots:
void clear() {}
......
......@@ -22,6 +22,8 @@
#ifndef TIMETOOLTIP_H
#define TIMETOOLTIP_H
#include "qt4.hpp"
#include <QWidget>
#include <QBitmap>
......@@ -40,7 +42,7 @@ public:
virtual void show();
protected:
virtual void paintEvent( QPaintEvent * );
void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;
private:
void adjustPosition();
......
......@@ -21,6 +21,8 @@
#ifndef VALIDATORS_HPP
#define VALIDATORS_HPP
#include "qt4.hpp"
#include <QValidator>
class UrlValidator : public QValidator
......@@ -28,8 +30,8 @@ class UrlValidator : public QValidator
Q_OBJECT
public:
UrlValidator( QObject *parent ) : QValidator( parent ) { }
virtual QValidator::State validate( QString&, int& ) const;
virtual void fixup ( QString & input ) const;
QValidator::State validate( QString&, int& ) const Q_DECL_OVERRIDE;
void fixup ( QString & input ) const Q_DECL_OVERRIDE;
};
#endif // VALIDATORS_HPP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment