]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QURL.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / QURL.h
index 6c420998949c12f916ce57dc4e8171107e4c7db7..ef65400af39c9a6f64088b382e0040b221f91c7d 100644 (file)
@@ -1,71 +1,42 @@
 // -*- C++ -*-
 /**
  * \file QURL.h
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author John Levon <moz@compsoc.man.ac.uk>
- * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef QURL_H
 #define QURL_H
 
-#include "DialogBase.h"
-#include "LString.h"
-#include "boost/utility.hpp"
-#include "insets/inseturl.h"
-
-class Dialogs;
-class LyXView;
-class QURLDialog;
+#ifdef __GNUG__
+#pragma interface
+#endif
 
-class QURL : public DialogBase {
-public: 
-       QURL(LyXView *, Dialogs *);
-       ~QURL();
+#include "Qt2Base.h"
 
-       /// Apply changes
-       void apply();
-       /// close the connections
-       void close();
-private: 
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
-       /// Update the dialog.
-       void update();
+class ControlUrl;
+class QURLDialog;
 
-       /// create a URL inset
-       void createUrl(string const &);
-       /// edit a URL inset
-       void showUrl(InsetCommand * const);
-       /// Real GUI implementation.
-       QURLDialog * dialog_;
 
-       /// the LyXView we belong to
-       LyXView * lv_;
-       /** Which Dialogs do we belong to?
-           Used so we can get at the signals we have to connect to.
-       */
-       Dialogs * d_;
-       /// pointer to the inset if any
-       InsetCommand * inset_;
-       /// insets params
-       InsetCommandParams params;
-       /// is the inset we are reading from a readonly buffer
-       bool readonly;
-       
-       /// Hide connection.
-       SigC::Connection h_;
-       /// Update connection.
-       SigC::Connection u_;
-       /// Inset hide connection.
-       SigC::Connection ih_;
+class QURL :
+       public Qt2CB<ControlUrl, Qt2DB<QURLDialog> >
+{
+public:
+       friend class QURLDialog;
+       QURL();
+protected:
+       virtual bool isValid();
+private:
+       /// apply dialog
+       virtual void apply();
+       /// build dialog
+       virtual void build_dialog();
+       /// update dialog
+       virtual void update_contents();
 };
 
 #endif // QURL_H