]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiView.h
Add ability to use refstyle's plural and capitalization features.
[lyx.git] / src / frontends / qt4 / GuiView.h
index aa03b84a83bf6b717927c7d60a2deb44e4b0d5f2..a864f4b52a157bf4207b2bd8a071d5a88ceedbe1 100644 (file)
@@ -24,6 +24,7 @@
 class QCloseEvent;
 class QDragEnterEvent;
 class QDropEvent;
+class QLabel;
 class QMenu;
 class QShowEvent;
 
@@ -51,7 +52,7 @@ class TocModels;
 class ToolbarInfo;
 
 /**
- * GuiView - Qt4 main LyX window
+ * GuiView - Qt main LyX window
  *
  * This class represents the main LyX window and provides
  * accessor functions to its content.
@@ -75,11 +76,17 @@ public:
        /// programmatically and not by the user clicking the x.
        bool closeScheduled();
 
+       /// Things that need to be done when the OSes session manager
+       /// requests a log out.
+       bool prepareAllBuffersForLogout();
+
        int id() const { return id_; }
 
        /// are we busy ?
        bool busy() const;
 
+       /// Signal that the any "auto" minibuffer can be closed now.
+       void resetCommandExecute();
 
        /// \name Generic accessor functions
        //@{
@@ -119,6 +126,7 @@ public:
 
        ///
        void setFocus();
+       bool hasFocus() const;
 
        ///
        void focusInEvent(QFocusEvent * e);
@@ -138,7 +146,6 @@ public:
        /// updates the possible layouts selectable
        void updateLayoutList();
        void updateToolbars();
-       QMenu * createPopupMenu();
 
        ///
        LayoutBox * getLayoutDialog() const;
@@ -199,10 +206,15 @@ public:
        GuiWorkArea const * currentMainWorkArea() const;
        /// return the current document WorkArea (it may not have the focus).
        GuiWorkArea * currentMainWorkArea();
+       
+       /// Current ratio between physical pixels and device-independent pixels
+       double pixelRatio() const;
 
 Q_SIGNALS:
        void closing(int);
        void triggerShowDialog(QString const & qname, QString const & qdata, Inset * inset);
+       // emitted when the work area or its buffer view changed
+       void bufferViewChanged();
 
 public Q_SLOTS:
        ///
@@ -210,23 +222,20 @@ public Q_SLOTS:
        /// idle timeout.
        /// clear any temporary message and replace with current status.
        void clearMessage();
-
-private Q_SLOTS:
        ///
        void updateWindowTitle(GuiWorkArea * wa);
+
+private Q_SLOTS:
        ///
-       void resetWindowTitleAndIconText();
+       void resetWindowTitle();
 
        ///
        void on_currentWorkAreaChanged(GuiWorkArea *);
        ///
+       void onBufferViewChanged();
+       ///
        void on_lastWorkAreaRemoved();
 
-       /// slots to change the icon size
-       void smallSizedIcons();
-       void normalSizedIcons();
-       void bigSizedIcons();
-
        /// For completion of autosave or export threads.
        void processingThreadStarted();
        void processingThreadFinished();
@@ -240,6 +249,9 @@ private Q_SLOTS:
        void updateStatusBarMessage(QString const & str);
        void clearMessageText();
 
+       ///
+       void toolBarPopup(const QPoint &pos);
+
 private:
        /// Open given child document in current buffer directory.
        void openChildDocument(std::string const & filename);
@@ -275,7 +287,7 @@ private:
        bool goToFileRow(std::string const & argument);
 
        ///
-       struct GuiViewPrivate;
+       class GuiViewPrivate;
        GuiViewPrivate & d;
 
 public:
@@ -344,16 +356,17 @@ private:
        ///
        void initToolbars();
        ///
+       void initToolbar(std::string const & name);
+       ///
        bool lfunUiToggle(std::string const & ui_component);
        ///
        void toggleFullScreen();
        ///
        void insertLyXFile(docstring const & fname);
        ///
-       void insertPlaintextFile(docstring const & fname,
-               bool asParagraph);
-       ///
-       bool exportBufferAs(Buffer & b);
+       /// Open Export As ... dialog. \p iformat is the format the
+       /// filter is initially set to.
+       bool exportBufferAs(Buffer & b, docstring const & iformat);
 
        ///
        enum RenameKind { LV_WRITE_AS, LV_VC_RENAME, LV_VC_COPY };
@@ -409,7 +422,7 @@ private:
                PREVBUFFER
        };
        ///
-       void gotoNextOrPreviousBuffer(NextOrPrevious np);
+       void gotoNextOrPreviousBuffer(NextOrPrevious np, bool const move);
 
        /// Is the dialog currently visible?
        bool isDialogVisible(std::string const & name) const;
@@ -437,6 +450,19 @@ private:
        /// functions that call setBusy;
        int busy_;
 
+       /// Request to open the command toolbar if it is "auto"
+       bool command_execute_;
+       /// Request to give focus to minibuffer
+       bool minibuffer_focus_;
+
+       /// Statusbar widget that shows read-only status
+       QLabel * read_only_;
+       /// Statusbar widget that shows version control status
+       QLabel * version_control_;
+
+       /// Minimum zoom percentage
+       static unsigned int const zoom_min_ = 10;
+
 };
 
 } // namespace frontend