From 4792af4928d0d5156b7fc94ff386092b7f3a3f0b Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 11 Jul 2002 01:01:38 +0000 Subject: [PATCH] Compile fixes. Qt2 should now build (and fail immediately when you start it, some assert related to grfx, help me Angus :) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4596 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 16 +++ src/frontends/qt2/Makefile.am | 6 +- src/frontends/qt2/QAbout.C | 2 +- src/frontends/qt2/QAbout.h | 2 +- src/frontends/qt2/QBibitem.C | 2 +- src/frontends/qt2/QBibitem.h | 2 +- src/frontends/qt2/QBibtex.C | 2 +- src/frontends/qt2/QBibtex.h | 2 +- src/frontends/qt2/QCharacter.C | 2 +- src/frontends/qt2/QCharacter.h | 3 +- src/frontends/qt2/QCitation.C | 4 +- src/frontends/qt2/QCitation.h | 3 +- src/frontends/qt2/QERT.C | 2 +- src/frontends/qt2/QERT.h | 3 +- src/frontends/qt2/QError.C | 2 +- src/frontends/qt2/QError.h | 3 +- src/frontends/qt2/QExternal.C | 2 +- src/frontends/qt2/QExternal.h | 2 +- src/frontends/qt2/QFloat.C | 2 +- src/frontends/qt2/QFloat.h | 2 +- src/frontends/qt2/QGraphics.C | 2 +- src/frontends/qt2/QGraphics.h | 2 +- src/frontends/qt2/QInclude.C | 2 +- src/frontends/qt2/QInclude.h | 2 +- src/frontends/qt2/QIndex.C | 2 +- src/frontends/qt2/QIndex.h | 3 +- src/frontends/qt2/QLog.C | 2 +- src/frontends/qt2/QLog.h | 2 +- src/frontends/qt2/QMiniBuffer.C | 50 ++++++++++ src/frontends/qt2/QMiniBuffer.h | 45 +++++++++ src/frontends/qt2/QMinipage.C | 2 +- src/frontends/qt2/QMinipage.h | 2 +- src/frontends/qt2/QPreamble.C | 2 +- src/frontends/qt2/QPreamble.h | 2 +- src/frontends/qt2/QPrint.C | 2 +- src/frontends/qt2/QPrint.h | 3 +- src/frontends/qt2/QRef.C | 2 +- src/frontends/qt2/QRef.h | 3 +- src/frontends/qt2/QSearch.C | 2 +- src/frontends/qt2/QSearch.h | 3 +- src/frontends/qt2/QShowFile.C | 2 +- src/frontends/qt2/QShowFile.h | 3 +- src/frontends/qt2/QSpellchecker.C | 2 +- src/frontends/qt2/QSpellchecker.h | 3 +- src/frontends/qt2/QTabularCreate.C | 2 +- src/frontends/qt2/QTabularCreate.h | 3 +- src/frontends/qt2/QTexinfo.C | 2 +- src/frontends/qt2/QTexinfo.h | 2 +- src/frontends/qt2/QThesaurus.C | 2 +- src/frontends/qt2/QThesaurus.h | 2 +- src/frontends/qt2/QToc.C | 2 +- src/frontends/qt2/QToc.h | 2 +- src/frontends/qt2/QURL.C | 2 +- src/frontends/qt2/QURL.h | 3 +- src/frontends/qt2/QVCLog.C | 2 +- src/frontends/qt2/QVCLog.h | 2 +- src/frontends/qt2/Qt2Base.h | 13 +-- src/frontends/qt2/QtView.C | 19 +--- src/frontends/qt2/TODO | 152 +++++++++++++++++++++++++++++ src/frontends/qt2/Toolbar_pimpl.C | 12 +-- src/frontends/qt2/Toolbar_pimpl.h | 2 +- src/frontends/qt2/lyx_gui.C | 7 ++ 62 files changed, 354 insertions(+), 86 deletions(-) create mode 100644 src/frontends/qt2/QMiniBuffer.C create mode 100644 src/frontends/qt2/QMiniBuffer.h create mode 100644 src/frontends/qt2/TODO diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index a4fbae9240..de5608ec1a 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,19 @@ +2002-07-11 John Levon + + * dialog files: add unused Dialogs paramater to allow compile + + * QtView.C: + * QMiniBuffer.h: + * QMiniBuffer.C: + * Makefile.am: add QMiniBuffer (placeholder) + + * TODO: add + + * Toolbar_pimpl.h: + * Toolbar_pimpl.C: compile fix + + * lyx_gui.C: add hexname() place holder + 2002-07-04 André Pönitz * xforms/Makefile.am: replace XFORMSGIMAGE by XFORMSIMAGE diff --git a/src/frontends/qt2/Makefile.am b/src/frontends/qt2/Makefile.am index 1119f4c406..3176b191e2 100644 --- a/src/frontends/qt2/Makefile.am +++ b/src/frontends/qt2/Makefile.am @@ -18,7 +18,6 @@ AM_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR include $(srcdir)/Makefile.dialogs libqt2_la_SOURCES = \ - $(DIALOGSOURCES) \ Alert_pimpl.C \ Dialogs.C \ FileDialog.C \ @@ -37,6 +36,8 @@ libqt2_la_SOURCES = \ QLPainter.h \ QLyXKeySym.C \ QLyXKeySym.h \ + QMiniBuffer.C \ + QMiniBuffer.h \ Qt2Base.C \ Qt2Base.h \ Qt2BC.C \ @@ -59,6 +60,7 @@ libqt2_la_SOURCES = \ qscreen.h \ qscreen.C \ qttableview.h \ - qttableview.C + qttableview.C \ + $(DIALOGSOURCES) libqt2.la: $(libqt2_la_OBJECTS) $(libqt2_la_DEPENDENCIES) diff --git a/src/frontends/qt2/QAbout.C b/src/frontends/qt2/QAbout.C index e3cdf11e3b..29b4d283ed 100644 --- a/src/frontends/qt2/QAbout.C +++ b/src/frontends/qt2/QAbout.C @@ -28,7 +28,7 @@ using std::getline; typedef Qt2CB > base_class; -QAbout::QAbout(ControlAboutlyx & c) +QAbout::QAbout(ControlAboutlyx & c, Dialogs &) : base_class(c, _("About LyX")) { } diff --git a/src/frontends/qt2/QAbout.h b/src/frontends/qt2/QAbout.h index d08dae41a8..7f0de19d06 100644 --- a/src/frontends/qt2/QAbout.h +++ b/src/frontends/qt2/QAbout.h @@ -22,7 +22,7 @@ class QAbout : public Qt2CB > { public: - QAbout(ControlAboutlyx &); + QAbout(ControlAboutlyx &, Dialogs &); private: /// not needed diff --git a/src/frontends/qt2/QBibitem.C b/src/frontends/qt2/QBibitem.C index d28c4c4c4c..77b3acb5bb 100644 --- a/src/frontends/qt2/QBibitem.C +++ b/src/frontends/qt2/QBibitem.C @@ -23,7 +23,7 @@ typedef Qt2CB > base_class; -QBibitem::QBibitem(ControlBibitem & c) +QBibitem::QBibitem(ControlBibitem & c, Dialogs &) : base_class(c, _("Bibliography Item")) { } diff --git a/src/frontends/qt2/QBibitem.h b/src/frontends/qt2/QBibitem.h index 06bcc895fe..9e6789c029 100644 --- a/src/frontends/qt2/QBibitem.h +++ b/src/frontends/qt2/QBibitem.h @@ -21,7 +21,7 @@ class QBibitem : friend class QBibitemDialog; public: - QBibitem(ControlBibitem &); + QBibitem(ControlBibitem &, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QBibtex.C b/src/frontends/qt2/QBibtex.C index 41d0c3d2e0..076c326fa4 100644 --- a/src/frontends/qt2/QBibtex.C +++ b/src/frontends/qt2/QBibtex.C @@ -26,7 +26,7 @@ typedef Qt2CB > base_class; -QBibtex::QBibtex(ControlBibtex & c) +QBibtex::QBibtex(ControlBibtex & c, Dialogs &) : base_class(c, _("BibTeX")) { } diff --git a/src/frontends/qt2/QBibtex.h b/src/frontends/qt2/QBibtex.h index 58dcedc42d..104555933e 100644 --- a/src/frontends/qt2/QBibtex.h +++ b/src/frontends/qt2/QBibtex.h @@ -21,7 +21,7 @@ class QBibtex : friend class QBibtexDialog; public: - QBibtex(ControlBibtex &); + QBibtex(ControlBibtex &, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QCharacter.C b/src/frontends/qt2/QCharacter.C index 2e4b54fae0..2d7a64bc32 100644 --- a/src/frontends/qt2/QCharacter.C +++ b/src/frontends/qt2/QCharacter.C @@ -27,7 +27,7 @@ using std::vector; typedef Qt2CB > base_class; -QCharacter::QCharacter(ControlCharacter & c) +QCharacter::QCharacter(ControlCharacter & c, Dialogs &) : base_class(c, _("Character")) { } diff --git a/src/frontends/qt2/QCharacter.h b/src/frontends/qt2/QCharacter.h index 39f469d21d..0a6883c0b7 100644 --- a/src/frontends/qt2/QCharacter.h +++ b/src/frontends/qt2/QCharacter.h @@ -22,6 +22,7 @@ class ControlCharacter; class QCharacterDialog; +class Dialogs; class QCharacter : public Qt2CB > @@ -29,7 +30,7 @@ class QCharacter : friend class QCharacterDialog; public: - QCharacter(ControlCharacter &); + QCharacter(ControlCharacter &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QCitation.C b/src/frontends/qt2/QCitation.C index 7b57544afe..e31deb7ffa 100644 --- a/src/frontends/qt2/QCitation.C +++ b/src/frontends/qt2/QCitation.C @@ -41,7 +41,7 @@ using std::vector; typedef Qt2CB > base_class; -QCitation::QCitation(ControlCitation & c) +QCitation::QCitation(ControlCitation & c, Dialogs &) : base_class(c, _("Citation")) {} @@ -181,7 +181,7 @@ void QCitation::updateBrowser(QListBox* browser, it < keys.end(); ++it) { string const key = frontStrip(strip(*it)); // FIXME: why the .empty() test ? - if(!key.empty()) + if (!key.empty()) browser->insertItem(key.c_str()); } } diff --git a/src/frontends/qt2/QCitation.h b/src/frontends/qt2/QCitation.h index e3eaa35aa9..62cd8c6c84 100644 --- a/src/frontends/qt2/QCitation.h +++ b/src/frontends/qt2/QCitation.h @@ -21,6 +21,7 @@ class QListBox; class ControlCitation; class QCitationDialog; +class Dialogs; class QCitation : public Qt2CB > { @@ -28,7 +29,7 @@ class QCitation : public Qt2CB > public: /// - QCitation(ControlCitation &); + QCitation(ControlCitation &, Dialogs &); private: /// diff --git a/src/frontends/qt2/QERT.C b/src/frontends/qt2/QERT.C index bff22310f7..c65e28af2a 100644 --- a/src/frontends/qt2/QERT.C +++ b/src/frontends/qt2/QERT.C @@ -20,7 +20,7 @@ typedef Qt2CB > base_class; -QERT::QERT(ControlERT & c) +QERT::QERT(ControlERT & c, Dialogs &) : base_class(c, _("LaTeX ERT")) { } diff --git a/src/frontends/qt2/QERT.h b/src/frontends/qt2/QERT.h index 4132468066..7d0e014c8a 100644 --- a/src/frontends/qt2/QERT.h +++ b/src/frontends/qt2/QERT.h @@ -14,6 +14,7 @@ class ControlERT; class QERTDialog; +class Dialogs; class QERT : public Qt2CB > @@ -21,7 +22,7 @@ class QERT : friend class QERTDialog; public: - QERT(ControlERT &); + QERT(ControlERT &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QError.C b/src/frontends/qt2/QError.C index 226b0dfb0e..7d32c1fccf 100644 --- a/src/frontends/qt2/QError.C +++ b/src/frontends/qt2/QError.C @@ -20,7 +20,7 @@ typedef Qt2CB > base_class; -QError::QError(ControlError & c) +QError::QError(ControlError & c, Dialogs &) : base_class(c, _("LaTeX Error")) { } diff --git a/src/frontends/qt2/QError.h b/src/frontends/qt2/QError.h index 60cc3d7b60..17a498afb9 100644 --- a/src/frontends/qt2/QError.h +++ b/src/frontends/qt2/QError.h @@ -14,6 +14,7 @@ class ControlError; class QErrorDialog; +class Dialogs; class QError : public Qt2CB > @@ -21,7 +22,7 @@ class QError : friend class QErrorDialog; public: - QError(ControlError &); + QError(ControlError &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QExternal.C b/src/frontends/qt2/QExternal.C index 7c10017e34..7cc2941c68 100644 --- a/src/frontends/qt2/QExternal.C +++ b/src/frontends/qt2/QExternal.C @@ -23,7 +23,7 @@ typedef Qt2CB > base_class; -QExternal::QExternal(ControlExternal & c) +QExternal::QExternal(ControlExternal & c, Dialogs &) : base_class(c, _("External")) { } diff --git a/src/frontends/qt2/QExternal.h b/src/frontends/qt2/QExternal.h index 185a4d6e1c..b058df9cce 100644 --- a/src/frontends/qt2/QExternal.h +++ b/src/frontends/qt2/QExternal.h @@ -21,7 +21,7 @@ class QExternal : friend class QExternalDialog; public: - QExternal(ControlExternal &); + QExternal(ControlExternal &, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QFloat.C b/src/frontends/qt2/QFloat.C index f609d1d0d3..4101dd4bc2 100644 --- a/src/frontends/qt2/QFloat.C +++ b/src/frontends/qt2/QFloat.C @@ -27,7 +27,7 @@ typedef Qt2CB > base_class; -QFloat::QFloat(ControlFloat & c) +QFloat::QFloat(ControlFloat & c, Dialogs &) : base_class(c, _("LaTeX Information")) { } diff --git a/src/frontends/qt2/QFloat.h b/src/frontends/qt2/QFloat.h index 96df6dc5f1..ceecbdb257 100644 --- a/src/frontends/qt2/QFloat.h +++ b/src/frontends/qt2/QFloat.h @@ -27,7 +27,7 @@ public: /// friend class QFloatDialog; /// - QFloat(ControlFloat &); + QFloat(ControlFloat &, Dialogs &); private: /// Apply changes virtual void apply(); diff --git a/src/frontends/qt2/QGraphics.C b/src/frontends/qt2/QGraphics.C index 030fb96d5b..e7aa08e834 100644 --- a/src/frontends/qt2/QGraphics.C +++ b/src/frontends/qt2/QGraphics.C @@ -41,7 +41,7 @@ typedef Qt2CB > base_class; -QGraphics::QGraphics(ControlGraphics & c) +QGraphics::QGraphics(ControlGraphics & c, Dialogs &) : base_class(c, _("Graphics")) { } diff --git a/src/frontends/qt2/QGraphics.h b/src/frontends/qt2/QGraphics.h index e8762841ce..31870e8fb6 100644 --- a/src/frontends/qt2/QGraphics.h +++ b/src/frontends/qt2/QGraphics.h @@ -28,7 +28,7 @@ public: /// friend class QGraphicsDialog; /// - QGraphics(ControlGraphics &); + QGraphics(ControlGraphics &, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QInclude.C b/src/frontends/qt2/QInclude.C index c2f692ba25..6a087e4163 100644 --- a/src/frontends/qt2/QInclude.C +++ b/src/frontends/qt2/QInclude.C @@ -27,7 +27,7 @@ typedef Qt2CB > base_class; -QInclude::QInclude(ControlInclude & c) +QInclude::QInclude(ControlInclude & c, Dialogs &) : base_class(c, _("Include")) { } diff --git a/src/frontends/qt2/QInclude.h b/src/frontends/qt2/QInclude.h index a6cc7e56d4..09876bbbe2 100644 --- a/src/frontends/qt2/QInclude.h +++ b/src/frontends/qt2/QInclude.h @@ -27,7 +27,7 @@ public: /// friend class QIncludeDialog; /// - QInclude(ControlInclude &); + QInclude(ControlInclude &, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QIndex.C b/src/frontends/qt2/QIndex.C index 09622ff240..a730962853 100644 --- a/src/frontends/qt2/QIndex.C +++ b/src/frontends/qt2/QIndex.C @@ -19,7 +19,7 @@ typedef Qt2CB > base_class; -QIndex::QIndex(ControlIndex & c) +QIndex::QIndex(ControlIndex & c, Dialogs &) : base_class(c, _("Index")) { } diff --git a/src/frontends/qt2/QIndex.h b/src/frontends/qt2/QIndex.h index 82c2773d9d..1d8521ad4b 100644 --- a/src/frontends/qt2/QIndex.h +++ b/src/frontends/qt2/QIndex.h @@ -15,6 +15,7 @@ class ControlIndex; class QIndexDialog; +class Dialogs; class QIndex : public Qt2CB > @@ -22,7 +23,7 @@ class QIndex : friend class QIndexDialog; public: - QIndex(ControlIndex &); + QIndex(ControlIndex &, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QLog.C b/src/frontends/qt2/QLog.C index b1e0b6ddbc..4c98679229 100644 --- a/src/frontends/qt2/QLog.C +++ b/src/frontends/qt2/QLog.C @@ -29,7 +29,7 @@ using std::getline; typedef Qt2CB > base_class; -QLog::QLog(ControlLog & c) +QLog::QLog(ControlLog & c, Dialogs &) : base_class(c, _("Log")) { } diff --git a/src/frontends/qt2/QLog.h b/src/frontends/qt2/QLog.h index eef767afec..84dba70286 100644 --- a/src/frontends/qt2/QLog.h +++ b/src/frontends/qt2/QLog.h @@ -27,7 +27,7 @@ public: /// friend class QLogDialog; /// - QLog(ControlLog &); + QLog(ControlLog &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QMiniBuffer.C b/src/frontends/qt2/QMiniBuffer.C new file mode 100644 index 0000000000..15adc150b2 --- /dev/null +++ b/src/frontends/qt2/QMiniBuffer.C @@ -0,0 +1,50 @@ +// -*- C++ -*- +/** + * \file QMiniBuffer.C + * Copyright 1995-2002 the LyX Team + * Read the file COPYING + * + * \author Lars + * \author Asger and Juergen + * \author John Levon + */ + +#include + +#ifdef __GNUG__ +#pragma implementation +#endif + +#include "QMiniBuffer.h" + +QMiniBuffer::QMiniBuffer(LyXView * o) + : MiniBuffer(o) +{ +} + + +QMiniBuffer::~QMiniBuffer() +{ +} + + +bool QMiniBuffer::isEditingMode() const +{ + return false; +} + + +void QMiniBuffer::editingMode() +{ +} + + + +void QMiniBuffer::messageMode() +{ +} + + +void QMiniBuffer::set_input(string const &) +{ +} diff --git a/src/frontends/qt2/QMiniBuffer.h b/src/frontends/qt2/QMiniBuffer.h new file mode 100644 index 0000000000..d3f9b20107 --- /dev/null +++ b/src/frontends/qt2/QMiniBuffer.h @@ -0,0 +1,45 @@ +// -*- C++ -*- +/** + * \file QMiniBuffer.h + * Copyright 1995-2002 the LyX Team + * Read the file COPYING + * + * \author Lars + * \author Asger and Juergen + * \author John Levon + */ + +#ifndef QMINIBUFFER_H +#define QMINIBUFFER_H + +#include "LString.h" + +#include "MiniBuffer.h" + +#ifdef __GNUG__ +#pragma interface +#endif + +/// FIXME: place holder only +class QMiniBuffer : public MiniBuffer { +public: + /// + QMiniBuffer(LyXView *); + + /// destructor + virtual ~QMiniBuffer(); + +protected: + /// Are we in editing mode? + virtual bool isEditingMode() const; + /// enter editing mode + virtual void editingMode(); + /// enter message display mode + virtual void messageMode(); + + /// set the minibuffer content in editing mode + virtual void set_input(string const &); + +}; + +#endif // QMINIBUFFER_H diff --git a/src/frontends/qt2/QMinipage.C b/src/frontends/qt2/QMinipage.C index ff840a62d9..1b7104944d 100644 --- a/src/frontends/qt2/QMinipage.C +++ b/src/frontends/qt2/QMinipage.C @@ -29,7 +29,7 @@ typedef Qt2CB > base_class; -QMinipage::QMinipage(ControlMinipage & c) +QMinipage::QMinipage(ControlMinipage & c, Dialogs &) : base_class(c, _("Minipage")) { } diff --git a/src/frontends/qt2/QMinipage.h b/src/frontends/qt2/QMinipage.h index b6ae553b6f..c270159213 100644 --- a/src/frontends/qt2/QMinipage.h +++ b/src/frontends/qt2/QMinipage.h @@ -27,7 +27,7 @@ public: /// friend class QMinipageDialog; /// - QMinipage(ControlMinipage &); + QMinipage(ControlMinipage &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QPreamble.C b/src/frontends/qt2/QPreamble.C index 1e79b329e3..bbd66f62c7 100644 --- a/src/frontends/qt2/QPreamble.C +++ b/src/frontends/qt2/QPreamble.C @@ -26,7 +26,7 @@ typedef Qt2CB > base_class; -QPreamble::QPreamble(ControlPreamble & c) +QPreamble::QPreamble(ControlPreamble & c, Dialogs &) : base_class(c, _("LaTeX Preamble")) { } diff --git a/src/frontends/qt2/QPreamble.h b/src/frontends/qt2/QPreamble.h index 99d7c4e638..021973a846 100644 --- a/src/frontends/qt2/QPreamble.h +++ b/src/frontends/qt2/QPreamble.h @@ -27,7 +27,7 @@ public: /// friend class QPreambleDialog; /// - QPreamble(ControlPreamble &); + QPreamble(ControlPreamble &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QPrint.C b/src/frontends/qt2/QPrint.C index 9ca68720b5..4241e14d16 100644 --- a/src/frontends/qt2/QPrint.C +++ b/src/frontends/qt2/QPrint.C @@ -32,7 +32,7 @@ typedef Qt2CB > base_class; -QPrint::QPrint(ControlPrint & c) +QPrint::QPrint(ControlPrint & c, Dialogs &) : base_class(c, _("Print")) { } diff --git a/src/frontends/qt2/QPrint.h b/src/frontends/qt2/QPrint.h index ec1a8d035c..d4f367a9c5 100644 --- a/src/frontends/qt2/QPrint.h +++ b/src/frontends/qt2/QPrint.h @@ -19,6 +19,7 @@ class ControlPrint; class QPrintDialog; +class Dialogs; /// class QPrint @@ -28,7 +29,7 @@ public: /// friend class QPrintDialog; /// - QPrint(ControlPrint &); + QPrint(ControlPrint &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QRef.C b/src/frontends/qt2/QRef.C index fc34f087dd..3a64c2ed1c 100644 --- a/src/frontends/qt2/QRef.C +++ b/src/frontends/qt2/QRef.C @@ -28,7 +28,7 @@ using std::endl; typedef Qt2CB > base_class; -QRef::QRef(ControlRef & c) +QRef::QRef(ControlRef & c, Dialogs &) : base_class(c, _("Cross Reference")), sort_(false), at_ref_(false) { diff --git a/src/frontends/qt2/QRef.h b/src/frontends/qt2/QRef.h index c9758813ed..2c671c21d6 100644 --- a/src/frontends/qt2/QRef.h +++ b/src/frontends/qt2/QRef.h @@ -17,6 +17,7 @@ class ControlRef; class QRefDialog; +class Dialogs; class QRef : public Qt2CB > @@ -24,7 +25,7 @@ class QRef : friend class QRefDialog; public: - QRef(ControlRef & c); + QRef(ControlRef & c, Dialogs &); private: /// apply changes diff --git a/src/frontends/qt2/QSearch.C b/src/frontends/qt2/QSearch.C index 2753f5c3ba..8cc286a216 100644 --- a/src/frontends/qt2/QSearch.C +++ b/src/frontends/qt2/QSearch.C @@ -27,7 +27,7 @@ typedef Qt2CB > base_class; -QSearch::QSearch(ControlSearch & c) +QSearch::QSearch(ControlSearch & c, Dialogs &) : base_class(c, _("Search")) { } diff --git a/src/frontends/qt2/QSearch.h b/src/frontends/qt2/QSearch.h index f523414c36..576c413853 100644 --- a/src/frontends/qt2/QSearch.h +++ b/src/frontends/qt2/QSearch.h @@ -18,6 +18,7 @@ class ControlSearch; class QSearchDialog; +class Dialogs; /// class QSearch @@ -27,7 +28,7 @@ public: /// friend class QSearchDialog; /// - QSearch(ControlSearch &); + QSearch(ControlSearch &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QShowFile.C b/src/frontends/qt2/QShowFile.C index 5e38f797a4..42d04e8080 100644 --- a/src/frontends/qt2/QShowFile.C +++ b/src/frontends/qt2/QShowFile.C @@ -20,7 +20,7 @@ typedef Qt2CB > base_class; -QShowFile::QShowFile(ControlShowFile & c) +QShowFile::QShowFile(ControlShowFile & c, Dialogs &) : base_class(c, _("ShowFile")) { } diff --git a/src/frontends/qt2/QShowFile.h b/src/frontends/qt2/QShowFile.h index 3a1017c71a..d6279da93f 100644 --- a/src/frontends/qt2/QShowFile.h +++ b/src/frontends/qt2/QShowFile.h @@ -14,6 +14,7 @@ class ControlShowFile; class QShowFileDialog; +class Dialogs; class QShowFile : public Qt2CB > @@ -21,7 +22,7 @@ class QShowFile : friend class QShowFileDialog; public: - QShowFile(ControlShowFile &); + QShowFile(ControlShowFile &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QSpellchecker.C b/src/frontends/qt2/QSpellchecker.C index cbd553def9..3aff4a21b1 100644 --- a/src/frontends/qt2/QSpellchecker.C +++ b/src/frontends/qt2/QSpellchecker.C @@ -23,7 +23,7 @@ typedef Qt2CB > base_class; -QSpellchecker::QSpellchecker(ControlSpellchecker & c) +QSpellchecker::QSpellchecker(ControlSpellchecker & c, Dialogs &) : base_class(c, _("Spellchecker")) { } diff --git a/src/frontends/qt2/QSpellchecker.h b/src/frontends/qt2/QSpellchecker.h index b9c6a40a52..2e934d3545 100644 --- a/src/frontends/qt2/QSpellchecker.h +++ b/src/frontends/qt2/QSpellchecker.h @@ -16,6 +16,7 @@ class ControlSpellchecker; class QSpellcheckerDialog; +class Dialogs; class QSpellchecker : public Qt2CB > @@ -23,7 +24,7 @@ class QSpellchecker : friend class QSpellcheckerDialog; public: - QSpellchecker(ControlSpellchecker &); + QSpellchecker(ControlSpellchecker &, Dialogs &); /// update from controller void partialUpdate(int id); diff --git a/src/frontends/qt2/QTabularCreate.C b/src/frontends/qt2/QTabularCreate.C index 20aa4d6641..f62327d46b 100644 --- a/src/frontends/qt2/QTabularCreate.C +++ b/src/frontends/qt2/QTabularCreate.C @@ -24,7 +24,7 @@ typedef Qt2CB > base_class; -QTabularCreate::QTabularCreate(ControlTabularCreate & c) +QTabularCreate::QTabularCreate(ControlTabularCreate & c, Dialogs &) : base_class(c, _("Insert table")) { } diff --git a/src/frontends/qt2/QTabularCreate.h b/src/frontends/qt2/QTabularCreate.h index 1f3cd09f0c..6591df3483 100644 --- a/src/frontends/qt2/QTabularCreate.h +++ b/src/frontends/qt2/QTabularCreate.h @@ -18,6 +18,7 @@ class ControlTabularCreate; class QTabularCreateDialog; +class Dialogs; /// class QTabularCreate @@ -27,7 +28,7 @@ public: /// friend class QTabularCreateDialog; /// - QTabularCreate(ControlTabularCreate &); + QTabularCreate(ControlTabularCreate &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/QTexinfo.C b/src/frontends/qt2/QTexinfo.C index c9c09a99a9..51491c8e5f 100644 --- a/src/frontends/qt2/QTexinfo.C +++ b/src/frontends/qt2/QTexinfo.C @@ -31,7 +31,7 @@ using std::vector; typedef Qt2CB > base_class; -QTexinfo::QTexinfo(ControlTexinfo & c) +QTexinfo::QTexinfo(ControlTexinfo & c, Dialogs &) : base_class(c, _("LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls) { diff --git a/src/frontends/qt2/QTexinfo.h b/src/frontends/qt2/QTexinfo.h index 2f460e0eb9..c8c4415951 100644 --- a/src/frontends/qt2/QTexinfo.h +++ b/src/frontends/qt2/QTexinfo.h @@ -28,7 +28,7 @@ public: /// friend class QTexinfoDialog; /// - QTexinfo(ControlTexinfo &); + QTexinfo(ControlTexinfo &, Dialogs &); private: /// Apply changes virtual void apply() { }; diff --git a/src/frontends/qt2/QThesaurus.C b/src/frontends/qt2/QThesaurus.C index c3282f055b..f76d4cd3e1 100644 --- a/src/frontends/qt2/QThesaurus.C +++ b/src/frontends/qt2/QThesaurus.C @@ -24,7 +24,7 @@ typedef Qt2CB > base_class; -QThesaurus::QThesaurus(ControlThesaurus & c) +QThesaurus::QThesaurus(ControlThesaurus & c, Dialogs &) : base_class(c, _("Thesaurus")) { } diff --git a/src/frontends/qt2/QThesaurus.h b/src/frontends/qt2/QThesaurus.h index 25d1b34b9b..8a09a1f8ae 100644 --- a/src/frontends/qt2/QThesaurus.h +++ b/src/frontends/qt2/QThesaurus.h @@ -27,7 +27,7 @@ public: /// friend class QThesaurusDialog; /// - QThesaurus(ControlThesaurus &); + QThesaurus(ControlThesaurus &, Dialogs &); private: /// Apply changes virtual void apply() { }; diff --git a/src/frontends/qt2/QToc.C b/src/frontends/qt2/QToc.C index 5792b208b0..b7cad886a5 100644 --- a/src/frontends/qt2/QToc.C +++ b/src/frontends/qt2/QToc.C @@ -35,7 +35,7 @@ using std::vector; typedef Qt2CB > base_class; -QToc::QToc(ControlToc & c) +QToc::QToc(ControlToc & c, Dialogs &) : base_class(c, _("Table of contents")) {} diff --git a/src/frontends/qt2/QToc.h b/src/frontends/qt2/QToc.h index 7f3e457de2..ead0c99d5c 100644 --- a/src/frontends/qt2/QToc.h +++ b/src/frontends/qt2/QToc.h @@ -26,7 +26,7 @@ class QToc : public Qt2CB > { public: - QToc(ControlToc &); + QToc(ControlToc &, Dialogs &); friend class QTocDialog; diff --git a/src/frontends/qt2/QURL.C b/src/frontends/qt2/QURL.C index 48956c33c8..66e7b222c8 100644 --- a/src/frontends/qt2/QURL.C +++ b/src/frontends/qt2/QURL.C @@ -22,7 +22,7 @@ typedef Qt2CB > base_class; -QURL::QURL(ControlUrl & c) +QURL::QURL(ControlUrl & c, Dialogs &) : base_class(c, _("URL")) { } diff --git a/src/frontends/qt2/QURL.h b/src/frontends/qt2/QURL.h index a5707440b7..4f703e0d4a 100644 --- a/src/frontends/qt2/QURL.h +++ b/src/frontends/qt2/QURL.h @@ -13,13 +13,14 @@ class ControlUrl; class QURLDialog; +class Dialogs; class QURL : public Qt2CB > { friend class QURLDialog; public: - QURL(ControlUrl & c); + QURL(ControlUrl & c, Dialogs &); protected: virtual bool isValid(); diff --git a/src/frontends/qt2/QVCLog.C b/src/frontends/qt2/QVCLog.C index 2e8390d15c..9c9f1e3d17 100644 --- a/src/frontends/qt2/QVCLog.C +++ b/src/frontends/qt2/QVCLog.C @@ -26,7 +26,7 @@ typedef Qt2CB > base_class; -QVCLog::QVCLog(ControlVCLog & c) +QVCLog::QVCLog(ControlVCLog & c, Dialogs &) : base_class(c, _("VCLog")) { } diff --git a/src/frontends/qt2/QVCLog.h b/src/frontends/qt2/QVCLog.h index 53c0a6da06..b410b35f59 100644 --- a/src/frontends/qt2/QVCLog.h +++ b/src/frontends/qt2/QVCLog.h @@ -27,7 +27,7 @@ public: /// friend class QVCLogDialog; /// - QVCLog(ControlVCLog &); + QVCLog(ControlVCLog &, Dialogs &); private: /// Apply changes diff --git a/src/frontends/qt2/Qt2Base.h b/src/frontends/qt2/Qt2Base.h index 71f8fb6242..06a5fbe0d8 100644 --- a/src/frontends/qt2/Qt2Base.h +++ b/src/frontends/qt2/Qt2Base.h @@ -1,16 +1,13 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 2000 The LyX Team. - * - * ====================================================== +/** + * \file Qt2Base.h + * Copyright 2000-2002 the LyX Team + * Read the file COPYING * * \author Angus Leeming */ + #ifndef QT2BASE_H #define QT2BASE_H diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index 59c67ff3ca..2e057feadd 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -13,12 +13,12 @@ #pragma implementation #endif -//#include "minibuffer.h" #include "debug.h" #include "intl.h" #include "lyx_cb.h" #include "support/filetools.h" #include "MenuBackend.h" +#include "QMiniBuffer.h" #include "ToolbarDefaults.h" #include "lyxfunc.h" #include "BufferView.h" @@ -54,10 +54,10 @@ QtView::QtView(unsigned int width, unsigned int height) connect(menuBar(), SIGNAL(activated(int)), this, SLOT(activated(int))); - toolbar_.reset(new Toolbar(this, 0, 0, toolbardefaults)); + toolbar_.reset(new Toolbar(this, *getDialogs(), 0, 0, toolbardefaults)); toolbar_->set(true); - // FIXME minibuffer_.reset(new MiniBuffer(this, 0, 0, 30, 30)); + minibuffer_.reset(new QMiniBuffer(this)); bufferview_.reset(new BufferView(this, 0, 0, width, height)); ::current_view = bufferview_.get(); @@ -71,19 +71,6 @@ QtView::QtView(unsigned int width, unsigned int height) if (!iconname.empty()) setIcon(QPixmap(iconname.c_str())); -#if 0 - minibuffer_.reset(new MiniBuffer(this, air, height - (25 + air), - width - (2 * air), 25)); - - // connect the minibuffer signals - minibuffer_->stringReady.connect(SigC::slot(getLyXFunc(), - &LyXFunc::miniDispatch)); - minibuffer_->timeout.connect(SigC::slot(getLyXFunc(), - &LyXFunc::initMiniBuffer)); - minibuffer_->dd_init(); - -#endif - // make sure the buttons are disabled if needed updateToolbar(); } diff --git a/src/frontends/qt2/TODO b/src/frontends/qt2/TODO new file mode 100644 index 0000000000..757aba7347 --- /dev/null +++ b/src/frontends/qt2/TODO @@ -0,0 +1,152 @@ +This file is intended to be a list of stuff that must be done before +we can say the first iteration of the Qt frontend is "finished". + +Those with asterisks are what I perceive as being "big jobs" + +ColorHandler + + - remove mentions in core code + +FileDialog + + - add buttons for Documents, Templates, etc. to the file dialog toolbar + - work around Qt crash bug with double click + +GraphicsImage + + - remove X dependencies here (?) (*) + +LyXServer + + - remove xforms dependency + +lyx_gui (qt) + + - move out lyxserver + - do dpi + - initialise graphics + +Menubar_pimpl + + - remove menubar-switching as discussed + - implement menu key shortcuts + - implement on/off switches in menus, enable/disable + - parse the submenus (*) + - implement dynamic menus (may need serious backend changes) (*)(*) + - dynamic last files + - import/export/view/update + - navigate + - remove openByName + +QAbout + + - give good default size + +QBibtex + + - implement H. Voss's style browser facility, style tooltip, check for duplicates + +QCitation + + - loop round searching not working perhaps ?? + +QContentPane + + - triple click + - figure out why a scroll doesn't update quickly, which leaves cursor artifacts + whilst holding down page down etc. + +QDocument + + - implement me. Need MVC (*) + +qfont_loader + + - use lyxrc, check for failure, implement available() + - fix usage outside of qt2/ (frontends/font_laoder.h) + +qfont_metrics + + - per char ascent/descent + +QForks + + - don't implement me + +QGraphics + + - UI cleanups. Maybe not vital + +QInclude + + - check no load stuff works ? + +qlkey + + - finish off the lists + +QLPainter + + - work out why buttons look ugly and fix + - check ::arc() works + - implement ::image + image loader grfx stuff etc. (*)(*) + +QLyXKeySym + + - isOK() - meaningful or not ? + - getISOEncoded - get this to work (*) + +QMiniBuffer + + - implement as a QStatusBar and a separate QToolbar containing a QComboBox (*) + - make the necessary GUII API changes for this to work (*) + +QParagraph + + - implement me (MVCed already) (*) + +QPreferences + + - implement me (*) + +QRef + + - need buffer combo + +QSendTo + + - implement me + +QShowInfo + + - dunno about this one + +QTabular + + - implement me (need MVC) (*) + +QTexinfo + + - fix "View" when path not shown + +QWorkArea + + - clipboard code missing + +QtView + + - decide what to do about prohibit/allowInput + - fix show() + - remove redraw() and others + - add minibuffer + - add autosave timeout + + +Toolbar_pimpl (variously maybe *) + + - mathed symbols + - activate/deactivate + - openLayoutList() (?) + - ::set() ??? + - push() ?? + - tooltips diff --git a/src/frontends/qt2/Toolbar_pimpl.C b/src/frontends/qt2/Toolbar_pimpl.C index 3530bfd67b..f098510355 100644 --- a/src/frontends/qt2/Toolbar_pimpl.C +++ b/src/frontends/qt2/Toolbar_pimpl.C @@ -90,7 +90,7 @@ string const getPixmap(int action) } // namespace anon -Toolbar::Pimpl::Pimpl(LyXView * o, int, int) +Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs &, int, int) : owner_(static_cast(o)), combo_(0) { @@ -158,8 +158,8 @@ void Toolbar::Pimpl::changed_layout(string const & sel) LyXTextClass::const_iterator end = tc.end(); for (LyXTextClass::const_iterator cit = tc.begin(); cit != end; ++cit) { - if (_(cit->name()) == sel) { - owner_->getLyXFunc()->dispatch(LFUN_LAYOUT, cit->name()); + if (_((*cit)->name()) == sel) { + owner_->getLyXFunc()->dispatch(LFUN_LAYOUT, (*cit)->name()); return; } } @@ -173,7 +173,7 @@ void Toolbar::Pimpl::setLayout(string const & layout) LyXTextClass const & tc = textclasslist[owner_->buffer()->params.textclass]; - string const & name = _(tc[layout].name()); + string const & name = _(tc[layout]->name()); int i; @@ -209,8 +209,8 @@ void Toolbar::Pimpl::updateLayoutList(bool force) LyXTextClass::const_iterator end = tc.end(); for (; cit != end; ++cit) { // ignore obsolete entries - if (cit->obsoleted_by().empty()) - combo_->insertItem(_(cit->name()).c_str()); + if ((*cit)->obsoleted_by().empty()) + combo_->insertItem(_((*cit)->name()).c_str()); } // needed to recalculate size hint diff --git a/src/frontends/qt2/Toolbar_pimpl.h b/src/frontends/qt2/Toolbar_pimpl.h index 1e760da3b8..f2f6c00f68 100644 --- a/src/frontends/qt2/Toolbar_pimpl.h +++ b/src/frontends/qt2/Toolbar_pimpl.h @@ -37,7 +37,7 @@ struct Toolbar::Pimpl { public: /// - Pimpl(LyXView * o, int x, int y); + Pimpl(LyXView * o, Dialogs &, int x, int y); /// ~Pimpl(); diff --git a/src/frontends/qt2/lyx_gui.C b/src/frontends/qt2/lyx_gui.C index aa616e34be..e5700a12de 100644 --- a/src/frontends/qt2/lyx_gui.C +++ b/src/frontends/qt2/lyx_gui.C @@ -111,3 +111,10 @@ void lyx_gui::init_graphics() { // FIXME } + + +string const lyx_gui::hexname(LColor::color col) +{ + // FIXME + return ""; +} -- 2.39.2