]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/QCitation.h
Whitespace cleanup
[features.git] / src / frontends / qt4 / QCitation.h
index 807f2dde9f7a62ee154f860bbf3208a6e198fd2c..66bcdcdd48cc4ad269b1bd3e75d8f95e47fc2c17 100644 (file)
@@ -6,6 +6,7 @@
  *
  * \author Angus Leeming
  * \author Kalle Dalheimer
+ * \author Abdelrazak Younes
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -13,8 +14,9 @@
 #ifndef QCITATION_H
 #define QCITATION_H
 
-#include "ControlCitation.h"
+#include "frontends/controllers/ControlCitation.h"
 
+#include <QStringList>
 #include <QStringListModel>
 
 namespace lyx {
@@ -25,17 +27,17 @@ class QCitation : public ControlCitation
 public:
        ///
        QCitation(Dialog &);
+       virtual ~QCitation() {}
+       virtual bool initialiseParams(std::string const & data);
+
+       ///
+       void init();
+
        /// Available keys
-       QStringListModel * available()
-       { return &available_keys_; }
+       QStringListModel * available() { return &available_model_; }
 
        /// Selected keys
-       QStringListModel * selected()
-       { return &selected_keys_; }
-
-       /// Found keys
-       QStringListModel * found()
-       { return &found_keys_; }
+       QStringListModel * selected() { return &selected_model_; }
 
        /// Text before cite
        QString textBefore();
@@ -46,8 +48,16 @@ public:
        /// Get key description
        QString getKeyInfo(QString const &);
 
-       /// Find keys containing the string (not case-sens)
-       void findKey(QString const &);
+       /// Clear selected keys
+       void clearSelection();
+
+       /// Find keys containing a string.
+       void findKey(
+               QString const & str, //< string expression
+               bool only_keys, //< set to true if only keys shall be searched.
+               bool case_sensitive, //< set to true for case sensitive search.
+               bool reg_exp //< set to true if \c str is a regular expression.
+               );
 
        /// Add key to selected keys
        void addKey(QModelIndex const &);
@@ -64,25 +74,22 @@ public:
        /// List of example cite strings
        QStringList citationStyles(int);
 
-       /// Check whether there are keys to select
-       virtual bool isValid();
-
        /// Set the Params variable for the Controller.
        virtual void apply(int const choice, bool const full, bool const force,
                                          QString before, QString after);
 
-       /// Update dialog before/whilst showing it.
-       virtual void updateModel();
+private:
+       /// available keys.
+       QStringListModel available_model_;
 
-private:       
-       /// available keys
-       QStringListModel available_keys_;
+       /// selected keys.
+       QStringListModel selected_model_;
 
-       /// selected keys
-       QStringListModel selected_keys_;
+       /// All keys.
+       QStringList all_keys_;
 
-       /// found keys
-       QStringListModel found_keys_;
+       /// Cited keys.
+       QStringList cited_keys_;
 };