From eed0649017e15b303c9abb94ca162555f2ee30d4 Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 29 Aug 2001 02:29:26 +0000 Subject: [PATCH] whatsthis fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2611 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 7 +++++++ src/frontends/qt2/QIndexDialog.C | 21 ++++++++++++++++++++- src/frontends/qt2/README | 3 ++- src/frontends/qt2/ui/QIndexDialog.ui | 16 ---------------- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 87985af0ae..1a28c7c139 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,10 @@ +2001-08-29 John Levon + + * ui/QIndexDialog.ui: + * QIndexDialog.C: add QWhatsThis in C source + + * README: document this restriction + 2001-08-29 John Levon * QMinipage.[Ch]: diff --git a/src/frontends/qt2/QIndexDialog.C b/src/frontends/qt2/QIndexDialog.C index 2f12f9c152..48572ab5b9 100644 --- a/src/frontends/qt2/QIndexDialog.C +++ b/src/frontends/qt2/QIndexDialog.C @@ -6,12 +6,16 @@ * \author John Levon */ +#include + #include "QIndexDialog.h" #include "Dialogs.h" #include "QIndex.h" +#include "gettext.h" -#include #include +#include +#include QIndexDialog::QIndexDialog(QIndex * form) : QIndexDialogBase(0, 0, false, 0), @@ -21,6 +25,21 @@ QIndexDialog::QIndexDialog(QIndex * form) form, SLOT(slotOK())); connect(closePB, SIGNAL(clicked()), 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")); } diff --git a/src/frontends/qt2/README b/src/frontends/qt2/README index 0c89ddedd1..84ddf40a9b 100644 --- a/src/frontends/qt2/README +++ b/src/frontends/qt2/README @@ -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 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 of the current dialog's contents. diff --git a/src/frontends/qt2/ui/QIndexDialog.ui b/src/frontends/qt2/ui/QIndexDialog.ui index dc0ab1529a..293f4dadb1 100644 --- a/src/frontends/qt2/ui/QIndexDialog.ui +++ b/src/frontends/qt2/ui/QIndexDialog.ui @@ -74,22 +74,6 @@ toolTip Index entry - - whatsThis - 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. - -- 2.39.2