-/* This file is part of
- * ======================================================
+/**
+ * \file Dialogs.C
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
*
- * LyX, The Document Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
- *
- * ======================================================
*/
#include <config.h>
-#include "Dialogs.h"
-#include "FormCharacter.h"
-#include "FormCitation.h"
-#include "FormCopyright.h"
-#include "FormDocument.h"
-#include "FormError.h"
-#include "FormGraphics.h"
-#include "FormIndex.h"
-#include "FormParagraph.h"
-#include "FormPreferences.h"
-#include "FormPrint.h"
-#include "FormRef.h"
-#include "FormSearch.h"
-#include "FormTabular.h"
-#include "FormTabularCreate.h"
-#include "FormToc.h"
-#include "FormUrl.h"
-
#ifdef __GNUG__
#pragma implementation
#endif
-using std::endl;
+// the dialog definitions
+#include "QAboutDialog.h"
+#include "QCitationDialog.h"
+#include "QIndexDialog.h"
+#include "QURLDialog.h"
+
+// the controller interface
+#include "QAbout.h"
+#include "QCharacter.h"
+#include "QCitation.h"
+#include "QIndex.h"
+#include "QParagraph.h"
+#include "QPrint.h"
+#include "QSearch.h"
+#include "QSplash.h"
+#include "QTabularCreate.h"
+#include "QURL.h"
-// temporary till ported
-extern void ShowCredits();
+#include "QtLyXView.h"
+#include "Dialogs.h"
+#include "BufferView.h"
+#include "buffer.h"
+#include "Qt2BC.h"
+// xforms implementations
+#include "../xforms/FormError.h"
+#include "../xforms/FormGraphics.h"
+#include "../xforms/FormPreferences.h"
+#include "../xforms/FormTabular.h"
-// Signal enabling all visible popups to be redrawn if so desired.
-// E.g., when the GUI colours have been remapped.
-Signal0<void> Dialogs::redrawGUI;
+// the controllers
+#include "controllers/ControlAboutlyx.h"
+#include "controllers/ControlCitation.h"
+#include "controllers/ControlIndex.h"
+#include "controllers/ControlSplash.h"
+#include "controllers/ControlUrl.h"
+#if 0
+#include "controllers/ControlCopyright.h"
+#include "controllers/ControlCredits.h"
+#include "controllers/ControlBibitem.h"
+#include "controllers/ControlBibtex.h"
+#include "controllers/ControlButtons.h"
+#include "controllers/ControlCharacter.h"
+#include "controllers/ControlCitation.h"
+#include "controllers/ControlCommand.h"
+#include "controllers/ControlERT.h"
+#include "controllers/ControlError.h"
+#include "controllers/ControlExternal.h"
+#include "controllers/ControlFloat.h"
+#include "controllers/ControlGraphics.h"
+#include "controllers/ControlInclude.h"
+#include "controllers/ControlLabel.h"
+#include "controllers/ControlLog.h"
+#include "controllers/ControlMinipage.h"
+#include "controllers/ControlPreamble.h"
+#include "controllers/ControlPrint.h"
+#include "controllers/ControlRef.h"
+#include "controllers/ControlSearch.h"
+#include "controllers/ControlSpellchecker.h"
+#include "controllers/ControlTabularCreate.h"
+#include "controllers/ControlThesaurus.h"
+#include "controllers/ControlToc.h"
+#include "controllers/ControlVCLog.h"
+#endif
+
+#include "GUI.h"
+
+// this makes no real sense for Qt2
+SigC::Signal0<void> Dialogs::redrawGUI;
Dialogs::Dialogs(LyXView * lv)
{
- dialogs_.push_back(new FormCharacter(lv, this));
- dialogs_.push_back(new FormCitation(lv, this));
- dialogs_.push_back(new FormCopyright(lv, this));
- dialogs_.push_back(new FormDocument(lv, this));
- dialogs_.push_back(new FormError(lv, this));
- dialogs_.push_back(new FormGraphics(lv, this));
- dialogs_.push_back(new FormIndex(lv, this));
- dialogs_.push_back(new FormParagraph(lv, this));
- dialogs_.push_back(new FormPreferences(lv, this));
- dialogs_.push_back(new FormPrint(lv, this));
- dialogs_.push_back(new FormRef(lv, this));
- dialogs_.push_back(new FormSearch(lv, this));
- dialogs_.push_back(new FormTabular(lv, this));
- dialogs_.push_back(new FormTabularCreate(lv, this));
- dialogs_.push_back(new FormToc(lv, this));
- dialogs_.push_back(new FormUrl(lv, this));
+ splash_.reset(new QSplash(lv, this));
- showCredits.connect(slot(ShowCredits));
+ // dialogs that have been converted to new scheme
+ add(new GUICitation<QCitation, Qt2BC>(*lv, *this));
+ add(new GUIAboutlyx<QAbout, Qt2BC>(*lv, *this));
+ add(new GUIIndex<QIndex, Qt2BC>(*lv, *this));
+ add(new GUIUrl<QURL, Qt2BC>(*lv, *this));
// reduce the number of connections needed in
// dialogs by a simple connection here.
hideAll.connect(hideBufferDependent.slot());
}
-
-
-Dialogs::~Dialogs()
-{
- for (vector<DialogBase *>::iterator iter = dialogs_.begin();
- iter != dialogs_.end();
- ++iter) {
- delete *iter;
- }
-}