]> git.lyx.org Git - features.git/commitdiff
more dialog merging
authorAndré Pönitz <poenitz@gmx.net>
Wed, 25 Apr 2007 08:42:22 +0000 (08:42 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 25 Apr 2007 08:42:22 +0000 (08:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17977 a592a061-630c-0410-9148-cb99ea01b6c8

20 files changed:
src/frontends/qt4/Makefile.am
src/frontends/qt4/Makefile.dialogs
src/frontends/qt4/QBibitem.C
src/frontends/qt4/QBibitem.h
src/frontends/qt4/QBibitemDialog.C [deleted file]
src/frontends/qt4/QBibitemDialog.h [deleted file]
src/frontends/qt4/QBibtex.C
src/frontends/qt4/QBibtex.h
src/frontends/qt4/QBranch.C
src/frontends/qt4/QBranch.h
src/frontends/qt4/QExternal.C
src/frontends/qt4/QExternal.h
src/frontends/qt4/QExternalDialog.C [deleted file]
src/frontends/qt4/QExternalDialog.h [deleted file]
src/frontends/qt4/QIndex.C
src/frontends/qt4/QIndex.h
src/frontends/qt4/QIndexDialog.C [deleted file]
src/frontends/qt4/QIndexDialog.h [deleted file]
src/frontends/qt4/QLogDialog.C [deleted file]
src/frontends/qt4/QLogDialog.h [deleted file]

index ef2f1cfc77121f65b469ed03c488672143c54383..22336fc6db38914faa9e932573317f8e92a78bfc 100644 (file)
@@ -41,21 +41,16 @@ libqt4_la_SOURCES = \
        GuiSelection.h GuiSelection.C \
        LyXKeySymFactory.C \
        QLMenubar.C QLMenubar.h \
-       QBibitem.C QBibitem.h \
-       QBibtex.C QBibtex.h \
        QBox.C QBox.h \
-       QBranch.C QBranch.h \
        QBranches.C QBranches.h \
        QChanges.C QChanges.h \
        QCharacter.C QCharacter.h \
        QCitation.C QCitation.h \
        QDialogView.C QDialogView.h \
        QErrorList.C QErrorList.h \
-       QExternal.C QExternal.h \
        QFloat.C QFloat.h \
        QGraphics.C QGraphics.h \
        QInclude.C QInclude.h \
-       QIndex.C QIndex.h \
        QLImage.C QLImage.h \
        QViewSource.C QViewSource.h \
        QLPainter.C QLPainter.h \
index 6061d90008bd97ce9dc3e39c5761d762e7c082e0..9e05b8f18f6405d17ffc6006b38a116f8a586acf 100644 (file)
@@ -87,10 +87,10 @@ MOCFILES = \
        lengthcombo.C lengthcombo.h \
        panelstack.C panelstack.h \
        QAbout.C QAbout.h \
-       QBibitemDialog.C QBibitemDialog.h \
-       QBibtexDialog.C QBibtexDialog.h \
+       QBibitem.C QBibitem.h \
+       QBibtex.C QBibtex.h \
        QBox.C QBox.h \
-       QBranchDialog.C QBranchDialog.h \
+       QBranch.C QBranch.h \
        QBranches.C QBranches.h \
        QChangesDialog.C QChangesDialog.h \
        QCharacterDialog.C QCharacterDialog.h \
@@ -101,11 +101,11 @@ MOCFILES = \
        QDocument.C QDocument.h \
        QErrorListDialog.C QErrorListDialog.h \
        QERT.C QERT.h \
-       QExternalDialog.C QExternalDialog.h \
+       QExternal.C QExternal.h \
        QFloatDialog.C QFloatDialog.h \
        QGraphicsDialog.C QGraphicsDialog.h \
        QIncludeDialog.C QIncludeDialog.h \
-       QIndexDialog.C QIndexDialog.h \
+       QIndex.C QIndex.h \
        QLog.C QLog.h \
        QViewSource.C QViewSource.h \
        QLMenubar.C QLMenubar.h \
index 7d36b72a54e1be6bbdb20fc4ce4d9c5d6f7311d1..953ff0583bd4a3cc7ef4b83f66f7fd27993b27ca 100644 (file)
 #include <config.h>
 
 #include "QBibitem.h"
-#include "QBibitemDialog.h"
 #include "Qt2BC.h"
 #include "qt_helpers.h"
 
 #include "controllers/ControlCommand.h"
 
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <QLineEdit>
+#include <QPushButton>
 
 
 namespace lyx {
 namespace frontend {
 
-typedef QController<ControlCommand, QView<QBibitemDialog> > bibitem_base_class;
+/////////////////////////////////////////////////////////////////////
+//
+// QBibItemDialog
+//
+/////////////////////////////////////////////////////////////////////
+
+QBibitemDialog::QBibitemDialog(QBibitem * form)
+       : form_(form)
+{
+       setupUi(this);
+       connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK()));
+       connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
+
+       connect(keyED, SIGNAL(textChanged(const QString &)),
+               this, SLOT(change_adaptor()));
+       connect(labelED, SIGNAL(textChanged(const QString &)),
+               this, SLOT(change_adaptor()));
+}
+
+
+void QBibitemDialog::change_adaptor()
+{
+       form_->changed();
+}
+
+
+void QBibitemDialog::closeEvent(QCloseEvent *e)
+{
+       form_->slotWMHide();
+       e->accept();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// QBibItem
+//
+/////////////////////////////////////////////////////////////////////
+
+typedef QController<ControlCommand, QView<QBibitemDialog> > BibItemBase;
 
 
 QBibitem::QBibitem(Dialog & parent)
-       : bibitem_base_class(parent, _("Bibliography Entry Settings"))
+       : BibItemBase(parent, _("Bibliography Entry Settings"))
 {
 }
 
@@ -65,3 +103,5 @@ bool QBibitem::isValid()
 
 } // namespace frontend
 } // namespace lyx
+
+#include "QBibitem_moc.cpp"
index b5066c2718c52d80e52413dfdac3dc2b711def07..cbab43230ce00c117f911994b1a1c9375f76434e 100644 (file)
 #ifndef QBIBITEM_CONTROLLER_H
 #define QBIBITEM_CONTROLLER_H
 
-#include "QBibitemDialog.h"
 #include "QDialogView.h"
 
+#include "ui/BibitemUi.h"
+
+#include <QDialog>
+#include <QCloseEvent>
+
+
 namespace lyx {
 namespace frontend {
 
+class QBibitem;
+
+class QBibitemDialog : public QDialog, public Ui::QBibitemUi {
+       Q_OBJECT
+public:
+
+       QBibitemDialog(QBibitem * form);
+protected Q_SLOTS:
+       virtual void change_adaptor();
+protected:
+       virtual void closeEvent(QCloseEvent * e);
+private:
+       QBibitem * form_;
+};
+
+
 class ControlCommand;
 
 class QBibitem
diff --git a/src/frontends/qt4/QBibitemDialog.C b/src/frontends/qt4/QBibitemDialog.C
deleted file mode 100644 (file)
index 44efae8..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * \file QBibitemDialog.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 "QBibitemDialog.h"
-
-#include "QBibitem.h"
-
-#include <qpushbutton.h>
-#include <QCloseEvent>
-
-namespace lyx {
-namespace frontend {
-
-QBibitemDialog::QBibitemDialog(QBibitem * form)
-       : form_(form)
-{
-       setupUi(this);
-       connect(okPB, SIGNAL(clicked()),
-               form, SLOT(slotOK()));
-       connect(closePB, SIGNAL(clicked()),
-               form, SLOT(slotClose()));
-
-    connect( keyED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
-    connect( labelED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
-}
-
-
-void QBibitemDialog::change_adaptor()
-{
-       form_->changed();
-}
-
-
-void QBibitemDialog::closeEvent(QCloseEvent *e)
-{
-       form_->slotWMHide();
-       e->accept();
-}
-
-} // namespace frontend
-} // namespace lyx
-
-#include "QBibitemDialog_moc.cpp"
diff --git a/src/frontends/qt4/QBibitemDialog.h b/src/frontends/qt4/QBibitemDialog.h
deleted file mode 100644 (file)
index 6ce5a2c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// -*- C++ -*-
-/**
- * \file QBibitemDialog.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 QBIBITEMDIALOG_H
-#define QBIBITEMDIALOG_H
-
-#include "ui/BibitemUi.h"
-
-#include <QDialog>
-
-#include <QCloseEvent>
-
-
-namespace lyx {
-namespace frontend {
-
-class QBibitem;
-
-class QBibitemDialog : public QDialog, public Ui::QBibitemUi {
-       Q_OBJECT
-public:
-
-       QBibitemDialog(QBibitem * form);
-protected Q_SLOTS:
-       virtual void change_adaptor();
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       QBibitem * form_;
-};
-
-} // namespace frontend
-} // namespace lyx
-
-#endif // QBIBITEMDIALOG_H
index 7c9136eb8e65859c094757b2cd276626d0e68567..81fd9ab98cae60ad85553aa1fb0d8786a9e2fd42 100644 (file)
 
 #include "QBibtex.h"
 
-#include "QBibtexDialog.h"
 #include "ui/BibtexAddUi.h"
 #include "Qt2BC.h"
 #include "qt_helpers.h"
 #include "validators.h"
-
 #include "lyxrc.h"
+#include "checkedwidgets.h"
+
+#include "controllers/ControlBibtex.h"
+#include "controllers/ButtonPolicies.h"
 
 #include "controllers/ControlBibtex.h"
 
@@ -30,7 +32,8 @@
 #include <QPushButton>
 #include <QListWidget>
 #include <QCheckBox>
-
+#include <QCloseEvent>
+#include <QLineEdit>
 
 using lyx::support::changeExtension;
 using lyx::support::split;
@@ -39,13 +42,222 @@ using lyx::support::trim;
 using std::vector;
 using std::string;
 
+#include "debug.h"
+#include "support/filetools.h"
+#include "support/lstrings.h"
+
+
 namespace lyx {
 namespace frontend {
 
-typedef QController<ControlBibtex, QView<QBibtexDialog> > bibtex_base_class;
+
+/////////////////////////////////////////////////////////////////////
+//
+// QBibtexDialog
+//
+/////////////////////////////////////////////////////////////////////
+
+QBibtexDialog::QBibtexDialog(QBibtex * form)
+       : form_(form)
+{
+       setupUi(this);
+       QDialog::setModal(true);
+
+       connect(okPB, SIGNAL(clicked()),
+               form, SLOT(slotOK()));
+       connect(closePB, SIGNAL(clicked()),
+               form, SLOT(slotClose()));
+       connect(stylePB, SIGNAL(clicked()),
+               this, SLOT( browsePressed()));
+       connect(deletePB, SIGNAL(clicked()),
+               this, SLOT( deletePressed()));
+       connect(styleCB, SIGNAL(editTextChanged (const QString &)),
+               this, SLOT( change_adaptor()));
+       connect(databaseLW, SIGNAL(itemSelectionChanged()),
+               this, SLOT( databaseChanged()));
+       connect(bibtocCB, SIGNAL(clicked()),
+               this, SLOT( change_adaptor()));
+       connect(btPrintCO, SIGNAL(activated(int)),
+               this, SLOT( change_adaptor()));
+       connect(addBibPB, SIGNAL(clicked()),
+               this, SLOT( addPressed()));
+
+       add_ = new UiDialog<Ui::QBibtexAddUi>(this, true);
+
+       Qt2BC * bcview = new Qt2BC(add_bc_);
+       add_bc_.view(bcview);
+       add_bc_.bp(new OkCancelPolicy);
+
+       bcview->setOK(add_->addPB);
+       bcview->setCancel(add_->closePB);
+
+       add_->bibED->setValidator(new PathValidator(true, add_->bibED));
+       addCheckedLineEdit(add_bc_.view(), add_->bibED, 0);
+
+       connect(add_->bibED, SIGNAL(textChanged(const QString &)),
+               this, SLOT(bibEDChanged()));
+       connect(add_->addPB, SIGNAL(clicked()),
+               this, SLOT(addDatabase()));
+       connect(add_->addPB, SIGNAL(clicked()),
+               add_, SLOT(accept()));
+       connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)),
+               this, SLOT(addDatabase()));
+       connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)),
+               add_, SLOT(accept()));
+       connect(add_->bibLW, SIGNAL(itemSelectionChanged()),
+               this, SLOT(availableChanged()));
+       connect(add_->browsePB, SIGNAL(clicked()),
+               this, SLOT(browseBibPressed()));
+       connect(add_->closePB, SIGNAL(clicked()),
+               add_, SLOT(reject()));
+
+}
+
+
+void QBibtexDialog::bibEDChanged()
+{
+       // Indicate to the button controller that the contents have
+       // changed. The actual test of validity is carried out by
+       // the checkedLineEdit.
+       add_bc_.valid(true);
+}
+
+
+void QBibtexDialog::change_adaptor()
+{
+       form_->changed();
+}
+
+
+void QBibtexDialog::browsePressed()
+{
+       docstring const file = form_->controller().browseBst(docstring());
+
+       if (!file.empty()) {
+               // FIXME UNICODE
+               docstring const filen = from_utf8(changeExtension(to_utf8(file), ""));
+               bool present = false;
+               unsigned int pres = 0;
+
+               for (int i = 0; i != styleCB->count(); ++i) {
+                       if (qstring_to_ucs4(styleCB->itemText(i)) == filen) {
+                               present = true;
+                               pres = i;
+                       }
+               }
+
+               if (!present)
+                       styleCB->insertItem(0, toqstr(filen));
+
+               styleCB->setCurrentIndex(pres);
+               form_->changed();
+       }
+}
+
+
+void QBibtexDialog::browseBibPressed()
+{
+       docstring const file = trim(form_->controller().browseBib(docstring()));
+
+       if (!file.empty()) {
+               // FIXME UNICODE
+               QString const f = toqstr(changeExtension(to_utf8(file), ""));
+               bool present = false;
+
+               for (int i = 0; i < add_->bibLW->count(); ++i) {
+                       if (add_->bibLW->item(i)->text() == f)
+                               present = true;
+               }
+
+               if (!present) {
+                       add_->bibLW->addItem(f);
+                       form_->changed();
+               }
+
+               add_->bibED->setText(f);
+       }
+}
+
+
+void QBibtexDialog::addPressed()
+{
+       add_bc_.valid(false);
+       add_->exec();
+}
+
+
+void QBibtexDialog::addDatabase()
+{
+       int const sel = add_->bibLW->currentRow();
+       docstring const file = trim(qstring_to_ucs4(add_->bibED->text()));
+
+       if (sel < 0 && file.empty())
+               return;
+
+       // Add the selected browser_bib keys to browser_database
+       // multiple selections are possible
+       for (int i = 0; i != add_->bibLW->count(); ++i) {
+               QListWidgetItem * const item = add_->bibLW->item(i);
+               if (add_->bibLW->isItemSelected(item)) {
+                       add_->bibLW->setItemSelected(item, false);
+                       QList<QListWidgetItem *> matches =
+                               databaseLW->findItems(item->text(), Qt::MatchExactly);
+                       if (matches.empty())
+                               databaseLW->addItem(item->text());
+               }
+       }
+
+       if (!file.empty()) {
+               add_->bibED->clear();
+               QString const f = toqstr(from_utf8(changeExtension(to_utf8(file), "")));
+               QList<QListWidgetItem *> matches =
+                       databaseLW->findItems(f, Qt::MatchExactly);
+               if (matches.empty())
+                       databaseLW->addItem(f);
+       }
+
+       form_->changed();
+}
+
+
+void QBibtexDialog::deletePressed()
+{
+       databaseLW->takeItem(databaseLW->currentRow());
+       form_->changed();
+}
+
+
+
+void QBibtexDialog::databaseChanged()
+{
+       deletePB->setEnabled(!form_->readOnly() && databaseLW->currentRow() != -1);
+}
+
+
+void QBibtexDialog::availableChanged()
+{
+       add_bc_.valid(true);
+}
+
+
+void QBibtexDialog::closeEvent(QCloseEvent *e)
+{
+       form_->slotWMHide();
+       e->accept();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// QBibTex
+//
+/////////////////////////////////////////////////////////////////////
+
+
+typedef QController<ControlBibtex, QView<QBibtexDialog> > BibtexBase;
 
 QBibtex::QBibtex(Dialog & parent)
-       : bibtex_base_class(parent, _("BibTeX Bibliography"))
+       : BibtexBase(parent, _("BibTeX Bibliography"))
 {
 }
 
@@ -195,3 +407,5 @@ bool QBibtex::isValid()
 
 } // namespace frontend
 } // namespace lyx
+
+#include "QBibtex_moc.cpp"
index bcffb1ca566d8063d71f261cd278576555966fc3..a9e5c49dfe7ea1397946f33f5f21efcb2f741449 100644 (file)
@@ -9,15 +9,65 @@
  * Full author contact details are available in file CREDITS.
  */
 
-#ifndef QBIBTEX_CONTROLLER_H
-#define QBIBTEX_CONTROLLER_H
+#ifndef QBIBTEX_H
+#define QBIBTEX_H
 
 #include "QDialogView.h"
-#include "QBibtexDialog.h"
+
+#include "ui/BibtexUi.h"
+#include "ui/BibtexAddUi.h"
+
+#include "ButtonController.h"
+
+#include <QCloseEvent>
+#include <QDialog>
 
 namespace lyx {
 namespace frontend {
 
+class QBibtex;
+
+template<class UI>
+class UiDialog : public QDialog, public UI
+{
+public:
+       UiDialog(QWidget * parent=0, bool modal=false, Qt::WFlags f=0)
+               : QDialog(parent, f)
+       {
+               UI::setupUi(this);
+               QDialog::setModal(modal);
+       }
+};
+
+
+class QBibtexDialog : public QDialog, public Ui::QBibtexUi {
+       Q_OBJECT
+
+public:
+       QBibtexDialog(QBibtex * form);
+
+       UiDialog<Ui::QBibtexAddUi> * add_;
+
+protected Q_SLOTS:
+       virtual void change_adaptor();
+       virtual void browsePressed();
+       virtual void browseBibPressed();
+       virtual void addPressed();
+       virtual void addDatabase();
+       virtual void deletePressed();
+       virtual void databaseChanged();
+       virtual void availableChanged();
+       void bibEDChanged();
+
+protected:
+       virtual void closeEvent(QCloseEvent * e);
+
+private:
+       QBibtex * form_;
+       ButtonController add_bc_;
+};
+
+
 class ControlBibtex;
 
 class QBibtex
index 4116eabdd8a1fb2682ff70d514aba5eb2a3b8cc5..ae55af805a9087a7ebb1f66973b6d8d62e48da99 100644 (file)
@@ -11,7 +11,6 @@
 #include <config.h>
 
 #include "QBranch.h"
-#include "QBranchDialog.h"
 #include "Qt2BC.h"
 #include "qt_helpers.h"
 
 #include "insets/InsetBranch.h"
 
 #include <QPushButton>
+#include <QCloseEvent>
 
 namespace lyx {
 namespace frontend {
 
+/////////////////////////////////////////////////////////////////////
+//
+// QBranchDialog
+//
+/////////////////////////////////////////////////////////////////////
+
+QBranchDialog::QBranchDialog(QBranch * form)
+       : form_(form)
+{
+       setupUi(this);
+       connect(okPB, SIGNAL(clicked()),
+               form, SLOT(slotOK()));
+       connect(closePB, SIGNAL(clicked()),
+               form, SLOT(slotClose()));
+       connect(branchCO, SIGNAL( activated(int) ), 
+               this, SLOT( change_adaptor() ) );
+}
+
+
+void QBranchDialog::closeEvent(QCloseEvent * e)
+{
+       form_->slotWMHide();
+       e->accept();
+}
+
+
+void QBranchDialog::change_adaptor()
+{
+       form_->changed();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// QBranch
+//
+/////////////////////////////////////////////////////////////////////
+
 typedef QController<ControlBranch, QView<QBranchDialog> > branch_base_class;
 
 
@@ -75,3 +113,5 @@ void QBranch::apply()
 
 } // namespace frontend
 } // namespace lyx
+
+#include "QBranch_moc.cpp"
index 95bc71f4a0605c450577299a41b6c10c7692c9f3..160e0d22ac0c0f27451f27f049f746909a70f9cd 100644 (file)
 #ifndef QBRANCH_H
 #define QBRANCH_H
 
-#include "QBranchDialog.h"
 #include "QDialogView.h"
+#include "ui/BranchUi.h"
+
+#include <QCloseEvent>
+#include <QDialog>
 
 namespace lyx {
 namespace frontend {
 
+class QBranch;
+
+class QBranchDialog : public QDialog, public Ui::QBranchUi {
+       Q_OBJECT
+public:
+       QBranchDialog(QBranch * form);
+protected Q_SLOTS:
+       virtual void change_adaptor();
+protected:
+       virtual void closeEvent(QCloseEvent * e);
+private:
+       QBranch * form_;
+};
+
 class ControlBranch;
 
 /** This class provides a QT implementation of the Branch Dialog.
index a9ef8e02a87f479cd4e655781354b580b1152953..6ff368b3e9a3ffda9764b8e9bc3e6175f1f44752 100644 (file)
@@ -17,6 +17,7 @@
 #include "lyxrc.h"
 
 #include "controllers/ControlExternal.h"
+#include "controllers/ButtonController.h"
 
 #include "insets/ExternalTemplate.h"
 #include "insets/InsetExternal.h"
@@ -24,9 +25,9 @@
 #include "support/lstrings.h"
 #include "support/convert.h"
 #include "support/os.h"
+#include "support/lyxlib.h"
 
 #include "QExternal.h"
-#include "QExternalDialog.h"
 #include "Qt2BC.h"
 
 #include "checkedwidgets.h"
@@ -45,6 +46,7 @@ namespace external = lyx::external;
 using lyx::support::isStrDbl;
 using lyx::support::token;
 using lyx::support::trim;
+using lyx::support::float_equal;
 
 using lyx::support::os::internal_path;
 
@@ -52,9 +54,203 @@ using std::string;
 using std::vector;
 using std::find;
 
+
 namespace lyx {
 namespace frontend {
 
+/////////////////////////////////////////////////////////////////////
+//
+// QExternalDialog
+//
+/////////////////////////////////////////////////////////////////////
+
+
+QExternalDialog::QExternalDialog(QExternal * form)
+       : form_(form)
+{
+       setupUi(this);
+       connect(okPB, SIGNAL(clicked()),
+               form, SLOT(slotOK()));
+       connect(applyPB, SIGNAL(clicked()),
+               form, SLOT(slotApply()));
+       connect(closePB, SIGNAL(clicked()),
+               form, SLOT(slotClose()));
+
+       connect( displayCB, SIGNAL( toggled(bool) ), showCO, SLOT( setEnabled(bool) ) );
+       connect( displayCB, SIGNAL( toggled(bool) ), displayscaleED, SLOT( setEnabled(bool) ) );
+       connect( showCO, SIGNAL( activated(const QString&) ), this, SLOT( change_adaptor() ) );
+       connect( originCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
+       connect( aspectratioCB, SIGNAL( stateChanged(int) ), this, SLOT( change_adaptor() ) );
+       connect( browsePB, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
+       connect( editPB, SIGNAL( clicked() ), this, SLOT( editClicked() ) );
+       connect( externalCO, SIGNAL( activated(const QString&) ), this, SLOT( templateChanged() ) );
+       connect( extraED, SIGNAL( textChanged(const QString&) ), this, SLOT( extraChanged(const QString&) ) );
+       connect( extraFormatCO, SIGNAL( activated(const QString&) ), this, SLOT( formatChanged(const QString&) ) );
+       connect( widthUnitCO, SIGNAL( activated(int) ), this, SLOT( widthUnitChanged() ) );
+       connect( heightUnitCO, SIGNAL( selectionChanged(lyx::LyXLength::UNIT) ), this, SLOT( change_adaptor() ) );
+       connect( displayCB, SIGNAL( stateChanged(int) ), this, SLOT( change_adaptor() ) );
+       connect( displayscaleED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
+       connect( angleED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
+       connect( widthED, SIGNAL( textChanged(const QString&) ), this, SLOT( sizeChanged() ) );
+       connect( heightED, SIGNAL( textChanged(const QString&) ), this, SLOT( sizeChanged() ) );
+       connect( fileED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
+       connect( clipCB, SIGNAL( stateChanged(int) ), this, SLOT( change_adaptor() ) );
+       connect( getbbPB, SIGNAL( clicked() ), this, SLOT( getbbClicked() ) );
+       connect( xrED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
+       connect( ytED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
+       connect( xlED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
+       connect( ybED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
+       connect( draftCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+
+       QIntValidator * validator = new QIntValidator(displayscaleED);
+       validator->setBottom(1);
+       displayscaleED->setValidator(validator);
+
+       angleED->setValidator(new QDoubleValidator(-360, 360, 2, angleED));
+
+       xlED->setValidator(new QIntValidator(xlED));
+       ybED->setValidator(new QIntValidator(ybED));
+       xrED->setValidator(new QIntValidator(xrED));
+       ytED->setValidator(new QIntValidator(ytED));
+
+       widthED->setValidator(unsignedLengthValidator(widthED));
+       heightED->setValidator(unsignedLengthValidator(heightED));
+
+       fileED->setValidator(new PathValidator(true, fileED));
+       setFocusProxy(fileED);
+}
+
+
+void QExternalDialog::show()
+{
+       QDialog::show();
+}
+
+
+
+bool QExternalDialog::activateAspectratio() const
+{
+       if (widthUnitCO->currentIndex() == 0)
+               return false;
+
+       string const wstr = fromqstr(widthED->text());
+       if (wstr.empty())
+               return false;
+       bool const wIsDbl = isStrDbl(wstr);
+       if (wIsDbl && float_equal(convert<double>(wstr), 0.0, 0.05))
+               return false;
+       LyXLength l;
+       if (!wIsDbl && (!isValidLength(wstr, &l) || l.zero()))
+               return false;
+
+       string const hstr = fromqstr(heightED->text());
+       if (hstr.empty())
+               return false;
+       bool const hIsDbl = isStrDbl(hstr);
+       if (hIsDbl && float_equal(convert<double>(hstr), 0.0, 0.05))
+               return false;
+       if (!hIsDbl && (!isValidLength(hstr, &l) || l.zero()))
+               return false;
+
+       return true;
+}
+
+
+void QExternalDialog::bbChanged()
+{
+       form_->controller().bbChanged(true);
+       form_->changed();
+}
+
+
+void QExternalDialog::browseClicked()
+{
+       int const choice =  externalCO->currentIndex();
+       docstring const template_name = 
+               lyx::from_utf8(form_->controller().getTemplate(choice).lyxName);
+       docstring const str =
+               form_->controller().browse(qstring_to_ucs4(fileED->text()),
+                                          template_name);
+       fileED->setText(toqstr(str));
+       form_->changed();
+}
+
+
+void QExternalDialog::change_adaptor()
+{
+       form_->changed();
+}
+
+
+void QExternalDialog::closeEvent(QCloseEvent * e)
+{
+       form_->slotWMHide();
+       e->accept();
+}
+
+
+void QExternalDialog::editClicked()
+{
+       form_->controller().editExternal();
+}
+
+
+
+void QExternalDialog::extraChanged(const QString& text)
+{
+       std::string const format = fromqstr(extraFormatCO->currentText());
+       form_->extra_[format] = text;
+       form_->changed();
+}
+
+
+void QExternalDialog::formatChanged(const QString& format)
+{
+       extraED->setText(form_->extra_[fromqstr(format)]);
+}
+
+
+void QExternalDialog::getbbClicked()
+{
+       form_->getBB();
+}
+
+
+void QExternalDialog::sizeChanged()
+{
+       aspectratioCB->setEnabled(activateAspectratio());
+       form_->changed();
+}
+
+
+void QExternalDialog::templateChanged()
+{
+       form_->updateTemplate();
+       form_->changed();
+}
+
+
+void QExternalDialog::widthUnitChanged()
+{
+       bool useHeight = (widthUnitCO->currentIndex() > 0);
+
+       if (useHeight)
+               widthED->setValidator(unsignedLengthValidator(widthED));
+       else
+               widthED->setValidator(new QDoubleValidator(0, 1000, 2, widthED));
+
+       heightED->setEnabled(useHeight);
+       heightUnitCO->setEnabled(useHeight);
+       form_->changed();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// QExternal
+//
+/////////////////////////////////////////////////////////////////////
+
 namespace {
 
 LyXLength::UNIT defaultUnit()
@@ -276,10 +472,11 @@ void getExtra(external::ExtraData & data,
 } // namespace anon
 
 
-typedef QController<ControlExternal, QView<QExternalDialog> > external_base_class;
+typedef QController<ControlExternal, QView<QExternalDialog> >
+       ExternalBase;
 
 QExternal::QExternal(Dialog & parent)
-       : external_base_class(parent, _("External Material"))
+       : ExternalBase(parent, _("External Material"))
 {}
 
 
@@ -520,3 +717,5 @@ void QExternal::getBB()
 
 } // namespace frontend
 } // namespace lyx
+
+#include "QExternal_moc.cpp"
index a903fef8371623769f3f9cf9a7321f260dc88573..d92d95d8f80bb8575bb7a91fb1088f67ecbda8eb 100644 (file)
 #define QEXTERNAL_H
 
 #include "QDialogView.h"
-#include "QExternalDialog.h"
+
+#include "ui/ExternalUi.h"
+
+#include <QCloseEvent>
+#include <QDialog>
 
 #include <map>
 
 namespace lyx {
 namespace frontend {
 
+class QExternal;
+
+class QExternalDialog : public QDialog, public Ui::QExternalUi {
+       Q_OBJECT
+public:
+       QExternalDialog(QExternal * form);
+
+       virtual void show();
+protected Q_SLOTS:
+       virtual void bbChanged();
+       virtual void browseClicked();
+       virtual void change_adaptor();
+       virtual void editClicked();
+       virtual void extraChanged(const QString&);
+       virtual void formatChanged(const QString&);
+       virtual void getbbClicked();
+       virtual void sizeChanged();
+       virtual void templateChanged();
+       virtual void widthUnitChanged();
+
+protected:
+       virtual void closeEvent(QCloseEvent * e);
+private:
+       bool activateAspectratio() const;
+       QExternal * form_;
+};
+
+
 class ControlExternal;
 
 class QExternal
diff --git a/src/frontends/qt4/QExternalDialog.C b/src/frontends/qt4/QExternalDialog.C
deleted file mode 100644 (file)
index faa0b01..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-/**
- * \file QExternalDialog.C
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author John Levon
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-// Qt defines a macro 'signals' that clashes with a boost namespace.
-// All is well if the namespace is visible first.
-#include "insets/ExternalTemplate.h"
-
-#include "controllers/ButtonController.h"
-#include "controllers/ControlExternal.h"
-
-#include "support/convert.h"
-#include "support/lstrings.h"
-#include "support/lyxlib.h"
-
-#include "QExternalDialog.h"
-
-#include "lengthcombo.h"
-#include "validators.h"
-#include "qt_helpers.h"
-#include "QExternal.h"
-
-#include <QCloseEvent>
-#include <QCheckBox>
-#include <QPushButton>
-#include <QTextBrowser>
-#include <QLineEdit>
-
-
-using lyx::support::float_equal;
-using lyx::support::isStrDbl;
-using std::string;
-
-namespace lyx {
-namespace frontend {
-
-QExternalDialog::QExternalDialog(QExternal * form)
-       : form_(form)
-{
-       setupUi(this);
-       connect(okPB, SIGNAL(clicked()),
-               form, SLOT(slotOK()));
-       connect(applyPB, SIGNAL(clicked()),
-               form, SLOT(slotApply()));
-       connect(closePB, SIGNAL(clicked()),
-               form, SLOT(slotClose()));
-
-       connect( displayCB, SIGNAL( toggled(bool) ), showCO, SLOT( setEnabled(bool) ) );
-       connect( displayCB, SIGNAL( toggled(bool) ), displayscaleED, SLOT( setEnabled(bool) ) );
-       connect( showCO, SIGNAL( activated(const QString&) ), this, SLOT( change_adaptor() ) );
-       connect( originCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
-       connect( aspectratioCB, SIGNAL( stateChanged(int) ), this, SLOT( change_adaptor() ) );
-       connect( browsePB, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
-       connect( editPB, SIGNAL( clicked() ), this, SLOT( editClicked() ) );
-       connect( externalCO, SIGNAL( activated(const QString&) ), this, SLOT( templateChanged() ) );
-       connect( extraED, SIGNAL( textChanged(const QString&) ), this, SLOT( extraChanged(const QString&) ) );
-       connect( extraFormatCO, SIGNAL( activated(const QString&) ), this, SLOT( formatChanged(const QString&) ) );
-       connect( widthUnitCO, SIGNAL( activated(int) ), this, SLOT( widthUnitChanged() ) );
-       connect( heightUnitCO, SIGNAL( selectionChanged(lyx::LyXLength::UNIT) ), this, SLOT( change_adaptor() ) );
-       connect( displayCB, SIGNAL( stateChanged(int) ), this, SLOT( change_adaptor() ) );
-       connect( displayscaleED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
-       connect( angleED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
-       connect( widthED, SIGNAL( textChanged(const QString&) ), this, SLOT( sizeChanged() ) );
-       connect( heightED, SIGNAL( textChanged(const QString&) ), this, SLOT( sizeChanged() ) );
-       connect( fileED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
-       connect( clipCB, SIGNAL( stateChanged(int) ), this, SLOT( change_adaptor() ) );
-       connect( getbbPB, SIGNAL( clicked() ), this, SLOT( getbbClicked() ) );
-       connect( xrED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
-       connect( ytED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
-       connect( xlED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
-       connect( ybED, SIGNAL( textChanged(const QString&) ), this, SLOT( bbChanged() ) );
-       connect( draftCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
-
-       QIntValidator * validator = new QIntValidator(displayscaleED);
-       validator->setBottom(1);
-       displayscaleED->setValidator(validator);
-
-       angleED->setValidator(new QDoubleValidator(-360, 360, 2, angleED));
-
-       xlED->setValidator(new QIntValidator(xlED));
-       ybED->setValidator(new QIntValidator(ybED));
-       xrED->setValidator(new QIntValidator(xrED));
-       ytED->setValidator(new QIntValidator(ytED));
-
-       widthED->setValidator(unsignedLengthValidator(widthED));
-       heightED->setValidator(unsignedLengthValidator(heightED));
-
-       fileED->setValidator(new PathValidator(true, fileED));
-       setFocusProxy(fileED);
-}
-
-
-void QExternalDialog::show()
-{
-       QDialog::show();
-}
-
-
-
-bool QExternalDialog::activateAspectratio() const
-{
-       if (widthUnitCO->currentIndex() == 0)
-               return false;
-
-       string const wstr = fromqstr(widthED->text());
-       if (wstr.empty())
-               return false;
-       bool const wIsDbl = isStrDbl(wstr);
-       if (wIsDbl && float_equal(convert<double>(wstr), 0.0, 0.05))
-               return false;
-       LyXLength l;
-       if (!wIsDbl && (!isValidLength(wstr, &l) || l.zero()))
-               return false;
-
-       string const hstr = fromqstr(heightED->text());
-       if (hstr.empty())
-               return false;
-       bool const hIsDbl = isStrDbl(hstr);
-       if (hIsDbl && float_equal(convert<double>(hstr), 0.0, 0.05))
-               return false;
-       if (!hIsDbl && (!isValidLength(hstr, &l) || l.zero()))
-               return false;
-
-       return true;
-}
-
-
-void QExternalDialog::bbChanged()
-{
-       form_->controller().bbChanged(true);
-       form_->changed();
-}
-
-
-void QExternalDialog::browseClicked()
-{
-       int const choice =  externalCO->currentIndex();
-       docstring const template_name = 
-               lyx::from_utf8(form_->controller().getTemplate(choice).lyxName);
-       docstring const str =
-               form_->controller().browse(qstring_to_ucs4(fileED->text()),
-                                          template_name);
-       fileED->setText(toqstr(str));
-       form_->changed();
-}
-
-
-void QExternalDialog::change_adaptor()
-{
-       form_->changed();
-}
-
-
-void QExternalDialog::closeEvent(QCloseEvent * e)
-{
-       form_->slotWMHide();
-       e->accept();
-}
-
-
-void QExternalDialog::editClicked()
-{
-       form_->controller().editExternal();
-}
-
-
-
-void QExternalDialog::extraChanged(const QString& text)
-{
-       std::string const format = fromqstr(extraFormatCO->currentText());
-       form_->extra_[format] = text;
-       form_->changed();
-}
-
-
-void QExternalDialog::formatChanged(const QString& format)
-{
-       extraED->setText(form_->extra_[fromqstr(format)]);
-}
-
-
-void QExternalDialog::getbbClicked()
-{
-       form_->getBB();
-}
-
-
-void QExternalDialog::sizeChanged()
-{
-       aspectratioCB->setEnabled(activateAspectratio());
-       form_->changed();
-}
-
-
-void QExternalDialog::templateChanged()
-{
-       form_->updateTemplate();
-       form_->changed();
-}
-
-
-void QExternalDialog::widthUnitChanged()
-{
-       bool useHeight = (widthUnitCO->currentIndex() > 0);
-
-       if (useHeight)
-               widthED->setValidator(unsignedLengthValidator(widthED));
-       else
-               widthED->setValidator(new QDoubleValidator(0, 1000, 2, widthED));
-
-       heightED->setEnabled(useHeight);
-       heightUnitCO->setEnabled(useHeight);
-       form_->changed();
-}
-
-} // namespace frontend
-} // namespace lyx
-
-#include "QExternalDialog_moc.cpp"
diff --git a/src/frontends/qt4/QExternalDialog.h b/src/frontends/qt4/QExternalDialog.h
deleted file mode 100644 (file)
index a89dd8e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-/**
- * \file QExternalDialog.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 QEXTERNALDIALOG_H
-#define QEXTERNALDIALOG_H
-
-#include "ui/ExternalUi.h"
-
-#include <QCloseEvent>
-#include <QDialog>
-
-namespace lyx {
-namespace frontend {
-
-class QExternal;
-
-class QExternalDialog : public QDialog, public Ui::QExternalUi {
-       Q_OBJECT
-public:
-       QExternalDialog(QExternal * form);
-
-       virtual void show();
-protected Q_SLOTS:
-       virtual void bbChanged();
-       virtual void browseClicked();
-       virtual void change_adaptor();
-       virtual void editClicked();
-       virtual void extraChanged(const QString&);
-       virtual void formatChanged(const QString&);
-       virtual void getbbClicked();
-       virtual void sizeChanged();
-       virtual void templateChanged();
-       virtual void widthUnitChanged();
-
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       bool activateAspectratio() const;
-       QExternal * form_;
-};
-
-} // namespace frontend
-} // namespace lyx
-
-#endif // QEXTERNALDIALOG_H
index d727b1b770344e1763b0023ca83aedb304939085..f403a4029b7c0958298608e5ab0380fe896e4ed9 100644 (file)
 #include "ControlCommand.h"
 #include "qt_helpers.h"
 
-#include "QIndexDialog.h"
 #include "QIndex.h"
 #include "Qt2BC.h"
 #include "ButtonController.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+
+#include <QLabel>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QWhatsThis>
+#include <QCloseEvent>
+
 
 using std::string;
 
+/////////////////////////////////////////////////////////////////////
+//
+// QIndexDialog
+//
+/////////////////////////////////////////////////////////////////////
+
 namespace lyx {
 namespace frontend {
 
-typedef QController<ControlCommand, QView<QIndexDialog> > index_base_class;
+QIndexDialog::QIndexDialog(QIndex * form)
+       : form_(form)
+{
+       setupUi(this);
+
+       connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK()));
+       connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
+       connect( keywordED, SIGNAL(textChanged(const QString &)), 
+               this, SLOT(change_adaptor()));
+
+       setFocusProxy(keywordED);
+
+       keywordED->setWhatsThis( qt_(
+               "The format of the entry in the index.\n"
+               "\n"
+               "An entry can be specified as a sub-entry of\n"
+               "another with \"!\":\n"
+               "\n"
+               "cars!mileage\n"
+               "\n"
+               "You can cross-refer to another entry like so:\n"
+               "\n"
+               "cars!mileage|see{economy}\n"
+               "\n"
+               "For further details refer to the local LaTeX\n"
+               "documentation.\n")
+       );
+}
 
 
+void QIndexDialog::change_adaptor()
+{
+       form_->changed();
+}
+
+
+void QIndexDialog::reject()
+{
+       form_->slotClose();
+}
+
+
+void QIndexDialog::closeEvent(QCloseEvent * e)
+{
+       form_->slotWMHide();
+       e->accept();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// QIndex
+//
+/////////////////////////////////////////////////////////////////////
+
+
+typedef QController<ControlCommand, QView<QIndexDialog> > IndexBase;
+
 QIndex::QIndex(Dialog & parent, docstring const & title, QString const & label)
-       : index_base_class(parent, title), label_(label)
+       : IndexBase(parent, title), label_(label)
 {
 }
 
@@ -70,3 +134,5 @@ bool QIndex::isValid()
 
 } // namespace frontend
 } // namespace lyx
+
+#include "QIndex_moc.cpp"
index 04d5f5d830474d137fbd615b8c093946a5903ae1..a49bdc5a3fe7d74505826cc6b32f796f4110a557 100644 (file)
 #define QINDEX_H
 
 #include "QDialogView.h"
-#include "QIndexDialog.h"
+#include "ui/IndexUi.h"
+
+#include <QDialog>
+#include <QCloseEvent>
 
 namespace lyx {
 namespace frontend {
 
+class QIndex;
+
+class QIndexDialog : public QDialog, public Ui::QIndexUi {
+       Q_OBJECT
+public:
+       QIndexDialog(QIndex * form);
+
+protected Q_SLOTS:
+       virtual void change_adaptor();
+       virtual void reject();
+protected:
+       virtual void closeEvent(QCloseEvent * e);
+private:
+       QIndex * form_;
+};
+
 class ControlCommand;
 
 class QIndex :
diff --git a/src/frontends/qt4/QIndexDialog.C b/src/frontends/qt4/QIndexDialog.C
deleted file mode 100644 (file)
index 52037df..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * \file QIndexDialog.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 "qt_helpers.h"
-
-#include "QIndex.h"
-#include "QIndexDialog.h"
-
-#include <QPushButton>
-#include <QLineEdit>
-#include <QWhatsThis>
-#include <QCloseEvent>
-
-namespace lyx {
-namespace frontend {
-
-QIndexDialog::QIndexDialog(QIndex * form)
-       : form_(form)
-{
-       setupUi(this);
-
-       connect(okPB, SIGNAL(clicked()),
-               form, SLOT(slotOK()));
-       connect(closePB, SIGNAL(clicked()),
-               form, SLOT(slotClose()));
-       connect( keywordED, SIGNAL( textChanged(const QString&) ), 
-               this, SLOT( change_adaptor() ) );
-
-       setFocusProxy(keywordED);
-
-       keywordED->setWhatsThis( qt_(
-               "The format of the entry in the index.\n"
-               "\n"
-               "An entry can be specified as a sub-entry of\n"
-               "another with \"!\":\n"
-               "\n"
-               "cars!mileage\n"
-               "\n"
-               "You can cross-refer to another entry like so:\n"
-               "\n"
-               "cars!mileage|see{economy}\n"
-               "\n"
-               "For further details refer to the local LaTeX\n"
-               "documentation.\n")
-       );
-}
-
-
-void QIndexDialog::change_adaptor()
-{
-       form_->changed();
-}
-
-
-void QIndexDialog::reject()
-{
-       form_->slotClose();
-}
-
-
-void QIndexDialog::closeEvent(QCloseEvent * e)
-{
-       form_->slotWMHide();
-       e->accept();
-}
-
-} // namespace frontend
-} // namespace lyx
-
-#include "QIndexDialog_moc.cpp"
diff --git a/src/frontends/qt4/QIndexDialog.h b/src/frontends/qt4/QIndexDialog.h
deleted file mode 100644 (file)
index 482bb0b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*-
-/**
- * \file QIndexDialog.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 QINDEXDIALOG_H
-#define QINDEXDIALOG_H
-
-#include "ui/IndexUi.h"
-
-#include <QDialog>
-#include <QCloseEvent>
-
-namespace lyx {
-namespace frontend {
-
-class QIndex;
-
-class QIndexDialog : public QDialog, public Ui::QIndexUi {
-       Q_OBJECT
-public:
-       QIndexDialog(QIndex * form);
-
-protected Q_SLOTS:
-       virtual void change_adaptor();
-       virtual void reject();
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       QIndex * form_;
-};
-
-} // namespace frontend
-} // namespace lyx
-
-#endif // QINDEXDIALOG_H
diff --git a/src/frontends/qt4/QLogDialog.C b/src/frontends/qt4/QLogDialog.C
deleted file mode 100644 (file)
index 6367d6b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * \file QLogDialog.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 "QLogDialog.h"
-#include "QLog.h"
-
-#include <QPushButton>
-#include <QCloseEvent>
-
-
-namespace lyx {
-namespace frontend {
-
-QLogDialog::QLogDialog(QLog * form)
-       : form_(form)
-{
-       setupUi(this);
-
-       connect(closePB, SIGNAL(clicked()),
-               form, SLOT(slotClose()));
-       connect( updatePB, SIGNAL( clicked() ), 
-               this, SLOT( updateClicked() ) );
-}
-
-
-void QLogDialog::closeEvent(QCloseEvent * e)
-{
-       form_->slotWMHide();
-       e->accept();
-}
-
-
-void QLogDialog::updateClicked()
-{
-       form_->update_contents();
-}
-
-} // namespace frontend
-} // namespace lyx
-
-#include "QLogDialog_moc.cpp"
diff --git a/src/frontends/qt4/QLogDialog.h b/src/frontends/qt4/QLogDialog.h
deleted file mode 100644 (file)
index 2191905..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- C++ -*-
-/**
- * \file QLogDialog.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 QLOGDIALOG_H
-#define QLOGDIALOG_H
-
-#include "ui/LogUi.h"
-
-#include <QDialog>
-#include <QCloseEvent>
-
-namespace lyx {
-namespace frontend {
-
-class QLog;
-
-class QLogDialog : public QDialog, public Ui::QLogUi {
-       Q_OBJECT
-public:
-       QLogDialog(QLog * form);
-protected Q_SLOTS:
-       virtual void updateClicked();
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       QLog * form_;
-};
-
-} // namespace frontend
-} // namespace lyx
-
-#endif // QLOGDIALOG_H