summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc
diff options
context:
space:
mode:
authorJeremy Katz <jeremy.katz@nokia.com>2012-08-01 14:36:13 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-01 15:37:46 +0200
commita68577e7e07cce40cac142f6e2b386a76f3ecbd1 (patch)
treed79bbae4fcebb76f72aa1a56beac09b945967248 /src/widgets/doc
parentd61c356516cddb9cb0862d13479acd4c3310a972 (diff)
replace \key and \gui qdoc commands with \uicontrol
Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/widgets/doc')
-rw-r--r--src/widgets/doc/src/addressbook-fr.qdoc10
-rw-r--r--src/widgets/doc/src/addressbook.qdoc22
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/focus.qdoc40
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc6
-rw-r--r--src/widgets/doc/src/widgets-tutorial.qdoc6
6 files changed, 43 insertions, 43 deletions
diff --git a/src/widgets/doc/src/addressbook-fr.qdoc b/src/widgets/doc/src/addressbook-fr.qdoc
index edd53239d0..06bbca0b6a 100644
--- a/src/widgets/doc/src/addressbook-fr.qdoc
+++ b/src/widgets/doc/src/addressbook-fr.qdoc
@@ -704,11 +704,11 @@
par les classes qui instancient \c FindDialog, ce qui leur permet d'obtenir
le texte entré par l'utilisateur. Un slot public, \c findClicked(), est
défini pour prendre en charge le texte lorsque l'utilisateur clique sur
- le bouton \gui Find.
+ le bouton \uicontrol Find.
Finalement, nous définissons les variables privées \c findButton,
\c lineEdit et \c findText, qui correspondent respectivement au bouton
- \gui Find, au champ de texte dans lequel l'utilisateur tape le texte
+ \uicontrol Find, au champ de texte dans lequel l'utilisateur tape le texte
à rechercher, et à une variable interne stockant le texte pour une
utilisation ultérieure.
@@ -733,7 +733,7 @@
\image addressbook-tutorial-part5-signals-and-slots.png
Dans \c findClicked(), nous validons le champ de texte pour nous
- assurer que l'utilisateur n'a pas cliqué sur le bouton \gui Find sans
+ assurer que l'utilisateur n'a pas cliqué sur le bouton \uicontrol Find sans
avoir entré un nom de contact. Ensuite, nous stockons le texte du champ
d'entrée \c lineEdit dans \c findText. Et finalement nous vidons le
contenu de \c lineEdit et cachons la boîte de dialogue.
@@ -759,7 +759,7 @@
Jusqu'ici, toutes les fonctionnalités du carnet d'adresses ont un
QPushButton et un slot correspondant. De la même façon, pour la
- fonctionnalité \gui Find, nous avons \c findButton et \c findContact().
+ fonctionnalité \uicontrol Find, nous avons \c findButton et \c findContact().
Le \c findButton est déclaré comme une variable privée et la
méthode \c findContact() est déclarée comme un slot public.
@@ -856,7 +856,7 @@
Idéalement, l'interface serait plus conviviale avec des boutons
affichant "Load contacts from a file" et "Save contacts to a file". Mais
compte tenu de la dimension des autres boutons, on initialise les labels
- des boutons à \gui{Load...} et \gui{Save...}. Heureusement, Qt offre une
+ des boutons à \uicontrol{Load...} et \uicontrol{Save...}. Heureusement, Qt offre une
façon simple d'ajouter des info-bulles avec
\l{QWidget::setToolTip()}{setToolTip()}, et nous l'exploitons de la façon
suivante pour nos boutons:
diff --git a/src/widgets/doc/src/addressbook.qdoc b/src/widgets/doc/src/addressbook.qdoc
index 27bdb0fac4..ca0531c13c 100644
--- a/src/widgets/doc/src/addressbook.qdoc
+++ b/src/widgets/doc/src/addressbook.qdoc
@@ -276,8 +276,8 @@
We also declare two private QString objects, \c oldName and \c oldAddress.
These objects are needed to hold the name and address of the contact that
- was last displayed, before the user clicked \gui Add. So, when the user clicks
- \gui Cancel, we can revert to displaying the details of the last contact.
+ was last displayed, before the user clicked \uicontrol Add. So, when the user clicks
+ \uicontrol Cancel, we can revert to displaying the details of the last contact.
\section1 Implementing the AddressBook Class
@@ -298,7 +298,7 @@
The \c addButton is displayed by invoking the \l{QPushButton::show()}
{show()} function, while the \c submitButton and \c cancelButton are
hidden by invoking \l{QPushButton::hide()}{hide()}. These two push
- buttons will only be displayed when the user clicks \gui Add and this is
+ buttons will only be displayed when the user clicks \uicontrol Add and this is
handled by the \c addContact() function discussed below.
\snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots
@@ -342,7 +342,7 @@
\list 1
\li We extract the contact's details from \c nameLine and \c addressText
and store them in QString objects. We also validate to make sure that the
- user did not click \gui Submit with empty input fields; otherwise, a
+ user did not click \uicontrol Submit with empty input fields; otherwise, a
QMessageBox is displayed to remind the user for a name and address.
\snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1
@@ -377,7 +377,7 @@
\snippet tutorials/addressbook/part2/addressbook.cpp cancel
The general idea behind adding a contact is to give the user the
- flexibility to click \gui Submit or \gui Cancel at any time. The flowchart below
+ flexibility to click \uicontrol Submit or \uicontrol Cancel at any time. The flowchart below
further explains this concept:
\image addressbook-tutorial-part2-add-flowchart.png
@@ -673,11 +673,11 @@
We define a public function, \c getFindText(), to be used by classes that
instantiate \c FindDialog. This function allows these classes to obtain the
search string entered by the user. A public slot, \c findClicked(), is also
- defined to handle the search string when the user clicks the \gui Find
+ defined to handle the search string when the user clicks the \uicontrol Find
button.
Lastly, we define the private variables, \c findButton, \c lineEdit
- and \c findText, corresponding to the \gui Find button, the line edit
+ and \c findText, corresponding to the \uicontrol Find button, the line edit
into which the user types the search string, and an internal string
used to store the search string for later use.
@@ -702,7 +702,7 @@
\image addressbook-tutorial-part5-signals-and-slots.png
In \c findClicked(), we validate \c lineEdit to ensure that the user
- did not click the \gui Find button without entering a contact's name. Then, we set
+ did not click the \uicontrol Find button without entering a contact's name. Then, we set
\c findText to the search string, extracted from \c lineEdit. After that,
we clear the contents of \c lineEdit and hide the dialog.
@@ -726,7 +726,7 @@
\snippet tutorials/addressbook/part5/addressbook.h include finddialog's header
So far, all our address book features have a QPushButton and a
- corresponding slot. Similarly, for the \gui Find feature we have
+ corresponding slot. Similarly, for the \uicontrol Find feature we have
\c findButton and \c findContact().
The \c findButton is declared as a private variable and the
@@ -821,8 +821,8 @@
In our constructor, we instantiate \c loadButton and \c saveButton.
Ideally, it would be more user-friendly to set the push buttons' labels
to "Load contacts from a file" and "Save contacts to a file". However, due
- to the size of our other push buttons, we set the labels to \gui{Load...}
- and \gui{Save...}. Fortunately, Qt provides a simple way to set tooltips with
+ to the size of our other push buttons, we set the labels to \uicontrol{Load...}
+ and \uicontrol{Save...}. Fortunately, Qt provides a simple way to set tooltips with
\l{QWidget::setToolTip()}{setToolTip()} and we use it in the following way
for our push buttons:
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index 0e48efbff8..f3b94e31aa 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -851,7 +851,7 @@
The behavior of the spin box could be adjusted to make it more user
friendly. In the default event filter supplied by QItemDelegate, if
- the user hits \key Return to confirm their choice in the spin box,
+ the user hits \uicontrol Return to confirm their choice in the spin box,
the delegate commits the value to the model and closes the spin box.
We can change this behavior by installing our own event filter on the
spin box, and provide editing hints that suit our needs; for example,
diff --git a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
index 60f05948b4..7417f34eaf 100644
--- a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
@@ -51,7 +51,7 @@
\list 1
- \li The user presses \key Tab (or \key Shift+Tab).
+ \li The user presses \uicontrol Tab (or \uicontrol Shift+Tab).
\li The user clicks a widget.
\li The user presses a keyboard shortcut.
\li The user uses the mouse wheel.
@@ -65,36 +65,36 @@
\section2 Tab or Shift+Tab
- Pressing \key Tab is by far the most common way to move focus
+ Pressing \uicontrol Tab is by far the most common way to move focus
using the keyboard. (Sometimes in data-entry applications Enter
- does the same as \key{Tab}; this can easily be achieved in Qt by
+ does the same as \uicontrol{Tab}; this can easily be achieved in Qt by
implementing an \l{The Event System}{event filter}.)
- Pressing \key Tab, in all window systems in common use today,
+ Pressing \uicontrol Tab, in all window systems in common use today,
moves the keyboard focus to the next widget in a circular
- per-window list. \key Tab moves focus along the circular list in
- one direction, \key Shift+Tab in the other. The order in which
- \key Tab presses move from widget to widget is called the tab order.
+ per-window list. \uicontrol Tab moves focus along the circular list in
+ one direction, \uicontrol Shift+Tab in the other. The order in which
+ \uicontrol Tab presses move from widget to widget is called the tab order.
You can customize the tab order using QWidget::setTabOrder(). (If
- you don't, \key Tab generally moves focus in the order of widget
+ you don't, \uicontrol Tab generally moves focus in the order of widget
construction.) \l{Qt Designer} provides a means of visually
changing the tab order.
- Since pressing \key Tab is so common, most widgets that can have focus
+ Since pressing \uicontrol Tab is so common, most widgets that can have focus
should support tab focus. The major exception is widgets that are
rarely used, and where there is some keyboard accelerator or error
handler that moves the focus.
For example, in a data entry dialog, there might be a field that
is only necessary in one per cent of all cases. In such a dialog,
- \key Tab could skip this field, and the dialog could use one of
+ \uicontrol Tab could skip this field, and the dialog could use one of
these mechanisms:
\list 1
\li If the program can determine whether the field is needed, it can
- move focus there when the user finishes entry and presses \gui OK, or when
+ move focus there when the user finishes entry and presses \uicontrol OK, or when
the user presses Enter after finishing the other fields. Alternately,
include the field in the tab order but disable it. Enable it if it
becomes appropriate in view of what the user has set in the other
@@ -105,22 +105,22 @@
\endlist
- Another exception to \key Tab support is text-entry widgets that
+ Another exception to \uicontrol Tab support is text-entry widgets that
must support the insertion of tabs; almost all text editors fall
- into this class. Qt treats \key Ctrl+Tab as \key Tab and \key
- Ctrl+Shift+Tab as \key Shift+Tab, and such widgets can
+ into this class. Qt treats \uicontrol Ctrl+Tab as \uicontrol Tab and \uicontrol
+ Ctrl+Shift+Tab as \uicontrol Shift+Tab, and such widgets can
reimplement QWidget::event() and handle Tab before calling
QWidget::event() to get normal processing of all other keys.
- However, since some systems use \key Ctrl+Tab for other purposes,
- and many users aren't aware of \key Ctrl+Tab anyway, this isn't a
+ However, since some systems use \uicontrol Ctrl+Tab for other purposes,
+ and many users aren't aware of \uicontrol Ctrl+Tab anyway, this isn't a
complete solution.
\section2 The User Clicks a Widget
- This is perhaps even more common than pressing \key Tab on
+ This is perhaps even more common than pressing \uicontrol Tab on
computers with a mouse or other pointing device.
- Clicking to move the focus is slightly more powerful than \key
+ Clicking to move the focus is slightly more powerful than \uicontrol
Tab. While it moves the focus \e to a widget, for editor widgets
it also moves the text cursor (the widget's internal focus) to
the spot where the mouse is clicked.
@@ -152,10 +152,10 @@
We advise supporting shortcut focus for all widgets that the user
may want to jump to. For example, a tab dialog can have keyboard
- shortcuts for each of its pages, so the user can press e.g. \key
+ shortcuts for each of its pages, so the user can press e.g. \uicontrol
Alt+P to step to the \underline{P}rinting page. It is easy to
overdo this: there are only a few keys, and it's also important
- to provide keyboard shortcuts for commands. \key Alt+P is also
+ to provide keyboard shortcuts for commands. \uicontrol Alt+P is also
used for Paste, Play, Print, and Print Here in the \l{Standard
Accelerator Keys} list, for example.
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index 75835f0038..31d6d34517 100644
--- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -550,18 +550,18 @@
\l{Qt Designer}{Qt Designer} is an excellent tool
to preview style sheets. You can right-click on any widget in Designer
- and select \gui{Change styleSheet...} to set the style sheet.
+ and select \uicontrol{Change styleSheet...} to set the style sheet.
\image designer-stylesheet-options.png
In Qt 4.2 and later, \l{Qt Designer}{Qt Designer} also includes a
style sheet syntax highlighter and validator. The validator indicates
- if the syntax is valid or invalid, at the bottom left of the \gui{Edit
+ if the syntax is valid or invalid, at the bottom left of the \uicontrol{Edit
Style Sheet} dialog.
\image designer-validator-highlighter.png
- When you click \gui{OK} or \gui{Apply}, \QD will automatically display
+ When you click \uicontrol{OK} or \uicontrol{Apply}, \QD will automatically display
the widget with its new stylesheet.
\image designer-stylesheet-usage.png
diff --git a/src/widgets/doc/src/widgets-tutorial.qdoc b/src/widgets/doc/src/widgets-tutorial.qdoc
index 37f095d500..10eabd1368 100644
--- a/src/widgets/doc/src/widgets-tutorial.qdoc
+++ b/src/widgets/doc/src/widgets-tutorial.qdoc
@@ -106,13 +106,13 @@
\li From a command prompt, enter the directory containing the
example you have modified.
- \li Type \c qmake and press \key{Return}. If this doesn't work,
+ \li Type \c qmake and press \uicontrol{Return}. If this doesn't work,
make sure that the executable is on your path, or enter its
full location.
\li On Linux/Unix and Mac OS X, type \c make and press
- \key{Return}; on Windows with Visual Studio, type \c nmake and
- press \key{Return}.
+ \uicontrol{Return}; on Windows with Visual Studio, type \c nmake and
+ press \uicontrol{Return}.
\endlist