]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QParagraph.h
Some Qt graphics dialog improvements. Yet more work needed :/
[lyx.git] / src / frontends / qt2 / QParagraph.h
index 90ce3989d8aecb333c2df91908b43d560fe7a7d5..2c5d5cd996f4f9c68dc33c70a4ac686949cc30d7 100644 (file)
@@ -4,52 +4,37 @@
  * Copyright 2001 LyX Team
  * see the file COPYING
  *
- * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven <leuven@fee.uva.nl>
+ * \author John Levon <moz@compsoc.man.ac.uk>
  */
 
 #ifndef QPARAGRAPH_H
 #define QPARAGRAPH_H
 
-#include "DialogBase.h"
-#include "LString.h"
-#include "boost/utility.hpp"
+#include <config.h>
+#include "Qt2Base.h"
 
-class Dialogs;
-class LyXView;
+class ControlParagraph;
 class QParagraphDialog;
 
-class QParagraph : public DialogBase {
-public:
-       QParagraph(LyXView *, Dialogs *);
-       ~QParagraph();
-
-       /// Apply changes
-       void apply();
-       /// Update the dialog.
-       void update(bool switched = false);
-       /// Close the connections
-       void close();
-
-private:
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
 
-       /// Real GUI implementation.
-       QParagraphDialog * dialog_;
+class QParagraph :
+       public Qt2CB<ControlParagraph, Qt2DB<QParagraphDialog> >
+{
+       friend class QParagraphDialog;
 
-       /// the LyXView we belong to
-       LyXView * lv_;
-
-       /// Used so we can get at the signals we have to connect to.
-       Dialogs * d_;
-
-       /// Hide connection.
-       SigC::Connection h_;
+public:
+       QParagraph();
 
-       /// readonly file or not
-       bool readonly;
+private:
+       /// Apply changes
+       virtual void apply();
+       /// update
+       virtual void update_contents();
+       /// build the dialog
+       virtual void build_dialog();
+       
+       std::vector<string> units_;
 };
 
 #endif // QPARAGRAPH_H