From a68577e7e07cce40cac142f6e2b386a76f3ecbd1 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 1 Aug 2012 14:36:13 +0200 Subject: replace \key and \gui qdoc commands with \uicontrol Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen --- doc/src/examples/addressbook.qdoc | 30 ++++++++-------- doc/src/examples/affine.qdoc | 6 ++-- doc/src/examples/application.qdoc | 14 ++++---- doc/src/examples/arrowpad.qdoc | 6 ++-- doc/src/examples/basicdrawing.qdoc | 36 +++++++++---------- doc/src/examples/basiclayouts.qdoc | 2 +- doc/src/examples/cachedtable.qdoc | 10 +++--- doc/src/examples/calculator.qdoc | 60 ++++++++++++++++---------------- doc/src/examples/calendarwidget.qdoc | 32 ++++++++--------- doc/src/examples/classwizard.qdoc | 10 +++--- doc/src/examples/customtypesending.qdoc | 2 +- doc/src/examples/dockwidgets.qdoc | 2 +- doc/src/examples/drilldown.qdoc | 16 ++++----- doc/src/examples/extension.qdoc | 22 ++++++------ doc/src/examples/fetchmore.qdoc | 2 +- doc/src/examples/findfiles.qdoc | 6 ++-- doc/src/examples/fortuneclient.qdoc | 4 +-- doc/src/examples/hellotr.qdoc | 8 ++--- doc/src/examples/icons.qdoc | 22 ++++++------ doc/src/examples/imageviewer.qdoc | 52 +++++++++++++-------------- doc/src/examples/licensewizard.qdoc | 12 +++---- doc/src/examples/lineedits.qdoc | 12 +++---- doc/src/examples/menus.qdoc | 16 ++++----- doc/src/examples/orderform.qdoc | 2 +- doc/src/examples/pixelator.qdoc | 6 ++-- doc/src/examples/plugandpaint.qdoc | 36 +++++++++---------- doc/src/examples/screenshot.qdoc | 20 +++++------ doc/src/examples/scribble.qdoc | 28 +++++++-------- doc/src/examples/shapedclock.qdoc | 4 +-- doc/src/examples/simplewidgetmapper.qdoc | 6 ++-- doc/src/examples/sliders.qdoc | 8 ++--- doc/src/examples/spinboxes.qdoc | 8 ++--- doc/src/examples/styles.qdoc | 10 +++--- doc/src/examples/tetrix.qdoc | 18 +++++----- doc/src/examples/transformations.qdoc | 2 +- doc/src/examples/trollprint.qdoc | 10 +++--- doc/src/examples/windowflags.qdoc | 6 ++-- 37 files changed, 273 insertions(+), 273 deletions(-) (limited to 'doc') diff --git a/doc/src/examples/addressbook.qdoc b/doc/src/examples/addressbook.qdoc index 51712d49d3..9b4ede5775 100644 --- a/doc/src/examples/addressbook.qdoc +++ b/doc/src/examples/addressbook.qdoc @@ -46,7 +46,7 @@ The address book contains 5 classes: \c MainWindow, \c AddressWidget, \c TableModel, \c NewAddressTab and \c AddDialog. The \c MainWindow class uses \c AddressWidget as - its central widget and provides \gui File and \gui Tools menus. + its central widget and provides \uicontrol File and \uicontrol Tools menus. \image addressbook-classes.png Diagram for Address Book Example @@ -223,8 +223,8 @@ \l{QItemSelectionModel::selectionChanged()}{selectionChanged} signal that is connected to \c{AddressWidget}'s \c selectionChanged() signal. This signal to signal connection - is necessary to enable the \gui{Edit Entry...} and - \gui{Remove Entry} actions in \c MainWindow's Tools menu. This + is necessary to enable the \uicontrol{Edit Entry...} and + \uicontrol{Remove Entry} actions in \c MainWindow's Tools menu. This connection is further explained in \c MainWindow's implementation. @@ -241,7 +241,7 @@ \c newAddressTab to insert data without having to popup a dialog. The first \c addEntry() function is a slot connected to the - \c MainWindow's \gui{Add Entry...} action. This function creates an + \c MainWindow's \uicontrol{Add Entry...} action. This function creates an \c AddDialog object and then calls the second \c addEntry() function to actually add the contact to \c table. @@ -359,8 +359,8 @@ \snippet itemviews/addressbook/adddialog.cpp 0 - To give the dialog the desired behavior, we connect the \gui OK - and \gui Cancel buttons to the dialog's \l{QDialog::}{accept()} and + To give the dialog the desired behavior, we connect the \uicontrol OK + and \uicontrol Cancel buttons to the dialog's \l{QDialog::}{accept()} and \l{QDialog::}{reject()} slots. Since the dialog only acts as a container for name and address information, we do not need to implement any other functions for it. @@ -379,9 +379,9 @@ \snippet itemviews/addressbook/mainwindow.h 0 The \c MainWindow class uses an \c AddressWidget as its central - widget and provides the File menu with \gui Open, \gui Close and - \gui Exit actions, as well as the \gui Tools menu with - \gui{Add Entry...}, \gui{Edit Entry...} and \gui{Remove Entry} + widget and provides the File menu with \uicontrol Open, \uicontrol Close and + \uicontrol Exit actions, as well as the \uicontrol Tools menu with + \uicontrol{Add Entry...}, \uicontrol{Edit Entry...} and \uicontrol{Remove Entry} actions. @@ -393,9 +393,9 @@ \snippet itemviews/addressbook/mainwindow.cpp 0 - The \c createMenus() function sets up the \gui File and - \gui Tools menus, connecting the actions to their respective slots. - Both the \gui{Edit Entry...} and \gui{Remove Entry} actions are + The \c createMenus() function sets up the \uicontrol File and + \uicontrol Tools menus, connecting the actions to their respective slots. + Both the \uicontrol{Edit Entry...} and \uicontrol{Remove Entry} actions are disabled by default as such actions cannot be carried out on an empty address book. They are only enabled when one or more contacts are added. @@ -413,18 +413,18 @@ the \l{QFileDialog::getOpenFileName()}{open file dialog}. The chosen file has to be a custom \c{.dat} file that contains address book contacts. This function is a slot connected to \c openAct in the - \gui File menu. + \uicontrol File menu. \snippet itemviews/addressbook/mainwindow.cpp 2 The \c saveFile() function allows the user to save a file with the \l{QFileDialog::getSaveFileName()}{save file dialog}. This function - is a slot connected to \c saveAct in the \gui File menu. + is a slot connected to \c saveAct in the \uicontrol File menu. \snippet itemviews/addressbook/mainwindow.cpp 3 The \c updateActions() function enables and disables - \gui{Edit Entry...} and \gui{Remove Entry} depending on the contents of + \uicontrol{Edit Entry...} and \uicontrol{Remove Entry} depending on the contents of the address book. If the address book is empty, these actions are disabled; otherwise, they are enabled. This function is a slot is connected to the \c AddressWidget's \c selectionChanged() diff --git a/doc/src/examples/affine.qdoc b/doc/src/examples/affine.qdoc index c01031190a..c69794d511 100644 --- a/doc/src/examples/affine.qdoc +++ b/doc/src/examples/affine.qdoc @@ -41,8 +41,8 @@ \list \li Dragging the red circle in the centre of each drawing moves it to a new position. \li Dragging the displaced red circle causes the current drawing to be rotated about the - central circle. Rotation can also be controlled with the \key Rotate slider. - \li Scaling is controlled with the \key Scale slider. - \li Each drawing can be sheared with the \key Shear slider. + central circle. Rotation can also be controlled with the \uicontrol Rotate slider. + \li Scaling is controlled with the \uicontrol Scale slider. + \li Each drawing can be sheared with the \uicontrol Shear slider. \endlist */ diff --git a/doc/src/examples/application.qdoc b/doc/src/examples/application.qdoc index 5c19f7f41e..9cfdc08134 100644 --- a/doc/src/examples/application.qdoc +++ b/doc/src/examples/application.qdoc @@ -152,7 +152,7 @@ \snippet examples/mainwindows/application/mainwindow.cpp 12 In \c saveAs(), we start by popping up a QFileDialog asking the - user to provide a name. If the user clicks \gui{Cancel}, the + user to provide a name. If the user clicks \uicontrol{Cancel}, the returned file name is empty, and we do nothing. \snippet examples/mainwindows/application/mainwindow.cpp 13 @@ -212,7 +212,7 @@ \snippet examples/mainwindows/application/mainwindow.cpp 23 \snippet examples/mainwindows/application/mainwindow.cpp 24 - The \gui{Edit|Cut} and \gui{Edit|Copy} actions must be available + The \uicontrol{Edit|Cut} and \uicontrol{Edit|Copy} actions must be available only when the QPlainTextEdit contains selected text. We disable them by default and connect the QPlainTextEdit::copyAvailable() signal to the QAction::setEnabled() slot, ensuring that the actions are @@ -291,15 +291,15 @@ The \c maybeSave() function is called to save pending changes. If there are pending changes, it pops up a QMessageBox giving the user to save the document. The options are QMessageBox::Yes, - QMessageBox::No, and QMessageBox::Cancel. The \gui{Yes} button is + QMessageBox::No, and QMessageBox::Cancel. The \uicontrol{Yes} button is made the default button (the button that is invoked when the user - presses \key{Return}) using the QMessageBox::Default flag; the - \gui{Cancel} button is made the escape button (the button that is - invoked when the user presses \key{Esc}) using the + presses \uicontrol{Return}) using the QMessageBox::Default flag; the + \uicontrol{Cancel} button is made the escape button (the button that is + invoked when the user presses \uicontrol{Esc}) using the QMessageBox::Escape flag. The \c maybeSave() function returns \c true in all cases, except - when the user clicks \gui{Cancel}. The caller must check the + when the user clicks \uicontrol{Cancel}. The caller must check the return value and stop whatever it was doing if the return value is \c false. diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc index 79bf94c510..5708232f1f 100644 --- a/doc/src/examples/arrowpad.qdoc +++ b/doc/src/examples/arrowpad.qdoc @@ -113,7 +113,7 @@ languages. "Ctrl+Q" is a good choice for Quit in English, but a Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a German translator "Strg+E" (for Beenden). When using \c tr() for - \key Ctrl key accelerators, the two argument form should be used + \uicontrol Ctrl key accelerators, the two argument form should be used with the second argument describing the function that the accelerator performs. @@ -157,7 +157,7 @@ \endlist \endlist - It's quickest to press \key{Alt+D} (which clicks the \gui {Done \& Next} + It's quickest to press \uicontrol{Alt+D} (which clicks the \uicontrol {Done \& Next} button) after typing each translation, since this marks the translation as done and moves on to the next source text. @@ -183,7 +183,7 @@ files into QM files. We could use \e {Qt Linguist} as we've done before; however using the command line tool \c lrelease ensures that \e all the QM files for the application are created without us - having to remember to load and \gui File|Release each one + having to remember to load and \uicontrol File|Release each one individually from \e {Qt Linguist}. Type diff --git a/doc/src/examples/basicdrawing.qdoc b/doc/src/examples/basicdrawing.qdoc index 501b791bc1..1c4053f847 100644 --- a/doc/src/examples/basicdrawing.qdoc +++ b/doc/src/examples/basicdrawing.qdoc @@ -43,10 +43,10 @@ The example provides a render area, displaying the currently active shape, and lets the user manipulate the rendered shape and its appearance using the QPainter parameters: The user can change - the active shape (\gui Shape), and modify the QPainter's pen (\gui - {Pen Width}, \gui {Pen Style}, \gui {Pen Cap}, \gui {Pen Join}), - brush (\gui {Brush Style}) and render hints (\gui - Antialiasing). In addition the user can rotate a shape (\gui + the active shape (\uicontrol Shape), and modify the QPainter's pen (\uicontrol + {Pen Width}, \uicontrol {Pen Style}, \uicontrol {Pen Cap}, \uicontrol {Pen Join}), + brush (\uicontrol {Brush Style}) and render hints (\uicontrol + Antialiasing). In addition the user can rotate a shape (\uicontrol Transformations); behind the scenes we use QPainter's ability to manipulate the coordinate system to perform the rotation. @@ -86,7 +86,7 @@ \snippet examples/painting/basicdrawing/window.cpp 1 First we create the \c RenderArea widget that will render the - currently active shape. Then we create the \gui Shape combobox, + currently active shape. Then we create the \uicontrol Shape combobox, and add the associated items (i.e. the different shapes a QPainter can draw). @@ -101,7 +101,7 @@ the shape is drawn as smoothly as possible although perhaps not mathematically correct. - We create a QSpinBox for the \gui {Pen Width} parameter. + We create a QSpinBox for the \uicontrol {Pen Width} parameter. \snippet examples/painting/basicdrawing/window.cpp 3 @@ -112,8 +112,8 @@ two lines join when multiple connected lines are drawn. The cap and join only apply to lines with a width of 1 pixel or greater. - We create \l {QComboBox}es for each of the \gui {Pen Style}, \gui - {Pen Cap} and \gui {Pen Join} parameters, and adds the associated + We create \l {QComboBox}es for each of the \uicontrol {Pen Style}, \uicontrol + {Pen Cap} and \uicontrol {Pen Join} parameters, and adds the associated items (i.e the values of the Qt::PenStyle, Qt::PenCapStyle and Qt::PenJoinStyle enums respectively). @@ -124,7 +124,7 @@ the painter to not fill shapes. The standard style for filling is Qt::SolidPattern. - We create a QComboBox for the \gui {Brush Style} parameter, and add + We create a QComboBox for the \uicontrol {Brush Style} parameter, and add the associated items (i.e. the values of the Qt::BrushStyle enum). \snippet examples/painting/basicdrawing/window.cpp 5 @@ -136,11 +136,11 @@ flags to QPainter that may or may not be respected by any given engine. - We simply create a QCheckBox for the \gui Antialiasing option. + We simply create a QCheckBox for the \uicontrol Antialiasing option. \snippet examples/painting/basicdrawing/window.cpp 7 - The \gui Transformations option implies a manipulation of the + The \uicontrol Transformations option implies a manipulation of the coordinate system that will appear as if the rendered shape is rotated in three dimensions. @@ -289,7 +289,7 @@ \snippet examples/painting/basicdrawing/renderarea.cpp 0 - We set its shape to be a \gui Polygon, its antialiased property to + We set its shape to be a \uicontrol Polygon, its antialiased property to be false and we load an image into the widget's pixmap variable. In the end we set the widget's background role, defining the brush from the widget's \l {QWidget::palette}{palette} that @@ -356,10 +356,10 @@ draw the various shapes. We create a vector of four \l {QPoint}s. We use this vector to - render the \gui Points, \gui Polyline and \gui Polygon + render the \uicontrol Points, \uicontrol Polyline and \uicontrol Polygon shapes. Then we create a QRect, defining a rectangle in the plane, which we use as the bounding rectangle for all the shapes excluding - the \gui Path and the \gui Pixmap. + the \uicontrol Path and the \uicontrol Pixmap. We also create a QPainterPath. The QPainterPath class provides a container for painting operations, enabling graphical shapes to be @@ -371,13 +371,13 @@ straight line and a Bezier curve. In addition we define a start angle and an arc length that we will - use when drawing the \gui Arc, \gui Chord and \gui Pie shapes. + use when drawing the \uicontrol Arc, \uicontrol Chord and \uicontrol Pie shapes. \snippet examples/painting/basicdrawing/renderarea.cpp 9 We create a QPainter for the \c RenderArea widget, and set the painters pen and brush according to the \c RenderArea's pen and - brush. If the \gui Antialiasing parameter option is checked, we + brush. If the \uicontrol Antialiasing parameter option is checked, we also set the painter's render hints. QPainter::Antialiasing indicates that the engine should antialias edges of primitives if possible. @@ -399,7 +399,7 @@ \snippet examples/painting/basicdrawing/renderarea.cpp 11 - If the \gui Transformations parameter option is checked, we do an + If the \uicontrol Transformations parameter option is checked, we do an additional translation of the coordinate system before we rotate the coordinate system 60 degrees clockwise using the QPainter::rotate() function and scale it down in size using the @@ -448,7 +448,7 @@ We could translate the coordinate system back using QPainter::translate() instead of saving the painter state. But since we in addition to translating the coordinate system (when - the \gui Transformation parameter option is checked) both rotate + the \uicontrol Transformation parameter option is checked) both rotate and scale the coordinate system, the easiest solution is to save the current painter state. */ diff --git a/doc/src/examples/basiclayouts.qdoc b/doc/src/examples/basiclayouts.qdoc index 8c5a36f326..37d9fcb70a 100644 --- a/doc/src/examples/basiclayouts.qdoc +++ b/doc/src/examples/basiclayouts.qdoc @@ -122,7 +122,7 @@ \snippet examples/layouts/basiclayouts/dialog.cpp 6 In the private \c createMenu() function we create a menu bar, and - add a pull-down \gui File menu containing an \gui Exit option. + add a pull-down \uicontrol File menu containing an \uicontrol Exit option. \snippet examples/layouts/basiclayouts/dialog.cpp 7 diff --git a/doc/src/examples/cachedtable.qdoc b/doc/src/examples/cachedtable.qdoc index c9945a0efb..e3c0e40f8f 100644 --- a/doc/src/examples/cachedtable.qdoc +++ b/doc/src/examples/cachedtable.qdoc @@ -146,16 +146,16 @@ {QDialogButtonBox}{addButton()} function, the button's role must be specified using the QDialogButtonBox::ButtonRole enum. Alternatively, QDialogButtonBox provides several standard - buttons (e.g. \gui OK, \gui Cancel, \gui Save) that you can + buttons (e.g. \uicontrol OK, \uicontrol Cancel, \uicontrol Save) that you can use. They exist as flags so you can OR them together in the constructor. \snippet examples/sql/cachedtable/tableeditor.cpp 3 - We connect the \gui Quit button to the table editor's \l - {QWidget::close()}{close()} slot, and the \gui Submit button to + We connect the \uicontrol Quit button to the table editor's \l + {QWidget::close()}{close()} slot, and the \uicontrol Submit button to our private \c submit() slot. The latter slot will take care of - the data transactions. Finally, we connect the \gui Revert button + the data transactions. Finally, we connect the \uicontrol Revert button to our model's \l {QSqlTableModel::revertAll()}{revertAll()} slot, reverting all pending changes (i.e., restoring the original data). @@ -167,7 +167,7 @@ \snippet examples/sql/cachedtable/tableeditor.cpp 5 - The \c submit() slot is called whenever the users hit the \gui + The \c submit() slot is called whenever the users hit the \uicontrol Submit button to save their changes. First, we begin a transaction on the database using the diff --git a/doc/src/examples/calculator.qdoc b/doc/src/examples/calculator.qdoc index 8eddfa8c4e..914b8c5299 100644 --- a/doc/src/examples/calculator.qdoc +++ b/doc/src/examples/calculator.qdoc @@ -57,12 +57,12 @@ reimplemented to handle mouse events on the calculator's display. Buttons are grouped in categories according to their behavior. - For example, all the digit buttons (labeled \gui 0 to \gui 9) + For example, all the digit buttons (labeled \uicontrol 0 to \uicontrol 9) append a digit to the current operand. For these, we connect multiple buttons to the same slot (e.g., \c digitClicked()). The - categories are digits, unary operators (\gui{Sqrt}, \gui{x\unicode{178}}, - \gui{1/x}), additive operators (\gui{+}, \gui{-}), and - multiplicative operators (\gui{\unicode{215}}, \gui{\unicode{247}}). The other buttons + categories are digits, unary operators (\uicontrol{Sqrt}, \uicontrol{x\unicode{178}}, + \uicontrol{1/x}), additive operators (\uicontrol{+}, \uicontrol{-}), and + multiplicative operators (\uicontrol{\unicode{215}}, \uicontrol{\unicode{247}}). The other buttons have their own slots. \snippet examples/widgets/calculator/calculator.h 1 @@ -72,7 +72,7 @@ widget construction. \c abortOperation() is called whenever a division by zero occurs or when a square root operation is applied to a negative number. \c calculate() applies a binary - operator (\gui{+}, \gui{-}, \gui{\unicode{215}}, or \gui{\unicode{247}}). + operator (\uicontrol{+}, \uicontrol{-}, \uicontrol{\unicode{215}}, or \uicontrol{\unicode{247}}). \snippet examples/widgets/calculator/calculator.h 3 \snippet examples/widgets/calculator/calculator.h 4 @@ -86,10 +86,10 @@ \list \li \c sumInMemory contains the value stored in the calculator's memory - (using \gui{MS}, \gui{M+}, or \gui{MC}). + (using \uicontrol{MS}, \uicontrol{M+}, or \uicontrol{MC}). \li \c sumSoFar stores the value accumulated so far. When the user - clicks \gui{=}, \c sumSoFar is recomputed and shown on the - display. \gui{Clear All} resets \c sumSoFar to zero. + clicks \uicontrol{=}, \c sumSoFar is recomputed and shown on the + display. \uicontrol{Clear All} resets \c sumSoFar to zero. \li \c factorSoFar stores a temporary value when doing multiplications and divisions. \li \c pendingAdditiveOperator stores the last additive operator @@ -101,9 +101,9 @@ \endlist Additive and multiplicative operators are treated differently - because they have different precedences. For example, \gui{1 + 2 \unicode{247} - 3} is interpreted as \gui{1 + (2 \unicode{247} 3)} because \gui{\unicode{247}} has higher - precedence than \gui{+}. + because they have different precedences. For example, \uicontrol{1 + 2 \unicode{247} + 3} is interpreted as \uicontrol{1 + (2 \unicode{247} 3)} because \uicontrol{\unicode{247}} has higher + precedence than \uicontrol{+}. The table below shows the evolution of the calculator state as the user enters a mathematical expression. @@ -111,17 +111,17 @@ \table \header \li User Input \li Display \li Sum so Far \li Add. Op. \li Factor so Far \li Mult. Op. \li Waiting for Operand? \row \li \li 0 \li 0 \li \li \li \li \c true - \row \li \gui{1} \li 1 \li 0 \li \li \li \li \c false - \row \li \gui{1 +} \li 1 \li 1 \li \gui{+} \li \li \li \c true - \row \li \gui{1 + 2} \li 2 \li 1 \li \gui{+} \li \li \li \c false - \row \li \gui{1 + 2 \unicode{247}} \li 2 \li 1 \li \gui{+} \li 2 \li \gui{\unicode{247}} \li \c true - \row \li \gui{1 + 2 \unicode{247} 3} \li 3 \li 1 \li \gui{+} \li 2 \li \gui{\unicode{247}} \li \c false - \row \li \gui{1 + 2 \unicode{247} 3 -} \li 1.66667 \li 1.66667 \li \gui{-} \li \li \li \c true - \row \li \gui{1 + 2 \unicode{247} 3 - 4} \li 4 \li 1.66667 \li \gui{-} \li \li \li \c false - \row \li \gui{1 + 2 \unicode{247} 3 - 4 =} \li -2.33333 \li 0 \li \li \li \li \c true + \row \li \uicontrol{1} \li 1 \li 0 \li \li \li \li \c false + \row \li \uicontrol{1 +} \li 1 \li 1 \li \uicontrol{+} \li \li \li \c true + \row \li \uicontrol{1 + 2} \li 2 \li 1 \li \uicontrol{+} \li \li \li \c false + \row \li \uicontrol{1 + 2 \unicode{247}} \li 2 \li 1 \li \uicontrol{+} \li 2 \li \uicontrol{\unicode{247}} \li \c true + \row \li \uicontrol{1 + 2 \unicode{247} 3} \li 3 \li 1 \li \uicontrol{+} \li 2 \li \uicontrol{\unicode{247}} \li \c false + \row \li \uicontrol{1 + 2 \unicode{247} 3 -} \li 1.66667 \li 1.66667 \li \uicontrol{-} \li \li \li \c true + \row \li \uicontrol{1 + 2 \unicode{247} 3 - 4} \li 4 \li 1.66667 \li \uicontrol{-} \li \li \li \c false + \row \li \uicontrol{1 + 2 \unicode{247} 3 - 4 =} \li -2.33333 \li 0 \li \li \li \li \c true \endtable - Unary operators, such as \gui Sqrt, require no special handling; + Unary operators, such as \uicontrol Sqrt, require no special handling; they can be applied immediately since the operand is already known when the operator button is clicked. @@ -190,7 +190,7 @@ the operator using QToolButton::text(). The slot needs to consider two situations in particular. If \c - display contains "0" and the user clicks the \gui{0} button, it + display contains "0" and the user clicks the \uicontrol{0} button, it would be silly to show "00". And if the calculator is in a state where it is waiting for a new operand, the new digit is the first digit of that new operand; in that case, @@ -207,8 +207,8 @@ extracted from the button's text and stored in \c clickedOperator. The operand is obtained from \c display. - Then we perform the operation. If \gui Sqrt is applied to a - negative number or \gui{1/x} to zero, we call \c + Then we perform the operation. If \uicontrol Sqrt is applied to a + negative number or \uicontrol{1/x} to zero, we call \c abortOperation(). If everything goes well, we display the result of the operation in the line edit and we set \c waitingForOperand to \c true. This ensures that if the user types a new digit, the @@ -219,7 +219,7 @@ \snippet examples/widgets/calculator/calculator.cpp 11 The \c additiveOperatorClicked() slot is called when the user - clicks the \gui{+} or \gui{-} button. + clicks the \uicontrol{+} or \uicontrol{-} button. Before we can actually do something about the clicked operator, we must handle any pending operations. We start with the @@ -229,15 +229,15 @@ \snippet examples/widgets/calculator/calculator.cpp 12 \snippet examples/widgets/calculator/calculator.cpp 13 - If \gui{\unicode{215}} or \gui{\unicode{247}} has been clicked earlier, without clicking - \gui{=} afterward, the current value in the display is the right - operand of the \gui{\unicode{215}} or \gui{\unicode{247}} operator and we can finally + If \uicontrol{\unicode{215}} or \uicontrol{\unicode{247}} has been clicked earlier, without clicking + \uicontrol{=} afterward, the current value in the display is the right + operand of the \uicontrol{\unicode{215}} or \uicontrol{\unicode{247}} operator and we can finally perform the operation and update the display. \snippet examples/widgets/calculator/calculator.cpp 14 \snippet examples/widgets/calculator/calculator.cpp 15 - If \gui{+} or \gui{-} has been clicked earlier, \c sumSoFar is + If \uicontrol{+} or \uicontrol{-} has been clicked earlier, \c sumSoFar is the left operand and the current value in the display is the right operand of the operator. If there is no pending additive operator, \c sumSoFar is simply set to be the text in the @@ -287,7 +287,7 @@ \snippet examples/widgets/calculator/calculator.cpp 28 The \c clear() slot resets the current operand to zero. It is - equivalent to clicking \gui Backspace enough times to erase the + equivalent to clicking \uicontrol Backspace enough times to erase the entire operand. \snippet examples/widgets/calculator/calculator.cpp 30 @@ -363,7 +363,7 @@ This ensures that with most fonts, the digit and operator buttons will be square, without truncating the text on the - \gui{Backspace}, \gui{Clear}, and \gui{Clear All} buttons. + \uicontrol{Backspace}, \uicontrol{Clear}, and \uicontrol{Clear All} buttons. The screenshot below shows how the \c Calculator widget would look like if we \e didn't set the horizontal size policy to diff --git a/doc/src/examples/calendarwidget.qdoc b/doc/src/examples/calendarwidget.qdoc index 0dd20b1491..45423cc2c6 100644 --- a/doc/src/examples/calendarwidget.qdoc +++ b/doc/src/examples/calendarwidget.qdoc @@ -118,7 +118,7 @@ \snippet examples/widgets/calendarwidget/window.cpp 9 - The \gui Preview group box contains only one widget: the + The \uicontrol Preview group box contains only one widget: the QCalendarWidget. We set it up, connect its \l{QCalendarWidget::}{currentPageChanged()} signal to our \c reformatCalendarPage() slot to make sure that every new page gets @@ -131,7 +131,7 @@ \snippet examples/widgets/calendarwidget/window.cpp 10 \dots - We start with the setup of the \gui{Week starts on} combobox. + We start with the setup of the \uicontrol{Week starts on} combobox. This combobox controls which day should be displayed as the first day of the week. @@ -159,8 +159,8 @@ \snippet examples/widgets/calendarwidget/window.cpp 13 - In this function, we create the \gui {Minimum Date}, \gui {Maximum Date}, - and \gui {Current Date} editor widgets, + In this function, we create the \uicontrol {Minimum Date}, \uicontrol {Maximum Date}, + and \uicontrol {Current Date} editor widgets, which control the calendar's minimum, maximum, and selected dates. The calendar's minimum and maximum dates have already been set in \c createPrivewGroupBox(); we can then set the widgets @@ -175,28 +175,28 @@ \l{QCalendarWidget::}{setSelectedDate()} slot. When the calendar's selected date changes, either as a result of a user action or programmatically, our \c selectedDateChanged() slot updates - the \gui {Current Date} editor. We also need to react when the user - changes the \gui{Minimum Date} and \gui{Maximum Date} editors. + the \uicontrol {Current Date} editor. We also need to react when the user + changes the \uicontrol{Minimum Date} and \uicontrol{Maximum Date} editors. Here is the \c createTextFormatsGroup() function: \snippet examples/widgets/calendarwidget/window.cpp 16 - We set up the \gui {Weekday Color} and \gui {Weekend Color} comboboxes + We set up the \uicontrol {Weekday Color} and \uicontrol {Weekend Color} comboboxes using \c createColorCombo(), which instantiates a QComboBox and populates it with colors ("Red", "Blue", etc.). \snippet examples/widgets/calendarwidget/window.cpp 17 - The \gui {Header Text Format} combobox lets the user change the + The \uicontrol {Header Text Format} combobox lets the user change the text format (bold, italic, or plain) used for horizontal and - vertical headers. The \gui {First Friday in blue} and \gui {May 1 + vertical headers. The \uicontrol {First Friday in blue} and \uicontrol {May 1 in red} check box affect the rendering of specific dates. \snippet examples/widgets/calendarwidget/window.cpp 18 We connect the check boxes and comboboxes to various private - slots. The \gui {First Friday in blue} and \gui {May 1 in red} + slots. The \uicontrol {First Friday in blue} and \uicontrol {May 1 in red} check boxes are both connected to \c reformatCalendarPage(), which is also called when the calendar switches month. @@ -216,12 +216,12 @@ standard colors. The second argument to QComboBox::addItem() is a QVariant storing user data (in this case, QColor objects). - This function was used to set up the \gui {Weekday Color} - and \gui {Weekend Color} comboboxes. + This function was used to set up the \uicontrol {Weekday Color} + and \uicontrol {Weekend Color} comboboxes. \snippet examples/widgets/calendarwidget/window.cpp 1 - When the user changes the \gui {Week starts on} combobox's + When the user changes the \uicontrol {Week starts on} combobox's value, \c firstDayChanged() is invoked with the index of the combobox's new value. We retrieve the custom data item associated with the new current item using @@ -233,13 +233,13 @@ \snippet examples/widgets/calendarwidget/window.cpp 2 - The \c selectedDateChanged() updates the \gui{Current Date} + The \c selectedDateChanged() updates the \uicontrol{Current Date} editor to reflect the current state of the QCalendarWidget. \snippet examples/widgets/calendarwidget/window.cpp 3 When the user changes the minimum date, we tell the - QCalenderWidget. We also update the \gui {Maximum Date} editor, + QCalenderWidget. We also update the \uicontrol {Maximum Date} editor, because if the new minimum date is later than the current maximum date, QCalendarWidget will automatically adapt its maximum date to avoid a contradicting state. @@ -270,7 +270,7 @@ The \c reformatHeaders() slot is called when the user changes the text format of - the headers. We compare the current text of the \gui {Header Text Format} + the headers. We compare the current text of the \uicontrol {Header Text Format} combobox to determine which format to apply. (An alternative would have been to store \l{QTextCharFormat} values alongside the combobox items.) diff --git a/doc/src/examples/classwizard.qdoc b/doc/src/examples/classwizard.qdoc index 8f84193f2e..eec9b6ac51 100644 --- a/doc/src/examples/classwizard.qdoc +++ b/doc/src/examples/classwizard.qdoc @@ -74,8 +74,8 @@ \li The fifth page is a conclusion page. \endlist - Although the program is just an example, if you press \gui Finish - (\gui Done on Mac OS X), actual C++ source files will actually be + Although the program is just an example, if you press \uicontrol Finish + (\uicontrol Done on Mac OS X), actual C++ source files will actually be generated. \section1 The ClassWizard Class @@ -85,7 +85,7 @@ \snippet examples/dialogs/classwizard/classwizard.h 0 The class reimplements QDialog's \l{QDialog::}{accept()} slot. - This slot is called when the user clicks \gui{Finish}. + This slot is called when the user clicks \uicontrol{Finish}. Here's the constructor: @@ -108,7 +108,7 @@ \snippet examples/dialogs/classwizard/classwizard.cpp 5 \snippet examples/dialogs/classwizard/classwizard.cpp 6 - If the user clicks \gui Finish, we extract the information from + If the user clicks \uicontrol Finish, we extract the information from the various pages using QWizard::field() and generate the files. The code is long and tedious (and has barely anything to do with noble art of designing wizards), so most of it is skipped here. @@ -157,7 +157,7 @@ layouts. The \c className field is created with an asterisk (\c *) next to its name. This makes it a \l{mandatory field}, that is, a field that must be filled before the user can press the - \gui Next button (\gui Continue on Mac OS X). The fields' values + \uicontrol Next button (\uicontrol Continue on Mac OS X). The fields' values can be accessed from any other page using QWizardPage::field(), or from the wizard code using QWizard::field(). diff --git a/doc/src/examples/customtypesending.qdoc b/doc/src/examples/customtypesending.qdoc index 39a1506c31..4b5119c118 100644 --- a/doc/src/examples/customtypesending.qdoc +++ b/doc/src/examples/customtypesending.qdoc @@ -105,7 +105,7 @@ concerned with the type, we can simplify the signatures of both the signal and slot when we make the connection. - When the user clicks on the \gui{Send message} button in either window, + When the user clicks on the \uicontrol{Send message} button in either window, the message shown will be emitted in a signal that the other window will receive and display. diff --git a/doc/src/examples/dockwidgets.qdoc b/doc/src/examples/dockwidgets.qdoc index 929aed0283..8c64c78ae4 100644 --- a/doc/src/examples/dockwidgets.qdoc +++ b/doc/src/examples/dockwidgets.qdoc @@ -155,7 +155,7 @@ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 5 - If the focus is in the QTextEdit, pressing \key Ctrl+Z undoes as + If the focus is in the QTextEdit, pressing \uicontrol Ctrl+Z undoes as expected. But for the user's convenience we provide an application-wide undo function that simply calls the QTextEdit's undo: this means that the user can undo regardless of where the diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc index 7f195d5261..f8086c193e 100644 --- a/doc/src/examples/drilldown.qdoc +++ b/doc/src/examples/drilldown.qdoc @@ -194,7 +194,7 @@ \snippet examples/sql/drilldown/informationwindow.cpp 6 - The \c revert() slot is triggered whenever the user hits the \gui + The \c revert() slot is triggered whenever the user hits the \uicontrol Revert button. Since we set the QDataWidgetMapper::ManualSubmit submit policy, @@ -207,7 +207,7 @@ \snippet examples/sql/drilldown/informationwindow.cpp 7 Likewise, the \c submit() slot is triggered whenever the users - decide to submit their changes by pressing the \gui Submit button. + decide to submit their changes by pressing the \uicontrol Submit button. We use QDataWidgetMapper's \l {QDataWidgetMapper::}{submit()} slot to submit all changes from the mapped widgets to the model, @@ -228,12 +228,12 @@ The \c createButtons() function is provided for convenience, i.e., to simplify the constructor. - We make the \gui Close button the default button, i.e., the button - that is pressed when the user presses \gui Enter, and connect its + We make the \uicontrol Close button the default button, i.e., the button + that is pressed when the user presses \uicontrol Enter, and connect its \l {QPushButton::}{clicked()} signal to the widget's \l {QWidget::}{close()} slot. As mentioned above closing the window - only hides the widget; it is not deleted. We also connect the \gui - Submit and \gui Revert buttons to the corresponding \c submit() + only hides the widget; it is not deleted. We also connect the \uicontrol + Submit and \uicontrol Revert buttons to the corresponding \c submit() and \c revert() slots. \snippet examples/sql/drilldown/informationwindow.cpp 9 @@ -247,8 +247,8 @@ automatically using the appropriate layout for the user's desktop environment. - Most buttons for a dialog follow certain roles. We give the \gui - Submit and \gui Revert buttons the \l + Most buttons for a dialog follow certain roles. We give the \uicontrol + Submit and \uicontrol Revert buttons the \l {QDialogButtonBox::ButtonRole}{reset} role, i.e., indicating that pressing the button resets the fields to the default values (in our case the information contained in the database). The \l diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc index 5a66fc668f..9e63b70e3f 100644 --- a/doc/src/examples/extension.qdoc +++ b/doc/src/examples/extension.qdoc @@ -38,13 +38,13 @@ The Extension application is a dialog that allows the user to perform a simple search as well as a more advanced search. - The simple search has two options: \gui {Match case} and \gui + The simple search has two options: \uicontrol {Match case} and \uicontrol {Search from start}. The advanced search options include the - possibilities to search for \gui {Whole words}, \gui {Search - backward} and \gui {Search selection}. Only the simple search is + possibilities to search for \uicontrol {Whole words}, \uicontrol {Search + backward} and \uicontrol {Search selection}. Only the simple search is visible when the application starts. The advanced search options are located in the application's extension part, and can be made - visible by pressing the \gui More button: + visible by pressing the \uicontrol More button: \image extension_more.png Screenshot of the Extension example @@ -65,8 +65,8 @@ widgets: We need a QLineEdit with an associated QLabel to let the user type a word to search for, we need several \l {QCheckBox}{QCheckBox}es to facilitate the search options, and we - need three \l {QPushButton}{QPushButton}s: the \gui Find button to - start a search and the \gui More button to enable an advanced search. + need three \l {QPushButton}{QPushButton}s: the \uicontrol Find button to + start a search and the \uicontrol More button to enable an advanced search. Finally, we need a QWidget representing the application's extension part. @@ -80,13 +80,13 @@ \snippet examples/dialogs/extension/finddialog.cpp 0 We give the options and buttons a shortcut key using the & - character. In the \gui {Find what} option's case, we also need to + character. In the \uicontrol {Find what} option's case, we also need to use the QLabel::setBuddy() function to make the shortcut key work as expected; then, when the user presses the shortcut key indicated by the label, the keyboard focus is transferred to the label's buddy widget, the QLineEdit. - We set the \gui Find button's default property to true, using the + We set the \uicontrol Find button's default property to true, using the QPushButton::setDefault() function. Then the push button will be pressed if the user presses the Enter (or Return) key. Note that a QDialog can only have one default button. @@ -99,7 +99,7 @@ \snippet examples/dialogs/extension/finddialog.cpp 3 - Now that the extension widget is created, we can connect the \gui + Now that the extension widget is created, we can connect the \uicontrol More button's \l{QAbstractButton::toggled()}{toggled()} signal to the extension widget's \l{QWidget::setVisible()}{setVisible()} slot. @@ -110,9 +110,9 @@ the status is true the widget is shown, otherwise the widget is hidden. - Since we made the \gui More button checkable when we created it, + Since we made the \uicontrol More button checkable when we created it, the connection makes sure that the extension widget is shown - depending on the state of \gui More button. + depending on the state of \uicontrol More button. We also put the check boxes associated with the advanced search options into a layout we install on the extension widget. diff --git a/doc/src/examples/fetchmore.qdoc b/doc/src/examples/fetchmore.qdoc index a9a07af7ce..cd07f3c7ab 100644 --- a/doc/src/examples/fetchmore.qdoc +++ b/doc/src/examples/fetchmore.qdoc @@ -34,7 +34,7 @@ \image fetchmore-example.png - The user of the example can enter a directory in the \gui + The user of the example can enter a directory in the \uicontrol Directory line edit. The contents of the directory will be listed in the list view below. diff --git a/doc/src/examples/findfiles.qdoc b/doc/src/examples/findfiles.qdoc index 0b561429ce..6654070d72 100644 --- a/doc/src/examples/findfiles.qdoc +++ b/doc/src/examples/findfiles.qdoc @@ -43,7 +43,7 @@ specified directory, matching a specified file name (using wild cards if appropriate) and containing a specified text. - The user is provided with a \gui Browse option, and the result of + The user is provided with a \uicontrol Browse option, and the result of the search is displayed in a table with the names of the files found and their sizes. In addition the application provides a total count of the files found. @@ -59,7 +59,7 @@ We need two private slots: The \c browse() slot is called whenever the user wants to browse for a directory to search in, and the \c find() slot is called whenever the user requests a search to be - performed by pressing the \gui Find button. + performed by pressing the \uicontrol Find button. In addition we declare several private functions: We use the \c findFiles() function to search for files matching the user's @@ -109,7 +109,7 @@ \snippet examples/dialogs/findfiles/window.cpp 3 The \c find() slot is called whenever the user requests a new - search by pressing the \gui Find button. + search by pressing the \uicontrol Find button. First we eliminate any previous search results by setting the table widgets row count to zero. Then we retrieve the diff --git a/doc/src/examples/fortuneclient.qdoc b/doc/src/examples/fortuneclient.qdoc index d997fc077e..3b43682899 100644 --- a/doc/src/examples/fortuneclient.qdoc +++ b/doc/src/examples/fortuneclient.qdoc @@ -90,13 +90,13 @@ \dots \snippet examples/network/fortuneclient/client.cpp 5 - Clicking the \gui{Get Fortune} button will invoke the \c + Clicking the \uicontrol{Get Fortune} button will invoke the \c requestNewFortune() slot: \snippet examples/network/fortuneclient/client.cpp 6 In this slot, we initialize \c blockSize to 0, preparing to read a new block - of data. Because we allow the user to click \gui{Get Fortune} before the + of data. Because we allow the user to click \uicontrol{Get Fortune} before the previous connection finished closing, we start off by aborting the previous connection by calling QTcpSocket::abort(). (On an unconnected socket, this function does nothing.) We then proceed to connecting to the diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc index 7b47ec7b2b..e9143cea61 100644 --- a/doc/src/examples/hellotr.qdoc +++ b/doc/src/examples/hellotr.qdoc @@ -145,10 +145,10 @@ You should now see the text "QPushButton" in the top left pane. Double-click it, then click on "Hello world!" and enter "Orbis, te - saluto!" in the \gui Translation pane (the middle right of the + saluto!" in the \uicontrol Translation pane (the middle right of the window). Don't forget the exclamation mark! - Click the \gui Done checkbox and choose \gui File|Save from the + Click the \uicontrol Done checkbox and choose \uicontrol File|Save from the menu bar. The TS file will no longer contain \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3 @@ -165,8 +165,8 @@ by using the command line program \c lrelease which will produce one QM file for each of the TS files listed in the project file. Generate \c hellotr_la.qm from \c hellotr_la.ts by choosing - \gui File|Release from \e {Qt Linguist}'s menu bar and pressing - \gui Save in the file save dialog that pops up. Now run the \c hellotr + \uicontrol File|Release from \e {Qt Linguist}'s menu bar and pressing + \uicontrol Save in the file save dialog that pops up. Now run the \c hellotr program again. This time the button will be labelled "Orbis, te saluto!". diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc index 9e7dda7c89..daabb1651c 100644 --- a/doc/src/examples/icons.qdoc +++ b/doc/src/examples/icons.qdoc @@ -99,23 +99,23 @@ dependent, but most of the styles have the same values: Only the Macintosh style differ by using 32 pixels, instead of 16 pixels, for toolbar buttons. You can navigate between the available styles - using the \gui View menu. + using the \uicontrol View menu. \image icons-view-menu.png Screenshot of the View menu - The \gui View menu also provide the option to make the application - guess the icon state and mode from an image's file name. The \gui + The \uicontrol View menu also provide the option to make the application + guess the icon state and mode from an image's file name. The \uicontrol File menu provide the options of adding an image and removing all images. These last options are also available through a context menu that appears if you press the right mouse button within the - table of image files. In addition, the \gui File menu provide an - \gui Exit option, and the \gui Help menu provide information about + table of image files. In addition, the \uicontrol File menu provide an + \uicontrol Exit option, and the \uicontrol Help menu provide information about the example and about Qt. \image icons_find_normal.png Screenshot of the Find Files The screenshot above shows the application with one image file - loaded. The \gui {Guess Image Mode/State} is enabled and the + loaded. The \uicontrol {Guess Image Mode/State} is enabled and the style is Plastique. When QIcon is provided with only one available pixmap, that @@ -127,7 +127,7 @@ The next screenshot shows the application with an additional file loaded, providing QIcon with two available pixmaps. Note that the - new image file's mode is set to disabled. When rendering the \gui + new image file's mode is set to disabled. When rendering the \uicontrol Disabled mode pixmaps, Qt will now use the new image. We can see the difference: The generated disabled pixmap in the first screenshot is slightly darker than the pixmap with the originally @@ -451,7 +451,7 @@ \snippet examples/widgets/icons/mainwindow.cpp 17 Then we create the second and third items in the row making the - default mode Normal and the default state Off. But if the \gui + default mode Normal and the default state Off. But if the \uicontrol {Guess Image Mode/State} option is checked, and the file name contains "_act", "_dis", or "_sel", the modes are changed to Active, Disabled, or Selected. And if the file name contains @@ -605,7 +605,7 @@ \snippet examples/widgets/icons/mainwindow.cpp 29 In the \c createMenu() function, we add the previously created - actions to the \gui File, \gui View and \gui Help menus. + actions to the \uicontrol File, \uicontrol View and \uicontrol Help menus. The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus. We put each menu in the @@ -621,7 +621,7 @@ meaning that the \l{QAction}s associated with the widget should appear in its context menu. - Then we add the \gui{Add Image} and \gui{Remove All Images} + Then we add the \uicontrol{Add Image} and \uicontrol{Remove All Images} actions to the table widget. They will then appear in the table widget's context menu. @@ -692,7 +692,7 @@ characters. If the first and second numbers of the spin box value differ (e.g., "16 x 24"), we use the first number. - When the user presses \key Enter, QSpinBox first calls + When the user presses \uicontrol Enter, QSpinBox first calls QSpinBox::valueFromText() to interpret the text typed by the user, then QSpinBox::textFromValue() to present it in a canonical format (e.g., "16 x 16"). diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc index 638c0c3fb4..554543e252 100644 --- a/doc/src/examples/imageviewer.qdoc +++ b/doc/src/examples/imageviewer.qdoc @@ -45,25 +45,25 @@ \image imageviewer-example.png Screenshot of the Image Viewer example With the Image Viewer application, the users can view an image of - their choice. The \gui File menu gives the user the possibility + their choice. The \uicontrol File menu gives the user the possibility to: \list - \li \gui{Open...} - Open an image file - \li \gui{Print...} - Print an image - \li \gui{Exit} - Exit the application + \li \uicontrol{Open...} - Open an image file + \li \uicontrol{Print...} - Print an image + \li \uicontrol{Exit} - Exit the application \endlist - Once an image is loaded, the \gui View menu allows the users to: + Once an image is loaded, the \uicontrol View menu allows the users to: \list - \li \gui{Zoom In} - Scale the image up by 25% - \li \gui{Zoom Out} - Scale the image down by 25% - \li \gui{Normal Size} - Show the image at its original size - \li \gui{Fit to Window} - Stretch the image to occupy the entire window + \li \uicontrol{Zoom In} - Scale the image up by 25% + \li \uicontrol{Zoom Out} - Scale the image down by 25% + \li \uicontrol{Normal Size} - Show the image at its original size + \li \uicontrol{Fit to Window} - Stretch the image to occupy the entire window \endlist - In addition the \gui Help menu provides the users with information + In addition the \uicontrol Help menu provides the users with information about the Image Viewer example in particular, and about Qt in general. @@ -78,7 +78,7 @@ We use \c createActions() and \c createMenus() when constructing the \c ImageViewer widget. We use the \c updateActions() function to update the menu entries when a new image is loaded, or when - the \gui {Fit to Window} option is toggled. The zoom slots use \c + the \uicontrol {Fit to Window} option is toggled. The zoom slots use \c scaleImage() to perform the zooming. In turn, \c scaleImage() uses \c adjustScrollBar() to preserve the focal point after scaling an image. @@ -91,7 +91,7 @@ We set \c {imageLabel}'s size policy to \l {QSizePolicy::Ignored}{ignored}, making the users able to scale - the image to whatever size they want when the \gui {Fit to Window} + the image to whatever size they want when the \uicontrol {Fit to Window} option is turned on. Otherwise, the default size polizy (\l {QSizePolicy::Preferred}{preferred}) will make scroll bars appear when the scroll area becomes smaller than the label's minimum size @@ -115,7 +115,7 @@ In the \c open() slot, we show a file dialog to the user. The easiest way to create a QFileDialog is to use the static convenience functions. QFileDialog::getOpenFileName() returns an - existing file selected by the user. If the user presses \gui + existing file selected by the user. If the user presses \uicontrol Cancel, QFileDialog returns an empty string. Unless the file name is a empty string, we check if the file's @@ -130,7 +130,7 @@ messages arranged along two axes: severity (question, information, warning and critical) and complexity (the number of necessary response buttons). In this particular example an - information message with an \gui OK button (the default) is + information message with an \uicontrol OK button (the default) is sufficient, since the message is part of a normal operation. \snippet examples/widgets/imageviewer/imageviewer.cpp 3 @@ -138,11 +138,11 @@ If the format is supported, we display the image in \c imageLabel by setting the label's \l {QLabel::pixmap}{pixmap}. Then we enable - the \gui Print and \gui {Fit to Window} menu entries and update - the rest of the view menu entries. The \gui Open and \gui Exit + the \uicontrol Print and \uicontrol {Fit to Window} menu entries and update + the rest of the view menu entries. The \uicontrol Open and \uicontrol Exit entries are enabled by default. - If the \gui {Fit to Window} option is turned off, the + If the \uicontrol {Fit to Window} option is turned off, the QScrollArea::widgetResizable property is \c false and it is our responsibility (not QScrollArea's) to give the QLabel a reasonable size based on its contents. We call @@ -164,7 +164,7 @@ In release mode, the macro simply disappear. The mode can be set in the application's \c .pro file. One way to do so is to add an - option to \gui qmake when building the application: + option to \uicontrol qmake when building the application: \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 2 @@ -192,8 +192,8 @@ We implement the zooming slots using the private \c scaleImage() function. We set the scaling factors to 1.25 and 0.8, - respectively. These factor values ensure that a \gui {Zoom In} - action and a \gui {Zoom Out} action will cancel each other (since + respectively. These factor values ensure that a \uicontrol {Zoom In} + action and a \uicontrol {Zoom Out} action will cancel each other (since 1.25 * 0.8 == 1), and in that way the normal image size can be restored using the zooming features. @@ -221,10 +221,10 @@ \snippet examples/widgets/imageviewer/imageviewer.cpp 14 The \c fitToWindow() slot is called each time the user toggled - the \gui {Fit to Window} option. If the slot is called to turn on + the \uicontrol {Fit to Window} option. If the slot is called to turn on the option, we tell the scroll area to resize its child widget with the QScrollArea::setWidgetResizable() function. Then we - disable the \gui {Zoom In}, \gui {Zoom Out} and \gui {Normal + disable the \uicontrol {Zoom In}, \uicontrol {Zoom Out} and \uicontrol {Normal Size} menu entries using the private \c updateActions() function. If the \l {QScrollArea::widgetResizable} property is set to \c @@ -240,7 +240,7 @@ label's minimum size hint. The screenshots below shows an image in its normal size, and the - same image with the \gui {Fit to window} option turned on. + same image with the \uicontrol {Fit to window} option turned on. Enlarging the window will stretch the image further, as shown in the third screenshot. @@ -279,7 +279,7 @@ \snippet examples/widgets/imageviewer/imageviewer.cpp 20 In the private \c createMenu() function, we add the previously - created actions to the \gui File, \gui View and \gui Help menus. + created actions to the \uicontrol File, \uicontrol View and \uicontrol Help menus. The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus. The QMenuBar class provides @@ -292,8 +292,8 @@ \snippet examples/widgets/imageviewer/imageviewer.cpp 22 The private \c updateActions() function enables or disables the - \gui {Zoom In}, \gui {Zoom Out} and \gui {Normal Size} menu - entries depending on whether the \gui {Fit to Window} option is + \uicontrol {Zoom In}, \uicontrol {Zoom Out} and \uicontrol {Normal Size} menu + entries depending on whether the \uicontrol {Fit to Window} option is turned on or off. \snippet examples/widgets/imageviewer/imageviewer.cpp 23 diff --git a/doc/src/examples/licensewizard.qdoc b/doc/src/examples/licensewizard.qdoc index 3a325100a7..f0ad723d50 100644 --- a/doc/src/examples/licensewizard.qdoc +++ b/doc/src/examples/licensewizard.qdoc @@ -98,7 +98,7 @@ \snippet examples/dialogs/licensewizard/licensewizard.cpp 5 \snippet examples/dialogs/licensewizard/licensewizard.cpp 6 - We configure the QWizard to show a \gui Help button, which is + We configure the QWizard to show a \uicontrol Help button, which is connected to our \c showHelp() slot. We also set the \l{QWizard::}{LogoPixmap} for all pages that have a header (i.e., \c EvaluatePage, \c RegisterPage, and \c DetailsPage). @@ -109,7 +109,7 @@ \snippet examples/dialogs/licensewizard/licensewizard.cpp 13 In \c showHelp(), we display help texts that are appropriate for - the current page. If the user clicks \gui Help twice for the same + the current page. If the user clicks \uicontrol Help twice for the same page, we say, "Sorry, I already gave what help I could. Maybe you should try asking a human?" @@ -136,7 +136,7 @@ \snippet examples/dialogs/licensewizard/licensewizard.cpp 19 The \c nextId() function returns the ID for \c EvaluatePage if - the \gui{Evaluate the product for 30 days} option is checked; + the \uicontrol{Evaluate the product for 30 days} option is checked; otherwise it returns the ID for \c RegisterPage. \section1 The EvaluatePage Class @@ -159,7 +159,7 @@ layouts. The fields are created with an asterisk (\c *) next to their name. This makes them \l{mandatory fields}, that is, fields that must be filled before the user can press the - \gui Next button (\gui Continue on Mac OS X). The fields' values + \uicontrol Next button (\uicontrol Continue on Mac OS X). The fields' values can be accessed from any other page using QWizardPage::field(). Resetting the page amounts to clearing the two text fields. @@ -201,13 +201,13 @@ \snippet examples/dialogs/licensewizard/licensewizard.cpp 28 - We want to display a \gui Print button in the wizard when the \c + We want to display a \uicontrol Print button in the wizard when the \c ConclusionPage is up. One way to accomplish this is to reimplement QWidget::setVisible(): \list \li If the page is shown, we set the \l{QWizard::}{CustomButton1} button's - text to \gui{\underline{P}rint}, we enable the \l{QWizard::}{HaveCustomButton1} + text to \uicontrol{\underline{P}rint}, we enable the \l{QWizard::}{HaveCustomButton1} option, and we connect the QWizard's \l{QWizard::}{customButtonClicked()} signal to our \c printButtonClicked() slot. \li If the page is hidden, we disable the \l{QWizard::}{HaveCustomButton1} diff --git a/doc/src/examples/lineedits.qdoc b/doc/src/examples/lineedits.qdoc index f30f4aee29..70d85cff69 100644 --- a/doc/src/examples/lineedits.qdoc +++ b/doc/src/examples/lineedits.qdoc @@ -115,7 +115,7 @@ The slots respond to signals emitted when the comboboxes are changed by the user. - When the combobox for the \gui{Echo} group box is changed, the \c echoChanged() + When the combobox for the \uicontrol{Echo} group box is changed, the \c echoChanged() slot is called: \snippet examples/widgets/lineedits/window.cpp 9 @@ -123,7 +123,7 @@ The slot updates the line edit in the same group box to use an echo mode that corresponds to the entry described in the combobox. - When the combobox for the \gui{Validator} group box is changed, the + When the combobox for the \uicontrol{Validator} group box is changed, the \c validatorChanged() slot is called: \snippet examples/widgets/lineedits/window.cpp 10 @@ -133,7 +133,7 @@ We clear the line edit in this case to ensure that the new validator is initially given valid input to work with. - When the combobox for the \gui{Alignment} group box is changed, the + When the combobox for the \uicontrol{Alignment} group box is changed, the \c alignmentChanged() slot is called: \snippet examples/widgets/lineedits/window.cpp 11 @@ -142,7 +142,7 @@ the description selected in the combobox. The \c inputMaskChanged() slot handles changes to the combobox in the - \gui{Input Mask} group box: + \uicontrol{Input Mask} group box: \snippet examples/widgets/lineedits/window.cpp 12 @@ -151,11 +151,11 @@ the mask is disabled if an empty string is used. The \c accessChanged() slot handles changes to the combobox in the - \gui{Access} group box: + \uicontrol{Access} group box: \snippet examples/widgets/lineedits/window.cpp 13 - Here, we simply associate the \gui{False} and \gui{True} entries in the combobox + Here, we simply associate the \uicontrol{False} and \uicontrol{True} entries in the combobox with \c false and \c true values to be passed to QLineEdit::setReadOnly(). This allows the user to enable and disable input to the line edit. */ diff --git a/doc/src/examples/menus.qdoc b/doc/src/examples/menus.qdoc index 9493602607..575a1f0219 100644 --- a/doc/src/examples/menus.qdoc +++ b/doc/src/examples/menus.qdoc @@ -91,8 +91,8 @@ into widgets. In some situations it is useful to group actions together, e.g., - we have a \gui {Left Align} action, a \gui {Right Align} action, a - \gui {Justify} action, and a \gui {Center} action, and we want + we have a \uicontrol {Left Align} action, a \uicontrol {Right Align} action, a + \uicontrol {Justify} action, and a \uicontrol {Center} action, and we want only one of these actions to be active at any one time. One simple way of achieving this is to group the actions together in an action group using the QActionGroup class. @@ -141,7 +141,7 @@ using the provided convenience functions. In the \c createActions() function, we first create a \c newAct - action. We make \gui Ctrl+N its shortcut using the + action. We make \uicontrol Ctrl+N its shortcut using the QAction::setShortcut() function, and we set its status tip using the QAction::setStatusTip() function (the status tip is displayed on all status bars provided by the action's top-level parent widget). We @@ -154,8 +154,8 @@ \snippet examples/mainwindows/menus/mainwindow.cpp 7 - Once we have created the \gui {Left Align}, \gui {Right Align}, - \gui {Justify}, and a \gui {Center} actions, we can also create + Once we have created the \uicontrol {Left Align}, \uicontrol {Right Align}, + \uicontrol {Justify}, and a \uicontrol {Center} actions, we can also create the previously mentioned action group. Each action is added to the group using QActionGroup's \l @@ -191,8 +191,8 @@ \snippet examples/mainwindows/menus/mainwindow.cpp 12 - Note the \gui Format menu. First of all, it is added as a submenu - to the \gui Edit Menu using QMenu's \l + Note the \uicontrol Format menu. First of all, it is added as a submenu + to the \uicontrol Edit Menu using QMenu's \l {QMenu::addMenu()}{addMenu()} function. Secondly, take a look at the alignment actions: In the \c createActions() function we added the \c leftAlignAct, \c rightAlignAct, \c justifyAct and \c centerAct @@ -208,7 +208,7 @@ ignores these events). Whenever we receive such an event, we create a menu containing the - \gui Cut, \gui Copy and \gui Paste actions. Context menus can be + \uicontrol Cut, \uicontrol Copy and \uicontrol Paste actions. Context menus can be executed either asynchronously using the \l {QMenu::}{popup()} function or synchronously using the \l {QMenu::}{exec()} function. In this example, we have chosen to show the menu using diff --git a/doc/src/examples/orderform.qdoc b/doc/src/examples/orderform.qdoc index 94e4914444..c9ef75640f 100644 --- a/doc/src/examples/orderform.qdoc +++ b/doc/src/examples/orderform.qdoc @@ -68,7 +68,7 @@ and their respective labels. The label for \c offersCheckBox is set and the \c setupItemsTable() function is invoked to setup and populate \c itemsTable. The QDialogButtonBox object, \c buttonBox, is instantiated - with \gui OK and \gui Cancel buttons. This \c buttonBox's \c accepted() and + with \uicontrol OK and \uicontrol Cancel buttons. This \c buttonBox's \c accepted() and \c rejected() signals are connected to the \c verify() and \c reject() slots in \c DetailsDialog. diff --git a/doc/src/examples/pixelator.qdoc b/doc/src/examples/pixelator.qdoc index 6dff9e1b87..35031a09d8 100644 --- a/doc/src/examples/pixelator.qdoc +++ b/doc/src/examples/pixelator.qdoc @@ -110,7 +110,7 @@ We return (1, 1) as the size hint for a header item. If we didn't, the headers would default to a larger size, preventing us from displaying really small items (which can be specified - using the \gui{Pixel size} combobox). + using the \uicontrol{Pixel size} combobox). \section1 PixelDelegate Class Definition @@ -221,7 +221,7 @@ We also set the minimum section size to 1 on the headers. If we didn't, the headers would default to a larger size, preventing us from displaying really small items (which can be specified - using the \gui{Pixel size} combobox). + using the \uicontrol{Pixel size} combobox). The custom delegate is constructed with the main window as its parent, so that it will be deleted correctly later, and we set it on the table view. @@ -251,5 +251,5 @@ \snippet examples/itemviews/pixelator/mainwindow.cpp 6 We explicitly resize the columns and rows to match the - \gui{Pixel size} combobox. + \uicontrol{Pixel size} combobox. */ diff --git a/doc/src/examples/plugandpaint.qdoc b/doc/src/examples/plugandpaint.qdoc index ee3f6fefe9..4b3e6df509 100644 --- a/doc/src/examples/plugandpaint.qdoc +++ b/doc/src/examples/plugandpaint.qdoc @@ -147,8 +147,8 @@ \snippet examples/tools/plugandpaint/mainwindow.cpp 4 The \c loadPlugins() function is called from the \c MainWindow - constructor to detect plugins and update the \gui{Brush}, - \gui{Shapes}, and \gui{Filters} menus. We start by handling static + constructor to detect plugins and update the \uicontrol{Brush}, + \uicontrol{Shapes}, and \uicontrol{Filters} menus. We start by handling static plugins (available through QPluginLoader::staticInstances()) To the application that uses the plugin, a Qt plugin is simply a @@ -183,8 +183,8 @@ \snippet examples/tools/plugandpaint/mainwindow.cpp 9 - At the end, we enable or disable the \gui{Brush}, \gui{Shapes}, - and \gui{Filters} menus based on whether they contain any items. + At the end, we enable or disable the \uicontrol{Brush}, \uicontrol{Shapes}, + and \uicontrol{Filters} menus based on whether they contain any items. \snippet examples/tools/plugandpaint/mainwindow.cpp 10 @@ -198,7 +198,7 @@ \snippet examples/tools/plugandpaint/mainwindow.cpp 3 The \c aboutPlugins() slot is called on startup and can be - invoked at any time through the \gui{About Plugins} action. It + invoked at any time through the \uicontrol{About Plugins} action. It pops up a \c PluginDialog, providing information about the loaded plugins. @@ -214,7 +214,7 @@ \snippet examples/tools/plugandpaint/mainwindow.cpp 0 The \c changeBrush() slot is invoked when the user chooses one of - the brushes from the \gui{Brush} menu. We start by finding out + the brushes from the \uicontrol{Brush} menu. We start by finding out which action invoked the slot using QObject::sender(). Then we get the \c BrushInterface out of the plugin (which we conveniently passed as the QAction's parent) and we call \c @@ -225,7 +225,7 @@ \snippet examples/tools/plugandpaint/mainwindow.cpp 1 The \c insertShape() is invoked when the use chooses one of the - shapes from the \gui{Shapes} menu. We retrieve the QAction that + shapes from the \uicontrol{Shapes} menu. We retrieve the QAction that invoked the slot, then the \c ShapeInterface associated with that QAction, and finally we call \c ShapeInterface::generateShape() to obtain a QPainterPath. @@ -359,8 +359,8 @@ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 0 The \c brushes() function returns a list of brushes provided by - this plugin. We provide three brushes: \gui{Pencil}, \gui{Air - Brush}, and \gui{Random Letters}. + this plugin. We provide three brushes: \uicontrol{Pencil}, \uicontrol{Air + Brush}, and \uicontrol{Random Letters}. \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 1 @@ -377,15 +377,15 @@ Then comes the brush-dependent part of the code: \list - \li If the brush is \gui{Pencil}, we just call + \li If the brush is \uicontrol{Pencil}, we just call QPainter::drawLine() with the current QPen. - \li If the brush is \gui{Air Brush}, we start by setting the + \li If the brush is \uicontrol{Air Brush}, we start by setting the painter's QBrush to Qt::Dense6Pattern to obtain a dotted pattern. Then we draw a circle filled with that QBrush several times, resulting in a thick line. - \li If the brush is \gui{Random Letters}, we draw a random letter + \li If the brush is \uicontrol{Random Letters}, we draw a random letter at the new cursor position. Most of the code is for setting the font to be bold and larger than the default font and for computing an appropriate bounding rect. @@ -403,8 +403,8 @@ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 5 - The plugin provides three shapes: \gui{Circle}, \gui{Star}, and - \gui{Text...}. The three dots after \gui{Text} are there because + The plugin provides three shapes: \uicontrol{Circle}, \uicontrol{Star}, and + \uicontrol{Text...}. The three dots after \uicontrol{Text} are there because the shape pops up a dialog asking for more information. We know that the shape names will end up in a menu, so we include the three dots in the shape name. @@ -416,15 +416,15 @@ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 6 The \c generateShape() creates a QPainterPath for the specified - shape. If the shape is \gui{Text}, we pop up a QInputDialog to + shape. If the shape is \uicontrol{Text}, we pop up a QInputDialog to let the user enter some text. \section1 Implementation of the Filter Interface \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 7 - The plugin provides three filters: \gui{Invert Pixels}, \gui{Swap - RGB}, and \gui{Grayscale}. + The plugin provides three filters: \uicontrol{Invert Pixels}, \uicontrol{Swap + RGB}, and \uicontrol{Grayscale}. \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 8 @@ -433,7 +433,7 @@ is to convert the image to a 32-bit RGB format, to ensure that the algorithms will work as expected. For example, QImage::invertPixels(), which is used to implement the - \gui{Invert Pixels} filter, gives counterintuitive results for + \uicontrol{Invert Pixels} filter, gives counterintuitive results for 8-bit images, because they invert the indices into the color table instead of inverting the color table's entries. diff --git a/doc/src/examples/screenshot.qdoc b/doc/src/examples/screenshot.qdoc index 7ee7ddb9c7..cf6e68b6df 100644 --- a/doc/src/examples/screenshot.qdoc +++ b/doc/src/examples/screenshot.qdoc @@ -67,7 +67,7 @@ \li The \c saveScreenshot() slot saves the last screenshot. \li The \c shootScreen() slot takes the screenshot. \li The \c updateCheckBox() slot enables or disables the - \gui {Hide This Window} option. + \uicontrol {Hide This Window} option. \endlist We also declare some private functions: We use the \c @@ -127,8 +127,8 @@ requests a new screenshot; but the slot only prepares a new screenshot. - First we see if the \gui {Hide This Window} option is checked, if - it is we hide the \c Screenshot widget. Then we disable the \gui + First we see if the \uicontrol {Hide This Window} option is checked, if + it is we hide the \c Screenshot widget. Then we disable the \uicontrol {New Screenshot} button, to make sure the user only can request one screenshot at a time. @@ -136,12 +136,12 @@ and single-shot timers. We set the timer to time out only once, using the static QTimer::singleShot() function. This function calls the private \c shootScreen() slot after the time interval - specified by the \gui {Screenshot Delay} option. It is \c + specified by the \uicontrol {Screenshot Delay} option. It is \c shootScreen() that actually performs the screenshot. \snippet examples/desktop/screenshot/screenshot.cpp 3 - The \c saveScreenshot() slot is called when the user push the \gui + The \c saveScreenshot() slot is called when the user push the \uicontrol Save button, and it presents a file dialog using the QFileDialog class. @@ -184,19 +184,19 @@ QWidget::winID(). We update the screenshot preview label using the private \c - updateScreenshotLabel() function. Then we enable the \gui {New + updateScreenshotLabel() function. Then we enable the \uicontrol {New Screenshot} button, and finally we make the \c Screenshot widget visible if it was hidden during the screenshot. \snippet examples/desktop/screenshot/screenshot.cpp 6 - The \gui {Hide This Window} option is enabled or disabled + The \uicontrol {Hide This Window} option is enabled or disabled depending on the delay of the screenshot. If there is no delay, the application window cannot be hidden and the option's checkbox is disabled. The \c updateCheckBox() slot is called whenever the user changes - the delay using the \gui {Screenshot Delay} option. + the delay using the \uicontrol {Screenshot Delay} option. \snippet examples/desktop/screenshot/screenshot.cpp 7 @@ -204,9 +204,9 @@ constructor. First we create a group box that will contain all of the options' - widgets. Then we create a QSpinBox and a QLabel for the \gui + widgets. Then we create a QSpinBox and a QLabel for the \uicontrol {Screenshot Delay} option, and connect the spinbox to the \c - updateCheckBox() slot. Finally, we create a QCheckBox for the \gui + updateCheckBox() slot. Finally, we create a QCheckBox for the \uicontrol {Hide This Window} option, add all the options' widgets to a QGridLayout and install the layout on the group box. diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc index 5d801bf9cc..4c4df891b2 100644 --- a/doc/src/examples/scribble.qdoc +++ b/doc/src/examples/scribble.qdoc @@ -45,11 +45,11 @@ \image scribble-example.png Screenshot of the Scribble example With the Scribble application the users can draw an image. The - \gui File menu gives the users the possibility to open and edit an + \uicontrol File menu gives the users the possibility to open and edit an existing image file, save an image and exit the application. While - drawing, the \gui Options menu allows the users to to choose the + drawing, the \uicontrol Options menu allows the users to to choose the pen color and pen width, as well as clear the screen. In addition - the \gui Help menu provides the users with information about the + the \uicontrol Help menu provides the users with information about the Scribble example in particular, and about Qt in general. The example consists of two classes: @@ -266,7 +266,7 @@ We use the boolean \c maybeSave() function to check if there are any unsaved changes. If there are unsaved changes, we give the user the opportunity to save these changes. The function returns - \c false if the user clicks \gui Cancel. We use the \c saveFile() + \c false if the user clicks \uicontrol Cancel. We use the \c saveFile() function to let the user save the image currently displayed in the scribble area. @@ -282,7 +282,7 @@ \snippet examples/widgets/scribble/mainwindow.cpp 2 Close events are sent to widgets that the users want to close, - usually by clicking \gui{File|Exit} or by clicking the \gui X + usually by clicking \uicontrol{File|Exit} or by clicking the \uicontrol X title bar button. By reimplementing the event handler, we can intercept attempts to close the application. @@ -291,7 +291,7 @@ maybeSave() function. If \c maybeSave() returns true, there are no modifications or the users successfully saved them, and we accept the event. The application can then terminate normally. If - \c maybeSave() returns false, the user clicked \gui Cancel, so we + \c maybeSave() returns false, the user clicked \uicontrol Cancel, so we "ignore" the event, leaving the application unaffected by it. \snippet examples/widgets/scribble/mainwindow.cpp 3 @@ -305,7 +305,7 @@ \snippet examples/widgets/scribble/mainwindow.cpp 5 \snippet examples/widgets/scribble/mainwindow.cpp 6 - The \c save() slot is called when the users choose the \gui {Save + The \c save() slot is called when the users choose the \uicontrol {Save As} menu entry, and then choose an entry from the format menu. The first thing we need to do is to find out which action sent the signal using QObject::sender(). This function returns the sender @@ -346,7 +346,7 @@ value by 1). The boolean \c ok variable will be set to \c true if the user - clicked \gui OK and to \c false if the user pressed \gui Cancel. + clicked \uicontrol OK and to \c false if the user pressed \uicontrol Cancel. \snippet examples/widgets/scribble/mainwindow.cpp 11 \snippet examples/widgets/scribble/mainwindow.cpp 12 @@ -359,7 +359,7 @@ In the \c createAction() function we create the actions representing the menu entries and connect them to the appropriate - slots. In particular we create the actions found in the \gui + slots. In particular we create the actions found in the \uicontrol {Save As} sub-menu. We use QImageWriter::supportedImageFormats() to get a list of the supported formats (as a QList). @@ -374,13 +374,13 @@ In the \c createMenu() function, we add the previously created format actions to the \c saveAsMenu. Then we add the rest of the - actions as well as the \c saveAsMenu sub-menu to the \gui File, - \gui Options and \gui Help menus. + actions as well as the \c saveAsMenu sub-menu to the \uicontrol File, + \uicontrol Options and \uicontrol Help menus. The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus. The QMenuBar class provides a horizontal menu bar with a list of pull-down \l{QMenu}s. At the - end we put the \gui File and \gui Options menus in the \c + end we put the \uicontrol File and \uicontrol Options menus in the \c {MainWindow}'s menu bar, which we retrieve using the QMainWindow::menuBar() function. @@ -401,11 +401,11 @@ If the user chooses to save, we call the private \c saveFile() function. For simplicitly, we use PNG as the file format; the - user can always press \gui Cancel and save the file using another + user can always press \uicontrol Cancel and save the file using another format. The \c maybeSave() function returns \c false if the user clicks - \gui Cancel; otherwise it returns \c true. + \uicontrol Cancel; otherwise it returns \c true. \snippet examples/widgets/scribble/mainwindow.cpp 19 \snippet examples/widgets/scribble/mainwindow.cpp 20 diff --git a/doc/src/examples/shapedclock.qdoc b/doc/src/examples/shapedclock.qdoc index 9301470c60..b83178b44d 100644 --- a/doc/src/examples/shapedclock.qdoc +++ b/doc/src/examples/shapedclock.qdoc @@ -40,8 +40,8 @@ allowing specially-shaped windows to be created. In this example, we use this feature to create a circular window containing an analog clock. - Since this example's window does not provide a \gui File menu or a close - button, we provide a context menu with an \gui Exit entry so that the example + Since this example's window does not provide a \uicontrol File menu or a close + button, we provide a context menu with an \uicontrol Exit entry so that the example can be closed. Click the right mouse button over the window to open this menu. \section1 ShapedClock Class Definition diff --git a/doc/src/examples/simplewidgetmapper.qdoc b/doc/src/examples/simplewidgetmapper.qdoc index 02d719ba81..2b24dbcecd 100644 --- a/doc/src/examples/simplewidgetmapper.qdoc +++ b/doc/src/examples/simplewidgetmapper.qdoc @@ -72,7 +72,7 @@ \snippet examples/itemviews/simplewidgetmapper/window.cpp Set up the mapper - We also connect the mapper to the \gui{Next} and \gui{Previous} buttons + We also connect the mapper to the \uicontrol{Next} and \uicontrol{Previous} buttons via its \l{QDataWidgetMapper::}{toNext()} and \l{QDataWidgetMapper::}{toPrevious()} slots. The mapper's \l{QDataWidgetMapper::}{currentIndexChanged()} signal is connected to the @@ -106,8 +106,8 @@ \snippet examples/itemviews/simplewidgetmapper/window.cpp Slot for updating the buttons - If the mapper is referring to the first row in the model, the \gui{Previous} - button is disabled. Similarly, the \gui{Next} button is disabled if the + If the mapper is referring to the first row in the model, the \uicontrol{Previous} + button is disabled. Similarly, the \uicontrol{Next} button is disabled if the mapper reaches the last row in the model. \section1 More Complex Mappings diff --git a/doc/src/examples/sliders.qdoc b/doc/src/examples/sliders.qdoc index 49d41a9d18..383efc6140 100644 --- a/doc/src/examples/sliders.qdoc +++ b/doc/src/examples/sliders.qdoc @@ -144,18 +144,18 @@ toward the slider's minimum. This can be useful if the \e appearance of a slider is inverted: Some users might expect the keys to still work the same way on the value, whereas others - might expect \key PageUp to mean "up" on the screen. + might expect \uicontrol PageUp to mean "up" on the screen. Note that for horizontal and vertical scroll bars, the key - bindings are inverted by default: \key PageDown increases the - current value, and \key PageUp decreases it. + bindings are inverted by default: \uicontrol PageDown increases the + current value, and \uicontrol PageUp decreases it. \snippet examples/widgets/sliders/window.cpp 5 \snippet examples/widgets/sliders/window.cpp 6 Then we create the spin boxes. QSpinBox allows the user to choose a value by clicking the up and down buttons or pressing the \key - Up and \key Down keys on the keyboard to modify the value + Up and \uicontrol Down keys on the keyboard to modify the value currently displayed. The user can also type in the value manually. The spin boxes control the minimum, maximum and current values for the QSlider, QScrollBar, and QDial widgets. diff --git a/doc/src/examples/spinboxes.qdoc b/doc/src/examples/spinboxes.qdoc index fb09b2616d..9bdc1e3aff 100644 --- a/doc/src/examples/spinboxes.qdoc +++ b/doc/src/examples/spinboxes.qdoc @@ -67,7 +67,7 @@ The first spin box shows the simplest way to use QSpinBox. It accepts values from -20 to 20, the current value can be increased or decreased by 1 with - either the arrow buttons or \key{Up} and \key{Down} keys, and the default + either the arrow buttons or \uicontrol{Up} and \uicontrol{Down} keys, and the default value is 0. The second spin box uses a larger step size and displays a suffix to @@ -77,8 +77,8 @@ This spin box also displays a \l{QAbstractSpinBox::specialValueText}{special value} instead of the minimum - value defined for it. This means that it will never show \gui{0%}, but will - display \gui{Automatic} when the minimum value is selected. + value defined for it. This means that it will never show \uicontrol{0%}, but will + display \uicontrol{Automatic} when the minimum value is selected. The third spin box shows how a prefix can be used: @@ -99,7 +99,7 @@ The first spin box is a QDateEdit widget that is able to accept dates within a given range specified using QDate values. The arrow buttons and - \key{Up} and \key{Down} keys can be used to increase and decrease the + \uicontrol{Up} and \uicontrol{Down} keys can be used to increase and decrease the values for year, month, and day when the cursor is in the relevant section. The second spin box is a QTimeEdit widget: diff --git a/doc/src/examples/styles.qdoc b/doc/src/examples/styles.qdoc index d1f5091a4b..0623b34eb4 100644 --- a/doc/src/examples/styles.qdoc +++ b/doc/src/examples/styles.qdoc @@ -405,7 +405,7 @@ \snippet examples/widgets/styles/widgetgallery.cpp 0 - We start by creating child widgets. The \gui Style combobox is + We start by creating child widgets. The \uicontrol Style combobox is initialized with all the styles known to QStyleFactory, in addition to \c NorwegianWood. The \c create...() functions are private functions that set up the various parts of the \c @@ -414,9 +414,9 @@ \snippet examples/widgets/styles/widgetgallery.cpp 1 \snippet examples/widgets/styles/widgetgallery.cpp 2 - We connect the \gui Style combobox to the \c changeStyle() - private slot, the \gui{Use style's standard palette} check box to - the \c changePalette() slot, and the \gui{Disable widgets} check + We connect the \uicontrol Style combobox to the \c changeStyle() + private slot, the \uicontrol{Use style's standard palette} check box to + the \c changePalette() slot, and the \uicontrol{Disable widgets} check box to the child widgets' \l{QWidget::setDisabled()}{setDisabled()} slot. @@ -435,7 +435,7 @@ \snippet examples/widgets/styles/widgetgallery.cpp 7 \snippet examples/widgets/styles/widgetgallery.cpp 8 - If the user turns the \gui{Use style's standard palette} on, the + If the user turns the \uicontrol{Use style's standard palette} on, the current style's \l{QStyle::standardPalette()}{standard palette} is used; otherwise, the system's default palette is honored. diff --git a/doc/src/examples/tetrix.qdoc b/doc/src/examples/tetrix.qdoc index fca5229ad8..1b9c3a661d 100644 --- a/doc/src/examples/tetrix.qdoc +++ b/doc/src/examples/tetrix.qdoc @@ -41,13 +41,13 @@ If more than one row is filled, the blocks on each row are removed, and the player earns extra points. - The \gui{Left} cursor key moves the current piece one space to the left, the - \gui{Right} cursor key moves it one space to the right, the \gui{Up} cursor - key rotates the piece counter-clockwise by 90 degrees, and the \gui{Down} + The \uicontrol{Left} cursor key moves the current piece one space to the left, the + \uicontrol{Right} cursor key moves it one space to the right, the \uicontrol{Up} cursor + key rotates the piece counter-clockwise by 90 degrees, and the \uicontrol{Down} cursor key rotates the piece clockwise by 90 degrees. - To avoid waiting for a piece to fall to the bottom of the board, press \gui{D} - to immediately move the piece down by one row, or press the \gui{Space} key to + To avoid waiting for a piece to fall to the bottom of the board, press \uicontrol{D} + to immediately move the piece down by one row, or press the \uicontrol{Space} key to drop it as close to the bottom of the board as possible. This example shows how a simple game can be created using only three classes: @@ -104,10 +104,10 @@ These buttons are configured so that they never receive the keyboard focus; we want the keyboard focus to remain with the \c TetrixBoard instance so that it receives all the keyboard events. Nonetheless, the buttons will still respond - to \key{Alt} key shortcuts. + to \uicontrol{Alt} key shortcuts. - We connect \l{QAbstractButton::}{clicked()} signals from the \gui{Start} - and \gui{Pause} buttons to the board, and from the \gui{Quit} button to the + We connect \l{QAbstractButton::}{clicked()} signals from the \uicontrol{Start} + and \uicontrol{Pause} buttons to the board, and from the \uicontrol{Quit} button to the application's \l{QApplication::}{quit()} slot. \snippet examples/widgets/tetrix/tetrixwindow.cpp 4 @@ -345,7 +345,7 @@ \c pieceDropped() function so that the player's score can be updated. The \c oneLineDown() function is used to move the current piece down by one row - (line), either when the user presses the \gui{D} key or when the piece is + (line), either when the user presses the \uicontrol{D} key or when the piece is scheduled to move: \snippet examples/widgets/tetrix/tetrixboard.cpp 21 diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc index 8bca26eb77..013ebc2e8c 100644 --- a/doc/src/examples/transformations.qdoc +++ b/doc/src/examples/transformations.qdoc @@ -287,7 +287,7 @@ Then we create the \c RenderArea widgets that will render their shapes with coordinate tranformations. By default the applied - operation is \gui {No Transformation}, i.e. the shapes are + operation is \uicontrol {No Transformation}, i.e. the shapes are rendered within the default coordinate system. We create and initialize the associated \l {QComboBox}es with items corresponding to the various transformation operations decribed by diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc index 63566bdc21..4035f3c561 100644 --- a/doc/src/examples/trollprint.qdoc +++ b/doc/src/examples/trollprint.qdoc @@ -147,7 +147,7 @@ are obsolete. This is because these texts appeared in \c tr() calls that have been replaced by new calls with two arguments. The second pair has "two-sided" as their comment, and the third pair has "colors" as their - comment. The comments are shown in the \gui {Source text and comments} + comment. The comments are shown in the \uicontrol {Source text and comments} area in \e {Qt Linguist}. Second, the translation text "Ativado" and "Desativado" have been @@ -184,7 +184,7 @@ dialogs. You could also add them to the example files, e.g. \c mainwindow.cpp and \c printpanel.cpp are appropriate files. Run \c lupdate and then start \e {Qt Linguist} and load in \c trollprint_pt.ts. - You should see the comments in the \gui {Source text and comments} area + You should see the comments in the \uicontrol {Source text and comments} area as you browse through the list of source texts. Sometimes, particularly with large programs, it can be difficult for @@ -241,7 +241,7 @@ Go over the translations in \c MainWindow and mark these as "done". Translate "\TROLL PRINT\" as "\TROLL IMPRIMIR\". - When you're translating "Two-sided", press the \gui {Guess Again} + When you're translating "Two-sided", press the \uicontrol {Guess Again} button to translate "Two-sided", but change the "2" into "Dois". Save and quit, then run \c lrelease. The Portuguese version @@ -249,9 +249,9 @@ \image linguist-trollprint_11_pt.png - Choose \gui{Ajuda|Sobre} (\gui{Help|About}) to see the about box. + Choose \uicontrol{Ajuda|Sobre} (\uicontrol{Help|About}) to see the about box. - If you choose \gui {Ajuda|Sobre Qt} (\gui {Help|About Qt}), you'll get + If you choose \uicontrol {Ajuda|Sobre Qt} (\uicontrol {Help|About Qt}), you'll get an English dialog. Oops! Qt itself needs to be translated. See \l{Internationalization with Qt} for details. diff --git a/doc/src/examples/windowflags.qdoc b/doc/src/examples/windowflags.qdoc index 09dc45c27f..21b983d4e1 100644 --- a/doc/src/examples/windowflags.qdoc +++ b/doc/src/examples/windowflags.qdoc @@ -88,7 +88,7 @@ In the constructor we first create the preview window. Then we create the group boxes containing the available window flags using the private \c createTypeGroupBox() and \c createHintsGroupBox() - functions. In addition we create a \gui Quit button. We put the + functions. In addition we create a \uicontrol Quit button. We put the button and a stretchable space in a separate layout to make the button appear in the \c WindowFlag widget's right bottom corner. @@ -181,7 +181,7 @@ read-only text editor. It is also provided with a QPushbutton that closes the window. - We reimplement the constructor to create the \gui Close button and + We reimplement the constructor to create the \uicontrol Close button and the text editor, and the QWidget::setWindowFlags() function to display the names of the window flags. @@ -202,7 +202,7 @@ breaks were guaranteed, using another QTextEdit::LineWrapMode would perhaps make more sense. - Then we create the \gui Close button, and put both the widgets + Then we create the \uicontrol Close button, and put both the widgets into a QVBoxLayout before we set the window title. \snippet examples/widgets/windowflags/previewwindow.cpp 1 -- cgit v1.2.3