]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDocument.h
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / GuiDocument.h
index 7527a59edc9cdf857c82ad856993ae2816e70c53..3e0c35384b303df7cf765a591b7c83a9aab4300d 100644 (file)
@@ -37,6 +37,8 @@
 #include "ui_PreambleUi.h"
 #include "ui_TextLayoutUi.h"
 
+#include <QStandardItemModel>
+
 namespace lyx {
 
 class BufferParams;
@@ -44,6 +46,10 @@ class LayoutModuleList;
 class LyXModule;
 class TextClass;
 
+namespace support {
+       class TempFile;
+}
+
 namespace frontend {
 
 class FloatPlacement;
@@ -55,7 +61,7 @@ class LocalLayout;
 class FontModule;
 
 ///
-typedef void const * BufferId;
+typedef Buffer const * BufferId;
 
 template<class UI>
 class UiWidget : public QWidget, public UI
@@ -86,12 +92,19 @@ public:
 
 public Q_SLOTS:
        void onBufferViewChanged();//override
+       // OK button clicked
+       void slotOK();
+       // Apply button clicked
+       void slotApply();
+       void slotButtonBox(QAbstractButton *);
 
 private Q_SLOTS:
        void updateNumbering();
        void change_adaptor();
+       void shellescapeChanged();
        void includeonlyClicked(QTreeWidgetItem * item, int);
        void setListingsMessage();
+       void listingsPackageChanged(int);
        void saveDefaultClicked();
        void useDefaultsClicked();
        void setLSpacing(int);
@@ -110,7 +123,7 @@ private Q_SLOTS:
        void setSkip(int);
        void enableSkip(bool);
        void allowMathIndent();
-       void setMathIndent(int);
+       void enableMathIndent(int);
        void browseLayout();
        void browseMaster();
        void classChanged();
@@ -139,11 +152,17 @@ private Q_SLOTS:
        void deleteBoxBackgroundColor();
        void languageChanged(int);
        void osFontsChanged(bool);
+       void encodingSwitched(int);
+       void inputencodingToDialog();
        void mathFontChanged(int);
        void branchesRename(docstring const &, docstring const &);
        void allPackagesAuto();
        void allPackagesAlways();
        void allPackagesNot();
+       void moduleFilterPressed();
+       void moduleFilterChanged(const QString & text);
+       void resetModuleFilter();
+       void linenoToggled(bool);
 private:
        /// validate listings parameters and return an error message, if any
        QString validateListingsParameters();
@@ -175,7 +194,7 @@ private:
        ModuleSelectionManager * selectionManager;
 
        /// Available modules
-       GuiIdListModel * availableModel() { return &modules_av_model_; }
+       QStandardItemModel * availableModel() { return &modules_av_model_; }
        /// Selected modules
        GuiIdListModel * selectedModel() { return &modules_sel_model_; }
 
@@ -200,12 +219,17 @@ private:
        void setLayoutComboByIDString(std::string const & idString);
        /// Update quotes styles combo, indicating the current language's default
        void updateQuoteStyles(bool const set = false);
+       ///
+       void getTableStyles();
 
        /// available modules
-       GuiIdListModel modules_av_model_;
+       QStandardItemModel modules_av_model_;
        /// selected modules
        GuiIdListModel modules_sel_model_;
 
+       /// Module filter
+       FancyLineEdit * filter_;
+
        /// return false if validate_listings_params returns error
        bool isValid();
 
@@ -236,6 +260,9 @@ private:
                QString name;
                std::string id;
                QString description;
+               QString category;
+               bool local;
+               bool missingreqs;
        };
        ///
        static modInfoStruct modInfo(LyXModule const & mod);
@@ -256,7 +283,7 @@ private:
        bool providesOSF(QString const & font) const;
        /// does this font provide true Small Caps?
        bool providesSC(QString const & font) const;
-       /** does this font provide OSF and Small Caps only via 
+       /** does this font provide OSF and Small Caps only via
         * a single, undifferentiated expert option?
         */
        bool hasMonolithicExpertSet(QString const & font) const;
@@ -290,6 +317,10 @@ private:
        ///
        bool isBiblatex() const;
        ///
+       void checkPossibleCiteEngines();
+       ///
+       void filterModules(QString const & string);
+       ///
        BufferParams bp_;
        /// List of names of available modules
        std::list<modInfoStruct> moduleNames_;
@@ -301,6 +332,10 @@ private:
        bool biblioChanged_;
        /// Track if a non-module document param changed
        bool nonModuleChanged_;
+       /// Track if used modules changed
+       bool modulesChanged_;
+       /// Track if the shellescape param changed
+       bool shellescapeChanged_;
 };
 
 
@@ -311,6 +346,7 @@ public:
        PreambleModule(QWidget * parent);
        void update(BufferParams const & params, BufferId id);
        void apply(BufferParams & params);
+       bool editing() const { return (bool)tempfile_; }
 
 Q_SIGNALS:
        /// signal that something's changed in the Widget.
@@ -320,10 +356,16 @@ private:
        void closeEvent(QCloseEvent *);
        void on_preambleTE_textChanged() { changed(); }
 
-private:
        typedef std::map<BufferId, std::pair<int,int> > Coords;
        Coords preamble_coords_;
        BufferId current_id_;
+       unique_ptr<support::TempFile> tempfile_;
+
+private Q_SLOTS:
+       ///
+       void checkFindButton();
+       void findText();
+       void editExternal();
 };
 
 
@@ -335,6 +377,7 @@ public:
        void update(BufferParams const & params, BufferId id);
        void apply(BufferParams & params);
        bool isValid() const { return validated_; }
+       bool editing() const { return (bool)tempfile_; }
 
 Q_SIGNALS:
        /// signal that something's changed in the Widget.
@@ -348,10 +391,12 @@ private Q_SLOTS:
        void textChanged();
        void validatePressed();
        void convertPressed();
+       void editExternal();
 
 private:
        BufferId current_id_;
        bool validated_;
+       unique_ptr<support::TempFile> tempfile_;
 };