+2001-08-26 John Levon <moz@compsoc.man.ac.uk>
+
+ * Dialogs.C:
+ * QRef.[Ch]:
+ * ui/QRefDialog.ui: add Ref dialog back
+
+ * QAbout.[Ch]:
+ * QCitation.[Ch]:
+ * QDocument.[Ch]:
+ * QIndex.[Ch]:
+ * QURL.[Ch]:
+ * Qt2Base.h: protect build() with updating_ too
+
+ * QCitationDialog.C: use Qt2Base::readOnly
+
+ * README: update
+
2001-08-25 John Levon <moz@compsoc.man.ac.uk>
* Dialogs.C: add URL
#include "QAboutDialog.h"
#include "QCitationDialog.h"
#include "QIndexDialog.h"
+#include "QRefDialog.h"
#include "QURLDialog.h"
-// the controller interface
#include "QAbout.h"
#include "QCharacter.h"
#include "QCitation.h"
#include "QIndex.h"
#include "QParagraph.h"
#include "QPrint.h"
+#include "QRef.h"
#include "QSearch.h"
#include "QSplash.h"
#include "QTabularCreate.h"
#include "controllers/ControlAboutlyx.h"
#include "controllers/ControlCitation.h"
#include "controllers/ControlIndex.h"
+#include "controllers/ControlRef.h"
#include "controllers/ControlSplash.h"
#include "controllers/ControlUrl.h"
#if 0
add(new GUICitation<QCitation, Qt2BC>(*lv, *this));
add(new GUIAboutlyx<QAbout, Qt2BC>(*lv, *this));
add(new GUIIndex<QIndex, Qt2BC>(*lv, *this));
+ add(new GUIRef<QRef, Qt2BC>(*lv, *this));
add(new GUIUrl<QURL, Qt2BC>(*lv, *this));
// reduce the number of connections needed in
}
-void QAbout::build()
+void QAbout::build_dialog()
{
dialog_.reset(new QAboutDialog());
connect(dialog_.get()->closePB, SIGNAL(clicked()),
/// not needed
virtual void update_contents() {}
// build the dialog
- virtual void build();
+ virtual void build_dialog();
};
#endif // FORMABOUT_H
}
-void QCitation::build()
+void QCitation::build_dialog()
{
dialog_.reset(new QCitationDialog(this));
dialog_->searchTypeCB->setChecked(false);
dialog_->searchCaseCB->setChecked(false);
-
+
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->okPB);
bc().setApply(dialog_->applyPB);
/// Set the Params variable for the Controller.
virtual void apply();
/// Build the dialog.
- virtual void build();
+ virtual void build_dialog();
/// Hide the dialog.
virtual void hide();
/// Update dialog before/whilst showing it.
{
slotBibHighlighted(sel);
- if (form_->controller().isReadonly())
+ if (form_->readOnly())
return;
slotAddClicked();
citeLB->setTopItem(n);
}
- if (!form_->controller().isReadonly()) {
+ if (!form_->readOnly()) {
if (cit != form_->citekeys.end()) {
form_->setBibButtons(QCitation::OFF);
form_->setCiteButtons(QCitation::ON);
return;
}
- if (!form_->controller().isReadonly()) {
+ if (!form_->readOnly()) {
form_->setBibButtons(QCitation::OFF);
form_->setCiteButtons(QCitation::ON);
}
#endif
-void QDocument::build()
+void QDocument::build_dialog()
{
int n;
/// Pointer to the actual instantiation of the ButtonController.
virtual Qt2BC & bc();
/// Build the dialog
- virtual void build();
+ virtual void build_dialog();
// /// Filter the inputs
// virtual bool input( FL_OBJECT *, long );
/// Update the dialog.
#include "QIndexDialog.h"
#include "ControlIndex.h"
-#include "QtLyXView.h"
-#include "BufferView.h"
-
-#include "Dialogs.h"
-#include "Qt2BC.h"
#include "QIndex.h"
+#include "Qt2BC.h"
#include "gettext.h"
-#include "buffer.h"
-#include "lyxfunc.h"
#include <qlineedit.h>
#include <qpushbutton.h>
}
-void QIndex::build()
+void QIndex::build_dialog()
{
dialog_.reset(new QIndexDialog(this));
/// update
virtual void update_contents();
/// build the dialog
- virtual void build();
+ virtual void build_dialog();
};
#endif // QINDEX_H
#include <config.h>
+#include "support/lstrings.h"
+
#include "QRefDialog.h"
-
-#include "QtLyXView.h"
-#include "BufferView.h"
-#include "Dialogs.h"
+#include "ControlRef.h"
#include "QRef.h"
+#include "Qt2BC.h"
#include "gettext.h"
-#include "buffer.h"
-#include "lyxfunc.h"
-#include "debug.h"
+#include "insets/insetref.h"
-#include <qpushbutton.h>
#include <qlineedit.h>
+#include <qcheckbox.h>
#include <qlistbox.h>
#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qtooltip.h>
using std::endl;
-QRef::QRef(LyXView *v, Dialogs *d)
- : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0),
- sort(0), gotowhere(GOTOREF), type(REF), refs(0)
+typedef Qt2CB<ControlRef, Qt2DB<QRefDialog> > base_class;
+
+QRef::QRef(ControlRef & c)
+ : base_class(c, _("Cross Reference")),
+ sort_(false), at_ref_(false)
{
- // let the dialog be shown
- // This is a permanent connection so we won't bother
- // storing a copy because we won't be disconnecting.
- d->showRef.connect(slot(this, &QRef::showRef));
- d->createRef.connect(slot(this, &QRef::createRef));
}
-QRef::~QRef()
+void QRef::build_dialog()
{
- delete dialog_;
+ dialog_.reset(new QRefDialog(this));
+
+ bc().setOK(dialog_->okPB);
+ bc().setCancel(dialog_->closePB);
+ bc().addReadOnly(dialog_->refsLB);
+ bc().addReadOnly(dialog_->sortCB);
+ bc().addReadOnly(dialog_->nameED);
+ bc().addReadOnly(dialog_->referenceED);
+ bc().addReadOnly(dialog_->typeCO);
}
-
-void QRef::showRef(InsetCommand * const inset)
+
+void QRef::update_contents()
{
- // FIXME: when could inset be 0 here ?
- if (inset==0)
- return;
+ dialog_->referenceED->setText(controller().params().getContents().c_str());
+ dialog_->nameED->setText(controller().params().getOptions().c_str());
- inset_ = inset;
- readonly = lv_->buffer()->isReadonly();
- //ih_ = inset_->hide.connect(slot(this,&QRef::hide));
- params = inset->params();
-
- show();
+ dialog_->typeCO->setCurrentItem(InsetRef::getType(controller().params().getCmdName()));
+
+ dialog_->nameED->setReadOnly(!nameAllowed() && !readOnly());
+
+ dialog_->typeCO->setEnabled(!typeAllowed() && !readOnly());
+ if (!typeAllowed())
+ dialog_->typeCO->setCurrentItem(0);
+
+ dialog_->sortCB->setChecked(sort_);
+
+ updateRefs();
}
-void QRef::createRef(string const & arg)
+void QRef::apply()
{
- if (inset_)
- close();
-
- readonly = lv_->buffer()->isReadonly();
- params.setFromString(arg);
- show();
+ controller().params().setCmdName(InsetRef::getName(dialog_->typeCO->currentItem()));
+ controller().params().setContents(dialog_->referenceED->text().latin1());
+ controller().params().setOptions(dialog_->nameED->text().latin1());
}
-void QRef::select(const char *text)
+bool QRef::nameAllowed()
{
- highlight(text);
- goto_ref();
+ return controller().docType() != ControlRef::LATEX &&
+ controller().docType() != ControlRef::LITERATE;
}
-void QRef::highlight(const char *text)
+bool QRef::typeAllowed()
{
- if (gotowhere==GOTOBACK)
- goto_ref();
-
- dialog_->gotoPB->setEnabled(true);
- if (!readonly) {
- dialog_->typeCO->setEnabled(true);
- dialog_->referenceED->setText(text);
- dialog_->okPB->setEnabled(true);
- }
+ return controller().docType() == ControlRef::LINUXDOC ||
+ controller().docType() == ControlRef::DOCBOOK;
}
-void QRef::set_sort(bool on)
+void QRef::setGoBack()
{
- if (on!=sort) {
- sort=on;
- dialog_->refsLB->clear();
- updateRefs();
- }
+ dialog_->gotoPB->setText(_("&Go back"));
+ QToolTip::remove(dialog_->gotoPB);
+ QToolTip::add(dialog_->gotoPB, _("Go back"));
}
-void QRef::goto_ref()
+void QRef::setGotoRef()
{
- switch (gotowhere) {
- case GOTOREF:
- lv_->getLyXFunc()->dispatch(LFUN_REF_GOTO, dialog_->referenceED->text().latin1());
- gotowhere=GOTOBACK;
- dialog_->gotoPB->setText(_("&Go back"));
- break;
- case GOTOBACK:
- //FIXME lv_->getLyXFunc()->dispatch(LFUN_REF_BACK);
- gotowhere=GOTOREF;
- dialog_->gotoPB->setText(_("&Goto reference"));
- break;
- }
+ dialog_->gotoPB->setText(_("&Go to reference"));
+ QToolTip::remove(dialog_->gotoPB);
+ QToolTip::add(dialog_->gotoPB, _("Go to reference"));
}
-void QRef::updateRefs()
+void QRef::gotoRef()
{
- // list will be re-done, should go back if necessary
- if (gotowhere==GOTOBACK) {
- //FIXME lv_->getLyXFunc()->dispatch(LFUN_REF_BACK);
- gotowhere = GOTOREF;
- dialog_->gotoPB->setText(_("&Goto reference"));
+ string ref(dialog_->referenceED->text());
+
+ if (at_ref_) {
+ // go back
+ setGotoRef();
+ controller().gotoBookmark();
+ } else {
+ // go to the ref
+ setGoBack();
+ controller().gotoRef(ref);
}
+ at_ref_ = !at_ref_;
+}
+
+void QRef::redoRefs()
+{
dialog_->refsLB->setAutoUpdate(false);
// need this because Qt will send a highlight() here for
// the first item inserted
string tmp(dialog_->referenceED->text());
- for (std::vector< string >::const_iterator iter = refs.begin();
- iter != refs.end(); ++iter) {
- if (sort)
+ for (std::vector<string>::const_iterator iter = refs_.begin();
+ iter != refs_.end(); ++iter) {
+ if (sort_)
dialog_->refsLB->inSort(iter->c_str());
else
dialog_->refsLB->insertItem(iter->c_str());
dialog_->referenceED->setText(tmp.c_str());
for (unsigned int i = 0; i < dialog_->refsLB->count(); ++i) {
- if (!strcmp(dialog_->referenceED->text(),dialog_->refsLB->text(i)))
+ if (!compare(tmp.c_str(), dialog_->refsLB->text(i).latin1()))
dialog_->refsLB->setCurrentItem(i);
}
dialog_->refsLB->update();
}
-
-void QRef::do_ref_update()
-{
- refs.clear();
- dialog_->refsLB->clear();
- refs = lv_->buffer()->getLabelList();
- if (!refs.empty())
- dialog_->sortCB->setEnabled(true);
- updateRefs();
-}
-
-
-void QRef::update()
-{
- // FIXME: needs updating
-
- dialog_->referenceED->setText(params.getContents().c_str());
- dialog_->nameED->setText(params.getOptions().c_str());
- if (params.getCmdName()=="pageref") {
- type = PAGEREF;
- dialog_->typeCO->setCurrentItem(1);
- } else if (params.getCmdName()=="vref") {
- type = VREF;
- dialog_->typeCO->setCurrentItem(2);
- } else if (params.getCmdName()=="vpageref") {
- type = VPAGEREF;
- dialog_->typeCO->setCurrentItem(3);
- } else if (params.getCmdName()=="prettyref") {
- type = PRETTYREF;
- dialog_->typeCO->setCurrentItem(4);
- } else {
- type = REF;
- dialog_->typeCO->setCurrentItem(0);
- }
-
- dialog_->gotoPB->setText(_("&Goto reference"));
-
- gotowhere = GOTOREF;
-
- dialog_->sortCB->setChecked(sort);
-
- do_ref_update();
-
- dialog_->gotoPB->setEnabled(params.getContents()!="");
- dialog_->okPB->setEnabled(params.getContents()!="");
-
- dialog_->typeCO->setEnabled(!readonly);
- dialog_->sortCB->setEnabled(!readonly);
- dialog_->refsLB->setEnabled(!readonly);
- dialog_->okPB->setEnabled(!readonly);
- dialog_->updatePB->setEnabled(!readonly);
- if (readonly)
- dialog_->cancelPB->setText(_("&Close"));
- else
- dialog_->cancelPB->setText(_("&Cancel"));
-}
-
-
-void QRef::apply()
-{
- if (readonly)
- return;
-
- if (!lv_->view()->available())
- return;
-
- switch (dialog_->typeCO->currentItem()) {
- case 0:
- params.setCmdName("ref");
- break;
- case 1:
- params.setCmdName("pageref");
- break;
- case 2:
- params.setCmdName("vref");
- break;
- case 3:
- params.setCmdName("vpageref");
- break;
- case 4:
- params.setCmdName("prettyref");
- break;
- default:
- lyxerr[Debug::GUI] << "Unknown Ref Type" << endl;
- }
-
- params.setContents(dialog_->referenceED->text().latin1());
- params.setOptions(dialog_->nameED->text().latin1());
-
- if (inset_ != 0) {
- if (params != inset_->params()) {
- inset_->setParams(params);
- lv_->view()->updateInset(inset_, true);
- }
- } else
- lv_->getLyXFunc()->dispatch(LFUN_REF_INSERT, params.getAsString().c_str());
-}
-
-
-void QRef::show()
-{
- if (!dialog_)
- dialog_ = new QRefDialog(this, 0, _("LyX: Cross Reference"), false);
-
- if (!dialog_->isVisible()) {
- h_ = d_->hideBufferDependent.connect(slot(this, &QRef::hide));
- //u_ = d_->updateBufferDependent.connect(slot(this, &QRef::update));
- }
-
- dialog_->raise();
- dialog_->setActiveWindow();
-
- update();
- dialog_->show();
-}
-
-
-void QRef::close()
-{
- h_.disconnect();
- u_.disconnect();
- ih_.disconnect();
- inset_ = 0;
-}
-
-
-void QRef::hide()
+void QRef::updateRefs()
{
- dialog_->hide();
- close();
+ refs_.clear();
+ if (at_ref_)
+ gotoRef();
+ dialog_->refsLB->clear();
+ refs_ = controller().getLabelList();
+ dialog_->sortCB->setEnabled(!refs_.empty());
+ dialog_->refsLB->setEnabled(!refs_.empty());
+ redoRefs();
}
-// -*- C++ -*-
/**
* \file QRef.h
* Copyright 2001 the LyX Team
* Read the file COPYING
*
- * \author John Levon <moz@compsoc.man.ac.uk>
- * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
+ * \author John Levon
*/
#ifndef QREF_H
#define QREF_H
-#include "DialogBase.h"
+#include <config.h>
+#include <vector>
#include "LString.h"
-#include "boost/utility.hpp"
-#include "insets/insetcommand.h"
+
+#include "Qt2Base.h"
-class Dialogs;
-class LyXView;
+class ControlRef;
class QRefDialog;
-class QRef : public DialogBase {
+class QRef :
+ public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
+{
+ friend class QRefDialog;
+
public:
- QRef(LyXView *, Dialogs *);
- ~QRef();
+ QRef(ControlRef & c);
- /// double-click a ref
- void select(const char *);
- /// highlight a ref
- void highlight(const char *);
- /// set sort
- void set_sort(bool);
- /// goto a ref (or back)
- void goto_ref();
+private:
+ /// apply changes
+ virtual void apply();
+ /// build dialog
+ virtual void build_dialog();
/// update dialog
- void update();
- /// update just the refs
- void do_ref_update();
- /// Apply changes
- void apply();
- /// close the connections
- void close();
-
-private:
- enum Type {
- REF, PAGEREF, VREF, VPAGEREF, PRETTYREF
- };
+ virtual void update_contents();
+
+ /// is name allowed for this ?
+ bool nameAllowed();
- enum GotoType {
- GOTOREF, GOTOBACK
- };
+ /// is type allowed for this ?
+ bool typeAllowed();
- /// Create the dialog if necessary, update it and display it.
- void show();
- /// Hide the dialog.
- void hide();
+ /// go to current reference
+ void gotoRef();
+
+ /// set go back button
+ void setGoBack();
- /// create a Reference inset
- void createRef(string const &);
- /// edit a Reference inset
- void showRef(InsetCommand * const);
+ /// set goto ref button
+ void setGotoRef();
- /// update the keys list
- void updateRefs(void);
+ /// re-enter references
+ void redoRefs();
- /// Real GUI implementation.
- QRefDialog * dialog_;
-
- /// the LyXView we belong to
- LyXView * lv_;
+ /// update references
+ void updateRefs();
- /** Which Dialogs do we belong to?
- Used so we can get at the signals we have to connect to.
- */
- Dialogs * d_;
- /// pointer to the inset if any
- InsetCommand * inset_;
- /// insets params
- InsetCommandParams params;
- /// is the inset we are reading from a readonly buffer ?
- bool readonly;
-
- /// Hide connection.
- SigC::Connection h_;
- /// Update connection.
- SigC::Connection u_;
- /// Inset hide connection.
- SigC::Connection ih_;
+ /// sort or not persistent state
+ bool sort_;
- /// to sort or not to sort
- bool sort;
-
- /// where to go
- GotoType gotowhere;
-
- /// current type
- Type type;
+ /// at a reference ?
+ bool at_ref_;
- /// available references
- std::vector< string > refs;
+ /// the references
+ std::vector<string> refs_;
};
#endif // QREF_H
* Read the file COPYING
*
* \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
+ * \author John Levon <moz@compsoc.man.ac.uk>
*/
+#include <config.h>
+
+#include <qpushbutton.h>
+#include <qlineedit.h>
+#include <qcombobox.h>
+#include <qlistbox.h>
+
#include "QRefDialog.h"
+#include "ControlRef.h"
#include "Dialogs.h"
#include "QRef.h"
+#include "debug.h"
-QRefDialog::QRefDialog(QRef * form, QWidget * parent, const char * name, bool modal, WFlags fl)
- : QRefDialogBase(parent, name, modal, fl),
+QRefDialog::QRefDialog(QRef * form)
+ : QRefDialogBase(0, 0, false, 0),
form_(form)
{
+ connect(okPB, SIGNAL(clicked()),
+ form_, SLOT(slotOK()));
+ connect(closePB, SIGNAL(clicked()),
+ form_, SLOT(slotClose()));
}
-QRefDialog::~QRefDialog()
+void QRefDialog::changed_adaptor()
{
-}
-
-
-void QRefDialog::apply_adaptor()
-{
- form_->apply();
- form_->close();
- hide();
+ form_->changed();
}
-void QRefDialog::goto_adaptor()
+void QRefDialog::gotoClicked()
{
- form_->goto_ref();
+ form_->gotoRef();
}
-void QRefDialog::highlight_adaptor(const QString & sel)
+void QRefDialog::refHighlighted(const QString & sel)
{
- form_->highlight(sel);
+ if (form_->readOnly())
+ return;
+
+ referenceED->setText(sel);
+ if (form_->at_ref_)
+ form_->gotoRef();
+ gotoPB->setEnabled(true);
+ if (form_->typeAllowed())
+ typeCO->setEnabled(true);
+ if (form_->nameAllowed())
+ nameED->setEnabled(true);
}
-
-void QRefDialog::close_adaptor()
-{
- form_->close();
- hide();
-}
-
-
-void QRefDialog::select_adaptor(const QString & sel)
+
+void QRefDialog::refSelected(const QString & sel)
{
- form_->select(sel);
+ form_->gotoRef();
}
-void QRefDialog::sort_adaptor(bool sort)
+void QRefDialog::sortToggled(bool on)
{
- form_->set_sort(sort);
+ form_->sort_ = on;
+ refsLB->clear();
+ form_->redoRefs();
}
-void QRefDialog::update_adaptor()
+void QRefDialog::updateClicked()
{
- form_->do_ref_update();
+ form_->updateRefs();
}
-
void QRefDialog::closeEvent(QCloseEvent * e)
{
- form_->close();
+ form_->slotWMHide();
e->accept();
}
* Read the file COPYING
*
* \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
+ * \author John Levon <moz@compsoc.man.ac.uk>
*/
#ifndef QREFDIALOG_H
{ Q_OBJECT
public:
- QRefDialog(QRef * form, QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0);
- ~QRefDialog();
+ QRefDialog(QRef * form);
public slots:
- void apply_adaptor();
- void goto_adaptor();
- void highlight_adaptor(const QString &);
- void close_adaptor();
- void select_adaptor(const QString &);
- void sort_adaptor(bool);
- void update_adaptor();
+ void changed_adaptor();
+ void gotoClicked();
+ void refHighlighted(const QString &);
+ void refSelected(const QString &);
+ void sortToggled(bool);
+ void updateClicked();
protected:
void closeEvent(QCloseEvent * e);
}
-void QURL::build()
+void QURL::build_dialog()
{
dialog_.reset(new QURLDialog(this));
/// apply dialog
virtual void apply();
/// build dialog
- virtual void build();
+ virtual void build_dialog();
/// update dialog
virtual void update_contents();
};
void Qt2BC::setWidgetEnabled(QWidget * obj, bool enabled)
{
- lyxerr << "Qt2BC: setting "
- << obj << " to " << enabled << std::endl;
-
// yuck, rtti, but the user comes first
if (obj->inherits("QLineEdit")) {
QLineEdit * le(static_cast<QLineEdit*>(obj));
void Qt2Base::changed()
{
- lyxerr << "got changed() during updating:" << updating_ << std::endl;
-
if (updating_)
return;
#include "ViewBase.h"
#include "LString.h"
+#include "debug.h"
#include "ButtonPolicies.h"
#include "ControlButtons.h"
virtual ~Qt2Base() {}
protected:
- /// Build the dialog
- virtual void build() = 0;
+ /// build the actual dialog
+ virtual void build_dialog() = 0;
/// Hide the dialog.
virtual void hide();
/// Create the dialog if necessary, update it and display it.
/// update the dialog
virtual void update();
+ /// Build the dialog
+ virtual void build();
+
/// Pointer to the actual instantiation of the Qt dialog
virtual QDialog * form() const;
+
/// Real GUI implementation.
boost::scoped_ptr<Dialog> dialog_;
{
form()->setUpdatesEnabled(false);
- // this is tricky. First we process pending events
- // as a result of the bc() state change (if any).
- // then we lock out any bc() changes as a result of
- // "innocent" updates during update_contents()
- // then we enable normal behaviour again.
+ // protect the BC from unwarranted state transitions
+
qApp->processEvents();
updating_ = true;
update_contents();
}
+template <class Dialog>
+void Qt2DB<Dialog>::build()
+{
+ // protect the BC from unwarranted state transitions
+
+ qApp->processEvents();
+ updating_ = true;
+ build_dialog();
+ qApp->processEvents();
+ updating_ = false;
+}
+
+
template <class Controller, class Base>
class Qt2CB: public Base
{
+public:
+ bool readOnly() const {
+ return controller().isReadonly();
+ }
+
protected:
///
Qt2CB(ControlButtons &, const QString&);
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.
-Override update_contents() to update the dialog, not update()
+Override update_contents() to update the dialog, not update(), and build_dialog(),
+not build(). Only these functions may change dialog widgets that may emit changed()
+during initialisation, to prevent the button controller from changing its state.
Never call buttoncontroller functions directly from dialogs. In general, you
should use Qt2Base::changed() in all circumstances. However, if you must call
Index Kalle Done
Paragraph Edwin Waiting for MVC
Print Edwin
-Ref Kalle
+Ref Kalle Done
Search Edwin
Splash Edwin
Tabular Waiting for MVC
TabularCreate Edwin
Toc Kalle
-Url Kalle
+Url Kalle Done
<rect>
<x>0</x>
<y>0</y>
- <width>417</width>
+ <width>401</width>
<height>277</height>
</rect>
</property>
<name>name</name>
<cstring>refsLB</cstring>
</property>
+ <property>
+ <name>toolTip</name>
+ <string>Available references</string>
+ </property>
</widget>
<widget>
<class>QLayoutWidget</class>
<name>text</name>
<string>&Update</string>
</property>
+ <property>
+ <name>toolTip</name>
+ <string>Update the reference list</string>
+ </property>
</widget>
<spacer>
<property>
</property>
<property>
<name>toolTip</name>
- <string>Sort references in alphabetical order ?</string>
+ <string>Sort references in alphabetical order</string>
</property>
</widget>
<spacer>
<name>text</name>
<string>&Goto reference</string>
</property>
+ <property>
+ <name>toolTip</name>
+ <string>Move the document cursor</string>
+ </property>
</widget>
<spacer>
<property>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
- <cstring>cancelPB</cstring>
+ <cstring>closePB</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>&Cancel</string>
+ <string>&Close</string>
</property>
</widget>
</hbox>
</widget>
<connections>
<connection>
- <sender>refsLB</sender>
- <signal>highlighted(const QString&)</signal>
+ <sender>typeCO</sender>
+ <signal>activated(int)</signal>
+ <receiver>QRefDialogBase</receiver>
+ <slot>changed_adaptor()</slot>
+ </connection>
+ <connection>
+ <sender>referenceED</sender>
+ <signal>textChanged(const QString&)</signal>
<receiver>QRefDialogBase</receiver>
- <slot>highlight_adaptor(const QString&)</slot>
+ <slot>changed_adaptor()</slot>
+ </connection>
+ <connection>
+ <sender>nameED</sender>
+ <signal>textChanged(const QString&)</signal>
+ <receiver>QRefDialogBase</receiver>
+ <slot>changed_adaptor()</slot>
</connection>
<connection>
<sender>refsLB</sender>
- <signal>selected(const QString&)</signal>
+ <signal>highlighted(const QString&)</signal>
<receiver>QRefDialogBase</receiver>
- <slot>select_adaptor(const QString&)</slot>
+ <slot>refHighlighted(const QString&)</slot>
</connection>
<connection>
- <sender>sortCB</sender>
- <signal>toggled(bool)</signal>
+ <sender>refsLB</sender>
+ <signal>selected(const QString&)</signal>
<receiver>QRefDialogBase</receiver>
- <slot>sort_adaptor(bool)</slot>
+ <slot>refSelected(const QString&)</slot>
</connection>
<connection>
- <sender>updatePB</sender>
- <signal>clicked()</signal>
+ <sender>refsLB</sender>
+ <signal>highlighted(const QString&)</signal>
<receiver>QRefDialogBase</receiver>
- <slot>update_adaptor()</slot>
+ <slot>changed_adaptor()</slot>
</connection>
<connection>
- <sender>okPB</sender>
- <signal>clicked()</signal>
+ <sender>sortCB</sender>
+ <signal>toggled(bool)</signal>
<receiver>QRefDialogBase</receiver>
- <slot>apply_adaptor()</slot>
+ <slot>sortToggled(bool)</slot>
</connection>
<connection>
- <sender>cancelPB</sender>
+ <sender>gotoPB</sender>
<signal>clicked()</signal>
<receiver>QRefDialogBase</receiver>
- <slot>close_adaptor()</slot>
+ <slot>gotoClicked()</slot>
</connection>
<connection>
- <sender>gotoPB</sender>
+ <sender>updatePB</sender>
<signal>clicked()</signal>
<receiver>QRefDialogBase</receiver>
- <slot>goto_adaptor()</slot>
+ <slot>updateClicked()</slot>
</connection>
- <slot access="public">apply_adaptor()</slot>
- <slot access="public">goto_adaptor()</slot>
- <slot access="public">highlight_adaptor(const QString&)</slot>
- <slot access="public">close_adaptor()</slot>
- <slot access="public">select_adaptor(const QString&)</slot>
- <slot access="public">sort_adaptor(bool)</slot>
- <slot access="public">update_adaptor()</slot>
+ <slot access="public">changed_adaptor()</slot>
+ <slot access="public">gotoClicked()</slot>
+ <slot access="public">refHighlighted(const QString&)</slot>
+ <slot access="public">refSelected(const QString&)</slot>
+ <slot access="public">sortToggled(bool)</slot>
+ <slot access="public">updateClicked()</slot>
</connections>
</UI>