From 01e7bad47c3d985583bed624ff9b859d5e44f581 Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 15 Nov 2002 03:56:52 +0000 Subject: [PATCH] qtabular skeleton git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5638 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 13 ++++++++ src/frontends/qt2/Dialogs.C | 1 + src/frontends/qt2/Dialogs2.C | 12 ++++--- src/frontends/qt2/Dialogs_impl.h | 8 ++++- src/frontends/qt2/Makefile.am | 2 ++ src/frontends/qt2/Makefile.dialogs | 7 +++++ src/frontends/qt2/QTabular.C | 50 ++++++++++++++++++++++++++++++ src/frontends/qt2/QTabular.h | 46 +++++++++++++++++++++++++++ src/frontends/qt2/QTabularDialog.C | 44 ++++++++++++++++++++++++++ src/frontends/qt2/QTabularDialog.h | 38 +++++++++++++++++++++++ src/frontends/qt2/moc/Makefile.am | 1 + 11 files changed, 217 insertions(+), 5 deletions(-) create mode 100644 src/frontends/qt2/QTabular.C create mode 100644 src/frontends/qt2/QTabular.h create mode 100644 src/frontends/qt2/QTabularDialog.C create mode 100644 src/frontends/qt2/QTabularDialog.h diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 126c0b378a..ad5ec93fca 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,16 @@ +2002-11-15 John Levon + + * Makefile.dialogs: + * Makefile.am: + * moc/Makefile.am: + * Dialogs2.C: + * Dialogs_impl.h: + * Dialogs.C: + * QTabular.h: + * QTabular.C: + * QTabularDialog.h: + * QTabularDialog.C: add skeleton + 2002-11-14 John Levon * ui/QTabularDialog.ui: label for cell pos diff --git a/src/frontends/qt2/Dialogs.C b/src/frontends/qt2/Dialogs.C index 153b3c53d7..d37054af23 100644 --- a/src/frontends/qt2/Dialogs.C +++ b/src/frontends/qt2/Dialogs.C @@ -69,6 +69,7 @@ Dialogs::Impl::Impl(LyXView & lv, Dialogs & d) sendto(lv, d), spellchecker(lv, d), tabularcreate(lv, d), + tabular(lv, d), texinfo(lv, d), #ifdef HAVE_LIBAIKSAURUS diff --git a/src/frontends/qt2/Dialogs2.C b/src/frontends/qt2/Dialogs2.C index 4cb5f187da..2b1b1ce0ca 100644 --- a/src/frontends/qt2/Dialogs2.C +++ b/src/frontends/qt2/Dialogs2.C @@ -218,12 +218,16 @@ void Dialogs::showSpellchecker() } -void Dialogs::showTabular(InsetTabular *) -{} +void Dialogs::showTabular(InsetTabular * it) +{ + pimpl_->tabular.controller().showInset(it); +} -void Dialogs::updateTabular(InsetTabular *) -{} +void Dialogs::updateTabular(InsetTabular * it) +{ + pimpl_->tabular.controller().updateInset(it); +} void Dialogs::showTabularCreate() diff --git a/src/frontends/qt2/Dialogs_impl.h b/src/frontends/qt2/Dialogs_impl.h index d8db144dc0..278ebcce73 100644 --- a/src/frontends/qt2/Dialogs_impl.h +++ b/src/frontends/qt2/Dialogs_impl.h @@ -45,6 +45,7 @@ #include "ControlShowFile.h" #include "ControlSpellchecker.h" #include "ControlTabularCreate.h" +#include "ControlTabular.h" #include "ControlTexinfo.h" #include "ControlToc.h" #include "ControlUrl.h" @@ -104,9 +105,10 @@ #include "QShowFileDialog.h" #include "QSpellchecker.h" #include "QSpellcheckerDialog.h" -//#include "QTabular.h" #include "QTabularCreate.h" #include "QTabularCreateDialog.h" +#include "QTabular.h" +#include "QTabularDialog.h" #include "QTexinfo.h" #include "QTexinfoDialog.h" @@ -204,6 +206,9 @@ SpellcheckerDialog; typedef GUI TabularCreateDialog; +typedef GUI +TabularDialog; + typedef GUI TexinfoDialog; @@ -253,6 +258,7 @@ struct Dialogs::Impl { SendtoDialog sendto; SpellcheckerDialog spellchecker; TabularCreateDialog tabularcreate; + TabularDialog tabular; TexinfoDialog texinfo; #ifdef HAVE_LIBAIKSAURUS diff --git a/src/frontends/qt2/Makefile.am b/src/frontends/qt2/Makefile.am index 0984df9384..9dc20a674a 100644 --- a/src/frontends/qt2/Makefile.am +++ b/src/frontends/qt2/Makefile.am @@ -77,6 +77,8 @@ libqt2_la_SOURCES = \ qlkey.h \ qscreen.h \ qscreen.C \ + qsetborder.h \ + qsetborder.C \ qttableview.h \ qttableview.C \ $(DIALOGSOURCES) diff --git a/src/frontends/qt2/Makefile.dialogs b/src/frontends/qt2/Makefile.dialogs index 6a8e170e1b..0bbc66e5e8 100644 --- a/src/frontends/qt2/Makefile.dialogs +++ b/src/frontends/qt2/Makefile.dialogs @@ -28,6 +28,7 @@ DIALOGS = \ QShowFile \ QSpellchecker \ QTabularCreate \ + QTabular \ QTexinfo \ QThesaurus \ QToc \ @@ -90,6 +91,8 @@ DIALOGSOURCES = \ QSpellchecker.C QSpellcheckerDialog.C \ QTabularCreate.h QTabularCreateDialog.h \ QTabularCreate.C QTabularCreateDialog.C \ + QTabular.h QTabularDialog.h \ + QTabular.C QTabularDialog.C \ QTexinfo.h QTexinfoDialog.h \ QTexinfo.C QTexinfoDialog.C \ QThesaurus.h QThesaurusDialog.h \ @@ -132,6 +135,7 @@ MOCDIALOGS = \ QShowFileDialog_moc.C \ QSpellcheckerDialog_moc.C \ QTabularCreateDialog_moc.C \ + QTabularDialog_moc.C \ QTexinfoDialog_moc.C \ QThesaurusDialog_moc.C \ QTocDialog_moc.C \ @@ -198,6 +202,8 @@ UIDIALOGS = \ QSpellcheckerDialogBase.C \ QTabularCreateDialogBase.h \ QTabularCreateDialogBase.C \ + QTabularDialogBase.h \ + QTabularDialogBase.C \ QTexinfoDialogBase.h \ QTexinfoDialogBase.C \ QThesaurusDialogBase.h \ @@ -264,6 +270,7 @@ UIDIALOGS = \ QShowFileDialogBase_moc.C \ QSpellcheckerDialogBase_moc.C \ QTabularCreateDialogBase_moc.C \ + QTabularDialogBase_moc.C \ QTexinfoDialogBase_moc.C \ QThesaurusDialogBase_moc.C \ QTocDialogBase_moc.C \ diff --git a/src/frontends/qt2/QTabular.C b/src/frontends/qt2/QTabular.C new file mode 100644 index 0000000000..16426b8443 --- /dev/null +++ b/src/frontends/qt2/QTabular.C @@ -0,0 +1,50 @@ +/** + * \file QTabular.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 + +#ifdef __GNUG__ +#pragma implementation +#endif + +#include "ControlTabular.h" +#include "gettext.h" + +#include "QTabularDialog.h" +#include "QTabular.h" +#include "Qt2BC.h" + +#include + +typedef Qt2CB > base_class; + +QTabular::QTabular() + : base_class(_("LyX: Edit Table")) +{ +} + + +void QTabular::build_dialog() +{ + dialog_.reset(new QTabularDialog(this)); + + bc().setCancel(dialog_->closePB); +} + + +void QTabular::update_contents() +{ +} + + +bool QTabular::isValid() +{ + return true; +} diff --git a/src/frontends/qt2/QTabular.h b/src/frontends/qt2/QTabular.h new file mode 100644 index 0000000000..572d6ccce0 --- /dev/null +++ b/src/frontends/qt2/QTabular.h @@ -0,0 +1,46 @@ +// -*- C++ -*- +/** + * \file QTabular.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author John Levon + * \author Kalle Dalheimer + * + * Full author contact details are available in file CREDITS + */ + +#ifndef QTABULAR_H +#define QTABULAR_H + +#ifdef __GNUG__ +#pragma interface +#endif + +#include "Qt2Base.h" + +class ControlTabular; +class QTabularDialog; + + +class QTabular : + public Qt2CB > +{ +public: + friend class QTabularDialog; + + QTabular(); + +protected: + virtual bool isValid(); + +private: + /// We can't use this ... + virtual void apply() {} + /// update + virtual void update_contents(); + /// build the dialog + virtual void build_dialog(); +}; + +#endif // QTABULAR_H diff --git a/src/frontends/qt2/QTabularDialog.C b/src/frontends/qt2/QTabularDialog.C new file mode 100644 index 0000000000..401a21dfba --- /dev/null +++ b/src/frontends/qt2/QTabularDialog.C @@ -0,0 +1,44 @@ +/** + * \file QTabularDialog.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 + +#ifdef __GNUG__ +#pragma implementation +#endif + +#include "gettext.h" + +#include "QTabular.h" +#include "QTabularDialog.h" + +#include + + +QTabularDialog::QTabularDialog(QTabular * form) + : QTabularDialogBase(0, 0, false, 0), + form_(form) +{ + connect(closePB, SIGNAL(clicked()), + form, SLOT(slotClose())); +} + + +void QTabularDialog::change_adaptor() +{ + form_->changed(); +} + + +void QTabularDialog::closeEvent(QCloseEvent * e) +{ + form_->slotWMHide(); + e->accept(); +} diff --git a/src/frontends/qt2/QTabularDialog.h b/src/frontends/qt2/QTabularDialog.h new file mode 100644 index 0000000000..5073da4f28 --- /dev/null +++ b/src/frontends/qt2/QTabularDialog.h @@ -0,0 +1,38 @@ +// -*- C++ -*- +/** + * \file QTabularDialog.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 QTABULARDIALOG_H +#define QTABULARDIALOG_H + +#ifdef __GNUG__ +#pragma interface +#endif + +#include "ui/QTabularDialogBase.h" + +class QTabular; + +class QTabularDialog : public QTabularDialogBase { + Q_OBJECT +public: + QTabularDialog(QTabular * form); + +protected slots: + virtual void change_adaptor(); + +protected: + virtual void closeEvent(QCloseEvent * e); + +private: + QTabular * form_; +}; + +#endif // QTABULARDIALOG_H diff --git a/src/frontends/qt2/moc/Makefile.am b/src/frontends/qt2/moc/Makefile.am index a84975a4ce..324beee68b 100644 --- a/src/frontends/qt2/moc/Makefile.am +++ b/src/frontends/qt2/moc/Makefile.am @@ -20,6 +20,7 @@ nodist_libqt2moc_la_SOURCES = \ emptytable_moc.C \ iconpalette_moc.C \ lengthcombo_moc.C \ + qsetborder_moc.C \ qttableview_moc.C \ qgridview_moc.C \ QBrowseBox_moc.C \ -- 2.39.2