]> git.lyx.org Git - lyx.git/commitdiff
some more random changes, added Timeout (make clean if LyX crashes !!)
authorJohn Levon <levon@movementarian.org>
Sat, 25 Aug 2001 03:00:19 +0000 (03:00 +0000)
committerJohn Levon <levon@movementarian.org>
Sat, 25 Aug 2001 03:00:19 +0000 (03:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2584 a592a061-630c-0410-9148-cb99ea01b6c8

22 files changed:
src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/Makefile.am
src/frontends/qt2/QAbout.C
src/frontends/qt2/QCitation.C
src/frontends/qt2/QCitation.h
src/frontends/qt2/QCitationDialog.C
src/frontends/qt2/QCitationDialog.h
src/frontends/qt2/QIndex.C
src/frontends/qt2/QIndex.h
src/frontends/qt2/QIndexDialog.C
src/frontends/qt2/QIndexDialog.h
src/frontends/qt2/QRef.C
src/frontends/qt2/Qt2BC.C
src/frontends/qt2/Qt2Base.C
src/frontends/qt2/Qt2Base.h
src/frontends/qt2/README
src/frontends/qt2/Timeout_pimpl.C [new file with mode: 0644]
src/frontends/qt2/Timeout_pimpl.h [new file with mode: 0644]
src/frontends/qt2/moc/Makefile.am
src/frontends/qt2/ui/QCitationDialog.ui
src/frontends/qt2/ui/QIndexDialog.ui

index 6b8f750e4c48d9b0a8b3e0e38bfe29e2888f303f..75715f35cb27202f804f6e64751365ec234ba954 100644 (file)
@@ -1,3 +1,28 @@
+2001-08-24  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Dialogs.C: include the right files
+
+       * QCitation.C: closePB not cancelPB
+       * QCitationDialog.C:
+       * QCitationDialog.h:
+       * ui/QCitationDialog.ui: small fixes
+
+       * QIndex.h:
+       * QIndex.C:
+       * QIndexDialog.C:
+       * QIndexDialog.h: 
+       * ui/QIndexDialog.ui: more fixes
+        
+       * Qt2Base.h:
+       * Qt2Base.C: add reset() to workaround problem. 
+
+       * README: update
+
+       * Makefile.am: 
+       * Timeout_pimpl.h:
+       * Timeout_pimpl.C: add the timer
+
 2001-08-23  John Levon  <moz@compsoc.man.ac.uk>
 
        * Dialogs.C:
index 9043dfd44e22f9a3297687a8a27b31798ac18a0b..5f9bc03b93d4a80d334b307dadfaaa338b8fc2bf 100644 (file)
@@ -12,8 +12,9 @@
 #endif
 
 // the dialog definitions
-#include "QCitationDialog.h"
 #include "QAboutDialog.h"
+#include "QCitationDialog.h"
+#include "QIndexDialog.h"
  
 // the controller interface
 #include "QAbout.h"
index 3bf86c4bc55bd5f2b081b8124bf92ef627ccf01d..d5eea29361958d656824f9c2797f6cefb3c9cc41 100644 (file)
@@ -46,7 +46,6 @@ libqt2_la_OBJADD = \
        ../xforms/MathsSymbols.lo \
        ../xforms/Menubar_pimpl.lo \
        ../xforms/RadioButtonGroup.lo \
-       ../xforms/Timeout_pimpl.lo \
        ../xforms/Toolbar_pimpl.lo \
        ../xforms/bmtable.lo \
        ../xforms/form_bibitem.lo \
@@ -80,6 +79,8 @@ libqt2_la_SOURCES = \
        GUIRunTime.C \
        FileDialog.C \
        FileDialog_private.C \
+       Timeout_pimpl.h \
+       Timeout_pimpl.C \
        Qt2Base.C       \
        Qt2Base.h       \
        Qt2BC.C \
index f78f63f809c1e92aef7d760c96b1019a27176480..f5c2432b1de9d56faf1f12ac9658f656b02f824f 100644 (file)
@@ -36,7 +36,7 @@ void QAbout::build()
 {
        dialog_.reset(new QAboutDialog());
        connect(dialog_.get()->closePB, SIGNAL(clicked()),
-               this, SLOT(slotCancel()));
+               this, SLOT(slotClose()));
 
        dialog_->copyrightLA->setText(controller().getCopyright().c_str());
        dialog_->licenseLA->setText(controller().getLicense().c_str());
index 6be562f62150ae4e950c153272e1cb6f0c46a73a..ee29292827d80b5a14585731b2b5a112d00da993 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "QCitationDialog.h"
 #include "QCitation.h"
-
 #include <qcheckbox.h>
 #include <qcombobox.h>
 #include <qlineedit.h>
@@ -26,6 +26,7 @@
 #include "QtLyXView.h" 
 #include "Qt2BC.h"
 #include "ControlCitation.h"
+#include "debug.h"
 #include "gettext.h"
 #include "support/lstrings.h"
 #include "helper_funcs.h"
@@ -74,7 +75,7 @@ void QCitation::build()
        // Manage the ok, apply, restore and cancel/close buttons
        bc().setOK(dialog_->okPB);
        bc().setApply(dialog_->applyPB);
-       bc().setCancel(dialog_->cancelPB);
+       bc().setCancel(dialog_->closePB);
        bc().setRestore(dialog_->restorePB);
 
        bc().addReadOnly(dialog_->addPB);
@@ -82,7 +83,8 @@ void QCitation::build()
        bc().addReadOnly(dialog_->upPB);
        bc().addReadOnly(dialog_->downPB);
        bc().addReadOnly(dialog_->citationStyleCO);
-       bc().addReadOnly(dialog_->textBeforeED);
+       // add when enabled ! 
+       //bc().addReadOnly(dialog_->textBeforeED);
        bc().addReadOnly(dialog_->textAfterED);
 }
 
