]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QCitationDialog.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QCitationDialog.h
1 // -*- C++ -*-
2 /**
3  * \file QCitationDialog.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Kalle Dalheimer
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef QCITATIONDIALOG_H
13 #define QCITATIONDIALOG_H
14
15 #include "Dialog.h"
16 #include "ui/QCitationUi.h"
17
18 namespace lyx {
19 namespace frontend {
20
21 class QCitation;
22
23 class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::View {
24         Q_OBJECT
25
26 public:
27         QCitationDialog(Dialog &, QCitation * form );
28
29         virtual ~QCitationDialog();
30
31         virtual void apply();
32
33         /// Hide the dialog from sight
34         void hide();
35
36         /// Redraw the dialog (e.g. if the colors have been remapped).
37         void redraw() {}
38
39         /// Create the dialog if necessary, update it and display it.
40         void show();
41
42         /// Update the display of the dialog whilst it is still visible.
43         void update();
44
45         /// \return true if the dialog is visible.
46         bool isVisible() const;
47
48 protected Q_SLOTS:
49
50         void on_okPB_clicked();
51         void on_cancelPB_clicked();
52         void on_restorePB_clicked();
53         void on_applyPB_clicked();
54         void on_addPB_clicked();
55         void on_deletePB_clicked();
56         void on_upPB_clicked();
57         void on_downPB_clicked();
58         void on_findLE_textChanged(const QString & text);
59         void on_selectedLV_clicked(const QModelIndex &);
60         void on_availableLV_clicked(const QModelIndex &);
61         void on_availableLV_activated(const QModelIndex &);
62         virtual void changed();
63         /// check whether key is already selected
64         bool isSelected(const QModelIndex &);
65         /// update infobox
66         void updateInfo(const QModelIndex &);
67
68 private:
69         /// enable/disable buttons
70         void setButtons();
71
72         /// fill the styles combo
73         void fillStyles();
74
75         /// set the styles combo
76         void updateStyle();
77
78         /// last used citation style
79         int style_;
80
81         QCitation * form_;
82 };
83
84
85 } // namespace frontend
86 } // namespace lyx
87
88 #endif // QCITATIOINDIALOG_H