]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QCitation.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QCitation.h
1 // -*- C++ -*-
2 /**
3  * \file QCitation.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  * \author Kalle Dalheimer
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef QCITATION_H
14 #define QCITATION_H
15
16 #include "ControlCitation.h"
17
18 #include <QStringListModel>
19
20 namespace lyx {
21 namespace frontend {
22
23 class QCitation : public ControlCitation
24 {
25 public:
26         ///
27         QCitation(Dialog &);
28         /// Available keys
29         QStringListModel * available()
30         { return &available_keys_; }
31
32         /// Selected keys
33         QStringListModel * selected()
34         { return &selected_keys_; }
35
36         /// Found keys
37         QStringListModel * found()
38         { return &found_keys_; }
39
40         /// Text before cite
41         QString textBefore();
42
43         /// Text after cite
44         QString textAfter();
45
46         /// Get key description
47         QString getKeyInfo(QString const &);
48
49         /// Find keys containing the string (not case-sens)
50         void findKey(QString const &);
51
52         /// Add key to selected keys
53         void addKey(QModelIndex const &);
54
55         /// Delete key from selected keys
56         void deleteKey(QModelIndex const &);
57
58         /// Move selected key one place up
59         void upKey(QModelIndex const &);
60
61         /// Move selected key one place down
62         void downKey(QModelIndex const &);
63
64         /// List of example cite strings
65         QStringList citationStyles(int);
66
67         /// Check whether there are keys to select
68         virtual bool isValid();
69
70         /// Set the Params variable for the Controller.
71         virtual void apply(int const choice, bool const full, bool const force,
72                                           QString before, QString after);
73
74         /// Update dialog before/whilst showing it.
75         virtual void updateModel();
76
77 private:        
78         /// available keys
79         QStringListModel available_keys_;
80
81         /// selected keys
82         QStringListModel selected_keys_;
83
84         /// found keys
85         QStringListModel found_keys_;
86 };
87
88
89 } // namespace frontend
90 } // namespace lyx
91
92 #endif // QCITATION_H