]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/QCitationDialog.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QCitationDialog.h
index 712fcc81505ad6da1948bcac5f190d61d15e7774..46fd7ffe0bf146a7cb3ca269de73958f48d4ad83 100644 (file)
 #ifndef QCITATIONDIALOG_H
 #define QCITATIONDIALOG_H
 
+#include "Dialog.h"
 #include "ui/QCitationUi.h"
-#include "ui/QCitationFindUi.h"
-#include "controllers/biblio.h"
-#include <QDialog>
 
 namespace lyx {
 namespace frontend {
 
 class QCitation;
 
-class QCitationDialog : public QDialog, public Ui::QCitationUi {
+class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::View {
        Q_OBJECT
 
 public:
-       QCitationDialog(QCitation * form);
+       QCitationDialog(Dialog &, QCitation * form );
 
-       ~QCitationDialog();
+       virtual ~QCitationDialog();
 
-       void setButtons();
-       /// open the find dialog if nothing selected
-       void openFind();
+       virtual void apply();
+
+       /// Hide the dialog from sight
+       void hide();
+
+       /// Redraw the dialog (e.g. if the colors have been remapped).
+       void redraw() {}
+
+       /// Create the dialog if necessary, update it and display it.
+       void show();
+
+       /// Update the display of the dialog whilst it is still visible.
+       void update();
 
-       Ui::QCitationFindUi ui_;
-       QDialog * add_;
+       /// \return true if the dialog is visible.
+       bool isVisible() const;
 
-protected slots:
+protected Q_SLOTS:
 
-       virtual void availableChanged();
-       virtual void selectedChanged();
-       virtual void up();
-       virtual void down();
-       virtual void del();
-       virtual void addCitation();
-       virtual void add();
-       virtual void previous();
-       virtual void next();
-       virtual void changed_adaptor();
+       void on_okPB_clicked();
+       void on_cancelPB_clicked();
+       void on_restorePB_clicked();
+       void on_applyPB_clicked();
+       void on_addPB_clicked();
+       void on_deletePB_clicked();
+       void on_upPB_clicked();
+       void on_downPB_clicked();
+       void on_findLE_textChanged(const QString & text);
+       void on_selectedLV_clicked(const QModelIndex &);
+       void on_availableLV_clicked(const QModelIndex &);
+       void on_availableLV_activated(const QModelIndex &);
+       virtual void changed();
+       /// check whether key is already selected
+       bool isSelected(const QModelIndex &);
+       /// update infobox
+       void updateInfo(const QModelIndex &);
 
 private:
-       void find(biblio::Direction dir);
+       /// enable/disable buttons
+       void setButtons();
+
+       /// fill the styles combo
+       void fillStyles();
+
+       /// set the styles combo
+       void updateStyle();
+
+       /// last used citation style
+       int style_;
 
        QCitation * form_;
 };
 
+
 } // namespace frontend
 } // namespace lyx