2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QCitation.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Kalle Dalheimer
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QCITATION_H
|
|
|
|
#define QCITATION_H
|
|
|
|
|
|
|
|
#include "QDialogView.h"
|
|
|
|
|
2006-03-25 21:26:09 +00:00
|
|
|
#include <QStringListModel>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class ControlCitation;
|
|
|
|
class QCitationDialog;
|
|
|
|
|
|
|
|
|
|
|
|
class QCitation : public QController<ControlCitation, QView<QCitationDialog> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
friend class QCitationDialog;
|
|
|
|
///
|
|
|
|
QCitation(Dialog &);
|
2006-03-25 21:26:09 +00:00
|
|
|
|
2006-04-05 23:56:29 +00:00
|
|
|
QStringListModel * available()
|
2006-03-25 21:26:09 +00:00
|
|
|
{ return &available_keys_; }
|
|
|
|
|
2006-04-05 23:56:29 +00:00
|
|
|
QStringListModel * selected()
|
2006-03-25 21:26:09 +00:00
|
|
|
{ return &selected_keys_; }
|
|
|
|
|
2006-04-05 23:56:29 +00:00
|
|
|
QStringListModel * found()
|
2006-03-25 21:26:09 +00:00
|
|
|
{ return &found_keys_; }
|
2006-04-05 23:56:29 +00:00
|
|
|
|
2006-03-25 21:26:09 +00:00
|
|
|
QModelIndex findKey(QString const & str, QModelIndex const & index) const;
|
|
|
|
QModelIndex findKey(QString const & str) const;
|
|
|
|
|
|
|
|
void addKeys(QModelIndexList const & indexes);
|
|
|
|
void deleteKeys(QModelIndexList const & indexes);
|
|
|
|
void upKey(QModelIndexList const & indexes);
|
|
|
|
void downKey(QModelIndexList const & indexes);
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
protected:
|
|
|
|
virtual bool isValid();
|
2006-03-25 21:26:09 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
/// Set the Params variable for the Controller.
|
|
|
|
virtual void apply();
|
|
|
|
/// Build the dialog.
|
|
|
|
virtual void build_dialog();
|
|
|
|
/// Hide the dialog.
|
|
|
|
virtual void hide();
|
|
|
|
/// Update dialog before/whilst showing it.
|
|
|
|
virtual void update_contents();
|
|
|
|
|
2006-03-25 21:26:09 +00:00
|
|
|
/// available keys
|
|
|
|
QStringListModel available_keys_;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
/// selected keys
|
2006-03-25 21:26:09 +00:00
|
|
|
QStringListModel selected_keys_;
|
|
|
|
|
|
|
|
/// found keys
|
|
|
|
QStringListModel found_keys_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // QCITATION_H
|