]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiWorkArea.h
Few string fixes from Dan.
[lyx.git] / src / frontends / qt / GuiWorkArea.h
index 22e8bfdc0a32cc0589ee605230d714520baf8490..6f24ff313c579b6aa4d81003772d670e6cacbe4e 100644 (file)
 #include "ui_WorkAreaUi.h"
 
 #include "frontends/WorkArea.h"
-#include "frontends/KeySymbol.h"
 
 #include <QAbstractScrollArea>
 #include <QTabBar>
 #include <QTabWidget>
 
-class QDragEnterEvent;
-class QDropEvent;
 class QToolButton;
 class QWidget;
 
 namespace lyx {
 
 class Buffer;
+class BufferView;
 class FuncRequest;
+class KeySymbol;
 
 namespace frontend {
 
@@ -64,7 +63,7 @@ public:
        ///
        BufferView const & bufferView() const;
        ///
-       void scheduleRedraw(bool update_metrics);
+       void scheduleRedraw(bool update_metrics) override;
 
        /// return true if the key is part of a shortcut
        bool queryKeySym(KeySymbol const & key, KeyModifier mod) const;
@@ -114,42 +113,42 @@ private Q_SLOTS:
        void toggleCaret();
        /// close this work area.
        /// Slot for Buffer::closing signal.
-       void close();
+       void close() override;
        /// Slot to restore proper scrollbar behaviour.
        void fixVerticalScrollBar();
 
 private:
        /// Update window titles of all users.
-       void updateWindowTitle();
+       void updateWindowTitle() override;
        ///
-       bool event(QEvent *);
+       bool event(QEvent *) override;
        ///
-       void contextMenuEvent(QContextMenuEvent *);
+       void contextMenuEvent(QContextMenuEvent *) override;
        ///
-       void focusInEvent(QFocusEvent *);
+       void focusInEvent(QFocusEvent *) override;
        ///
-       void focusOutEvent(QFocusEvent *);
+       void focusOutEvent(QFocusEvent *) override;
        /// repaint part of the widget
-       void paintEvent(QPaintEvent * ev);
+       void paintEvent(QPaintEvent * ev) override;
        /// widget has been resized
-       void resizeEvent(QResizeEvent * ev);
+       void resizeEvent(QResizeEvent * ev) override;
        /// mouse button press
-       void mousePressEvent(QMouseEvent * ev);
+       void mousePressEvent(QMouseEvent * ev) override;
        /// mouse button release
-       void mouseReleaseEvent(QMouseEvent * ev);
+       void mouseReleaseEvent(QMouseEvent * ev) override;
        /// mouse double click of button
-       void mouseDoubleClickEvent(QMouseEvent * ev);
+       void mouseDoubleClickEvent(QMouseEvent * ev) override;
        /// mouse motion
-       void mouseMoveEvent(QMouseEvent * ev);
+       void mouseMoveEvent(QMouseEvent * ev) override;
        /// wheel event
-       void wheelEvent(QWheelEvent * ev);
+       void wheelEvent(QWheelEvent * ev) override;
        /// key press event. It also knows how to handle ShortcutOverride events to
        /// avoid code duplication.
-       void keyPressEvent(QKeyEvent * ev);
+       void keyPressEvent(QKeyEvent * ev) override;
        /// IM events
-       void inputMethodEvent(QInputMethodEvent * ev);
+       void inputMethodEvent(QInputMethodEvent * ev) override;
        /// IM query
-       QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+       QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
 
        /// The slot connected to SyntheticMouseEvent::timeout.
        void generateSyntheticMouseEvent();
@@ -189,15 +188,15 @@ public:
        void setWidgetResizable(bool) {}
        void setWidget(QWidget *) {}
 
-       QSize sizeHint () const;
+       QSize sizeHint () const override;
        ///
        void disable();
 
 protected:
        ///
-       void closeEvent(QCloseEvent * ev);
+       void closeEvent(QCloseEvent * ev) override;
        ///
-       void hideEvent(QHideEvent *ev);
+       void hideEvent(QHideEvent *ev) override;
 
 private:
        /// Embedded Buffer.
@@ -212,7 +211,7 @@ class TabWorkArea : public QTabWidget
 {
        Q_OBJECT
 public:
-       TabWorkArea(QWidget * parent = 0);
+       TabWorkArea(QWidget * parent = nullptr);
 
        /// hide QTabWidget methods
        GuiWorkAreaContainer * currentWidget() const;
@@ -228,7 +227,7 @@ public:
        GuiWorkArea * currentWorkArea() const;
        GuiWorkArea * workArea(Buffer & buffer) const;
        GuiWorkArea * workArea(int index) const;
-       void paintEvent(QPaintEvent *);
+       void paintEvent(QPaintEvent *) override;
 
 Q_SIGNALS:
        ///
@@ -254,10 +253,10 @@ private Q_SLOTS:
        ///
        void showContextMenu(const QPoint & pos);
        /// enable closing tab on middle-click
-       void mousePressEvent(QMouseEvent * me);
-       void mouseReleaseEvent(QMouseEvent * me);
+       void mousePressEvent(QMouseEvent * me) override;
+       void mouseReleaseEvent(QMouseEvent * me) override;
        ///
-       void mouseDoubleClickEvent(QMouseEvent * event);
+       void mouseDoubleClickEvent(QMouseEvent * event) override;
        ///
        int indexOfWorkArea(GuiWorkArea * w) const;
 
@@ -281,7 +280,7 @@ class GuiWorkAreaContainer : public QWidget, public Ui::WorkAreaUi
        Q_OBJECT
        // non-null
        GuiWorkArea * const wa_;
-       void dispatch(FuncRequest f) const;
+       void dispatch(FuncRequest const & f) const;
 
 private Q_SLOTS:
        void updateDisplay();
@@ -289,11 +288,11 @@ private Q_SLOTS:
        void ignore() const;
 
 protected:
-       void mouseDoubleClickEvent(QMouseEvent * event); //override
+       void mouseDoubleClickEvent(QMouseEvent * event) override;
 
 public:
        /// wa != 0
-       GuiWorkAreaContainer(GuiWorkArea * wa, QWidget * parent = 0);
+       GuiWorkAreaContainer(GuiWorkArea * wa, QWidget * parent = nullptr);
        /// non-null
        GuiWorkArea * workArea() const { return wa_; }
 };