Use override
This commit is contained in:
@@ -46,35 +46,35 @@ class AutoExpandingTreeView : public QTreeView {
|
||||
void SetExpandOnReset(bool v) { expand_on_reset_ = v; }
|
||||
void SetAddOnDoubleClick(bool v) { add_on_double_click_ = v; }
|
||||
|
||||
public slots:
|
||||
public slots:
|
||||
void RecursivelyExpand(const QModelIndex &idx);
|
||||
void UpAndFocus();
|
||||
void DownAndFocus();
|
||||
|
||||
signals:
|
||||
signals:
|
||||
void AddToPlaylistSignal(QMimeData *data);
|
||||
void FocusOnFilterSignal(QKeyEvent *event);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// QAbstractItemView
|
||||
void reset();
|
||||
void reset() override;
|
||||
|
||||
// QWidget
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
virtual bool CanRecursivelyExpand(const QModelIndex &idx) const { Q_UNUSED(idx); return true; }
|
||||
|
||||
private slots:
|
||||
private slots:
|
||||
void ItemExpanded(const QModelIndex &idx);
|
||||
void ItemClicked(const QModelIndex &idx);
|
||||
void ItemDoubleClicked(const QModelIndex &idx);
|
||||
|
||||
private:
|
||||
private:
|
||||
bool RecursivelyExpand(const QModelIndex &idx, int *count);
|
||||
|
||||
private:
|
||||
private:
|
||||
bool auto_open_;
|
||||
bool expand_on_reset_;
|
||||
bool add_on_double_click_;
|
||||
|
||||
@@ -40,14 +40,14 @@ class BusyIndicator : public QWidget {
|
||||
public:
|
||||
explicit BusyIndicator(const QString &text, QWidget *parent = nullptr);
|
||||
explicit BusyIndicator(QWidget *parent = nullptr);
|
||||
~BusyIndicator();
|
||||
~BusyIndicator() override;
|
||||
|
||||
QString text() const;
|
||||
void set_text(const QString &text);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *event);
|
||||
void hideEvent(QHideEvent *event);
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
|
||||
private:
|
||||
void Init(const QString &text);
|
||||
|
||||
@@ -37,7 +37,7 @@ class ClickableLabel : public QLabel {
|
||||
void Clicked();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif // CLICKABLELABEL_H
|
||||
|
||||
@@ -72,7 +72,7 @@ class FancyTabBar: public QTabBar {
|
||||
setMouseTracking(true);
|
||||
}
|
||||
|
||||
QSize sizeHint() const {
|
||||
QSize sizeHint() const override {
|
||||
|
||||
QSize size(QTabBar::sizeHint());
|
||||
|
||||
@@ -93,7 +93,7 @@ class FancyTabBar: public QTabBar {
|
||||
}
|
||||
|
||||
protected:
|
||||
QSize tabSizeHint(int index) const {
|
||||
QSize tabSizeHint(int index) const override {
|
||||
|
||||
FancyTabWidget *tabWidget = qobject_cast<FancyTabWidget*>(parentWidget());
|
||||
QSize size = FancyTabWidget::TabSize_LargeSidebar;
|
||||
@@ -107,13 +107,13 @@ class FancyTabBar: public QTabBar {
|
||||
|
||||
}
|
||||
|
||||
void leaveEvent(QEvent *event) {
|
||||
void leaveEvent(QEvent *event) override {
|
||||
Q_UNUSED(event);
|
||||
mouseHoverTabIndex = -1;
|
||||
update();
|
||||
}
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *event) {
|
||||
void mouseMoveEvent(QMouseEvent *event) override {
|
||||
|
||||
QPoint pos = event->pos();
|
||||
|
||||
@@ -124,7 +124,7 @@ class FancyTabBar: public QTabBar {
|
||||
|
||||
}
|
||||
|
||||
void paintEvent(QPaintEvent *pe) {
|
||||
void paintEvent(QPaintEvent *pe) override {
|
||||
|
||||
FancyTabWidget *tabWidget = qobject_cast<FancyTabWidget*>(parentWidget());
|
||||
|
||||
@@ -309,7 +309,7 @@ class TabData : public QObject {
|
||||
layout->addWidget(widget_view_);
|
||||
page_->setLayout(layout);
|
||||
}
|
||||
~TabData() {
|
||||
~TabData() override {
|
||||
//delete page_;
|
||||
}
|
||||
|
||||
@@ -330,8 +330,6 @@ class TabData : public QObject {
|
||||
|
||||
};
|
||||
|
||||
FancyTabWidget::~FancyTabWidget() {}
|
||||
|
||||
// Spacers are just disabled pages
|
||||
void FancyTabWidget::addSpacer() {
|
||||
|
||||
|
||||
@@ -45,70 +45,70 @@ namespace Internal {
|
||||
class FancyTabWidget : public QTabWidget {
|
||||
Q_OBJECT
|
||||
|
||||
~FancyTabWidget();
|
||||
public:
|
||||
explicit FancyTabWidget(QWidget *parent = nullptr);
|
||||
|
||||
public:
|
||||
explicit FancyTabWidget(QWidget *parent = nullptr);
|
||||
void AddTab(QWidget *widget_view, const QString &name, const QIcon &icon, const QString &label);
|
||||
bool EnableTab(QWidget *widget_view);
|
||||
bool DisableTab(QWidget *widget_view);
|
||||
int insertTab(const int idx, QWidget *page, const QIcon &icon, const QString &label);
|
||||
void addBottomWidget(QWidget* widget_view);
|
||||
void AddTab(QWidget *widget_view, const QString &name, const QIcon &icon, const QString &label);
|
||||
bool EnableTab(QWidget *widget_view);
|
||||
bool DisableTab(QWidget *widget_view);
|
||||
int insertTab(const int idx, QWidget *page, const QIcon &icon, const QString &label);
|
||||
void addBottomWidget(QWidget* widget_view);
|
||||
|
||||
void setBackgroundPixmap(const QPixmap& pixmap);
|
||||
void addSpacer();
|
||||
void setBackgroundPixmap(const QPixmap& pixmap);
|
||||
void addSpacer();
|
||||
|
||||
void Load(const QString &kSettingsGroup);
|
||||
void SaveSettings(const QString &kSettingsGroup);
|
||||
void ReloadSettings();
|
||||
void Load(const QString &kSettingsGroup);
|
||||
void SaveSettings(const QString &kSettingsGroup);
|
||||
void ReloadSettings();
|
||||
|
||||
// Values are persisted - only add to the end
|
||||
enum Mode {
|
||||
Mode_None = 0,
|
||||
Mode_LargeSidebar,
|
||||
Mode_SmallSidebar,
|
||||
Mode_Tabs,
|
||||
Mode_IconOnlyTabs,
|
||||
Mode_PlainSidebar,
|
||||
};
|
||||
// Values are persisted - only add to the end
|
||||
enum Mode {
|
||||
Mode_None = 0,
|
||||
Mode_LargeSidebar,
|
||||
Mode_SmallSidebar,
|
||||
Mode_Tabs,
|
||||
Mode_IconOnlyTabs,
|
||||
Mode_PlainSidebar,
|
||||
};
|
||||
|
||||
static const QSize TabSize_LargeSidebar;
|
||||
static const QSize TabSize_LargeSidebar;
|
||||
|
||||
static const QSize IconSize_LargeSidebar;
|
||||
static const QSize IconSize_SmallSidebar;
|
||||
static const QSize IconSize_LargeSidebar;
|
||||
static const QSize IconSize_SmallSidebar;
|
||||
|
||||
Mode mode() { return mode_; }
|
||||
Mode mode() { return mode_; }
|
||||
|
||||
signals:
|
||||
void ModeChanged(FancyTabWidget::Mode mode);
|
||||
void CurrentChanged(int);
|
||||
void ModeChanged(FancyTabWidget::Mode mode);
|
||||
void CurrentChanged(int);
|
||||
|
||||
public slots:
|
||||
void setCurrentIndex(int idx);
|
||||
void SetMode(Mode mode);
|
||||
// Mapper mapped signal needs this convenience function
|
||||
void SetMode(int mode) { SetMode(Mode(mode)); }
|
||||
void setCurrentIndex(int idx);
|
||||
void SetMode(Mode mode);
|
||||
// Mapper mapped signal needs this convenience function
|
||||
void SetMode(int mode) { SetMode(Mode(mode)); }
|
||||
|
||||
private slots:
|
||||
void tabBarUpdateGeometry();
|
||||
void currentTabChanged(int);
|
||||
void tabBarUpdateGeometry();
|
||||
void currentTabChanged(int);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *);
|
||||
void contextMenuEvent(QContextMenuEvent* e);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent* e) override;
|
||||
|
||||
private:
|
||||
void addMenuItem(QActionGroup* group, const QString& text, Mode mode);
|
||||
void addMenuItem(QActionGroup* group, const QString& text, Mode mode);
|
||||
|
||||
QPixmap background_pixmap_;
|
||||
QMenu* menu_;
|
||||
Mode mode_;
|
||||
QWidget *bottom_widget_;
|
||||
QPixmap background_pixmap_;
|
||||
QMenu* menu_;
|
||||
Mode mode_;
|
||||
QWidget *bottom_widget_;
|
||||
|
||||
QMap <QWidget*, TabData*> tabs_;
|
||||
QMap <QWidget*, TabData*> tabs_;
|
||||
|
||||
bool bg_color_system_;
|
||||
bool bg_gradient_;
|
||||
QColor bg_color_;
|
||||
bool bg_color_system_;
|
||||
bool bg_gradient_;
|
||||
QColor bg_color_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ class FavoriteWidget : public QWidget {
|
||||
// Change the value if different from the current one and then update display and emit FavoriteStateChanged signal
|
||||
void SetFavorite(bool favorite);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
signals:
|
||||
void FavoriteStateChanged(int, bool);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
|
||||
private:
|
||||
static const int kStarSize;
|
||||
|
||||
@@ -51,15 +51,16 @@ class FileView : public QWidget {
|
||||
|
||||
public:
|
||||
explicit FileView(QWidget *parent = nullptr);
|
||||
~FileView();
|
||||
~FileView() override;
|
||||
|
||||
static const char *kFileFilter;
|
||||
|
||||
void SetPath(const QString &path);
|
||||
void SetTaskManager(TaskManager *task_manager);
|
||||
|
||||
void showEvent(QShowEvent*);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
protected:
|
||||
void showEvent(QShowEvent*) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
|
||||
signals:
|
||||
void PathChanged(const QString &path);
|
||||
@@ -90,8 +91,8 @@ class FileView : public QWidget {
|
||||
|
||||
QString undo_path() const { return old_state_.path; }
|
||||
|
||||
void undo();
|
||||
void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
struct State {
|
||||
|
||||
@@ -45,7 +45,7 @@ class FileViewList : public QListView {
|
||||
public:
|
||||
explicit FileViewList(QWidget *parent = nullptr);
|
||||
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
|
||||
signals:
|
||||
void AddToPlaylist(QMimeData *data);
|
||||
@@ -58,7 +58,7 @@ class FileViewList : public QListView {
|
||||
void Forward();
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
private slots:
|
||||
void LoadSlot();
|
||||
|
||||
@@ -35,7 +35,7 @@ class ForceScrollPerPixel : public QObject {
|
||||
explicit ForceScrollPerPixel(QAbstractItemView *item_view, QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
private:
|
||||
QAbstractItemView *item_view_;
|
||||
|
||||
@@ -64,10 +64,10 @@ class FreeSpaceBar : public QWidget {
|
||||
void set_additional_text(const QString& text) { additional_text_ = text; update(); }
|
||||
void set_used_text(const QString& text) { used_text_ = text; update(); }
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
|
||||
private:
|
||||
struct Label {
|
||||
|
||||
@@ -78,8 +78,8 @@ class GroupedIconView : public QListView {
|
||||
void set_header_text(const QString &value) { header_text_ = value; }
|
||||
|
||||
// QAbstractItemView
|
||||
QModelIndex moveCursor(CursorAction action, Qt::KeyboardModifiers modifiers);
|
||||
void setModel(QAbstractItemModel *model);
|
||||
QModelIndex moveCursor(CursorAction action, Qt::KeyboardModifiers modifiers) override;
|
||||
void setModel(QAbstractItemModel *model) override;
|
||||
|
||||
static void DrawHeader(QPainter *painter, const QRect &rect, const QFont &font, const QPalette &palette, const QString &text);
|
||||
|
||||
@@ -87,16 +87,16 @@ class GroupedIconView : public QListView {
|
||||
virtual int header_height() const;
|
||||
|
||||
// QWidget
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
||||
// QAbstractItemView
|
||||
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int>& = QVector<int>());
|
||||
QModelIndex indexAt(const QPoint &p) const;
|
||||
void rowsInserted(const QModelIndex &parent, int start, int end);
|
||||
void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command);
|
||||
QRect visualRect(const QModelIndex &index) const;
|
||||
QRegion visualRegionForSelection(const QItemSelection &selection) const;
|
||||
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int>& = QVector<int>()) override;
|
||||
QModelIndex indexAt(const QPoint &p) const override;
|
||||
void rowsInserted(const QModelIndex &parent, int start, int end) override;
|
||||
void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) override;
|
||||
QRect visualRect(const QModelIndex &index) const override;
|
||||
QRegion visualRegionForSelection(const QItemSelection &selection) const override;
|
||||
|
||||
private slots:
|
||||
void LayoutItems();
|
||||
|
||||
@@ -62,13 +62,13 @@ class LineEditInterface {
|
||||
class ExtendedEditor : public LineEditInterface {
|
||||
public:
|
||||
explicit ExtendedEditor(QWidget *widget, int extra_right_padding = 0, bool draw_hint = true);
|
||||
virtual ~ExtendedEditor() {}
|
||||
~ExtendedEditor() override {}
|
||||
|
||||
virtual bool is_empty() const { return text().isEmpty(); }
|
||||
|
||||
QString hint() const { return hint_; }
|
||||
void set_hint(const QString& hint);
|
||||
void clear_hint() { set_hint(QString()); }
|
||||
QString hint() const override { return hint_; }
|
||||
void set_hint(const QString& hint) override;
|
||||
void clear_hint() override { set_hint(QString()); }
|
||||
|
||||
bool has_clear_button() const { return has_clear_button_; }
|
||||
void set_clear_button(bool visible);
|
||||
@@ -111,14 +111,14 @@ class LineEdit : public QLineEdit, public ExtendedEditor {
|
||||
explicit LineEdit(QWidget *parent = nullptr);
|
||||
|
||||
// ExtendedEditor
|
||||
void set_focus() { QLineEdit::setFocus(); }
|
||||
QString text() const { return QLineEdit::text(); }
|
||||
void set_text(const QString& text) { QLineEdit::setText(text); }
|
||||
void set_enabled(bool enabled) { QLineEdit::setEnabled(enabled); }
|
||||
void set_focus() override { QLineEdit::setFocus(); }
|
||||
QString text() const override { return QLineEdit::text(); }
|
||||
void set_text(const QString& text) override { QLineEdit::setText(text); }
|
||||
void set_enabled(bool enabled) override { QLineEdit::setEnabled(enabled); }
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void resizeEvent(QResizeEvent*);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
|
||||
private:
|
||||
bool is_rtl() const { return is_rtl_; }
|
||||
@@ -141,14 +141,14 @@ class TextEdit : public QPlainTextEdit, public ExtendedEditor {
|
||||
explicit TextEdit(QWidget *parent = nullptr);
|
||||
|
||||
// ExtendedEditor
|
||||
void set_focus() { QPlainTextEdit::setFocus(); }
|
||||
QString text() const { return QPlainTextEdit::toPlainText(); }
|
||||
void set_text(const QString& text) { QPlainTextEdit::setPlainText(text); }
|
||||
void set_enabled(bool enabled) { QPlainTextEdit::setEnabled(enabled); }
|
||||
void set_focus() override { QPlainTextEdit::setFocus(); }
|
||||
QString text() const override { return QPlainTextEdit::toPlainText(); }
|
||||
void set_text(const QString& text) override { QPlainTextEdit::setPlainText(text); }
|
||||
void set_enabled(bool enabled) override { QPlainTextEdit::setEnabled(enabled); }
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void resizeEvent(QResizeEvent*);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
|
||||
signals:
|
||||
void Reset();
|
||||
@@ -164,18 +164,18 @@ class SpinBox : public QSpinBox, public ExtendedEditor {
|
||||
explicit SpinBox(QWidget *parent = nullptr);
|
||||
|
||||
// QSpinBox
|
||||
QString textFromValue(int val) const;
|
||||
QString textFromValue(int val) const override;
|
||||
|
||||
// ExtendedEditor
|
||||
bool is_empty() const { return text().isEmpty() || text() == "0"; }
|
||||
void set_focus() { QSpinBox::setFocus(); }
|
||||
QString text() const { return QSpinBox::text(); }
|
||||
void set_text(const QString& text) { QSpinBox::setValue(text.toInt()); }
|
||||
void set_enabled(bool enabled) { QSpinBox::setEnabled(enabled); }
|
||||
bool is_empty() const override { return text().isEmpty() || text() == "0"; }
|
||||
void set_focus() override { QSpinBox::setFocus(); }
|
||||
QString text() const override { return QSpinBox::text(); }
|
||||
void set_text(const QString& text) override { QSpinBox::setValue(text.toInt()); }
|
||||
void set_enabled(bool enabled) override { QSpinBox::setEnabled(enabled); }
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void resizeEvent(QResizeEvent*);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
|
||||
signals:
|
||||
void Reset();
|
||||
|
||||
@@ -37,11 +37,11 @@ class LineTextEdit : public QTextEdit {
|
||||
public:
|
||||
explicit LineTextEdit(QWidget *parent = nullptr);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
};
|
||||
|
||||
#endif // LINETEXTEDIT_H
|
||||
|
||||
@@ -37,7 +37,7 @@ class LoginStateWidget : public QWidget {
|
||||
|
||||
public:
|
||||
explicit LoginStateWidget(QWidget *parent = nullptr);
|
||||
~LoginStateWidget();
|
||||
~LoginStateWidget() override;
|
||||
|
||||
enum State { LoggedIn, LoginInProgress, LoggedOut };
|
||||
|
||||
@@ -49,7 +49,7 @@ class LoginStateWidget : public QWidget {
|
||||
void AddCredentialGroup(QWidget *widget);
|
||||
|
||||
// QObject
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
public slots:
|
||||
// Changes the "You are logged in/out" label, shows/hides any QGroupBoxes added with AddCredentialGroup.
|
||||
|
||||
@@ -45,13 +45,13 @@ class MultiLoadingIndicator : public QWidget {
|
||||
|
||||
void SetTaskManager(TaskManager* task_manager);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
signals:
|
||||
void TaskCountChange(int tasks);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *);
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
|
||||
private slots:
|
||||
void UpdateText();
|
||||
|
||||
@@ -51,7 +51,7 @@ class OSD : public QObject {
|
||||
|
||||
public:
|
||||
explicit OSD(SystemTrayIcon *tray_icon, Application *app, QObject *parent = nullptr);
|
||||
~OSD();
|
||||
~OSD() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class OSDPretty : public QWidget {
|
||||
};
|
||||
|
||||
explicit OSDPretty(Mode mode, QWidget *parent = nullptr);
|
||||
~OSDPretty();
|
||||
~OSDPretty() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -102,7 +102,7 @@ class OSDPretty : public QWidget {
|
||||
QPoint current_pos() const;
|
||||
|
||||
// QWidget
|
||||
void setVisible(bool visible);
|
||||
void setVisible(bool visible) override;
|
||||
|
||||
bool toggle_mode() const { return toggle_mode_; }
|
||||
void set_toggle_mode(bool toggle_mode) { toggle_mode_ = toggle_mode; }
|
||||
@@ -114,13 +114,13 @@ class OSDPretty : public QWidget {
|
||||
void ReloadSettings();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void enterEvent(QEvent *e);
|
||||
void leaveEvent(QEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void showEvent(QShowEvent *e);
|
||||
void mouseMoveEvent(QMouseEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void enterEvent(QEvent *e) override;
|
||||
void leaveEvent(QEvent *e) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void showEvent(QShowEvent *e) override;
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
|
||||
private:
|
||||
void Reposition();
|
||||
|
||||
@@ -125,8 +125,6 @@ PlayingWidget::PlayingWidget(QWidget *parent)
|
||||
|
||||
}
|
||||
|
||||
PlayingWidget::~PlayingWidget() {}
|
||||
|
||||
void PlayingWidget::Init(Application *app, AlbumCoverChoiceController *album_cover_choice_controller) {
|
||||
|
||||
app_ = app;
|
||||
|
||||
@@ -60,7 +60,6 @@ class PlayingWidget : public QWidget {
|
||||
|
||||
public:
|
||||
explicit PlayingWidget(QWidget *parent = nullptr);
|
||||
~PlayingWidget();
|
||||
|
||||
void Init(Application *app, AlbumCoverChoiceController *album_cover_choice_controller);
|
||||
bool IsEnabled() { return enabled_; }
|
||||
@@ -68,7 +67,7 @@ class PlayingWidget : public QWidget {
|
||||
void SetEnabled();
|
||||
void SetDisabled();
|
||||
void set_ideal_height(int height);
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
bool show_above_status_bar() const { return above_statusbar_action_->isChecked(); }
|
||||
|
||||
signals:
|
||||
@@ -82,12 +81,12 @@ class PlayingWidget : public QWidget {
|
||||
void SearchCoverInProgress();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void resizeEvent(QResizeEvent*);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void mouseDoubleClickEvent(QMouseEvent*);
|
||||
void dragEnterEvent(QDragEnterEvent *e);
|
||||
void dropEvent(QDropEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent*) override;
|
||||
void dragEnterEvent(QDragEnterEvent *e) override;
|
||||
void dropEvent(QDropEvent *e) override;
|
||||
|
||||
private slots:
|
||||
void SetMode(int mode);
|
||||
|
||||
@@ -32,8 +32,8 @@ signals:
|
||||
void returnPressed();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent*);
|
||||
bool eventFilter(QObject*, QEvent*);
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
bool eventFilter(QObject*, QEvent*) override;
|
||||
|
||||
private:
|
||||
friend class QSearchFieldPrivate;
|
||||
|
||||
@@ -43,8 +43,8 @@ class RenameTabLineEdit : public QLineEdit {
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
void focusOutEvent(QFocusEvent* e);
|
||||
void keyPressEvent(QKeyEvent* e);
|
||||
void focusOutEvent(QFocusEvent* e) override;
|
||||
void keyPressEvent(QKeyEvent* e) override;
|
||||
};
|
||||
|
||||
#endif // RENAMETABLINEEDIT_H
|
||||
|
||||
@@ -44,7 +44,7 @@ class StickySlider : public QSlider {
|
||||
void set_sticky_threshold(int threshold) { sticky_threshold_ = threshold; }
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QMouseEvent* e);
|
||||
void mouseMoveEvent(QMouseEvent* e) override;
|
||||
|
||||
private:
|
||||
int sticky_center_;
|
||||
|
||||
@@ -46,7 +46,7 @@ class StretchHeaderView : public QHeaderView {
|
||||
static const int kMinimumColumnWidth;
|
||||
static const int kMagicNumber;
|
||||
|
||||
void setModel(QAbstractItemModel *model);
|
||||
void setModel(QAbstractItemModel *model) override;
|
||||
|
||||
// Serialises the proportional and actual column widths.
|
||||
// Use these instead of QHeaderView::restoreState and QHeaderView::saveState to persist the proportional values directly and avoid floating point errors over time.
|
||||
@@ -80,8 +80,8 @@ class StretchHeaderView : public QHeaderView {
|
||||
|
||||
protected:
|
||||
// QWidget
|
||||
void mouseMoveEvent(QMouseEvent *e);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private:
|
||||
// Scales column_widths_ values so the total is 1.0.
|
||||
|
||||
@@ -42,22 +42,21 @@ class TrackSlider : public QWidget {
|
||||
|
||||
public:
|
||||
explicit TrackSlider(QWidget* parent = nullptr);
|
||||
~TrackSlider();
|
||||
~TrackSlider() override;
|
||||
|
||||
void SetApplication(Application* app);
|
||||
|
||||
// QWidget
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
// QObject
|
||||
bool event(QEvent *);
|
||||
bool event(QEvent*) override;
|
||||
|
||||
#ifdef HAVE_MOODBAR
|
||||
MoodbarProxyStyle *moodbar_style() const { return moodbar_style_; }
|
||||
#endif
|
||||
|
||||
|
||||
static const char* kSettingsGroup;
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
public slots:
|
||||
void SetValue(int elapsed, int total);
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
void SetPopupPosition(const QPoint& pos);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
|
||||
private:
|
||||
static const int kTextMargin;
|
||||
|
||||
@@ -41,7 +41,7 @@ class TrackSliderSlider : public QSlider {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TrackSliderSlider(QWidget* parent = nullptr);
|
||||
explicit TrackSliderSlider(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void SeekForward();
|
||||
@@ -50,13 +50,13 @@ class TrackSliderSlider : public QSlider {
|
||||
void Next();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent* e);
|
||||
void mouseReleaseEvent(QMouseEvent* e);
|
||||
void mouseMoveEvent(QMouseEvent* e);
|
||||
void wheelEvent(QWheelEvent *e);
|
||||
void enterEvent(QEvent*);
|
||||
void leaveEvent(QEvent*);
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
void mousePressEvent(QMouseEvent* e) override;
|
||||
void mouseReleaseEvent(QMouseEvent* e) override;
|
||||
void mouseMoveEvent(QMouseEvent* e) override;
|
||||
void wheelEvent(QWheelEvent *e) override;
|
||||
void enterEvent(QEvent*) override;
|
||||
void leaveEvent(QEvent*) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
|
||||
private slots:
|
||||
void UpdateDeltaTime();
|
||||
|
||||
@@ -50,15 +50,15 @@ class SliderSlider : public QSlider {
|
||||
// WARNING non-virtual - and thus only really intended for internal use this is a major flaw in the class presently, however it suits our current needs fine
|
||||
int value() const { return adjustValue(QSlider::value()); }
|
||||
|
||||
signals:
|
||||
signals:
|
||||
// we emit this when the user has specifically changed the slider so connect to it if valueChanged() is too generic Qt also emits valueChanged(int)
|
||||
void sliderReleased(int);
|
||||
|
||||
protected:
|
||||
virtual void wheelEvent(QWheelEvent*);
|
||||
virtual void mouseMoveEvent(QMouseEvent*);
|
||||
virtual void mouseReleaseEvent(QMouseEvent*);
|
||||
virtual void mousePressEvent(QMouseEvent*);
|
||||
void wheelEvent(QWheelEvent*) override;
|
||||
void mouseMoveEvent(QMouseEvent*) override;
|
||||
void mouseReleaseEvent(QMouseEvent*) override;
|
||||
void mousePressEvent(QMouseEvent*) override;
|
||||
virtual void slideEvent(QMouseEvent*);
|
||||
|
||||
bool m_sliding;
|
||||
@@ -89,8 +89,8 @@ class PrettySlider : public SliderSlider {
|
||||
explicit PrettySlider(Qt::Orientation orientation, SliderMode mode, QWidget* parent, uint max = 0);
|
||||
|
||||
protected:
|
||||
virtual void slideEvent(QMouseEvent*);
|
||||
virtual void mousePressEvent(QMouseEvent*);
|
||||
void slideEvent(QMouseEvent*) override;
|
||||
void mousePressEvent(QMouseEvent*) override;
|
||||
|
||||
private:
|
||||
PrettySlider(const PrettySlider&); // undefined
|
||||
@@ -107,14 +107,14 @@ class VolumeSlider : public SliderSlider {
|
||||
void SetEnabled(const bool enabled);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent*);
|
||||
virtual void enterEvent(QEvent*);
|
||||
virtual void leaveEvent(QEvent*);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void enterEvent(QEvent*) override;
|
||||
void leaveEvent(QEvent*) override;
|
||||
virtual void paletteChange(const QPalette&);
|
||||
virtual void slideEvent(QMouseEvent*);
|
||||
virtual void mousePressEvent(QMouseEvent*);
|
||||
virtual void contextMenuEvent(QContextMenuEvent*);
|
||||
virtual void wheelEvent(QWheelEvent* e);
|
||||
void slideEvent(QMouseEvent*) override;
|
||||
void mousePressEvent(QMouseEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent*) override;
|
||||
void wheelEvent(QWheelEvent* e) override;
|
||||
|
||||
private slots:
|
||||
virtual void slotAnimTimer();
|
||||
|
||||
Reference in New Issue
Block a user