lyx_mirror/src/frontends/qt4/QCitation.h
Edwin Leuven 2c832e6578 more cleanup:
- clear selected keys on ok/cancel
 - update info when navigating with keyboard
 - add clear search button
 - don't allow search strings that return empty selection

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16277 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-15 09:58:44 +00:00

90 lines
1.8 KiB
C++

// -*- 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 "ControlCitation.h"
#include <QStringListModel>
namespace lyx {
namespace frontend {
class QCitation : public ControlCitation
{
public:
///
QCitation(Dialog &);
/// Available keys
QStringListModel * available() { return &available_keys_; }
/// Selected keys
QStringListModel * selected() { return &selected_keys_; }
/// Found keys
QStringListModel * found() { return &found_keys_; }
/// Text before cite
QString textBefore();
/// Text after cite
QString textAfter();
/// Get key description
QString getKeyInfo(QString const &);
/// Clear selected keys
void clearSelection();
/// Find keys containing the string (not case-sens)
void findKey(QString const &);
/// Add key to selected keys
void addKey(QModelIndex const &);
/// Delete key from selected keys
void deleteKey(QModelIndex const &);
/// Move selected key one place up
void upKey(QModelIndex const &);
/// Move selected key one place down
void downKey(QModelIndex const &);
/// List of example cite strings
QStringList citationStyles(int);
/// Set the Params variable for the Controller.
virtual void apply(int const choice, bool const full, bool const force,
QString before, QString after);
/// Update dialog before/whilst showing it.
virtual void updateModel();
private:
/// available keys
QStringListModel available_keys_;
/// selected keys
QStringListModel selected_keys_;
/// found keys
QStringListModel found_keys_;
};
} // namespace frontend
} // namespace lyx
#endif // QCITATION_H