]> git.lyx.org Git - features.git/commitdiff
merge QERT and QERTDialog
authorAndré Pönitz <poenitz@gmx.net>
Tue, 24 Apr 2007 13:47:33 +0000 (13:47 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 24 Apr 2007 13:47:33 +0000 (13:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17946 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/Makefile.dialogs
src/frontends/qt4/QERT.C
src/frontends/qt4/QERT.h
src/frontends/qt4/QERTDialog.C [deleted file]
src/frontends/qt4/QERTDialog.h [deleted file]

index aeccea28260b77ced5e56da95a7e92b3169ee266..aa893004d4185736bf0f6c396de8118b363d8721 100644 (file)
@@ -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 \
index d02469d758eff62508bafe4f369434358b063aee..90c9de6dacef8a183a45f85db55a40b0e27b7d89 100644 (file)
 #include <config.h>
 
 #include "QERT.h"
-#include "QERTDialog.h"
 #include "Qt2BC.h"
 
 #include "controllers/ControlERT.h"
 
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QCloseEvent>
 
 
 namespace lyx {
 namespace frontend {
 
-typedef QController<ControlERT, QView<QERTDialog> > 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<ControlERT, QView<QERTDialog> > 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"
index 9f5aba6b60bd57c27248188f23ceccf7f54666aa..dbec4a6828780c7c9a1a59183174034c7c5498d3 100644 (file)
 #define QERT_H
 
 #include "QDialogView.h"
-#include "QERTDialog.h"
+#include "ui/ERTUi.h"
+
+#include <QCloseEvent>
+#include <QDialog>
 
 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<ControlERT, QView<QERTDialog> >
diff --git a/src/frontends/qt4/QERTDialog.C b/src/frontends/qt4/QERTDialog.C
deleted file mode 100644 (file)
index 298090b..0000000
+++ /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 <config.h>
-
-#include "QERTDialog.h"
-#include "QERT.h"
-
-#include <QPushButton>
-#include <QCloseEvent>
-
-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 (file)
index 0e63703..0000000
+++ /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 <QCloseEvent>
-#include <QDialog>
-
-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