]> git.lyx.org Git - lyx.git/commitdiff
rename QPrintDialog to avoid name conflict
authorJohn Levon <levon@movementarian.org>
Wed, 30 Oct 2002 19:47:15 +0000 (19:47 +0000)
committerJohn Levon <levon@movementarian.org>
Wed, 30 Oct 2002 19:47:15 +0000 (19:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5557 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs_impl.h
src/frontends/qt2/Makefile.dialogs
src/frontends/qt2/QLPrintDialog.C [new file with mode: 0644]
src/frontends/qt2/QLPrintDialog.h [new file with mode: 0644]
src/frontends/qt2/QPrint.C
src/frontends/qt2/QPrint.h
src/frontends/qt2/QPrintDialog.C [deleted file]
src/frontends/qt2/QPrintDialog.h [deleted file]
src/frontends/qt2/QSpellchecker.C
src/frontends/qt2/TODO

index 9ff458d913d89fdb2669cf64f54de404f4b1ec9f..4c94c4268d215f2c6ef9bee1bf4dd910666c8ceb 100644 (file)
@@ -1,3 +1,16 @@
+2002-10-30  John Levon  <levon@movementarian.org>
+
+       * QPrintDialog.[hC]: move to ...
+
+       * QLPrintDialog.[hC]: ... here to prevent name clash
+
+       * QPrint.h:
+       * QPrint.C:
+       * Dialogs_impl.h: 
+       * Makefile.dialogs: from above
+       * QSpellchecker.C: reset progress
 2002-10-30  John Levon  <levon@movementarian.org>
 
        * QGraphics.C:
 2002-10-30  John Levon  <levon@movementarian.org>
 
        * QGraphics.C:
index 90617f27b4f3e33161bce681d59efb33ff221caa..cdb72e97a366d3f8a4229daf2674bd2ab8310b23 100644 (file)
@@ -91,7 +91,7 @@
 #include "QPreambleDialog.h"
 //#include "QPreferences.h"
 #include "QPrint.h"
 #include "QPreambleDialog.h"
 //#include "QPreferences.h"
 #include "QPrint.h"
-#include "QPrintDialog.h"
+#include "QLPrintDialog.h"
 #include "QRef.h"
 #include "QRefDialog.h"
 #include "QSearch.h"
 #include "QRef.h"
 #include "QRefDialog.h"
 #include "QSearch.h"
index 6ed774bc3acdeb172a95de854c1cf1fb1ee55632..c7e931cc30dc55c7c625c0df5a21c0850b0aeb7c 100644 (file)
@@ -73,8 +73,8 @@ DIALOGSOURCES = \
        QParagraph.C QParagraphDialog.C \
        QPreamble.h QPreambleDialog.h \
        QPreamble.C QPreambleDialog.C \
        QParagraph.C QParagraphDialog.C \
        QPreamble.h QPreambleDialog.h \
        QPreamble.C QPreambleDialog.C \
-       QPrint.h QPrintDialog.h \
-       QPrint.C QPrintDialog.C \
+       QPrint.h QLPrintDialog.h \
+       QPrint.C QLPrintDialog.C \
        QRef.h QRefDialog.h \
        QRef.C QRefDialog.C \
        QSearch.h QSearchDialog.h \
        QRef.h QRefDialog.h \
        QRef.C QRefDialog.C \
        QSearch.h QSearchDialog.h \
@@ -121,7 +121,7 @@ MOCDIALOGS = \
        QMinipageDialog_moc.C \
        QParagraphDialog_moc.C \
        QPreambleDialog_moc.C \
        QMinipageDialog_moc.C \
        QParagraphDialog_moc.C \
        QPreambleDialog_moc.C \
-       QPrintDialog_moc.C \
+       QLPrintDialog_moc.C \
        QRefDialog_moc.C \
        QSearchDialog_moc.C \
        QSendtoDialog_moc.C \
        QRefDialog_moc.C \
        QSearchDialog_moc.C \
        QSendtoDialog_moc.C \
diff --git a/src/frontends/qt2/QLPrintDialog.C b/src/frontends/qt2/QLPrintDialog.C
new file mode 100644 (file)
index 0000000..3b9d54d
--- /dev/null
@@ -0,0 +1,96 @@
+/**
+ * \file QLPrintDialog.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Levon
+ * \author Edwin Leuven
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "gettext.h"
+#include "support/filetools.h"
+#include "support/lstrings.h"
+
+#include "QPrint.h"
+#include "QLPrintDialog.h"
+
+#include <qfiledialog.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+
+
+QLPrintDialog::QLPrintDialog(QPrint * f)
+       : QPrintDialogBase(0, 0, false, 0),
+       form_(f)
+{
+       connect(printPB, SIGNAL(clicked()),
+               form_, SLOT(slotOK()));
+       connect(closePB, SIGNAL(clicked()),
+               form_, SLOT(slotClose()));
+}
+
+
+void QLPrintDialog::change_adaptor()
+{
+       form_->changed();
+}
+
+
+void QLPrintDialog::browseClicked()
+{
+       QString file =
+               QFileDialog::getOpenFileName(QString::null,
+                                            _("PostScript files (*.ps)"),
+                                            this, 0,
+                                            _("Select a file to print to"));
+       if (!file.isNull()) {
+               fileED->setText(file);
+               form_->changed();
+       }
+}
+
+
+void QLPrintDialog::fileChanged()
+{
+       if (!fileED->text().isEmpty())
+               fileRB->setChecked(true);
+       form_->changed();
+}
+
+
+void QLPrintDialog::copiesChanged(int i)
+{
+       collateCB->setEnabled(i != 1);
+       form_->changed();
+}
+
+
+void QLPrintDialog::printerChanged()
+{
+       printerRB->setChecked(true);
+       form_->changed();
+}
+
+
+void QLPrintDialog::pagerangeChanged()
+{
+       int const from = strToUnsignedInt(fromED->text().latin1());
+       int const to = strToUnsignedInt(toED->text().latin1());
+
+       if (!toED->text().isEmpty() && from > to)
+               fromED->setText(toED->text());
+
+       form_->changed();
+}
diff --git a/src/frontends/qt2/QLPrintDialog.h b/src/frontends/qt2/QLPrintDialog.h
new file mode 100644 (file)
index 0000000..dfcc87b
--- /dev/null
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+/**
+ * \file QLPrintDialog.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Levon
+ * \author Edwin Leuven
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#ifndef QLPRINTDIALOG_H
+#define QLPRINTDIALOG_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ui/QPrintDialogBase.h"
+
+class QPrint;
+
+class QLPrintDialog : public QPrintDialogBase {
+       Q_OBJECT
+public:
+       QLPrintDialog(QPrint * f);
+protected slots:
+       virtual void change_adaptor();
+       virtual void browseClicked();
+       virtual void fileChanged();
+       virtual void copiesChanged(int);
+       virtual void printerChanged();
+       virtual void pagerangeChanged();
+private:
+       QPrint * form_;
+};
+
+#endif // QLPRINTDIALOG_H
index bff49751814a83c7e53719c34b6002d8067e87e6..07f721d0f39b3bbca1c2d5f9a35229d579831d47 100644 (file)
@@ -22,7 +22,7 @@
 #include "gettext.h"
 
 #include "QPrint.h"
 #include "gettext.h"
 
 #include "QPrint.h"
-#include "QPrintDialog.h"
+#include "QLPrintDialog.h"
 #include "Qt2BC.h"
 
 #include <qlineedit.h>
 #include "Qt2BC.h"
 
 #include <qlineedit.h>
 #include <qspinbox.h>
 #include <qpushbutton.h>
 
 #include <qspinbox.h>
 #include <qpushbutton.h>
 
-// FIXME FIXME QPrintDialog is getting destructed twice !!!!
 
 
-
-typedef Qt2CB<ControlPrint, Qt2DB<QPrintDialog> > base_class;
+typedef Qt2CB<ControlPrint, Qt2DB<QLPrintDialog> > base_class;
 
 
 QPrint::QPrint()
 
 
 QPrint::QPrint()
@@ -45,7 +43,7 @@ QPrint::QPrint()
 
 void QPrint::build_dialog()
 {
 
 void QPrint::build_dialog()
 {
-       dialog_.reset(new QPrintDialog(this));
+       dialog_.reset(new QLPrintDialog(this));
 
        bc().setOK(dialog_->printPB);
        bc().setCancel(dialog_->closePB);
 
        bc().setOK(dialog_->printPB);
        bc().setCancel(dialog_->closePB);
index f036a15a2acde8b1bfac8c3e48a3b3fe0bb106ee..e189488c1c882f2e6164fe22867a7a9a6c210234 100644 (file)
 #include "Qt2Base.h"
 
 class ControlPrint;
 #include "Qt2Base.h"
 
 class ControlPrint;
-class QPrintDialog;
+class QLPrintDialog;
 
 ///
 class QPrint
 
 ///
 class QPrint
-       : public Qt2CB<ControlPrint, Qt2DB<QPrintDialog> >
+       : public Qt2CB<ControlPrint, Qt2DB<QLPrintDialog> >
 {
 public:
        ///
 {
 public:
        ///
-       friend class QPrintDialog;
+       friend class QLPrintDialog;
        ///
        QPrint();
 private:
        ///
        QPrint();
 private:
diff --git a/src/frontends/qt2/QPrintDialog.C b/src/frontends/qt2/QPrintDialog.C
deleted file mode 100644 (file)
index 573fb71..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * \file QPrintDialog.C
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author John Levon
- * \author Edwin Leuven
- *
- * Full author contact details are available in file CREDITS
- */
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "gettext.h"
-#include "support/filetools.h"
-#include "support/lstrings.h"
-
-#include "QPrint.h"
-#include "QPrintDialog.h"
-
-#include <qfiledialog.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-
-
-QPrintDialog::QPrintDialog(QPrint * f)
-       : QPrintDialogBase(0, 0, false, 0),
-       form_(f)
-{
-       connect(printPB, SIGNAL(clicked()),
-               form_, SLOT(slotOK()));
-       connect(closePB, SIGNAL(clicked()),
-               form_, SLOT(slotClose()));
-}
-
-
-void QPrintDialog::change_adaptor()
-{
-       form_->changed();
-}
-
-
-void QPrintDialog::browseClicked()
-{
-       QString file =
-               QFileDialog::getOpenFileName(QString::null,
-                                            _("PostScript files (*.ps)"),
-                                            this, 0,
-                                            _("Select a file to print to"));
-       if (!file.isNull()) {
-               fileED->setText(file);
-               form_->changed();
-       }
-}
-
-
-void QPrintDialog::fileChanged()
-{
-       if (!fileED->text().isEmpty())
-               fileRB->setChecked(true);
-       form_->changed();
-}
-
-
-void QPrintDialog::copiesChanged(int i)
-{
-       collateCB->setEnabled(i != 1);
-       form_->changed();
-}
-
-
-void QPrintDialog::printerChanged()
-{
-       printerRB->setChecked(true);
-       form_->changed();
-}
-
-
-void QPrintDialog::pagerangeChanged()
-{
-       int const from = strToUnsignedInt(fromED->text().latin1());
-       int const to = strToUnsignedInt(toED->text().latin1());
-
-       if (!toED->text().isEmpty() && from > to)
-               fromED->setText(toED->text());
-
-       form_->changed();
-}
diff --git a/src/frontends/qt2/QPrintDialog.h b/src/frontends/qt2/QPrintDialog.h
deleted file mode 100644 (file)
index b28f872..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- C++ -*-
-/**
- * \file QPrintDialog.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author John Levon
- * \author Edwin Leuven
- *
- * Full author contact details are available in file CREDITS
- */
-
-#ifndef QPRINTDIALOG_H
-#define QPRINTDIALOG_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ui/QPrintDialogBase.h"
-
-class QPrint;
-
-class QPrintDialog : public QPrintDialogBase {
-       Q_OBJECT
-public:
-       QPrintDialog(QPrint * f);
-protected slots:
-       virtual void change_adaptor();
-       virtual void browseClicked();
-       virtual void fileChanged();
-       virtual void copiesChanged(int);
-       virtual void printerChanged();
-       virtual void pagerangeChanged();
-private:
-       QPrint * form_;
-};
-
-#endif // QPRINTDIALOG_H
index adeb9f643a4cd276022439b1ea86595e96b13511..d3df1219c97b177d121c93055784e8d6d2c4062d 100644 (file)
@@ -50,6 +50,7 @@ void QSpellchecker::update_contents()
        dialog_->wordED->setText("");
        dialog_->replaceCO->clear();
        dialog_->suggestionsLB->clear();
        dialog_->wordED->setText("");
        dialog_->replaceCO->clear();
        dialog_->suggestionsLB->clear();
+       dialog_->spellcheckPR->setProgress(0.0);
 }
 
 
 }
 
 
index 0f3790db7abfb772e7b87977259974848d4aee13..8d1b1212104aa7023751520d63ca66166026cee9 100644 (file)
@@ -4,10 +4,6 @@ is incomplete.
 
 Those with asterisks are what I perceive as being "big jobs"
 
 
 Those with asterisks are what I perceive as being "big jobs"
 
-lyx_gui (qt)
-
-       - move out lyxserver
 QDocument
 
        - finalize bullets 
 QDocument
 
        - finalize bullets 
@@ -18,7 +14,7 @@ QDocument
 
 qfont_loader
 
 
 qfont_loader
 
-       - use lyxrc, check for failure
+       - use lyxrc
  
 QForks
 
  
 QForks
 
@@ -41,10 +37,6 @@ QLyXKeySym
 
        - getISOEncoded - get this to work (*)
 
 
        - getISOEncoded - get this to work (*)
 
-QMathDialog
-
-       - finish
 QPreferences
 
        - implement me (*)
 QPreferences
 
        - implement me (*)