]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QCitation.h
* Painter.h:
[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() { return &available_keys_; }
30
31         /// Selected keys
32         QStringListModel * selected() { return &selected_keys_; }
33
34         /// Found keys
35         QStringListModel * found() { return &found_keys_; }
36
37         /// Text before cite
38         QString textBefore();
39
40         /// Text after cite
41         QString textAfter();
42
43         /// Get key description
44         QString getKeyInfo(QString const &);
45
46         /// Find keys containing the string (not case-sens)
47         void findKey(QString const &);
48
49         /// Add key to selected keys
50         void addKey(QModelIndex const &);
51
52         /// Delete key from selected keys
53         void deleteKey(QModelIndex const &);
54
55         /// Move selected key one place up
56         void upKey(QModelIndex const &);
57
58         /// Move selected key one place down
59         void downKey(QModelIndex const &);
60
61         /// List of example cite strings
62         QStringList citationStyles(int);
63
64         /// Check whether there are keys to select
65         virtual bool isValid();
66
67         /// Set the Params variable for the Controller.
68         virtual void apply(int const choice, bool const full, bool const force,
69                                           QString before, QString after);
70
71         /// Update dialog before/whilst showing it.
72         virtual void updateModel();
73
74 private:        
75         /// available keys
76         QStringListModel available_keys_;
77
78         /// selected keys
79         QStringListModel selected_keys_;
80
81         /// found keys
82         QStringListModel found_keys_;
83 };
84
85
86 } // namespace frontend
87 } // namespace lyx
88
89 #endif // QCITATION_H