summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraavit <qt_aavit@ovi.com>2012-09-05 11:34:16 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-05 21:06:05 +0200
commitaba8de1bee8bbb9bc6b92e761a3dda0d829a211e (patch)
tree729812214c932c677de1d08000799828924c6da6 /src
parent49112c891bb84eee4083fdad4376cba60b0c7818 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp24
-rw-r--r--src/gui/kernel/qguiapplication.h4
-rw-r--r--src/gui/kernel/qinputmethod.cpp20
-rw-r--r--src/gui/kernel/qkeysequence.cpp12
-rw-r--r--src/gui/kernel/qsessionmanager.cpp2
-rw-r--r--src/gui/kernel/qstylehints.cpp82
-rw-r--r--src/gui/kernel/qwindow.cpp1
7 files changed, 132 insertions, 13 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 61d52ff28b..d48112e0a4 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -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();
@@ -644,6 +648,15 @@ QList<QScreen *> QGuiApplication::screens()
}
/*!
+ \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.
*/
QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
@@ -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()
{
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 1c0ce17f3f..ce9d06f939 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -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);
diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp
index ec2c3ed48c..5cb36f21c7 100644
--- a/src/gui/kernel/qinputmethod.cpp
+++ b/src/gui/kernel/qinputmethod.cpp
@@ -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()
*/
@@ -345,9 +346,20 @@ void QInputMethod::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)
{
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index e7534c787b..4e972d439e 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -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
diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp
index 92cf4ecbc5..b410feede8 100644
--- a/src/gui/kernel/qsessionmanager.cpp
+++ b/src/gui/kernel/qsessionmanager.cpp
@@ -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()
*/
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 3812a862ae..1c91864314 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -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();
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 2dc62d642d..8d8e92a4bb 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -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.