]> git.lyx.org Git - features.git/commitdiff
qtabular skeleton
authorJohn Levon <levon@movementarian.org>
Fri, 15 Nov 2002 03:56:52 +0000 (03:56 +0000)
committerJohn Levon <levon@movementarian.org>
Fri, 15 Nov 2002 03:56:52 +0000 (03:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5638 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/Dialogs2.C
src/frontends/qt2/Dialogs_impl.h
src/frontends/qt2/Makefile.am
src/frontends/qt2/Makefile.dialogs
src/frontends/qt2/QTabular.C [new file with mode: 0644]
src/frontends/qt2/QTabular.h [new file with mode: 0644]
src/frontends/qt2/QTabularDialog.C [new file with mode: 0644]
src/frontends/qt2/QTabularDialog.h [new file with mode: 0644]
src/frontends/qt2/moc/Makefile.am

index 126c0b378a832c1edba124c42f72fdc2f02f6510..ad5ec93fca769e6a9a397f5f02b2accd256acee5 100644 (file)
@@ -1,3 +1,16 @@
+2002-11-15  John Levon  <levon@movementarian.org>
+
+       * 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  <levon@movementarian.org>
 
        * ui/QTabularDialog.ui: label for cell pos
index 153b3c53d75a38664995f22261d725a323a6e97e..d37054af231cd603f89d225446a70e2bc1e8b505 100644 (file)
@@ -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
index 4cb5f187dab4098ae1da8e27ead0f963e6325c4b..2b1b1ce0cae453c2ed9b40eb9f830838f37b39b1 100644 (file)
@@ -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()
index d8db144dc0eae3b82478de392eef141d1f451a30..278ebcce73e40540308a2563228baa67e3dfa7f7 100644 (file)
@@ -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"
 #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<ControlTabularCreate, QTabularCreate, OkApplyCancelReadOnlyPolicy, Qt2BC>
 TabularCreateDialog;
 
+typedef GUI<ControlTabular, QTabular, OkApplyCancelReadOnlyPolicy, Qt2BC>
+TabularDialog;
 typedef GUI<ControlTexinfo, QTexinfo, OkCancelPolicy, Qt2BC>
 TexinfoDialog;
 
@@ -253,6 +258,7 @@ struct Dialogs::Impl {
        SendtoDialog        sendto;
        SpellcheckerDialog  spellchecker;
        TabularCreateDialog tabularcreate;
+       TabularDialog       tabular;
        TexinfoDialog       texinfo;
 
 #ifdef HAVE_LIBAIKSAURUS
index 0984df938433fcc976923f7648c1b677c8cff93c..9dc20a674ab1b2966aab07b7210328704acfe3a8 100644 (file)
@@ -77,6 +77,8 @@ libqt2_la_SOURCES = \
        qlkey.h \
        qscreen.h \
        qscreen.C \
+       qsetborder.h \
+       qsetborder.C \
        qttableview.h \
        qttableview.C \
        $(DIALOGSOURCES)
index 6a8e170e1b404d8d53fc8ec047bd16ddd0bb6ee4..0bbc66e5e8366e37632f801c158528bc2998b403 100644 (file)
@@ -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 (file)
index 0000000..16426b8
--- /dev/null
@@ -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 <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "ControlTabular.h"
+#include "gettext.h"
+
+#include "QTabularDialog.h"
+#include "QTabular.h"
+#include "Qt2BC.h"
+
+#include <qpushbutton.h>
+typedef Qt2CB<ControlTabular, Qt2DB<QTabularDialog> > 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 (file)
index 0000000..572d6cc
--- /dev/null
@@ -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<ControlTabular, Qt2DB<QTabularDialog> >
+{
+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 (file)
index 0000000..401a21d
--- /dev/null
@@ -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 <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "gettext.h"
+
+#include "QTabular.h"
+#include "QTabularDialog.h"
+
+#include <qpushbutton.h>
+
+
+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 (file)
index 0000000..5073da4
--- /dev/null
@@ -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
index a84975a4cea455ebf49526154f3d1f1c36f7cd0b..324beee68b95b833ebc27adc3984324b90c00ed2 100644 (file)
@@ -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 \