]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QCitationDialog.h
fix building with automake; break scons, cmake and qmake
[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  * \author Abdelrazak Younes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef QCITATIONDIALOG_H
14 #define QCITATIONDIALOG_H
15
16 #include "Dialog.h"
17 #include "ui_CitationUi.h"
18
19 #include <QCloseEvent>
20 #include <QKeyEvent>
21
22 namespace lyx {
23 namespace frontend {
24
25 class QCitation;
26
27 class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::View {
28         Q_OBJECT
29
30 public:
31         QCitationDialog(Dialog &, QCitation * form );
32
33         virtual ~QCitationDialog();
34
35         virtual void apply();
36
37         /// Hide the dialog from sight
38         void hide();
39
40         /// Redraw the dialog (e.g. if the colors have been remapped).
41         void redraw() {}
42
43         /// Create the dialog if necessary, update it and display it.
44         void show();
45
46         /// Update the display of the dialog whilst it is still visible.
47         void update();
48
49         /// \return true if the dialog is visible.
50         bool isVisible() const;
51         
52         ///
53         bool eventFilter(QObject *, QEvent *);
54
55 protected:
56         void closeEvent (QCloseEvent * e);
57         void findText(QString const & text);
58
59 protected Q_SLOTS:
60         void cleanUp();
61         void on_okPB_clicked();
62         void on_cancelPB_clicked();
63         void on_restorePB_clicked();
64         void on_applyPB_clicked();
65         void on_addPB_clicked();
66         void on_deletePB_clicked();
67         void on_upPB_clicked();
68         void on_downPB_clicked();
69         void on_findLE_textChanged(const QString & text);
70         void on_caseCB_stateChanged(int);
71         void on_regexCB_stateChanged(int);
72         void on_selectedLV_clicked(const QModelIndex &);
73         void selectedChanged(const QModelIndex &, const QModelIndex &);
74         void on_availableLV_clicked(const QModelIndex &);
75         void on_availableLV_doubleClicked(const QModelIndex &);
76         void on_availableLV_entered(const QModelIndex &);
77         void availableChanged(const QModelIndex &, const QModelIndex &);
78         virtual void changed();
79         /// check whether key is already selected
80         bool isSelected(const QModelIndex &);
81         /// update infobox
82         void updateInfo(const QModelIndex &);
83
84 private:
85         /// enable/disable buttons
86         void setButtons();
87
88         /// fill the styles combo
89         void fillStyles();
90
91         /// set the styles combo
92         void updateStyle();
93         
94         /// last used citation style
95         int style_;
96         
97         QCitation * form_;
98 };
99
100 } // namespace frontend
101 } // namespace lyx
102
103 #endif // QCITATIOINDIALOG_H