summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gil <davidgiloliva@gmail.com>2012-10-15 18:34:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-21 16:36:50 +0100
commit23e44afe7a27a385f430fbae9ce4948a44b93bce (patch)
treec368d204976f5de17b598dee41997fcba7ae5a96
parent49f17c815399697769a47f88d3f31460abf32f6d (diff)
[Doc cleanup] Fix typos and style of QAbstractButton, QButtonGroup, QCheckBox and QRadioButton
Change-Id: Ie557f865f5bdec7241abced91bf10cee8feaf9d9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp32
-rw-r--r--src/widgets/widgets/qbuttongroup.cpp31
-rw-r--r--src/widgets/widgets/qcheckbox.cpp26
-rw-r--r--src/widgets/widgets/qradiobutton.cpp10
4 files changed, 49 insertions, 50 deletions
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index eba63045fe..8019fc4eb2 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -90,19 +90,19 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets();
The \uicontrol Alt+C shortcut is assigned to the button, i.e., when the
user presses \uicontrol Alt+C the button will call animateClick(). See
- the \l {QShortcut#mnemonic}{QShortcut} documentation for details
- (to display an actual ampersand, use '&&').
+ the \l {QShortcut#mnemonic}{QShortcut} documentation for details. To
+ display an actual ampersand, use '&&'.
You can also set a custom shortcut key using the setShortcut()
function. This is useful mostly for buttons that do not have any
- text, because they have no automatic shortcut.
+ text, and therefore can't have any automatic shortcut.
\snippet code/src_gui_widgets_qabstractbutton.cpp 1
- All of the buttons provided by Qt (QPushButton, QToolButton,
+ All the buttons provided by Qt (QPushButton, QToolButton,
QCheckBox, and QRadioButton) can display both \l text and \l{icon}{icons}.
- A button can be made the default button in a dialog are provided by
+ A button can be made the default button in a dialog by means of
QPushButton::setDefault() and QPushButton::setAutoDefault().
QAbstractButton provides most of the states used for buttons:
@@ -116,7 +116,7 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets();
\li isEnabled() indicates whether the button can be pressed by the
user. \note As opposed to other widgets, buttons derived from
- QAbstractButton accepts mouse and context menu events
+ QAbstractButton accept mouse and context menu events
when disabled.
\li setAutoRepeat() sets whether the button will auto-repeat if the
@@ -611,15 +611,15 @@ QAbstractButton::QAbstractButton(QAbstractButtonPrivate &dd, QWidget *parent)
\property QAbstractButton::text
\brief the text shown on the button
-If the button has no text, the text() function will return a an empty
+If the button has no text, the text() function will return an empty
string.
If the text contains an ampersand character ('&'), a shortcut is
automatically created for it. The character that follows the '&' will
be used as the shortcut key. Any previous shortcut will be
-overwritten, or cleared if no shortcut is defined by the text. See the
-\l {QShortcut#mnemonic}{QShortcut} documentation for details (to
-display an actual ampersand, use '&&').
+overwritten or cleared if no shortcut is defined by the text. See the
+\l {QShortcut#mnemonic}{QShortcut} documentation for details. To
+display an actual ampersand, use '&&'.
There is no default text.
*/
@@ -932,7 +932,7 @@ QButtonGroup *QAbstractButton::group() const
Performs an animated click: the button is pressed immediately, and
released \a msec milliseconds later (the default is 100 ms).
-Calling this function again before the button was released will reset
+Calling this function again before the button is released resets
the release timer.
All signals associated with a click are emitted as appropriate.
@@ -998,8 +998,8 @@ void QAbstractButton::toggle()
}
-/*! This virtual handler is called when setChecked() was called,
-unless it was called from within nextCheckState(). It allows
+/*! This virtual handler is called when setChecked() is used,
+unless it is called from within nextCheckState(). It allows
subclasses to reset their intermediate button states.
\sa nextCheckState()
@@ -1010,7 +1010,7 @@ void QAbstractButton::checkStateSet()
/*! This virtual handler is called when a button is clicked. The
default implementation calls setChecked(!isChecked()) if the button
-isCheckable(). It allows subclasses to implement intermediate button
+isCheckable(). It allows subclasses to implement intermediate button
states.
\sa checkStateSet()
@@ -1330,7 +1330,7 @@ void QAbstractButton::changeEvent(QEvent *e)
/*!
\fn void QAbstractButton::clicked(bool checked)
-This signal is emitted when the button is activated (i.e. pressed down
+This signal is emitted when the button is activated (i.e., pressed down
then released while the mouse cursor is inside the button), when the
shortcut key is typed, or when click() or animateClick() is called.
Notably, this signal is \e not emitted if you call setDown(),
@@ -1350,7 +1350,7 @@ This signal is emitted whenever a checkable button changes its state.
unchecked.
This may be the result of a user action, click() slot activation,
-or because setChecked() was called.
+or because setChecked() is called.
The states of buttons in exclusive button groups are updated before this
signal is emitted. This means that slots can act on either the "off"
diff --git a/src/widgets/widgets/qbuttongroup.cpp b/src/widgets/widgets/qbuttongroup.cpp
index 1f4b29c0f4..0d3707dcc9 100644
--- a/src/widgets/widgets/qbuttongroup.cpp
+++ b/src/widgets/widgets/qbuttongroup.cpp
@@ -56,21 +56,21 @@
each of the buttons in the group.
An \l {QButtonGroup::exclusive} {exclusive} button group switches
- off all checkable (toggle) buttons except the one that was
+ off all checkable (toggle) buttons except the one that has been
clicked. By default, a button group is exclusive. The buttons in a
- button group are usually checkable QPushButton's, \l{QCheckBox}es
+ button group are usually checkable \l{QPushButton}s, \l{QCheckBox}es
(normally for non-exclusive button groups), or \l{QRadioButton}s.
If you create an exclusive button group, you should ensure that
one of the buttons in the group is initially checked; otherwise,
the group will initially be in a state where no buttons are
checked.
- A button is added to the group with addButton(). It can be removed
- from the group with removeButton(). If the group is exclusive, the
- currently checked button is available as checkedButton(). If a
- button is clicked the buttonClicked() signal is emitted. For a
+ A button can be added to the group with addButton() and removed
+ with removeButton(). If the group is exclusive, the
+ currently checked button is available with checkedButton(). If a
+ button is clicked, the buttonClicked() signal is emitted; for a
checkable button in an exclusive group this means that the button
- was checked. The list of buttons in the group is returned by
+ has been checked. The list of buttons in the group is returned by
buttons().
In addition, QButtonGroup can map between integers and buttons.
@@ -103,7 +103,7 @@
\property QButtonGroup::exclusive
\brief whether the button group is exclusive
- If this property is true then only one button in the group can be checked
+ If this property is true, then only one button in the group can be checked
at any given time. The user can click on any button to check it, and that
button will replace the existing one as the checked button in the group.
@@ -119,9 +119,8 @@
This signal is emitted when the given \a button is clicked. A
button is clicked when it is first pressed and then released, when
- its shortcut key is typed, or programmatically when
- QAbstractButton::click() or QAbstractButton::animateClick() is
- called.
+ its shortcut key is typed, or when QAbstractButton::click()
+ or QAbstractButton::animateClick() is programmatically called.
\sa checkedButton(), QAbstractButton::clicked()
@@ -177,8 +176,8 @@
/*!
\fn void QButtonGroup::addButton(QAbstractButton *button, int id = -1);
- Adds the given \a button to the button group. If \a id is -1,
- an id will be assigned to the button by this QButtonGroup.
+ Adds the given \a button to the button group. If \a id is -1,
+ an id will be assigned to the button.
Automatically assigned ids are guaranteed to be negative,
starting with -2. If you are assigning your own ids, use
positive values to avoid conflicts.
@@ -197,7 +196,7 @@
/*!
\fn QList<QAbstractButton*> QButtonGroup::buttons() const
- Returns the list of this groups's buttons. This may be empty.
+ Returns the button group's list of buttons. This may be empty.
\sa addButton(), removeButton()
*/
@@ -223,8 +222,8 @@
\fn void QButtonGroup::setId(QAbstractButton *button, int id)
\since 4.1
- Sets the \a id for the specified \a button. Note that \a id can
- not be -1.
+ Sets the \a id for the specified \a button. Note that \a id cannot
+ be -1.
\sa id()
*/
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index bf6593d976..bbad976c4b 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -77,8 +77,8 @@ public:
A QCheckBox is an option button that can be switched on (checked) or off
(unchecked). Checkboxes are typically used to represent features in an
- application that can be enabled or disabled without affecting others, but
- different types of behavior can be implemented. For example, a
+ application that can be enabled or disabled without affecting others.
+ Different types of behavior can be implemented. For example, a
QButtonGroup can be used to group check buttons logically, allowing
exclusive checkboxes. However, QButtonGroup does not provide any visual
representation.
@@ -91,7 +91,7 @@ public:
\li \inlineimage checkboxes-non-exclusive.png
\endtable
- Whenever a checkbox is checked or cleared it emits the signal
+ Whenever a checkbox is checked or cleared, it emits the signal
stateChanged(). Connect to this signal if you want to trigger an action
each time the checkbox changes state. You can use isChecked() to query
whether or not a checkbox is checked.
@@ -109,9 +109,9 @@ public:
\snippet code/src_gui_widgets_qcheckbox.cpp 0
- In this example the shortcut is \e{Alt+A}. See the \l{QShortcut#mnemonic}
- {QShortcut} documentation for details (to display an actual ampersand,
- use '&&').
+ In this example, the shortcut is \e{Alt+A}. See the \l{QShortcut#mnemonic}
+ {QShortcut} documentation for details. To display an actual ampersand,
+ use '&&'.
Important inherited functions: text(), setText(), text(), pixmap(),
setPixmap(), accel(), setAccel(), isToggleButton(), setDown(), isDown(),
@@ -137,17 +137,17 @@ public:
/*!
\fn void QCheckBox::stateChanged(int state)
- This signal is emitted whenever the check box's state changes, i.e.
+ This signal is emitted whenever the checkbox's state changes, i.e.,
whenever the user checks or unchecks it.
- \a state contains the check box's new Qt::CheckState.
+ \a state contains the checkbox's new Qt::CheckState.
*/
/*!
\property QCheckBox::tristate
\brief whether the checkbox is a tri-state checkbox
- The default is false; i.e. the checkbox has only two states.
+ The default is false, i.e., the checkbox has only two states.
*/
void QCheckBoxPrivate::init()
@@ -237,8 +237,8 @@ bool QCheckBox::isTristate() const
/*!
- Returns the check box's check state. If you do not need tristate support,
- you can also use \l QAbstractButton::isChecked() which returns a boolean.
+ Returns the checkbox's check state. If you do not need tristate support,
+ you can also use \l QAbstractButton::isChecked(), which returns a boolean.
\sa setCheckState(), Qt::CheckState
*/
@@ -251,8 +251,8 @@ Qt::CheckState QCheckBox::checkState() const
}
/*!
- Sets the check box's check state to \a state. If you do not need tristate
- support, you can also use \l QAbstractButton::setChecked() which takes a
+ Sets the checkbox's check state to \a state. If you do not need tristate
+ support, you can also use \l QAbstractButton::setChecked(), which takes a
boolean.
\sa checkState(), Qt::CheckState
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index d4abd3389f..1bb9fa0957 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -84,7 +84,7 @@ void QRadioButtonPrivate::init()
A QRadioButton is an option button that can be switched on (checked) or
off (unchecked). Radio buttons typically present the user with a "one
- of many" choice. In a group of radio buttons only one radio button at
+ of many" choice. In a group of radio buttons, only one radio button at
a time can be checked; if the user selects another button, the
previously selected button is switched off.
@@ -94,7 +94,7 @@ void QRadioButtonPrivate::init()
you need multiple exclusive button groups for radio buttons that
belong to the same parent widget, put them into a QButtonGroup.
- Whenever a button is switched on or off it emits the toggled() signal.
+ Whenever a button is switched on or off, it emits the toggled() signal.
Connect to this signal if you want to trigger an action each time the
button changes state. Use isChecked() to see if a particular button is
selected.
@@ -108,8 +108,8 @@ void QRadioButtonPrivate::init()
\snippet code/src_gui_widgets_qradiobutton.cpp 0
In this example the shortcut is \e{Alt+c}. See the \l
- {QShortcut#mnemonic}{QShortcut} documentation for details (to
- display an actual ampersand, use '&&').
+ {QShortcut#mnemonic}{QShortcut} documentation for details. To
+ display an actual ampersand, use '&&'.
Important inherited members: text(), setText(), text(),
setDown(), isDown(), autoRepeat(), group(), setAutoRepeat(),
@@ -151,7 +151,7 @@ QRadioButton::~QRadioButton()
}
/*!
- Constructs a radio button with the given \a parent and a \a text string.
+ Constructs a radio button with the given \a parent and \a text string.
The \a parent argument is passed on to the QAbstractButton constructor.
*/