2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QCitationDialog.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Kalle Dalheimer
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QCITATIONDIALOG_H
|
|
|
|
#define QCITATIONDIALOG_H
|
|
|
|
|
2006-04-11 08:26:43 +00:00
|
|
|
#include "Dialog.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
#include "ui/QCitationUi.h"
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class QCitation;
|
|
|
|
|
2006-04-11 08:26:43 +00:00
|
|
|
class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::View {
|
2006-03-05 17:24:44 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2006-04-11 08:26:43 +00:00
|
|
|
QCitationDialog(Dialog &, QCitation * form );
|
|
|
|
|
|
|
|
virtual ~QCitationDialog();
|
|
|
|
|
|
|
|
virtual void apply();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-11 08:26:43 +00:00
|
|
|
/// Hide the dialog from sight
|
|
|
|
void hide();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-11 08:26:43 +00:00
|
|
|
/// Redraw the dialog (e.g. if the colors have been remapped).
|
|
|
|
void redraw() {}
|
2006-03-25 21:26:09 +00:00
|
|
|
|
2006-04-11 08:26:43 +00:00
|
|
|
/// Create the dialog if necessary, update it and display it.
|
|
|
|
void show();
|
|
|
|
|
|
|
|
/// Update the display of the dialog whilst it is still visible.
|
|
|
|
void update();
|
|
|
|
|
|
|
|
/// \return true if the dialog is visible.
|
|
|
|
bool isVisible() const;
|
2006-03-25 21:26:09 +00:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
|
|
|
|
void on_okPB_clicked();
|
|
|
|
void on_cancelPB_clicked();
|
|
|
|
void on_restorePB_clicked();
|
|
|
|
void on_applyPB_clicked();
|
|
|
|
void on_addPB_clicked();
|
|
|
|
void on_deletePB_clicked();
|
|
|
|
void on_upPB_clicked();
|
|
|
|
void on_downPB_clicked();
|
|
|
|
void on_findLE_textChanged(const QString & text);
|
2006-06-28 08:28:16 +00:00
|
|
|
void on_selectedLV_clicked(const QModelIndex &);
|
|
|
|
void on_availableLV_clicked(const QModelIndex &);
|
|
|
|
void on_availableLV_activated(const QModelIndex &);
|
2006-03-25 21:26:09 +00:00
|
|
|
virtual void changed();
|
2006-06-28 08:28:16 +00:00
|
|
|
/// check whether key is already selected
|
|
|
|
bool isSelected(const QModelIndex &);
|
|
|
|
/// update infobox
|
|
|
|
void updateInfo(const QModelIndex &);
|
2006-03-25 21:26:09 +00:00
|
|
|
|
|
|
|
private:
|
2006-06-28 08:28:16 +00:00
|
|
|
/// enable/disable buttons
|
2006-03-05 17:24:44 +00:00
|
|
|
void setButtons();
|
|
|
|
|
2006-03-25 21:26:09 +00:00
|
|
|
/// fill the styles combo
|
|
|
|
void fillStyles();
|
|
|
|
|
|
|
|
/// set the styles combo
|
|
|
|
void updateStyle();
|
|
|
|
|
2006-06-28 08:28:16 +00:00
|
|
|
/// last used citation style
|
2006-03-25 21:26:09 +00:00
|
|
|
int style_;
|
|
|
|
|
|
|
|
QCitation * form_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // QCITATIOINDIALOG_H
|