mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
mark QLabel reimplementations as virtual
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
391b0ac9fe
commit
eb5118bce2
2 changed files with 22 additions and 17 deletions
|
@ -798,6 +798,7 @@ void QLabel::mousePressEvent(QMouseEvent *ev)
|
|||
{
|
||||
Q_D(QLabel);
|
||||
d->sendControlEvent(ev);
|
||||
QFrame::mousePressEvent(ev);
|
||||
}
|
||||
|
||||
/*!\reimp
|
||||
|
@ -806,6 +807,7 @@ void QLabel::mouseMoveEvent(QMouseEvent *ev)
|
|||
{
|
||||
Q_D(QLabel);
|
||||
d->sendControlEvent(ev);
|
||||
QFrame::mouseMoveEvent(ev);
|
||||
}
|
||||
|
||||
/*!\reimp
|
||||
|
@ -814,6 +816,7 @@ void QLabel::mouseReleaseEvent(QMouseEvent *ev)
|
|||
{
|
||||
Q_D(QLabel);
|
||||
d->sendControlEvent(ev);
|
||||
QFrame::mouseReleaseEvent(ev);
|
||||
}
|
||||
|
||||
/*!\reimp
|
||||
|
@ -837,6 +840,7 @@ void QLabel::contextMenuEvent(QContextMenuEvent *ev)
|
|||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
menu->popup(ev->globalPos());
|
||||
#endif
|
||||
QFrame::contextMenuEvent(ev);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -889,6 +893,7 @@ void QLabel::keyPressEvent(QKeyEvent *ev)
|
|||
{
|
||||
Q_D(QLabel);
|
||||
d->sendControlEvent(ev);
|
||||
QFrame::keyPressEvent(ev);
|
||||
}
|
||||
|
||||
/*!\reimp
|
||||
|
@ -927,7 +932,7 @@ bool QLabel::event(QEvent *e)
|
|||
|
||||
/*!\reimp
|
||||
*/
|
||||
void QLabel::paintEvent(QPaintEvent *)
|
||||
void QLabel::paintEvent(QPaintEvent *ev)
|
||||
{
|
||||
Q_D(QLabel);
|
||||
QStyle *style = QWidget::style();
|
||||
|
@ -1023,6 +1028,7 @@ void QLabel::paintEvent(QPaintEvent *)
|
|||
pix = style->generatedIconPixmap(QIcon::Disabled, pix, &opt);
|
||||
style->drawItemPixmap(&painter, cr, align, pix);
|
||||
}
|
||||
QFrame::paintEvent(ev);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -59,8 +59,8 @@ class Q_GUI_EXPORT QLabel : public QFrame
|
|||
Q_PROPERTY(QString selectedText READ selectedText)
|
||||
|
||||
public:
|
||||
explicit QLabel(QWidget *parent=0, Qt::WindowFlags f=0);
|
||||
explicit QLabel(const QString &text, QWidget *parent=0, Qt::WindowFlags f=0);
|
||||
explicit QLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = 0);
|
||||
explicit QLabel(const QString &text, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = 0);
|
||||
~QLabel();
|
||||
|
||||
QString text() const;
|
||||
|
@ -116,22 +116,21 @@ public Q_SLOTS:
|
|||
void clear();
|
||||
|
||||
Q_SIGNALS:
|
||||
void linkActivated(const QString& link);
|
||||
void linkHovered(const QString& link);
|
||||
void linkActivated(const QString &link);
|
||||
void linkHovered(const QString &link);
|
||||
|
||||
protected:
|
||||
bool event(QEvent *e);
|
||||
void keyPressEvent(QKeyEvent *ev);
|
||||
void paintEvent(QPaintEvent *);
|
||||
void changeEvent(QEvent *);
|
||||
void mousePressEvent(QMouseEvent *ev);
|
||||
void mouseMoveEvent(QMouseEvent *ev);
|
||||
void mouseReleaseEvent(QMouseEvent *ev);
|
||||
void contextMenuEvent(QContextMenuEvent *ev);
|
||||
void focusInEvent(QFocusEvent *ev);
|
||||
void focusOutEvent(QFocusEvent *ev);
|
||||
bool focusNextPrevChild(bool next);
|
||||
|
||||
virtual bool event(QEvent *ev);
|
||||
virtual void keyPressEvent(QKeyEvent *ev);
|
||||
virtual void paintEvent(QPaintEvent *ev);
|
||||
virtual void changeEvent(QEvent *ev);
|
||||
virtual void mousePressEvent(QMouseEvent *ev);
|
||||
virtual void mouseMoveEvent(QMouseEvent *ev);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *ev);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *ev);
|
||||
virtual void focusInEvent(QFocusEvent *ev);
|
||||
virtual void focusOutEvent(QFocusEvent *ev);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QLabel)
|
||||
|
|
Loading…
Add table
Reference in a new issue