diff --git a/src/frontends/qt4/Makefile.dialogs b/src/frontends/qt4/Makefile.dialogs index aeccea2826..aa893004d4 100644 --- a/src/frontends/qt4/Makefile.dialogs +++ b/src/frontends/qt4/Makefile.dialogs @@ -100,7 +100,7 @@ MOCFILES = \ QDelimiterDialog.C QDelimiterDialog.h \ QDocumentDialog.C QDocumentDialog.h \ QErrorListDialog.C QErrorListDialog.h \ - QERTDialog.C QERTDialog.h \ + QERT.C QERT.h \ QExternalDialog.C QExternalDialog.h \ QFloatDialog.C QFloatDialog.h \ QGraphicsDialog.C QGraphicsDialog.h \ diff --git a/src/frontends/qt4/QERT.C b/src/frontends/qt4/QERT.C index d02469d758..90c9de6dac 100644 --- a/src/frontends/qt4/QERT.C +++ b/src/frontends/qt4/QERT.C @@ -11,23 +11,61 @@ #include #include "QERT.h" -#include "QERTDialog.h" #include "Qt2BC.h" #include "controllers/ControlERT.h" -#include -#include +#include +#include +#include namespace lyx { namespace frontend { -typedef QController > ert_base_class; +///////////////////////////////////////////////////////////////////// +// +// QERTDialog +// +///////////////////////////////////////////////////////////////////// + + +QERTDialog::QERTDialog(QERT * form) + : form_(form) +{ + setupUi(this); + connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK())); + connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); + connect(inlineRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); + connect(collapsedRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); + connect(openRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); +} + + +void QERTDialog::closeEvent(QCloseEvent * e) +{ + form_->slotWMHide(); + e->accept(); +} + + +void QERTDialog::change_adaptor() +{ + form_->changed(); +} + + +///////////////////////////////////////////////////////////////////// +// +// QERT +// +///////////////////////////////////////////////////////////////////// + +typedef QController > ERTBase; QERT::QERT(Dialog & parent) - : ert_base_class(parent, _("TeX Code Settings")) + : ERTBase(parent, _("TeX Code Settings")) { } @@ -67,3 +105,5 @@ void QERT::update_contents() } // namespace frontend } // namespace lyx + +#include "QERT_moc.cpp" diff --git a/src/frontends/qt4/QERT.h b/src/frontends/qt4/QERT.h index 9f5aba6b60..dbec4a6828 100644 --- a/src/frontends/qt4/QERT.h +++ b/src/frontends/qt4/QERT.h @@ -13,11 +13,30 @@ #define QERT_H #include "QDialogView.h" -#include "QERTDialog.h" +#include "ui/ERTUi.h" + +#include +#include namespace lyx { namespace frontend { +class QERT; + +class QERTDialog : public QDialog, public Ui::QERTUi { + Q_OBJECT +public: + QERTDialog(QERT * form); +protected Q_SLOTS: + virtual void change_adaptor(); +protected: + virtual void closeEvent(QCloseEvent * e); +private: + QERT * form_; +}; + + + class ControlERT; class QERT : public QController > diff --git a/src/frontends/qt4/QERTDialog.C b/src/frontends/qt4/QERTDialog.C deleted file mode 100644 index 298090b9df..0000000000 --- a/src/frontends/qt4/QERTDialog.C +++ /dev/null @@ -1,52 +0,0 @@ -/** - * \file QERTDialog.C - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author John Levon - * - * Full author contact details are available in file CREDITS. - */ - -#include - -#include "QERTDialog.h" -#include "QERT.h" - -#include -#include - -namespace lyx { -namespace frontend { - -QERTDialog::QERTDialog(QERT * form) - : form_(form) -{ - setupUi(this); - connect(okPB, SIGNAL(clicked()), - form, SLOT(slotOK())); - connect(closePB, SIGNAL(clicked()), - form, SLOT(slotClose())); - - connect( inlineRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) ); - connect( collapsedRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) ); - connect( openRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) ); -} - - -void QERTDialog::closeEvent(QCloseEvent * e) -{ - form_->slotWMHide(); - e->accept(); -} - - -void QERTDialog::change_adaptor() -{ - form_->changed(); -} - -} // namespace frontend -} // namespace lyx - -#include "QERTDialog_moc.cpp" diff --git a/src/frontends/qt4/QERTDialog.h b/src/frontends/qt4/QERTDialog.h deleted file mode 100644 index 0e637037c6..0000000000 --- a/src/frontends/qt4/QERTDialog.h +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -/** - * \file QERTDialog.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author John Levon - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef QERTDIALOG_H -#define QERTDIALOG_H - -#include "ui/ERTUi.h" - -#include -#include - -namespace lyx { -namespace frontend { - -class QERT; - -class QERTDialog : public QDialog, public Ui::QERTUi { - Q_OBJECT -public: - QERTDialog(QERT * form); -protected Q_SLOTS: - virtual void change_adaptor(); -protected: - virtual void closeEvent(QCloseEvent * e); -private: - QERT * form_; -}; - -} // namespace frontend -} // namespace lyx - -#endif // QERTDIALOG_H