+2001-08-26 John Levon <moz@compsoc.man.ac.uk>
+
+ * Dialogs.C:
+ * Makefile.am:
+ * Makefile.dialogs:
+ * QError.[Ch]:
+ * QErrorDialog.[Ch]:
+ * ui/QErrorDialog.ui: add LaTeX error dialog
+
2001-08-26 John Levon <moz@compsoc.man.ac.uk>
* Dialogs.C:
#include "QBibtexDialog.h"
#include "QCharacterDialog.h"
#include "QCitationDialog.h"
+#include "QErrorDialog.h"
#include "QIndexDialog.h"
#include "QRefDialog.h"
#include "QURLDialog.h"
#include "QBibtex.h"
#include "QCharacter.h"
#include "QCitation.h"
+#include "QError.h"
#include "QIndex.h"
#include "QParagraph.h"
#include "QPrint.h"
#include "controllers/ControlBibtex.h"
#include "controllers/ControlCharacter.h"
#include "controllers/ControlCitation.h"
+#include "controllers/ControlError.h"
#include "controllers/ControlIndex.h"
#include "controllers/ControlRef.h"
#include "controllers/ControlSplash.h"
#include "controllers/ControlButtons.h"
#include "controllers/ControlCitation.h"
#include "controllers/ControlERT.h"
-#include "controllers/ControlError.h"
#include "controllers/ControlExternal.h"
#include "controllers/ControlFloat.h"
#include "controllers/ControlGraphics.h"
add(new GUIBibitem<QBibitem, Qt2BC>(*lv, *this));
add(new GUIBibtex<QBibtex, Qt2BC>(*lv, *this));
add(new GUICharacter<QCharacter, Qt2BC>(*lv, *this));
+ add(new GUIError<QError, Qt2BC>(*lv, *this));
add(new GUIIndex<QIndex, Qt2BC>(*lv, *this));
add(new GUIRef<QRef, Qt2BC>(*lv, *this));
add(new GUIUrl<QURL, Qt2BC>(*lv, *this));
../xforms/FormBaseDeprecated.lo \
../xforms/FormBrowser.lo \
../xforms/FormDocument.lo \
- ../xforms/FormError.lo \
../xforms/FormExternal.lo \
../xforms/FormGraphics.lo \
../xforms/FormInclude.lo \
QCharacter \
QCitation \
QDocument \
+ QError \
QIndex \
QParagraph \
QPrint \
QCitation.C QCitationDialog.C \
QDocument.h QDocumentDialog.h \
QDocument.C QDocumentDialog.C \
+ QError.h QErrorDialog.h \
+ QError.C QErrorDialog.C \
QIndex.h QIndexDialog.h \
QIndex.C QIndexDialog.C \
QParagraph.h QParagraphDialog.h \
QCharacterDialog_moc.C \
QCitationDialog_moc.C \
QDocumentDialog_moc.C \
+ QErrorDialog_moc.C \
QIndexDialog_moc.C \
QParagraphDialog_moc.C \
QPrintDialog_moc.C \
QCitationDialogBase.C \
QDocumentDialogBase.h \
QDocumentDialogBase.C \
+ QErrorDialogBase.C \
+ QErrorDialogBase.h \
QIndexDialogBase.h \
QIndexDialogBase.C \
QParagraphDialogBase.h \
QCharacterDialogBase_moc.C \
QCitationDialogBase_moc.C \
QDocumentDialogBase_moc.C \
+ QErrorDialogBase_moc.C \
QIndexDialogBase_moc.C \
QParagraphDialogBase_moc.C \
QPrintDialogBase_moc.C \
--- /dev/null
+/**
+ * \file QError.C
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
+
+#include <config.h>
+
+#include "QErrorDialog.h"
+#include "ControlError.h"
+#include "QError.h"
+#include "Qt2BC.h"
+#include "gettext.h"
+
+#include <qtextview.h>
+#include <qpushbutton.h>
+
+typedef Qt2CB<ControlError, Qt2DB<QErrorDialog> > base_class;
+
+QError::QError(ControlError & c)
+ : base_class(c, _("LaTeX Error"))
+{
+}
+
+
+void QError::build_dialog()
+{
+ dialog_.reset(new QErrorDialog(this));
+
+ bc().setCancel(dialog_->closePB);
+}
+
+
+void QError::update_contents()
+{
+ dialog_->errorTV->setText(controller().params().c_str());
+}
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file QError.h
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
+
+#ifndef QERROR_H
+#define QERROR_H
+
+#include "Qt2Base.h"
+
+class ControlError;
+class QErrorDialog;
+
+class QError :
+ public Qt2CB<ControlError, Qt2DB<QErrorDialog> >
+{
+ friend class QErrorDialog;
+
+public:
+ QError(ControlError &);
+
+private:
+ /// Apply changes
+ virtual void apply() {};
+ /// update
+ virtual void update_contents();
+ /// build the dialog
+ virtual void build_dialog();
+};
+
+#endif // QERROR_H
--- /dev/null
+/**
+ * \file QErrorDialog.C
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
+
+#include "QErrorDialog.h"
+#include "Dialogs.h"
+#include "QError.h"
+
+#include <qwidget.h>
+#include <qpushbutton.h>
+
+QErrorDialog::QErrorDialog(QError * form)
+ : QErrorDialogBase(0, 0, false, 0),
+ form_(form)
+{
+ connect(closePB, SIGNAL(clicked()),
+ form, SLOT(slotClose()));
+}
+
+
+void QErrorDialog::closeEvent(QCloseEvent * e)
+{
+ form_->slotWMHide();
+ e->accept();
+}
--- /dev/null
+/**
+ * \file QErrorDialog.h
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
+
+#ifndef QERRORDIALOG_H
+#define QERRORDIALOG_H
+
+#include <config.h>
+
+#include "ui/QErrorDialogBase.h"
+
+class QError;
+
+class QErrorDialog : public QErrorDialogBase
+{ Q_OBJECT
+
+public:
+ QErrorDialog(QError * form);
+
+protected:
+ virtual void closeEvent(QCloseEvent * e);
+
+private:
+ QError * form_;
+};
+
+#endif // QERRORDIALOG_H
}
-QIndexDialog::~QIndexDialog()
-{
-}
-
-
void QIndexDialog::change_adaptor()
{
form_->changed();
}
-void QIndexDialog::closeEvent(QCloseEvent *e)
+void QIndexDialog::closeEvent(QCloseEvent * e)
{
form_->slotWMHide();
e->accept();
public:
QIndexDialog(QIndex * form);
- ~QIndexDialog();
protected slots:
virtual void change_adaptor();
----------------------------------------------
About John Done
Bibtex John Done
-Character Edwin
+Character Edwin Done
Citation Kalle Done
Document Kalle Waiting for MVC
+Error John Done
Index Kalle Done
Paragraph Edwin Waiting for MVC
Print Edwin
--- /dev/null
+<!DOCTYPE UI><UI>
+<class>QErrorDialogBase</class>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>QErrorDialogBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>368</width>
+ <height>236</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>LaTeX Error</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QTextView</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>errorTV</cstring>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>LaTeX error messages</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout3</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer3</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>closePB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Close</string>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <slot access="public">change_adaptor()</slot>
+</connections>
+</UI>