]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCitation.h
Revert "Mark some intentional fall-throughs (in a way understandable to gcc)"
[lyx.git] / src / frontends / qt4 / GuiCitation.h
index 035b2d2e2ac1d081d47e73acb2be5d47d813676f..5f093cc21d6b905ec7f34f00fda2ac91d493d842 100644 (file)
 
 #include "insets/InsetCommandParams.h"
 
+#include "BiblioInfo.h"
 #include "Citation.h"
 
+#include <QAbstractListModel>
+#include <QStandardItemModel>
 #include <QStringList>
 #include <QStringListModel>
 
@@ -34,6 +37,7 @@ namespace frontend {
 
 class GuiSelectionManager;
 
+
 class GuiCitation : public DialogView, public Ui::CitationUi
 {
        Q_OBJECT
@@ -41,14 +45,13 @@ class GuiCitation : public DialogView, public Ui::CitationUi
 public:
        ///
        GuiCitation(GuiView & lv);
-       ///
-       ~GuiCitation();
 
 private Q_SLOTS:
        void on_okPB_clicked();
        void on_cancelPB_clicked();
        void on_restorePB_clicked();
        void on_applyPB_clicked();
+       void on_literalCB_clicked();
        void filterPressed();
        void filterChanged(const QString & text);
        void on_fieldsCO_currentIndexChanged(int index);
@@ -104,7 +107,7 @@ private:
        /// set the styles combo
        void updateStyles(BiblioInfo const & bi);
        /// set the formatting widgets
-       void updateFormatting(CitationStyle currentStyle);
+       void updateFormatting(CitationStyle const & currentStyle);
        ///
        void updateControls(BiblioInfo const & bi);
        /// Set the appropriate hinting text on the filter bar
@@ -114,6 +117,19 @@ private:
        /// Clear selected keys
        void clearSelection();
 
+       /// Set selected keys
+       void setSelectedKeys(QStringList const);
+       /// Get selected keys
+       QStringList selectedKeys();
+       /// Set pre texts of qualified lists
+       void setPreTexts(std::vector<docstring> const m);
+       /// Get pre texts of qualified lists
+       std::vector<docstring> getPreTexts();
+       /// Set post texts of qualified lists
+       void setPostTexts(std::vector<docstring> const m);
+       /// Get post texts of qualified lists
+       std::vector<docstring> getPostTexts();
+
        /// Find keys containing a string.
        void findKey(
                BiblioInfo const & bi, //< optimize by passing this
@@ -126,8 +142,9 @@ private:
                bool reset = false //< whether to reset and search all keys
                );
 
-       /// List of example cite strings
-       QStringList citationStyles(BiblioInfo const & bi, size_t max_size);
+       /// List of example cite strings and their correlating lyx name
+       BiblioInfo::CiteStringMap citationStyles(BiblioInfo const & bi,
+                                                               size_t max_size);
 
        /// Set the Params variable for the Controller.
        void applyParams(int const choice, bool const full, bool const force,
@@ -165,13 +182,16 @@ private:
        QAction * instant_;
 
        /// last used citation style
-       int style_;
+       QString style_;
+       /// last set value for literal
+       /// this is used only for new citations
+       bool literal_;
        ///
        GuiSelectionManager * selectionManager;
        /// available keys.
        QStringListModel available_model_;
        /// selected keys.
-       QStringListModel selected_model_;
+       QStandardItemModel selected_model_;
        /// All keys.
        QStringList all_keys_;
        /// Cited keys.