]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiCitation.h
Make code a bit easier to read
[lyx.git] / src / frontends / qt / GuiCitation.h
index d3a23b587c815fcd2a5827b0c83c6d3e904017fa..948933a8e37c8d804489aa7830acb9e91d7bce7a 100644 (file)
@@ -7,7 +7,7 @@
  * \author Angus Leeming
  * \author Kalle Dalheimer
  * \author Abdelrazak Younes
- * \author Richard Heck
+ * \author Richard Kimberly Heck
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include "DialogView.h"
 #include "ui_CitationUi.h"
-#include "FancyLineEdit.h"
 
 #include "insets/InsetCommandParams.h"
 
 #include "BiblioInfo.h"
-#include "Citation.h"
 
 #include <QAbstractListModel>
 #include <QStandardItemModel>
 
 namespace lyx {
 
-class BiblioInfo;
+class CitationStyle;
 
 namespace frontend {
 
+class FancyLineEdit;
 class GuiSelectionManager;
 
 
@@ -72,24 +71,20 @@ private Q_SLOTS:
 private:
        /// Dialog inherited methods
        //@{
-       void applyView();
-       void updateView() {}
-       bool initialiseParams(std::string const & data);
-       void clearParams();
-       void dispatchParams();
-       bool isBufferDependent() const { return true; }
-       void saveSession(QSettings & settings) const;
-       void restoreSession();
-       /** Disconnect from the inset when the Apply button is pressed.
-        *  Allows easy insertion of multiple citations.
-        */
-       bool disconnectOnApply() const { return true; }
+       void applyView() override;
+       void updateView() override {}
+       bool initialiseParams(std::string const & data) override;
+       void clearParams() override;
+       void dispatchParams() override;
+       bool isBufferDependent() const override { return true; }
+       void saveSession(QSettings & settings) const override;
+       void restoreSession() override;
        //@}
 
        ///
-       void showEvent(QShowEvent * e);
+       void showEvent(QShowEvent * e) override;
        ///
-       void closeEvent(QCloseEvent * e);
+       void closeEvent(QCloseEvent * e) override;
        /// prepares a call to GuiCitation::searchKeys when we
        /// are ready to search the BibTeX entries
        void findText(QString const & text, bool reset = false);
@@ -117,7 +112,7 @@ private:
        void clearSelection();
 
        /// Set selected keys
-       void setSelectedKeys(QStringList const);
+       void setSelectedKeys(QStringList const &);
        /// Get selected keys
        QStringList selectedKeys();
        /// Set pre texts of qualified lists
@@ -151,7 +146,7 @@ private:
 
        ///
        void filterByEntryType(BiblioInfo const & bi,
-               std::vector<docstring> & keyVector, docstring entryType);
+               std::vector<docstring> & keyVector, docstring const & entryType);
 
        /// Search a given string within the passed keys.
        /// \return the vector of matched keys.
@@ -160,7 +155,7 @@ private:
                std::vector<docstring> const & keys_to_search, //< Keys to search.
                bool only_keys, //< whether to search only the keys
                docstring const & search_expression, //< Search expression (regex possible)
-               docstring field, //< field to search, empty for all fields
+               docstring const & field, //< field to search, empty for all fields
                bool case_sensitive = false, //< set to true is the search should be case sensitive
                bool regex = false //< \set to true if \c search_expression is a regex
                ); //
@@ -182,6 +177,8 @@ private:
 
        /// last used citation style
        QString style_;
+        /// this is the last style chosen in the current dialog
+        QString last_chosen_style_;
        ///
        GuiSelectionManager * selectionManager;
        /// available keys.