]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiViewSource.h
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / GuiViewSource.h
index ab1db0364006d0a5abc50c115400ccace61bffcc..e3c7a814e5b142eb021bb1ba72f6489e9d070bea 100644 (file)
@@ -20,8 +20,6 @@
 #include "GuiView.h"
 #include "qt_helpers.h"
 
-#include "debug.h"
-
 #include <QDockWidget>
 #include <QString>
 #include <QTextCharFormat>
@@ -39,21 +37,27 @@ class ViewSourceWidget : public QWidget, public Ui::ViewSourceUi
        Q_OBJECT
 
 public:
-       ViewSourceWidget(GuiViewSource &);
+       ViewSourceWidget();
+       ///
+       void setBufferView(BufferView const * bv);
 
 public Q_SLOTS:
        // update content
        void updateView();
        ///
-       void update(bool full_source);
+       void updateDefaultFormat();
+       ///
+       void fullSourceChanged();
 
 private:
        ///
-       GuiViewSource & controller_;    
+       BufferView const * bv_;
        ///
        QTextDocument * document_;
        /// LaTeX syntax highlighter
        LaTeXHighlighter * highlighter_;
+       ///
+       bool force_getcontent_;
 };
 
 
@@ -63,7 +67,7 @@ class GuiViewSource : public DockView
 
 public:
        GuiViewSource(
-               GuiViewBase & parent, ///< the main window where to dock.
+               GuiView & parent, ///< the main window where to dock.
                Qt::DockWidgetArea area = Qt::BottomDockWidgetArea, ///< Position of the dock (and also drawer)
                Qt::WindowFlags flags = 0);
 
@@ -78,19 +82,15 @@ public:
        bool canApply() const { return true; }
        bool canApplyToReadOnly() const { return true; }
        void updateView();
+       void enableView(bool enable);
+       void saveSession() const;
+       void restoreSession();
+       bool wantInitialFocus() const { return false; }
        ///@}
 
        /// The title displayed by the dialog reflects source type.
        QString title() const;
 
-       /** get the source code of selected paragraphs, or the whole document
-               \param fullSource get full source code
-        */
-       QString getContent(bool fullSource);
-       /** get the cursor position in the source code
-        */
-       std::pair<int, int> getRows() const;
-
 private:
        /// The encapsulated widget.
        ViewSourceWidget * widget_;