]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialogs.C
compile fix for OS X
[lyx.git] / src / frontends / qt4 / Dialogs.C
index d3ef9a657e9aedb86d31ae8a1b261f01c8d02a01..e5248d16b7d28191218a5d91a3a4284095d22d7c 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \file qt2/Dialogs.C
+ * \file qt4/Dialogs.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
@@ -18,7 +18,6 @@
 #include "ControlBranch.h"
 #include "ControlChanges.h"
 #include "ControlCharacter.h"
-#include "ControlCitation.h"
 #include "ControlDocument.h"
 #include "ControlErrorList.h"
 #include "ControlERT.h"
@@ -27,6 +26,7 @@
 #include "ControlGraphics.h"
 #include "ControlInclude.h"
 #include "ControlLog.h"
+#include "ControlViewSource.h"
 #include "ControlMath.h"
 #include "ControlNote.h"
 #include "ControlParagraph.h"
@@ -39,7 +39,6 @@
 #include "ControlSpellchecker.h"
 #include "ControlTabular.h"
 #include "ControlTabularCreate.h"
-#include "ControlToc.h"
 #include "ControlVSpace.h"
 #include "ControlWrap.h"
 
@@ -53,6 +52,7 @@
 #include "QChanges.h"
 #include "QCharacter.h"
 #include "QCitation.h"
+#include "QCitationDialog.h"
 #include "QDocument.h"
 #include "QErrorList.h"
 #include "QERT.h"
@@ -66,6 +66,7 @@
 #include "QInclude.h"
 #include "QIndex.h"
 #include "QLog.h"
+#include "QViewSource.h"
 #include "QMath.h"
 #include "QNote.h"
 #include "QParagraph.h"
@@ -80,7 +81,7 @@
 #include "QTabularCreate.h"
 #include "QTexinfo.h"
 #include "QToc.h"
-#include "q3url.h"
+#include "QTocDialog.h"
 #include "QVSpace.h"
 #include "QWrap.h"
 
@@ -103,7 +104,7 @@ namespace {
 char const * const dialognames[] = {
 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
 "citation", "document", "errorlist", "ert", "external", "file",
-"findreplace", "float", "graphics", "include", "index", "label", "log",
+"findreplace", "float", "graphics", "include", "index", "label", "log", "view-source",
 "mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph", "preamble",
 "prefs", "print", "ref", "sendto", "spellchecker","tabular", "tabularcreate",
 
@@ -173,8 +174,9 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
                dialog->setView(new QCharacter(*dialog));
                dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
        } else if (name == "citation") {
-               dialog->setController(new ControlCitation(*dialog));
-               dialog->setView(new QCitation(*dialog));
+               QCitation * ci = new QCitation(*dialog);
+               dialog->setController(ci);
+               dialog->setView(new QCitationDialog(*dialog, ci));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "document" || name == "preamble") {
 
@@ -243,6 +245,10 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
                dialog->setController(new ControlLog(*dialog));
                dialog->setView(new QLog(*dialog));
                dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "view-source") {
+               dialog->setController(new ControlViewSource(*dialog));
+               dialog->setView(new QViewSource(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
        } else if (name == "mathpanel") {
                dialog->setController(new ControlMath(*dialog));
                dialog->setView(new QMath(*dialog));
@@ -272,7 +278,8 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
                dialog->setView(new QPrint(*dialog));
                dialog->bc().bp(new OkApplyCancelPolicy);
        } else if (name == "ref") {
-               dialog->setController(new ControlRef(*dialog));
+               // full qualification because qt4 has also a ControlRef type
+               dialog->setController(new lyx::frontend::ControlRef(*dialog));
                dialog->setView(new QRef(*dialog));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "sendto") {
@@ -302,8 +309,9 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
                dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
 #endif
        } else if (name == "toc") {
-               dialog->setController(new ControlToc(*dialog));
-               dialog->setView(new QToc(*dialog));
+               QToc * qtoc = new QToc(*dialog);
+               dialog->setController(qtoc);
+               dialog->setView(new QTocDialog(*dialog, qtoc));
                dialog->bc().bp(new OkCancelPolicy);
        } else if (name == "url") {
                dialog->setController(new ControlCommand(*dialog, name));