]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/Qt2Base.C
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / Qt2Base.C
index 71bf92afd5ce44eaa6aa43e3d8fbbccc70240bef..94f63475f9c02ef829b02011da73885c41bfa9d2 100644 (file)
@@ -1,13 +1,11 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file Qt2Base.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *                LyX, The Document Processor
+ * \author Angus Leeming
  *
- *                Copyright 2000 The LyX Team.
- *
- * ======================================================
- *
- * \author Angus Leeming <a.leeming@ic.ac.uk>
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 #endif
 
 #include <qdialog.h>
-#include <qapplication.h> 
+#include <qapplication.h>
 
-#include "debug.h" 
-#include "QtLyXView.h" 
+#include "debug.h"
+#include "QtLyXView.h"
 #include "Dialogs.h"
 #include "Qt2Base.h"
 #include "Qt2BC.h"
+#include "ControlButtons.h"
 #include "support/LAssert.h"
 
-Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
-       : ViewBC<Qt2BC>(c), updating_(false), title_(t)
+
+Qt2Base::Qt2Base(QString const & t)
+       : ViewBase(), updating_(false), title_(t)
 {}
 
 
+Qt2BC & Qt2Base::bc()
+{
+       return static_cast<Qt2BC &>(getController().bc());
+       // return dynamic_cast<Qt2BC &>(getController().bc());
+}
+
+
 void Qt2Base::show()
 {
        if (!form()) {
@@ -62,16 +69,14 @@ bool Qt2Base::isValid()
        return true;
 }
 
+
 void Qt2Base::changed()
 {
-       lyxerr << "got changed() during updating:" << updating_ << std::endl;
        if (updating_)
                return;
+
        if (isValid())
-               bc().valid(); 
+               bc().valid();
        else
                bc().invalid();
 }
@@ -79,29 +84,29 @@ void Qt2Base::changed()
 
 void Qt2Base::slotWMHide()
 {
-       CancelButton();
+       getController().CancelButton();
 }
 
 
 void Qt2Base::slotApply()
 {
-       ApplyButton();
+       getController().ApplyButton();
 }
 
 
 void Qt2Base::slotOK()
 {
-       OKButton();
+       getController().OKButton();
 }
 
 
 void Qt2Base::slotClose()
 {
-       CancelButton();
+       getController().CancelButton();
 }
 
 
 void Qt2Base::slotRestore()
 {
-       RestoreButton();
+       getController().RestoreButton();
 }