Doc: Missing documentation added and doc errors fixed.

Change-Id: I573bf9622e38b54f2cb8c32fd402d477a1deb5c2
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
This commit is contained in:
aavit 2012-09-05 11:34:16 +02:00 committed by Qt by Nokia
parent 49112c891b
commit aba8de1bee
7 changed files with 132 additions and 13 deletions

View File

@ -334,7 +334,11 @@ static inline void clearFontUnlocked()
\sa arguments()
*/
#ifdef Q_QDOC
QGuiApplication::QGuiApplication(int &argc, char **argv)
#else
QGuiApplication::QGuiApplication(int &argc, char **argv, int flags)
#endif
: QCoreApplication(*new QGuiApplicationPrivate(argc, argv, flags))
{
d_func()->init();
@ -643,6 +647,15 @@ QList<QScreen *> QGuiApplication::screens()
return QGuiApplicationPrivate::screen_list;
}
/*!
\fn void QGuiApplication::screenAdded(QScreen *screen)
This signal is emitted whenever a new screen \a screen has been added to the system.
\sa screens(), primaryScreen()
*/
/*!
Returns the top level window at the given position \a pos, if any.
*/
@ -2179,6 +2192,17 @@ bool QGuiApplication::quitOnLastWindowClosed()
}
/*!
\fn void QGuiApplication::lastWindowClosed()
This signal is emitted from exec() when the last visible
primary window (i.e. window with no parent) is closed.
By default, QGuiApplication quits after this signal is emitted. This feature
can be turned off by setting \l quitOnLastWindowClosed to false.
\sa QWindow::close(), QWindow::isTopLevel()
*/
void QGuiApplicationPrivate::emitLastWindowClosed()
{

View File

@ -80,7 +80,11 @@ class Q_GUI_EXPORT QGuiApplication : public QCoreApplication
Q_PROPERTY(bool quitOnLastWindowClosed READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed)
public:
#ifdef Q_QDOC
QGuiApplication(int &argc, char **argv);
#else
QGuiApplication(int &argc, char **argv, int = ApplicationFlags);
#endif
virtual ~QGuiApplication();
static void setApplicationDisplayName(const QString &name);

View File

@ -121,7 +121,7 @@ QTransform QInputMethod::inputItemTransform() const
}
/*!
Sets the transformation from input item coordinates to the window coordinates.
Sets the transformation from input item coordinates to window coordinates to be \a transform.
Item transform needs to be updated by the focused window like QQuickCanvas whenever
item is moved inside the scene.
*/
@ -230,7 +230,8 @@ bool QInputMethod::isVisible() const
/*!
Controls the keyboard visibility. Equivalent
to calling show() and hide() functions.
to calling show() (if \a visible is \c true)
or hide() (if \a visible is \c false).
\sa show(), hide()
*/
@ -344,10 +345,21 @@ void QInputMethod::commit()
ic->commit();
}
/*!
\enum QInputMethod::Action
Indicates the kind of action performed by the user.
\value Click A normal click/tap
\value ContextMenu A context menu click/tap (e.g. right-button or tap-and-hold)
\sa invokeAction()
*/
/*!
Called by the input item when the word currently being composed is tapped by
the user. Input methods often use this information to offer more word
suggestions to the user.
the user, as indicated by the action \a a and the given \a cursorPosition.
Input methods often use this information to offer more word suggestions to the user.
*/
void QInputMethod::invokeAction(Action a, int cursorPosition)
{

View File

@ -372,7 +372,6 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
\value PartialMatch The key sequences match partially, but are not
the same.
\value ExactMatch The key sequences are the same.
\omitvalue Identical
*/
/*!
@ -923,8 +922,9 @@ QKeySequence::QKeySequence()
}
/*!
Creates a key sequence from the \a key string. For example
"Ctrl+O" gives CTRL+'O'. The strings "Ctrl",
Creates a key sequence from the \a key string, based on \a format.
For example "Ctrl+O" gives CTRL+'O'. The strings "Ctrl",
"Shift", "Alt" and "Meta" are recognized, as well as their
translated equivalents in the "QShortcut" context (using
QObject::tr()).
@ -932,10 +932,8 @@ QKeySequence::QKeySequence()
Up to four key codes may be entered by separating them with
commas, e.g. "Alt+X,Ctrl+S,Q".
\a key should be in NativeText format.
This constructor is typically used with \l{QObject::tr()}{tr}(), so that shortcut keys can be replaced in
translations:
This constructor is typically used with \l{QObject::tr()}{tr}(), so
that shortcut keys can be replaced in translations:
\snippet code/src_gui_kernel_qkeysequence.cpp 2

View File

@ -327,7 +327,7 @@ QStringList QSessionManager::restartCommand() const
}
/*!
Sets the discard command to the given \a list.
Sets the discard command to the given \a command.
\sa discardCommand(), setRestartCommand()
*/

View File

@ -67,63 +67,143 @@ static inline QVariant themeableHint(QPlatformTheme::ThemeHint th,
\since 5.0
\brief The QStyleHints class contains platform specific hints and settings.
\inmodule QtGui
An object of this class, obtained from QGuiApplication, provides access to certain global
user interface parameters of the current platform.
Access is read only; typically the platform itself provides the user a way to tune these
parameters.
Access to these parameters are useful when implementing custom user interface components, in that
they allow the components to exhibit the same behaviour and feel as other components.
\sa QGuiApplication::styleHints(), QPlatformTheme
*/
QStyleHints::QStyleHints()
: QObject()
{
}
/*!
Returns the time limit in milliseconds that distinguishes a double click
from two consecutive mouse clicks.
*/
int QStyleHints::mouseDoubleClickInterval() const
{
return themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
}
/*!
Returns the distance, in pixels, that the mouse must be moved with a button
held down before a drag and drop operation will begin.
If you support drag and drop in your application, and want to start a drag
and drop operation after the user has moved the cursor a certain distance
with a button held down, you should use this property's value as the
minimum distance required.
For example, if the mouse position of the click is stored in \c startPos
and the current position (e.g. in the mouse move event) is \c currentPos,
you can find out if a drag should be started with code like this:
\snippet code/src_gui_kernel_qapplication.cpp 7
\sa startDragTime(), QPoint::manhattanLength(), {Drag and Drop}
*/
int QStyleHints::startDragDistance() const
{
return themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
}
/*!
Returns the time, in milliseconds, that a mouse button must be held down
before a drag and drop operation will begin.
If you support drag and drop in your application, and want to start a drag
and drop operation after the user has held down a mouse button for a
certain amount of time, you should use this property's value as the delay.
\sa startDragDistance(), {Drag and Drop}
*/
int QStyleHints::startDragTime() const
{
return themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
}
/*!
Returns the limit for the velocity, in pixels per second, that the mouse may
be moved, with a button held down, for a drag and drop operation to begin.
A value of 0 means there is no such limit.
\sa startDragDistance(), {Drag and Drop}
*/
int QStyleHints::startDragVelocity() const
{
return themeableHint(QPlatformTheme::StartDragVelocity, QPlatformIntegration::StartDragVelocity).toInt();
}
/*!
Returns the time limit, in milliseconds, that distinguishes a key press
from two consecutive key presses.
*/
int QStyleHints::keyboardInputInterval() const
{
return themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
}
/*!
Returns the rate, in events per second, in which additional repeated key
presses will automatically be generated if a key is being held down.
*/
int QStyleHints::keyboardAutoRepeatRate() const
{
return themeableHint(QPlatformTheme::KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardAutoRepeatRate).toInt();
}
/*!
Returns the text cursor's flash (blink) time in milliseconds.
The flash time is the time used to display, invert and restore the
caret display. Usually the text cursor is displayed for half the cursor
flash time, then hidden for the same amount of time.
*/
int QStyleHints::cursorFlashTime() const
{
return themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
}
/*!
Returns \c true if the platform defaults to windows being fullscreen,
otherwise \c false.
\sa QWindow::show()
*/
bool QStyleHints::showIsFullScreen() const
{
return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
}
/*!
Returns the time, in milliseconds, a typed letter is displayed unshrouded
in a text input field in password mode.
*/
int QStyleHints::passwordMaskDelay() const
{
return themeableHint(QPlatformTheme::PasswordMaskDelay, QPlatformIntegration::PasswordMaskDelay).toInt();
}
/*!
Returns the gamma value used in font smoothing.
*/
qreal QStyleHints::fontSmoothingGamma() const
{
return hint(QPlatformIntegration::FontSmoothingGamma).toReal();
}
/*!
Returns \c true if right-to-left writing direction is enabled,
otherwise \c false.
*/
bool QStyleHints::useRtlExtensions() const
{
return hint(QPlatformIntegration::UseRtlExtensions).toBool();

View File

@ -1489,6 +1489,7 @@ void QWindow::hideEvent(QHideEvent *ev)
/*!
Override this to handle any event (\a ev) sent to the window.
Return \c true if the event was recognized and processed.
Remember to call the base class version if you wish for mouse events,
key events, resize events, etc to be dispatched as usual.