]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBibtex.h
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiBibtex.h
index c2df10317bdee2ad383ef1aa5bef641c4860e1c7..4dbe107fa6233e66841175d9de77ab053f96146e 100644 (file)
 #include "ui_BibtexUi.h"
 #include "ui_BibtexAddUi.h"
 
-#include "support/docstring.h"
+#include "insets/InsetCommandParams.h"
 
-#include <vector>
 
 namespace lyx {
-
-namespace support { class FileFilterList; }
-
 namespace frontend {
 
 class GuiBibtexAddDialog : public QDialog, public Ui::BibtexAddUi
@@ -35,18 +31,20 @@ public:
        {
                Ui::BibtexAddUi::setupUi(this);
                QDialog::setModal(true);
+               setWindowModality(Qt::WindowModal);
        }
 };
 
 
-class GuiBibtex : public GuiCommand, public Ui::BibtexUi
+class GuiBibtex : public GuiDialog, public Ui::BibtexUi
 {
        Q_OBJECT
 
 public:
-       GuiBibtex(GuiView & lv);
+       explicit GuiBibtex(GuiView & lv);
 
 private Q_SLOTS:
+       void addBBClicked(QAbstractButton * button);
        void change_adaptor();
        void browsePressed();
        void browseBibPressed();
@@ -58,9 +56,7 @@ private Q_SLOTS:
        void databaseChanged();
        void availableChanged();
        void bibEDChanged();
-
-private:
-       void closeEvent(QCloseEvent * e);
+       void rescanClicked();
 
 private:
        ///
@@ -71,15 +67,13 @@ private:
        void updateContents();
 
        /// Browse for a .bib file
-       docstring const browseBib(docstring const & in_name) const;
-
+       QString browseBib(QString const & in_name) const;
        /// Browse for a .bst file
-       docstring const browseBst(docstring const & in_name) const;
-
+       QString browseBst(QString const & in_name) const;
        /// get the list of bst files
-       void getBibStyles(std::vector<std::string> & data) const;
+       QStringList bibStyles() const;
        /// get the list of bib files
-       void getBibFiles(std::vector<std::string> & data) const;
+       QStringList bibFiles() const;
        /// build filelists of all availabe bib/bst/cls/sty-files. done through
        /// kpsewhich and an external script, saved in *Files.lst
        void rescanBibStyles() const;
@@ -87,9 +81,23 @@ private:
        bool usingBibtopic() const;
        /// should we put the bibliography to the TOC?
        bool bibtotoc() const;
+       /// do we use biblatex?
+       bool usingBiblatex() const;
        /// which stylefile do we use?
-       std::string const getStylefile() const;
+       QString styleFile() const;
 
+       ///
+       bool initialiseParams(std::string const & data);
+       /// clean-up on hide.
+       void clearParams() { params_.clear(); }
+       /// clean-up on hide.
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+
+private:
+       ///
+       InsetCommandParams params_;
        ///
        GuiBibtexAddDialog * add_;
        ///