3 * \file QCitationDialog.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Kalle Dalheimer
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
13 #ifndef QCITATIONDIALOG_H
14 #define QCITATIONDIALOG_H
17 #include "ui_CitationUi.h"
19 #include <QCloseEvent>
27 class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::View {
31 QCitationDialog(Dialog &, QCitation * form );
33 virtual ~QCitationDialog();
37 /// Hide the dialog from sight
40 /// Redraw the dialog (e.g. if the colors have been remapped).
43 /// Create the dialog if necessary, update it and display it.
46 /// Update the display of the dialog whilst it is still visible.
49 /// \return true if the dialog is visible.
50 bool isVisible() const;
53 bool eventFilter(QObject *, QEvent *);
56 void closeEvent (QCloseEvent * e);
57 /// prepares a call to QCitation::searchKeys when we
58 /// are ready to search the BibTeX entries
59 void findText(QString const & text, bool reset = false);
60 /// check whether key is already selected
61 bool isSelected(const QModelIndex &);
62 /// update the display of BibTeX information
63 void updateInfo(QListView const * const);
67 void on_okPB_clicked();
68 void on_cancelPB_clicked();
69 void on_restorePB_clicked();
70 void on_applyPB_clicked();
71 void on_addPB_clicked();
72 void on_deletePB_clicked();
73 void on_upPB_clicked();
74 void on_downPB_clicked();
75 void on_findLE_textChanged(const QString & text);
76 void on_fieldsCO_currentIndexChanged(int index);
77 void on_entriesCO_currentIndexChanged(int index);
78 void on_caseCB_stateChanged(int);
79 void on_regexCB_stateChanged(int);
80 void on_selectedLV_clicked(const QModelIndex &);
81 void selectedChanged(const QModelIndex &, const QModelIndex &);
82 void on_availableLV_clicked(const QModelIndex &);
83 void on_availableLV_doubleClicked(const QModelIndex &);
84 void availableChanged(const QModelIndex &, const QModelIndex &);
85 virtual void changed();
88 /// enable/disable buttons
90 /// fill the styles combo
92 /// fill the fields combo
94 /// fill the entries combo
96 /// set the styles combo
98 /// performs a limited update, suitable for internal call
100 /// last used citation style
102 /// which of available and selected is "focused", in the sense
103 /// of which one should be used for updating the info via updateInfo().
104 /// true, obviously, if it is availableLV.
105 bool availableFocused_;
110 } // namespace frontend
113 #endif // QCITATIOINDIALOG_H