4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
8 * \author Kalle Dalheimer
9 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
17 #include "frontends/controllers/ControlCitation.h"
18 #include "support/docstring.h"
20 #include <QStringList>
21 #include <QStringListModel>
26 class QCitation : public ControlCitation
31 virtual ~QCitation() {}
32 virtual bool initialiseParams(std::string const & data);
38 QStringListModel * available() { return &available_model_; }
41 QStringListModel * selected() { return &selected_model_; }
49 /// Get key description
50 QString getKeyInfo(QString const &);
52 /// Clear selected keys
53 void clearSelection();
55 /// Return a list of available fields
56 QStringList getFieldsAsQStringList();
58 /// Return a list of available fields
59 QStringList getEntriesAsQStringList();
61 /// Find keys containing a string.
63 QString const & str, //< string expression
64 bool only_keys, //< set to true if only keys shall be searched.
65 docstring field, //<field to search, empty for all fields
66 docstring entryType, //<entry type to display, empty for all
67 bool case_sensitive, //< set to true for case sensitive search.
68 bool reg_exp, //< set to true if \c str is a regular expression.
69 bool reset = false //< whether to reset and search all keys
72 /// Add key to selected keys
73 void addKey(QModelIndex const &);
75 /// Delete key from selected keys
76 void deleteKey(QModelIndex const &);
78 /// Move selected key one place up
79 void upKey(QModelIndex const &);
81 /// Move selected key one place down
82 void downKey(QModelIndex const &);
84 /// List of example cite strings
85 QStringList citationStyles(int);
87 /// Set the Params variable for the Controller.
88 virtual void apply(int const choice, bool const full, bool const force,
89 QString before, QString after);
93 QStringListModel available_model_;
96 QStringListModel selected_model_;
99 QStringList all_keys_;
102 QStringList cited_keys_;
106 } // namespace frontend
109 #endif // QCITATION_H