diff --git a/ui/drivers/qt/shaderparamsdialog.cpp b/ui/drivers/qt/shaderparamsdialog.cpp index bfbf9bf532..1891efccfa 100644 --- a/ui/drivers/qt/shaderparamsdialog.cpp +++ b/ui/drivers/qt/shaderparamsdialog.cpp @@ -91,6 +91,19 @@ void ShaderParamsDialog::closeEvent(QCloseEvent *event) emit closed(); } +void ShaderParamsDialog::paintEvent(QPaintEvent *event) +{ + QStyleOption o; + QPainter p; + o.initFrom(this); + p.begin(this); + style()->drawPrimitive( + QStyle::PE_Widget, &o, &p, this); + p.end(); + + QDialog::paintEvent(event); +} + QString ShaderParamsDialog::getFilterLabel(unsigned filter) { QString filterString; @@ -1153,16 +1166,3 @@ void ShaderParamsDialog::onShaderParamDoubleSpinBoxValueChanged(double value) } } } - -void ShaderParamsDialog::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QDialog::paintEvent(event); -} diff --git a/ui/drivers/qt/shaderparamsdialog.h b/ui/drivers/qt/shaderparamsdialog.h index 73c6f82423..9e74d20c20 100644 --- a/ui/drivers/qt/shaderparamsdialog.h +++ b/ui/drivers/qt/shaderparamsdialog.h @@ -5,7 +5,6 @@ class QCloseEvent; class QResizeEvent; -class QPaintEvent; class QVBoxLayout; class QFormLayout; class QLayout; diff --git a/ui/drivers/qt/ui_qt_window.cpp b/ui/drivers/qt/ui_qt_window.cpp index 7d980f7093..9e64b80a69 100644 --- a/ui/drivers/qt/ui_qt_window.cpp +++ b/ui/drivers/qt/ui_qt_window.cpp @@ -191,19 +191,6 @@ void TreeView::selectionChanged(const QItemSelection &selected, const QItemSelec emit itemsSelected(list); } -void TreeView::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QTreeView::paintEvent(event); -} - TableWidget::TableWidget(QWidget *parent) : QTableWidget(parent) { @@ -225,38 +212,12 @@ void TableWidget::keyPressEvent(QKeyEvent *event) QTableWidget::keyPressEvent(event); } -void TableWidget::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QTableWidget::paintEvent(event); -} - CoreInfoLabel::CoreInfoLabel(QString text, QWidget *parent) : QLabel(text, parent) { setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); } -void CoreInfoLabel::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QLabel::paintEvent(event); -} - CoreInfoWidget::CoreInfoWidget(CoreInfoLabel *label, QWidget *parent) : QWidget(parent) ,m_label(label) @@ -277,19 +238,6 @@ void CoreInfoWidget::resizeEvent(QResizeEvent *event) m_scrollArea->resize(event->size()); } -void CoreInfoWidget::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QWidget::paintEvent(event); -} - LogTextEdit::LogTextEdit(QWidget *parent) : QPlainTextEdit(parent) { @@ -305,19 +253,6 @@ void LogTextEdit::appendMessage(const QString& text) verticalScrollBar()->setValue(verticalScrollBar()->maximum()); } -void LogTextEdit::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QPlainTextEdit::paintEvent(event); -} - MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) ,m_loadCoreWindow(new LoadCoreWindow(this)) @@ -3012,19 +2947,6 @@ void MainWindow::onShowInfoMessage(QString msg) showMessageBox(msg, MainWindow::MSGBOX_TYPE_INFO, Qt::ApplicationModal, false); } -void MainWindow::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QMainWindow::paintEvent(event); -} - static void* ui_window_qt_init(void) { ui_window.qtWindow = new MainWindow(); diff --git a/ui/drivers/qt/viewoptionsdialog.cpp b/ui/drivers/qt/viewoptionsdialog.cpp index fc265b6af0..a293b01a00 100644 --- a/ui/drivers/qt/viewoptionsdialog.cpp +++ b/ui/drivers/qt/viewoptionsdialog.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include "viewoptionsdialog.h" #include "../ui_qt.h" @@ -217,15 +216,3 @@ void ViewOptionsDialog::hideDialog() reject(); } -void ViewOptionsDialog::paintEvent(QPaintEvent *event) -{ - QStyleOption o; - QPainter p; - o.initFrom(this); - p.begin(this); - style()->drawPrimitive( - QStyle::PE_Widget, &o, &p, this); - p.end(); - - QDialog::paintEvent(event); -} diff --git a/ui/drivers/qt/viewoptionsdialog.h b/ui/drivers/qt/viewoptionsdialog.h index 1ceb70f313..7b5c7c71fe 100644 --- a/ui/drivers/qt/viewoptionsdialog.h +++ b/ui/drivers/qt/viewoptionsdialog.h @@ -44,8 +44,6 @@ private: QCheckBox *m_suggestLoadedCoreFirstCheckBox; QSpinBox *m_allPlaylistsListMaxCountSpinBox; QSpinBox *m_allPlaylistsGridMaxCountSpinBox; -protected: - void paintEvent(QPaintEvent *event); }; #endif diff --git a/ui/drivers/ui_qt.h b/ui/drivers/ui_qt.h index c04ae44173..0b8debb3b9 100644 --- a/ui/drivers/ui_qt.h +++ b/ui/drivers/ui_qt.h @@ -153,8 +153,6 @@ signals: protected slots: void columnCountChanged(int oldCount, int newCount); void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); -protected: - void paintEvent(QPaintEvent *event); }; class TableWidget : public QTableWidget @@ -167,8 +165,6 @@ signals: void deletePressed(); protected: void keyPressEvent(QKeyEvent *event); -protected: - void paintEvent(QPaintEvent *event); }; class AppHandler : public QObject @@ -190,8 +186,6 @@ class CoreInfoLabel : public QLabel Q_OBJECT public: CoreInfoLabel(QString text = QString(), QWidget *parent = 0); -protected: - void paintEvent(QPaintEvent *event); }; class CoreInfoWidget : public QWidget @@ -202,7 +196,6 @@ public: QSize sizeHint() const; protected: void resizeEvent(QResizeEvent *event); - void paintEvent(QPaintEvent *event); private: CoreInfoLabel *m_label; QScrollArea *m_scrollArea; @@ -215,8 +208,6 @@ public: LogTextEdit(QWidget *parent = 0); public slots: void appendMessage(const QString& text); -protected: - void paintEvent(QPaintEvent *event); }; class MainWindow : public QMainWindow @@ -459,7 +450,6 @@ private: protected: void closeEvent(QCloseEvent *event); void keyPressEvent(QKeyEvent *event); - void paintEvent(QPaintEvent *event); }; Q_DECLARE_METATYPE(ThumbnailWidget)