mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 10:47:57 +00:00
Qt2 latex error dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2591 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3c7fe2f407
commit
883717e5ec
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "QBibtexDialog.h"
|
||||
#include "QCharacterDialog.h"
|
||||
#include "QCitationDialog.h"
|
||||
#include "QErrorDialog.h"
|
||||
#include "QIndexDialog.h"
|
||||
#include "QRefDialog.h"
|
||||
#include "QURLDialog.h"
|
||||
@ -26,6 +27,7 @@
|
||||
#include "QBibtex.h"
|
||||
#include "QCharacter.h"
|
||||
#include "QCitation.h"
|
||||
#include "QError.h"
|
||||
#include "QIndex.h"
|
||||
#include "QParagraph.h"
|
||||
#include "QPrint.h"
|
||||
@ -47,6 +49,7 @@
|
||||
#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"
|
||||
@ -55,7 +58,6 @@
|
||||
#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"
|
||||
@ -90,6 +92,7 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
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));
|
||||
|
@ -26,7 +26,6 @@ libqt2_la_OBJADD = \
|
||||
../xforms/FormBaseDeprecated.lo \
|
||||
../xforms/FormBrowser.lo \
|
||||
../xforms/FormDocument.lo \
|
||||
../xforms/FormError.lo \
|
||||
../xforms/FormExternal.lo \
|
||||
../xforms/FormGraphics.lo \
|
||||
../xforms/FormInclude.lo \
|
||||
|
@ -7,6 +7,7 @@ DIALOGS = \
|
||||
QCharacter \
|
||||
QCitation \
|
||||
QDocument \
|
||||
QError \
|
||||
QIndex \
|
||||
QParagraph \
|
||||
QPrint \
|
||||
@ -30,6 +31,8 @@ DIALOGSOURCES = \
|
||||
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 \
|
||||
@ -56,6 +59,7 @@ MOCDIALOGS = \
|
||||
QCharacterDialog_moc.C \
|
||||
QCitationDialog_moc.C \
|
||||
QDocumentDialog_moc.C \
|
||||
QErrorDialog_moc.C \
|
||||
QIndexDialog_moc.C \
|
||||
QParagraphDialog_moc.C \
|
||||
QPrintDialog_moc.C \
|
||||
@ -79,6 +83,8 @@ UIDIALOGS = \
|
||||
QCitationDialogBase.C \
|
||||
QDocumentDialogBase.h \
|
||||
QDocumentDialogBase.C \
|
||||
QErrorDialogBase.C \
|
||||
QErrorDialogBase.h \
|
||||
QIndexDialogBase.h \
|
||||
QIndexDialogBase.C \
|
||||
QParagraphDialogBase.h \
|
||||
@ -103,6 +109,7 @@ UIMOCDIALOGS = \
|
||||
QCharacterDialogBase_moc.C \
|
||||
QCitationDialogBase_moc.C \
|
||||
QDocumentDialogBase_moc.C \
|
||||
QErrorDialogBase_moc.C \
|
||||
QIndexDialogBase_moc.C \
|
||||
QParagraphDialogBase_moc.C \
|
||||
QPrintDialogBase_moc.C \
|
||||
|
39
src/frontends/qt2/QError.C
Normal file
39
src/frontends/qt2/QError.C
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* \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());
|
||||
}
|
35
src/frontends/qt2/QError.h
Normal file
35
src/frontends/qt2/QError.h
Normal file
@ -0,0 +1,35 @@
|
||||
// -*- 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
|
29
src/frontends/qt2/QErrorDialog.C
Normal file
29
src/frontends/qt2/QErrorDialog.C
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* \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();
|
||||
}
|
31
src/frontends/qt2/QErrorDialog.h
Normal file
31
src/frontends/qt2/QErrorDialog.h
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* \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
|
@ -24,18 +24,13 @@ QIndexDialog::QIndexDialog(QIndex * form)
|
||||
}
|
||||
|
||||
|
||||
QIndexDialog::~QIndexDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void QIndexDialog::change_adaptor()
|
||||
{
|
||||
form_->changed();
|
||||
}
|
||||
|
||||
|
||||
void QIndexDialog::closeEvent(QCloseEvent *e)
|
||||
void QIndexDialog::closeEvent(QCloseEvent * e)
|
||||
{
|
||||
form_->slotWMHide();
|
||||
e->accept();
|
||||
|
@ -20,7 +20,6 @@ class QIndexDialog : public QIndexDialogBase
|
||||
|
||||
public:
|
||||
QIndexDialog(QIndex * form);
|
||||
~QIndexDialog();
|
||||
|
||||
protected slots:
|
||||
virtual void change_adaptor();
|
||||
|
@ -56,9 +56,10 @@ Dialog Maintainer MVC conversion
|
||||
----------------------------------------------
|
||||
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
|
||||
|
100
src/frontends/qt2/ui/QErrorDialog.ui
Normal file
100
src/frontends/qt2/ui/QErrorDialog.ui
Normal file
@ -0,0 +1,100 @@
|
||||
<!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>
|
Loading…
Reference in New Issue
Block a user