2001-03-29 18:58:47 +00:00
|
|
|
// -*- C++ -*-
|
2001-08-19 13:25:15 +00:00
|
|
|
/**
|
|
|
|
* \file QCitation.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-29 18:58:47 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Kalle Dalheimer
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-08-19 13:25:15 +00:00
|
|
|
*/
|
2001-03-16 17:20:06 +00:00
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#ifndef QCITATION_H
|
|
|
|
#define QCITATION_H
|
2001-03-16 17:20:06 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "QDialogView.h"
|
2003-09-05 15:06:13 +00:00
|
|
|
#include <vector>
|
2003-02-25 14:51:38 +00:00
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
class QListBox;
|
2004-05-19 15:11:37 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2001-03-29 18:58:47 +00:00
|
|
|
class ControlCitation;
|
2001-08-19 13:25:15 +00:00
|
|
|
class QCitationDialog;
|
2002-08-12 14:28:43 +00:00
|
|
|
|
2001-03-16 17:20:06 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
class QCitation : public QController<ControlCitation, QView<QCitationDialog> >
|
2001-08-25 03:00:19 +00:00
|
|
|
{
|
2001-03-29 18:58:47 +00:00
|
|
|
public:
|
2002-10-20 01:48:28 +00:00
|
|
|
friend class QCitationDialog;
|
2001-06-05 17:05:51 +00:00
|
|
|
///
|
2003-02-25 14:51:38 +00:00
|
|
|
QCitation(Dialog &);
|
2004-06-21 08:56:43 +00:00
|
|
|
protected:
|
|
|
|
virtual bool isValid();
|
2001-03-29 18:58:47 +00:00
|
|
|
private:
|
|
|
|
|
2001-06-05 17:05:51 +00:00
|
|
|
/// Set the Params variable for the Controller.
|
|
|
|
virtual void apply();
|
|
|
|
/// Build the dialog.
|
2001-08-26 00:29:39 +00:00
|
|
|
virtual void build_dialog();
|
2001-06-05 17:05:51 +00:00
|
|
|
/// Hide the dialog.
|
|
|
|
virtual void hide();
|
|
|
|
/// Update dialog before/whilst showing it.
|
2001-08-25 20:04:15 +00:00
|
|
|
virtual void update_contents();
|
2001-03-29 18:58:47 +00:00
|
|
|
|
2002-01-20 17:02:09 +00:00
|
|
|
/// fill the styles combo
|
|
|
|
void fillStyles();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-01-20 17:02:09 +00:00
|
|
|
/// set the styles combo
|
|
|
|
void updateStyle();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
void updateBrowser(QListBox *, std::vector<std::string> const &) const;
|
2004-02-18 14:02:49 +00:00
|
|
|
/// check if apply has been pressed
|
|
|
|
bool open_find_;
|
2001-03-29 18:58:47 +00:00
|
|
|
|
2003-04-04 03:19:00 +00:00
|
|
|
/// selected keys
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::string> citekeys;
|
2003-04-04 03:19:00 +00:00
|
|
|
/// available bib keys
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::string> bibkeys;
|
2004-02-18 14:02:49 +00:00
|
|
|
/// selected natbib style
|
|
|
|
int style_;
|
2001-03-16 17:20:06 +00:00
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#endif // QCITATION_H
|