mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-23 08:39:07 +00:00
44efd43a1b
- now simple citation insertion can be done with the keyboard only (enter key will close the dialog and insert the chosen key). - now search also within bib entry information (very fast) - new case sensitive option - new regex option. - QCitation: code simplified, some code went to ControlCitation. - QCitationDialog: code simplified - lots of polish in the dialogs... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17539 a592a061-630c-0410-9148-cb99ea01b6c8
100 lines
2.1 KiB
C++
100 lines
2.1 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
|
|
* \author Abdelrazak Younes
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef QCITATION_H
|
|
#define QCITATION_H
|
|
|
|
#include "frontends/controllers/ControlCitation.h"
|
|
|
|
#include <QStringList>
|
|
#include <QStringListModel>
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class QCitation : public ControlCitation
|
|
{
|
|
public:
|
|
///
|
|
QCitation(Dialog &);
|
|
virtual ~QCitation() {}
|
|
virtual bool initialiseParams(std::string const & data);
|
|
|
|
///
|
|
void init();
|
|
|
|
/// Available keys
|
|
QStringListModel * available() { return &available_model_; }
|
|
|
|
/// Selected keys
|
|
QStringListModel * selected() { return &selected_model_; }
|
|
|
|
/// 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 a string.
|
|
void findKey(
|
|
QString const & str, //< string expression
|
|
bool only_keys, //< set to true if only keys shall be searched.
|
|
bool case_sensitive, //< set to true for case sensitive search.
|
|
bool reg_exp //< set to true if \c str is a regular expression.
|
|
);
|
|
|
|
/// 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);
|
|
|
|
private:
|
|
/// available keys.
|
|
QStringListModel available_model_;
|
|
|
|
/// selected keys.
|
|
QStringListModel selected_model_;
|
|
|
|
/// All keys.
|
|
QStringList all_keys_;
|
|
|
|
/// Cited keys.
|
|
QStringList cited_keys_;
|
|
};
|
|
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // QCITATION_H
|