]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiNomencl.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiNomencl.h
index 2d9536ed570f4a497e33f2968ac035765eb8adf9..0b83d2e0e28d0e12a97f1c048ab7fec6c5809508 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 /**
- * \file GuiNomencl.h
+ * \file GuiNomenclature.h
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
  * Full author contact details are available in file CREDITS.
  */
 
-#ifndef GUINOMENCL_H
-#define GUINOMENCL_H
+#ifndef GUINOMENCLATURE_H
+#define GUINOMENCLATURE_H
 
-#include "GuiDialogView.h"
-#include "ControlCommand.h"
+#include "GuiDialog.h"
 #include "ui_NomenclUi.h"
 
-#include <QDialog>
-
+#include "insets/InsetCommandParams.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiNomencl;
-
-class GuiNomenclDialog : public QDialog, public Ui::NomenclUi {
+class GuiNomenclature : public GuiDialog, public Ui::NomenclUi
+{
        Q_OBJECT
-public:
-       GuiNomenclDialog(GuiNomencl * form);
-       virtual void show();
-protected Q_SLOTS:
-       virtual void change_adaptor();
-       virtual void reject();
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       GuiNomencl * form_;
-};
 
-
-class GuiNomencl : public GuiView<GuiNomenclDialog>
-{
 public:
-       friend class GuiNomenclDialog;
+       GuiNomenclature(GuiView & lv);
+
+private Q_SLOTS:
+       void change_adaptor();
+       void reject();
 
-       GuiNomencl(Dialog &, docstring const & title);
-       /// parent controller
-       ControlCommand & controller()
-       { return static_cast<ControlCommand &>(this->getController()); }
-       /// parent controller
-       ControlCommand const & controller() const
-       { return static_cast<ControlCommand const &>(this->getController()); }
-protected:
-       virtual bool isValid();
 private:
+       ///
+       bool isValid();
        /// Apply changes
-       virtual void apply();
+       void applyView();
        /// update
-       virtual void update_contents();
-       /// build the dialog
-       virtual void build_dialog();
+       void updateContents() {}
+       ///
+       bool initialiseParams(std::string const & data);
+       ///
+       void paramsToDialog(InsetCommandParams const & icp);
+       /// clean-up on hide.
+       void clearParams() { params_.clear(); }
+       /// clean-up on hide.
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+
+private:
+       ///
+       InsetCommandParams params_;
 };
 
 } // namespace frontend
 } // namespace lyx
 
-#endif // GUINOMENCL_H
+#endif // GUINOMENCLATURE_H