summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-07-17 14:47:49 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-07-17 14:47:49 (GMT)
commitc0a9fe18baec3c0ea1f37326ef5a7f527511c33c (patch)
tree5cf0aea1d402264536b58ad5ae69f9c42d0975fd /doc
parentbffc7a79c71ddebf4048242aa65173615d69030c (diff)
parent7febf8c3eb21e5681b71910fcd08b2933ba82464 (diff)
downloadQt-c0a9fe18baec3c0ea1f37326ef5a7f527511c33c.zip
Qt-c0a9fe18baec3c0ea1f37326ef5a7f527511c33c.tar.gz
Qt-c0a9fe18baec3c0ea1f37326ef5a7f527511c33c.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'doc')
-rw-r--r--doc/src/examples/completer.qdoc16
-rw-r--r--doc/src/qdesktopwidget.qdoc83
-rw-r--r--doc/src/snippets/statemachine/eventtest.cpp34
3 files changed, 95 insertions, 38 deletions
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc
index 9aaaf66..3805a7c 100644
--- a/doc/src/examples/completer.qdoc
+++ b/doc/src/examples/completer.qdoc
@@ -100,9 +100,9 @@
\section1 MainWindow Class Definition
- The \c MainWindow class is a subclass of QMainWindow and implements four
- private slots - \c about(), \c changeCase(), \c changeMode(), and
- \c changeModel().
+ The \c MainWindow class is a subclass of QMainWindow and implements five
+ private slots - \c about(), \c changeCase(), \c changeMode(), \c changeModel(),
+ and \c changeMaxVisible().
\snippet examples/tools/completer/mainwindow.h 0
@@ -126,6 +126,9 @@
\snippet examples/tools/completer/mainwindow.cpp 0
+ The \c maxVisibleSpinBox is created and determines the number of visible
+ item in the completer
+
The \c wrapCheckBox is then set up. This \c checkBox determines if the
\c{completer}'s \l{QCompleter::setWrapAround()}{setWrapAround()} property
is enabled or disabled.
@@ -242,10 +245,15 @@
\snippet examples/tools/completer/mainwindow.cpp 14
- The \c about() function provides a brief description about the example.
+ The \c changeMaxVisible() update the maximum number of visible items in
+ the completer.
\snippet examples/tools/completer/mainwindow.cpp 15
+ The \c about() function provides a brief description about the example.
+
+ \snippet examples/tools/completer/mainwindow.cpp 16
+
\section1 \c main() Function
The \c main() function instantiates QApplication and \c MainWindow and
diff --git a/doc/src/qdesktopwidget.qdoc b/doc/src/qdesktopwidget.qdoc
index 1158904..383ccfc 100644
--- a/doc/src/qdesktopwidget.qdoc
+++ b/doc/src/qdesktopwidget.qdoc
@@ -54,9 +54,9 @@
Systems with more than one graphics card and monitor can manage the
physical screen space available either as multiple desktops, or as a
large virtual desktop, which usually has the size of the bounding
- rectangle of all the screens (see isVirtualDesktop()). For an
+ rectangle of all the screens (see virtualDesktop). For an
application, one of the available screens is the primary screen, i.e.
- the screen where the main widget resides (see primaryScreen()). All
+ the screen where the main widget resides (see primaryScreen). All
windows opened in the context of the application should be
constrained to the boundaries of the primary screen; for example,
it would be inconvenient if a dialog box popped up on a different
@@ -64,16 +64,16 @@
The QDesktopWidget provides information about the geometry of the
available screens with screenGeometry(). The number of screens
- available is returned by numScreens(). The screen number that a
- particular point or widget is located in is returned by
- screenNumber().
+ available is returned by screenCount, and the screenCountChanged
+ signal is emitted when screens are added or removed during runtime.
+ The screen number that a particular point or widget is located in
+ is returned by screenNumber().
Widgets provided by Qt use this class, for example, to place
tooltips, menus and dialog boxes according to the parent or
- application widget.
-
- Applications can use this class to save window positions, or to place
- child widgets on one screen.
+ application widget. Applications can use this class to save window
+ positions, or to place child widgets and dialogs on one particular
+ screen.
\img qdesktopwidget.png Managing Multiple Screens
@@ -115,30 +115,15 @@
*/
/*!
- \fn bool QDesktopWidget::isVirtualDesktop() const
-
- Returns true if the system manages the available screens in a
- virtual desktop; otherwise returns false.
-
- For virtual desktops, screen() will always return the same widget.
- The size of the virtual desktop is the size of this desktop
- widget.
-*/
-
-/*!
- \fn int QDesktopWidget::primaryScreen() const
-
- Returns the index of the primary screen.
-
- \sa numScreens()
-*/
-
-/*!
\fn int QDesktopWidget::numScreens() const
-
+
Returns the number of available screens.
+
+ \obsolete
+
+ This function is deprecated. Use screenCount instead.
- \sa primaryScreen()
+ \sa primaryScreen
*/
/*!
@@ -146,13 +131,12 @@
Returns a widget that represents the screen with index \a screen
(a value of -1 means the default screen).
-
If the system uses a virtual desktop, the returned widget will
have the geometry of the entire virtual desktop; i.e., bounding
every \a screen.
- \sa primaryScreen(), numScreens(), isVirtualDesktop()
+ \sa primaryScreen, screenCount, virtualDesktop
*/
/*!
@@ -216,7 +200,7 @@
Returns the index of the screen that contains the largest
part of \a widget, or -1 if the widget not on a screen.
- \sa primaryScreen()
+ \sa primaryScreen
*/
/*!
@@ -226,7 +210,7 @@
Returns the index of the screen that contains the \a point, or the
screen which is the shortest distance from the \a point.
- \sa primaryScreen()
+ \sa primaryScreen
*/
/*!
@@ -245,3 +229,34 @@
This signal is emitted when the work area available on \a screen changes.
*/
+
+/*!
+ \property QDesktopWidget::screenCount
+ \brief the number of screens currently available on the system.
+
+ \sa screenCountChanged()
+*/
+
+/*!
+ \property QDesktopWidget::primaryScreen
+ \brief the index of the screen that is configured to be the primary screen
+ on the system.
+*/
+
+/*!
+ \property QDesktopWidget::virtualDesktop
+
+ \brief if the system manages the available screens in a virtual desktop.
+
+ For virtual desktops, screen() will always return the same widget.
+ The size of the virtual desktop is the size of this desktop
+ widget.
+*/
+
+/*!
+ \fn void QDesktopWidget::screenCountChanged(int newCount)
+
+ This signal is emitted when the number of screens changes to \a newCount.
+
+ \sa screenCount
+*/
diff --git a/doc/src/snippets/statemachine/eventtest.cpp b/doc/src/snippets/statemachine/eventtest.cpp
new file mode 100644
index 0000000..e0f359a
--- /dev/null
+++ b/doc/src/snippets/statemachine/eventtest.cpp
@@ -0,0 +1,34 @@
+
+#include <QtGui>
+
+class MyTransition : public QAbstractTransition
+{
+ Q_OBJECT
+public:
+ MyTransition() {}
+
+protected:
+//![0]
+ bool eventTest(QEvent *event)
+ {
+ if (event->type() == QEvent::Wrapped) {
+ QEvent *wrappedEvent = static_cast<QWrappedEvent *>(event)->event();
+ if (wrappedEvent->type() == QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent *>(wrappedEvent);
+ // Do your event test
+ }
+ }
+ return false;
+ }
+//![0]
+
+ void onTransition(QEvent *event)
+ {
+
+ }
+};
+
+int main(int argv, char **args)
+{
+ return 0;
+}