whatsthis fix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2611 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2001-08-29 02:29:26 +00:00
parent ead11eb6b5
commit eed0649017
4 changed files with 29 additions and 18 deletions

View File

@ -1,3 +1,10 @@
2001-08-29 John Levon <moz@compsoc.man.ac.uk>
* ui/QIndexDialog.ui:
* QIndexDialog.C: add QWhatsThis in C source
* README: document this restriction
2001-08-29 John Levon <moz@compsoc.man.ac.uk> 2001-08-29 John Levon <moz@compsoc.man.ac.uk>
* QMinipage.[Ch]: * QMinipage.[Ch]:

View File

@ -6,12 +6,16 @@
* \author John Levon <moz@compsoc.man.ac.uk> * \author John Levon <moz@compsoc.man.ac.uk>
*/ */
#include <config.h>
#include "QIndexDialog.h" #include "QIndexDialog.h"
#include "Dialogs.h" #include "Dialogs.h"
#include "QIndex.h" #include "QIndex.h"
#include "gettext.h"
#include <qwidget.h>
#include <qpushbutton.h> #include <qpushbutton.h>
#include <qlineedit.h>
#include <qwhatsthis.h>
QIndexDialog::QIndexDialog(QIndex * form) QIndexDialog::QIndexDialog(QIndex * form)
: QIndexDialogBase(0, 0, false, 0), : QIndexDialogBase(0, 0, false, 0),
@ -21,6 +25,21 @@ QIndexDialog::QIndexDialog(QIndex * form)
form, SLOT(slotOK())); form, SLOT(slotOK()));
connect(closePB, SIGNAL(clicked()), connect(closePB, SIGNAL(clicked()),
form, SLOT(slotClose())); form, SLOT(slotClose()));
QWhatsThis::add(keywordED, _(
"The format of the entry in the index.\n"
"\n"
"An entry can be specified as a sub-entry of\n"
"another with \"!\" :\n"
"\n"
"cars!mileage\n"
"\n"
"You can cross-refer to another entry like so :\n"
"\n"
"cars!mileage|see{economy}\n"
"\n"
"For further details refer to the local LaTeX\n"
"documentation.\n"));
} }

View File

@ -17,7 +17,8 @@ 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 Every non-trivial widget should have a tooltip. If you don't know
what to write, write "FIXME", and it can fixed later. Don't be afraid what to write, write "FIXME", and it can fixed later. Don't be afraid
to use QWhatsThis too (e.g. the index dialog) to use QWhatsThis too, but this must be done in the derived class's
constructor, and use _("...").
If necessary, you should override Qt2Base::isValid() for determining the validity If necessary, you should override Qt2Base::isValid() for determining the validity
of the current dialog's contents. of the current dialog's contents.

View File

@ -74,22 +74,6 @@
<name>toolTip</name> <name>toolTip</name>
<string>Index entry</string> <string>Index entry</string>
</property> </property>
<property>
<name>whatsThis</name>
<string>The format of the entry in the index.
An entry can be specified as a sub-entry of
another with "!" :
cars!mileage
You can cross-refer to another entry like so :
cars!mileage|see{economy}
For further details refer to the local LaTeX
documentation.</string>
</property>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>