]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/QCitation.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QCitation.h
index 3b52393376ee177cda91df4e67516793696a68d8..807f2dde9f7a62ee154f860bbf3208a6e198fd2c 100644 (file)
 #ifndef QCITATION_H
 #define QCITATION_H
 
-#include "QDialogView.h"
+#include "ControlCitation.h"
 
 #include <QStringListModel>
 
 namespace lyx {
 namespace frontend {
 
-class ControlCitation;
-class QCitationDialog;
-
-
-class QCitation : public QController<ControlCitation, QView<QCitationDialog> >
+class QCitation : public ControlCitation
 {
 public:
-       friend class QCitationDialog;
        ///
        QCitation(Dialog &);
-
-       QStringListModel * available() 
+       /// Available keys
+       QStringListModel * available()
        { return &available_keys_; }
 
-       QStringListModel * selected() 
+       /// Selected keys
+       QStringListModel * selected()
        { return &selected_keys_; }
 
-       QStringListModel * found() 
+       /// Found keys
+       QStringListModel * found()
        { return &found_keys_; }
-       
-       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);
+       /// Text before cite
+       QString textBefore();
 
-protected:
-       virtual bool isValid();
+       /// Text after cite
+       QString textAfter();
+
+       /// Get key description
+       QString getKeyInfo(QString const &);
+
+       /// Find keys containing the string (not case-sens)
+       void findKey(QString const &);
+
+       /// Add key to selected keys
+       void addKey(QModelIndex const &);
 
-private:
+       /// 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);
+
+       /// Check whether there are keys to select
+       virtual bool isValid();
 
        /// Set the Params variable for the Controller.
-       virtual void apply();
-       /// Build the dialog.
-       virtual void build_dialog();
-       /// Hide the dialog.
-       virtual void hide();
+       virtual void apply(int const choice, bool const full, bool const force,
+                                         QString before, QString after);
+
        /// Update dialog before/whilst showing it.
-       virtual void update_contents();
+       virtual void updateModel();
 
+private:       
        /// available keys
        QStringListModel available_keys_;
 
@@ -72,6 +85,7 @@ private:
        QStringListModel found_keys_;
 };
 
+
 } // namespace frontend
 } // namespace lyx