@@ -102,7 +104,9 @@ void QCitation::update()
        setBibButtons(OFF);
        setCiteButtons(OFF);
 
-       dialog_->textAfterED->setText( controller().params().getOptions().c_str());
+       dialog_->textAfterED->setText(controller().params().getOptions().c_str());
+
+       reset();
 }
 
 
index a350cc41d651a3720d338791c4eda99ca0aba116..d3126d7590347f3da16c76c2b864a323351bd506 100644 (file)
@@ -22,7 +22,8 @@ class QListBox;
 class ControlCitation;
 class QCitationDialog;
 
-class QCitation : public Qt2CB<ControlCitation, Qt2DB<QCitationDialog> > {
+class QCitation : public Qt2CB<ControlCitation, Qt2DB<QCitationDialog> > 
+{
        friend class QCitationDialog;
     
 public:
@@ -47,7 +48,7 @@ private:
        /// Update dialog before/whilst showing it.
        virtual void update();
 
-       void updateBrowser(QListBox*, std::vector<string> const &) const;
+       void updateBrowser(QListBox *, std::vector<string> const &) const;
        ///
        void setBibButtons(State) const;
        ///
index aeaaae23c4ec8685676896df8c98da9689750bc6..3977b247c8d7b80160e7a7e1ec41770c04277cca 100644 (file)
@@ -7,18 +7,20 @@
  */
 
 #include <config.h>
+
+#include "gettext.h"
+
 #include "QCitationDialog.h"
 #include "Dialogs.h"
-#include "QCitation.h"
 #include "controllers/ControlCitation.h"
 
 #include <qcheckbox.h>
+#include <qcombobox.h>
 #include <qlineedit.h>
 #include <qlistbox.h>
 #include <qmultilineedit.h>
 #include <qpushbutton.h>
+
 #include "QtLyXView.h"
 
 #include <algorithm>
@@ -28,29 +30,46 @@ using std::vector;
 using std::find;
 using std::max;
 
-QCitationDialog::QCitationDialog(QCitation * form, QWidget * parent,  const char * name, bool modal, WFlags fl)
-       : QCitationDialogBase(parent, name, modal, fl),
+QCitationDialog::QCitationDialog(QCitation * form)
+       : QCitationDialogBase(0, 0, false, 0),
        form_(form)
 {
-       connect(okPB, SIGNAL(clicked()),
-               form, SLOT(slotOK()));
-       connect(cancelPB, SIGNAL(clicked()),
-               form, SLOT(slotCancel()));
        connect(restorePB, SIGNAL(clicked()),
                form, SLOT(slotRestore()));
+       connect(okPB, SIGNAL(clicked()),
+               form, SLOT(slotOK()));
        connect(applyPB, SIGNAL(clicked()),
                form, SLOT(slotApply()));
+       connect(closePB, SIGNAL(clicked()),
+               form, SLOT(slotClose()));
        connect(searchED, SIGNAL(returnPressed()),
-               form, SLOT(slotNextClicked()));
+               this, SLOT(slotNextClicked()));
+
+       textBeforeED->setText(_("Not yet supported"));
+       textBeforeED->setReadOnly(true);
+       textBeforeED->setFocusPolicy(QWidget::NoFocus);
+       citationStyleCO->setEnabled(false);
+       citationStyleCO->setFocusPolicy(QWidget::NoFocus);
 }
 
+
 QCitationDialog::~QCitationDialog()
 {
 }
 
 
-void QCitationDialog::slotBibSelected( int sel )
+void QCitationDialog::slotBibSelected(int sel)
+{
+       slotBibHighlighted(sel);
+       if (form_->controller().isReadonly()) 
+               return;
+       slotAddClicked();
+}
+
+void QCitationDialog::slotBibHighlighted(int sel)
 {
        biblio::InfoMap const & theMap = form_->controller().bibkeysInfo();
 
@@ -91,7 +110,7 @@ void QCitationDialog::slotBibSelected( int sel )
 }
 
 
-void QCitationDialog::slotCiteSelected(int sel)
+void QCitationDialog::slotCiteHighlighted(int sel)
 {
        biblio::InfoMap const & theMap = form_->controller().bibkeysInfo();
 
@@ -107,7 +126,7 @@ void QCitationDialog::slotCiteSelected(int sel)
 
        // Highlight the selected browser_cite key in browser_bib
        vector<string>::const_iterator cit =
-               std::find(form_->bibkeys.begin(), 
+               std::find(form_->bibkeys.begin(),
                form_->bibkeys.end(), form_->citekeys[sel]);
 
        if (cit != form_->bibkeys.end()) {
@@ -149,7 +168,7 @@ void QCitationDialog::slotDelClicked()
 {
        int const sel = citeLB->currentItem();
 
-       // FIXME: why ? 
+       // FIXME: why ?
        if (sel < 0 || sel >= (int)form_->citekeys.size()) {
                return;
        }
@@ -192,7 +211,7 @@ void QCitationDialog::slotDownClicked()
 {
        int const sel = citeLB->currentItem();
 
-       // FIXME: ? 
+       // FIXME: ?
        if (sel < 0 || sel >= (int)form_->citekeys.size() - 1) {
                return;
        }
@@ -263,23 +282,5 @@ void QCitationDialog::doFind(biblio::Direction const dir)
        int const top = max(found - 5, 1);
        bibLB->setTopItem(top);
        bibLB->setSelected(found, true);
-       slotBibSelected(0);
-}
-
-
-void QCitationDialog::slotCitationStyleSelected( int )
-{
-       form_->changed();
-}
-
-
-void QCitationDialog::slotTextBeforeReturn()
-{
-       form_->changed();
-}
-
-
-void QCitationDialog::slotTextAfterReturn()
-{
-       form_->changed();
+       slotBibHighlighted(0);
 }
index 9201aa8af770bb3d91ea1107333d45a4be9bde5c..cafb378e68c227d74614480ea9568df991151939 100644 (file)
@@ -9,34 +9,35 @@
 #ifndef QCITATIONDIALOG_H
 #define QCITATIONDIALOG_H
 
-class QCitation;
-
 #include <config.h>
 #include "support/lstrings.h"
  
 #include "ui/QCitationDialogBase.h"
+#include "QCitation.h"
 #include "controllers/biblio.h"
 
 class QCitationDialog : public QCitationDialogBase
 { Q_OBJECT
 
 public:
-       QCitationDialog(QCitation * form, QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0);
+       QCitationDialog(QCitation * form);
        ~QCitationDialog();
 
 protected slots:
+       virtual void slotBibHighlighted(int sel);
        virtual void slotBibSelected(int sel);
-       virtual void slotCiteSelected(int sel);
+       virtual void slotCiteHighlighted(int sel);
        virtual void slotAddClicked();
        virtual void slotDelClicked();
        virtual void slotUpClicked();
        virtual void slotDownClicked();
        virtual void slotPreviousClicked();
        virtual void slotNextClicked();
-       virtual void slotCitationStyleSelected(int);
-       virtual void slotTextBeforeReturn();
-       virtual void slotTextAfterReturn();
 
+       virtual void changed_adaptor() {
+               form_->changed();
+       }
 private:
        void doFind(biblio::Direction dir);
     
index fc27d181a0d85e9590685427d2974fbb7e0303ae..efe20ed2f5bad7c7ac7d301531b00007901cd5ba 100644 (file)
@@ -9,6 +9,7 @@
 #include <config.h>
 
 #include "QIndexDialog.h"
+#include "ControlIndex.h"
 #include "QtLyXView.h" 
 #include "BufferView.h"
 
@@ -30,17 +31,12 @@ QIndex::QIndex(ControlIndex & c)
 }
 
 
-QIndex::~QIndex()
-{
-}
-
-
 void QIndex::build()
 {
        dialog_.reset(new QIndexDialog(this));
 
        bc().setOK(dialog_->okPB);
-       bc().setCancel(dialog_->cancelPB);
+       bc().setCancel(dialog_->closePB);
        bc().addReadOnly(dialog_->keywordED);
 }
 
@@ -48,6 +44,7 @@ void QIndex::build()
 void QIndex::update()
 {
        dialog_->keywordED->setText(controller().params().getContents().c_str());
+       reset();
 }
 
  
index a65bebb1ac43aec9b855e3127bc2e77d01077023..089bcdfa3c4d58e042fde42839bb17d5b8bcb034 100644 (file)
 #define QINDEX_H
 
 #include "Qt2Base.h"
-#include "ControlIndex.h"
-#include "LString.h"
-#include "boost/utility.hpp"
 
-class Dialogs;
-class LyXView;
+class ControlIndex;
 class QIndexDialog;
 
 class QIndex :
-       public Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > {
-
+       public Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > 
+{
        friend class QIndexDialog;
  
 public: 
        QIndex(ControlIndex &);
-       ~QIndex();
+
 private: 
        /// Apply changes
        virtual void apply();
@@ -35,11 +31,6 @@ private:
        virtual void update();
        /// build the dialog
        virtual void build();
-
-       /// create an Index inset
-       void createIndex(string const &);
-       /// edit an Index  inset
-       void showIndex(InsetCommand * const);
 };
 
 #endif // QINDEX_H
index 636cec703dd643b23ddd343631887dd7b079afd1..bcfd25b6d45c51a5c8a78cebb22c3d766953d2a9 100644 (file)
 #include "Dialogs.h"
 #include "QIndex.h"
 
+#include <qwidget.h>
+#include <qpushbutton.h>
+
 QIndexDialog::QIndexDialog(QIndex * form)
        : QIndexDialogBase(0, 0, false, 0),
        form_(form)
 {
+       connect(okPB, SIGNAL(clicked()),
+               form, SLOT(slotOK()));
+       connect(closePB, SIGNAL(clicked()),
+               form, SLOT(slotClose()));
 }
 
  
@@ -22,20 +29,6 @@ QIndexDialog::~QIndexDialog()
 }
 
 
-void QIndexDialog::ok_adaptor()
-{
-       form_->slotOK();
-       hide();
-}
-
-
-void QIndexDialog::close_adaptor()
-{
-       form_->slotCancel();
-       hide();
-}
-
-
 void QIndexDialog::change_adaptor()
 {
        form_->changed();
index c81c97ec97a9b2ec4fca131c0eca55e7f7b6fb36..64af848927823b4ff781d33f57a134baadaacd14 100644 (file)
@@ -22,11 +22,9 @@ public:
        QIndexDialog(QIndex * form);
        ~QIndexDialog();
 
-public slots:
-       virtual void ok_adaptor();
-       virtual void close_adaptor();
+protected slots:
        virtual void change_adaptor();
-
 protected:
        virtual void closeEvent(QCloseEvent * e);
 
index fc6e5ae3318a96b1f32fd61da1447dcc8c407078..2d04c8fc86acd44a3a31e39ddae80dcf7c3a18eb 100644 (file)
@@ -167,6 +167,8 @@ void QRef::do_ref_update()
 
 void QRef::update()
 {
+       // FIXME: needs updating
        dialog_->referenceED->setText(params.getContents().c_str());
        dialog_->nameED->setText(params.getOptions().c_str());
 
index 74b6ec80c82ea08b9143a4aa71a6c71ee6fbcd4a..51a7beb92992c0fefc154acad6a0044ac0f4203a 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include "Qt2BC.h"
+#include "debug.h"
 
 #include <qbutton.h>
 
index 8d45b53462ad3186a4b6bff143e19be94f098053..965623d49e200c4d01bb92dce2475c6bb7a8a141 100644 (file)
 #endif
 
 #include <qdialog.h>
+#include <qapplication.h> 
 
+#include "debug.h" 
 #include "QtLyXView.h" 
 #include "Dialogs.h"
 #include "Qt2Base.h"
 #include "Qt2BC.h"
 #include "support/LAssert.h"
 
-#include <stdio.h>
-
-
 Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
        : ViewBC<Qt2BC>(c), title_(t)
 {}
@@ -51,6 +50,12 @@ void Qt2Base::show()
 }
 
 
+void Qt2Base::reset()
+{
+       qApp->processEvents();
+}
+
 void Qt2Base::hide()
 {
        if (form() && form()->isVisible())
@@ -79,7 +84,6 @@ void Qt2Base::slotWMHide()
 }
 
 
-
 void Qt2Base::slotApply()
 {
        ApplyButton();
@@ -92,7 +96,7 @@ void Qt2Base::slotOK()
 }
 
 
-void Qt2Base::slotCancel()
+void Qt2Base::slotClose()
 {
        CancelButton();
 }
@@ -102,10 +106,3 @@ void Qt2Base::slotRestore()
 {
        RestoreButton();
 }
-
-
-// PENDING(kalle) How to handle this?
-// extern "C" void C_Qt2BaseInputCB(FL_OBJECT * ob, long d)
-// {
-//     GetForm(ob)->InputCB(ob, d);
-// }
index 8ee56422db6bd9647ed93b2303567fba6ddf0bf1..360dc6e1e5b096ddbfe09e1f758e41d24eee93fe 100644 (file)
@@ -49,31 +49,33 @@ protected:
        /// Build the dialog
        virtual void build() = 0;
        /// Hide the dialog.
-       void hide();
+       virtual void hide();
        /// Create the dialog if necessary, update it and display it.
-       void show();
+       virtual void show();
+       /// reset after an update
+       virtual void reset();
 
        /// the dialog has changed contents
        virtual void changed(); 
 
        /// is the dialog currently valid ? 
        virtual bool isValid();
+
 protected slots:
        // dialog closed from WM
        void slotWMHide();
 
-       // Apply button clicked
-       void slotApply();
-
+       // Restore button clicked
+       void slotRestore();
        // OK button clicked
        void slotOK();
 
-       // Cancel button clicked
-       void slotCancel();
+       // Apply button clicked
+       void slotApply();
 
-       // Restore button clicked
-       void slotRestore();
+       // Close button clicked
+       void slotClose();
 
 private:
        /// Pointer to the actual instantiation of xform's form
@@ -89,12 +91,13 @@ template <class Dialog>
 class Qt2DB: public Qt2Base
 {
 protected:
-       ///
        Qt2DB(ControlButtons &, const QString&);
        /// Pointer to the actual instantiation of the Qt dialog
        virtual QDialog* form() const;
        /// Real GUI implementation.
        boost::scoped_ptr<Dialog> dialog_;
+
 };
 
 
index 5ae2da9d77c34b9b8d788b018c0564ecbe4266a2..3ac34941172835d218b68a9346bbee7f744670b6 100644 (file)
@@ -1,5 +1,26 @@
 This file contains some do's and dont's for the Qt2 frontend.
 
+General rules
+-------------
+
+Every editable field that affects the state of the dialog contents
+from LyX's point of view should connect its xxxChanged() signal to
+a the dialog's changed_adaptor() slot, which in turn should call
+form_->changed(). If you are using a more complicated thing anyway,
+then remember to call form_->changed() at the end (if it has changed !)
+Every non-trivial widget should have a tooltip. If you don't know
+what to write, write "FIXME", and it can fixed later.
+If necessary, you should override Qt2Base::isValid() for determining the validity
+of the current dialog's contents.
+OK/Apply/Restore/Close should be connected in the derived class's constructor
+to call form_->slotOK() etc. Refer to close/cancel as close in the source.
+Every overridden update() must call reset() to ensure the beginning state of the dialog
+is correct !
 Don't #undef emit - #include "QtLyXView.h" instead
  
 Naming conventions
@@ -17,7 +38,7 @@ Widgets should be named like "fooXX", where XX is one of the following
 widget types :
 
 CB - check box 
-CO -
+CO - combo box
 ED - line edit
 LA - label
 ML -
@@ -28,15 +49,15 @@ PB - push button
 Dialog         Maintainer      MVC conversion
 ----------------------------------------------
 Character      Edwin
-Citation       Kalle           Done ?
-Document       Kalle           In progress (Not yet prepared)
+Citation       Kalle           Done
+Document       Kalle           Waiting for MVC
 Index          Kalle           Done
-Paragraph      Edwin           Not yet prepared
+Paragraph      Edwin           Waiting for MVC
 Print          Edwin
 Ref            Kalle
 Search         Edwin
 Splash         Edwin
-Tabular                                Not yet prepared
+Tabular                                Waiting for MVC
 TabularCreate  Edwin
 Toc            Kalle
 Url            Kalle
diff --git a/src/frontends/qt2/Timeout_pimpl.C b/src/frontends/qt2/Timeout_pimpl.C
new file mode 100644 (file)
index 0000000..d3a7de5
--- /dev/null
@@ -0,0 +1,51 @@
+/**
+ * \file Timeout_pimpl.C
+ * Copyright 2001 LyX Team
+ * Read COPYING
+ *
+ * \author John Levon
+ */
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+
+#include "Timeout_pimpl.h"
+#include "debug.h"
+
+using std::endl;
+
+Timeout::Pimpl::Pimpl(Timeout * owner)
+       : owner_(owner), timeout_id(-1)
+{
+}
+
+
+void Timeout::Pimpl::timerEvent(QTimerEvent *)
+{
+       owner_->emit();
+}
+
+void Timeout::Pimpl::reset()
+{
+       killTimers();
+       timeout_id = -1;
+}
+
+
+void Timeout::Pimpl::start()
+{
+       if (timeout_id != -1)
+               lyxerr << "Timeout::start: already running!" << endl;
+       timeout_id = startTimer(owner_->timeout_ms);
+}
+       
+
+void Timeout::Pimpl::stop()
+{
+       if (timeout_id != -1)
+               reset();
+}
diff --git a/src/frontends/qt2/Timeout_pimpl.h b/src/frontends/qt2/Timeout_pimpl.h
new file mode 100644 (file)
index 0000000..612f2ad
--- /dev/null
@@ -0,0 +1,50 @@
+/**
+ * \file Timeout_pimpl.h
+ * Copyright 2001 LyX Team
+ * Read COPYING
+ *
+ * \author John Levon
+ */
+#ifndef TIMEOUTPIMPL_H
+#define TIMEOUTPIMPL_H
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "frontends/Timeout.h"
+
+#include <sigc++/signal_system.h>
+
+#include <qobject.h> 
+// stupid Qt
+#undef emit
+/**
+ * This class executes the callback when the timeout expires
+ * using Qt mechanisms
+ */
+struct Timeout::Pimpl : QObject {
+public:
+       ///
+       Pimpl(Timeout * owner_);
+       /// start the timer
+       void start();
+       /// stop the timer
+       void stop();
+       /// reset
+       void reset();
+
+protected:
+       /// slot
+       virtual void timerEvent(QTimerEvent *);
+private:
+       /// the owning timer
+       Timeout * owner_;
+       /// xforms id
+       int timeout_id;
+};
+
+#endif
index 4f1b3e2bc95fa824b7302efd50705331aa7cdb14..1aee70ccd055ff22e87a7f3c013ff3b3f106d626 100644 (file)
@@ -15,7 +15,6 @@ libqt2moc_la_SOURCES := FileDialog_private_moc.C \
        emptytable_moc.C \
        Qt2Base_moc.C \
        $(MOCDIALOGS)
-       #$(patsubst, %, %Dialog_moc.C, $(DIALOGS))
  
 DISTCLEANFILES = $(libqt2moc_la_SOURCES) *.orig *.rej *~ *.bak core
 
@@ -23,4 +22,3 @@ ETAGS_ARGS = --lang=c++
  
 %_moc.C: ../%.h
        $(MOC) -o $@ $<
index 4ecabcd6b63052eee5b76a3ae30aed1daff2b1e4..eb9ee3c3ff855229db51a7b2af58d0d1a0008e63 100644 (file)
@@ -11,7 +11,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>483</width>
+            <width>439</width>
             <height>585</height>
         </rect>
     </property>
                     </property>
                     <property stdset="1">
                         <name>default</name>
+                        <bool>false</bool>
+                    </property>
+                    <property stdset="1">
+                        <name>autoDefault</name>
                         <bool>true</bool>
                     </property>
                 </widget>
                     <class>QPushButton</class>
                     <property stdset="1">
                         <name>name</name>
-                        <cstring>cancelPB</cstring>
+                        <cstring>closePB</cstring>
                     </property>
                     <property stdset="1">
                         <name>text</name>
         <receiver>QCitationDialogBase</receiver>
         <slot>slotDownClicked()</slot>
     </connection>
-    <connection>
-        <sender>restorePB</sender>
-        <signal>clicked()</signal>
-        <receiver>QCitationDialogBase</receiver>
-        <slot>slotRestoreClicked()</slot>
-    </connection>
     <connection>
         <sender>previousPB</sender>
         <signal>clicked()</signal>
         <slot>slotNextClicked()</slot>
     </connection>
     <connection>
-        <sender>citationStyleCO</sender>
-        <signal>activated(int)</signal>
+        <sender>upPB</sender>
+        <signal>clicked()</signal>
         <receiver>QCitationDialogBase</receiver>
-        <slot>slotCitationStyleSelected(int)</slot>
+        <slot>slotUpClicked()</slot>
     </connection>
     <connection>
         <sender>textBeforeED</sender>
-        <signal>returnPressed()</signal>
+        <signal>textChanged(const QString&amp;)</signal>
         <receiver>QCitationDialogBase</receiver>
-        <slot>slotTextBeforeReturn()</slot>
+        <slot>changed_adaptor()</slot>
     </connection>
     <connection>
         <sender>textAfterED</sender>
-        <signal>returnPressed()</signal>
+        <signal>textChanged(const QString&amp;)</signal>
         <receiver>QCitationDialogBase</receiver>
-        <slot>slotTextAfterReturn()</slot>
+        <slot>changed_adaptor()</slot>
     </connection>
     <connection>
-        <sender>bibLB</sender>
+        <sender>citationStyleCO</sender>
+        <signal>textChanged(const QString&amp;)</signal>
+        <receiver>QCitationDialogBase</receiver>
+        <slot>changed_adaptor()</slot>
+    </connection>
+    <connection>
+        <sender>citeLB</sender>
         <signal>highlighted(int)</signal>
         <receiver>QCitationDialogBase</receiver>
-        <slot>slotBibSelected(int)</slot>
+        <slot>slotCiteHighlighted(int)</slot>
     </connection>
     <connection>
         <sender>citeLB</sender>
+        <signal>selected(int)</signal>
+        <receiver>QCitationDialogBase</receiver>
+        <slot>slotBibHighlighted(int)</slot>
+    </connection>
+    <connection>
+        <sender>bibLB</sender>
         <signal>highlighted(int)</signal>
         <receiver>QCitationDialogBase</receiver>
-        <slot>slotCiteSelected(int)</slot>
+        <slot>slotBibHighlighted(int)</slot>
     </connection>
     <connection>
-        <sender>upPB</sender>
-        <signal>clicked()</signal>
+        <sender>bibLB</sender>
+        <signal>selected(int)</signal>
         <receiver>QCitationDialogBase</receiver>
-        <slot>slotUpClicked()</slot>
+        <slot>slotBibSelected(int)</slot>
     </connection>
+    <slot access="public">changed_adaptor()</slot>
+    <slot access="public">slotBibSelected(int)</slot>
     <slot access="protected">slotAddClicked()</slot>
-    <slot access="protected">slotBibSelected(int)</slot>
-    <slot access="protected">slotCitationStyleSelected(int)</slot>
-    <slot access="protected">slotCiteSelected(int)</slot>
+    <slot access="public">slotBibHighlighted(int)</slot>
+    <slot access="public">slotCiteHighlighted(int)</slot>
     <slot access="protected">slotDelClicked()</slot>
     <slot access="protected">slotDownClicked()</slot>
-    <slot access="protected">slotUpClicked()</slot>
     <slot access="protected">slotNextClicked()</slot>
     <slot access="protected">slotPreviousClicked()</slot>
-    <slot access="protected">slotRestoreClicked()</slot>
     <slot access="protected">slotSearchTypeSelected(bool)</slot>
-    <slot access="protected">slotTextAfterReturn()</slot>
-    <slot access="protected">slotTextBeforeReturn()</slot>
+    <slot access="protected">slotUpClicked()</slot>
 </connections>
 </UI>
index bbdce920ea4997d6af1d6cb42d668994582ab0e3..d177c0a56a4f6bb221902b602d900a5fd4ba1157 100644 (file)
@@ -11,7 +11,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>208</width>
+            <width>204</width>
             <height>82</height>
         </rect>
     </property>
                     <class>QPushButton</class>
                     <property stdset="1">
                         <name>name</name>
-                        <cstring>cancelPB</cstring>
+                        <cstring>closePB</cstring>
                     </property>
                     <property stdset="1">
                         <name>text</name>
     </vbox>
 </widget>
 <connections>
-    <connection>
-        <sender>okPB</sender>
-        <signal>clicked()</signal>
-        <receiver>QIndexDialogBase</receiver>
-        <slot>ok_adaptor()</slot>
-    </connection>
-    <connection>
-        <sender>cancelPB</sender>
-        <signal>clicked()</signal>
-        <receiver>QIndexDialogBase</receiver>
-        <slot>close_adaptor()</slot>
-    </connection>
     <connection>
         <sender>keywordED</sender>
         <signal>textChanged(const QString&amp;)</signal>
         <receiver>QIndexDialogBase</receiver>
         <slot>change_adaptor()</slot>
     </connection>
-    <slot access="public">close_adaptor()</slot>
     <slot access="public">change_adaptor()</slot>
-    <slot access="public">ok_adaptor()</slot>
 </connections>
 </UI>