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
10 * \author Richard Heck (adapted to QSelectionManager)
12 * Full author contact details are available in file CREDITS.
18 #include "frontends/controllers/ControlCitation.h"
19 #include "support/docstring.h"
21 #include <QStringList>
22 #include <QStringListModel>
27 class QCitation : public ControlCitation
32 virtual ~QCitation() {}
33 virtual bool initialiseParams(std::string const & data);
39 QStringListModel * available() { return &available_model_; }
42 QStringListModel * selected() { return &selected_model_; }
50 /// Get key description
51 QString getKeyInfo(QString const &);
53 /// Clear selected keys
54 void clearSelection();
56 /// Return a list of available fields
57 QStringList getFieldsAsQStringList();
59 /// Return a list of available fields
60 QStringList getEntriesAsQStringList();
62 /// Find keys containing a string.
64 QString const & str, //< string expression
65 bool only_keys, //< set to true if only keys shall be searched.
66 docstring field, //<field to search, empty for all fields
67 docstring entryType, //<entry type to display, empty for all
68 bool case_sensitive, //< set to true for case sensitive search.
69 bool reg_exp, //< set to true if \c str is a regular expression.
70 bool reset = false //< whether to reset and search all keys
73 /// List of example cite strings
74 QStringList citationStyles(int);
76 /// Set the Params variable for the Controller.
77 virtual void apply(int const choice, bool const full, bool const force,
78 QString before, QString after);
84 QStringListModel available_model_;
87 QStringListModel selected_model_;
90 QStringList all_keys_;
93 QStringList cited_keys_;
97 } // namespace frontend
100 #endif // QCITATION_H