X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt%2FFancyLineEdit.h;h=5d55640e95d22d64bb5c7ef330c9bdd52a8a895e;hb=ceb03b1815583a7daf6166562f6d928d7d38b356;hp=5a2a5428614537d9ae66bf0f75fd3da6483dd286;hpb=c293be56bd12c5dc46e5cedd2828e33918fccef7;p=lyx.git diff --git a/src/frontends/qt/FancyLineEdit.h b/src/frontends/qt/FancyLineEdit.h index 5a2a542861..5d55640e95 100644 --- a/src/frontends/qt/FancyLineEdit.h +++ b/src/frontends/qt/FancyLineEdit.h @@ -30,7 +30,7 @@ class IconButton: public QAbstractButton Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap) public: explicit IconButton(QWidget *parent = 0); - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) override; void setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; update(); } QPixmap pixmap() const { return m_pixmap; } float iconOpacity() { return m_iconOpacity; } @@ -69,7 +69,10 @@ Q_SIGNALS: public: explicit FancyLineEdit(QWidget *parent = 0); - ~FancyLineEdit(); + ~FancyLineEdit() {} + + /// Set a button to clear contents + void setClearButton(bool visible); QPixmap buttonPixmap(Side side) const; void setButtonPixmap(Side side, const QPixmap &pixmap); @@ -96,8 +99,8 @@ private Q_SLOTS: void iconClicked(); protected: - virtual void resizeEvent(QResizeEvent *e); - virtual void keyPressEvent(QKeyEvent *e); + void resizeEvent(QResizeEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; private: void updateMargins();