]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBibtex.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiBibtex.h
index bccbb25c9013aac05f0f61dd91a35dd6bc66b7c2..3ce3ada32d5031665519c8972927f94e9c25eade 100644 (file)
@@ -5,6 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author John Levon
+ * \author Angus Leeming
  *
  * Full author contact details are available in file CREDITS.
  */
 #define GUIBIBTEX_H
 
 #include "GuiDialog.h"
-#include "ControlBibtex.h"
 #include "ButtonController.h"
 #include "ui_BibtexUi.h"
 #include "ui_BibtexAddUi.h"
 
+#include "insets/InsetCommandParams.h"
+
+
 namespace lyx {
 namespace frontend {
 
@@ -32,12 +35,12 @@ public:
 };
 
 
-class GuiBibtexDialog : public GuiDialog, public Ui::BibtexUi
+class GuiBibtex : public GuiDialog, public Ui::BibtexUi
 {
        Q_OBJECT
 
 public:
-       GuiBibtexDialog(LyXView & lv);
+       explicit GuiBibtex(GuiView & lv);
 
 private Q_SLOTS:
        void change_adaptor();
@@ -46,23 +49,51 @@ private Q_SLOTS:
        void addPressed();
        void addDatabase();
        void deletePressed();
+       void upPressed();
+       void downPressed();
        void databaseChanged();
        void availableChanged();
        void bibEDChanged();
+       void rescanClicked();
 
 private:
-       void closeEvent(QCloseEvent * e);
-
-private:
-       /// parent controller
-       ControlBibtex & controller();
        ///
-       virtual bool isValid();
+       bool isValid();
        /// Apply changes
-       virtual void applyView();
+       void applyView();
        /// update
-       virtual void updateContents();
+       void updateContents();
+
+       /// Browse for a .bib file
+       QString browseBib(QString const & in_name) const;
+       /// Browse for a .bst file
+       QString browseBst(QString const & in_name) const;
+       /// get the list of bst files
+       QStringList bibStyles() const;
+       /// get the list of bib files
+       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;
+       /// do we use bibtopic (for sectioned bibliography)?
+       bool usingBibtopic() const;
+       /// should we put the bibliography to the TOC?
+       bool bibtotoc() const;
+       /// which stylefile do we use?
+       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_;
        ///