diff options
Diffstat (limited to 'doc')
270 files changed, 8487 insertions, 3613 deletions
diff --git a/doc/doc.pri b/doc/doc.pri index a4c77fe..13d481f 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -2,13 +2,6 @@ # Qt documentation build ##################################################################### -win32 { - QT_WINCONFIG = release/ - !CONFIG(release, debug|release) { - QT_WINCONFIG = debug/ - } -} - DOCS_GENERATION_DEFINES = -Dopensourceedition GENERATOR = $$QT_BUILD_TREE/bin/qhelpgenerator @@ -21,9 +14,9 @@ win32:!win32-g++ { } $$unixstyle { - QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/tools/qdoc3/$${QT_WINCONFIG}qdoc3 $$DOCS_GENERATION_DEFINES + QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/tools/qdoc3/qdoc3 $$DOCS_GENERATION_DEFINES } else { - QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/tools/qdoc3/$${QT_WINCONFIG}qdoc3.exe $$DOCS_GENERATION_DEFINES + QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/tools/qdoc3/qdoc3.exe $$DOCS_GENERATION_DEFINES QDOC = $$replace(QDOC, "/", "\\") } macx { diff --git a/doc/src/animation.qdoc b/doc/src/animation.qdoc new file mode 100644 index 0000000..da9b401 --- /dev/null +++ b/doc/src/animation.qdoc @@ -0,0 +1,364 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page animation-overview.html + \title The Animation Framework + \ingroup architecture + \ingroup animation + \brief An overview of the Animation Framework + + \keyword Animation + + The animation framework is part of the Kinetic project, and aims + to provide an easy way for creating animated and smooth GUI's. By + animating Qt properties, the framework provides great freedom for + animating widgets and other \l{QObject}s. The framework can also + be used with the Graphics View framework. + + In this overview, we explain the basics of its architecture. We + also show examples of the most common techniques that the + framework allows for animating QObjects and graphics items. + + \tableofcontents + + \section1 The Animation Architecture + + We will in this section take a high-level look at the animation + framework's architecture and how it is used to animate Qt + properties. The following diagram shows the most important classes + in the animation framework. + + \image animations-architecture.png + + The animation framework foundation consists of the base class + QAbstractAnimation, and its two subclasses QVariantAnimation and + QAnimationGroup. QAbstractAnimation is the ancestor of all + animations. It represents basic properties that are common for all + animations in the framework; notably, the ability to start, stop, + and pause an animation. It is also receives the time change + notifications. + + The animation framework further provides the QPropertyAnimation + class, which inherits QVariantAnimation and performs animation of + a Qt property, which is part of Qt's \l{Meta-Object + System}{meta-object system}. The class performs an interpolation + over the property using an easing curve. So when you want to + animate a value, you can declare it as a property and make your + class a QObject. Note that this gives us great freedom in + animating already existing widgets and other \l{QObject}s. + + Complex animations can be constructed by building a tree structure + of \l{QAbstractAnimation}s. The tree is built by using + \l{QAnimationGroup}s, which function as containers for other + animations. Note also that the groups are subclasses of + QAbstractAnimation, so groups can themselves contain other groups. + + The animation framework can be used on its own, but is also + designed to be part of the state machine framework (See the + \l{The State Machine Framework}{state machine framework} for an + introduction to the Qt state machine). The state machine provides + a special state that can play an animation. A QState can also set + properties when the state is entered or exited, and this special + animation state will interpolate between these values when given a + QPropertyAnimation. We will look more closely at this later. + + Behind the scenes, the animations are controlled by a global + timer, which sends \l{QAbstractAnimation::updateCurrentTime()}{updates} to + all animations that are playing. + + For detailed descriptions of the classes' function and roles in + the framework, please look up their class descriptions. + + \section1 Animating Qt Properties + + As mentioned in the previous section, the QPropertyAnimation class + can interpolate over Qt properties. It is this class that should + be used for animation of values; in fact, its superclass, + QVariantAnimation, is an abstract class, and cannot be used + directly. + + A major reason we chose to animate Qt properties is that it + presents us with freedom to animate already existing classes in + the Qt API. Notably, the QWidget class (which we can also embed in + a QGraphicsView) has properties for its bounds, colors, etc. + Let's look at a small example: + + \code + QPushButton button("Animated Button"); + button.show(); + + QPropertyAnimation animation(&button, "geometry"); + animation.setDuration(10000); + animation.setStartValue(QRect(0, 0, 100, 30)); + animation.setEndValue(QRect(250, 250, 100, 30)); + + animation.start(); + \endcode + + This code will move \c button from the top left corner of the + screen to the position (250, 250) in 10 seconds (10000 milliseconds). + + The example above will do a linear interpolation between the + start and end value. It is also possible to set values + situated between the start and end value. The interpolation + will then go by these points. + + \code + QPushButton button("Animated Button"); + button.show(); + + QPropertyAnimation animation(&button, "geometry"); + animation.setDuration(10000); + + animation.setKeyValueAt(0, QRect(0, 0, 100, 30)); + animation.setKeyValueAt(0.8, QRect(250, 250, 100, 30)); + animation.setKeyValueAt(1, QRect(0, 0, 100, 30)); + + animation.start(); + \endcode + + In this example, the animation will take the button to (250, 250) + in 8 seconds, and then move it back to its original position in + the remaining 2 seconds. The movement will be linearly + interpolated between these points. + + You also have the possibility to animate values of a QObject + that is not declared as a Qt property. The only requirement is + that this value has a setter. You can then subclass the class + containing the value and declare a property that uses this setter. + Note that each Qt property requires a getter, so you will need to + provide a getter yourself if this is not defined. + + \code + class MyGraphicsRectItem : public QObject, public QGraphicsRectItem + { + Q_OBJECT + Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry) + }; + \endcode + + In the above code example, we subclass QGraphicsRectItem and + define a geometry property. We can now animate the widgets + geometry even if QGraphicsRectItem does not provide the geometry + property. + + For a general introduction to the Qt property system, see its + \l{Qt's Property System}{overview}. + + \section1 Animations and the Graphics View Framework + + When you want to animate \l{QGraphicsItem}s, you also use + QPropertyAnimation. However, QGraphicsItem does not inherit QObject. + A good solution is to subclass the graphics item you wish to animate. + This class will then also inherit QObject. + This way, QPropertyAnimation can be used for \l{QGraphicsItem}s. + The example below shows how this is done. Another possibility is + to inherit QGraphicsWidget, which already is a QObject. + + \code + class Pixmap : public QObject, public QGraphicsPixmapItem + { + Q_OBJECT + Q_PROPERTY(QPointF pos READ pos WRITE setPos) + ... + \endcode + + As described in the previous section, we need to define + properties that we wish to animate. + + Note that QObject must be the first class inherited as the + meta-object system demands this. + + \section1 Easing Curves + + As mentioned, QPropertyAnimation performs an interpolation between + the start and end property value. In addition to adding more key + values to the animation, you can also use an easing curve. Easing + curves describe a function that controls how the speed of the + interpolation between 0 and 1 should be, and are useful if you + want to control the speed of an animation without changing the + path of the interpolation. + + \code + QPushButton button("Animated Button"); + button.show(); + + QPropertyAnimation animation(&button, "geometry"); + animation.setDuration(3000); + animation.setStartValue(QRect(0, 0, 100, 30)); + animation.setEndValue(QRect(250, 250, 100, 30)); + + animation.setEasingCurve(QEasingCurve::OutBounce); + + animation.start(); + \endcode + + Here the animation will follow a curve that makes it bounce like a + ball as if it was dropped from the start to the end position. + QEasingCurve has a large collection of curves for you to choose + from. These are defined by the QEasingCurve::Type enum. If you are + in need of another curve, you can also implement one yourself, and + register it with QEasingCurve. + + \omit Drop this for the first Lab release + (Example of custom easing curve (without the actual impl of + the function I expect) + \endomit + + \section1 Putting Animations Together + + An application will often contain more than one animation. For + instance, you might want to move more than one graphics item + simultaneously or move them in sequence after each other. + + The subclasses of QAnimationGroup (QSequentialAnimationGroup and + QParallelAnimationGroup) are containers for other animations so + that these animations can be animated either in sequence or + parallel. The QAnimationGroup is an example of an animation that + does not animate properties, but it gets notified of time changes + periodically. This enables it to forward those time changes to its + contained animations, and thereby controlling when its animations + are played. + + Let's look at code examples that use both + QSequentialAnimationGroup and QParallelAnimationGroup, starting + off with the latter. + + \code + QPushButton *bonnie = new QPushButton("Bonnie"); + bonnie->show(); + + QPushButton *clyde = new QPushButton("Clyde"); + clyde->show(); + + QPropertyAnimation *anim1 = new QPropertyAnimation(bonnie, "geometry"); + // Set up anim1 + + QPropertyAnimation *anim2 = new QPropertyAnimation(clyde, "geometry"); + // Set up anim2 + + QParallelAnimationGroup *group = new QParallelAnimationGroup; + group->addAnimation(anim1); + group->addAnimation(anim2); + + group->start(); + \endcode + + A parallel group plays more than one animation at the same time. + Calling its \l{QAbstractAnimation::}{start()} function will start + all animations it governs. + + \code + QPushButton button("Animated Button"); + button.show(); + + QPropertyAnimation anim1(&button, "geometry"); + anim1.setDuration(3000); + anim1.setStartValue(QRect(0, 0, 100, 30)); + anim1.setEndValue(QRect(500, 500, 100, 30)); + + QPropertyAnimation anim2(&button, "geometry"); + anim2.setDuration(3000); + anim2.setStartValue(QRect(500, 500, 100, 30)); + anim2.setEndValue(QRect(1000, 500, 100, 30)); + + QSequentialAnimationGroup group; + + group.addAnimation(&anim1); + group.addAnimation(&anim2); + + group.start(); + \endcode + + As you no doubt have guessed, QSequentialAnimationGroup plays + its animations in sequence. It starts the next animation in + the list after the previous is finished. + + Since an animation group is an animation itself, you can add + it to another group. This way, you can build a tree structure + of animations which specifies when the animations are played + in relation to each other. + + \section1 Animations and States + + When using a \l{The State Machine Framework}{state machine}, we + can associate one or more animations to a transition between states + using a QSignalTransition or QEventTransition class. These classes + are both derived from QAbstractTransition, which defines the + convenience function \l{QAbstractTransition::}{addAnimation()} that + enables the appending of one or more animations triggered when the + transition occurs. + + We also have the possibility to associate properties with the + states rather than setting the start and end values ourselves. + Below is a complete code example that animates the geometry of a + QPushButton. + + \code + QPushButton *button = new QPushButton("Animated Button"); + button->show(); + + QStateMachine *machine = new QStateMachine; + + QState *state1 = new QState(machine->rootState()); + state1->assignProperty(button, "geometry", QRect(0, 0, 100, 30)); + machine->setInitialState(state1); + + QState *state2 = new QState(machine->rootState()); + state2->assignProperty(button, "geometry", QRect(250, 250, 100, 30)); + + QSignalTransition *transition1 = state1->addTransition(button, + SIGNAL(clicked()), state2); + transition1->addAnimation(new QPropertyAnimation(button, "geometry")); + + QSignalTransition *transition2 = state2->addTransition(button, + SIGNAL(clicked()), state1); + transition2->addAnimation(new QPropertyAnimation(button, "geometry")); + + machine->start(); + \endcode + + For a more comprehensive example of how to use the state machine + framework for animations, see the states example (it lives in the + \c{examples/animation/states} directory). +*/ + diff --git a/doc/src/annotated.qdoc b/doc/src/annotated.qdoc deleted file mode 100644 index a817df6..0000000 --- a/doc/src/annotated.qdoc +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/**************************************************************************** -** -** Documentation for class overview. -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt GUI Toolkit. -** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE -** -****************************************************************************/ - -/*! - \page annotated.html - \title Annotated Class Index - \ingroup classlists - - Qt's classes with brief descriptions: - - \generatelist annotatedclasses -*/ diff --git a/doc/src/bughowto.qdoc b/doc/src/bughowto.qdoc index 927cb04..fae1180 100644 --- a/doc/src/bughowto.qdoc +++ b/doc/src/bughowto.qdoc @@ -52,7 +52,9 @@ Notes}, and the \l{Task Tracker} on the Qt website to see if the issue is already known. - Always include the following information in your bug report: + If you have found a new bug, please submit a bug report using + the \l{Bug Report Form}. Always include the following information + in your bug report: \list 1 \o The name and version number of your compiler @@ -66,6 +68,6 @@ such a program can be created with some minor changes to one of the many example programs in Qt's \c examples directory. - Please submit the bug report using the \l{Task Tracker} on the Qt - website. + If you have implemented a bug fix and want to contribute your fix + directly, then you can do so through the \l{Public Qt Repository}. */ diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index dddc96f..e955a5a 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -40,17 +40,31 @@ ****************************************************************************/ /*! + \group groups + \title Grouped Classes + \ingroup classlists + + This page provides a way of navigating Qt's classes by grouping + related classes together. Some classes may appear in more than one group. + + \generatelist{related} + +*/ + +/*! \page classes.html \title Qt's Classes \ingroup classlists - This is a list of all Qt classes excluding the \l{Qt 3 - compatibility classes}. For a shorter list that only includes the - most frequently used classes, see \l{Qt's Main Classes}. + This is a list of all Qt classes. For a shorter list of the most + frequently used Qt classes, see \l{Qt's Main Classes}. For a list + of the classes provided for compatibility with Qt3, see \l{Qt 3 + compatibility classes}. For classes that have been deprecated, see + the \l{Obsolete Classes} list. \generatelist classes - \sa {Qt 3 Compatibility Classes}, {Qt's Modules} + \sa {Qt 3 Compatibility Classes}, {Qt's Modules}, {Obsolete Classes} */ /*! @@ -63,3 +77,77 @@ \generatelist{namespaces} */ + +/*! + \page obsoleteclasses.html + \title Obsolete Classes + \ingroup classlists + + + This is a list of Qt classes that are obsolete (deprecated). These + classes are provided to keep old source code working but they are + no longer maintained. We strongly advise against using these + classes in new code. + + \generatelist obsoleteclasses + + \sa {Qt's Classes}, {Qt's Modules} +*/ + +/*! + \page annotated.html + \title Annotated Class Index + \ingroup classlists + + Qt's classes with brief descriptions: + + \generatelist annotatedclasses +*/ + +/*! + \page functions.html + \title Member Function Index + \ingroup classlists + + Here is the list of all the documented member functions in the Qt + API with links to the class documentation for each function. + + \generatelist functionindex +*/ + +/*! + \page hierarchy.html + + \title Class Inheritance Hierarchy + \ingroup classlists + + This list shows the C++ class inheritance relations between the + classes in the Qt API. + + \generatelist classhierarchy +*/ + +/*! + \page mainclasses.html + \title Qt's Main Classes + \ingroup classlists + + These are the most frequently used Qt classes. For the complete + list see \link classes.html Qt's Classes \endlink. + + \generatelist mainclasses +*/ + +/*! + \page compatclasses.html + \title Qt 3 Compatibility Classes + \ingroup classlists + + This is a list of the classes that Qt provides for compatibility + with Qt 3. The vast majority of these are provided by the + Qt3Support module. + + \generatelist compatclasses + + \sa {Qt's Classes}, {Qt's Modules} +*/ diff --git a/doc/src/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc index 66314de..09274bf 100644 --- a/doc/src/phonon-api.qdoc +++ b/doc/src/classes/phonon-api.qdoc @@ -60,7 +60,7 @@ through a function call, e.g., through \l{Phonon::MediaObject::}{play()}, you cannot be sure that the change has taken place before you receive the - \l{Phonon::MediaObject::}{stateChanged()} signal. + \l{Phonon::MediaObject::}{stateChanged()} signal. A media object can at any time change into any state, regardless of the state it previously had. \omit In the @@ -192,14 +192,14 @@ computer on the network. \value EffectType An audio effect (\l{Phonon::}{EffectDescription}). - \omitvalue SubtitleType - \omitvalue AudioCaptureDeviceType - \omitvalue AudioChannelType + \omitvalue SubtitleType + \omitvalue AudioCaptureDeviceType + \omitvalue AudioChannelType */ /*! \typedef Phonon::AudioOutputDevice - \relates Phonon::ObjectDescription + \relates Phonon::ObjectDescription This typedef of \l{Phonon::}{ObjectDescription} describes an audio output device, such as soundcards (with different drivers), sound servers, or other @@ -223,7 +223,7 @@ \fn Phonon::phononVersion() \inmodule Phonon \since 4.5 - + Returns the Phonon version. */ @@ -362,7 +362,7 @@ property() is called. Currently, Qt backends do not use properties for their object - descriptions. + descriptions. \sa property() */ @@ -370,7 +370,7 @@ /*! \fn inline bool Phonon::ObjectDescription::isValid() const - Returns true if the device or effect described exists. + Returns true if the device or effect described exists. An ObjectDescription that is invalid, will also have an index() of -1. @@ -1032,6 +1032,7 @@ \value Stream The MediaSource object describes a data stream. This is the type used for \l{QIODevice}s. Note that a stream opened with a QUrl, will still be of the Url type. + \value Empty The media source doesn't have a source. \sa MediaSource::type() */ @@ -1936,7 +1937,7 @@ \fn void Phonon::MediaObject::clearQueue() Clears the queue of media sources. - + \sa queue(), enqueue() */ @@ -2031,6 +2032,15 @@ */ /*! + \fn void Phonon::MediaObject::clear() + + Stops and removes all playing and enqueued media sources. + + \sa setCurrentSource() +*/ + + +/*! \fn void Phonon::MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate) This signal is emitted when the state of the MediaObject has changed. @@ -2091,7 +2101,7 @@ /*! \fn void Phonon::MediaObject::hasVideoChanged(bool hasVideo) - Emitted whenever the return value of hasVideo() changes, i.e., + Emitted whenever the return value of hasVideo() changes, i.e., the media source being played back contains video. Normally you'll check hasVideo() first and then let this signal @@ -3032,6 +3042,12 @@ */ /*! + \typedef Phonon::AudioOutputInterface + \inmodule Phonon + \internal +*/ + +/*! \class Phonon::AudioOutputInterface40 \inmodule Phonon \since 4.4 @@ -3256,7 +3272,19 @@ /*! \fn bool Phonon::Path::operator!=(const Path &p) const; - Returns true if this Path is not equal to \a p; otherwise returns false; + Returns true if this Path is not equal to \a p; otherwise returns false. +*/ + +/*! + \fn MediaNode *Phonon::Path::source() const; + + Returns the source MediaNode used by the path. +*/ + +/*! + \fn MediaNode *Phonon::Path::sink() const; + + Returns the sink MediaNode used by the path. */ /*! @@ -4087,15 +4115,13 @@ /*! \enum Phonon::VideoWidget::ScaleMode - + The ScaleMode enum describes how to treat aspect ratio during - resizing of video. + resizing of video. \value FitInView The video will be fitted to fill the view keeping aspect ratio. - \value ScaleAndCrop The video is scaled - - + \value ScaleAndCrop The video is scaled */ /*! @@ -4113,7 +4139,6 @@ top-level window. Key event forwarding is handled by VideoWidget, but if you need to handle other events, e.g., mouse events, you should handle fullscreen mode yourself. - */ /*! @@ -4560,7 +4585,7 @@ \class Phonon::AddonInterface \inmodule Phonon \since 4.4 - \internal + \internal \brief Interface for Menu, Chapter, Angle and Title/Track control. */ @@ -4883,7 +4908,7 @@ */ /*! - \typedef typedef void (*CleanUpFunction)() + \typedef Phonon::CleanUpFunction \inmodule Phonon \internal */ diff --git a/doc/src/q3asciicache.qdoc b/doc/src/classes/q3asciicache.qdoc index 43537cc..43537cc 100644 --- a/doc/src/q3asciicache.qdoc +++ b/doc/src/classes/q3asciicache.qdoc diff --git a/doc/src/q3asciidict.qdoc b/doc/src/classes/q3asciidict.qdoc index 9a51db1..9a51db1 100644 --- a/doc/src/q3asciidict.qdoc +++ b/doc/src/classes/q3asciidict.qdoc diff --git a/doc/src/q3cache.qdoc b/doc/src/classes/q3cache.qdoc index d8799b6..d8799b6 100644 --- a/doc/src/q3cache.qdoc +++ b/doc/src/classes/q3cache.qdoc diff --git a/doc/src/q3dict.qdoc b/doc/src/classes/q3dict.qdoc index 0e6d51d..0e6d51d 100644 --- a/doc/src/q3dict.qdoc +++ b/doc/src/classes/q3dict.qdoc diff --git a/doc/src/q3intcache.qdoc b/doc/src/classes/q3intcache.qdoc index dfff679..dfff679 100644 --- a/doc/src/q3intcache.qdoc +++ b/doc/src/classes/q3intcache.qdoc diff --git a/doc/src/q3intdict.qdoc b/doc/src/classes/q3intdict.qdoc index cef2e79..cef2e79 100644 --- a/doc/src/q3intdict.qdoc +++ b/doc/src/classes/q3intdict.qdoc diff --git a/doc/src/q3memarray.qdoc b/doc/src/classes/q3memarray.qdoc index b9c1f73..b9c1f73 100644 --- a/doc/src/q3memarray.qdoc +++ b/doc/src/classes/q3memarray.qdoc diff --git a/doc/src/q3popupmenu.qdoc b/doc/src/classes/q3popupmenu.qdoc index a2cfe08..a2cfe08 100644 --- a/doc/src/q3popupmenu.qdoc +++ b/doc/src/classes/q3popupmenu.qdoc diff --git a/doc/src/q3ptrdict.qdoc b/doc/src/classes/q3ptrdict.qdoc index 38ca0bb..38ca0bb 100644 --- a/doc/src/q3ptrdict.qdoc +++ b/doc/src/classes/q3ptrdict.qdoc diff --git a/doc/src/q3ptrlist.qdoc b/doc/src/classes/q3ptrlist.qdoc index 3000940..3000940 100644 --- a/doc/src/q3ptrlist.qdoc +++ b/doc/src/classes/q3ptrlist.qdoc diff --git a/doc/src/q3ptrqueue.qdoc b/doc/src/classes/q3ptrqueue.qdoc index b3af5f6..b3af5f6 100644 --- a/doc/src/q3ptrqueue.qdoc +++ b/doc/src/classes/q3ptrqueue.qdoc diff --git a/doc/src/q3ptrstack.qdoc b/doc/src/classes/q3ptrstack.qdoc index 1650d69..1650d69 100644 --- a/doc/src/q3ptrstack.qdoc +++ b/doc/src/classes/q3ptrstack.qdoc diff --git a/doc/src/q3ptrvector.qdoc b/doc/src/classes/q3ptrvector.qdoc index fa78de5..fa78de5 100644 --- a/doc/src/q3ptrvector.qdoc +++ b/doc/src/classes/q3ptrvector.qdoc diff --git a/doc/src/q3sqlfieldinfo.qdoc b/doc/src/classes/q3sqlfieldinfo.qdoc index ba064f3..ba064f3 100644 --- a/doc/src/q3sqlfieldinfo.qdoc +++ b/doc/src/classes/q3sqlfieldinfo.qdoc diff --git a/doc/src/q3sqlrecordinfo.qdoc b/doc/src/classes/q3sqlrecordinfo.qdoc index 64236d2..64236d2 100644 --- a/doc/src/q3sqlrecordinfo.qdoc +++ b/doc/src/classes/q3sqlrecordinfo.qdoc diff --git a/doc/src/q3valuelist.qdoc b/doc/src/classes/q3valuelist.qdoc index fd73763..fd73763 100644 --- a/doc/src/q3valuelist.qdoc +++ b/doc/src/classes/q3valuelist.qdoc diff --git a/doc/src/q3valuestack.qdoc b/doc/src/classes/q3valuestack.qdoc index e3ae677..e3ae677 100644 --- a/doc/src/q3valuestack.qdoc +++ b/doc/src/classes/q3valuestack.qdoc diff --git a/doc/src/q3valuevector.qdoc b/doc/src/classes/q3valuevector.qdoc index 353b7fa..353b7fa 100644 --- a/doc/src/q3valuevector.qdoc +++ b/doc/src/classes/q3valuevector.qdoc diff --git a/doc/src/qalgorithms.qdoc b/doc/src/classes/qalgorithms.qdoc index 7634322..7634322 100644 --- a/doc/src/qalgorithms.qdoc +++ b/doc/src/classes/qalgorithms.qdoc diff --git a/doc/src/qcache.qdoc b/doc/src/classes/qcache.qdoc index 6c88ede..6c88ede 100644 --- a/doc/src/qcache.qdoc +++ b/doc/src/classes/qcache.qdoc diff --git a/doc/src/qcolormap.qdoc b/doc/src/classes/qcolormap.qdoc index 95f7dc0..95f7dc0 100644 --- a/doc/src/qcolormap.qdoc +++ b/doc/src/classes/qcolormap.qdoc diff --git a/doc/src/qdesktopwidget.qdoc b/doc/src/classes/qdesktopwidget.qdoc index 1158904..56a882d 100644 --- a/doc/src/qdesktopwidget.qdoc +++ b/doc/src/classes/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,38 @@ 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. + + \since 4.6 + + \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) + + \since 4.6 + + This signal is emitted when the number of screens changes to \a newCount. + + \sa screenCount +*/ diff --git a/doc/src/qiterator.qdoc b/doc/src/classes/qiterator.qdoc index 416b4bc..416b4bc 100644 --- a/doc/src/qiterator.qdoc +++ b/doc/src/classes/qiterator.qdoc diff --git a/doc/src/qstyles.qdoc b/doc/src/classes/qmacstyle.qdoc index ae2d95b..ae2d95b 100644 --- a/doc/src/qstyles.qdoc +++ b/doc/src/classes/qmacstyle.qdoc diff --git a/doc/src/qnamespace.qdoc b/doc/src/classes/qnamespace.qdoc index 5858b4b..59e0a95 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/classes/qnamespace.qdoc @@ -41,6 +41,7 @@ /*! \namespace Qt + \inmodule QtCore \brief The Qt namespace contains miscellaneous identifiers used throughout the Qt library. @@ -129,13 +130,8 @@ Therefore, if it is important to minimize resource consumption, do not set this attribute. - \value AA_MSWindowsUseDirect3DByDefault Is a Windows specific - attribute, that will make the Direct3D paint engine the - default Qt widget paint engine. Note that you can toggle - usage of the Direct3D engine on individual QWidgets by - setting/clearing the \c WA_MSWindowsUseDirect3D attribute - on a specific widget. \bold {This functionality is - experimental}. + \value AA_MSWindowsUseDirect3DByDefault This value is obsolete and + has no effect. \value AA_DontShowIconsInMenus Actions with the Icon property won't be shown in any menus unless specifically set by the @@ -151,10 +147,24 @@ widgets stay non-native unless specifically set by the Qt::WA_NativeWindow attribute. - \value AA_MacPluginApplication Stops the a Qt mac application from doing + \value AA_MacPluginApplication Stops the Qt mac application from doing specific initializations that do not necessarily make sense when using Qt to author a plugin. This includes avoiding loading our nib for the main - menu and not taking possession of the native menu bar. + menu and not taking possession of the native menu bar. When setting this + attribute to true will also set the AA_DontUseNativeMenuBar attribute + to true. + + \value AA_DontUseNativeMenuBar All menubars created while this attribute is + set to true won't be used as a native menubar (e.g, the menubar at + the top of the main screen on Mac OS X or at the bottom in Windows CE). + + \value AA_MacDontSwapCtrlAndMeta On Mac OS X by default, Qt swaps the + Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt + sends Meta and whenever Meta is pressed Control is sent. When this + attribute is true, Qt will not do the flip. QKeySequence::StandardShortcuts + will also flip accordingly (i.e., QKeySequence::Copy will be + Command+C on the keyboard regardless of the value set, though what is output for + QKeySequence::toString(QKeySequence::PortableText) will be different). \omitvalue AA_AttributeCount */ @@ -519,6 +529,10 @@ Qt::DirectConnection; otherwise the signal is queued, as with Qt::QueuedConnection. + \value UniqueConnection Same as AutoConnection, but there will be a check that the signal is + not already connected to the same slot before connecting, otherwise, + the connection will fail. + This value was introduced in Qt 4.6. With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them @@ -948,10 +962,8 @@ position. This is set/cleared by QWidget::move() and by QWidget::setGeometry(). - \value WA_MSWindowsUseDirect3D Makes drawing to a widget - with this attribute set use the Direct3D paint engine, if the - Direct3D paint engine is available. \bold {This functionality - is experimental.} + \value WA_MSWindowsUseDirect3D This value is obsolete and has no + effect. \value WA_NoBackground This value is obsolete. Use WA_OpaquePaintEvent instead. @@ -1192,6 +1204,14 @@ on Mac when using Carbon. This attribute has no effect on Cocoa. The attribute is off by default and can be enabled on a per-window basis. + \value WA_AcceptTouchEvents Allows touch events (see QTouchEvent) + to be sent to the widget. Must be set on all widgets that can + handle touch events. Without this attribute set, events from a + touch device will be sent as mouse events. + + \value WA_TouchPadAcceptSingleTouchEvents Allows touchpad single + touch events to be sent to the widget. + \omitvalue WA_SetLayoutDirection \omitvalue WA_InputMethodTransparent \omitvalue WA_WState_CompressKeys @@ -1221,13 +1241,15 @@ \omitvalue WA_X11BypassTransientForHint \omitvalue WA_SetWindowModality \omitvalue WA_WState_WindowOpacitySet + \omitvalue WA_WState_AcceptedTouchBeginEvent */ /*! \typedef Qt::HANDLE Platform-specific handle type for system objects. This is - equivalent to \c{void *} on Windows and Mac OS X, and embedded - Linux, and to \c{unsigned long} on X11. + equivalent to \c{void *} on Mac OS X and embedded Linux, + and to \c{unsigned long} on X11. On Windows it is the + DWORD returned by the Win32 function getCurrentThreadId(). \warning Using this type is not portable. */ @@ -1675,6 +1697,7 @@ \value ToolButtonTextOnly Only display the text. \value ToolButtonTextBesideIcon The text appears beside the icon. \value ToolButtonTextUnderIcon The text appears under the icon. + \value ToolButtonFollowStyle Follow the \l{QStyle::SH_ToolButtonStyle}{style}. */ /*! @@ -2053,9 +2076,9 @@ should be taken over by the target application, i.e., the source application should not delete the data. - - On X11 this value is used to do a move. - + \br + On X11 this value is used to do a move. + \br TargetMoveAction is not used on the Mac. */ @@ -2661,3 +2684,38 @@ \sa QGraphicsWidget::windowFrameSectionAt() */ + +/*! + \enum Qt::TileRule + \since 4.6 + + This enum describes how to repeat or stretch the parts of an image + when drawing. + + \value Stretch Scale the image to fit to the available area. + + \value Repeat Tile the image until there is no more space. May crop + the last image. + + \value Round Like Repeat, but scales the images down to ensure that + the last image is not cropped. +*/ + +/*! + \enum Qt::Initialization + \internal +*/ + +/*! + \enum Qt::GestureState + \since 4.6 + + This enum type describes the state of a gesture. + + \omitvalue NoGesture + \value GestureStarted A continuous gesture has started. + \value GestureUpdated A gesture continues. + \value GestureFinished A gesture has finished. + + \sa QGesture +*/ diff --git a/doc/src/qpagesetupdialog.qdoc b/doc/src/classes/qpagesetupdialog.qdoc index 7f0b09e..7f0b09e 100644 --- a/doc/src/qpagesetupdialog.qdoc +++ b/doc/src/classes/qpagesetupdialog.qdoc diff --git a/doc/src/qpaintdevice.qdoc b/doc/src/classes/qpaintdevice.qdoc index 0f4e9a0..0f4e9a0 100644 --- a/doc/src/qpaintdevice.qdoc +++ b/doc/src/classes/qpaintdevice.qdoc diff --git a/doc/src/qpair.qdoc b/doc/src/classes/qpair.qdoc index 6d8a0f9..6d8a0f9 100644 --- a/doc/src/qpair.qdoc +++ b/doc/src/classes/qpair.qdoc diff --git a/doc/src/qpatternistdummy.cpp b/doc/src/classes/qpatternistdummy.cpp index a690184..a690184 100644 --- a/doc/src/qpatternistdummy.cpp +++ b/doc/src/classes/qpatternistdummy.cpp diff --git a/doc/src/qplugin.qdoc b/doc/src/classes/qplugin.qdoc index 4fbd198..4fbd198 100644 --- a/doc/src/qplugin.qdoc +++ b/doc/src/classes/qplugin.qdoc diff --git a/doc/src/qprintdialog.qdoc b/doc/src/classes/qprintdialog.qdoc index 8011f62..8011f62 100644 --- a/doc/src/qprintdialog.qdoc +++ b/doc/src/classes/qprintdialog.qdoc diff --git a/doc/src/qprinterinfo.qdoc b/doc/src/classes/qprinterinfo.qdoc index a4ffeb2..a4ffeb2 100644 --- a/doc/src/qprinterinfo.qdoc +++ b/doc/src/classes/qprinterinfo.qdoc diff --git a/doc/src/qset.qdoc b/doc/src/classes/qset.qdoc index 20ed771..0db3775 100644 --- a/doc/src/qset.qdoc +++ b/doc/src/classes/qset.qdoc @@ -324,6 +324,16 @@ \sa insert(), remove(), find() */ +/*! + \fn bool QSet::contains(const QSet<T> &other) const + \since 4.6 + + Returns true if the set contains all items from the \a other set; + otherwise returns false. + + \sa insert(), remove(), find() +*/ + /*! \fn QSet::const_iterator QSet::begin() const Returns a const \l{STL-style iterator} positioned at the first diff --git a/doc/src/qsignalspy.qdoc b/doc/src/classes/qsignalspy.qdoc index 4ee7590..4ee7590 100644 --- a/doc/src/qsignalspy.qdoc +++ b/doc/src/classes/qsignalspy.qdoc diff --git a/doc/src/qsizepolicy.qdoc b/doc/src/classes/qsizepolicy.qdoc index c74beb8..c74beb8 100644 --- a/doc/src/qsizepolicy.qdoc +++ b/doc/src/classes/qsizepolicy.qdoc diff --git a/doc/src/classes/qtdesigner-api.qdoc b/doc/src/classes/qtdesigner-api.qdoc new file mode 100644 index 0000000..d7c47b1 --- /dev/null +++ b/doc/src/classes/qtdesigner-api.qdoc @@ -0,0 +1,1413 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \class QDesignerMemberSheetExtension + + \brief The QDesignerMemberSheetExtension class allows you to + manipulate a widget's member functions which is displayed when + configuring connections using Qt Designer's mode for editing + signals and slots. + + \inmodule QtDesigner + + QDesignerMemberSheetExtension is a collection of functions that is + typically used to query a widget's member functions, and to + manipulate the member functions' appearance in \QD's signals and + slots editing mode. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2 + + When implementing a custom widget plugin, a pointer to \QD's + current QDesignerFormEditorInterface object (\c formEditor in the + example above) is provided by the + QDesignerCustomWidgetInterface::initialize() function's parameter. + + The member sheet (and any other extension), can be retrieved by + querying \QD's extension manager using the qt_extension() + function. When you want to release the extension, you only need to + delete the pointer. + + All widgets have a default member sheet used in \QD's signals and + slots editing mode with the widget's member functions. But + QDesignerMemberSheetExtension also provides an interface for + creating custom member sheet extensions. + + \warning \QD uses the QDesignerMemberSheetExtension to facilitate + the signal and slot editing mode. Whenever a connection between + two widgets is requested, \QD will query for the widgets' member + sheet extensions. If a widget has an implemented member sheet + extension, this extension will override the default member sheet. + + To create a member sheet extension, your extension class must + inherit from both QObject and QDesignerMemberSheetExtension. Then, + since we are implementing an interface, we must ensure that it's + made known to the meta object system using the Q_INTERFACES() + macro: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3 + + This enables \QD to use qobject_cast() to query for + supported interfaces using nothing but a QObject pointer. + + In \QD the extensions are not created until they are + required. For that reason, when implementing a member sheet + extension, you must also create a QExtensionFactory, i.e a class + that is able to make an instance of your extension, and register + it using \QD's \l {QExtensionManager}{extension manager}. + + When a widget's member sheet extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until the first one that is able to create a member sheet + extension for that widget, is found. This factory will then make + an instance of the extension. If no such factory is found, \QD + will use the default member sheet. + + There are four available types of extensions in \QD: + QDesignerContainerExtension, QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension and + QDesignerTaskMenuExtension. \QD's behavior is the same whether the + requested extension is associated with a multi page container, a + member sheet, a property sheet or a task menu. + + The QExtensionFactory class provides a standard extension + factory, and can also be used as an interface for custom + extension factories. You can either create a new + QExtensionFactory and reimplement the + QExtensionFactory::createExtension() function. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a member sheet extension as well. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5 + + For a complete example using an extension class, see \l + {designer/taskmenuextension}{Task Menu Extension example}. The + example shows how to create a custom widget plugin for Qt + Designer, and how to to use the QDesignerTaskMenuExtension class + to add custom items to \QD's task menu. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerMemberSheetExtension::~QDesignerMemberSheetExtension() + + Destroys the member sheet extension. +*/ + +/*! + \fn int QDesignerMemberSheetExtension::count() const + + Returns the extension's number of member functions. +*/ + +/*! + \fn int QDesignerMemberSheetExtension::indexOf(const QString &name) const + + Returns the index of the member function specified by the given \a + name. + + \sa memberName() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::memberName(int index) const + + Returns the name of the member function with the given \a index. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::memberGroup(int index) const + + Returns the name of the member group specified for the function + with the given \a index. + + \sa indexOf(), setMemberGroup() +*/ + +/*! + \fn void QDesignerMemberSheetExtension::setMemberGroup(int index, const QString &group) + + Sets the member group of the member function with the given \a + index, to \a group. + + \sa indexOf(), memberGroup() +*/ + +/*! + \fn bool QDesignerMemberSheetExtension::isVisible(int index) const + + Returns true if the member function with the given \a index is + visible in \QD's signal and slot editor, otherwise false. + + \sa indexOf(), setVisible() +*/ + +/*! + \fn void QDesignerMemberSheetExtension::setVisible(int index, bool visible) + + If \a visible is true, the member function with the given \a index + is visible in \QD's signals and slots editing mode; otherwise the + member function is hidden. + + \sa indexOf(), isVisible() +*/ + +/*! + \fn virtual bool QDesignerMemberSheetExtension::isSignal(int index) const + + Returns true if the member function with the given \a index is a + signal, otherwise false. + + \sa indexOf() +*/ + +/*! + \fn bool QDesignerMemberSheetExtension::isSlot(int index) const + + Returns true if the member function with the given \a index is a + slot, otherwise false. + + \sa indexOf() +*/ + +/*! + \fn bool QDesignerMemberSheetExtension::inheritedFromWidget(int index) const + + Returns true if the member function with the given \a index is + inherited from QWidget, otherwise false. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::declaredInClass(int index) const + + Returns the name of the class in which the member function with + the given \a index is declared. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::signature(int index) const + + Returns the signature of the member function with the given \a + index. + + \sa indexOf() +*/ + +/*! + \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterTypes(int index) const + + Returns the parameter types of the member function with the given + \a index, as a QByteArray list. + + \sa indexOf(), parameterNames() +*/ + +/*! + \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterNames(int index) const + + Returns the parameter names of the member function with the given + \a index, as a QByteArray list. + + \sa indexOf(), parameterTypes() +*/ + + +// Doc: Interface only + +/*! + \class QDesignerLayoutDecorationExtension + \brief The QDesignerLayoutDecorationExtension class provides an extension to a layout in \QD. + \inmodule QtDesigner + \internal +*/ + +/*! + \enum QDesignerLayoutDecorationExtension::InsertMode + + This enum describes the modes that are used to insert items into a layout. + + \value InsertWidgetMode Widgets are inserted into empty cells in a layout. + \value InsertRowMode Whole rows are inserted into a vertical or grid layout. + \value InsertColumnMode Whole columns are inserted into a horizontal or grid layout. +*/ + +/*! + \fn virtual QDesignerLayoutDecorationExtension::~QDesignerLayoutDecorationExtension() + + Destroys the extension. +*/ + +/*! + \fn virtual QList<QWidget*> QDesignerLayoutDecorationExtension::widgets(QLayout *layout) const + + Returns the widgets that are managed by the given \a layout. + + \sa insertWidget(), removeWidget() +*/ + +/*! + \fn QRect QDesignerLayoutDecorationExtension::itemInfo(int index) const + + Returns the rectangle covered by the item at the given \a index in the layout. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::indexOf(QWidget *widget) const + + Returns the index of the specified \a widget in the layout. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::indexOf(QLayoutItem *item) const + + Returns the index of the specified layout \a item. +*/ + +/*! + \fn QDesignerLayoutDecorationExtension::InsertMode QDesignerLayoutDecorationExtension::currentInsertMode() const + + Returns the current insertion mode. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::currentIndex() const + + Returns the current index in the layout. +*/ + +/*! + \fn QPair<int, int> QDesignerLayoutDecorationExtension::currentCell() const + + Returns a pair containing the row and column of the current cell in the layout. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::insertWidget(QWidget *widget, const QPair<int, int> &cell) + + Inserts the given \a widget into the specified \a cell in the layout. + + \sa removeWidget() +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::removeWidget(QWidget *widget) + + Removes the specified \a widget from the layout. + + \sa insertWidget() +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::insertRow(int row) + + Inserts a new row into the form at the position specified by \a row. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::insertColumn(int column) + + Inserts a new column into the form at the position specified by \a column. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::simplify() + + Simplifies the layout by removing unnecessary empty rows and columns, and by changing the + number of rows or columns spanned by widgets. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::findItemAt(const QPoint &position) const + + Returns the index of the item in the layout that covers the given \a position. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::findItemAt(int row, int column) const + + Returns the item in the layout that occupies the specified \a row and \a column in the layout. + + Currently, this only applies to grid layouts. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::adjustIndicator(const QPoint &position, int index) + + Adjusts the indicator for the item specified by \a index so that + it lies at the given \a position on the form. +*/ + + +// Doc: Interface only + +/*! + \class QDesignerContainerExtension + \brief The QDesignerContainerExtension class allows you to add pages to + a custom multi-page container in Qt Designer's workspace. + \inmodule QtDesigner + + QDesignerContainerExtension provide an interface for creating + custom container extensions. A container extension consists of a + collection of functions that \QD needs to manage a multi-page + container plugin, and a list of the container's pages. + + \image containerextension-example.png + + \warning This is \e not an extension for container plugins in + general, only custom \e multi-page containers. + + To create a container extension, your extension class must inherit + from both QObject and QDesignerContainerExtension. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6 + + Since we are implementing an interface, we must ensure that it's + made known to the meta object system using the Q_INTERFACES() + macro. This enables \QD to use the qobject_cast() function to + query for supported interfaces using nothing but a QObject + pointer. + + You must reimplement several functions to enable \QD to manage a + custom multi-page container widget: \QD uses count() to keep track + of the number pages in your container, widget() to return the page + at a given index in the list of the container's pages, and + currentIndex() to return the list index of the selected page. \QD + uses the addWidget() function to add a given page to the + container, expecting it to be appended to the list of pages, while + it expects the insertWidget() function to add a given page to the + container by inserting it at a given index. + + In \QD the extensions are not created until they are + required. For that reason you must also create a + QExtensionFactory, i.e a class that is able to make an instance of + your extension, and register it using \QD's \l + {QExtensionManager}{extension manager}. + + When a container extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until the first one that is able to create a container + extension, is found. This factory will then create the extension + for the plugin. + + There are four available types of extensions in \QD: + QDesignerContainerExtension , QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. + \QD's behavior is the same whether the requested extension is + associated with a multi page container, a member sheet, a property + sheet or a task menu. + + The QExtensionFactory class provides a standard extension factory, + and can also be used as an interface for custom extension + factories. You can either create a new QExtensionFactory and + reimplement the QExtensionFactory::createExtension() function. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a container extension as well. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8 + + For a complete example using the QDesignerContainerExtension + class, see the \l {designer/containerextension}{Container + Extension example}. The example shows how to create a custom + multi-page plugin for \QD. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerContainerExtension::~QDesignerContainerExtension() + + Destroys the extension. +*/ + +/*! + \fn int QDesignerContainerExtension::count() const + + Returns the number of pages in the container. +*/ + +/*! + \fn QWidget *QDesignerContainerExtension::widget(int index) const + + Returns the page at the given \a index in the extension's list of + pages. + + \sa addWidget(), insertWidget() +*/ + +/*! + \fn int QDesignerContainerExtension::currentIndex() const + + Returns the index of the currently selected page in the + container. + + \sa setCurrentIndex() +*/ + +/*! + \fn void QDesignerContainerExtension::setCurrentIndex(int index) + + Sets the currently selected page in the container to be the + page at the given \a index in the extension's list of pages. + + \sa currentIndex() +*/ + +/*! + \fn void QDesignerContainerExtension::addWidget(QWidget *page) + + Adds the given \a page to the container by appending it to the + extension's list of pages. + + \sa insertWidget(), remove(), widget() +*/ + +/*! + \fn void QDesignerContainerExtension::insertWidget(int index, QWidget *page) + + Adds the given \a page to the container by inserting it at the + given \a index in the extension's list of pages. + + \sa addWidget(), remove(), widget() +*/ + +/*! + \fn void QDesignerContainerExtension::remove(int index) + + Removes the page at the given \a index from the extension's list + of pages. + + \sa addWidget(), insertWidget() +*/ + + +// Doc: Interface only + +/*! + \class QDesignerTaskMenuExtension + \brief The QDesignerTaskMenuExtension class allows you to add custom + menu entries to Qt Designer's task menu. + \inmodule QtDesigner + + QDesignerTaskMenuExtension provides an interface for creating + custom task menu extensions. It is typically used to create task + menu entries that are specific to a plugin in \QD. + + \QD uses the QDesignerTaskMenuExtension to feed its task + menu. Whenever a task menu is requested, \QD will query + for the selected widget's task menu extension. + + \image taskmenuextension-example-faded.png + + A task menu extension is a collection of QActions. The actions + appear as entries in the task menu when the plugin with the + specified extension is selected. The image above shows the custom + \gui {Edit State...} action which appears in addition to \QD's + default task menu entries: \gui Cut, \gui Copy, \gui Paste etc. + + To create a custom task menu extension, your extension class must + inherit from both QObject and QDesignerTaskMenuExtension. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9 + + Since we are implementing an interface, we must ensure that it + is made known to the meta-object system using the Q_INTERFACES() + macro. This enables \QD to use the qobject_cast() function to + query for supported interfaces using nothing but a QObject + pointer. + + You must reimplement the taskActions() function to return a list + of actions that will be included in \QD task menu. Optionally, you + can reimplement the preferredEditAction() function to set the + action that is invoked when selecting your plugin and pressing + \key F2. The preferred edit action must be one of the actions + returned by taskActions() and, if it's not defined, pressing the + \key F2 key will simply be ignored. + + In \QD, extensions are not created until they are required. A + task menu extension, for example, is created when you click the + right mouse button over a widget in \QD's workspace. For that + reason you must also construct an extension factory, using either + QExtensionFactory or a subclass, and register it using \QD's + \l {QExtensionManager}{extension manager}. + + When a task menu extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until it finds one that is able to create a task menu + extension for the selected widget. This factory will then make an + instance of the extension. + + There are four available types of extensions in \QD: + QDesignerContainerExtension, QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension, and QDesignerTaskMenuExtension. + \QD's behavior is the same whether the requested extension is + associated with a container, a member sheet, a property sheet or a + task menu. + + The QExtensionFactory class provides a standard extension factory, + and can also be used as an interface for custom extension + factories. You can either create a new QExtensionFactory and + reimplement the QExtensionFactory::createExtension() function. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a task menu extension as well. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11 + + For a complete example using the QDesignerTaskMenuExtension class, + see the \l {designer/taskmenuextension}{Task Menu Extension + example}. The example shows how to create a custom widget plugin + for \QD, and how to to use the QDesignerTaskMenuExtension + class to add custom items to \QD's task menu. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerTaskMenuExtension::~QDesignerTaskMenuExtension() + + Destroys the task menu extension. +*/ + +/*! + \fn QAction *QDesignerTaskMenuExtension::preferredEditAction() const + + Returns the action that is invoked when selecting a plugin with + the specified extension and pressing \key F2. + + The action must be one of the actions returned by taskActions(). +*/ + +/*! + \fn QList<QAction*> QDesignerTaskMenuExtension::taskActions() const + + Returns the task menu extension as a list of actions which will be + included in \QD's task menu when a plugin with the specified + extension is selected. + + The function must be reimplemented to add actions to the list. +*/ + + +// Doc: Interface only + +/*! + \class QDesignerCustomWidgetCollectionInterface + + \brief The QDesignerCustomWidgetCollectionInterface class allows + you to include several custom widgets in one single library. + + \inmodule QtDesigner + + When implementing a custom widget plugin, you build it as a + separate library. If you want to include several custom widget + plugins in the same library, you must in addition subclass + QDesignerCustomWidgetCollectionInterface. + + QDesignerCustomWidgetCollectionInterface contains one single + function returning a list of the collection's + QDesignerCustomWidgetInterface objects. For example, if you have + several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and + \c CustomWidgetThree, the class definition may look like this: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12 + + In the class constructor you add the interfaces to your custom + widgets to the list which you return in the customWidgets() + function: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13 + + Note that instead of exporting each custom widget plugin using the + Q_EXPORT_PLUGIN2() macro, you export the entire collection. The + Q_EXPORT_PLUGIN2() macro ensures that \QD can access and construct + the custom widgets. Without this macro, there is no way for \QD to + use them. + + \sa QDesignerCustomWidgetInterface, {Creating Custom Widgets for + Qt Designer} +*/ + +/*! + \fn QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface() { + + Destroys the custom widget collection interface. +*/ + +/*! + \fn QList<QDesignerCustomWidgetInterface*> QDesignerCustomWidgetCollectionInterface::customWidgets() const + + Returns a list of interfaces to the collection's custom widgets. +*/ + + +// Doc: Interface only + +/*! + \class QDesignerCustomWidgetInterface + + \brief The QDesignerCustomWidgetInterface class enables Qt Designer + to access and construct custom widgets. + + \inmodule QtDesigner + + QDesignerCustomWidgetInterface provides a custom widget with an + interface. The class contains a set of functions that must be subclassed + to return basic information about the widget, such as its class name and + the name of its header file. Other functions must be implemented to + initialize the plugin when it is loaded, and to construct instances of + the custom widget for \QD to use. + + When implementing a custom widget you must subclass + QDesignerCustomWidgetInterface to expose your widget to \QD. For + example, this is the declaration for the plugin used in the + \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that + enables an analog clock custom widget to be used by \QD: + + \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0 + + Note that the only part of the class definition that is specific + to this particular custom widget is the class name. In addition, + since we are implementing an interface, we must ensure that it's + made known to the meta object system using the Q_INTERFACES() + macro. This enables \QD to use the qobject_cast() function to + query for supported interfaces using nothing but a QObject + pointer. + + After \QD loads a custom widget plugin, it calls the interface's + initialize() function to enable it to set up any resources that it + may need. This function is called with a QDesignerFormEditorInterface + parameter that provides the plugin with a gateway to all of \QD's API. + + \QD constructs instances of the custom widget by calling the plugin's + createWidget() function with a suitable parent widget. Plugins must + construct and return an instance of a custom widget with the specified + parent widget. + + In the implementation of the class you must remember to export + your custom widget plugin to \QD using the Q_EXPORT_PLUGIN2() + macro. For example, if a library called \c libcustomwidgetplugin.so + (on Unix) or \c libcustomwidget.dll (on Windows) contains a widget + class called \c MyCustomWidget, we can export it by adding the + following line to the file containing the plugin implementation: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14 + + This macro ensures that \QD can access and construct the custom widget. + Without this macro, there is no way for \QD to use it. + + When implementing a custom widget plugin, you build it as a + separate library. If you want to include several custom widget + plugins in the same library, you must in addition subclass + QDesignerCustomWidgetCollectionInterface. + + \warning If your custom widget plugin contains QVariant + properties, be aware that only the following \l + {QVariant::Type}{types} are supported: + + \list + \o QVariant::ByteArray + \o QVariant::Bool + \o QVariant::Color + \o QVariant::Cursor + \o QVariant::Date + \o QVariant::DateTime + \o QVariant::Double + \o QVariant::Int + \o QVariant::Point + \o QVariant::Rect + \o QVariant::Size + \o QVariant::SizePolicy + \o QVariant::String + \o QVariant::Time + \o QVariant::UInt + \endlist + + For a complete example using the QDesignerCustomWidgetInterface + class, see the \l {designer/customwidgetplugin}{Custom Widget + Example}. The example shows how to create a custom widget plugin + for \QD. + + \sa QDesignerCustomWidgetCollectionInterface {Creating Custom + Widgets for Qt Designer} +*/ + +/*! + \fn QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface() + + Destroys the custom widget interface. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::name() const + + Returns the class name of the custom widget supplied by the interface. + + The name returned \e must be identical to the class name used for the + custom widget. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::group() const + + Returns the name of the group to which the custom widget belongs. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::toolTip() const + + Returns a short description of the widget that can be used by \QD + in a tool tip. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::whatsThis() const + + Returns a description of the widget that can be used by \QD in + "What's This?" help for the widget. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::includeFile() const + + Returns the path to the include file that \l uic uses when + creating code for the custom widget. +*/ + +/*! + \fn QIcon QDesignerCustomWidgetInterface::icon() const + + Returns the icon used to represent the custom widget in \QD's + widget box. +*/ + +/*! + \fn bool QDesignerCustomWidgetInterface::isContainer() const + + Returns true if the custom widget is intended to be used as a + container; otherwise returns false. + + Most custom widgets are not used to hold other widgets, so their + implementations of this function will return false, but custom + containers will return true to ensure that they behave correctly + in \QD. +*/ + +/*! + \fn QWidget *QDesignerCustomWidgetInterface::createWidget(QWidget *parent) + + Returns a new instance of the custom widget, with the given \a + parent. +*/ + +/*! + \fn bool QDesignerCustomWidgetInterface::isInitialized() const + + Returns true if the widget has been initialized; otherwise returns + false. + + \sa initialize() +*/ + +/*! + \fn void QDesignerCustomWidgetInterface::initialize(QDesignerFormEditorInterface *formEditor) + + Initializes the widget for use with the specified \a formEditor + interface. + + \sa isInitialized() +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::domXml() const + + Returns the XML that is used to describe the custom widget's + properties to \QD. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::codeTemplate() const + + This function is reserved for future use by \QD. + + \omit + Returns the code template that \QD includes in forms that contain + the custom widget when they are saved. + \endomit +*/ + +/*! + \macro QDESIGNER_WIDGET_EXPORT + \relates QDesignerCustomWidgetInterface + \since 4.1 + + This macro is used when defining custom widgets to ensure that they are + correctly exported from plugins for use with \QD. + + On some platforms, the symbols required by \QD to create new widgets + are removed from plugins by the build system, making them unusable. + Using this macro ensures that the symbols are retained on those platforms, + and has no side effects on other platforms. + + For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin} + example exports a custom widget class with the following declaration: + + \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0 + \dots + \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2 + + \sa {Creating Custom Widgets for Qt Designer} +*/ + + +// Doc: Abstract class + +/*! + \class QDesignerDnDItemInterface + \brief The QDesignerDnDItemInterface class provides an interface that is used to manage items + during a drag and drop operation. + \inmodule QtDesigner + \internal +*/ + +/*! + \enum QDesignerDnDItemInterface::DropType + + This enum describes the result of a drag and drop operation. + + \value MoveDrop The item was moved. + \value CopyDrop The item was copied. +*/ + +/*! + \fn QDesignerDnDItemInterface::QDesignerDnDItemInterface() + + Constructs a new interface to a drag and drop item. +*/ + +/*! + \fn QDesignerDnDItemInterface::~QDesignerDnDItemInterface() + + Destroys the interface to the item. +*/ + +/*! + \fn DomUI *QDesignerDnDItemInterface::domUi() const + + Returns a user interface object for the item. +*/ + +/*! + \fn QWidget *QDesignerDnDItemInterface::widget() const + + Returns the widget being copied or moved in the drag and drop operation. + + \sa source() +*/ + +/*! + \fn QWidget *QDesignerDnDItemInterface::decoration() const + + Returns the widget used to represent the item. +*/ + +/*! + \fn QPoint QDesignerDnDItemInterface::hotSpot() const + + Returns the cursor's hotspot. + + \sa QDrag::hotSpot() +*/ + +/*! + \fn DropType QDesignerDnDItemInterface::type() const + + Returns the type of drag and drop operation in progress. +*/ + +/*! + \fn QWidget *QDesignerDnDItemInterface::source() const + + Returns the widget that is the source of the drag and drop operation; i.e. the original + container of the widget being dragged. + + \sa widget() +*/ + + +// Doc: Abstract class + +/*! + \class QDesignerIconCacheInterface + \brief The QDesignerIconCacheInterface class provides an interface to \QD's icon cache. + \inmodule QtDesigner + \internal +*/ + +/*! + \fn QDesignerIconCacheInterface::QDesignerIconCacheInterface(QObject *parent) + + Constructs a new interface with the given \a parent. +*/ + +/*! + \fn QIcon QDesignerIconCacheInterface::nameToIcon(const QString &filePath, const QString &qrcPath) + + Returns the icon associated with the name specified by \a filePath in the resource + file specified by \a qrcPath. + + If \a qrcPath refers to a valid resource file, the name used for the file path is a path + within those resources; otherwise the file path refers to a local file. + + \sa {The Qt Resource System}, nameToPixmap() +*/ + +/*! + \fn QPixmap QDesignerIconCacheInterface::nameToPixmap(const QString &filePath, const QString &qrcPath) + + Returns the pixmap associated with the name specified by \a filePath in the resource + file specified by \a qrcPath. + + If \a qrcPath refers to a valid resource file, the name used for the file path is a path + within those resources; otherwise the file path refers to a local file. + + \sa {The Qt Resource System}, nameToIcon() +*/ + +/*! + \fn QString QDesignerIconCacheInterface::iconToFilePath(const QIcon &icon) const + + Returns the file path associated with the given \a icon. The file path is a path within + an application resources. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::iconToQrcPath(const QIcon &icon) const + + Returns the path to the resource file that refers to the specified \a icon. The resource + path refers to a local file. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::pixmapToFilePath(const QPixmap &pixmap) const + + Returns the file path associated with the given \a pixmap. The file path is a path within + an application resources. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::pixmapToQrcPath(const QPixmap &pixmap) const + + Returns the path to the resource file that refers to the specified \a pixmap. The resource + path refers to a local file. +*/ + +/*! + \fn QList<QPixmap> QDesignerIconCacheInterface::pixmapList() const + + Returns a list of pixmaps for the icons provided by the icon cache. +*/ + +/*! + \fn QList<QIcon> QDesignerIconCacheInterface::iconList() const + + Returns a list of icons provided by the icon cache. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &workingDirectory) const + + Returns a path to a resource specified by the \a filePath within + the resource file located at \a qrcPath. If \a workingDirectory is + a valid path to a directory, the path returned will be relative to + that directory; otherwise an absolute path is returned. + + \omit + ### Needs checking + \endomit +*/ + + +// Doc: Interface only + +/*! + \class QDesignerPropertySheetExtension + + \brief The QDesignerPropertySheetExtension class allows you to + manipulate a widget's properties which is displayed in Qt + Designer's property editor. + + \sa QDesignerDynamicPropertySheetExtension + + \inmodule QtDesigner + + QDesignerPropertySheetExtension provides a collection of functions that + are typically used to query a widget's properties, and to + manipulate the properties' appearance in the property editor. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15 + + Note that if you change the value of a property using the + QDesignerPropertySheetExtension::setProperty() function, the undo + stack is not updated. To ensure that a property's value can be + reverted using the undo stack, you must use the + QDesignerFormWindowCursorInterface::setProperty() function, or its + buddy \l + {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, + instead. + + When implementing a custom widget plugin, a pointer to \QD's + current QDesignerFormEditorInterface object (\c formEditor in the + example above) is provided by the + QDesignerCustomWidgetInterface::initialize() function's parameter. + + The property sheet, or any other extension, can be retrieved by + querying \QD's extension manager using the qt_extension() + function. When you want to release the extension, you only need to + delete the pointer. + + All widgets have a default property sheet which populates \QD's + property editor with the widget's properties (i.e the ones defined + with the Q_PROPERTY() macro). But QDesignerPropertySheetExtension + also provides an interface for creating custom property sheet + extensions. + + \warning \QD uses the QDesignerPropertySheetExtension to feed its + property editor. Whenever a widget is selected in its workspace, + \QD will query for the widget's property sheet extension. If the + selected widget has an implemented property sheet extension, this + extension will override the default property sheet. + + To create a property sheet extension, your extension class must + inherit from both QObject and + QDesignerPropertySheetExtension. Then, since we are implementing + an interface, we must ensure that it's made known to the meta + object system using the Q_INTERFACES() macro: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16 + + This enables \QD to use qobject_cast() to query for supported + interfaces using nothing but a QObject pointer. + + In \QD the extensions are not created until they are + required. For that reason, when implementing a property sheet + extension, you must also create a QExtensionFactory, i.e a class + that is able to make an instance of your extension, and register + it using \QD's \l {QExtensionManager}{extension manager}. + + When a property sheet extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until the first one that is able to create a property + sheet extension for the selected widget, is found. This factory + will then make an instance of the extension. If no such factory + can be found, \QD will use the default property sheet. + + There are four available types of extensions in \QD: + QDesignerContainerExtension, QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. Qt + Designer's behavior is the same whether the requested extension is + associated with a multi page container, a member sheet, a property + sheet or a task menu. + + The QExtensionFactory class provides a standard extension factory, + and can also be used as an interface for custom extension + factories. You can either create a new QExtensionFactory and + reimplement the QExtensionFactory::createExtension() function. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a property sheet extension extension as well. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18 + + For a complete example using an extension class, see the \l + {designer/taskmenuextension}{Task Menu Extension example}. The + example shows how to create a custom widget plugin for Qt + Designer, and how to to use the QDesignerTaskMenuExtension class + to add custom items to \QD's task menu. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerPropertySheetExtension::~QDesignerPropertySheetExtension() + + Destroys the property sheet extension. +*/ + +/*! + \fn int QDesignerPropertySheetExtension::count() const + + Returns the selected widget's number of properties. +*/ + +/*! + \fn int QDesignerPropertySheetExtension::indexOf(const QString &name) const + + Returns the index for a given property \a name. + + \sa propertyName() +*/ + +/*! + \fn QString QDesignerPropertySheetExtension::propertyName(int index) const + + Returns the name of the property at the given \a index. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerPropertySheetExtension::propertyGroup(int index) const + + Returns the property group for the property at the given \a index. + + \QD's property editor supports property groups, i.e. sections of + related properties. A property can be related to a group using the + setPropertyGroup() function. The default group of any property is + the name of the class that defines it. For example, the + QObject::objectName property appears within the QObject property + group. + + \sa indexOf(), setPropertyGroup() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setPropertyGroup(int index, const QString &group) + + Sets the property group for the property at the given \a index to + \a group. + + Relating a property to a group makes it appear within that group's + section in the property editor. The default property group of any + property is the name of the class that defines it. For example, + the QObject::objectName property appears within the QObject + property group. + + \sa indexOf(), property(), propertyGroup() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::hasReset(int index) const + + Returns true if the property at the given \a index has a reset + button in \QD's property editor, otherwise false. + + \sa indexOf(), reset() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::reset(int index) + + Resets the value of the property at the given \a index, to the + default value. Returns true if a default value could be found, otherwise false. + + \sa indexOf(), hasReset(), isChanged() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::isVisible(int index) const + + Returns true if the property at the given \a index is visible in + \QD's property editor, otherwise false. + + \sa indexOf(), setVisible() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setVisible(int index, bool visible) + + If \a visible is true, the property at the given \a index is + visible in \QD's property editor; otherwise the property is + hidden. + + \sa indexOf(), isVisible() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::isAttribute(int index) const + + Returns true if the property at the given \a index is an attribute, + which will be \e excluded from the UI file, otherwise false. + + \sa indexOf(), setAttribute() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setAttribute(int index, bool attribute) + + If \a attribute is true, the property at the given \a index is + made an attribute which will be \e excluded from the UI file; + otherwise it will be included. + + \sa indexOf(), isAttribute() +*/ + +/*! + \fn QVariant QDesignerPropertySheetExtension::property(int index) const + + Returns the value of the property at the given \a index. + + \sa indexOf(), setProperty(), propertyGroup() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setProperty(int index, const QVariant &value) + + Sets the \a value of the property at the given \a index. + + \warning If you change the value of a property using this + function, the undo stack is not updated. To ensure that a + property's value can be reverted using the undo stack, you must + use the QDesignerFormWindowCursorInterface::setProperty() + function, or its buddy \l + {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, + instead. + + \sa indexOf(), property(), propertyGroup() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::isChanged(int index) const + + Returns true if the value of the property at the given \a index + differs from the property's default value, otherwise false. + + \sa indexOf(), setChanged(), reset() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setChanged(int index, bool changed) + + Sets whether the property at the given \a index is different from + its default value, or not, depending on the \a changed parameter. + + \sa indexOf(), isChanged() +*/ + +// Doc: Interface only + +/*! + \class QDesignerDynamicPropertySheetExtension + + \brief The QDesignerDynamicPropertySheetExtension class allows you to + manipulate a widget's dynamic properties in Qt Designer's property editor. + + \sa QDesignerPropertySheetExtension, {QObject#Dynamic Properties}{Dynamic Properties} + + \inmodule QtDesigner + \since 4.3 +*/ + +/*! + \fn QDesignerDynamicPropertySheetExtension::~QDesignerDynamicPropertySheetExtension() + + Destroys the dynamic property sheet extension. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::dynamicPropertiesAllowed() const + + Returns true if the widget supports dynamic properties; otherwise returns false. +*/ + +/*! + \fn int QDesignerDynamicPropertySheetExtension::addDynamicProperty(const QString &propertyName, const QVariant &value) + + Adds a dynamic property named \a propertyName and sets its value to \a value. + Returns the index of the property if it was added successfully; otherwise returns -1 to + indicate failure. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::removeDynamicProperty(int index) + + Removes the dynamic property at the given \a index. + Returns true if the operation succeeds; otherwise returns false. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::isDynamicProperty(int index) const + + Returns true if the property at the given \a index is a dynamic property; otherwise + returns false. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::canAddDynamicProperty(const QString &propertyName) const + + Returns true if \a propertyName is a valid, unique name for a dynamic + property; otherwise returns false. + +*/ diff --git a/doc/src/qtendian.qdoc b/doc/src/classes/qtendian.qdoc index dcffb5d..dcffb5d 100644 --- a/doc/src/qtendian.qdoc +++ b/doc/src/classes/qtendian.qdoc diff --git a/doc/src/qtestevent.qdoc b/doc/src/classes/qtestevent.qdoc index 2e111b3..2e111b3 100644 --- a/doc/src/qtestevent.qdoc +++ b/doc/src/classes/qtestevent.qdoc diff --git a/doc/src/qvarlengtharray.qdoc b/doc/src/classes/qvarlengtharray.qdoc index ac6bb6e..ac6bb6e 100644 --- a/doc/src/qvarlengtharray.qdoc +++ b/doc/src/classes/qvarlengtharray.qdoc diff --git a/doc/src/qwaitcondition.qdoc b/doc/src/classes/qwaitcondition.qdoc index ae94e35..ae94e35 100644 --- a/doc/src/qwaitcondition.qdoc +++ b/doc/src/classes/qwaitcondition.qdoc diff --git a/doc/src/compatclasses.qdoc b/doc/src/compatclasses.qdoc deleted file mode 100644 index cb6d7dd..0000000 --- a/doc/src/compatclasses.qdoc +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \page compatclasses.html - \title Qt 3 Compatibility Classes - \ingroup classlists - - This is a list of the classes that Qt provides for compatibility - with Qt 3. The vast majority of these are provided by the - Qt3Support module. - - \generatelist compatclasses - - \sa {Qt's Classes}, {Qt's Modules} -*/ diff --git a/doc/src/compiler-notes.qdoc b/doc/src/compiler-notes.qdoc new file mode 100644 index 0000000..4a7451d --- /dev/null +++ b/doc/src/compiler-notes.qdoc @@ -0,0 +1,278 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page compiler-notes.html + \ingroup platform-notes + \title Compiler Notes + \brief Information about the C++ compilers and tools used to build Qt. + + This page contains information about the C++ compilers and tools used + to build Qt on various platforms. + + \tableofcontents + + Please refer to the \l{Platform Notes} for information on the platforms + Qt is currently known to run on, and see the \l{Supported Platforms} + page for information about the status of each platform. + + If you have anything to add to this list or any of the platform or + compiler-specific pages, please submit it via the \l{Bug Report Form} + or through the \l{Public Qt Repository}. + + \section1 Supported Features + + Not all compilers used to build Qt are able to compile all modules. The following table + shows the compiler support for five modules that are not uniformly available for all + platforms and compilers. + + \table + \header \o Compiler \o{5,1} Features + \header \o \o Concurrent \o XmlPatterns \o WebKit \o CLucene \o Phonon + \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} + \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \row + \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X} + \row + \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X} + \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X} + \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \row + \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X} + \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \endtable + + \target GCC + \section1 GCC + + \section2 GCC on Windows (MinGW) + + We have tested Qt with this compiler on Windows XP. + The minimal version of MinGW supported is: + + \list + \o GCC 3.4.2 + \o MinGW runtime 3.7 + \o win32api 3.2 + \o binutils 2.15.91 + \o mingw32-make 3.80.0-3 + \endlist + + \section2 GCC 4.0.0 + + The released package of the compiler has some bugs that lead to miscompilations. + We recommend using GCC 4.0.1 or later, or to use a recent CVS snapshot of the + GCC 4.0 branch. The version of GCC 4.0.0 that is shipped with Mac OS X 10.4 + "Tiger" is known to work with Qt for Mac OS X. + + \section2 HP-UX + + The hpux-g++ platform is tested with GCC 3.4.4. + + \section2 Solaris + + Please use GCC 3.4.2 or later. + + \section2 Mac OS X + + Please use the latest GCC 3.3 from Apple or a later version of GCC 3. + The gcc 3.3 that is provided with Xcode 1.5 is known to generate bad code. + Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}. + + \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64) + + This compiler is known to miscompile some parts of Qt when doing a + release build. There are several workarounds: + + \list 1 + \o Use a debug build instead. + \o For each miscompilation encountered, recompile the file, removing the -O2 option. + \o Add -fno-gcse to the QMAKE_CXXFLAGS_RELEASE. + \endlist + + \section1 HP ANSI C++ (aCC) + + The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The + hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10. + + \section1 Intel C++ Compiler + + Qt supports the Intel C++ compiler on both Windows and Linux. + However, there are a few issues on Linux (see the following + section). + + \section2 Intel C++ Compiler for Linux + + Nokia currently tests the following compilers: + + \list + + \o Intel(R) C++ Compiler for applications running on IA-32, + Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 + + \o Intel(R) C++ Compiler for applications running on Intel(R) 64, + Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 + + \endlist + + We do not currently test the IA-64 (Itanium) compiler. + + \section2 Known Issues with Intel C++ Compiler for Linux + + \list + + \o Precompiled header support does not work in version 10.0.025 + and older. For these compilers, you should configure Qt with + -no-pch. Precompiled header support works properly in version + 10.0.026 and later. + \o Version 10.0.026 for Intel 64 is known to miscompile qmake when + building in release mode. For now, configure Qt with + -debug. Version 10.1.008 and later can compile qmake in release + mode. + \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are + known crash with "(0): internal error: 0_47021" when compiling + QtXmlPatterns, QtWebKit, and Designer in release mode. Version + 10.1.017 compiles these modules correctly in release mode. + \endlist + + \section2 Intel C++ Compiler (Windows, Altix) + + Qt 4 has been tested successfully with: + + \list + \o Windows - Intel(R) C++ Compiler for 32-bit applications, + Version 8.1 Build 20050309Z Package ID: W_CC_PC_8.1.026 + \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based + applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030 + \endlist + + We currently only test the Intel compiler on 32-bit Windows versions. + + \section1 MIPSpro (IRIX) + + \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page + and Qt's Software's online \l{Platform Support Policy} page for details.} + + Qt 4.4.x requires MIPSpro version 7.4.2m. + + Note that MIPSpro version 7.4.4m is currently not supported, since it has + introduced a number of problems that have not yet been resolved. + We recommend using 7.4.2m for Qt development. However, please note the + unsupported status of this platform. + + \target Sun Studio + \section1 Forte Developer / Sun Studio (Solaris) + + \section2 Sun Studio + + Qt is tested using Sun Studio 8 (Sun CC 5.5). Go to + \l{Sun Studio Patches} page on Sun's Web site to download + the latest patches for your Sun compiler. + + \section2 Sun WorkShop 5.0 + + Sun WorkShop 5.0 is not supported with Qt 4. + + \section1 Visual Studio (Windows) + + We do most of our Windows development on Windows XP, using Microsoft + Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit + versions). + + Qt works with the Standard Edition, the Professional Edition and Team + System Edition of Visual Studio 2005. + + We also test Qt 4 on Windows XP with Visual Studio .NET and Visual Studio 2003. + + In order to use Qt with the Visual Studio 2005/2008 Express Edition you need + to download and install the platform SDK. Due to limitations in the + Express Edition it is not possible for us to install the Qt Visual + Studio Integration. You will need to use our command line tools to + build Qt applications with this edition. + + The Visual C++ Linker doesn't understand filenames with spaces (as in + \c{C:\Program files\Qt\}) so you will have to move it to another place, + or explicitly set the path yourself; for example: + + \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0 + + If you are experiencing strange problems with using special flags that + modify the alignment of structure and union members (such as \c{/Zp2}) + then you will need to recompile Qt with the flags set for the + application as well. + + If you're using Visual Studio .NET (2002) Standard Edition, you should be + using the Qt binary package provided, and not the source package. + As the Standard Edition does not optimize compiled code, your compiled + version of Qt would perform suboptimally with respect to speed. + + With Visual Studio 2005 Service Pack 1 a bug was introduced which + causes Qt not to compile, this has been fixed with a hotfix available + from Microsoft. See this + \l{http://www.qtsoftware.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry} + for more information. + + \section1 IBM xlC (AIX) + + The makeC++SharedLib utility must be in your PATH and be up to date to + build shared libraries. From IBM's + \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX} + Redbook: + + \list + \o "The second step is to use the makeC++SharedLib command to create the + shared object. The command has many optional arguments, but in its + simplest form, can be used as follows:" + \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1 + \o "The full path name to the command is not required; however, to avoid + this, you will have to add the directory in which it is located to + your PATH environment variable. The command is located in the + /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX, + Version 5 compiler." + \endlist + + \section2 VisualAge C++ for AIX, Version 6.0 + + Make sure you have the + \l{http://www-1.ibm.com/support/search.wss?rs=32&tc=SSEP5D&dc=D400}{latest upgrades} + installed. +*/ diff --git a/doc/src/coordsys.qdoc b/doc/src/coordsys.qdoc index 7ba3946..4a73d67 100644 --- a/doc/src/coordsys.qdoc +++ b/doc/src/coordsys.qdoc @@ -224,12 +224,12 @@ Transformations} demo for a visualization of a sheared coordinate system. All the transformation operations operate on QPainter's transformation matrix that you can retrieve using the - QPainter::worldMatrix() function. A matrix transforms a point in the - plane to another point. + QPainter::worldTransform() function. A matrix transforms a point + in the plane to another point. If you need the same transformations over and over, you can also - use QMatrix objects and the QPainter::worldMatrix() and - QPainter::setWorldMatrix() functions. You can at any time save the + use QTransform objects and the QPainter::worldTransform() and + QPainter::setWorldTransform() functions. You can at any time save the QPainter's transformation matrix by calling the QPainter::save() function which saves the matrix on an internal stack. The QPainter::restore() function pops it back. @@ -318,7 +318,7 @@ transformations affects the result. For more information about the transformation matrix, see the - QMatrix documentation. + QTransform documentation. \section1 Window-Viewport Conversion @@ -328,7 +328,7 @@ The mapping of the logical coordinates to the physical coordinates are handled by QPainter's world transformation \l - {QPainter::worldMatrix()}{worldMatrix()} (described in the \l + {QPainter::worldTransform()}{worldTransform()} (described in the \l Transformations section), and QPainter's \l {QPainter::viewport()}{viewport()} and \l {QPainter::window()}{window()}. The viewport represents the @@ -419,14 +419,14 @@ \endtable The 2D transformations of the coordinate system are specified - using the QMatrix class: + using the QTransform class: \table \header \o Class \o Description \row - \o QMatrix + \o QTransform \o - A 3 x 3 transformation matrix. Use QMatrix to rotate, shear, + A 3 x 3 transformation matrix. Use QTransform to rotate, shear, scale, or translate the coordinate system. \endtable diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc index 81ded04..15bf1e2 100644 --- a/doc/src/credits.qdoc +++ b/doc/src/credits.qdoc @@ -247,6 +247,7 @@ Mike Perik <mikep at crt.com>\br Mike Sharkey <msharkey at softarc.com>\br Mikko Ala-Fossi <mikko.ala-fossi at vaisala.com>\br + Milan Burda <milan.burda at gmail.com>\br Miroslav Flidr <flidr at kky.zcu.cz>\br Miyata Shigeru <miyata at kusm.kyoto-u.ac.jp>\br Myron Uecker <muecker at csd.net>\br diff --git a/doc/src/datastreamformat.qdoc b/doc/src/datastreamformat.qdoc index dea193f..5db85cb 100644 --- a/doc/src/datastreamformat.qdoc +++ b/doc/src/datastreamformat.qdoc @@ -220,6 +220,25 @@ \o dx (double) \o dy (double) \endlist + \row \o QMatrix4x4 + \o \list + \o m11 (double) + \o m12 (double) + \o m13 (double) + \o m14 (double) + \o m21 (double) + \o m22 (double) + \o m23 (double) + \o m24 (double) + \o m31 (double) + \o m32 (double) + \o m33 (double) + \o m34 (double) + \o m41 (double) + \o m42 (double) + \o m43 (double) + \o m44 (double) + \endlist \row \o QPair<T1, T2> \o \list \o first (T1) @@ -266,6 +285,13 @@ \o The x coordinate (qint32) \o The y coordinate (qint32) \endlist + \row \o QQuaternion + \o \list + \o The scalar component (double) + \o The x coordinate (double) + \o The y coordinate (double) + \o The z coordinate (double) + \endlist \row \o QRect \o \list \o left (qint32) @@ -301,6 +327,18 @@ \o \list \o Milliseconds since midnight (quint32) \endlist + \row \o QTransform + \o \list + \o m11 (double) + \o m12 (double) + \o m13 (double) + \o m21 (double) + \o m22 (double) + \o m23 (double) + \o m31 (double) + \o m32 (double) + \o m33 (double) + \endlist \row \o QUrl \o \list \o Holds an URL (QString) @@ -311,6 +349,24 @@ \o The null flag (qint8) \o The data of the specified type \endlist + \row \o QVector2D + \o \list + \o the x coordinate (double) + \o the y coordinate (double) + \endlist + \row \o QVector3D + \o \list + \o the x coordinate (double) + \o the y coordinate (double) + \o the z coordinate (double) + \endlist + \row \o QVector4D + \o \list + \o the x coordinate (double) + \o the y coordinate (double) + \o the z coordinate (double) + \o the w coordinate (double) + \endlist \row \o QVector<T> \o \list \o The number of items (quint32) diff --git a/doc/src/hierarchy.qdoc b/doc/src/demos/sub-attaq.qdoc index 4a278dc..6bbf763 100644 --- a/doc/src/hierarchy.qdoc +++ b/doc/src/demos/sub-attaq.qdoc @@ -40,13 +40,15 @@ ****************************************************************************/ /*! - \page hierarchy.html + \example demos/sub-attaq + \title Sub-Attaq - \title Class Inheritance Hierarchy - \ingroup classlists + This demo shows Qt's ability to combine \l{The Animation Framework}{the animation framework} + and \l{The State Machine Framework}{the state machine framework} to create a game. + + \image sub-attaq-demo.png - This list shows the C++ class inheritance relations between the - classes in the Qt API. - - \generatelist classhierarchy + The purpose of the game is to destroy all submarines to win the current level. + The boat can be controlled using left and right keys. To fire a bomb you can press + up and down keys. */ diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc index 0866930..1da2c06 100644 --- a/doc/src/deployment.qdoc +++ b/doc/src/deployment.qdoc @@ -715,17 +715,19 @@ \table 100% \header - \o \o VC++ 6.0 \o VC++ 7.1 (2003) \o VC++ 8.0 (2005) + \o \o VC++ 6.0 \o VC++ 7.1 (2003) \o VC++ 8.0 (2005) \o VC++ 9.0 (2008) \row \o The C run-time \o \c msvcrt.dll \o \c msvcr71.dll \o \c msvcr80.dll + \o \c msvcr90.dll \row \o The C++ run-time \o \c msvcp60.dll \o \c msvcp71.dll \o \c msvcp80.dll + \o \c msvcp90.dll \endtable To verify that the application now can be successfully deployed, @@ -893,7 +895,7 @@ \o \l{qt-conf.html}{Using \c qt.conf}. This approach is the recommended if you have executables in different places sharing the same plugins. - + \o Using QApplication::addLibraryPath() or QApplication::setLibraryPaths(). This approach is recommended if you only have one executable that will use the plugin. @@ -902,10 +904,10 @@ hard-coded paths in the QtCore library. \endlist - + If you add a custom path using QApplication::addLibraryPath it could look like this: - + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 54 Then qApp->libraryPaths() would return something like this: diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 0aa9963..ab33185 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -86,7 +86,7 @@ \o \l{Creating Main Windows in Qt Designer} \o \l{Editing Resources with Qt Designer} \o \l{Using Stylesheets with Qt Designer} - \o \l{Using a Designer .ui File in Your Application} + \o \l{Using a Designer UI File in Your Application} \endlist For advanced usage of \QD, you can refer to these links: @@ -158,7 +158,7 @@ has been introduced to aid translators in the case of two source texts being the same but used for different purposes. For example, a dialog could have two \gui{Add} buttons for two different - reasons. \note To maintain compatibility, comments in \c{.ui} files + reasons. \note To maintain compatibility, comments in UI files created prior to Qt 4.5 will be listed in the \gui{Disambiguation} field. \endlist @@ -402,7 +402,7 @@ while setting as few widget size constraints as possible. For a more technical perspective on Qt's layout classes, refer to the - \l{Layout Classes} document. + \l{Layout Management} documentation. */ @@ -620,7 +620,7 @@ \key{Ctrl+O}. At any point, you can save your form by selecting the \gui{Save From As...} - option from the \gui File menu. The \c{.ui} files saved by \QD contain + option from the \gui File menu. The UI files saved by \QD contain information about the objects used, and any details of signal and slot connections between them. @@ -953,7 +953,7 @@ \image designer-form-layout.png - The \c{.ui} file above results in the previews shown below. + The UI file above results in the previews shown below. \table \header @@ -1226,7 +1226,7 @@ The whole connection can be selected by clicking on any of its path segments. Once selected, a connection can be deleted with the - \key Delete key, ensuring that it will not be set up in the \c{.ui} + \key Delete key, ensuring that it will not be set up in the UI file. \endtable */ @@ -1360,7 +1360,7 @@ inside. Both widgets and spacers can be used inside containers. Stacked widgets, tab widgets, and toolboxes are handled specially in \QD. - Norwally, when adding pages (tabs, pages, compartments) to these containers + Normally, when adding pages (tabs, pages, compartments) to these containers in your own code, you need to supply existing widgets, either as placeholders or containing child widgets. In \QD, these are automatically created for you, so you can add child objects to each page straight away. @@ -1795,7 +1795,7 @@ pixmap property in the property editor. \page designer-stylesheet.html \contentspage {Qt Designer Manual}{Contents} \previouspage Editing Resources with Qt Designer - \nextpage Using a Designer .ui File in Your Application + \nextpage Using a Designer UI File in Your Application \title Using Stylesheets with Qt Designer @@ -1824,7 +1824,7 @@ pixmap property in the property editor. \contentspage {Qt Designer Manual}{Contents} \nextpage Using Custom Widgets with Qt Designer - \title Using a Designer .ui File in Your Application + \title Using a Designer UI File in Your Application With Qt's integrated build tools, \l{qmake Manual}{qmake} and \l uic, the code for user interface components created with \QD is automatically @@ -1855,11 +1855,11 @@ pixmap property in the property editor. \section2 The Direct Approach - To demonstrate how to use user interface (\c{.ui}) files straight from + To demonstrate how to use user interface (UI) files straight from \QD, we create a simple Calculator Form application. This is based on the original \l{Calculator Form Example}{Calculator Form} example. - The application consists of one source file, \c main.cpp and a \c{.ui} + The application consists of one source file, \c main.cpp and a UI file. The \c{calculatorform.ui} file designed with \QD is shown below: @@ -1882,7 +1882,7 @@ pixmap property in the property editor. \snippet doc/src/snippets/uitools/calculatorform/main.cpp 0 This include is an additional check to ensure that we do not generate code - for \c .ui files that are not used. + for UI files that are not used. The \c main function creates the calculator widget by constructing a standard QWidget that we use to host the user interface described by the @@ -2003,7 +2003,7 @@ pixmap property in the property editor. \section2 The UiTools Approach - A resource file containing a \c{.ui} file is required to process forms at + A resource file containing a UI file is required to process forms at run time. Also, the application needs to be configured to use the QtUiTools module. This is done by including the following declaration in a \c qmake project file, ensuring that the application is compiled and linked @@ -2034,7 +2034,7 @@ pixmap property in the property editor. \snippet examples/uitools/textfinder/textfinder.cpp 1 Processing forms at run-time gives the developer the freedom to change a - program's user interface, just by changing the \c{.ui} file. This is useful + program's user interface, just by changing the UI file. This is useful when customizing programs to suit various user needs, such as extra large icons or a different colour scheme for accessibility support. @@ -2130,12 +2130,12 @@ pixmap property in the property editor. \image designer-form-settings.png - When saving a form in \QD, it is stored as an \c .ui file. Several form + When saving a form in \QD, it is stored as a UI file. Several form settings, for example the grid settings or the margin and spacing for the default layout, are stored along with the form's components. These settings are used when the \l uic generates the form's C++ code. For more information on how to use forms in your application, see the - \l{Using a Designer .ui File in Your Application} section. + \l{Using a Designer UI File in Your Application} section. \section1 Modifying the Form Settings @@ -2168,7 +2168,7 @@ pixmap property in the property editor. You can also specify the form's \gui{Include Hints}; i.e., provide a list of the header files which will then be included in the form window's - associated \c .ui file. Header files may be local, i.e., relative to the + associated UI file. Header files may be local, i.e., relative to the project's directory, \c "mywidget.h", or global, i.e. part of Qt or the compilers standard libraries: \c <QtGui/QWidget>. @@ -2331,7 +2331,7 @@ pixmap property in the property editor. \row \o \c includeFile() \o The header file that must be included in applications that use - this widget. This information is stored in .ui files and will + this widget. This information is stored in UI files and will be used by \c uic to create a suitable \c{#includes} statement in the code it generates for the form containing the custom widget. @@ -2379,12 +2379,12 @@ pixmap property in the property editor. \section2 Notes on the \c{domXml()} Function - The \c{domXml()} function returns a \c{.ui} file snippet that is used by + The \c{domXml()} function returns a UI file snippet that is used by \QD's widget factory to create a custom widget and its applicable properties. - Since Qt 4.4, \QD's widget box allows for a complete \c{.ui} file to - describe \bold one custom widget. The \c{.ui} file can be loaded using the + Since Qt 4.4, \QD's widget box allows for a complete UI file to + describe \bold one custom widget. The UI file can be loaded using the \c{<ui>} tag. Specifying the <ui> tag allows for adding the <customwidget> element that contains additional information for custom widgets. The \c{<widget>} tag is sufficient if no additional information is required @@ -2406,12 +2406,106 @@ pixmap property in the property editor. is used to hide widgets that should not be explicitly created by the user, but are required by other widgets. - If you would like to use a container widget that is not a subclass of the - containers provided in \QD, but the container is still based on the notion - of \e{Current Page}, you need to provide a container extension and - tell \QD which method to use to add the pages. This can be done using the - \c{<addpagemethod>} XML tag. + + A complete custom widget specification looks like: + + \code +<ui language="c++"> displayname="MyWidget"> + <widget class="widgets::MyWidget" name="mywidget"/> + <customwidgets> + <customwidget> + <class>widgets::MyWidget</class> + <addpagemethod>addPage</addpagemethod> + <propertyspecifications> + <stringpropertyspecification name="fileName" notr="true" type="singleline" + <stringpropertyspecification name="text" type="richtext" + </propertyspecifications> + </customwidget> + </customwidgets> +</ui> + \endcode + + Attributes of the \c{<ui>} tag: + \table + \header + \o Attribute + \o Presence + \o Values + \o Comment + \row + \o \c{language} + \o optional + \o "c++", "jambi" + \o This attribute specifies the language the custom widget is intended for. + It is mainly there to prevent C++-plugins from appearing in Qt Jambi. + \row + \o \c{displayname} + \o optional + \o Class name + \o The value of the attribute appears in the Widget box and can be used to + strip away namespaces. + \endtable + + The \c{<addpagemethod>} tag tells \QD and \l uic which method should be used to + add pages to a container widget. This applies to container widgets that require + calling a particular method to add a child rather than adding the child by passing + the parent. In particular, this is relevant for containers that are not a + a subclass of the containers provided in \QD, but are based on the notion + of \e{Current Page}. In addition, you need to provide a container extension + for them. + + The \c{<propertyspecifications>} element can contain a list of property meta information. + Currently, properties of type string are supported. For these properties, the + \c{<stringpropertyspecification>} tag can be used. This tag has the following attributes: + + + \table + \header + \o Attribute + \o Presence + \o Values + \o Comment + \row + \o \c{name} + \o required + \o Name of the property + \row + \o \c{type} + \o required + \o See below table + \o The value of the attribute determines how the property editor will handle them. + \row + \o \c{notr} + \o optional + \o "true", "false" + \o If the attribute is "true", the value is not meant to be translated. + \endtable + + Values of the \c{type} attribute of the string property: + \table + \header + \o Value + \o Type + \row + \o \c{"richtext"} + \o Rich text. + \row + \o \c{"multiline"} + \o Multi-line plain text. + \row + \o \c{"singleline"} + \o Single-line plain text. + \row + \o \c{"stylesheet"} + \o A CSS-style sheet. + \row + \o \c{"objectname"} + \o An object name (restricted set of valid characters). + \row + \o \c{"url"} + \o URL, file name. + \endtable \section1 Plugin Requirements @@ -2706,7 +2800,7 @@ pixmap property in the property editor. \title Qt Designer's UI File Format - The \c .ui file format used by \QD is described by the + The \c UI file format used by \QD is described by the \l{http://www.w3.org/XML/Schema}{XML schema} presented below, which we include for your convenience. Be aware that the format may change in future Qt releases. diff --git a/doc/src/developing-on-mac.qdoc b/doc/src/developing-on-mac.qdoc index 60c928d..849e79a 100644 --- a/doc/src/developing-on-mac.qdoc +++ b/doc/src/developing-on-mac.qdoc @@ -60,17 +60,15 @@ \section1 What Versions of Mac OS X are Supported? - As of Qt 4.5, Qt supports Mac OS X versions 10.3 (for \bold{deployment - only}, not for development), 10.4 and 10.5. It is usually in the best - interest of the developer and user to be running the latest updates to any - version. We test internally against Mac OS X 10.3.9 and Mac OS X 10.4.11 as - well as the updated release of Mac OS X 10.5. - + As of Qt 4.6, Qt supports Mac OS X versions 10.4 and up. It is usually in + the best interest of the developer and user to be running the latest + updates to any version. We test internally against Mac OS X 10.4.11 as well + as the updated release of Mac OS X 10.5 and Mac OS X 10.6. \section2 Carbon or Cocoa? Historically, Qt has used the Carbon toolkit, which supports 32-bit - applications on Mac OS X 10.3 and up. Qt 4.5 adds support for the Cocoa + applications on Mac OS X 10.4 and up. Qt 4.5 and up has support for the Cocoa toolkit, which requires 10.5 and provides 64-bit support. This detail is typically not important to Qt application developers. Qt is @@ -79,17 +77,21 @@ version will be discontinued. This is something to keep in mind when you consider writing code directly against native APIs. - The current binary for Qt is built for Carbon. If you want to choose which - framework Qt will use, you must build from scratch. Carbon or Cocoa is - chosen when configuring the package for building. The configure process - selects Carbon by default, to specify Cocoa use the \c{-cocoa} flag. - configure for a 64-bit architecture using one of the \c{-arch} flags (see - \l{universal binaries}{Universal Binaries}). - - Currently, Apple's GCC 4.0.1 is used by default. When building on 10.5, - Apple's GCC 4.2 is also available and selectable with the configure flag: - \c{-platform macx-g++42}. GCC 3.x will \e not work. Experimental LLVM-GCC - support is available by passing in the \c{-platform macx-llvm} flag. + The current binary for Qt is built in two flavors, 32-bit Carbon and full + universal Cocoa (32-bit and 64-bit). If you want a different setup for + Qt will use, you must build from scratch. Carbon or Cocoa is chosen when + configuring the package for building. The configure process selects Carbon + by default, to specify Cocoa use the \c{-cocoa} flag. configure for a + 64-bit architecture using one of the \c{-arch} flags (see \l{universal + binaries}{Universal Binaries}). + + Currently, Apple's default GCC compiler is used by default (GCC 4.0.1 on + 10.4 and 10.5, GCC 4.2 on 10.6). You can specify alternate compilers + though. For example, on Mac OS X 10.5, Apple's GCC 4.2 is also available + and selectable with the configure flag: \c{-platform macx-g++42}. LLVM-GCC + support is available by passing in the \c{-platform macx-llvm} flag. GCC + 3.x will \e not work. Though they may work, We do not support custom-built + GCC's. The following table summarizes the different versions of Mac OS X and what capabilities are used by Qt. @@ -103,13 +105,6 @@ \o CPU Architecture Supported \o Development Platform \row - \o 10.3 - \o Panther - \o Carbon - \o 32 - \o PPC - \o No - \row \o 10.4 \o Tiger \o Carbon @@ -130,6 +125,20 @@ \o 32/64 \o PPC/Intel \o Yes + \row + \o 10.6 + \o Snow Leopard + \o Carbon + \o 32 + \o PPC/Intel + \o Yes + \row + \o 10.6 + \o Snow Leopard + \o Cocoa + \o 32/64 + \o PPC/Intel + \o Yes \endtable \section2 Which One Should I Use? @@ -144,15 +153,21 @@ Carbon universal application with the appropriate checks in your code to choose the right path based on where you are running the application. + For Mac OS X 10.6, Apple has started recommending developers to build their + applications 64-bit. The main reason is that there is a small speed + increase due to the extra registers on Intel CPU's, all their machine + offerings have been 64-bit since 2007, and there is a cost for reading all + the 32-bit libraries into memory if everything else is 64-bit. If you want + to follow this advice, there is only one choice, 64-bit Cocoa. + \target universal binaries \section1 Universal Binaries In 2006, Apple begin transitioning from PowerPC (PPC) to Intel (x86) systems. Both architectures are supported by Qt. The release of Mac OS X 10.5 in October 2007 added the possibility of writing and deploying 64-bit - GUI applications. Qt 4.5 supports both the 32-bit (PPC and x86) and 64-bit - (PPC64 and x86-64) versions of PowerPC and Intel-based systems are - supported. + GUI applications. Qt 4.5 and up supports both the 32-bit (PPC and x86) and + 64-bit (PPC64 and x86-64) versions of PowerPC and Intel-based systems. Universal binaries are used to bundle binaries for more than one architecture into a single package, simplifying deployment and @@ -221,7 +236,7 @@ In general, Qt supports building on one Mac OS X version and deploying on all others, both forward and backwards. You can build on 10.4 Tiger and run - the same binary on 10.3 and 10.5. + the same binary on 10.5 and up. Some restrictions apply: diff --git a/doc/src/diagrams/animations-architecture.svg b/doc/src/diagrams/animations-architecture.svg new file mode 100644 index 0000000..0246510 --- /dev/null +++ b/doc/src/diagrams/animations-architecture.svg @@ -0,0 +1,351 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="950.00006" + height="365.28983" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="animations-architecture.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + version="1.0"> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Mend" + style="overflow:visible"> + <path + id="path3736" + style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z" + transform="scale(-0.6,-0.6)" /> + </marker> + <marker + inkscape:stockid="Arrow2Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Lend" + style="overflow:visible"> + <path + id="path3730" + style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z" + transform="matrix(-1.1,0,0,-1.1,-1.1,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend" + style="overflow:visible"> + <path + id="path3712" + d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0" + refX="0" + id="TriangleOutL" + style="overflow:visible"> + <path + id="path3852" + d="M 5.77,0 L -2.88,5 L -2.88,-5 L 5.77,0 z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" + transform="scale(0.8,0.8)" /> + </marker> + <linearGradient + id="linearGradient3165"> + <stop + style="stop-color:#c8c8dc;stop-opacity:1;" + offset="0" + id="stop3167" /> + <stop + style="stop-color:#b4b4c8;stop-opacity:0;" + offset="1" + id="stop3169" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective10" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3165" + id="linearGradient3171" + x1="249.25" + y1="89.862183" + x2="475.75" + y2="89.862183" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2195969,0,0,3.7006494,-257.93754,-842.42203)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3165" + id="linearGradient3183" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2195969,0,0,3.7006494,-383.02298,-676.69717)" + x1="249.25" + y1="89.862183" + x2="475.75" + y2="89.862183" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3165" + id="linearGradient3191" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2195969,0,0,3.7006494,-382.93759,-1004.922)" + x1="249.25" + y1="89.862183" + x2="475.75" + y2="89.862183" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3165" + id="linearGradient7165" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2195969,0,0,3.7006494,-483.69907,-593.77419)" + x1="249.25" + y1="89.862183" + x2="475.75" + y2="89.862183" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3165" + id="linearGradient7195" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2195969,0,0,3.7006494,-571.87523,-1167.422)" + x1="249.25" + y1="89.862183" + x2="475.75" + y2="89.862183" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3165" + id="linearGradient7203" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2195969,0,0,3.7006494,-572.46592,-841.2256)" + x1="249.25" + y1="89.862183" + x2="475.75" + y2="89.862183" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.98994949" + inkscape:cx="276.75951" + inkscape:cy="155.06417" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:snap-bbox="true" + inkscape:window-width="1592" + inkscape:window-height="1124" + inkscape:window-x="0" + inkscape:window-y="0"> + <inkscape:grid + type="xygrid" + id="grid2383" + visible="true" + enabled="true" + units="pt" + spacingx="2pt" + spacingy="2pt" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-121.77519,-152.95286)"> + <rect + style="opacity:1;fill:url(#linearGradient3171);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2385" + width="49.409317" + height="277.54871" + x="-203.03828" + y="-648.64777" + ry="12.582828" + rx="10.562523" + transform="matrix(0,-1,-1,0,0,0)" /> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" + x="380.311" + y="185.86879" + id="text3173" + sodipodi:linespacing="100%"><tspan + sodipodi:role="line" + id="tspan3175" + x="380.311" + y="185.86879">QAbstractAnimation</tspan></text> + <rect + style="opacity:1;fill:url(#linearGradient3183);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3177" + width="49.409317" + height="277.54871" + x="-328.12369" + y="-482.92297" + ry="12.582828" + rx="10.562523" + transform="matrix(0,-1,-1,0,0,0)" /> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" + x="221.80489" + y="310.95419" + id="text3179" + sodipodi:linespacing="100%"><tspan + sodipodi:role="line" + id="tspan3181" + x="221.80489" + y="310.95419">QVariantAnimation</tspan></text> + <rect + style="opacity:1;fill:url(#linearGradient3191);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3185" + width="49.409317" + height="277.54871" + x="-328.03827" + y="-811.14777" + ry="12.582828" + rx="10.562523" + transform="matrix(0,-1,-1,0,0,0)" /> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" + x="564.13324" + y="310.86877" + id="text3187" + sodipodi:linespacing="100%"><tspan + sodipodi:role="line" + id="tspan3189" + x="564.13324" + y="310.86877">QAnimationGroup</tspan></text> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 346.77519,279.39048 L 346.77519,241.89048 L 509.27519,241.89048 L 509.27519,204.39048" + id="path3195" + sodipodi:nodetypes="cccc" /> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 671.77519,279.39048 L 671.77519,241.89048 L 509.27519,241.89048" + id="path7137" + sodipodi:nodetypes="ccc" /> + <rect + style="opacity:1;fill:url(#linearGradient7165);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect7159" + width="49.409317" + height="277.54871" + x="-428.7998" + y="-400" + ry="12.582828" + rx="10.562523" + transform="matrix(0,-1,-1,0,0,0)" /> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" + x="131.66315" + y="411.63031" + id="text7161" + sodipodi:linespacing="100%"><tspan + sodipodi:role="line" + id="tspan7163" + x="131.66315" + y="411.63031">QPropertyAnimation</tspan></text> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 309.27519,379.39048 L 309.27519,329.39048" + id="path7167" + sodipodi:nodetypes="cc" /> + <rect + style="opacity:1;fill:url(#linearGradient7195);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect7189" + width="49.409317" + height="375" + x="-516.97589" + y="-1071.0991" + ry="12.582828" + rx="10.562523" + transform="matrix(0,-1,-1,0,0,0)" /> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" + x="703.17139" + y="499.8064" + id="text7191" + sodipodi:linespacing="100%"><tspan + sodipodi:role="line" + id="tspan7193" + x="703.17139" + y="499.8064">QSequentialAnimationGroup</tspan></text> + <rect + style="opacity:1;fill:url(#linearGradient7203);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect7197" + width="50" + height="350" + x="-517.56659" + y="-647.45129" + ry="12.582828" + rx="10.562523" + transform="matrix(0,-1,-1,0,0,0)" /> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" + x="306.46109" + y="500.39709" + id="text7199" + sodipodi:linespacing="100%"><tspan + sodipodi:role="line" + id="tspan7201" + x="306.46109" + y="500.39709">QParallelAnimationGroup</tspan></text> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 859.27519,466.89048 L 859.27519,391.89048 L 671.77519,391.89048" + id="path7205" + sodipodi:nodetypes="ccc" /> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 496.77519,466.89048 L 496.77519,391.89048 L 671.77519,391.89048 L 671.77519,329.39048" + id="path7207" + sodipodi:nodetypes="cccc" /> + </g> +</svg> diff --git a/doc/src/diagrams/dependencies.lout b/doc/src/diagrams/dependencies.lout index d20f4f1..256f7de 100644 --- a/doc/src/diagrams/dependencies.lout +++ b/doc/src/diagrams/dependencies.lout @@ -1,7 +1,13 @@ +# This file is used to create x11_dependencies.sk, which is then converted to a PNG image. +# +# lout -EPS -o dependencies.eps dependencies.lout +# pstoedit -f sk dependencies.eps x11_dependencies.sk +# makeimage.py x11_dependencies.sk x11_dependencies.png 0.25 --anti-alias + @SysInclude { picture } @SysInclude { tbl } @SysInclude { diag } -# lout -EPS dependencies.lout > dependencies.eps + macro @TTGreenColour { {cmyk 0.40 0.00 1.00 0.01} } macro @TTPurpleColour { {cmyk 0.39 0.39 0.00 0.00} } macro @DefaultColour { rgb { 0.961 0.961 0.863 } } @@ -41,31 +47,33 @@ macro @GlibColour { rgb { 0.7 0.7 0.7 } } div { top } # fmarginbelow { 0c } - aformat { @Cell A | @Cell B | @Cell marginbelow { 0c } font { +2p } C | @Cell D | @Cell E } - bformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F } - cformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell marginleft { 1.5c } E | @Cell F } - dformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F } - eformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F } - fformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F } - gformat { @Cell A | @Cell B | @Cell C | @Cell D | @StartHSpan @Cell E | @HSpan } + aformat { @Cell A | @Cell B | @StartHSpan @Cell marginbelow { 0c } font { +2p } C | @HSpan | @HSpan | @Cell F | @Cell G} + bformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F | @Cell G } + cformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell marginleft { 1.5c } F | @Cell G } + dformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F | @Cell G } + eformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F | @Cell G } + fformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F | @Cell G } + gformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @StartHSpan @Cell F | @HSpan } { @Rowa C { Qt"/"X11 library dependencies } - @Rowb C { QTGUI:: @Node paint { @TTGreenColour } QtGui } - @Rowc B { XCURSOR:: @Node paint { @OptionalColour } Xcursor } - C { XRANDR:: @Node paint { @OptionalColour } Xrandr } - D { XINERAMA:: @Node paint { @OptionalColour } Xinerama } - E { Xi:: @Node paint { @OptionalColour } Xi } - @Rowd C { XRENDER:: @Node paint { @OptionalColour } XRender } - F { Xt:: @Node paint { @DefaultColour } Xt* } - @Rowe A { QTCORE:: @Node paint { @TTPurpleColour } QtCore } - C { XFIXES:: @Node paint { @OptionalColour } Xfixes } - D { XEXT:: @Node paint { @DefaultColour } Xext } - F { SM:: @Node paint { @SMColour } SM } - @Rowf A { PTHREAD:: @Node paint { @PthreadColour } pthread } - B { GLIB:: @Node paint { @GlibColour } Glib } - D { X:: @Node paint { @DefaultColour } X11 } - F { ICE:: @Node paint { @SMColour } ICE } - @Rowg E { + @Rowb D { QTGUI:: @Node paint { @TTGreenColour } QtGui } + @Rowc C { XCURSOR:: @Node paint { @OptionalColour } Xcursor } + D { XRANDR:: @Node paint { @OptionalColour } Xrandr } + E { XINERAMA:: @Node paint { @OptionalColour } Xinerama } + F { Xi:: @Node paint { @OptionalColour } Xi } + @Rowd A { FONTCONFIG:: @Node paint { @OptionalColour } Fontconfig } + D { XRENDER:: @Node paint { @OptionalColour } XRender } + G { Xt:: @Node paint { @DefaultColour } Xt* } + @Rowe A { FREETYPE:: @Node paint { @OptionalColour } FreeType } + B { QTCORE:: @Node paint { @TTPurpleColour } QtCore } + D { XFIXES:: @Node paint { @OptionalColour } Xfixes } + E { XEXT:: @Node paint { @DefaultColour } Xext } + G { SM:: @Node paint { @SMColour } SM } + @Rowf B { PTHREAD:: @Node paint { @PthreadColour } pthread } + C { GLIB:: @Node paint { @GlibColour } Glib } + E { X:: @Node paint { @DefaultColour } X11 } + G { ICE:: @Node paint { @SMColour } ICE } + @Rowg F { @Tbl font { -2p } margin { 0.15f } @@ -101,6 +109,9 @@ macro @GlibColour { rgb { 0.7 0.7 0.7 } } @Arrow from { XEXT } to { X } @VHCurveArrow from { XCURSOR } to { XFIXES } @VHVCurveArrow from { XFIXES } to { X } +@HVCurveArrow from { QTGUI } to { FONTCONFIG } pathstyle { dotted } +@Arrow from { FONTCONFIG } to { FREETYPE } pathstyle { dotted } +@VHVCurveArrow from { FREETYPE } to { PTHREAD } @Link from { C@W } to { D@E } pathstyle { dotted } } } diff --git a/doc/src/diagrams/programs/easingcurve/easingcurve.pro b/doc/src/diagrams/programs/easingcurve/easingcurve.pro new file mode 100644 index 0000000..0b80127 --- /dev/null +++ b/doc/src/diagrams/programs/easingcurve/easingcurve.pro @@ -0,0 +1,13 @@ +###################################################################### +# Automatically generated by qmake (2.01a) fr 13. feb 13:26:38 2009 +###################################################################### + +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp + +CONFIG += console
\ No newline at end of file diff --git a/doc/src/diagrams/programs/easingcurve/main.cpp b/doc/src/diagrams/programs/easingcurve/main.cpp new file mode 100644 index 0000000..f249dbc --- /dev/null +++ b/doc/src/diagrams/programs/easingcurve/main.cpp @@ -0,0 +1,125 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui> + +void createCurveIcons(); + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + createCurveIcons(); + return app.exit(); +} + +void createCurveIcons() +{ + QDir dir(QDir::current()); + if (dir.dirName() == QLatin1String("debug") || dir.dirName() == QLatin1String("release")) { + dir.cdUp(); + } + dir.cdUp(); + dir.cdUp(); + dir.cdUp(); + QSize iconSize(128, 128); + QPixmap pix(iconSize); + QPainter painter(&pix); + QLinearGradient gradient(0,0, 0, iconSize.height()); + gradient.setColorAt(0.0, QColor(240, 240, 240)); + gradient.setColorAt(1.0, QColor(224, 224, 224)); + QBrush brush(gradient); + const QMetaObject &mo = QEasingCurve::staticMetaObject; + QMetaEnum metaEnum = mo.enumerator(mo.indexOfEnumerator("Type")); + QFont oldFont = painter.font(); + // Skip QEasingCurve::Custom + QString output(QString::fromAscii("%1/images").arg(dir.absolutePath())); + printf("Generating images to %s\n", qPrintable(output)); + for (int i = 0; i < QEasingCurve::NCurveTypes - 1; ++i) { + painter.setFont(oldFont); + QString name(QLatin1String(metaEnum.key(i))); + painter.fillRect(QRect(QPoint(0, 0), iconSize), brush); + QEasingCurve curve((QEasingCurve::Type)i); + painter.setPen(QColor(0, 0, 255, 64)); + qreal xAxis = iconSize.height()/1.5; + qreal yAxis = iconSize.width()/3; + painter.drawLine(0, xAxis, iconSize.width(), xAxis); // hor + painter.drawLine(yAxis, 0, yAxis, iconSize.height()); // ver + + qreal curveScale = iconSize.height()/2; + + painter.drawLine(yAxis - 2, xAxis - curveScale, yAxis + 2, xAxis - curveScale); // hor + painter.drawLine(yAxis + curveScale, xAxis + 2, yAxis + curveScale, xAxis - 2); // ver + painter.drawText(yAxis + curveScale - 8, xAxis - curveScale - 4, QLatin1String("(1,1)")); + + painter.drawText(yAxis + 42, xAxis + 10, QLatin1String("progress")); + painter.drawText(15, xAxis - curveScale - 10, QLatin1String("value")); + + painter.setPen(QPen(Qt::red, 1, Qt::DotLine)); + painter.drawLine(yAxis, xAxis - curveScale, yAxis + curveScale, xAxis - curveScale); // hor + painter.drawLine(yAxis + curveScale, xAxis, yAxis + curveScale, xAxis - curveScale); // ver + + QPoint start(yAxis, xAxis - curveScale * curve.valueForProgress(0)); + + painter.setPen(Qt::black); + QFont font = oldFont; + font.setPixelSize(oldFont.pixelSize() + 15); + painter.setFont(font); + painter.drawText(0, iconSize.height() - 20, iconSize.width(), 20, Qt::AlignHCenter, name); + + QPainterPath curvePath; + curvePath.moveTo(start); + for (qreal t = 0; t <= 1.0; t+=1.0/curveScale) { + QPoint to; + to.setX(yAxis + curveScale * t); + to.setY(xAxis - curveScale * curve.valueForProgress(t)); + curvePath.lineTo(to); + } + painter.setRenderHint(QPainter::Antialiasing, true); + painter.strokePath(curvePath, QColor(32, 32, 32)); + painter.setRenderHint(QPainter::Antialiasing, false); + + QString fileName(QString::fromAscii("qeasingcurve-%1.png").arg(name.toLower())); + printf("%s\n", qPrintable(fileName)); + pix.save(QString::fromAscii("%1/%2").arg(output).arg(fileName), "PNG"); + } +} + + diff --git a/doc/src/diagrams/x11_dependencies.sk b/doc/src/diagrams/x11_dependencies.sk index 5f6b304..a9eb3e3 100644 --- a/doc/src/diagrams/x11_dependencies.sk +++ b/doc/src/diagrams/x11_dependencies.sk @@ -2,1415 +2,1619 @@ document() layout('A4',0) layer('Layer 1',1,1,0,0,(0,0,0)) -G() +fp((0,0,0)) +Fn('Helvetica') +Fs(16) +txt('Qt/X11',(254.1,398.35)) +fp((0,0,0)) +Fn('Helvetica') +Fs(16) +txt('libr',(304.9,398.35)) +fp((0,0,0)) +Fn('Helvetica') +Fs(16) +txt('ar',(326.07,398.35)) +fp((0,0,0)) +Fn('Helvetica') +Fs(16) +txt('y',(340.739,398.35)) +fp((0,0,0)) +Fn('Helvetica') +Fs(16) +txt('dependencies',(352.85,398.35)) fp((0,0,0)) le() b() -bs(268.8,339.25,0) -bs(268.8,337.15,0) -bs(352.8,337.15,0) -bs(352.8,362.2,0) -bs(350.7,362.2,0) -bs(350.7,339.25,0) -bs(268.8,339.25,0) +bs(312.898,344.199,0) +bs(312.898,342.102,0) +bs(396.898,342.102,0) +bs(396.898,367.148,0) +bs(394.801,367.148,0) +bs(394.801,344.199,0) +bs(312.898,344.199,0) bC() -fp((0.59,0.99,0)) +fp((0.594,0.99,0)) le() b() -bs(266.7,339.25,0) -bs(350.7,339.25,0) -bs(350.7,364.3,0) -bs(266.7,364.3,0) -bs(266.7,339.25,0) +bs(310.801,344.199,0) +bs(394.801,344.199,0) +bs(394.801,369.25,0) +bs(310.801,369.25,0) +bs(310.801,344.199,0) lw(1.12) lc(2) b() -bs(266.7,339.25,0) -bs(350.7,339.25,0) +bs(310.801,344.199,0) +bs(394.801,344.199,0) lw(1.12) lc(2) b() -bs(350.7,339.25,0) -bs(350.7,364.3,0) +bs(394.801,344.199,0) +bs(394.801,369.25,0) lw(1.12) lc(2) b() -bs(350.7,364.3,0) -bs(266.7,364.3,0) +bs(394.801,369.25,0) +bs(310.801,369.25,0) lw(1.12) lc(2) b() -bs(266.7,364.3,0) -bs(266.7,339.25,0) +bs(310.801,369.25,0) +bs(310.801,344.199,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('QtGui',(290.95,347)) +txt('QtGui',(335.05,351.95)) fp((0,0,0)) le() b() -bs(111.3,280.05,0) -bs(111.3,277.95,0) -bs(195.3,277.95,0) -bs(195.3,302.15,0) -bs(193.2,302.15,0) -bs(193.2,280.05,0) -bs(111.3,280.05,0) +bs(212.102,285,0) +bs(212.102,282.898,0) +bs(296.102,282.898,0) +bs(296.102,307.102,0) +bs(294,307.102,0) +bs(294,285,0) +bs(212.102,285,0) bC() fp((0.792,0.882,1)) le() b() -bs(109.2,280.05,0) -bs(193.2,280.05,0) -bs(193.2,304.25,0) -bs(109.2,304.25,0) -bs(109.2,280.05,0) +bs(210,285,0) +bs(294,285,0) +bs(294,309.199,0) +bs(210,309.199,0) +bs(210,285,0) lw(1.12) lc(2) b() -bs(109.2,280.05,0) -bs(193.2,280.05,0) +bs(210,285,0) +bs(294,285,0) lw(1.12) lc(2) b() -bs(193.2,280.05,0) -bs(193.2,304.25,0) +bs(294,285,0) +bs(294,309.199,0) lw(1.12) lc(2) b() -bs(193.2,304.25,0) -bs(109.2,304.25,0) +bs(294,309.199,0) +bs(210,309.199,0) lw(1.12) lc(2) b() -bs(109.2,304.25,0) -bs(109.2,280.05,0) +bs(210,309.199,0) +bs(210,285,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xcursor',(127.15,287.25)) +txt('Xcursor',(227.95,292.2)) fp((0,0,0)) le() b() -bs(268.8,280.05,0) -bs(268.8,277.95,0) -bs(352.8,277.95,0) -bs(352.8,302.15,0) -bs(350.7,302.15,0) -bs(350.7,280.05,0) -bs(268.8,280.05,0) +bs(312.898,285,0) +bs(312.898,282.898,0) +bs(396.898,282.898,0) +bs(396.898,307.102,0) +bs(394.801,307.102,0) +bs(394.801,285,0) +bs(312.898,285,0) bC() fp((0.792,0.882,1)) le() b() -bs(266.7,280.05,0) -bs(350.7,280.05,0) -bs(350.7,304.25,0) -bs(266.7,304.25,0) -bs(266.7,280.05,0) +bs(310.801,285,0) +bs(394.801,285,0) +bs(394.801,309.199,0) +bs(310.801,309.199,0) +bs(310.801,285,0) lw(1.12) lc(2) b() -bs(266.7,280.05,0) -bs(350.7,280.05,0) +bs(310.801,285,0) +bs(394.801,285,0) lw(1.12) lc(2) b() -bs(350.7,280.05,0) -bs(350.7,304.25,0) +bs(394.801,285,0) +bs(394.801,309.199,0) lw(1.12) lc(2) b() -bs(350.7,304.25,0) -bs(266.7,304.25,0) +bs(394.801,309.199,0) +bs(310.801,309.199,0) lw(1.12) lc(2) b() -bs(266.7,304.25,0) -bs(266.7,280.05,0) +bs(310.801,309.199,0) +bs(310.801,285,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xr',(287.8,287.25)) +txt('Xr',(331.9,292.2)) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('andr',(301.7,287.25)) +txt('andr',(345.796,292.2)) fp((0,0,0)) le() b() -bs(426.3,280.05,0) -bs(426.3,277.95,0) -bs(510.3,277.95,0) -bs(510.3,302.15,0) -bs(508.2,302.15,0) -bs(508.2,280.05,0) -bs(426.3,280.05,0) +bs(413.699,285,0) +bs(413.699,282.898,0) +bs(497.699,282.898,0) +bs(497.699,307.102,0) +bs(495.602,307.102,0) +bs(495.602,285,0) +bs(413.699,285,0) bC() fp((0.792,0.882,1)) le() b() -bs(424.2,280.05,0) -bs(508.2,280.05,0) -bs(508.2,304.25,0) -bs(424.2,304.25,0) -bs(424.2,280.05,0) +bs(411.602,285,0) +bs(495.602,285,0) +bs(495.602,309.199,0) +bs(411.602,309.199,0) +bs(411.602,285,0) lw(1.12) lc(2) b() -bs(424.2,280.05,0) -bs(508.2,280.05,0) +bs(411.602,285,0) +bs(495.602,285,0) lw(1.12) lc(2) b() -bs(508.2,280.05,0) -bs(508.2,304.25,0) +bs(495.602,285,0) +bs(495.602,309.199,0) lw(1.12) lc(2) b() -bs(508.2,304.25,0) -bs(424.2,304.25,0) +bs(495.602,309.199,0) +bs(411.602,309.199,0) lw(1.12) lc(2) b() -bs(424.2,304.25,0) -bs(424.2,280.05,0) +bs(411.602,309.199,0) +bs(411.602,285,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xiner',(436.55,287.25)) +txt('Xiner',(423.95,292.2)) +fp((0,0,0)) +Fn('Helvetica') +Fs(14) +txt('ama',(456.514,292.2)) +fp((0,0,0)) +le() +b() +bs(548.602,285.102,0) +bs(548.602,283,0) +bs(632.602,283,0) +bs(632.602,307,0) +bs(630.5,307,0) +bs(630.5,285.102,0) +bs(548.602,285.102,0) +bC() +fp((0.792,0.882,1)) +le() +b() +bs(546.5,285.102,0) +bs(630.5,285.102,0) +bs(630.5,309.102,0) +bs(546.5,309.102,0) +bs(546.5,285.102,0) +lw(1.12) +lc(2) +b() +bs(546.5,285.102,0) +bs(630.5,285.102,0) +lw(1.12) +lc(2) +b() +bs(630.5,285.102,0) +bs(630.5,309.102,0) +lw(1.12) +lc(2) +b() +bs(630.5,309.102,0) +bs(546.5,309.102,0) +lw(1.12) +lc(2) +b() +bs(546.5,309.102,0) +bs(546.5,285.102,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('ama',(469.125,287.25)) +txt('Xi',(582.75,292.1)) fp((0,0,0)) le() b() -bs(561.2,280.15,0) -bs(561.2,278.05,0) -bs(645.2,278.05,0) -bs(645.2,302.05,0) -bs(643.1,302.05,0) -bs(643.1,280.15,0) -bs(561.2,280.15,0) +bs(10.5,222.801,0) +bs(10.5,220.699,0) +bs(94.5,220.699,0) +bs(94.5,247.898,0) +bs(92.3984,247.898,0) +bs(92.3984,222.801,0) +bs(10.5,222.801,0) bC() fp((0.792,0.882,1)) le() b() -bs(559.1,280.15,0) -bs(643.1,280.15,0) -bs(643.1,304.15,0) -bs(559.1,304.15,0) -bs(559.1,280.15,0) +bs(8.39844,222.801,0) +bs(92.3984,222.801,0) +bs(92.3984,250,0) +bs(8.39844,250,0) +bs(8.39844,222.801,0) lw(1.12) lc(2) b() -bs(559.1,280.15,0) -bs(643.1,280.15,0) +bs(8.39844,222.801,0) +bs(92.3984,222.801,0) lw(1.12) lc(2) b() -bs(643.1,280.15,0) -bs(643.1,304.15,0) +bs(92.3984,222.801,0) +bs(92.3984,250,0) lw(1.12) lc(2) b() -bs(643.1,304.15,0) -bs(559.1,304.15,0) +bs(92.3984,250,0) +bs(8.39844,250,0) lw(1.12) lc(2) b() -bs(559.1,304.15,0) -bs(559.1,280.15,0) +bs(8.39844,250,0) +bs(8.39844,222.801,0) +fp((0,0,0)) +Fn('Helvetica') +Fs(14) +txt('F',(18.4,232.85)) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xi',(595.35,287.15)) +txt('ontconfig',(26.5508,232.85)) fp((0,0,0)) le() b() -bs(268.8,220.85,0) -bs(268.8,218.75,0) -bs(352.8,218.75,0) -bs(352.8,242.95,0) -bs(350.7,242.95,0) -bs(350.7,220.85,0) -bs(268.8,220.85,0) +bs(312.898,225.801,0) +bs(312.898,223.699,0) +bs(396.898,223.699,0) +bs(396.898,247.898,0) +bs(394.801,247.898,0) +bs(394.801,225.801,0) +bs(312.898,225.801,0) bC() fp((0.792,0.882,1)) le() b() -bs(266.7,220.85,0) -bs(350.7,220.85,0) -bs(350.7,245.05,0) -bs(266.7,245.05,0) -bs(266.7,220.85,0) +bs(310.801,225.801,0) +bs(394.801,225.801,0) +bs(394.801,250,0) +bs(310.801,250,0) +bs(310.801,225.801,0) lw(1.12) lc(2) b() -bs(266.7,220.85,0) -bs(350.7,220.85,0) +bs(310.801,225.801,0) +bs(394.801,225.801,0) lw(1.12) lc(2) b() -bs(350.7,220.85,0) -bs(350.7,245.05,0) +bs(394.801,225.801,0) +bs(394.801,250,0) lw(1.12) lc(2) b() -bs(350.7,245.05,0) -bs(266.7,245.05,0) +bs(394.801,250,0) +bs(310.801,250,0) lw(1.12) lc(2) b() -bs(266.7,245.05,0) -bs(266.7,220.85,0) +bs(310.801,250,0) +bs(310.801,225.801,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('XRender',(281.15,228.05)) +txt('XRender',(325.25,233)) fp((0,0,0)) le() b() -bs(662,220.95,0) -bs(662,218.85,0) -bs(746,218.85,0) -bs(746,242.95,0) -bs(743.9,242.95,0) -bs(743.9,220.95,0) -bs(662,220.95,0) +bs(649.398,225.898,0) +bs(649.398,223.801,0) +bs(733.398,223.801,0) +bs(733.398,247.898,0) +bs(731.301,247.898,0) +bs(731.301,225.898,0) +bs(649.398,225.898,0) bC() fp((0.961,0.961,0.863)) le() b() -bs(659.9,220.95,0) -bs(743.9,220.95,0) -bs(743.9,245.05,0) -bs(659.9,245.05,0) -bs(659.9,220.95,0) +bs(647.301,225.898,0) +bs(731.301,225.898,0) +bs(731.301,250,0) +bs(647.301,250,0) +bs(647.301,225.898,0) lw(1.12) lc(2) b() -bs(659.9,220.95,0) -bs(743.9,220.95,0) +bs(647.301,225.898,0) +bs(731.301,225.898,0) lw(1.12) lc(2) b() -bs(743.9,220.95,0) -bs(743.9,245.05,0) +bs(731.301,225.898,0) +bs(731.301,250,0) lw(1.12) lc(2) b() -bs(743.9,245.05,0) -bs(659.9,245.05,0) +bs(731.301,250,0) +bs(647.301,250,0) lw(1.12) lc(2) b() -bs(659.9,245.05,0) -bs(659.9,220.95,0) +bs(647.301,250,0) +bs(647.301,225.898,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xt*',(692.9,228.05)) +txt('Xt*',(680.3,233)) fp((0,0,0)) le() b() -bs(10.4998,160.8,0) -bs(10.4998,158.7,0) -bs(94.4998,158.7,0) -bs(94.4998,183.75,0) -bs(92.3999,183.75,0) -bs(92.3999,160.8,0) -bs(10.4998,160.8,0) +bs(10.5,160.801,0) +bs(10.5,158.699,0) +bs(94.5,158.699,0) +bs(94.5,185.699,0) +bs(92.3984,185.699,0) +bs(92.3984,160.801,0) +bs(10.5,160.801,0) +bC() +fp((0.792,0.882,1)) +le() +b() +bs(8.39844,160.801,0) +bs(92.3984,160.801,0) +bs(92.3984,187.801,0) +bs(8.39844,187.801,0) +bs(8.39844,160.801,0) +lw(1.12) +lc(2) +b() +bs(8.39844,160.801,0) +bs(92.3984,160.801,0) +lw(1.12) +lc(2) +b() +bs(92.3984,160.801,0) +bs(92.3984,187.801,0) +lw(1.12) +lc(2) +b() +bs(92.3984,187.801,0) +bs(8.39844,187.801,0) +lw(1.12) +lc(2) +b() +bs(8.39844,187.801,0) +bs(8.39844,160.801,0) +fp((0,0,0)) +Fn('Helvetica') +Fs(14) +txt('F',(21.9,170.8)) +fp((0,0,0)) +Fn('Helvetica') +Fs(14) +txt('reeT',(29.8508,170.8)) +fp((0,0,0)) +Fn('Helvetica') +Fs(14) +txt('ype',(56.9742,170.8)) +fp((0,0,0)) +le() +b() +bs(111.301,161.801,0) +bs(111.301,159.699,0) +bs(195.301,159.699,0) +bs(195.301,184.75,0) +bs(193.199,184.75,0) +bs(193.199,161.801,0) +bs(111.301,161.801,0) bC() fp((0.61,0.61,1)) le() b() -bs(8.3999,160.8,0) -bs(92.3999,160.8,0) -bs(92.3999,185.85,0) -bs(8.3999,185.85,0) -bs(8.3999,160.8,0) +bs(109.199,161.801,0) +bs(193.199,161.801,0) +bs(193.199,186.852,0) +bs(109.199,186.852,0) +bs(109.199,161.801,0) lw(1.12) lc(2) b() -bs(8.3999,160.8,0) -bs(92.3999,160.8,0) +bs(109.199,161.801,0) +bs(193.199,161.801,0) lw(1.12) lc(2) b() -bs(92.3999,160.8,0) -bs(92.3999,185.85,0) +bs(193.199,161.801,0) +bs(193.199,186.852,0) lw(1.12) lc(2) b() -bs(92.3999,185.85,0) -bs(8.3999,185.85,0) +bs(193.199,186.852,0) +bs(109.199,186.852,0) lw(1.12) lc(2) b() -bs(8.3999,185.85,0) -bs(8.3999,160.8,0) +bs(109.199,186.852,0) +bs(109.199,161.801,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('QtCore',(28.1997,168.55)) +txt('QtCore',(129,169.55)) fp((0,0,0)) le() b() -bs(268.8,161.15,0) -bs(268.8,159.05,0) -bs(352.8,159.05,0) -bs(352.8,183.4,0) -bs(350.7,183.4,0) -bs(350.7,161.15,0) -bs(268.8,161.15,0) +bs(312.898,162.148,0) +bs(312.898,160.051,0) +bs(396.898,160.051,0) +bs(396.898,184.398,0) +bs(394.801,184.398,0) +bs(394.801,162.148,0) +bs(312.898,162.148,0) bC() fp((0.792,0.882,1)) le() b() -bs(266.7,161.15,0) -bs(350.7,161.15,0) -bs(350.7,185.5,0) -bs(266.7,185.5,0) -bs(266.7,161.15,0) +bs(310.801,162.148,0) +bs(394.801,162.148,0) +bs(394.801,186.5,0) +bs(310.801,186.5,0) +bs(310.801,162.148,0) lw(1.12) lc(2) b() -bs(266.7,161.15,0) -bs(350.7,161.15,0) +bs(310.801,162.148,0) +bs(394.801,162.148,0) lw(1.12) lc(2) b() -bs(350.7,161.15,0) -bs(350.7,185.5,0) +bs(394.801,162.148,0) +bs(394.801,186.5,0) lw(1.12) lc(2) b() -bs(350.7,185.5,0) -bs(266.7,185.5,0) +bs(394.801,186.5,0) +bs(310.801,186.5,0) lw(1.12) lc(2) b() -bs(266.7,185.5,0) -bs(266.7,161.15,0) +bs(310.801,186.5,0) +bs(310.801,162.148,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xfix',(290.1,168.35)) +txt('Xfix',(334.2,169.35)) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('es',(313.038,168.35)) +txt('es',(357.136,169.35)) fp((0,0,0)) le() b() -bs(426.3,161.25,0) -bs(426.3,159.15,0) -bs(510.3,159.15,0) -bs(510.3,183.35,0) -bs(508.2,183.35,0) -bs(508.2,161.25,0) -bs(426.3,161.25,0) +bs(413.699,162.199,0) +bs(413.699,160.102,0) +bs(497.699,160.102,0) +bs(497.699,184.301,0) +bs(495.602,184.301,0) +bs(495.602,162.199,0) +bs(413.699,162.199,0) bC() fp((0.961,0.961,0.863)) le() b() -bs(424.2,161.25,0) -bs(508.2,161.25,0) -bs(508.2,185.45,0) -bs(424.2,185.45,0) -bs(424.2,161.25,0) +bs(411.602,162.199,0) +bs(495.602,162.199,0) +bs(495.602,186.398,0) +bs(411.602,186.398,0) +bs(411.602,162.199,0) lw(1.12) lc(2) b() -bs(424.2,161.25,0) -bs(508.2,161.25,0) +bs(411.602,162.199,0) +bs(495.602,162.199,0) lw(1.12) lc(2) b() -bs(508.2,161.25,0) -bs(508.2,185.45,0) +bs(495.602,162.199,0) +bs(495.602,186.398,0) lw(1.12) lc(2) b() -bs(508.2,185.45,0) -bs(424.2,185.45,0) +bs(495.602,186.398,0) +bs(411.602,186.398,0) lw(1.12) lc(2) b() -bs(424.2,185.45,0) -bs(424.2,161.25,0) +bs(411.602,186.398,0) +bs(411.602,162.199,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Xe',(452.55,168.45)) +txt('Xe',(439.95,169.4)) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('xt',(469.272,168.45)) +txt('xt',(456.667,169.4)) fp((0,0,0)) le() b() -bs(662,161.05,0) -bs(662,158.95,0) -bs(746,158.95,0) -bs(746,183.5,0) -bs(743.9,183.5,0) -bs(743.9,161.05,0) -bs(662,161.05,0) +bs(649.398,162.051,0) +bs(649.398,159.949,0) +bs(733.398,159.949,0) +bs(733.398,184.5,0) +bs(731.301,184.5,0) +bs(731.301,162.051,0) +bs(649.398,162.051,0) bC() fp((0.761,0.98,0.98)) le() b() -bs(659.9,161.05,0) -bs(743.9,161.05,0) -bs(743.9,185.6,0) -bs(659.9,185.6,0) -bs(659.9,161.05,0) +bs(647.301,162.051,0) +bs(731.301,162.051,0) +bs(731.301,186.602,0) +bs(647.301,186.602,0) +bs(647.301,162.051,0) lw(1.12) lc(2) b() -bs(659.9,161.05,0) -bs(743.9,161.05,0) +bs(647.301,162.051,0) +bs(731.301,162.051,0) lw(1.12) lc(2) b() -bs(743.9,161.05,0) -bs(743.9,185.6,0) +bs(731.301,162.051,0) +bs(731.301,186.602,0) lw(1.12) lc(2) b() -bs(743.9,185.6,0) -bs(659.9,185.6,0) +bs(731.301,186.602,0) +bs(647.301,186.602,0) lw(1.12) lc(2) b() -bs(659.9,185.6,0) -bs(659.9,161.05,0) +bs(647.301,186.602,0) +bs(647.301,162.051,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('SM',(691.9,168.3)) +txt('SM',(679.3,169.3)) fp((0,0,0)) le() b() -bs(10.4998,98.9001,0) -bs(10.4998,96.8003,0) -bs(94.4998,96.8003,0) -bs(94.4998,123.7,0) -bs(92.3999,123.7,0) -bs(92.3999,98.9001,0) -bs(10.4998,98.9001,0) +bs(111.301,98.8984,0) +bs(111.301,96.8008,0) +bs(195.301,96.8008,0) +bs(195.301,123.699,0) +bs(193.199,123.699,0) +bs(193.199,98.8984,0) +bs(111.301,98.8984,0) bC() fp((0.741,0.718,0.42)) le() b() -bs(8.3999,98.9001,0) -bs(92.3999,98.9001,0) -bs(92.3999,125.8,0) -bs(8.3999,125.8,0) -bs(8.3999,98.9001,0) +bs(109.199,98.8984,0) +bs(193.199,98.8984,0) +bs(193.199,125.801,0) +bs(109.199,125.801,0) +bs(109.199,98.8984,0) lw(1.12) lc(2) b() -bs(8.3999,98.9001,0) -bs(92.3999,98.9001,0) +bs(109.199,98.8984,0) +bs(193.199,98.8984,0) lw(1.12) lc(2) b() -bs(92.3999,98.9001,0) -bs(92.3999,125.8,0) +bs(193.199,98.8984,0) +bs(193.199,125.801,0) lw(1.12) lc(2) b() -bs(92.3999,125.8,0) -bs(8.3999,125.8,0) +bs(193.199,125.801,0) +bs(109.199,125.801,0) lw(1.12) lc(2) b() -bs(8.3999,125.8,0) -bs(8.3999,98.9001,0) +bs(109.199,125.801,0) +bs(109.199,98.8984,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('pthread',(27.1499,108.8)) +txt('pthread',(127.95,108.8)) fp((0,0,0)) le() b() -bs(111.3,100.1,0) -bs(111.3,98.0002,0) -bs(195.3,98.0002,0) -bs(195.3,122.55,0) -bs(193.2,122.55,0) -bs(193.2,100.1,0) -bs(111.3,100.1,0) +bs(212.102,100.102,0) +bs(212.102,98,0) +bs(296.102,98,0) +bs(296.102,122.551,0) +bs(294,122.551,0) +bs(294,100.102,0) +bs(212.102,100.102,0) bC() fp((0.7,0.7,0.7)) le() b() -bs(109.2,100.1,0) -bs(193.2,100.1,0) -bs(193.2,124.65,0) -bs(109.2,124.65,0) -bs(109.2,100.1,0) +bs(210,100.102,0) +bs(294,100.102,0) +bs(294,124.648,0) +bs(210,124.648,0) +bs(210,100.102,0) lw(1.12) lc(2) b() -bs(109.2,100.1,0) -bs(193.2,100.1,0) +bs(210,100.102,0) +bs(294,100.102,0) lw(1.12) lc(2) b() -bs(193.2,100.1,0) -bs(193.2,124.65,0) +bs(294,100.102,0) +bs(294,124.648,0) lw(1.12) lc(2) b() -bs(193.2,124.65,0) -bs(109.2,124.65,0) +bs(294,124.648,0) +bs(210,124.648,0) lw(1.12) lc(2) b() -bs(109.2,124.65,0) -bs(109.2,100.1,0) +bs(210,124.648,0) +bs(210,100.102,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('Glib',(139.05,107.35)) +txt('Glib',(239.85,107.35)) fp((0,0,0)) le() b() -bs(426.3,100.35,0) -bs(426.3,98.2502,0) -bs(510.3,98.2502,0) -bs(510.3,122.25,0) -bs(508.2,122.25,0) -bs(508.2,100.35,0) -bs(426.3,100.35,0) +bs(413.699,100.352,0) +bs(413.699,98.25,0) +bs(497.699,98.25,0) +bs(497.699,122.25,0) +bs(495.602,122.25,0) +bs(495.602,100.352,0) +bs(413.699,100.352,0) bC() fp((0.961,0.961,0.863)) le() b() -bs(424.2,100.35,0) -bs(508.2,100.35,0) -bs(508.2,124.35,0) -bs(424.2,124.35,0) -bs(424.2,100.35,0) +bs(411.602,100.352,0) +bs(495.602,100.352,0) +bs(495.602,124.352,0) +bs(411.602,124.352,0) +bs(411.602,100.352,0) lw(1.12) lc(2) b() -bs(424.2,100.35,0) -bs(508.2,100.35,0) +bs(411.602,100.352,0) +bs(495.602,100.352,0) lw(1.12) lc(2) b() -bs(508.2,100.35,0) -bs(508.2,124.35,0) +bs(495.602,100.352,0) +bs(495.602,124.352,0) lw(1.12) lc(2) b() -bs(508.2,124.35,0) -bs(424.2,124.35,0) +bs(495.602,124.352,0) +bs(411.602,124.352,0) lw(1.12) lc(2) b() -bs(424.2,124.35,0) -bs(424.2,100.35,0) +bs(411.602,124.352,0) +bs(411.602,100.352,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('X11',(455.15,107.35)) +txt('X11',(442.55,107.35)) fp((0,0,0)) le() b() -bs(662,100.1,0) -bs(662,98.0002,0) -bs(746,98.0002,0) -bs(746,122.55,0) -bs(743.9,122.55,0) -bs(743.9,100.1,0) -bs(662,100.1,0) +bs(649.398,100.102,0) +bs(649.398,98,0) +bs(733.398,98,0) +bs(733.398,122.551,0) +bs(731.301,122.551,0) +bs(731.301,100.102,0) +bs(649.398,100.102,0) bC() fp((0.761,0.98,0.98)) le() b() -bs(659.9,100.1,0) -bs(743.9,100.1,0) -bs(743.9,124.65,0) -bs(659.9,124.65,0) -bs(659.9,100.1,0) +bs(647.301,100.102,0) +bs(731.301,100.102,0) +bs(731.301,124.648,0) +bs(647.301,124.648,0) +bs(647.301,100.102,0) lw(1.12) lc(2) b() -bs(659.9,100.1,0) -bs(743.9,100.1,0) +bs(647.301,100.102,0) +bs(731.301,100.102,0) lw(1.12) lc(2) b() -bs(743.9,100.1,0) -bs(743.9,124.65,0) +bs(731.301,100.102,0) +bs(731.301,124.648,0) lw(1.12) lc(2) b() -bs(743.9,124.65,0) -bs(659.9,124.65,0) +bs(731.301,124.648,0) +bs(647.301,124.648,0) lw(1.12) lc(2) b() -bs(659.9,124.65,0) -bs(659.9,100.1,0) +bs(647.301,124.648,0) +bs(647.301,100.102,0) fp((0,0,0)) Fn('Helvetica') Fs(14) -txt('ICE',(690.6,107.35)) +txt('ICE',(678,107.35)) fp((0,0,0)) Fn('Helvetica') -txt('some',(585.05,38.7002)) +txt('some',(572.45,38.7)) fp((0,0,0)) Fn('Helvetica') -txt('configur',(617.15,38.7002)) +txt('configur',(604.55,38.7)) fp((0,0,0)) Fn('Helvetica') -txt('ations',(659.733,38.7002)) +txt('ations',(647.13,38.7)) fp((0,0,0)) Fn('Helvetica') -txt('only',(694.4,38.7002)) +txt('only',(681.8,38.7)) fp((0,0,0)) Fn('Helvetica') -txt('*',(568.85,22.5002)) +txt('*',(556.25,22.5)) fp((0,0,0)) Fn('Helvetica') -txt('Xt',(585.05,22.5002)) +txt('Xt',(572.45,22.5)) fp((0,0,0)) Fn('Helvetica') -txt('intr',(599.4,22.5002)) +txt('intr',(586.8,22.5)) fp((0,0,0)) Fn('Helvetica') -txt('insics',(616.217,22.5002)) +txt('insics',(603.61,22.5)) fp((0,0,0)) Fn('Helvetica') -txt('only',(648.95,22.5002)) +txt('only',(636.35,22.5)) lw(1.12) lc(2) -ld((0, 2.4999899999999999)) +ld((0, 2.5)) b() -bs(308.7,339.25,0) -bs(308.7,328.05,0) +bs(352.801,344.199,0) +bs(352.801,333,0) lw(1.12) lc(2) -ld((0, 2.0312000000000001)) +ld((0, 2.03125)) b() -bs(308.7,328.05,0) -bs(308.7,332.6,0) +bs(352.801,333,0) +bs(352.801,337.551,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(308.7,332.6,0) -bs(308.7,332.6,0) -bc(308.7,330.744,309.438,328.963,310.75,327.651,0) +bs(352.801,337.551,0) +bs(352.801,337.551,0) +bc(352.801,335.695,353.539,333.914,354.852,332.602,0) lw(1.12) lc(2) -ld((0, 2.4543599999999999)) +ld((0, 2.45438)) b() -bs(310.75,327.65,0) -bs(310.75,327.651,0) -bc(312.063,326.338,313.844,325.6,315.7,325.6,0) +bs(354.852,332.602,0) +bs(354.852,332.602,0) +bc(356.164,331.289,357.945,330.551,359.801,330.551,0) lw(1.12) lc(2) -ld((0, 2.4639500000000001)) +ld((0, 2.4218799999999998)) b() -bs(315.7,325.6,0) -bs(387.45,325.6,0) +bs(359.801,330.551,0) +bs(403.199,330.551,0) lw(1.12) lc(2) -ld((0, 2.4639500000000001)) +ld((0, 2.4218799999999998)) b() -bs(387.45,325.6,0) -bs(459.2,325.6,0) +bs(403.199,330.551,0) +bs(446.602,330.551,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(459.2,325.6,0) -bs(459.2,325.6,0) -bc(461.056,325.6,462.837,324.863,464.15,323.55,0) +bs(446.602,330.551,0) +bs(446.602,330.551,0) +bc(448.457,330.551,450.238,329.812,451.551,328.5,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(464.15,323.55,0) -bs(464.15,323.55,0) -bc(465.462,322.237,466.2,320.457,466.2,318.6,0) +bs(451.551,328.5,0) +bs(451.551,328.5,0) +bc(452.863,327.188,453.602,325.406,453.602,323.551,0) lw(1.12) lc(2) -ld((0, 2.3437899999999998)) +ld((0, 2.3437399999999999)) b() -bs(466.2,318.6,0) -bs(466.2,313.35,0) +bs(453.602,323.551,0) +bs(453.602,318.301,0) lw(1.12) lc(2) ld((0, 2.5)) b() -bs(466.2,313.35,0) -bs(466.2,311.95,0) +bs(453.602,318.301,0) +bs(453.602,316.898,0) fp((0,0,0)) le() b() -bs(462.35,311.95,0) -bs(466.199,304.25,0) -bs(470.05,311.95,0) +bs(449.75,316.898,0) +bs(453.602,309.199,0) +bs(457.449,316.898,0) lw(1.12) lc(2) -ld((0, 2.4999899999999999)) +ld((0, 2.5)) b() -bs(308.7,339.25,0) -bs(308.7,328.05,0) +bs(352.801,344.199,0) +bs(352.801,333,0) lw(1.12) lc(2) -ld((0, 2.0088900000000001)) +ld((0, 2.0089299999999999)) b() -bs(308.7,328.05,0) -bs(308.7,332.55,0) +bs(352.801,333,0) +bs(352.801,337.5,0) +lw(1.12) +lc(2) +ld((0, 2.4543599999999999)) +b() +bs(352.801,337.5,0) +bs(352.801,337.5,0) +bc(352.801,335.645,353.539,333.863,354.852,332.551,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(308.7,332.55,0) -bs(308.7,332.55,0) -bc(308.7,330.694,309.438,328.913,310.75,327.601,0) +bs(354.852,332.551,0) +bs(354.852,332.551,0) +bc(356.164,331.238,357.945,330.5,359.801,330.5,0) lw(1.12) lc(2) -ld((0, 2.4543599999999999)) +ld((0, 2.4743300000000001)) b() -bs(310.75,327.6,0) -bs(310.75,327.601,0) -bc(312.063,326.288,313.844,325.55,315.7,325.55,0) +bs(359.801,330.5,0) +bs(470.648,330.5,0) lw(1.12) lc(2) -ld((0, 2.4857100000000001)) +ld((0, 2.4743300000000001)) b() -bs(459.2,325.6,0) -bs(594.1,325.55,0) +bs(470.648,330.5,0) +bs(581.5,330.5,0) lw(1.12) lc(2) -ld((0, 2.4543900000000001)) +ld((0, 2.45438)) b() -bs(594.1,325.55,0) -bs(594.1,325.55,0) -bc(595.956,325.55,597.737,324.813,599.05,323.5,0) +bs(581.5,330.5,0) +bs(581.5,330.5,0) +bc(583.355,330.5,585.137,329.762,586.449,328.449,0) lw(1.12) lc(2) -ld((0, 2.4544100000000002)) +ld((0, 2.45438)) b() -bs(599.05,323.5,0) -bs(599.05,323.5,0) -bc(600.362,322.187,601.1,320.407,601.1,318.55,0) +bs(586.449,328.449,0) +bs(586.449,328.449,0) +bc(587.762,327.137,588.5,325.355,588.5,323.5,0) lw(1.12) lc(2) -ld((0, 2.3660899999999998)) +ld((0, 2.36605)) b() -bs(601.1,318.55,0) -bs(601.1,313.25,0) +bs(588.5,323.5,0) +bs(588.5,318.199,0) lw(1.12) lc(2) ld((0, 2.5)) b() -bs(601.1,313.25,0) -bs(601.1,311.85,0) +bs(588.5,318.199,0) +bs(588.5,316.801,0) fp((0,0,0)) le() b() -bs(597.25,311.85,0) -bs(601.099,304.15,0) -bs(604.949,311.85,0) +bs(584.648,316.801,0) +bs(588.5,309.102,0) +bs(592.352,316.801,0) lw(1.12) lc(2) b() -bs(266.7,351.775,0) -bs(255.5,351.775,0) +bs(310.801,356.727,0) +bs(299.602,356.727,0) lw(1.12) lc(2) b() -bs(255.5,351.775,0) -bs(57.3999,351.775,0) +bs(299.602,356.727,0) +bs(158.199,356.727,0) lw(1.12) lc(2) b() -bs(57.3999,351.775,0) -bs(57.3999,351.775,0) -bc(53.5339,351.775,50.3999,348.641,50.3999,344.775,0) +bs(158.199,356.727,0) +bs(158.199,356.727,0) +bc(154.336,356.727,151.199,353.59,151.199,349.727,0) lw(1.12) lc(2) b() -bs(50.3999,344.775,0) -bs(50.3999,194.95,0) +bs(151.199,349.727,0) +bs(151.199,195.949,0) lw(1.12) lc(2) b() -bs(50.3999,194.95,0) -bs(50.3999,193.55,0) +bs(151.199,195.949,0) +bs(151.199,194.551,0) fp((0,0,0)) le() b() -bs(46.5496,193.55,0) -bs(50.3994,185.85,0) -bs(54.2495,193.55,0) +bs(147.352,194.551,0) +bs(151.199,186.852,0) +bs(155.051,194.551,0) lw(1.12) lc(2) b() -bs(50.3999,160.8,0) -bs(50.3999,133.5,0) +bs(151.199,161.801,0) +bs(151.199,133.5,0) fp((0,0,0)) le() b() -bs(46.5496,133.5,0) -bs(50.3994,125.8,0) -bs(54.2495,133.5,0) +bs(147.352,133.5,0) +bs(151.199,125.801,0) +bs(155.051,133.5,0) lw(1.12) lc(2) ld((0, 2)) b() -bs(50.3999,160.8,0) -bs(50.3999,149.6,0) +bs(151.199,161.801,0) +bs(151.199,150.602,0) lw(1.12) lc(2) -ld((0, 1.7745500000000001)) +ld((0, 1.5513600000000001)) b() -bs(50.3999,149.6,0) -bs(50.3999,153.575,0) +bs(151.199,150.602,0) +bs(151.199,154.074,0) lw(1.12) lc(2) -ld((0, 2.4543599999999999)) +ld((0, 2.4543400000000002)) b() -bs(50.3999,153.575,0) -bs(50.3999,153.575,0) -bc(50.3999,151.719,51.1375,149.938,52.4502,148.625,0) +bs(151.199,154.074,0) +bs(151.199,154.074,0) +bc(151.199,152.219,151.938,150.438,153.25,149.125,0) lw(1.12) lc(2) ld((0, 2.4543699999999999)) b() -bs(52.45,148.625,0) -bs(52.4502,148.625,0) -bc(53.7629,147.313,55.5435,146.575,57.3999,146.575,0) +bs(153.25,149.125,0) +bs(153.25,149.125,0) +bc(154.562,147.812,156.344,147.074,158.199,147.074,0) lw(1.12) lc(2) ld((0, 2.4218799999999998)) b() -bs(57.3999,146.575,0) -bs(100.8,146.575,0) +bs(158.199,147.074,0) +bs(201.602,147.074,0) lw(1.12) lc(2) ld((0, 2.4218799999999998)) b() -bs(100.8,146.575,0) -bs(144.2,146.575,0) +bs(201.602,147.074,0) +bs(245,147.074,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(144.2,146.575,0) -bs(144.2,146.575,0) -bc(146.056,146.575,147.837,145.838,149.15,144.525,0) +bs(245,147.074,0) +bs(245,147.074,0) +bc(246.855,147.074,248.637,146.336,249.949,145.023,0) lw(1.12) lc(2) -ld((0, 2.4543699999999999)) +ld((0, 2.4543900000000001)) b() -bs(149.15,144.525,0) -bs(149.15,144.525,0) -bc(150.462,143.212,151.2,141.432,151.2,139.575,0) +bs(249.949,145.023,0) +bs(249.949,145.023,0) +bc(251.262,143.711,252,141.93,252,140.074,0) lw(1.12) lc(2) -ld((0, 1.73363)) +ld((0, 1.88243)) b() -bs(151.2,139.575,0) -bs(151.2,133.75,0) +bs(252,140.074,0) +bs(252,133.75,0) lw(1.12) lc(2) ld((0, 2.5)) b() -bs(151.2,133.75,0) -bs(151.2,132.35,0) +bs(252,133.75,0) +bs(252,132.352,0) fp((0,0,0)) le() b() -bs(147.35,132.35,0) -bs(151.199,124.65,0) -bs(155.05,132.35,0) +bs(248.148,132.352,0) +bs(252,124.648,0) +bs(255.852,132.352,0) lw(1.12) lc(2) b() -bs(350.7,351.775,0) -bs(361.9,351.775,0) +bs(394.801,356.727,0) +bs(406,356.727,0) lw(1.12) lc(2) b() -bs(361.9,351.775,0) -bs(694.9,351.775,0) +bs(406,356.727,0) +bs(682.301,356.727,0) lw(1.12) lc(2) b() -bs(694.9,351.775,0) -bs(694.9,351.775,0) -bc(698.766,351.775,701.9,348.641,701.9,344.775,0) +bs(682.301,356.727,0) +bs(682.301,356.727,0) +bc(686.164,356.727,689.301,353.59,689.301,349.727,0) lw(1.12) lc(2) b() -bs(701.9,344.775,0) -bs(701.9,254.15,0) +bs(689.301,349.727,0) +bs(689.301,259.102,0) lw(1.12) lc(2) b() -bs(701.9,254.15,0) -bs(701.9,252.75,0) +bs(689.301,259.102,0) +bs(689.301,257.699,0) fp((0,0,0)) le() b() -bs(698.05,252.75,0) -bs(701.899,245.05,0) -bs(705.75,252.75,0) +bs(685.449,257.699,0) +bs(689.301,250,0) +bs(693.148,257.699,0) lw(1.12) lc(2) -ld((0, 2.4375200000000001)) +ld((0, 2.4375)) b() -bs(308.7,339.25,0) -bs(308.7,311.95,0) +bs(352.801,344.199,0) +bs(352.801,316.898,0) fp((0,0,0)) le() b() -bs(304.85,311.95,0) -bs(308.699,304.25,0) -bs(312.55,311.95,0) +bs(348.949,316.898,0) +bs(352.801,309.199,0) +bs(356.648,316.898,0) lw(1.12) lc(2) -ld((0, 2.4999899999999999)) +ld((0, 2.5)) b() -bs(308.7,339.25,0) -bs(308.7,328.05,0) +bs(352.801,344.199,0) +bs(352.801,333,0) lw(1.12) lc(2) -ld((0, 2.0312000000000001)) +ld((0, 2.03125)) b() -bs(308.7,328.05,0) -bs(308.7,332.6,0) +bs(352.801,333,0) +bs(352.801,337.551,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(308.7,332.6,0) -bs(308.7,332.6,0) -bc(308.7,330.744,307.962,328.963,306.65,327.651,0) +bs(352.801,337.551,0) +bs(352.801,337.551,0) +bc(352.801,335.695,352.062,333.914,350.75,332.602,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(306.65,327.65,0) -bs(306.65,327.651,0) -bc(305.337,326.338,303.556,325.601,301.7,325.601,0) +bs(350.75,332.602,0) +bs(350.75,332.602,0) +bc(349.438,331.289,347.656,330.551,345.801,330.551,0) lw(1.12) lc(2) -ld((0, 2.4639500000000001)) +ld((0, 2.4218799999999998)) b() -bs(301.7,325.6,0) -bs(229.95,325.6,0) +bs(345.801,330.551,0) +bs(302.398,330.551,0) lw(1.12) lc(2) -ld((0, 2.4639500000000001)) +ld((0, 2.4218799999999998)) b() -bs(229.95,325.6,0) -bs(158.2,325.6,0) +bs(302.398,330.551,0) +bs(259,330.551,0) lw(1.12) lc(2) -ld((0, 2.4543699999999999)) +ld((0, 2.45438)) b() -bs(158.2,325.6,0) -bs(158.2,325.6,0) -bc(156.344,325.6,154.563,324.863,153.25,323.55,0) +bs(259,330.551,0) +bs(259,330.551,0) +bc(257.145,330.551,255.363,329.812,254.051,328.5,0) lw(1.12) lc(2) ld((0, 2.45438)) b() -bs(153.25,323.55,0) -bs(153.25,323.55,0) -bc(151.938,322.237,151.2,320.457,151.2,318.6,0) +bs(254.051,328.5,0) +bs(254.051,328.5,0) +bc(252.738,327.188,252,325.406,252,323.551,0) lw(1.12) lc(2) -ld((0, 2.3437899999999998)) +ld((0, 2.3437399999999999)) b() -bs(151.2,318.6,0) -bs(151.2,313.35,0) +bs(252,323.551,0) +bs(252,318.301,0) lw(1.12) lc(2) ld((0, 2.5)) b() -bs(151.2,313.35,0) -bs(151.2,311.95,0) +bs(252,318.301,0) +bs(252,316.898,0) fp((0,0,0)) le() b() -bs(147.35,311.95,0) -bs(151.199,304.25,0) -bs(155.05,311.95,0) +bs(248.148,316.898,0) +bs(252,309.199,0) +bs(255.852,316.898,0) lw(1.12) lc(2) b() -bs(308.7,280.05,0) -bs(308.7,252.75,0) +bs(352.801,285,0) +bs(352.801,257.699,0) fp((0,0,0)) le() b() -bs(304.85,252.75,0) -bs(308.699,245.05,0) -bs(312.55,252.75,0) +bs(348.949,257.699,0) +bs(352.801,250,0) +bs(356.648,257.699,0) lw(1.12) lc(2) b() -bs(466.2,280.05,0) -bs(466.2,193.15,0) +bs(453.602,285,0) +bs(453.602,194.102,0) fp((0,0,0)) le() b() -bs(462.35,193.15,0) -bs(466.199,185.45,0) -bs(470.05,193.15,0) +bs(449.75,194.102,0) +bs(453.602,186.398,0) +bs(457.449,194.102,0) lw(1.12) lc(2) b() -bs(151.2,280.05,0) -bs(151.2,268.85,0) +bs(252,285,0) +bs(252,273.801,0) lw(1.12) lc(2) b() -bs(151.2,268.85,0) -bs(151.2,239.95,0) +bs(252,273.801,0) +bs(252,244.898,0) lw(1.12) lc(2) b() -bs(151.2,239.95,0) -bs(151.2,239.95,0) -bc(151.2,236.084,154.334,232.95,158.2,232.95,0) +bs(252,244.898,0) +bs(252,244.898,0) +bc(252,241.035,255.137,237.898,259,237.898,0) lw(1.12) lc(2) b() -bs(158.2,232.95,0) -bs(257.6,232.95,0) +bs(259,237.898,0) +bs(301.699,237.898,0) lw(1.12) lc(2) b() -bs(257.6,232.95,0) -bs(259,232.95,0) +bs(301.699,237.898,0) +bs(303.102,237.898,0) fp((0,0,0)) le() b() -bs(259,229.1,0) -bs(266.699,232.95,0) -bs(259,236.8,0) +bs(303.102,234.051,0) +bs(310.801,237.898,0) +bs(303.102,241.75,0) lw(1.12) lc(2) b() -bs(350.7,232.95,0) -bs(361.9,232.95,0) +bs(394.801,237.898,0) +bs(406,237.898,0) lw(1.12) lc(2) b() -bs(361.9,232.95,0) -bs(459.2,232.95,0) +bs(406,237.898,0) +bs(446.602,237.898,0) lw(1.12) lc(2) b() -bs(459.2,232.95,0) -bs(459.2,232.95,0) -bc(463.066,232.95,466.2,229.816,466.2,225.95,0) +bs(446.602,237.898,0) +bs(446.602,237.898,0) +bc(450.465,237.898,453.602,234.762,453.602,230.898,0) lw(1.12) lc(2) b() -bs(466.2,225.95,0) -bs(466.2,194.55,0) +bs(453.602,230.898,0) +bs(453.602,195.5,0) lw(1.12) lc(2) b() -bs(466.2,194.55,0) -bs(466.2,193.15,0) +bs(453.602,195.5,0) +bs(453.602,194.102,0) fp((0,0,0)) le() b() -bs(462.35,193.15,0) -bs(466.199,185.45,0) -bs(470.05,193.15,0) +bs(449.75,194.102,0) +bs(453.602,186.398,0) +bs(457.449,194.102,0) lw(1.12) lc(2) b() -bs(559.1,292.15,0) -bs(547.9,292.15,0) +bs(546.5,297.102,0) +bs(535.301,297.102,0) lw(1.12) lc(2) b() -bs(547.9,292.15,0) -bs(544.5,292.15,0) +bs(535.301,297.102,0) +bs(531.898,297.102,0) lw(1.12) lc(2) b() -bs(544.5,292.15,0) -bs(544.5,292.15,0) -bc(542.643,292.15,540.863,291.413,539.55,290.1,0) +bs(531.898,297.102,0) +bs(531.898,297.102,0) +bc(530.043,297.102,528.262,296.363,526.949,295.051,0) lw(1.12) lc(2) b() -bs(539.55,290.1,0) -bs(539.55,290.1,0) -bc(538.238,288.787,537.5,287.007,537.5,285.15,0) +bs(526.949,295.051,0) +bs(526.949,295.051,0) +bc(525.637,293.738,524.898,291.957,524.898,290.102,0) lw(1.12) lc(2) b() -bs(537.5,285.15,0) -bs(537.5,232.75,0) +bs(524.898,290.102,0) +bs(524.898,235.699,0) lw(1.12) lc(2) b() -bs(537.5,232.75,0) -bs(537.5,180.35,0) +bs(524.898,235.699,0) +bs(524.898,181.301,0) lw(1.12) lc(2) b() -bs(537.5,180.35,0) -bs(537.5,180.35,0) -bc(537.5,178.494,536.762,176.713,535.449,175.401,0) +bs(524.898,181.301,0) +bs(524.898,181.301,0) +bc(524.898,179.445,524.16,177.664,522.852,176.352,0) lw(1.12) lc(2) b() -bs(535.449,175.4,0) -bs(535.449,175.401,0) -bc(534.137,174.088,532.356,173.35,530.5,173.35,0) +bs(522.852,176.352,0) +bs(522.852,176.352,0) +bc(521.539,175.039,519.754,174.301,517.898,174.301,0) lw(1.12) lc(2) b() -bs(530.5,173.35,0) -bs(517.3,173.35,0) +bs(517.898,174.301,0) +bs(504.699,174.301,0) lw(1.12) lc(2) b() -bs(517.3,173.35,0) -bs(515.9,173.35,0) +bs(504.699,174.301,0) +bs(503.301,174.301,0) fp((0,0,0)) le() b() -bs(515.9,177.2,0) -bs(508.2,173.351,0) -bs(515.9,169.5,0) +bs(503.301,178.148,0) +bs(495.602,174.301,0) +bs(503.301,170.449,0) lw(1.12) lc(2) b() -bs(701.9,220.95,0) -bs(701.9,193.3,0) +bs(689.301,225.898,0) +bs(689.301,194.301,0) fp((0,0,0)) le() b() -bs(698.05,193.3,0) -bs(701.899,185.6,0) -bs(705.75,193.3,0) +bs(685.449,194.301,0) +bs(689.301,186.602,0) +bs(693.148,194.301,0) lw(1.12) lc(2) b() -bs(659.9,233,0) -bs(648.7,233,0) +bs(647.301,237.949,0) +bs(636.102,237.949,0) lw(1.12) lc(2) b() -bs(648.7,233,0) -bs(594.9,233,0) +bs(636.102,237.949,0) +bs(582.301,237.949,0) lw(1.12) lc(2) b() -bs(594.9,233,0) -bs(594.9,233,0) -bc(593.043,233,591.263,232.263,589.95,230.95,0) +bs(582.301,237.949,0) +bs(582.301,237.949,0) +bc(580.445,237.949,578.664,237.211,577.352,235.898,0) lw(1.12) lc(2) b() -bs(589.95,230.95,0) -bs(589.95,230.95,0) -bc(588.638,229.637,587.9,227.857,587.9,226,0) +bs(577.352,235.898,0) +bs(577.352,235.898,0) +bc(576.039,234.586,575.301,232.805,575.301,230.949,0) lw(1.12) lc(2) b() -bs(587.9,226,0) -bs(587.9,172.675,0) +bs(575.301,230.949,0) +bs(575.301,175.148,0) lw(1.12) lc(2) b() -bs(587.9,172.675,0) -bs(587.9,119.35,0) +bs(575.301,175.148,0) +bs(575.301,119.352,0) lw(1.12) lc(2) b() -bs(587.9,119.35,0) -bs(587.9,119.35,0) -bc(587.9,117.494,587.162,115.713,585.85,114.401,0) +bs(575.301,119.352,0) +bs(575.301,119.352,0) +bc(575.301,117.496,574.562,115.711,573.25,114.398,0) lw(1.12) lc(2) b() -bs(585.85,114.4,0) -bs(585.85,114.401,0) -bc(584.537,113.088,582.756,112.35,580.9,112.35,0) +bs(573.25,114.398,0) +bs(573.25,114.398,0) +bc(571.938,113.09,570.156,112.352,568.301,112.352,0) lw(1.12) lc(2) b() -bs(580.9,112.35,0) -bs(517.3,112.35,0) +bs(568.301,112.352,0) +bs(504.699,112.352,0) lw(1.12) lc(2) b() -bs(517.3,112.35,0) -bs(515.9,112.35,0) +bs(504.699,112.352,0) +bs(503.301,112.352,0) fp((0,0,0)) le() b() -bs(515.9,116.2,0) -bs(508.2,112.35,0) -bs(515.9,108.5,0) +bs(503.301,116.199,0) +bs(495.602,112.352,0) +bs(503.301,108.5,0) lw(1.12) lc(2) b() -bs(701.9,161.05,0) -bs(701.9,132.35,0) +bs(689.301,162.051,0) +bs(689.301,132.352,0) fp((0,0,0)) le() b() -bs(698.05,132.35,0) -bs(701.899,124.65,0) -bs(705.75,132.35,0) +bs(685.449,132.352,0) +bs(689.301,124.648,0) +bs(693.148,132.352,0) lw(1.12) lc(2) b() -bs(466.2,161.25,0) -bs(466.2,132.05,0) +bs(453.602,162.199,0) +bs(453.602,132.051,0) fp((0,0,0)) le() b() -bs(462.35,132.05,0) -bs(466.199,124.35,0) -bs(470.05,132.05,0) +bs(449.75,132.051,0) +bs(453.602,124.352,0) +bs(457.449,132.051,0) lw(1.12) lc(2) b() -bs(151.2,280.05,0) -bs(151.2,268.85,0) +bs(252,285,0) +bs(252,273.801,0) lw(1.12) lc(2) b() -bs(151.2,268.85,0) -bs(151.2,180.325,0) +bs(252,273.801,0) +bs(252,181.324,0) lw(1.12) lc(2) b() -bs(151.2,180.325,0) -bs(151.2,180.325,0) -bc(151.2,176.459,154.334,173.325,158.2,173.325,0) +bs(252,181.324,0) +bs(252,181.324,0) +bc(252,177.461,255.137,174.324,259,174.324,0) lw(1.12) lc(2) b() -bs(158.2,173.325,0) -bs(257.6,173.325,0) +bs(259,174.324,0) +bs(301.699,174.324,0) lw(1.12) lc(2) b() -bs(257.6,173.325,0) -bs(259,173.325,0) +bs(301.699,174.324,0) +bs(303.102,174.324,0) fp((0,0,0)) le() b() -bs(259,169.475,0) -bs(266.699,173.325,0) -bs(259,177.175,0) +bs(303.102,170.477,0) +bs(310.801,174.324,0) +bs(303.102,178.176,0) lw(1.12) lc(2) b() -bs(308.7,161.15,0) -bs(308.7,149.95,0) +bs(352.801,162.148,0) +bs(352.801,150.949,0) lw(1.12) lc(2) b() -bs(308.7,149.95,0) -bs(308.7,153.6,0) +bs(352.801,150.949,0) +bs(352.801,154.102,0) lw(1.12) lc(2) b() -bs(308.7,153.6,0) -bs(308.7,153.6,0) -bc(308.7,151.744,309.438,149.963,310.75,148.651,0) +bs(352.801,154.102,0) +bs(352.801,154.102,0) +bc(352.801,152.246,353.539,150.461,354.852,149.148,0) lw(1.12) lc(2) b() -bs(310.75,148.65,0) -bs(310.75,148.651,0) -bc(312.063,147.338,313.844,146.6,315.7,146.6,0) +bs(354.852,149.148,0) +bs(354.852,149.148,0) +bc(356.164,147.84,357.945,147.102,359.801,147.102,0) lw(1.12) lc(2) b() -bs(315.7,146.6,0) -bs(387.45,146.6,0) +bs(359.801,147.102,0) +bs(403.199,147.102,0) lw(1.12) lc(2) b() -bs(387.45,146.6,0) -bs(459.2,146.6,0) +bs(403.199,147.102,0) +bs(446.602,147.102,0) lw(1.12) lc(2) b() -bs(459.2,146.6,0) -bs(459.2,146.6,0) -bc(461.056,146.6,462.837,145.863,464.15,144.55,0) +bs(446.602,147.102,0) +bs(446.602,147.102,0) +bc(448.457,147.102,450.238,146.363,451.551,145.051,0) lw(1.12) lc(2) b() -bs(464.15,144.55,0) -bs(464.15,144.55,0) -bc(465.462,143.237,466.2,141.457,466.2,139.6,0) +bs(451.551,145.051,0) +bs(451.551,145.051,0) +bc(452.863,143.738,453.602,141.957,453.602,140.102,0) lw(1.12) lc(2) b() -bs(466.2,139.6,0) -bs(466.2,133.45,0) +bs(453.602,140.102,0) +bs(453.602,133.449,0) lw(1.12) lc(2) b() -bs(466.2,133.45,0) -bs(466.2,132.05,0) +bs(453.602,133.449,0) +bs(453.602,132.051,0) fp((0,0,0)) le() b() -bs(462.35,132.05,0) -bs(466.199,124.35,0) -bs(470.05,132.05,0) +bs(449.75,132.051,0) +bs(453.602,124.352,0) +bs(457.449,132.051,0) lw(1.12) lc(2) -ld((0, 2.2889599999999999)) +ld((0, 2.5)) b() -bs(552.65,41.8,0) -bs(580.85,41.8,0) -G_() -G() -fp((0,0,0)) -Fn('Helvetica') -Fs(16) -txt('libr',(341.317,393.4)) -fp((0,0,0)) -Fn('Helvetica') -Fs(16) -txt('ar',(362.494,393.4)) +bs(310.801,356.727,0) +bs(299.602,356.727,0) +lw(1.12) +lc(2) +ld((0, 2.48563)) +b() +bs(299.602,356.727,0) +bs(57.3984,356.727,0) +lw(1.12) +lc(2) +ld((0, 2.4543699999999999)) +b() +bs(57.3984,356.727,0) +bs(57.3984,356.727,0) +bc(53.5352,356.727,50.3984,353.59,50.3984,349.727,0) +lw(1.12) +lc(2) +ld((0, 2.4519700000000002)) +b() +bs(50.3984,349.727,0) +bs(50.3984,259.102,0) +lw(1.12) +lc(2) +ld((0, 2.5)) +b() +bs(50.3984,259.102,0) +bs(50.3984,257.699,0) fp((0,0,0)) -Fn('Helvetica') -Fs(16) -txt('y',(377.168,393.4)) +le() +b() +bs(46.5508,257.699,0) +bs(50.3984,250,0) +bs(54.25,257.699,0) +lw(1.12) +lc(2) +ld((0, 2.4375100000000001)) +b() +bs(50.3984,222.801,0) +bs(50.3984,195.5,0) fp((0,0,0)) -Fn('Helvetica') -Fs(16) -txt('dependencies',(389.267,393.4)) +le() +b() +bs(46.5508,195.5,0) +bs(50.3984,187.801,0) +bs(54.25,195.5,0) +lw(1.12) +lc(2) +b() +bs(50.3984,160.801,0) +bs(50.3984,154.148,0) +lw(1.12) +lc(2) +b() +bs(50.3984,154.148,0) +bs(50.3984,154.148,0) +bc(50.3984,152.293,51.1367,150.512,52.4492,149.199,0) +lw(1.12) +lc(2) +b() +bs(52.4492,149.199,0) +bs(52.4492,149.199,0) +bc(53.7617,147.887,55.543,147.148,57.3984,147.148,0) +lw(1.12) +lc(2) +b() +bs(57.3984,147.148,0) +bs(100.801,147.148,0) +lw(1.12) +lc(2) +b() +bs(100.801,147.148,0) +bs(144.199,147.148,0) +lw(1.12) +lc(2) +b() +bs(144.199,147.148,0) +bs(144.199,147.148,0) +bc(146.055,147.148,147.836,146.41,149.148,145.102,0) +lw(1.12) +lc(2) +b() +bs(149.148,145.102,0) +bs(149.148,145.102,0) +bc(150.461,143.789,151.199,142.004,151.199,140.148,0) +lw(1.12) +lc(2) +b() +bs(151.199,140.148,0) +bs(151.199,134.898,0) +lw(1.12) +lc(2) +b() +bs(151.199,134.898,0) +bs(151.199,133.5,0) fp((0,0,0)) -Fn('Helvetica') -Fs(16) -txt('Qt for X11',(265.517,393.4)) -G_() +le() +b() +bs(147.352,133.5,0) +bs(151.199,125.801,0) +bs(155.051,133.5,0) +lw(1.12) +lc(2) +ld((0, 2.2889599999999999)) +b() +bs(540.051,41.8008,0) +bs(568.25,41.8008,0) guidelayer('Guide Lines',1,0,0,1,(0,0,1)) grid((0,0,5,5),1,(0,0,1),'Grid') diff --git a/doc/src/dnd.qdoc b/doc/src/dnd.qdoc index 8d3d79d..5ede20c 100644 --- a/doc/src/dnd.qdoc +++ b/doc/src/dnd.qdoc @@ -141,15 +141,17 @@ types of data that the widget accepts. You must reimplement this function if you want to receive either QDragMoveEvent or QDropEvent in your reimplementations of - \l{QWidget::dragMoveEvent()}{dragMoveEvent()} and dropEvent(). + \l{QWidget::dragMoveEvent()}{dragMoveEvent()} and + \l{QWidget::dropEvent()}{dropEvent()}. - The following code shows how dragEnterEvent() can be reimplemented to + The following code shows how \l{QWidget::dragEnterEvent()}{dragEnterEvent()} + can be reimplemented to tell the drag and drop system that we can only handle plain text: \snippet doc/src/snippets/dropevents/window.cpp 3 - The dropEvent() is used to unpack dropped data and handle it in way that - is suitable for your application. + The \l{QWidget::dropEvent()}{dropEvent()} is used to unpack dropped data + and handle it in way that is suitable for your application. In the following code, the text supplied in the event is passed to a QTextBrowser and a QComboBox is filled with the list of MIME types that @@ -159,7 +161,8 @@ In this case, we accept the proposed action without checking what it is. In a real world application, it may be necessary to return from the - dropEvent() function without accepting the proposed action or handling + \l{QWidget::dropEvent()}{dropEvent()} function without accepting the + proposed action or handling the data if the action is not relevant. For example, we may choose to ignore Qt::LinkAction actions if we do not support links to external sources in our application. @@ -435,7 +438,7 @@ \title Porting to Qt 4 - Drag and Drop \contentspage {Porting Guides}{Contents} \previouspage Porting to Qt 4 - Virtual Functions - \nextpage Porting .ui Files to Qt 4 + \nextpage Porting UI Files to Qt 4 \ingroup porting \brief An overview of the porting process for applications that use drag and drop. diff --git a/doc/src/emb-charinput.qdoc b/doc/src/emb-charinput.qdoc index c9c768c..dc4eed5 100644 --- a/doc/src/emb-charinput.qdoc +++ b/doc/src/emb-charinput.qdoc @@ -82,13 +82,13 @@ \section1 Available Keyboard Drivers - \l {Qt for Embedded Linux} provides ready-made drivers for the SL5000, Yopy, - Vr41XX, console (TTY) and USB protocols. Run the \c configure - script to list the available drivers: + \l {Qt for Embedded Linux} provides ready-made drivers for the console + (TTY) and the standard Linux Input Subsystem (USB, PS/2, ...). Run the + \c configure script to list the available drivers: \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 0 - Note that the console keyboard driver also handles console + Note that only the console (TTY) keyboard driver handles console switching (\bold{Ctrl+Alt+F1}, ..., \bold{Ctrl+Alt+F10}) and termination (\bold{Ctrl+Alt+Backspace}). @@ -105,6 +105,17 @@ detect the plugin, loading the driver into the server application at run-time. + \section1 Keymaps + + Starting with 4.6, \l {Qt for Embedded Linux} has gained support for + user defined keymaps. Keymap handling is supported by the built-in + keyboard drivers \c TTY and \c LinuxInput. Custom keyboard drivers can + use the existing keymap handling code via + QWSKeyboardHandler::processKeycode(). + + By default Qt will use an internal, compiled-in US keymap. + See the options below for how to load a different keymap. + \section1 Specifying a Keyboard Driver To specify which driver to use, set the QWS_KEYBOARD environment @@ -113,14 +124,41 @@ \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 2 - The \c <driver> argument are \c SL5000, \c Yopy, \c VR41xx, \c - TTY, \c USB and \l {QKbdDriverPlugin::keys()}{keys} identifying - custom drivers, and the driver specific options are typically a - device, e.g., \c /dev/tty0. + The \c <driver> arguments are \c TTY, \c LinuxInput and \l + {QKbdDriverPlugin::keys()}{keys} identifying custom drivers, and the + driver specific options are typically a device, e.g., \c /dev/tty0. Multiple keyboard drivers can be specified in one go: \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 3 Input will be read from all specified drivers. + + Currently the following options are supported by both the \c TTY and \c + LinuxInput driver: + + \table + \header \o Option \o Description + \row \o \c /dev/xxx \o + Open the specified device, instead of the driver's default device. + \row \o \c repeat-delay=<d> \o + Time (in milliseconds) until auto-repeat kicks in. + \row \o \c repeat-rate=<r> \o + Time (in milliseconds) specifying the interval between auto-repeats. + \row \o \c keymap=xx.qmap \o + File name of a keymap file in Qt's \c qmap format. See \l {kmap2qmap} + for instructions on how to create thoes files.\br Note that the file + name can of course also be the name of a QResource. + \row \o \c disable-zap \o + Disable the QWS server "Zap" shortcut \bold{Ctrl+Alt+Backspace} + \row \o \c enable-compose \o + Activate Latin-1 composing features in the built-in US keymap. You can + use the right \c AltGr or right \c Alt is used as a dead key modifier, + while \c AltGr+. is the compose key. For example: + \list + \o \c AltGr + \c " + \c u = \uuml (u with diaeresis / umlaut u) + \o \c AltGr + \c . + \c / + \c o = \oslash (slashed o) + \endlist + \endtable + */ diff --git a/doc/src/emb-kmap2qmap.qdoc b/doc/src/emb-kmap2qmap.qdoc new file mode 100644 index 0000000..19d33c1 --- /dev/null +++ b/doc/src/emb-kmap2qmap.qdoc @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qt-embedded-kmap2qmap.html + \title kmap2qmap + \ingroup qt-embedded-linux + + \c kmap2qmap is a tool to generate keymaps for use on Embedded Linux. + The source files have to be in standard Linux \c kmap format that is + e.g. understood by the kernel's \c loadkeys command. This means you + can use the following sources to generate \c qmap files: + + \list + \o The \l {http://lct.sourceforge.net/}{Linux Console Tools (LCT)} project. + \o \l {http://www.x.org/}{Xorg} X11 keymaps can be converted to the \c + kmap format with the \c ckbcomp utility. + \o Since \c kmap files are plain text files, they can also be hand crafted. + \endlist + + The generated \c qmap files are size optimized binary files. + + \c kmap2qmap is a command line program, that needs at least 2 files as + parameters. The last one will be the generated \c .qmap file, while all + the others will be parsed as input \c .kmap files. For example: + + \code + kmap2qmap i386/qwertz/de-latin1-nodeadkeys.kmap include/compose.latin1.inc de-latin1-nodeadkeys.qmap + \endcode + + \c kmap2qmap does not support all the (pseudo) symbols that the Linux + kernel supports. If you are converting a standard keymap you will get a + lot of warnings for things like \c Show_Registers, \c Hex_A, etc.: you + can safely ignore those. + + It also doesn't support numeric symbols (e.g. \c{keycode 1 = 4242}, + instead of \c{keycode 1 = colon}), since these are deprecated and can + change from one kernel version to the other. + + On the other hand, \c kmap2qmap supports one additional, Qt specific, + symbol: \c QtZap. The built-in US keymap has that symbol mapped tp + \c{Ctrl+Alt+Backspace} and it serves as a shortcut to kill your QWS + server (similiar to the X11 server). + + See also \l {Qt for Embedded Linux Character Input} +*/ diff --git a/doc/src/emb-pointer.qdoc b/doc/src/emb-pointer.qdoc index b13dec0..49504fe 100644 --- a/doc/src/emb-pointer.qdoc +++ b/doc/src/emb-pointer.qdoc @@ -64,9 +64,10 @@ \section1 Available Drivers \l{Qt for Embedded Linux} provides ready-made drivers for the MouseMan, - IntelliMouse, Microsoft, NEC Vr41XX, Linux Touch Panel and Yopy - protocols as well as the universal touch screen library, - tslib. Run the \c configure script to list the available drivers: + IntelliMouse, Microsoft and Linux Touch Panel protocols, for the + standard Linux Input Subsystem as well as the universal touch screen + library, tslib. Run the \c configure script to list the available + drivers: \if defined(QTOPIA_PHONE) @@ -125,7 +126,7 @@ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 4 The valid values for the \c <driver> argument are \c MouseMan, \c - IntelliMouse, \c Microsoft, \c VR41xx, \c LinuxTP, \c Yopy, \c + IntelliMouse, \c Microsoft, \c LinuxTP, \c LinuxInput, \c Tslib and \l {QMouseDriverPlugin::keys()}{keys} identifying custom drivers, and the driver specific options are typically a device, e.g., \c /dev/mouse for mouse devices and \c /dev/ts for touch @@ -137,14 +138,6 @@ Input will be read from all specified drivers. - Note that the \c Vr41xx driver also accepts two optional - arguments: \c press=<value> defining a mouse click (the default - value is 750) and \c filter=<value> specifying the length of the - filter used to eliminate noise (the default length is 3). For - example: - - \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 6 - \table \header \o The Tslib Mouse Driver \row diff --git a/doc/src/examples-overview.qdoc b/doc/src/examples-overview.qdoc index 4453dad..4313c43 100644 --- a/doc/src/examples-overview.qdoc +++ b/doc/src/examples-overview.qdoc @@ -319,6 +319,14 @@ from displaying Web pages within a Qt user interface to an implementation of a basic function Web browser. + \section1 \l{Qt Examples#State Machine}{State Machine} + + Qt provides a powerful hierchical finite state machine through the Qt State + Machine classes. + + These examples demonstrate the fundamental aspects of implementing + Statecharts with Qt. + \section1 \l{Qt Examples#Qt for Embedded Linux}{Qt for Embedded Linux} \l{Qt Examples#Qt for Embedded Linux}{\inlineimage qt-embedded-examples.png diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc index 5329c78..e85acd1 100644 --- a/doc/src/examples.qdoc +++ b/doc/src/examples.qdoc @@ -86,6 +86,13 @@ \o \l{activeqt/webbrowser}{Web Browser}\raisedaster \o \l{activeqt/wrapper}{Wrapper}\raisedaster \endlist + + \section1 Animation + + \list + \o \l{animation/moveblocks}{Move Blocks}\raisedaster + \o \l{animation/stickman}{Stick man}\raisedaster + \endlist \section1 Concurrent Programming @@ -309,6 +316,16 @@ \o \l{sql/sqlwidgetmapper}{SQL Widget Mapper}\raisedaster \endlist + \section1 State Machine + + \list + \o \l{statemachine/eventtransitions}{Event Transitions}\raisedaster + \o \l{statemachine/factorial}{Factorial States}\raisedaster + \o \l{statemachine/pingpong}{Ping Pong States}\raisedaster + \o \l{statemachine/trafficlight}{Traffic Light}\raisedaster + \o \l{statemachine/twowaybutton}{Two-way Button}\raisedaster + \endlist + \section1 Threads \list @@ -399,6 +416,7 @@ \o \l{xmlpatterns/qobjectxmlmodel}{QObject XML Model Example} \o \l{xmlpatterns/xquery/globalVariables}{C++ Source Code Analyzer Example} \o \l{xmlpatterns/trafficinfo}{Traffic Info}\raisedaster + \o \l{xmlpatterns/schema}{XML Schema Validation}\raisedaster \endlist \section1 Inter-Process Communication diff --git a/doc/src/examples/application.qdoc b/doc/src/examples/application.qdoc index deb4311..85347ee 100644 --- a/doc/src/examples/application.qdoc +++ b/doc/src/examples/application.qdoc @@ -45,7 +45,7 @@ The Application example shows how to implement a standard GUI application with menus, toolbars, and a status bar. The example - itself is a simple text editor program built around QTextEdit. + itself is a simple text editor program built around QPlainTextEdit. \image application.png Screenshot of the Application example @@ -103,7 +103,7 @@ \snippet examples/mainwindows/application/mainwindow.cpp 1 \snippet examples/mainwindows/application/mainwindow.cpp 2 - In the constructor, we start by creating a QTextEdit widget as a + In the constructor, we start by creating a QPlainTextEdit widget as a child of the main window (the \c this object). Then we call QMainWindow::setCentralWidget() to tell that this is going to be the widget that occupies the central area of the main window, @@ -114,9 +114,9 @@ functions that set up the user interface. After that, we call \c readSettings() to restore the user's preferences. - We establish a signal-slot connection between the QTextEdit's + We establish a signal-slot connection between the QPlainTextEdit's document object and our \c documentWasModified() slot. Whenever - the user modifies the text in the QTextEdit, we want to update + the user modifies the text in the QPlainTextEdit, we want to update the title bar to show that the file was modified. At the end, we set the window title using the private @@ -141,7 +141,7 @@ The \c newFile() slot is invoked when the user selects \menu{File|New} from the menu. We call \c maybeSave() to save any pending changes and if the user accepts to go on, we clear the - QTextEdit and call the private function \c setCurrentFile() to + QPlainTextEdit and call the private function \c setCurrentFile() to update the window title and clear the \l{QWidget::windowModified}{windowModified} flag. @@ -187,7 +187,7 @@ \snippet examples/mainwindows/application/mainwindow.cpp 16 The \c documentWasModified() slot is invoked each time the text - in the QTextEdit changes because of user edits. We call + in the QPlainTextEdit changes because of user edits. We call QWidget::setWindowModified() to make the title bar show that the file was modified. How this is done varies on each platform. @@ -227,8 +227,8 @@ \snippet examples/mainwindows/application/mainwindow.cpp 24 The \gui{Edit|Cut} and \gui{Edit|Copy} actions must be available - only when the QTextEdit contains selected text. We disable them - by default and connect the QTextEdit::copyAvailable() signal to + 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 disabled when the text editor has no selection. diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc index 9e9268c..fa19fbb 100644 --- a/doc/src/examples/arrowpad.qdoc +++ b/doc/src/examples/arrowpad.qdoc @@ -140,10 +140,10 @@ QLocale::system() can be influenced by setting the \c LANG environment variable, for example. Notice that the use of a naming convention that incorporates the locale for \c .qm message files, - (and \c .ts files), makes it easy to implement choosing the + (and TS files), makes it easy to implement choosing the translation file according to locale. - If there is no \c .qm message file for the locale chosen the original + If there is no QM message file for the locale chosen the original source text will be used and no error raised. \section1 Translating to French and Dutch @@ -194,9 +194,9 @@ \endlist We have to convert the \c tt1_fr.ts and \c tt1_nl.ts translation source - files into \c .qm files. We could use \e {Qt Linguist} as we've done + 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 \c .qm files for the application are created without us + \e all the QM files for the application are created without us having to remember to load and \gui File|Release each one individually from \e {Qt Linguist}. diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc index e0af2e8..8e91dbf 100644 --- a/doc/src/examples/basicgraphicslayouts.qdoc +++ b/doc/src/examples/basicgraphicslayouts.qdoc @@ -45,6 +45,7 @@ The Basic Graphics Layouts example shows how to use the layout classes in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout. + In addition to that it shows how to write your own custom layout item. \image basicgraphicslayouts-example.png Screenshot of the Basic Layouts Example @@ -115,26 +116,24 @@ \section1 LayoutItem Class Definition - The \c LayoutItem class is a subclass of QGraphicsWidget. It has a - constructor, a destructor, and a reimplementation of the - {QGraphicsItem::paint()}{paint()} function. + The \c LayoutItem class is a subclass of QGraphicsLayoutItem and + QGraphicsItem. It has a constructor, a destructor, and some required + reimplementations. + Since it inherits QGraphicsLayoutItem it must reimplement + {QGraphicsLayoutItem::setGeometry()}{setGeometry()} and + {QGraphicsLayoutItem::sizeHint()}{sizeHint()}. + In addition to that it inherits QGraphicsItem, so it must reimplement + {QGraphicsItem::boundingRect()}{boundingRect()} and + {QGraphicsItem::paint()}{paint()}. \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.h 0 - The \c LayoutItem class also has a private instance of QPixmap, \c pix. - - \note We subclass QGraphicsWidget so that \c LayoutItem objects can - be automatically plugged into a layout, as QGraphicsWidget is a - specialization of QGraphicsLayoutItem. + The \c LayoutItem class also has a private instance of QPixmap, \c m_pix. \section1 LayoutItem Class Implementation - In \c{LayoutItem}'s constructor, \c pix is instantiated and the - \c{QT_original_R.png} image is loaded into it. We set the size of - \c LayoutItem to be slightly larger than the size of the pixmap as we - require some space around it for borders that we will paint later. - Alternatively, you could scale the pixmap to prevent the item from - becoming smaller than the pixmap. + In \c{LayoutItem}'s constructor, \c m_pix is instantiated and the + \c{block.png} image is loaded into it. \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 0 @@ -148,4 +147,32 @@ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 2 + The reimplementation of {QGraphicsItem::boundingRect()}{boundingRect()} + will set the top left corner at (0,0), and the size of it will be + the size of the layout items + {QGraphicsLayoutItem::geometry()}{geometry()}. This is the area that + we paint within. + + \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 3 + + + The reimplementation of {QGraphicsLayoutItem::setGeometry()}{setGeometry()} + simply calls its baseclass implementation. However, since this will change + the boundingRect we must also call + {QGraphicsItem::prepareGeometryChange()}{prepareGeometryChange()}. + Finally, we move the item according to \c geom.topLeft(). + + \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 4 + + + Since we don't want the size of the item to be smaller than the pixmap, we + must make sure that we return a size hint that is larger than \c m_pix. + We also add some extra space around for borders that we will paint later. + Alternatively, you could scale the pixmap to prevent the item from + becoming smaller than the pixmap. + The preferred size is the same as the minimum size hint, while we set + maximum to be a large value + + \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 5 + */
\ No newline at end of file diff --git a/doc/src/examples/calculatorform.qdoc b/doc/src/examples/calculatorform.qdoc index 7cbf2ac..90eef3b 100644 --- a/doc/src/examples/calculatorform.qdoc +++ b/doc/src/examples/calculatorform.qdoc @@ -45,8 +45,8 @@ The Calculator Form Example shows how to use a form created with \QD in an application by using the user interface information from - a QWidget subclass. We use \l{Using a Designer .ui File in Your Application} - {uic's auto-connection} feature to automatically connect signals + a QWidget subclass. We use \l{Using a Designer UI File in Your Application} + {uic's auto-connection} feature to automatically connect signals from widgets on the form to slots in our code. \image calculatorform-example.png Screenshot of the Calculator Form example @@ -59,7 +59,7 @@ \section1 Preparation The user interface for this example is designed completely using \QD. The - result is a .ui file describing the form, the widgets used, any signal-slot + result is a UI file describing the form, the widgets used, any signal-slot connections between them, and other standard user interface properties. To ensure that the example can use this file, we need to include a \c FORMS diff --git a/doc/src/examples/collidingmice-example.qdoc b/doc/src/examples/collidingmice-example.qdoc index 5b124f9..f627fbf 100644 --- a/doc/src/examples/collidingmice-example.qdoc +++ b/doc/src/examples/collidingmice-example.qdoc @@ -95,11 +95,11 @@ the global qrand() function which is a thread-safe version of the standard C++ rand() function. - Then we call the \l {QGraphicsItem::rotate()}{rotate()} function + Then we call the \l {QGraphicsItem::setRotation()}{setRotation()} function inherited from QGraphicsItem. Items live in their own local coordinate system. Their coordinates are usually centered around (0, 0), and this is also the center for all transformations. By - calling the item's \l {QGraphicsItem::rotate()}{rotate()} function + calling the item's \l {QGraphicsItem::setRotation()}{setRotation()} function we alter the direction in which the mouse will start moving. When the QGraphicsScene decides to advance the scene a frame it will call 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/examples/contiguouscache.qdoc b/doc/src/examples/contiguouscache.qdoc new file mode 100644 index 0000000..7d18af4 --- /dev/null +++ b/doc/src/examples/contiguouscache.qdoc @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example tools/contiguouscache + \title Contiguous Cache Example + + The Contiguous Cache example shows how to use QContiguousCache to manage memory usage for + very large models. In some environments memory is limited and, even when it + isn't, users still dislike an application using excessive memory. + Using QContiguousCache to manage a list, rather than loading + the entire list into memory, allows the application to limit the amount + of memory it uses, regardless of the size of the data set it accesses + + The simplest way to use QContiguousCache is to cache as items are requested. When + a view requests an item at row N it is also likely to ask for items at rows near + to N. + + \snippet examples/tools/contiguouscache/randomlistmodel.cpp 0 + + After getting the row, the class determines if the row is in the bounds + of the contiguous cache's current range. It would have been equally valid to + simply have the following code instead. + + \code + while (row > m_rows.lastIndex()) + m_rows.append(fetchWord(m_rows.lastIndex()+1); + while (row < m_rows.firstIndex()) + m_rows.prepend(fetchWord(m_rows.firstIndex()-1); + \endcode + + However a list will often jump rows if the scroll bar is used directly, resulting in + the code above causing every row between the old and new rows to be fetched. + + Using QContiguousCache::lastIndex() and QContiguousCache::firstIndex() allows + the example to determine what part of the list the cache is currently caching. + These values don't represent the indexes into the cache's own memory, but rather + a virtual infinite array that the cache represents. + + By using QContiguousCache::append() and QContiguousCache::prepend() the code ensures + that items that may be still on the screen are not lost when the requested row + has not moved far from the current cache range. QContiguousCache::insert() can + potentially remove more than one item from the cache as QContiguousCache does not + allow for gaps. If your cache needs to quickly jump back and forth between + rows with significant gaps between them consider using QCache instead. + + And thats it. A perfectly reasonable cache, using minimal memory for a very large + list. In this case the accessor for getting the words into the cache + generates random information rather than fixed information. This allows you + to see how the cache range is kept for a local number of rows when running the + example. + + \snippet examples/tools/contiguouscache/randomlistmodel.cpp 1 + + It is also worth considering pre-fetching items into the cache outside of the + application's paint routine. This can be done either with a separate thread + or using a QTimer to incrementally expand the range of the cache prior to + rows being requested out of the current cache range. +*/ diff --git a/doc/src/examples/eventtransitions.qdoc b/doc/src/examples/eventtransitions.qdoc new file mode 100644 index 0000000..145fec4 --- /dev/null +++ b/doc/src/examples/eventtransitions.qdoc @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example statemachine/eventtransitions + \title Event Transitions Example + + The Event Transitions example shows how to use event transitions, a + feature of \l{The State Machine Framework}. + + \snippet examples/statemachine/eventtransitions/main.cpp 0 + + The \c Window class's constructors begins by creating a button. + + \snippet examples/statemachine/eventtransitions/main.cpp 1 + + Two states, \c s1 and \c s2, are created; upon entry they will assign + "Outside" and "Inside" to the button's text, respectively. + + \snippet examples/statemachine/eventtransitions/main.cpp 2 + + When the button receives an event of type QEvent::Enter and the state + machine is in state \c s1, the machine will transition to state \c s2. + + \snippet examples/statemachine/eventtransitions/main.cpp 3 + + When the button receives an event of type QEvent::Leave and the state + machine is in state \c s2, the machine will transition back to state \c + s1. + + \snippet examples/statemachine/eventtransitions/main.cpp 4 + + Next, the state \c s3 is created. \c s3 will be entered when the button + receives an event of type QEvent::MouseButtonPress and the state machine + is in state \c s2. When the button receives an event of type + QEvent::MouseButtonRelease and the state machine is in state \c s3, the + machine will transition back to state \c s2. + + \snippet examples/statemachine/eventtransitions/main.cpp 5 + + Finally, the states are added to the machine as top-level states, the + initial state is set to be \c s1 ("Outside"), and the machine is started. + + \snippet examples/statemachine/eventtransitions/main.cpp 6 + + The main() function constructs a Window object and shows it. + +*/ diff --git a/doc/src/examples/factorial.qdoc b/doc/src/examples/factorial.qdoc new file mode 100644 index 0000000..3a98804 --- /dev/null +++ b/doc/src/examples/factorial.qdoc @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example statemachine/factorial + \title Factorial States Example + + The Factorial States example shows how to use \l{The State Machine + Framework} to calculate the factorial of an integer. + + The statechart for calculating the factorial looks as follows: + + \img factorial-example.png + \omit + \caption This is a caption + \endomit + + In other words, the state machine calculates the factorial of 6 and prints + the result. + + \snippet examples/statemachine/factorial/main.cpp 0 + + The Factorial class is used to hold the data of the computation, \c x and + \c fac. It also provides a signal that's emitted whenever the value of \c + x changes. + + \snippet examples/statemachine/factorial/main.cpp 1 + + The FactorialLoopTransition class implements the guard (\c x > 1) and + calculations (\c fac = \c x * \c fac; \c x = \c x - 1) of the factorial + loop. + + \snippet examples/statemachine/factorial/main.cpp 2 + + The FactorialDoneTransition class implements the guard (\c x <= 1) that + terminates the factorial computation. It also prints the final result to + standard output. + + \snippet examples/statemachine/factorial/main.cpp 3 + + The application's main() function first creates the application object, a + Factorial object and a state machine. + + \snippet examples/statemachine/factorial/main.cpp 4 + + The \c compute state is created, and the initial values of \c x and \c fac + are defined. A FactorialLoopTransition object is created and added to the + state. + + \snippet examples/statemachine/factorial/main.cpp 5 + + A final state, \c done, is created, and a FactorialDoneTransition object + is created with \c done as its target state. The transition is then added + to the \c compute state. + + \snippet examples/statemachine/factorial/main.cpp 6 + + The machine's initial state is set to be the \c compute state. We connect + the QStateMachine::finished() signal to the QCoreApplication::quit() slot, + so the application will quit when the state machine's work is + done. Finally, the state machine is started, and the application's event + loop is entered. + + */ diff --git a/doc/src/examples/frozencolumn.qdoc b/doc/src/examples/frozencolumn.qdoc index e5a3b59..9d89478 100644 --- a/doc/src/examples/frozencolumn.qdoc +++ b/doc/src/examples/frozencolumn.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/doc/src/examples/helloscript.qdoc b/doc/src/examples/helloscript.qdoc index a18e4ad..1b0f43c 100644 --- a/doc/src/examples/helloscript.qdoc +++ b/doc/src/examples/helloscript.qdoc @@ -121,7 +121,7 @@ window). Don't forget the exclamation mark! Click the \gui Done checkbox and choose \gui File|Save from the - menu bar. The \c .ts file will no longer contain + menu bar. The TS file will no longer contain \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3 @@ -129,11 +129,11 @@ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 4 - To see the application running in Latin, we have to generate a \c .qm - file from the \c .ts file. Generating a \c .qm file can be achieved - either from within \e {Qt Linguist} (for a single \c .ts file), or - by using the command line program \c lrelease which will produce one \c - .qm file for each of the \c .ts files listed in the project file. + To see the application running in Latin, we have to generate a QM + file from the TS file. Generating a QM file can be achieved + either from within \e {Qt Linguist} (for a single TS file), or + 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 helloscript diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc index bb38737..18e0715 100644 --- a/doc/src/examples/hellotr.qdoc +++ b/doc/src/examples/hellotr.qdoc @@ -108,12 +108,12 @@ Note that the file extension is \c .ts, not \c .qm. The \c .ts translation source format is designed for use during the application's development. Programmers or release managers run - the \c lupdate program to generate and update \c .ts files with + the \c lupdate program to generate and update TS files with the source text that is extracted from the source code. - Translators read and update the \c .ts files using \e {Qt + Translators read and update the TS files using \e {Qt Linguist} adding and editing their translations. - The \c .ts format is human-readable XML that can be emailed directly + The TS format is human-readable XML that can be emailed directly and is easy to put under version control. If you edit this file manually, be aware that the default encoding for XML is UTF-8, not Latin1 (ISO 8859-1). One way to type in a Latin1 character such as @@ -121,8 +121,8 @@ "\ø". This will work for any Unicode 4.0 character. Once the translations are complete the \c lrelease program is used to - convert the \c .ts files into the \c .qm Qt message file format. The - \c .qm format is a compact binary format designed to deliver very + convert the TS files into the QM Qt message file format. The + QM format is a compact binary format designed to deliver very fast lookup performance. Both \c lupdate and \c lrelease read all the project's source and header files (as specified in the HEADERS and SOURCES lines of the project file) and extract the strings that @@ -131,7 +131,7 @@ \c lupdate is used to create and update the message files (\c hellotr_la.ts in this case) to keep them in sync with the source code. It is safe to run \c lupdate at any time, as \c lupdate does not remove any - information. For example, you can put it in the makefile, so the \c .ts + information. For example, you can put it in the makefile, so the TS files are updated whenever the source changes. Try running \c lupdate right now, like this: @@ -151,7 +151,7 @@ We will use \e {Qt Linguist} to provide the translation, although you can use any XML or plain text editor to enter a translation into a - \c .ts file. + TS file. To start \e {Qt Linguist}, type @@ -163,7 +163,7 @@ window). Don't forget the exclamation mark! Click the \gui Done checkbox and choose \gui File|Save from the - menu bar. The \c .ts file will no longer contain + menu bar. The TS file will no longer contain \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3 @@ -173,11 +173,11 @@ \section1 Running the Application in Latin - To see the application running in Latin, we have to generate a \c .qm - file from the \c .ts file. Generating a \c .qm file can be achieved - either from within \e {Qt Linguist} (for a single \c .ts file), or - by using the command line program \c lrelease which will produce one \c - .qm file for each of the \c .ts files listed in the project file. + To see the application running in Latin, we have to generate a QM + file from the TS file. Generating a QM file can be achieved + either from within \e {Qt Linguist} (for a single TS file), or + 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 diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc new file mode 100644 index 0000000..7e42307 --- /dev/null +++ b/doc/src/examples/moveblocks.qdoc @@ -0,0 +1,228 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example animation/moveblocks + \title Move Blocks Example + + The Move Blocks example shows how to animate items in a + QGraphicsScene using a QStateMachine with a custom transition. + + \image moveblocks-example.png + + The example animates the blue blocks that you can see in the image + above. The animation moves the blocks between four preset positions. + + The example consists of the following classes: + + \list + \o \c StateSwitcher inherits QState and can add + \c {StateSwitchTransition}s to other states. + When entered, it will randomly transition to one of these + states. + \o \c StateSwitchTransition is a custom transition that + triggers on \c{StateSwitchEvent}s. + \o \c StateSwitchEvent is a QEvent that trigger \c{StateSwitchTransition}s. + \o \c QGraphicsRectWidget is a QGraphicsWidget that simply + paints its background in a solid \l{Qt::}{blue} color. + \endlist + + The blocks are instances of \c QGraphicsRectWidget and are + animated in a QGraphicsScene. We do this by building a state + graph, which we insert animations into. The graph is then executed + in a QStateMachine. All this is done in \c main(). + Let's look at the \c main() function first. + + \section1 The \c main() Function + + After QApplication has been initialized, we set up the + QGraphicsScene with its \c{QGraphicsRectWidget}s. + + \snippet examples/animation/moveblocks/main.cpp 1 + + After adding the scene to a QGraphicsView, it is time to build the + state graph. Let's first look at a statechart of what we are + trying to build. + + \image move-blocks-chart.png + + Note that the \c group has seven sub states, but we have only + included three of them in the diagram. The code that builds this + graph will be examined line-by-line, and will show how the graph + works. First off, we construct the \c group state: + + \snippet examples/animation/moveblocks/main.cpp 2 + + The timer is used to add a delay between each time the blocks are + moved. The timer is started when \c group is entered. As we will + see later, \c group has a transition back to the \c StateSwitcher + when the timer times out. \c group is the initial state in the + machine, so an animation will be scheduled when the example is + started. + + \snippet examples/animation/moveblocks/main.cpp 3 + \dots + \snippet examples/animation/moveblocks/main.cpp 4 + + \c createGeometryState() returns a QState that will set the + geometry of our items upon entry. It also assigns \c group as the + parent of this state. + + A QPropertyAnimation inserted into a transition will use the + values assigned to a QState (with QState::assignProperty()), i.e., + the animation will interpolate between the current values of the + properties and the values in the target state. We add animated + transitions to the state graph later. + + \snippet examples/animation/moveblocks/main.cpp 5 + + We move the items in parallel. Each item is added to \c + animationGroup, which is the animation that is inserted into the + transitions. + + \snippet examples/animation/moveblocks/main.cpp 6 + + The sequential animation group, \c subGroup, helps us insert a + delay between the animation of each item. + + \snippet examples/animation/moveblocks/main.cpp 7 + \dots + \snippet examples/animation/moveblocks/main.cpp 8 + + A StateSwitchTransition is added to the state switcher + in \c StateSwitcher::addState(). We also add the animation in this + function. Since QPropertyAnimation uses the values from the + states, we can insert the same QPropertyAnimation instance in all + \c {StateSwitchTransition}s. + + As mentioned previously, we add a transition to the state switcher + that triggers when the timer times out. + + \snippet examples/animation/moveblocks/main.cpp 9 + + Finally, we can create the state machine, add our initial state, + and start execution of the state graph. + + \section2 The \c createGemetryState() Function + + In \c createGeometryState(), we set up the geometry for each + graphics item. + + \snippet examples/animation/moveblocks/main.cpp 13 + + As mentioned before, QAbstractTransition will set up an animation + added with \l{QAbstractTransition::}{addAnimation()} using + property values set with \l{QState::}{assignProperty()}. + + \section1 The StateSwitcher Class + + \c StateSwitcher has state switch transitions to each \l{QState}s + we created with \c createGemetryState(). Its job is to transition + to one of these states at random when it is entered. + + All functions in \c StateSwitcher are inlined. We'll step through + its definition. + + \snippet examples/animation/moveblocks/main.cpp 10 + + \c StateSwitcher is a state designed for a particular purpose and + will always be a top-level state. We use \c m_stateCount to keep + track of how many states we are managing, and \c m_lastIndex to + remember which state was the last state to which we transitioned. + + \snippet examples/animation/moveblocks/main.cpp 11 + + We select the next state we are going to transition to, and post a + \c StateSwitchEvent, which we know will trigger the \c + StateSwitchTransition to the selected state. + + \snippet examples/animation/moveblocks/main.cpp 12 + + This is where the magic happens. We assign a number to each state + added. This number is given to both a StateSwitchTransition and to + StateSwitchEvents. As we have seen, state switch events will + trigger a transition with the same number. + + \section1 The StateSwitchTransition Class + + \c StateSwitchTransition inherits QAbstractTransition and triggers + on \c{StateSwitchEvent}s. It contains only inline functions, so + let's take a look at its \l{QAbstractTransition::}{eventTest()} + function, which is the only function that we define.. + + \snippet examples/animation/moveblocks/main.cpp 14 + + \c eventTest is called by QStateMachine when it checks whether a + transition should be triggered--a return value of true means that + it will. We simply check if our assigned number is equal to the + event's number (in which case we fire away). + + \section1 The StateSwitchEvent Class + + \c StateSwitchEvent inherits QEvent, and holds a number that has + been assigned to a state and state switch transition by \c + StateSwitcher. We have already seen how it is used to trigger \c + \c{StateSwitchTransition}s in \c StateSwitcher. + + \snippet examples/animation/moveblocks/main.cpp 15 + + We only have inlined functions in this class, so a look at its + definition will do. + + \section1 The QGraphicsRectWidget Class + + QGraphicsRectWidget inherits QGraphicsWidget and simply paints its + \l{QWidget::}{rect()} blue. We inline \l{QWidget::}{paintEvent()}, + which is the only function we define. Here is the + QGraphicsRectWidget class definition: + + \snippet examples/animation/moveblocks/main.cpp 16 + + \section1 Moving On + + The technique shown in this example works equally well for all + \l{QPropertyAnimation}s. As long as the value to be animated is a + Qt property, you can insert an animation of it into a state graph. + + QState::addAnimation() takes a QAbstractAnimation, so any type + of animation can be inserted into the graph. +*/ + diff --git a/doc/src/examples/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc index 5a77275..1622fb0 100644 --- a/doc/src/examples/multipleinheritance.qdoc +++ b/doc/src/examples/multipleinheritance.qdoc @@ -103,6 +103,6 @@ There are various approaches to include forms into applications. The Multiple Inheritance approach is just one of them. See - \l{Using a Designer .ui File in Your Application} for more information on + \l{Using a Designer UI File in Your Application} for more information on the other approaches available. */ diff --git a/doc/src/examples/pingpong.qdoc b/doc/src/examples/pingpong.qdoc new file mode 100644 index 0000000..33358dd --- /dev/null +++ b/doc/src/examples/pingpong.qdoc @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example statemachine/pingpong + \title Ping Pong States Example + + The Ping Pong States example shows how to use parallel states together + with custom events and transitions in \l{The State Machine Framework}. + + This example implements a statechart where two states communicate by + posting events to the state machine. The state chart looks as follows: + + \img pingpong-example.png + \omit + \caption This is a caption + \endomit + + The \c pinger and \c ponger states are parallel states, i.e. they are + entered simultaneously and will take transitions independently of + eachother. + + The \c pinger state will post the first \c ping event upon entry; the \c + ponger state will respond by posting a \c pong event; this will cause the + \c pinger state to post a new \c ping event; and so on. + + \snippet examples/statemachine/pingpong/main.cpp 0 + + Two custom events are defined, \c PingEvent and \c PongEvent. + + \snippet examples/statemachine/pingpong/main.cpp 1 + + The \c Pinger class defines a state that posts a \c PingEvent to the state + machine when the state is entered. + + \snippet examples/statemachine/pingpong/main.cpp 2 + + The \c PingTransition class defines a transition that is triggered by + events of type \c PingEvent, and that posts a \c PongEvent (with a delay + of 500 milliseconds) to the state machine when the transition is + triggered. + + \snippet examples/statemachine/pingpong/main.cpp 3 + + The \c PongTransition class defines a transition that is triggered by + events of type \c PongEvent, and that posts a \c PingEvent (with a delay + of 500 milliseconds) to the state machine when the transition is + triggered. + + \snippet examples/statemachine/pingpong/main.cpp 4 + + The main() function begins by creating a state machine and a parallel + state group. + + \snippet examples/statemachine/pingpong/main.cpp 5 + + Next, the \c pinger and \c ponger states are created, with the parallel + state group as their parent state. Note that the transitions are \e + targetless. When such a transition is triggered, the source state won't be + exited and re-entered; only the transition's onTransition() function will + be called, and the state machine's configuration will remain the same, + which is precisely what we want in this case. + + \snippet examples/statemachine/pingpong/main.cpp 6 + + Finally, the group is added to the state machine, the machine is started, + and the application event loop is entered. + + */ diff --git a/doc/src/examples/qtscripttetrix.qdoc b/doc/src/examples/qtscripttetrix.qdoc index c94697a..fb2d537 100644 --- a/doc/src/examples/qtscripttetrix.qdoc +++ b/doc/src/examples/qtscripttetrix.qdoc @@ -57,7 +57,7 @@ \section1 Setting up the GUI - The graphical user interface is defined in a \c{.ui} file, creating + The graphical user interface is defined in a UI file, created using Qt Designer, and is set up in the example's C++ \c{main.cpp} file. \snippet examples/script/qstetrix/main.cpp 0 diff --git a/doc/src/examples/schema.qdoc b/doc/src/examples/schema.qdoc new file mode 100644 index 0000000..df42832 --- /dev/null +++ b/doc/src/examples/schema.qdoc @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example xmlpatterns/schema + \title XML Schema Validation Example + + This example shows how to use QtXmlPatterns to validate XML with + a W3C XML Schema. + + \tableofcontents + + \section1 Introduction + + The example application shows different XML schema definitions and + for every definition two XML instance documents, one that is valid + according to the schema and one that is not. + The user can select the valid or invalid instance document, change + it and validate it again. + + \section2 The User Interface + + The UI for this example was created using \l{Qt Designer Manual} {Qt + Designer}: + + \image schema-example.png + + The UI consists of three parts, at the top the XML schema \l{QComboBox} {selection} + and the schema \l{QTextBrowser} {viewer}, below the XML instance \l{QComboBox} {selection} + and the instance \l{QTextEdit} {editor} and at the bottom the validation status \l{QLabel} {label} + next to the validation \l{QPushButton} {button}. + + \section2 Validating XML Instance Documents + + You can select one of the three predefined XML schemas and for each schema + an valid or invalid instance document. A click on the 'Validate' button will + validate the content of the XML instance editor against the schema from the + XML schema viewer. As you can modify the content of the instance editor, different + instances can be tested and validation error messages analysed. + + \section1 Code Walk-Through + + The example's main() function creates the standard instance of + QApplication. Then it creates an instance of the mainwindow class, shows it, + and starts the Qt event loop: + + \snippet examples/xmlpatterns/schema/main.cpp 0 + + \section2 The UI Class: MainWindow + + The example's UI is a conventional Qt GUI application inheriting + QMainWindow and the class generated by \l{Qt Designer Manual} {Qt + Designer}: + + \snippet examples/xmlpatterns/schema/mainwindow.h 0 + + The constructor fills the schema and instance \l{QComboBox} selections with the predefined + schemas and instances and connects their \l{QComboBox::currentIndexChanged()} {currentIndexChanged()} + signals to the window's \c{schemaSelected()} resp. \c{instanceSelected()} slot. + Furthermore the signal-slot connections for the validation \l{QPushButton} {button} + and the instance \l{QTextEdit} {editor} are set up. + + The call to \c{schemaSelected(0)} and \c{instanceSelected(0)} will trigger the validation + of the initial Contact Schema example. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 0 + + In the \c{schemaSelected()} slot the content of the instance \l{QComboBox} {selection} + is adapted to the selected schema and the corresponding schema is loaded from the + \l{The Qt Resource System} {resource file} and displayed in the schema \l{QTextBrowser} {viewer}. + At the end of the method a revalidation is triggered. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 1 + + In the \c{instanceSelected()} slot the selected instance is loaded from the + \l{The Qt Resource System} {resource file} and loaded into the instance \l{QTextEdit} {editor} + an the revalidation is triggered again. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 2 + + The \c{validate()} slot does the actual work in this example. + At first it stores the content of the schema \l{QTextBrowser} {viewer} and the + \l{QTextEdit} {editor} into temporary \l{QByteArray} {variables}. + Then it instanciates a \c{MessageHandler} object which inherits from + \l{QAbstractMessageHandler} {QAbstractMessageHandler} and is a convenience + class to store error messages from the XmlPatterns system. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 4 + + After the \l{QXmlSchema} {QXmlSchema} is instanciated and the message handler set + on it, the \l{QXmlSchema::load()} {load()} method is called with the schema data as argument. + If the schema is invalid or a parsing error has occured, \l{QXmlSchema::isValid()} {isValid()} + returns \c{false} and the error is flagged in \c{errorOccurred}. + If the loading was successful, a \l{QXmlSchemaValidator} {QXmlSchemaValidator} is + instanciated and the schema passed in the constructor. + A call to \l{QXmlSchemaValidator::validate()} {validate()} will validate the passed + XML instance data against the XML schema. The return value of that method signals + whether the validation was successful. + Depending on the success the status \l{QLabel} {label} is set to 'validation successful' + or the error message stored in the \c{MessageHandler} + + The rest of the code does only some fancy coloring and eyecandy. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 3 +*/ diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc index 3a5e018..f32440a 100644 --- a/doc/src/examples/scribble.qdoc +++ b/doc/src/examples/scribble.qdoc @@ -354,7 +354,7 @@ To retrieve a new pen width in the \c penWidth() slot, we use QInputDialog. The QInputDialog class provides a simple convenience dialog to get a single value from the user. We use - the static QInputDialog::getInteger() function, which combines a + the static QInputDialog::getInt() function, which combines a QLabel and a QSpinBox. The QSpinBox is initialized with the scribble area's pen width, allows a range from 1 to 50, a step of 1 (meaning that the up and down arrow increment or decrement the diff --git a/doc/src/examples/simpletextviewer.qdoc b/doc/src/examples/simpletextviewer.qdoc index 87eae57..2531a86 100644 --- a/doc/src/examples/simpletextviewer.qdoc +++ b/doc/src/examples/simpletextviewer.qdoc @@ -198,12 +198,7 @@ <file>openfile.html</file> <file>wildcardmatching.html</file> <file>images/browse.png</file> - <file>images/fadedfilemenu.png</file> - <file>images/filedialog.png</file> - <file>images/handbook.png</file> - <file>images/mainwindow.png</file> - <file>images/open.png</file> - <file>images/wildcard.png</file> + <file>images/*.png</file> </files> </filterSection> </QtHelpProject> diff --git a/doc/src/examples/stickman.qdoc b/doc/src/examples/stickman.qdoc new file mode 100644 index 0000000..083b637 --- /dev/null +++ b/doc/src/examples/stickman.qdoc @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example animation/stickman + \title Stickman Example + + The Stickman example shows how to animate transitions in a state machine to implement key frame + animations. + + \image stickman-example.png + + In this example, we will write a small application which animates the joints in a skeleton and + projects a stickman figure on top. The stickman can be either "alive" or "dead", and when in the + "alive" state, he can be performing different actions defined by key frame animations. + + Animations are implemented as composite states. Each child state of the animation state + represents a frame in the animation by setting the position of each joint in the stickman's + skeleton to the positions defined for the particular frame. The frames are then bound together + with animated transitions that trigger on the source state's polished() signal. Thus, the + machine will enter the state representing the next frame in the animation immediately after it + has finished animating into the previous frame. + + \image stickman-example1.png + + The states for an animation is constructed by reading a custom animation file format and + creating states that assign values to the the "position" properties of each of the nodes in the + skeleton graph. + + \snippet examples/animation/stickman/lifecycle.cpp 1 + + The states are then bound together with signal transitions that listen to the polished() signal. + + \snippet examples/animation/stickman/lifecycle.cpp 2 + + The last frame state is given a transition to the first one, so that the animation will loop + until it is interrupted when a transition out from the animation state is taken. To get smooth + animations between the different key frames, we set a default animation on the state machine. + This is a parallel animation group which contains animations for all the "position" properties + and will be selected by default when taking any transition that leads into a state that assigns + values to these properties. + + \snippet examples/animation/stickman/lifecycle.cpp 3 + + Several such animation states are constructed, and are placed together as children of a top + level "alive" state which represents the stickman life cycle. Transitions go from the parent + state to the child state to ensure that each of the child states inherit them. + + \image stickman-example2.png + + This saves us the effort of connect every state to every state with identical transitions. The + state machine makes sure that transitions between the key frame animations are also smooth by + applying the default animation when interrupting one and starting another. + + Finally, there is a transition out from the "alive" state and into the "dead" state. This is + a custom transition type called LightningSrikesTransition which samples every second and + triggers at random (one out of fifty times on average.) + + \snippet examples/animation/stickman/lifecycle.cpp 4 + + When it triggers, the machine will first enter a "lightningBlink" state which uses a timer to + pause for a brief period of time while the background color of the scene is white. This gives us + a flash effect when the lightning strikes. + + \snippet examples/animation/stickman/lifecycle.cpp 5 + + We start and stop a QTimer object when entering and exiting the state. Then we transition into + the "dead" state when the timer times out. + + \snippet examples/animation/stickman/lifecycle.cpp 0 + + When the machine is in the "dead" state, it will be unresponsive. This is because the "dead" + state has no transitions leading out. + + \image stickman-example3.png + +*/ diff --git a/doc/src/examples/svggenerator.qdoc b/doc/src/examples/svggenerator.qdoc index 09fe6e1..dd7459a 100644 --- a/doc/src/examples/svggenerator.qdoc +++ b/doc/src/examples/svggenerator.qdoc @@ -55,8 +55,8 @@ The example consists of two classes: \c Window and \c DisplayWidget. The \c Window class contains the application logic and constructs the user - interface from a Qt Designer \c{.ui} file as described in the - \l{Using a Designer .ui File in Your Application#The Multiple Inheritance Approach}{Qt Designer manual}. + interface from a Qt Designer UI file as described in the + \l{Using a Designer UI File in Your Application#The Multiple Inheritance Approach}{Qt Designer manual}. It also contains the code to write an SVG file. The \c DisplayWidget class performs all the work of painting a picture on diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc index e412815..61c140f 100644 --- a/doc/src/examples/tablet.qdoc +++ b/doc/src/examples/tablet.qdoc @@ -275,7 +275,10 @@ In this function we draw on the image based on the movement of the device. If the device used on the tablet is a stylus we want to draw a - line between the positions of the stylus recorded in \c polyLine. + line between the positions of the stylus recorded in \c polyLine. We + also assume that this is a reasonable handling of any unknown device, + but update the statusbar with a warning so that the user can see that + for his tablet he might have to implement special handling. If it is an airbrush we want to draw a circle of points with a point density based on the tangential pressure, which is the position of the finger wheel on the airbrush. We use the Qt::BrushStyle to diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc index adbbd0d..acfbd0f 100644 --- a/doc/src/examples/textfinder.qdoc +++ b/doc/src/examples/textfinder.qdoc @@ -45,7 +45,7 @@ The Text Finder example demonstrates how to dynamically process forms using the QtUiTools module. Dynamic form processing enables a form to - be processed at run-time only by changing the .ui file for the project. + be processed at run-time only by changing the UI file for the project. The program allows the user to look up a particular word within the contents of a text file. This text file is included in the project's resource and is loaded into the display at startup. @@ -95,7 +95,7 @@ \snippet examples/uitools/textfinder/textfinder.h 0 The slot \c{on_find_Button_clicked()} is a slot named according to the - \l{Using a Designer .ui File in Your Application#Automatic Connections} + \l{Using a Designer UI File in Your Application#Automatic Connections} {Automatic Connection} naming convention required by \c uic. diff --git a/doc/src/examples/trafficlight.qdoc b/doc/src/examples/trafficlight.qdoc new file mode 100644 index 0000000..e5dd17b --- /dev/null +++ b/doc/src/examples/trafficlight.qdoc @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example statemachine/trafficlight + \title Traffic Light Example + + The Traffic Light example shows how to use \l{The State Machine Framework} + to implement the control flow of a traffic light. + + \image trafficlight-example.png + + In this example we write a TrafficLightWidget class. The traffic light has + three lights: Red, yellow and green. The traffic light transitions from + one light to another (red to yellow to green to yellow to red again) at + certain intervals. + + \snippet examples/statemachine/trafficlight/main.cpp 0 + + The LightWidget class represents a single light of the traffic light. It + provides an \c on property and two slots, turnOn() and turnOff(), to turn + the light on and off, respectively. The widget paints itself in the color + that's passed to the constructor. + + \snippet examples/statemachine/trafficlight/main.cpp 1 + + The TrafficLightWidget class represents the visual part of the traffic + light; it's a widget that contains three lights arranged vertically, and + provides accessor functions for these. + + \snippet examples/statemachine/trafficlight/main.cpp 2 + + The createLightState() function creates a state that turns a light on when + the state is entered, and off when the state is exited. The state uses a + timer, and as we shall see the timeout is used to transition from one + LightState to another. Here is the statechart for the light state: + + \img trafficlight-example1.png + \omit + \caption This is a caption + \endomit + + \snippet examples/statemachine/trafficlight/main.cpp 3 + + The TrafficLight class combines the TrafficLightWidget with a state + machine. The state graph has four states: red-to-yellow, yellow-to-green, + green-to-yellow and yellow-to-red. The initial state is red-to-yellow; + when the state's timer times out, the state machine transitions to + yellow-to-green. The same process repeats through the other states. + This is what the statechart looks like: + + \img trafficlight-example2.png + \omit + \caption This is a caption + \endomit + + \snippet examples/statemachine/trafficlight/main.cpp 4 + + The main() function constructs a TrafficLight and shows it. + +*/ diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc index a449d4c..a5f92a8 100644 --- a/doc/src/examples/transformations.qdoc +++ b/doc/src/examples/transformations.qdoc @@ -85,10 +85,10 @@ All the tranformation operations operate on QPainter's tranformation matrix that you can retrieve using the - QPainter::matrix() function. A matrix transforms a point in the + QPainter::worldTransform() function. A matrix transforms a point in the plane to another point. For more information about the transformation matrix, see the \l {The Coordinate System} and - QMatrix documentation. + QTransform documentation. \snippet examples/painting/transformations/renderarea.h 0 @@ -375,7 +375,7 @@ All the tranformation operations operate on QPainter's tranformation matrix. For more information about the transformation matrix, see the \l {The Coordinate System} and - QMatrix documentation. + QTransform documentation. The Qt reference documentation provides several painting demos. Among these is the \l {demos/affine}{Affine diff --git a/doc/src/examples/twowaybutton.qdoc b/doc/src/examples/twowaybutton.qdoc new file mode 100644 index 0000000..b366e6e --- /dev/null +++ b/doc/src/examples/twowaybutton.qdoc @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example statemachine/twowaybutton + \title Two-way Button Example + + The Two-way button example shows how to use \l{The State Machine + Framework} to implement a simple state machine that toggles the current + state when a button is clicked. + + \snippet examples/statemachine/twowaybutton/main.cpp 0 + + The application's main() function begins by constructing the application + object, a button and a state machine. + + \snippet examples/statemachine/twowaybutton/main.cpp 1 + + The state machine has two states; \c on and \c off. When either state is + entered, the text of the button will be set accordingly. + + \snippet examples/statemachine/twowaybutton/main.cpp 2 + + When the state machine is in the \c off state and the button is clicked, + it will transition to the \c on state; when the state machine is in the \c + on state and the button is clicked, it will transition to the \c off + state. + + \snippet examples/statemachine/twowaybutton/main.cpp 3 + + The states are added to the state machine; they become top-level (sibling) + states. + + \snippet examples/statemachine/twowaybutton/main.cpp 4 + + The initial state is \c off; this is the state the state machine will + immediately transition to once the state machine is started. + + \snippet examples/statemachine/twowaybutton/main.cpp 5 + + Finally, the button is resized and made visible, and the application event + loop is entered. + +*/ diff --git a/doc/src/examples/worldtimeclockbuilder.qdoc b/doc/src/examples/worldtimeclockbuilder.qdoc index 55246e9..f38062a 100644 --- a/doc/src/examples/worldtimeclockbuilder.qdoc +++ b/doc/src/examples/worldtimeclockbuilder.qdoc @@ -66,7 +66,7 @@ generate a dependency on the \c libQtUiTools library containing the QtUiTools classes. - Note that we do not inform \c qmake about any .ui files, and so none will + Note that we do not inform \c qmake about any UI files, and so none will be processed and built into the application. The resource file contains an entry for the particular form that we wish to use: diff --git a/doc/src/exportedfunctions.qdoc b/doc/src/exportedfunctions.qdoc index 66dc2b2..cf1f850 100644 --- a/doc/src/exportedfunctions.qdoc +++ b/doc/src/exportedfunctions.qdoc @@ -129,6 +129,9 @@ on Mac OS X or be part of the main window. This feature is on by default. + In Qt 4.6, this is equivalent to + \c { QApplication::instance()->setAttribute(Qt::AA_DontUseNativeMenuBar); }. + \section1 void qt_mac_set_press_and_hold_context(bool \e{enable}) Turns emulation of the right mouse button by clicking and holding diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index 49f6e2e..96b838b 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -334,6 +334,16 @@ */ /*! + \externalpage http://www.w3.org/TR/scxml/ + \title State Chart XML: State Machine Notation for Control Abstraction +*/ + +/*! + \externalpage http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf + \title Statecharts: A visual formalism for complex systems +*/ + +/*! \externalpage http://www.gnu.org/licenses/gpl.html \title GNU General Public License */ diff --git a/doc/src/functions.qdoc b/doc/src/functions.qdoc deleted file mode 100644 index e4c8c57..0000000 --- a/doc/src/functions.qdoc +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/**************************************************************************** -** -** Documentation for class overview. -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt GUI Toolkit. -** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE -** -****************************************************************************/ - -/*! - \page functions.html - \title Member Function Index - \ingroup classlists - - Here is the list of all the documented member functions in the Qt - API with links to the class documentation for each function. - - \generatelist functionindex -*/ diff --git a/doc/src/graphicsview.qdoc b/doc/src/graphicsview.qdoc index c88efdb..89f9f3d 100644 --- a/doc/src/graphicsview.qdoc +++ b/doc/src/graphicsview.qdoc @@ -141,7 +141,7 @@ to scene coordinates where appropriate), before sending the events to the visualized scene. - Using its transformation matrix, QGraphicsView::matrix(), the view can + Using its transformation matrix, QGraphicsView::transform(), the view can \e transform the scene's coordinate system. This allows advanced navigation features such as zooming and rotation. For convenience, QGraphicsView also provides functions for translating between view and @@ -174,7 +174,7 @@ also provides many functions for mapping coordinates between the item and the scene, and from item to item. Also, like QGraphicsView, it can transform its coordinate system using a matrix: - QGraphicsItem::matrix(). This is useful for rotating and scaling + QGraphicsItem::transform(). This is useful for rotating and scaling individual items. Items can contain other items (children). Parent items' @@ -201,6 +201,9 @@ using an untransformed view, one unit on the scene is represented by one pixel on the screen. + \note The inverted Y-axis coordinate system (where \c y grows upwards) + is unsupported as Graphics Views uses Qt's coordinate system. + There are three effective coordinate systems in play in Graphics View: Item coordinates, scene coordinates, and view coordinates. To simplify your implementation, Graphics View provides convenience functions that @@ -458,11 +461,7 @@ By making an item a child of another, you can achieve the most essential feature of item grouping: the items will move together, and - all transformations are propagated from parent to child. QGraphicsItem - can also handle all events for its children (see - QGraphicsItem::setHandlesChildEvents()). This allows the parent item - to act on behalf of its children, effectively treating all items as - one. + all transformations are propagated from parent to child. In addition, QGraphicsItemGroup is a special item that combines child event handling with a useful interface for adding and removing items @@ -540,5 +539,5 @@ When transforming an embedded widget, Graphics View makes sure that the widget is transformed resolution independently, allowing the fonts and style to stay crisp when zoomed in. (Note that the effect - of resolution independence depends on the style.) + of resolution independence depends on the style.) */ diff --git a/doc/src/groups.qdoc b/doc/src/groups.qdoc index 367b519..f7296a3 100644 --- a/doc/src/groups.qdoc +++ b/doc/src/groups.qdoc @@ -40,32 +40,26 @@ ****************************************************************************/ /*! - \group groups - \title Grouped Classes - \ingroup classlists - - This page provides a way of navigating Qt's classes by grouping - related classes together. Some classes may appear in more than one group. + \group advanced + \title Advanced Widgets + \ingroup groups - \generatelist{related} + \brief Advanced GUI widgets such as tab widgets and progress bars. - \omit - \row - \o \l{Component Model} - \o Interfaces and helper classes for the Qt Component Model. - \endomit + These classes provide more complex user interface widgets (controls). */ /*! - \group advanced - \title Advanced Widgets + \group animation \ingroup groups - \brief Advanced GUI widgets such as tab widgets and progress bars. - - These classes provide more complex user interface widgets (controls). + \title Animation Framework + \brief Classes for animations, states and transitions. + These classes provide a framework for creating both simple and complex + animations. \l{The Animation Framework} also provides states and animated + transitions, making it easy to create animated stateful forms. */ /*! @@ -135,12 +129,6 @@ */ -/* \group componentmodel - \title Component Model - - These classes and interfaces form the basis of the \l{Qt Component Model}. - -*/ /*! \group database @@ -214,22 +202,8 @@ */ /*! - \group explicitly-shared - \ingroup groups - - \title Explicitly Shared Classes - \brief Classes that use explicit sharing to manage internal data. - - \keyword explicit sharing - \keyword explicitly shared - - Unlike many of Qt's data types, which use \l{implicit sharing}, these - classes use explicit sharing to manage internal data. -*/ - -/*! \group geomanagement - \title Layout Management + \title Layout Classes \ingroup groups \brief Classes handling automatic resizing and moving of widgets, for @@ -389,103 +363,6 @@ */ /*! - \group shared - \title Implicitly Shared Classes - \ingroup architecture - \ingroup groups - - \brief Classes that use reference counting for fast copying. - - \keyword implicit data sharing - \keyword implicit sharing - \keyword implicitly shared - \keyword reference counting - \keyword shared implicitly - \keyword shared classes - - Many C++ classes in Qt use implicit data sharing to maximize - resource usage and minimize copying. Implicitly shared classes are - both safe and efficient when passed as arguments, because only a - pointer to the data is passed around, and the data is copied only - if and when a function writes to it, i.e., \e {copy-on-write}. - - \tableofcontents - - \section1 Overview - - A shared class consists of a pointer to a shared data block that - contains a reference count and the data. - - When a shared object is created, it sets the reference count to 1. The - reference count is incremented whenever a new object references the - shared data, and decremented when the object dereferences the shared - data. The shared data is deleted when the reference count becomes - zero. - - \keyword deep copy - \keyword shallow copy - - When dealing with shared objects, there are two ways of copying an - object. We usually speak about \e deep and \e shallow copies. A deep - copy implies duplicating an object. A shallow copy is a reference - copy, i.e. just a pointer to a shared data block. Making a deep copy - can be expensive in terms of memory and CPU. Making a shallow copy is - very fast, because it only involves setting a pointer and incrementing - the reference count. - - Object assignment (with operator=()) for implicitly shared objects is - implemented using shallow copies. - - The benefit of sharing is that a program does not need to duplicate - data unnecessarily, which results in lower memory use and less copying - of data. Objects can easily be assigned, sent as function arguments, - and returned from functions. - - Implicit sharing takes place behind the scenes; the programmer - does not need to worry about it. Even in multithreaded - applications, implicit sharing takes place, as explained in - \l{Threads and Implicit Sharing}. - - \section1 Implicit Sharing in Detail - - Implicit sharing automatically detaches the object from a shared - block if the object is about to change and the reference count is - greater than one. (This is often called \e {copy-on-write} or - \e {value semantics}.) - - An implicitly shared class has total control of its internal data. In - any member functions that modify its data, it automatically detaches - before modifying the data. - - The QPen class, which uses implicit sharing, detaches from the shared - data in all member functions that change the internal data. - - Code fragment: - \snippet doc/src/snippets/code/doc_src_groups.qdoc 0 - - \section1 List of Classes - - The classes listed below automatically detach from common data if - an object is about to be changed. The programmer will not even - notice that the objects are shared. Thus you should treat - separate instances of them as separate objects. They will always - behave as separate objects but with the added benefit of sharing - data whenever possible. For this reason, you can pass instances - of these classes as arguments to functions by value without - concern for the copying overhead. - - Example: - \snippet doc/src/snippets/code/doc_src_groups.qdoc 1 - - In this example, \c p1 and \c p2 share data until QPainter::begin() - is called for \c p2, because painting a pixmap will modify it. - - \warning Do not copy an implicitly shared container (QMap, - QVector, etc.) while you are iterating over it using an non-const - \l{STL-style iterator}. -*/ - -/*! \group ssl \title Secure Sockets Layer (SSL) Classes \ingroup groups @@ -597,3 +474,14 @@ These classes are relevant to developers who are working with Qt Script's debugging features. */ + +/*! + \group statemachine + \ingroup groups + + \title State Machine Classes + \brief Classes for constructing and executing state graphs. + + These classes are provided by \l{The State Machine Framework} for creating + event-driven state machines. +*/ diff --git a/doc/src/i18n.qdoc b/doc/src/i18n.qdoc index 4109b62..d043f45 100644 --- a/doc/src/i18n.qdoc +++ b/doc/src/i18n.qdoc @@ -144,13 +144,13 @@ aligned, so for these languages use the version of drawText() that takes a QRect since this will align in accordance with the language. - \o When you write your own text input controls, use \l - QFontMetrics::charWidth() to determine the width of a character in a - string. In some languages (e.g. Arabic or languages from the Indian + \o When you write your own text input controls, use QTextLayout. + In some languages (e.g. Arabic or languages from the Indian subcontinent), the width and shape of a glyph changes depending on the - surrounding characters. Writing input controls usually requires a - certain knowledge of the scripts it is going to be used in. Usually - the easiest way is to subclass QLineEdit or QTextEdit. + surrounding characters, which QTextLayout takes into account. + Writing input controls usually requires a certain knowledge of the + scripts it is going to be used in. Usually the easiest way is to + subclass QLineEdit or QTextEdit. \endlist @@ -266,19 +266,19 @@ \o Run \c lupdate to extract translatable text from the C++ source code of the Qt application, resulting in a message file - for translators (a \c .ts file). The utility recognizes the tr() + for translators (a TS file). The utility recognizes the tr() construct and the \c{QT_TR*_NOOP()} macros described above and - produces \c .ts files (usually one per language). + produces TS files (usually one per language). - \o Provide translations for the source texts in the \c .ts file, using - \e{Qt Linguist}. Since \c .ts files are in XML format, you can also + \o Provide translations for the source texts in the TS file, using + \e{Qt Linguist}. Since TS files are in XML format, you can also edit them by hand. - \o Run \c lrelease to obtain a light-weight message file (a \c .qm - file) from the \c .ts file, suitable only for end use. Think of the \c - .ts files as "source files", and \c .qm files as "object files". The - translator edits the \c .ts files, but the users of your application - only need the \c .qm files. Both kinds of files are platform and + \o Run \c lrelease to obtain a light-weight message file (a QM + file) from the TS file, suitable only for end use. Think of the TS + files as "source files", and QM files as "object files". The + translator edits the TS files, but the users of your application + only need the QM files. Both kinds of files are platform and locale independent. \endlist diff --git a/doc/src/images/animations-architecture.png b/doc/src/images/animations-architecture.png Binary files differnew file mode 100644 index 0000000..9b581af --- /dev/null +++ b/doc/src/images/animations-architecture.png diff --git a/doc/src/images/checkboxes-exclusive.png b/doc/src/images/checkboxes-exclusive.png Binary files differnew file mode 100644 index 0000000..0ada3a0 --- /dev/null +++ b/doc/src/images/checkboxes-exclusive.png diff --git a/doc/src/images/checkboxes-non-exclusive.png b/doc/src/images/checkboxes-non-exclusive.png Binary files differnew file mode 100644 index 0000000..4211aae --- /dev/null +++ b/doc/src/images/checkboxes-non-exclusive.png diff --git a/doc/src/images/factorial-example.png b/doc/src/images/factorial-example.png Binary files differnew file mode 100644 index 0000000..8fb1cc6 --- /dev/null +++ b/doc/src/images/factorial-example.png diff --git a/doc/src/images/move-blocks-chart.png b/doc/src/images/move-blocks-chart.png Binary files differnew file mode 100644 index 0000000..fd0c165 --- /dev/null +++ b/doc/src/images/move-blocks-chart.png diff --git a/doc/src/images/moveblocks-example.png b/doc/src/images/moveblocks-example.png Binary files differnew file mode 100644 index 0000000..56353d1 --- /dev/null +++ b/doc/src/images/moveblocks-example.png diff --git a/doc/src/images/pingpong-example.png b/doc/src/images/pingpong-example.png Binary files differnew file mode 100644 index 0000000..af707e4 --- /dev/null +++ b/doc/src/images/pingpong-example.png diff --git a/doc/src/images/qeasingcurve-cosinecurve.png b/doc/src/images/qeasingcurve-cosinecurve.png Binary files differnew file mode 100644 index 0000000..8cee978 --- /dev/null +++ b/doc/src/images/qeasingcurve-cosinecurve.png diff --git a/doc/src/images/qeasingcurve-inback.png b/doc/src/images/qeasingcurve-inback.png Binary files differnew file mode 100644 index 0000000..0064cb3 --- /dev/null +++ b/doc/src/images/qeasingcurve-inback.png diff --git a/doc/src/images/qeasingcurve-inbounce.png b/doc/src/images/qeasingcurve-inbounce.png Binary files differnew file mode 100644 index 0000000..eaa64f8 --- /dev/null +++ b/doc/src/images/qeasingcurve-inbounce.png diff --git a/doc/src/images/qeasingcurve-incirc.png b/doc/src/images/qeasingcurve-incirc.png Binary files differnew file mode 100644 index 0000000..7bd0f09 --- /dev/null +++ b/doc/src/images/qeasingcurve-incirc.png diff --git a/doc/src/images/qeasingcurve-incubic.png b/doc/src/images/qeasingcurve-incubic.png Binary files differnew file mode 100644 index 0000000..1ac9eaf --- /dev/null +++ b/doc/src/images/qeasingcurve-incubic.png diff --git a/doc/src/images/qeasingcurve-incurve.png b/doc/src/images/qeasingcurve-incurve.png Binary files differnew file mode 100644 index 0000000..578259e --- /dev/null +++ b/doc/src/images/qeasingcurve-incurve.png diff --git a/doc/src/images/qeasingcurve-inelastic.png b/doc/src/images/qeasingcurve-inelastic.png Binary files differnew file mode 100644 index 0000000..f976b5a --- /dev/null +++ b/doc/src/images/qeasingcurve-inelastic.png diff --git a/doc/src/images/qeasingcurve-inexpo.png b/doc/src/images/qeasingcurve-inexpo.png Binary files differnew file mode 100644 index 0000000..1af3652 --- /dev/null +++ b/doc/src/images/qeasingcurve-inexpo.png diff --git a/doc/src/images/qeasingcurve-inoutback.png b/doc/src/images/qeasingcurve-inoutback.png Binary files differnew file mode 100644 index 0000000..480bc05 --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutback.png diff --git a/doc/src/images/qeasingcurve-inoutbounce.png b/doc/src/images/qeasingcurve-inoutbounce.png Binary files differnew file mode 100644 index 0000000..de62309 --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutbounce.png diff --git a/doc/src/images/qeasingcurve-inoutcirc.png b/doc/src/images/qeasingcurve-inoutcirc.png Binary files differnew file mode 100644 index 0000000..b4be8ac --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutcirc.png diff --git a/doc/src/images/qeasingcurve-inoutcubic.png b/doc/src/images/qeasingcurve-inoutcubic.png Binary files differnew file mode 100644 index 0000000..49dfbef --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutcubic.png diff --git a/doc/src/images/qeasingcurve-inoutelastic.png b/doc/src/images/qeasingcurve-inoutelastic.png Binary files differnew file mode 100644 index 0000000..5b0e54a --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutelastic.png diff --git a/doc/src/images/qeasingcurve-inoutexpo.png b/doc/src/images/qeasingcurve-inoutexpo.png Binary files differnew file mode 100644 index 0000000..776984a --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutexpo.png diff --git a/doc/src/images/qeasingcurve-inoutquad.png b/doc/src/images/qeasingcurve-inoutquad.png Binary files differnew file mode 100644 index 0000000..2643330 --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutquad.png diff --git a/doc/src/images/qeasingcurve-inoutquart.png b/doc/src/images/qeasingcurve-inoutquart.png Binary files differnew file mode 100644 index 0000000..31fc0c8 --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutquart.png diff --git a/doc/src/images/qeasingcurve-inoutquint.png b/doc/src/images/qeasingcurve-inoutquint.png Binary files differnew file mode 100644 index 0000000..4d7a745 --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutquint.png diff --git a/doc/src/images/qeasingcurve-inoutsine.png b/doc/src/images/qeasingcurve-inoutsine.png Binary files differnew file mode 100644 index 0000000..012ff75 --- /dev/null +++ b/doc/src/images/qeasingcurve-inoutsine.png diff --git a/doc/src/images/qeasingcurve-inquad.png b/doc/src/images/qeasingcurve-inquad.png Binary files differnew file mode 100644 index 0000000..e697c20 --- /dev/null +++ b/doc/src/images/qeasingcurve-inquad.png diff --git a/doc/src/images/qeasingcurve-inquart.png b/doc/src/images/qeasingcurve-inquart.png Binary files differnew file mode 100644 index 0000000..6d65175 --- /dev/null +++ b/doc/src/images/qeasingcurve-inquart.png diff --git a/doc/src/images/qeasingcurve-inquint.png b/doc/src/images/qeasingcurve-inquint.png Binary files differnew file mode 100644 index 0000000..faaaea7 --- /dev/null +++ b/doc/src/images/qeasingcurve-inquint.png diff --git a/doc/src/images/qeasingcurve-insine.png b/doc/src/images/qeasingcurve-insine.png Binary files differnew file mode 100644 index 0000000..0944903 --- /dev/null +++ b/doc/src/images/qeasingcurve-insine.png diff --git a/doc/src/images/qeasingcurve-linear.png b/doc/src/images/qeasingcurve-linear.png Binary files differnew file mode 100644 index 0000000..fb3aaf3 --- /dev/null +++ b/doc/src/images/qeasingcurve-linear.png diff --git a/doc/src/images/qeasingcurve-outback.png b/doc/src/images/qeasingcurve-outback.png Binary files differnew file mode 100644 index 0000000..83b3fa2 --- /dev/null +++ b/doc/src/images/qeasingcurve-outback.png diff --git a/doc/src/images/qeasingcurve-outbounce.png b/doc/src/images/qeasingcurve-outbounce.png Binary files differnew file mode 100644 index 0000000..27ac979 --- /dev/null +++ b/doc/src/images/qeasingcurve-outbounce.png diff --git a/doc/src/images/qeasingcurve-outcirc.png b/doc/src/images/qeasingcurve-outcirc.png Binary files differnew file mode 100644 index 0000000..0019370 --- /dev/null +++ b/doc/src/images/qeasingcurve-outcirc.png diff --git a/doc/src/images/qeasingcurve-outcubic.png b/doc/src/images/qeasingcurve-outcubic.png Binary files differnew file mode 100644 index 0000000..45477c0 --- /dev/null +++ b/doc/src/images/qeasingcurve-outcubic.png diff --git a/doc/src/images/qeasingcurve-outcurve.png b/doc/src/images/qeasingcurve-outcurve.png Binary files differnew file mode 100644 index 0000000..295b471 --- /dev/null +++ b/doc/src/images/qeasingcurve-outcurve.png diff --git a/doc/src/images/qeasingcurve-outelastic.png b/doc/src/images/qeasingcurve-outelastic.png Binary files differnew file mode 100644 index 0000000..1d407ed --- /dev/null +++ b/doc/src/images/qeasingcurve-outelastic.png diff --git a/doc/src/images/qeasingcurve-outexpo.png b/doc/src/images/qeasingcurve-outexpo.png Binary files differnew file mode 100644 index 0000000..5685155 --- /dev/null +++ b/doc/src/images/qeasingcurve-outexpo.png diff --git a/doc/src/images/qeasingcurve-outinback.png b/doc/src/images/qeasingcurve-outinback.png Binary files differnew file mode 100644 index 0000000..4700ab0 --- /dev/null +++ b/doc/src/images/qeasingcurve-outinback.png diff --git a/doc/src/images/qeasingcurve-outinbounce.png b/doc/src/images/qeasingcurve-outinbounce.png Binary files differnew file mode 100644 index 0000000..12cc1a8 --- /dev/null +++ b/doc/src/images/qeasingcurve-outinbounce.png diff --git a/doc/src/images/qeasingcurve-outincirc.png b/doc/src/images/qeasingcurve-outincirc.png Binary files differnew file mode 100644 index 0000000..c8a5c86 --- /dev/null +++ b/doc/src/images/qeasingcurve-outincirc.png diff --git a/doc/src/images/qeasingcurve-outincubic.png b/doc/src/images/qeasingcurve-outincubic.png Binary files differnew file mode 100644 index 0000000..42af870 --- /dev/null +++ b/doc/src/images/qeasingcurve-outincubic.png diff --git a/doc/src/images/qeasingcurve-outinelastic.png b/doc/src/images/qeasingcurve-outinelastic.png Binary files differnew file mode 100644 index 0000000..308be57 --- /dev/null +++ b/doc/src/images/qeasingcurve-outinelastic.png diff --git a/doc/src/images/qeasingcurve-outinexpo.png b/doc/src/images/qeasingcurve-outinexpo.png Binary files differnew file mode 100644 index 0000000..0692baa --- /dev/null +++ b/doc/src/images/qeasingcurve-outinexpo.png diff --git a/doc/src/images/qeasingcurve-outinquad.png b/doc/src/images/qeasingcurve-outinquad.png Binary files differnew file mode 100644 index 0000000..9e3cd83 --- /dev/null +++ b/doc/src/images/qeasingcurve-outinquad.png diff --git a/doc/src/images/qeasingcurve-outinquart.png b/doc/src/images/qeasingcurve-outinquart.png Binary files differnew file mode 100644 index 0000000..9a3c16f --- /dev/null +++ b/doc/src/images/qeasingcurve-outinquart.png diff --git a/doc/src/images/qeasingcurve-outinquint.png b/doc/src/images/qeasingcurve-outinquint.png Binary files differnew file mode 100644 index 0000000..add9feb --- /dev/null +++ b/doc/src/images/qeasingcurve-outinquint.png diff --git a/doc/src/images/qeasingcurve-outinsine.png b/doc/src/images/qeasingcurve-outinsine.png Binary files differnew file mode 100644 index 0000000..4bc2aaf --- /dev/null +++ b/doc/src/images/qeasingcurve-outinsine.png diff --git a/doc/src/images/qeasingcurve-outquad.png b/doc/src/images/qeasingcurve-outquad.png Binary files differnew file mode 100644 index 0000000..c505ff9 --- /dev/null +++ b/doc/src/images/qeasingcurve-outquad.png diff --git a/doc/src/images/qeasingcurve-outquart.png b/doc/src/images/qeasingcurve-outquart.png Binary files differnew file mode 100644 index 0000000..6eac058 --- /dev/null +++ b/doc/src/images/qeasingcurve-outquart.png diff --git a/doc/src/images/qeasingcurve-outquint.png b/doc/src/images/qeasingcurve-outquint.png Binary files differnew file mode 100644 index 0000000..77a9ad4 --- /dev/null +++ b/doc/src/images/qeasingcurve-outquint.png diff --git a/doc/src/images/qeasingcurve-outsine.png b/doc/src/images/qeasingcurve-outsine.png Binary files differnew file mode 100644 index 0000000..d135b2f --- /dev/null +++ b/doc/src/images/qeasingcurve-outsine.png diff --git a/doc/src/images/qeasingcurve-sinecurve.png b/doc/src/images/qeasingcurve-sinecurve.png Binary files differnew file mode 100644 index 0000000..6134a01 --- /dev/null +++ b/doc/src/images/qeasingcurve-sinecurve.png diff --git a/doc/src/images/schema-example.png b/doc/src/images/schema-example.png Binary files differnew file mode 100644 index 0000000..5e95bf5 --- /dev/null +++ b/doc/src/images/schema-example.png diff --git a/doc/src/images/statemachine-button-history.png b/doc/src/images/statemachine-button-history.png Binary files differnew file mode 100644 index 0000000..7f51cae --- /dev/null +++ b/doc/src/images/statemachine-button-history.png diff --git a/doc/src/images/statemachine-button-nested.png b/doc/src/images/statemachine-button-nested.png Binary files differnew file mode 100644 index 0000000..762ac14 --- /dev/null +++ b/doc/src/images/statemachine-button-nested.png diff --git a/doc/src/images/statemachine-button.png b/doc/src/images/statemachine-button.png Binary files differnew file mode 100644 index 0000000..10102bd --- /dev/null +++ b/doc/src/images/statemachine-button.png diff --git a/doc/src/images/statemachine-customevents.png b/doc/src/images/statemachine-customevents.png Binary files differnew file mode 100644 index 0000000..62a4222 --- /dev/null +++ b/doc/src/images/statemachine-customevents.png diff --git a/doc/src/images/statemachine-customevents2.png b/doc/src/images/statemachine-customevents2.png Binary files differnew file mode 100644 index 0000000..57b37ef --- /dev/null +++ b/doc/src/images/statemachine-customevents2.png diff --git a/doc/src/images/statemachine-finished.png b/doc/src/images/statemachine-finished.png Binary files differnew file mode 100644 index 0000000..0ac081d --- /dev/null +++ b/doc/src/images/statemachine-finished.png diff --git a/doc/src/images/statemachine-nonparallel.png b/doc/src/images/statemachine-nonparallel.png Binary files differnew file mode 100644 index 0000000..f9850a7 --- /dev/null +++ b/doc/src/images/statemachine-nonparallel.png diff --git a/doc/src/images/statemachine-parallel.png b/doc/src/images/statemachine-parallel.png Binary files differnew file mode 100644 index 0000000..a65c297 --- /dev/null +++ b/doc/src/images/statemachine-parallel.png diff --git a/doc/src/images/stickman-example.png b/doc/src/images/stickman-example.png Binary files differnew file mode 100644 index 0000000..a40f37b --- /dev/null +++ b/doc/src/images/stickman-example.png diff --git a/doc/src/images/stickman-example1.png b/doc/src/images/stickman-example1.png Binary files differnew file mode 100644 index 0000000..1596a68 --- /dev/null +++ b/doc/src/images/stickman-example1.png diff --git a/doc/src/images/stickman-example2.png b/doc/src/images/stickman-example2.png Binary files differnew file mode 100644 index 0000000..980276a --- /dev/null +++ b/doc/src/images/stickman-example2.png diff --git a/doc/src/images/stickman-example3.png b/doc/src/images/stickman-example3.png Binary files differnew file mode 100644 index 0000000..3635ff7 --- /dev/null +++ b/doc/src/images/stickman-example3.png diff --git a/doc/src/images/sub-attaq-demo.png b/doc/src/images/sub-attaq-demo.png Binary files differnew file mode 100644 index 0000000..5a35ec6 --- /dev/null +++ b/doc/src/images/sub-attaq-demo.png diff --git a/doc/src/images/tankgame-example.png b/doc/src/images/tankgame-example.png Binary files differnew file mode 100644 index 0000000..9e17e30 --- /dev/null +++ b/doc/src/images/tankgame-example.png diff --git a/doc/src/images/trafficlight-example.png b/doc/src/images/trafficlight-example.png Binary files differnew file mode 100644 index 0000000..3431542 --- /dev/null +++ b/doc/src/images/trafficlight-example.png diff --git a/doc/src/images/trafficlight-example1.png b/doc/src/images/trafficlight-example1.png Binary files differnew file mode 100644 index 0000000..ec8c7ff --- /dev/null +++ b/doc/src/images/trafficlight-example1.png diff --git a/doc/src/images/trafficlight-example2.png b/doc/src/images/trafficlight-example2.png Binary files differnew file mode 100644 index 0000000..a12e4db --- /dev/null +++ b/doc/src/images/trafficlight-example2.png diff --git a/doc/src/images/x11_dependencies.png b/doc/src/images/x11_dependencies.png Binary files differindex 02bce1a..6ad952e 100644 --- a/doc/src/images/x11_dependencies.png +++ b/doc/src/images/x11_dependencies.png diff --git a/doc/src/implicit-sharing.qdoc b/doc/src/implicit-sharing.qdoc new file mode 100644 index 0000000..85630dc --- /dev/null +++ b/doc/src/implicit-sharing.qdoc @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* TODO: Move some of the documentation from QSharedDataPointer into this + document. */ + +/*! + \group shared + \title Implicitly Shared Classes + \ingroup architecture + \ingroup groups + + \brief Classes that use reference counting for fast copying. + + \keyword implicit data sharing + \keyword implicit sharing + \keyword implicitly shared + \keyword reference counting + \keyword shared implicitly + \keyword shared classes + + Many C++ classes in Qt use implicit data sharing to maximize + resource usage and minimize copying. Implicitly shared classes are + both safe and efficient when passed as arguments, because only a + pointer to the data is passed around, and the data is copied only + if and when a function writes to it, i.e., \e {copy-on-write}. + + \tableofcontents + + \section1 Overview + + A shared class consists of a pointer to a shared data block that + contains a reference count and the data. + + When a shared object is created, it sets the reference count to 1. The + reference count is incremented whenever a new object references the + shared data, and decremented when the object dereferences the shared + data. The shared data is deleted when the reference count becomes + zero. + + \keyword deep copy + \keyword shallow copy + + When dealing with shared objects, there are two ways of copying an + object. We usually speak about \e deep and \e shallow copies. A deep + copy implies duplicating an object. A shallow copy is a reference + copy, i.e. just a pointer to a shared data block. Making a deep copy + can be expensive in terms of memory and CPU. Making a shallow copy is + very fast, because it only involves setting a pointer and incrementing + the reference count. + + Object assignment (with operator=()) for implicitly shared objects is + implemented using shallow copies. + + The benefit of sharing is that a program does not need to duplicate + data unnecessarily, which results in lower memory use and less copying + of data. Objects can easily be assigned, sent as function arguments, + and returned from functions. + + Implicit sharing takes place behind the scenes; the programmer + does not need to worry about it. Even in multithreaded + applications, implicit sharing takes place, as explained in + \l{Threads and Implicit Sharing}. + + When implementing your own implicitly shared classes, use the + QSharedData and QSharedDataPointer classes. + + \section1 Implicit Sharing in Detail + + Implicit sharing automatically detaches the object from a shared + block if the object is about to change and the reference count is + greater than one. (This is often called \e {copy-on-write} or + \e {value semantics}.) + + An implicitly shared class has total control of its internal data. In + any member functions that modify its data, it automatically detaches + before modifying the data. + + The QPen class, which uses implicit sharing, detaches from the shared + data in all member functions that change the internal data. + + Code fragment: + \snippet doc/src/snippets/code/doc_src_groups.qdoc 0 + + + \section1 List of Classes + + The classes listed below automatically detach from common data if + an object is about to be changed. The programmer will not even + notice that the objects are shared. Thus you should treat + separate instances of them as separate objects. They will always + behave as separate objects but with the added benefit of sharing + data whenever possible. For this reason, you can pass instances + of these classes as arguments to functions by value without + concern for the copying overhead. + + Example: + \snippet doc/src/snippets/code/doc_src_groups.qdoc 1 + + In this example, \c p1 and \c p2 share data until QPainter::begin() + is called for \c p2, because painting a pixmap will modify it. + + \warning Do not copy an implicitly shared container (QMap, + QVector, etc.) while you are iterating over it using an non-const + \l{STL-style iterator}. +*/ diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index a7efd73..47f12bf 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -86,15 +86,15 @@ \endif \raw HTML - <table cellpadding="2" cellspacing="1" border="0" width="100%" bgcolor="#e5e5e5"> + <table cellpadding="2" cellspacing="1" border="0" width="100%" class="indextable"> <tr> - <th bgcolor="#66b036" width="33%"> + <th class="titleheader" width="33%"> Getting Started </th> - <th bgcolor="#66b036" width="33%"> + <th class="titleheader" width="33%"> General </th> - <th bgcolor="#66b036" width="33%"> + <th class="titleheader" width="33%"> Developer Resources </th> </tr> @@ -128,13 +128,13 @@ </td> </tr> <tr> - <th bgcolor="#66b036"> + <th class="titleheader"> API Reference </th> - <th bgcolor="#66b036"> + <th class="titleheader"> Core Features </th> - <th bgcolor="#66b036"> + <th class="titleheader"> Key Technologies </th> </tr> @@ -180,6 +180,7 @@ <li><a href="qthelp.html">Help Module</a></li> <li><a href="qtnetwork.html">Network Module</a></li> <li><a href="qtopengl.html">OpenGL Module</a></li> + <li><a href="qtopenvg.html">OpenVG Module</a></li> <li><a href="qtscript.html">Script Module</a></li> <li><a href="qtsql.html">SQL Module</a></li> <li><a href="qtsvg.html">SVG Module</a></li> @@ -193,13 +194,13 @@ </td> </tr> <tr> - <th bgcolor="#66b036"> + <th class="titleheader"> Add-ons & Services </th> - <th bgcolor="#66b036"> + <th class="titleheader"> Tools </th> - <th bgcolor="#66b036"> + <th class="titleheader"> Licenses & Credits </th> </tr> diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc index de4a30e..d868069 100644 --- a/doc/src/installation.qdoc +++ b/doc/src/installation.qdoc @@ -508,6 +508,9 @@ in the \l{Qt for Windows CE Requirements} document. This page describes the specific requirements of libraries and components on which Qt depends. For information about installing Qt, see the \l{Installation} page. + For information about the platforms that Qt supports, see the \l{Supported Platforms} + page. + \section1 OpenSSL (version 0.9.7 or later) Support for \l{SSL}{Secure Sockets Layer (SSL)} communication is provided by the @@ -592,7 +595,9 @@ in the \l{Qt for Windows CE Requirements} document. \endraw The QtGui module and the QtCore module, which provides the non-GUI features required - by QtGui, depend on the libraries described in the following table. + by QtGui, depend on the libraries described in the following table. To build + Qt from its source code, you will also need to install the development + packages for these libraries for your system. \table 90% \header \o Name \o Library \o Notes \o Configuration options \o Minimum working version @@ -612,6 +617,14 @@ in the \l{Qt for Windows CE Requirements} document. </tr><tr id="OptionalColor"> <td> Xinerama </td><td> libXinerama </td><td> Multi-head support</td> <td><tt>-xinerama</tt> or auto-detected</td><td>1.1.0</td> + + </tr><tr id="OptionalColor"> + <td> Fontconfig </td><td> libfontconfig </td><td> Font customization and configuration</td> + <td><tt>-fontconfig</tt> or auto-detected</td><td>2.1</td> + </tr><tr id="OptionalColor"> + <td> FreeType </td><td> libfreetype </td><td> Font engine</td> + <td></td><td>2.1.3</td> + </tr><tr id="DefaultColor"> <td> Xi </td><td> libXi </td><td> X11 Input Extensions</td> <td><tt>-xinput</tt> or auto-detected</td><td>1.3.0</td> @@ -621,12 +634,14 @@ in the \l{Qt for Windows CE Requirements} document. <td> Xext </td><td> libXext </td><td> X Extensions</td><td></td><td>6.4.3</td> </tr><tr id="DefaultColor"> <td> X11 </td><td> libX11 </td><td> X11 Client-Side Library</td><td></td><td>6.2.1</td> + </tr><tr id="SMColor"> <td> SM </td><td> libSM </td><td> X Session Management</td> <td><tt>-sm</tt> or auto-detected</td><td>6.0.4</td> </tr><tr id="SMColor"> <td> ICE </td><td> libICE </td><td> Inter-Client Exchange</td> <td><tt>-sm</tt> or auto-detected</td><td>6.3.5</td> + </tr><tr id="GlibColor"> <td> glib </td><td> libglib-2.0 </td><td> Common event loop handling</td> <td><tt>-glib</tt> or auto-detected</td><td>2.8.3</td> @@ -640,6 +655,28 @@ in the \l{Qt for Windows CE Requirements} document. \note You must compile with XRender support to get alpha transparency support for pixmaps and images. + Development packages for these libraries contain header files that are used + when building Qt from its source code. On Debian-based GNU/Linux systems, + for example, we recommend that you install the following development + packages: + + \list + \o libfontconfig1-dev + \o libfreetype6-dev + \o libx11-dev + \o libxcursor-dev + \o libxext-dev + \o libxfixes-dev + \o libxft-dev + \o libxi-dev + \o libxrandr-dev + \o libxrender-dev + \endlist + + Some of these packages depend on others in this list, so installing one + may cause others to be automatically installed. Other distributions may + provide system packages with similar names. + \section1 Phonon Dependencies As described in the \l{Phonon Overview}, Phonon uses the GStreamer multimedia diff --git a/doc/src/introtodbus.qdoc b/doc/src/introtodbus.qdoc index 51599fb..6185aa2 100644 --- a/doc/src/introtodbus.qdoc +++ b/doc/src/introtodbus.qdoc @@ -198,7 +198,24 @@ \row \o Interface \o Plugin identifier \o Dot-separated \endtable - \section2 Further Reading + \section1 Debugging + + When developing applications that use D-Bus, it is sometimes useful to be able + to see information about the messages that are sent and received across the + bus by each application. + + This feature can be enabled on a per-application basis by setting the + \c QDBUS_DEBUG environment variable before running each application. + For example, we can enable debugging only for the car in the + \l{D-Bus Remote Controlled Car Example} by running the controller and the + car in the following way: + + \snippet doc/src/snippets/code/doc_src_introtodbus.qdoc QDBUS_DEBUG + + Information about the messages will be written to the console the application + was launched from. + + \section1 Further Reading The following documents contain information about Qt's D-Bus integration features, and provide details about the mechanisms used to send and receive diff --git a/doc/src/ipc.qdoc b/doc/src/ipc.qdoc index 1349fde..1f9d36d 100644 --- a/doc/src/ipc.qdoc +++ b/doc/src/ipc.qdoc @@ -61,12 +61,12 @@ \section1 TCP/IP - The cross-platform \l{QtNetwork} module - provides classes that make network programming portable and - easy. It offers high-level classes (e.g., QHttp, QFtp) that - communicate using specific application-level protocols, and - lower-level classes (e.g., QTcpSocket, QTcpServer, QSslSocket) for - implementing protocols. + The cross-platform \l{QtNetwork} module provides classes that make + network programming portable and easy. It offers high-level + classes (e.g., QNetworkAccessManager, QFtp) that communicate using + specific application-level protocols, and lower-level classes + (e.g., QTcpSocket, QTcpServer, QSslSocket) for implementing + protocols. \section1 Shared Memory diff --git a/doc/src/layout.qdoc b/doc/src/layout.qdoc index ec88089..9350aa8 100644 --- a/doc/src/layout.qdoc +++ b/doc/src/layout.qdoc @@ -42,9 +42,8 @@ /*! \page layout.html - \title Layout Classes + \title Layout Management \ingroup architecture - \ingroup classlists \brief A tour of the standard layout managers and an introduction to custom layouts. diff --git a/doc/src/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 0d86ab3..0d86ab3 100644 --- a/doc/src/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc diff --git a/doc/src/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc index b6d80c2..b6d80c2 100644 --- a/doc/src/commercialeditions.qdoc +++ b/doc/src/legal/commercialeditions.qdoc diff --git a/doc/src/editions.qdoc b/doc/src/legal/editions.qdoc index 9ed4c9c..9ed4c9c 100644 --- a/doc/src/editions.qdoc +++ b/doc/src/legal/editions.qdoc diff --git a/doc/src/gpl.qdoc b/doc/src/legal/gpl.qdoc index 97959e8..97959e8 100644 --- a/doc/src/gpl.qdoc +++ b/doc/src/legal/gpl.qdoc diff --git a/doc/src/licenses.qdoc b/doc/src/legal/licenses.qdoc index 7597e7f..4689114 100644 --- a/doc/src/licenses.qdoc +++ b/doc/src/legal/licenses.qdoc @@ -39,6 +39,19 @@ ** ****************************************************************************/ +/*! + \group licensing + \title Licensing Information + \ingroup topics + \brief Information about licenses and licensing issues. + + These documents include information about Qt's licenses and the licenses + of third party components used in Qt. + + \generatelist{related} +*/ + + /*! \page licenses.html \title Other Licenses Used in Qt diff --git a/doc/src/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc index e7bb26a..e7bb26a 100644 --- a/doc/src/opensourceedition.qdoc +++ b/doc/src/legal/opensourceedition.qdoc diff --git a/doc/src/trademarks.qdoc b/doc/src/legal/trademarks.qdoc index 0e659d2..0e659d2 100644 --- a/doc/src/trademarks.qdoc +++ b/doc/src/legal/trademarks.qdoc diff --git a/doc/src/linguist-manual.qdoc b/doc/src/linguist-manual.qdoc index ee59fdc..fd062bb 100644 --- a/doc/src/linguist-manual.qdoc +++ b/doc/src/linguist-manual.qdoc @@ -247,10 +247,10 @@ subsequent \l lupdate runs would probably take place during the final beta phase. - The \c .ts file format is a simple human-readable XML format that + The TS file format is a simple human-readable XML format that can be used with version control systems if required. \c lupdate can also process Localization Interchange File Format (XLIFF) - format files; file in this format typically have file names that + format files; files in this format typically have file names that end with the \c .xlf suffix. Pass the \c -help option to \c lupdate to obtain the list of @@ -266,19 +266,19 @@ Usage: \c {lrelease myproject.pro} - \l lrelease is a command line tool that produces \c .qm files out - of \c .ts files. The \c .qm file format is a compact binary format + \l lrelease is a command line tool that produces QM files out + of TS files. The QM file format is a compact binary format that is used by the localized application. It provides extremely - fast lookups for translations. The \c .ts files \l lrelease + fast lookups for translations. The TS files \l lrelease processes can be specified at the command line, or given indirectly by a Qt \c .pro project file. This tool is run whenever a release of the application is to be made, from initial test version through to final release - version. If the \c .qm files are not created, e.g. because an + version. If the QM files are not created, e.g. because an alpha release is required before any translation has been undertaken, the application will run perfectly well using the text - the programmers placed in the source files. Once the \c .qm files + the programmers placed in the source files. Once the QM files are available the application will detect them and use them automatically. @@ -293,7 +293,7 @@ \section1 Missing Translations - Both \l lupdate and \l lrelease may be used with \c .ts + Both \l lupdate and \l lrelease may be used with TS translation source files which are incomplete. Missing translations will be replaced with the native language phrases at runtime. @@ -317,8 +317,8 @@ from the taskbar menu, or by double clicking the desktop icon, or by entering the command \c {linguist} at the command line. Once \QL has started, choose \menu{File|Open} from the \l{menubar} - {menu bar} and select a translation source (\c{.ts} file) to - load. If you don't have a \c{.ts} file, see the \l {Qt Linguist + {menu bar} and select a translation source (TS file) to + load. If you do not have a TS file, see the \l {Qt Linguist Manual: Release Manager} {release manager manual} to learn how to generate one. @@ -928,12 +928,12 @@ \image linguist-previewtool.png - Forms created by \e{Qt Designer} are stored in special \c .ui files. - \QL can make use of these \c .ui files to show the translations - done so far on the form itself. This of course requires access to the \c .ui + Forms created by \e{Qt Designer} are stored in special UI files. + \QL can make use of these UI files to show the translations + done so far on the form itself. This of course requires access to the UI files during the translation process. Activate \menu{Tools|Open/Refresh Form Preview} to open the window shown above. - The list of \c .ui files \QL has detected are displayed in the Forms + The list of UI files \QL has detected are displayed in the Forms List on the left hand. If the path to the files has changed, you can load the files manually via \menu{File|Open Form...}. Double-click on an entry in the Forms List to display the Form File. Select \e{<No Translation>} from @@ -947,15 +947,15 @@ \QL makes use of four kinds of files: \list - \o \c .ts \e {translation source files} \BR are human-readable XML + \o TS \e {translation source files} \BR are human-readable XML files containing source phrases and their translations. These files are usually created and updated by \l lupdate and are specific to an application. \o \c .xlf \e {XLIFF files} \BR are human-readable XML files that adhere to the international XML Localization Interchange File Format. \QL can be used to edit XLIFF files generated by other programs. For standard - Qt projects, however, only the \c .ts file format is used. - \o \c .qm \e {Qt message files} \BR are binary files that contain + Qt projects, however, only the TS file format is used. + \o QM \e {Qt message files} \BR are binary files that contain translations used by an application at runtime. These files are generated by \l lrelease, but can also be generated by \QL. \o \c .qph \e {Qt phrase book files} \BR are human-readable XML @@ -974,18 +974,18 @@ \list \o \gui {Open... Ctrl+O} \BR pops up an open file dialog from which a translation source \c .ts or \c .xlf file can be chosen. - \o \gui {Recently opened files} \BR shows the \c .ts files that + \o \gui {Recently opened files} \BR shows the TS files that have been opened recently, click one to open it. \o \gui {Save Ctrl+S} \BR saves the current translation source file. \o \gui {Save As...} \BR pops up a save as file dialog so that the current translation source file may be saved with a different name, format and/or put in a different location. - \o \gui {Release} \BR create a Qt message \c .qm file with the same base + \o \gui {Release} \BR create a Qt message QM file with the same base name as the current translation source file. The release manager's command line tool \l lrelease performs the same function on \e all of an application's translation source files. \o \gui {Release As...} \BR pops up a save as file dialog. The - filename entered will be a Qt message \c .qm file of the translation + filename entered will be a Qt message QM file of the translation based on the current translation source file. The release manager's command line tool \l lrelease performs the same function on \e all of an application's translation source files. @@ -1136,16 +1136,15 @@ \list \o \inlineimage linguist-fileopen.png \BR - Pops up the open file dialog to open a new translation source \c .ts - file. + Pops up the open file dialog to open a new translation source TS file. \o \inlineimage linguist-filesave.png \BR - Saves the current translation source \c .ts file. + Saves the current translation source TS file. \o \inlineimage linguist-fileprint.png \BR - Prints the current translation source \c .ts file. + Prints the current translation source TS file. \o \inlineimage linguist-phrasebookopen.png \BR @@ -1263,10 +1262,10 @@ Translation files are created as follows: \list 1 - \o Run \l lupdate initially to generate the first set of \c .ts + \o Run \l lupdate initially to generate the first set of TS translation source files with all the user-visible text but no translations. - \o The \c .ts files are given to the translator who adds translations + \o The TS files are given to the translator who adds translations using \QL. \QL takes care of any changed or deleted source text. \o Run \l lupdate to incorporate any new text added to the @@ -1274,7 +1273,7 @@ application with the translations; it does not destroy any data. \o Steps 2 and 3 are repeated as often as necessary. \o When a release of the application is needed \l lrelease is run to - read the \c .ts files and produce the \c .qm files used by the + read the TS files and produce the QM files used by the application at runtime. \endlist @@ -1319,7 +1318,7 @@ In production applications a more flexible approach, for example, loading translations according to locale, might be more appropriate. If - the \c .ts files are all named according to a convention such as + the TS files are all named according to a convention such as \e appname_locale, e.g. \c tt2_fr, \c tt2_de etc, then the code above will load the current locale's translation at runtime. @@ -1413,7 +1412,7 @@ To handle plural forms in the native language, you need to load a translation file for this language, too. \l lupdate has the \c -pluralonly command line option, which allows the creation of - \c .ts files containing only entries with plural forms. + TS files containing only entries with plural forms. See the \l{http://doc.trolltech.com/qq/}{Qt Quarterly} Article \l{http://doc.trolltech.com/qq/qq19-plurals.html}{Plural Forms in Translations} @@ -1503,7 +1502,7 @@ \contentspage {Qt Linguist Manual}{Contents} \previouspage Qt Linguist Manual: Programmers - The \c .ts file format used by \QL is described by the + The TS file format used by \QL is described by the \l{http://www.w3.org/TR/1998/REC-xml-19980210}{DTD} presented below, which we include for your convenience. Be aware that the format may change in future Qt releases. diff --git a/doc/src/mainclasses.qdoc b/doc/src/mainclasses.qdoc deleted file mode 100644 index 33bb91a..0000000 --- a/doc/src/mainclasses.qdoc +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \page mainclasses.html - \title Qt's Main Classes - \ingroup classlists - - These are the most frequently used Qt classes. For the complete - list see \link classes.html Qt's Classes \endlink. - - \generatelist mainclasses -*/ diff --git a/doc/src/model-view-programming.qdoc b/doc/src/model-view-programming.qdoc index e216591..7d7db19 100644 --- a/doc/src/model-view-programming.qdoc +++ b/doc/src/model-view-programming.qdoc @@ -1352,7 +1352,7 @@ The \l{QAbstractItemModel::data()}{data()} function is responsible for returning the item of data that corresponds to the index argument: - \snippet doc/src/snippets/stringlistmodel/model.cpp 1 + \snippet doc/src/snippets/stringlistmodel/model.cpp 1-data-read-only We only return a valid QVariant if the model index supplied is valid, the row number is within the range of items in the string list, and the @@ -1390,6 +1390,7 @@ The read-only model shows how simple choices could be presented to the user but, for many applications, an editable list model is much more useful. We can modify the read-only model to make the items editable + by changing the data() function we implemented for read-only, and by implementing two extra functions: \l{QAbstractItemModel::flags()}{flags()} and \l{QAbstractItemModel::setData()}{setData()}. @@ -1399,7 +1400,7 @@ \snippet doc/src/snippets/stringlistmodel/model.h 3 \section2 Making the Model Editable - + A delegate checks whether an item is editable before creating an editor. The model must let the delegate know that its items are editable. We do this by returning the correct flags for each item in @@ -1434,6 +1435,10 @@ one item of data has changed, the range of items specified in the signal is limited to just one model index. + Also the data() function needs to be changed to add the Qt::EditRole test: + + \snippet doc/src/snippets/stringlistmodel/model.cpp 1 + \section2 Inserting and Removing Rows It is possible to change the number of rows and columns in a model. In the diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 145b361..5f0f868 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -55,6 +55,7 @@ \row \o \l{QtGui} \o Graphical user interface (GUI) components \row \o \l{QtNetwork} \o Classes for network programming \row \o \l{QtOpenGL} \o OpenGL support classes + \row \o \l{QtOpenVG} \o OpenVG support classes \row \o \l{QtScript} \o Classes for evaluating Qt Scripts \row \o \l{QtScriptTools} \o Additional Qt Script components \row \o \l{QtSql} \o Classes for database integration using SQL diff --git a/doc/src/paintsystem.qdoc b/doc/src/paintsystem.qdoc index 56f60a3..c2434e0 100644 --- a/doc/src/paintsystem.qdoc +++ b/doc/src/paintsystem.qdoc @@ -121,7 +121,7 @@ Normally, QPainter draws in a "natural" coordinate system, but it is able to perform view and world transformations using the - QMatrix class. For more information, see \l {The Coordinate + QTransform class. For more information, see \l {The Coordinate System} documentation which also describes the rendering process, i.e. the relation between the logical representation and the rendered pixels, and the benefits of anti-aliased painting. @@ -292,9 +292,7 @@ looking the same. Qt provides the QPicture::load() and QPicture::save() functions - for loading and saving pictures. But in addition the QPictureIO - class is provided to enable the programmer to install new picture - file formats in addition to those that Qt provides. + as well as streaming operators for loading and saving pictures. \section2 Printer diff --git a/doc/src/phonon.qdoc b/doc/src/phonon.qdoc index 27b43b9..b36c142 100644 --- a/doc/src/phonon.qdoc +++ b/doc/src/phonon.qdoc @@ -71,7 +71,7 @@ As an example, we show a media graph for an audio stream: - \image conceptaudio.png + \image conceptaudio.png The playback is started and managed by the media object, which send the media stream to any sinks connected to it by a path. The @@ -119,7 +119,7 @@ The input of sinks in a Phonon media graph comes from a \l{Phonon::}{MediaObject}, though it might have been processed - through other nodes on the way. + through other nodes on the way. While the \l{Phonon::}{MediaObject} controls the playback, the sink has basic controls for manipulation of the media. With an @@ -222,9 +222,9 @@ The setting of a Category, Phonon::MusicCategory in this case, does not affect the actual playback; the category can be used by KDE to control the playback through, for instance, the control - panel. + panel. - \omit Not sure about this + \omit Not sure about this Users of KDE can often also choose to send sound with the CommunicationCategory, e.g., given to VoIP, to their headset, while sound with MusicCategory is sent to the sound card. @@ -238,7 +238,7 @@ The AudioOutput node will work with all audio formats supported by the back end, so you don't need to know what format a specific - media source has. + media source has. For a an extensive example of audio playback, see the \l{Music Player Example}{Phonon Music Player}. @@ -313,7 +313,7 @@ <code> - <code walkthrough> + <code walkthrough> \endomit @@ -325,7 +325,7 @@ hardware or intermediate technology. For the programmer, this implies that the media nodes, e.g., media objects, processors, and sinks, are produced by the back end. Also, it is responsible for - building the graph, i.e., connecting the nodes. + building the graph, i.e., connecting the nodes. The backends of Qt use the media systems DirectShow (which requires DirectX) on Windows, QuickTime on Mac, and GStreamer on @@ -335,12 +335,12 @@ Backends expose information about the underlying system. It can tell which media formats are supported, e.g., \c AVI, \c mp3, or - \c OGG. + \c OGG. A user can often add support for new formats and filters to the underlying system, by, for instance, installing the DivX codex. We can therefore not give an exact overview of which formats are - available with the Qt backends. + available with the Qt backends. \omit Not sure I want a separate section for this \section2 Communication with the Backends @@ -366,7 +366,7 @@ \endomit - \section2 Querying Backends for Support + \section2 Querying Backends for Support As mentioned, Phonon depends on the backend to provide its functionality. Depending on the individual backend, full support @@ -379,7 +379,7 @@ \l{Phonon::BackendCapabilities::}{isMimeTypeAvailable()} functions to query which MIME types the backend can produce nodes for. The types are listed as strings, which for any type is equal for any - backend or platform. + backend or platform. The backend will emit a signal - \l{Phonon::BackendCapabilities::}{Notifier::capabilitiesChanged()} @@ -611,7 +611,7 @@ Qt Commercial Edition licensees that wish to distribute applications that use the Phonon module need to be aware of their obligations under the - GNU Lesser General Public License (LGPL). + GNU Lesser General Public License (LGPL). Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL; version 2.1 diff --git a/doc/src/platform-notes-rtos.qdoc b/doc/src/platform-notes-rtos.qdoc new file mode 100644 index 0000000..8a52d84 --- /dev/null +++ b/doc/src/platform-notes-rtos.qdoc @@ -0,0 +1,220 @@ +/*! + \page platform-notes-vxworks.html + \title Platform Notes - VxWorks + \contentspage Platform Notes + \target VxWorks + + \note VxWorks is a community supported platform. See the + \l{Supported Platforms} page for more information. + + This page contains information about the Qt for VxWorks port. More + information about the combinations of platforms and compilers supported + by Qt can be found on the \l{Supported Platforms} page. + + \tableofcontents + + \section1 Supported Versions + + Qt has been tested on WindRiver VxWorks 6.7 in kernel mode using the + vendor supplied GCC compiler, targetting both the x86 simulator + (simpentium) and Power-PC devices (ppc). + VxWorks' RTP mode is currently not supported. + + \section1 Limitations + + The VxWorks kernel has an optional POSIX compatibility layer, but this + layer does not implement all POSIX functionality needed for a complete + Qt port. + + \table + \header \o Function \o Notes + \row \o QProcess + \o Not available - VxWorks has no concept of processes. + \row \o QSharedMemory + \o Not available - VxWorks has only a global, flat address space. + \row \o QSystemSemaphore + \o Not available - VxWorks has no concept of processes. + \row \o QLibrary + \o QLibrary is only a small stub to make it possible to build + static plugins. + \row \o QCoreApplication + \o Can only be instantiated once. Qt's Q(CoreE)Application is + tightly coupled to one address space and process, while VxWorks + only supports one global address space and has no concept of + processes. + \row \o Phonon + \o There is no standard audio backend, which could be integrated into Phonon. + \row \o Qt3Support + \o The Qt3Support library is not available on QNX. + + \endtable + + \section1 Build Instructions + + Qt for VxWorks needs to be \l{Cross-Compiling Qt for Embedded Linux + Applications}{cross-compiled} on a Linux host. \c configure and \c make + the build like you would with a standard \l{Cross-Compiling Qt for + Embedded Linux Applications}{embedded Linux cross build}. Building the + VxWorks simulator would be done like this: + + \code + <path/to/qt/sources>/configure -xplatform unsupported/vxworks-simpentium-g++ -embedded vxworks -exceptions -no-gfx-linuxfb -no-mouse-linuxtp -no-mouse-pc -no-kbd-tty + make + \endcode + + \list + \o \c{-xplatform unsupported/qws/vxworks-simpentium-g++} - selects the x86 simulator mkspec for VxWorks + \o \c{-embedded vxworks} - builds the embedded version of Qt and sets the architecture to VxWorks + \o \c{-exceptions} - see General Notes below + \o \c{-no-gfx-linuxfb}, \c{-no-mouse-linuxtp}, \c{-no-mouse-pc} and \c{-no-kbd-tty} are Linux specific and won't work on VxWorks + \endlist + + \section1 General Notes + + \list + + \o Configuring with \c{-exceptions} is necessary, because the VxWorks + 6.7 g++ headers require exceptions to be enabled when compiling C++ + code. + + \o Configure's \c{-xplatform} can be any of + \c{unsupported/vxworks-(simpentium|ppc)-(g++|dcc)}, but \c{dcc} + (WindRiver DIAB compiler) has not yet tested been tested with Qt 4.6 and + VxWorks 6.7. + + \o Building shared libraries with \c{-shared} (the default) doesn't + really build shared libraries, like e.g. on Linux, since these are not + supported by VxWorks. Instead, qmake will created partially linked + objects, that can be loaded at runtime with \c{ld}. + + \o Creating static builds with \c{-static} is fully supported. + + \o "Munching" (generating constructors/destructors for static C++ + objects) is done automatically by a special qmake extension (for both + shared libraries and executables) + + \o VxWorks does not have a file system layer, but the low level storage + drivers have to supply a file system like interface to the applications. + Since each driver implements a different subset of the functionality + supported by this interface, Qt's file system auto-tests show wildly + differing results running on different "file systems". The best results + can be achieved when running on a (writable) NFS mount, since that + provides the most Unix-ish interface. The worst results come from the + FTP file system driver, which may crash when accessed by a + \c{QFileInfo}. + + \o Keep in mind that VxWorks doesn't call your \c{main()} function with + the standard \c{argc}/\c{argv} parameters. So either add a special + \c{vxmain()} function or use a tool like \c{callmain} to translate + VxWorks' commandline arguments to an \c{argc}/\c{argv} array. + + \o Some example will fail to build, due to some missing dependencies + (e.g. shared memory) - this will be fixed in a later release. + + \endlist +*/ + +/*! + \page platform-notes-qnx.html + \title Platform Notes - QNX + \contentspage Platform Notes + \target QNX + + \note QNX is a community supported platform. See the + \l{Supported Platforms} page for more information. + + This page contains information about the Qt for QNX port. More + information about the combinations of platforms and compilers supported + by Qt can be found on the \l{Supported Platforms} page. + + Note that Qt for QNX is currently based on \l{Qt for Embedded Linux}, which + contains its own windowing system. Mixing QNX's Photon environment with + Qt for QNX is currently not possible. Building Qt for QNX with Photon's + X11 embedded server is not recommended due to missing support for X11 extensions, + resulting in poor rendering quality. + + Qt for QNX contains experimental screen and input drivers based on QNX's + \c devi-hid and \c io-display. For more information, check the class documentation + for QQnxScreen, QWSQnxKeyboardHandler and QQnxMouseHandler. See the + \l{Porting Qt for Embedded Linux to a New Architecture} document for information + on how to add custom screen or input drivers. + + \tableofcontents + + \section1 Supported Versions + + Qt has been tested on QNX 6.4 on i386 and PowerPC targets with QNX's default + gcc compiler. + + \section1 Limitations + + Some of Qt's functionality is currently not available on QNX: + + \table + \header \o Function \o Notes + \row \o QProcess + \o Not available - QNX doesn't support mixing threads and processes. + \row \o QSharedMemory + \o Not available - QNX doesn't support SYSV style shared memory. + \row \o QSystemSemaphore + \o Not available - QNX doesn't support SYSV style system semaphores. + \row \o QWS Multi Process + \o QT_NO_QWS_MULTIPROCESS is always on due to missing shared memory support. + \row \o Phonon + \o There is no standard audio backend, which could be integrated into Phonon. + \row \o Qt3Support + \o The Qt3Support library is not available on QNX. + \endtable + + \section1 Build Instructions + + Qt for QNX needs to be built either on a QNX system, or \l{Cross-Compiling Qt + for Embedded Linux Applications}{cross-compiled} on a Linux host. In either + case, The QNX Software Development Platform must be installed. + + Example configure line for cross-compiling Qt for QNX on a Linux host for an + i386 QNX target: + + \code + configure -xplatform unsupported/qws/qnx-i386-g++ -embedded i386 -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-qt3support -qt-gfx-qnx -qt-mouse-qnx -qt-kbd-qnx -no-exceptions + \endcode + + \list + \o \c{-xplatform unsupported/qws/qnx-i386-g++} - selects the i386-g++ mkspec for QNX + \o \c{-embedded i386} - builds the embedded version of Qt and sets the architecture to i386 + \o \c{-no-gfx-linuxfb}, \c{-no-mouse-linuxtp} and \c{-no-kbd-tty} are Linux specific and won't work on QNX + \o \c{-no-qt3support} - required since the Qt3 support classes are not supported on QNX + \o \c{-no-exceptions} - reduces the size of the library by disabling exception support + \o \c{-qt-gfx-qnx} - enables the experimental \c{io-graphics} based display driver + \o \c{-qt-mouse-qnx} - enables the experimental \c{devi-hig} based mouse driver + \o \c{-qt-kbd-qnx} - enables the experimental \c{devi-hig} based keyboard driver + \endlist + + \section1 General Notes + + \list + \o To enable the experimental QNX display and input drivers, \c{io-display} needs to be + up and running. The \c devi-hid based Qt input drivers require \c devi-hid to run + in resource mode without Photon support. To enable a standard mouse and keyboard + combination, run \c devi-hid as follows: \c{/usr/photon/bin/devi-hid -Pr kbd mouse}. + Note that your current shell will not accept keyboard and mouse input anymore after + running that command, so run it either from a script that launches a Qt application + afterwards, or make sure to have remote login available to launch a Qt application. + In addition, the \c QWS_DISPLAY, \c QWS_MOUSE_PROTO and \c QWS_KEYBOARD environment + variables should all be set to \c{qnx} before running a Qt application. + + \o The 3rd party TIFF library currently doesn't build due to the missing \c inflateSync + symbol from QNX's \c{libz.so.2}. Workarounds would be to manually replace QNX's libz + with a newer version, or disable the TIFF plugin entierly by appending + \c{QT_CONFIG += no-tiff} to \c{.qmake.cache} after configuring Qt. + + \o Some of the tools, examples and demos do not compile due to dependencies on QProcess + or other classes that are not available on QNX. + \endlist + + \section1 Platform Regressions + + Qt for QNX's behavior is mostly identical with \l{Qt for Embedded Linux}. However, + some regressions were spotted in QDateTime computation around year 0 and year 1970, + which have been tracked back to faulty time zone data on some QNX versions. +*/ diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc index 8fe8170..4738928 100644 --- a/doc/src/platform-notes.qdoc +++ b/doc/src/platform-notes.qdoc @@ -60,6 +60,10 @@ \tableofcontents{1 Platform Notes - Embedded Linux} \o \l{Platform Notes - Windows CE} \tableofcontents{1 Platform Notes - Windows CE} + \o \l{Platform Notes - QNX} + \tableofcontents{1 Platform Notes - QNX} + \o \l{Platform Notes - VxWorks} + \tableofcontents{1 Platform Notes - VxWorks} \endlist See also the \l{Compiler Notes} for information about compiler-specific @@ -67,7 +71,8 @@ supported by Qt can be found on the \l{Supported Platforms} page. If you have anything to add to this list or any of the platform or - compiler-specific pages, please submit it via the \l{Bug Report Form}. + compiler-specific pages, please submit it via the \l{Bug Report Form} + or through the \l{Public Qt Repository}. */ /*! @@ -374,133 +379,6 @@ */ /*! - \page supported-platforms.html - \title Supported Platforms - \brief The platforms supported by Nokia for Qt. - \ingroup platform-notes - - Qt is supported on a variety of 32-bit and 64-bit platforms, and can - usually be built on each platform with GCC, a vendor-supplied compiler, or - a third party compiler. Although Qt may be built on a range of platform-compiler - combinations, only a subset of these are actively supported by Qt. - - A more general overview of the platforms Qt runs on can be found on the - \l{Platform Notes} page. Information about the compilers used on each platform - can be found on the \l{Compiler Notes} page. - - \tableofcontents - - \section1 Most Common Actively Supported Platforms - - \table - \header \o Platform \o Compilers - \row \o Apple Mac OS X (32-bit) \o gcc 4.0.1 - \row \o Linux (32 and 64-bit) \o gcc 4.1, 4.2, 4.3 - \row \o Microsoft Windows \o gcc 3.4.2 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit), 2008, - \l{Intel C++ Compiler}{Intel icc (see note)} - \endtable - - Any platform-compiler combinations not listed here should be considered unsupported. - - \section1 Actively Supported Platforms - - \table - \header \o OS \o Architecture \o Makespec \o Compiler version(s) - \row \o AIX \o PowerPC \o aix-xlc \o xlC 6 - \row \o AIX \o PowerPC \o aix-xlc-64 \o xlC 6 - \row \o HPUX \o PA/RISC \o hpux-acc* \o A.03.57 (aCC 3.57) - \row \o HPUX \o PA/RISC \o hpux-g++ \o GCC 3.4.4 - \row \o HPUX \o PA/RISC \o hpux-g++-64 \o GCC 3.4.4 - \row \o HPUX \o Itanium \o hpuxi-acc* \o A.06.10 (aCC 6.10) - \row \o Embedded Linux \o ARM \o qws/linux-arm-g++ \o GCC 3.4, 4.1, 4.2, 4.3 - \row \o Embedded Linux \o Intel 32-bit \o qws/linux-x86-g++ \o GCC 3.4, 4.1, 4.2, 4.3 - \row \o Linux \o Intel 32/64-bit \o linux-g++ \o GCC 4.1, 4.2, 4.3 - \row \o Linux \o Intel 32/64-bit \o linux-icc \o icc 10.1 - \row \o Linux \o Intel 32-bit \o linux-icc-32 \o icc 10.1 - \row \o Linux \o Intel 64-bit \o linux-icc-64 \o icc 10.1 - \row \o Mac OS X \o Intel 32/64-bit, PowerPC \o macx-g++ \o GCC 4.0.1 - \row \o Mac OS X \o Intel 32/64-bit, PowerPC \o macx-g++42 \o GCC 4.2 - \row \o Solaris \o SPARC, Intel 32-bit \o solaris-cc* \o Sun CC 5.5 - \row \o Solaris \o SPARC, Intel 32-bit \o solaris-g++* \o GCC 3.4.2 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-g++ \o GCC 3.4.2 (MinGW 5.1.4) - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-icc \o icc 9.1 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2003 \o Visual Studio 2003 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2005 \o Visual Studio 2005 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2008 \o Visual Studio 2008 - \row \o Windows CE \o Intel 32-bit, ARMv4i, MIPS - \o wince*-msvc2005 \o Visual Studio 2005 - \row \o Windows CE \o Intel 32-bit, ARMv4i, MIPS - \o wince*-msvc2008 \o Visual Studio 2008 - \endtable - - \section1 Community Supported Platforms - - \table - \header \o OS \o Architecture \o Makespec \o Compiler version(s) - \row \o Mac OS X \o Intel 32-bit, PowerPC \o darwin-g++ \o - - \row \o FreeBSD \o - \o freebsd-g++ \o - - \row \o FreeBSD \o - \o freebsd-g++34 \o - - \row \o FreeBSD \o - \o freebsd-g++40 \o - - \row \o FreeBSD \o - \o freebsd-icc \o - - \row \o HPUX \o Itanium \o hpuxi-g++* \o GCC 4.1 - \row \o Linux \o - \o linux-cxx \o - - \row \o Linux \o - \o linux-ecc-64 \o - - \row \o Linux \o Itanium \o linux-g++ \o GCC 3.4 - \row \o Linux \o Intel 32/64-bit \o linux-g++ \o GCC 3.3, 3.4 - \row \o Linux \o Intel 32/64-bit \o linux-g++ \o GCC 4.0 - \row \o Linux \o - \o linux-kcc \o - - \row \o Linux \o - \o linux-llvm \o - - \row \o Linux \o - \o linux-lsb-g++ \o - - \row \o LynxOS \o - \o lynxos-g++ \o - - \row \o Mac OS X \o - \o macx-llvm \o - - \row \o NetBSD \o - \o netbsd-g++ \o - - \row \o OpenBSD \o - \o openbsd-g++ \o - - \row \o Embedded Linux \o MIPS, PowerPC \o qws/linux-g++ \o GCC 3.4, 4.1, 4.2, 4.3 - \endtable - - \section1 Unsupported Platforms - - The following platforms were supported in previous releases, either as actively supported - or community supported platforms, but are now unsupported. - - \table - \header \o OS \o Architecture \o Makespec \o Compiler version(s) - \row \o IRIX \o MIPS \o irix-cc* \o MIPS Pro - \row \o IRIX \o MIPS \o irix-g++* \o GCC 3.3 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc \o Visual C++ 6.0 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2002 \o Visual Studio 2002 - \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc.net \o Visual Studio 2002 - \endtable - - Qt's online \l{Platform Support Policy} for Qt describes the level of - support you should expect for these platforms. - - \section1 Supported Features - - Not all compilers used to build Qt are able to compile all modules. The following table - shows the compiler support for five modules that are not uniformly available for all - platforms and compilers. - - \table - \header \o Compiler \o{5,1} Features - \header \o \o Concurrent \o XmlPatterns \o WebKit \o CLucene \o Phonon - \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} - \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row - \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X} - \row - \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X} - \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X} - \row \o \l{Known Issues in %VERSION%}{Intel CC 10 (see note)} - \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row - \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X} - \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \endtable -*/ - -/*! \page platform-notes-windows-ce.html \title Platform Notes - Windows CE \contentspage Platform Notes @@ -521,218 +399,3 @@ information about the combinations of platforms and compilers supported by Qt can be found on the \l{Supported Platforms} page. */ - -/*! - \page compiler-notes.html - \ingroup platform-notes - \title Compiler Notes - \brief Information about the C++ compilers and tools used to build Qt. - - This page contains information about the C++ compilers and tools used - to build Qt on various platforms. - - \tableofcontents - - Please refer to the \l{Platform Notes} for information on the platforms - Qt is currently known to run on, and see the \l{Supported Platforms} - page for information about the status of each platform. - - If you have anything to add to this list or any of the platform or - compiler-specific pages, please submit it via the - \l{Bug Report Form}. - - \target GCC - \section1 GCC - - \section2 GCC on Windows (MinGW) - - We have tested Qt with this compiler on Windows XP. - The minimal version of MinGW supported is: - - \list - \o GCC 3.4.2 - \o MinGW runtime 3.7 - \o win32api 3.2 - \o binutils 2.15.91 - \o mingw32-make 3.80.0-3 - \endlist - - \section2 GCC 4.0.0 - - The released package of the compiler has some bugs that lead to miscompilations. - We recommend using GCC 4.0.1 or later, or to use a recent CVS snapshot of the - GCC 4.0 branch. The version of GCC 4.0.0 that is shipped with Mac OS X 10.4 - "Tiger" is known to work with Qt for Mac OS X. - - \section2 HP-UX - - The hpux-g++ platform is tested with GCC 3.4.4. - - \section2 Solaris - - Please use GCC 3.4.2 or later. - - \section2 Mac OS X - - Please use the latest GCC 3.3 from Apple or a later version of GCC 3. - The gcc 3.3 that is provided with Xcode 1.5 is known to generate bad code. - Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}. - - \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64) - - This compiler is known to miscompile some parts of Qt when doing a - release build. There are several workarounds: - - \list 1 - \o Use a debug build instead. - \o For each miscompilation encountered, recompile the file, removing the -O2 option. - \o Add -fno-gcse to the QMAKE_CXXFLAGS_RELEASE. - \endlist - - \section1 HP ANSI C++ (aCC) - - The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The - hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10. - - \section1 Intel C++ Compiler - - Qt supports the Intel C++ compiler on both Windows and Linux. - However, there are a few issues on Linux (see the following - section). - - \section2 Intel C++ Compiler for Linux - - Nokia currently tests the following compilers: - - \list - - \o Intel(R) C++ Compiler for applications running on IA-32, - Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 - - \o Intel(R) C++ Compiler for applications running on Intel(R) 64, - Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 - - \endlist - - We do not currently test the IA-64 (Itanium) compiler. - - \section2 Known Issues with Intel C++ Compiler for Linux - - \list - - \o Precompiled header support does not work in version 10.0.025 - and older. For these compilers, you should configure Qt with - -no-pch. Precompiled header support works properly in version - 10.0.026 and later. - \o Version 10.0.026 for Intel 64 is known to miscompile qmake when - building in release mode. For now, configure Qt with - -debug. Version 10.1.008 and later can compile qmake in release - mode. - \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are - known crash with "(0): internal error: 0_47021" when compiling - QtXmlPatterns, QtWebKit, and Designer in release mode. Version - 10.1.017 compiles these modules correctly in release mode. - \endlist - - \section2 Intel C++ Compiler (Windows, Altix) - - Qt 4 has been tested successfully with: - - \list - \o Windows - Intel(R) C++ Compiler for 32-bit applications, - Version 8.1 Build 20050309Z Package ID: W_CC_PC_8.1.026 - \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based - applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030 - \endlist - - We currently only test the Intel compiler on 32-bit Windows versions. - - \section1 MIPSpro (IRIX) - - \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page - and Qt's Software's online \l{Platform Support Policy} page for details.} - - Qt 4.4.x requires MIPSpro version 7.4.2m. - - Note that MIPSpro version 7.4.4m is currently not supported, since it has - introduced a number of problems that have not yet been resolved. - We recommend using 7.4.2m for Qt development. However, please note the - unsupported status of this platform. - - \target Sun Studio - \section1 Forte Developer / Sun Studio (Solaris) - - \section2 Sun Studio - - Qt is tested using Sun Studio 8 (Sun CC 5.5). Go to - \l{Sun Studio Patches} page on Sun's Web site to download - the latest patches for your Sun compiler. - - \section2 Sun WorkShop 5.0 - - Sun WorkShop 5.0 is not supported with Qt 4. - - \section1 Visual Studio (Windows) - - We do most of our Windows development on Windows XP, using Microsoft - Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit - versions). - - Qt works with the Standard Edition, the Professional Edition and Team - System Edition of Visual Studio 2005. - - We also test Qt 4 on Windows XP with Visual Studio .NET and Visual Studio 2003. - - In order to use Qt with the Visual Studio 2005/2008 Express Edition you need - to download and install the platform SDK. Due to limitations in the - Express Edition it is not possible for us to install the Qt Visual - Studio Integration. You will need to use our command line tools to - build Qt applications with this edition. - - The Visual C++ Linker doesn't understand filenames with spaces (as in - \c{C:\Program files\Qt\}) so you will have to move it to another place, - or explicitly set the path yourself; for example: - - \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0 - - If you are experiencing strange problems with using special flags that - modify the alignment of structure and union members (such as \c{/Zp2}) - then you will need to recompile Qt with the flags set for the - application as well. - - If you're using Visual Studio .NET (2002) Standard Edition, you should be - using the Qt binary package provided, and not the source package. - As the Standard Edition does not optimize compiled code, your compiled - version of Qt would perform suboptimally with respect to speed. - - With Visual Studio 2005 Service Pack 1 a bug was introduced which - causes Qt not to compile, this has been fixed with a hotfix available - from Microsoft. See this - \l{http://www.qtsoftware.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry} - for more information. - - \section1 IBM xlC (AIX) - - The makeC++SharedLib utility must be in your PATH and be up to date to - build shared libraries. From IBM's - \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX} - Redbook: - - \list - \o "The second step is to use the makeC++SharedLib command to create the - shared object. The command has many optional arguments, but in its - simplest form, can be used as follows:" - \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1 - \o "The full path name to the command is not required; however, to avoid - this, you will have to add the directory in which it is located to - your PATH environment variable. The command is located in the - /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX, - Version 5 compiler." - \endlist - - \section2 VisualAge C++ for AIX, Version 6.0 - - Make sure you have the - \l{http://www-1.ibm.com/support/search.wss?rs=32&tc=SSEP5D&dc=D400}{latest upgrades} - installed. -*/ diff --git a/doc/src/plugins-howto.qdoc b/doc/src/plugins-howto.qdoc index 4c37f8e..3e5cc93 100644 --- a/doc/src/plugins-howto.qdoc +++ b/doc/src/plugins-howto.qdoc @@ -92,7 +92,6 @@ \row \o QInputContextPlugin \o \c inputmethods \o Case Sensitive \row \o QKbdDriverPlugin \o \c kbddrivers \o Case Insensitive \row \o QMouseDriverPlugin \o \c mousedrivers \o Case Insensitive - \row \o QPictureFormatPlugin \o \c pictureformats \o Case Sensitive \row \o QScreenDriverPlugin \o \c gfxdrivers \o Case Insensitive \row \o QScriptExtensionPlugin \o \c script \o Case Sensitive \row \o QSqlDriverPlugin \o \c sqldrivers \o Case Sensitive diff --git a/doc/src/porting4-canvas.qdoc b/doc/src/porting4-canvas.qdoc index fa0bc6b..d1221cf 100644 --- a/doc/src/porting4-canvas.qdoc +++ b/doc/src/porting4-canvas.qdoc @@ -43,7 +43,7 @@ \page graphicsview-porting.html \title Porting to Graphics View \contentspage {Porting Guides}{Contents} - \previouspage Porting .ui Files to Qt 4 + \previouspage Porting UI Files to Qt 4 \nextpage qt3to4 - The Qt 3 to 4 Porting Tool \ingroup porting \ingroup multimedia diff --git a/doc/src/porting4-designer.qdoc b/doc/src/porting4-designer.qdoc index 916894b..7de1d43 100644 --- a/doc/src/porting4-designer.qdoc +++ b/doc/src/porting4-designer.qdoc @@ -41,12 +41,12 @@ /*! \page porting4-designer.html - \title Porting .ui Files to Qt 4 + \title Porting UI Files to Qt 4 \contentspage {Porting Guides}{Contents} \previouspage Porting to Qt 4 - Drag and Drop \nextpage Porting to Graphics View \ingroup porting - \brief Information about changes to the .ui file format in Qt 4. + \brief Information about changes to the UI file format in Qt 4. Qt Designer has changed significantly in the Qt 4 release. We have moved away from viewing Qt Designer as an IDE and @@ -57,20 +57,20 @@ IDEs. The most important changes in Qt Designer 4 which affect porting - for \c .ui files are summarized below: + for UI files are summarized below: \list \o \bold{Removed project manager.} - Qt Designer now only reads and edits \c .ui - files. It has no notion of a project (\c .pro file). + Qt Designer now only reads and edits UI + files. It has no notion of a project file (\c .pro). \o \bold{Removed code editor.} Qt Designer can no longer be used to edit source files. - \o \bold{Changed format of \c .ui files.} + \o \bold{Changed format of UI files.} Qt Designer 4 cannot read files created by Qt Designer 3 and vice versa. However, we provide the tool \c uic3 to generate Qt - 4 code out of Qt 3 \c .ui files, and to convert old \c .ui files + 4 code out of Qt 3 UI files, and to convert old UI files into a format readable by Qt Designer 4. \o \bold{Changed structure of the code generated by \c uic.} @@ -80,7 +80,7 @@ \c Ui::MyForm. \o \bold{New resource file system.} Icon data is no longer - stored in the \c .ui file. Instead, icons are put into resource + stored in the UI file. Instead, icons are put into resource files (\c .qrc). \endlist @@ -146,9 +146,9 @@ therefore has an interface identical to that of a class generated by \c uic in Qt 3. - Creating POD classes from \c .ui files is more flexible and + Creating POD classes from UI files is more flexible and generic than the old approach of creating widgets. Qt Designer - doesn't need to know anything about the main container apart from + does not need to know anything about the main container apart from the base widget class it inherits. Indeed, \c Ui::HelloWorld can be used to populate any container that inherits QWidget. Conversely, all non-GUI aspects of the main container may be @@ -163,10 +163,10 @@ \list 1 \o To generate headers and source code for a widget to implement any custom signals and slots added using Qt Designer 3. - \o To generate a new \c .ui file that can be used with Qt Designer 4. + \o To generate a new UI file that can be used with Qt Designer 4. \endlist - You can use both these methods in combination to obtain \c{.ui}, header + You can use both these methods in combination to obtain UI, header and source files that you can use as a starting point when porting your user interface to Qt 4. @@ -179,7 +179,7 @@ The resulting files \c myform.h and \c myform.cpp implement the form in Qt 4 using a QWidget that will include custom signals, - slots and connections specified in the \c .ui file. However, + slots and connections specified in the UI file. However, see below for the \l{#Limitations of uic3}{limitations} of this method. @@ -190,7 +190,7 @@ The resulting file \c myform4.ui can be edited in Qt Designer 4. The header file for the form is generated by Qt 4's \c uic. See the - \l{Using a Designer .ui File in Your Application} chapter of the + \l{Using a Designer UI File in Your Application} chapter of the \l{Qt Designer Manual} for information about the preferred ways to use forms created with Qt Designer 4. @@ -218,7 +218,7 @@ \section1 Limitations of uic3 - Converting Qt 3 \c .ui files to Qt 4 has some limitations. The + Converting Qt 3 UI files to Qt 4 has some limitations. The most noticeable limitation is the fact that since \c uic no longer generates a QObject, it's not possible to define custom signals or slots for the form. Instead, the programmer must @@ -231,9 +231,9 @@ A quick and dirty way to port forms containing custom signals and slots is to generate the code using \c uic3, rather than \c uic. Since \c uic3 does generate a QWidget, it will populate it with custom - signals, slots and connections specified in the \c .ui file. - However, \c uic3 can only generate code from Qt 3 \c .ui files, which - implies that the \c .ui files never get translated and need to be + signals, slots and connections specified in the UI file. + However, \c uic3 can only generate code from Qt 3 UI files, which + implies that the UI files never get translated and need to be edited using Qt Designer 3. Note also that it is possible to create implicit connections @@ -256,7 +256,7 @@ \section1 Icons In Qt 3, the binary data for the icons used by a form was stored - in the \c .ui file. In Qt 4 icons and any other external files + in the UI file. In Qt 4 icons and any other external files can be compiled into the application by listing them in a \l{The Qt Resource System}{resource file} (\c .qrc). This file is translated into a C++ source file using Qt's resource compiler @@ -306,7 +306,7 @@ the following steps: \list 1 - \o Use \c{uic3 -convert} to obtain a \c .ui file understood by + \o Use \c{uic3 -convert} to obtain a UI file understood by Qt Designer 4. \o Create a \c .qrc file with a list of all the icon files. diff --git a/doc/src/porting4-overview.qdoc b/doc/src/porting4-overview.qdoc index d91729d..3c3c085 100644 --- a/doc/src/porting4-overview.qdoc +++ b/doc/src/porting4-overview.qdoc @@ -115,13 +115,13 @@ support these project-level features. We recommend using one of the - \l{Using a Designer .ui File in Your Application}{form subclassing approaches} + \l{Using a Designer UI File in Your Application}{form subclassing approaches} with forms created using Qt Designer. This avoids the need to use \c{.ui.h} files and special purpose code editors. Existing Qt 3 forms created using Qt Designer can be gradually ported to Qt 4 by following the advice in the - \l{Porting .ui Files to Qt 4} guide. However, some extra effort + \l{Porting UI Files to Qt 4} guide. However, some extra effort will be required to move application logic from \c{.ui.h} files into the main body of a Qt 4 application. @@ -195,9 +195,9 @@ QNetworkRequest, QNetworkReply, and QNetworkAccessManager documentation for further details. - It is also possible to perform operations on remote files - through the QHttp and QFtp classes, and on local files with - the QFile class. + It is also possible to perform operations on remote files through + the QNetworkAccessManager and QFtp classes, and on local files + with the QFile class. \section2 SQL Cursors (QSqlCursor) diff --git a/doc/src/porting4.qdoc b/doc/src/porting4.qdoc index 7ce2969..963b918 100644 --- a/doc/src/porting4.qdoc +++ b/doc/src/porting4.qdoc @@ -97,7 +97,7 @@ to developers porting from Qt 3 to Qt 4. \o \l{Porting to Qt 4 - Drag and Drop} \mdash covers differences in the way drag and drop is handled between Qt 3 and Qt 4. - \o \l{Porting .ui Files to Qt 4} \mdash describes the new format used to + \o \l{Porting UI Files to Qt 4} \mdash describes the new format used to describe forms created with \QD. \o \l{Porting to Graphics View} \mdash provides a class-by-class overview of the differences between Qt 3's canvas API and Qt 4's Graphics @@ -135,7 +135,7 @@ \o Run the \l qt3to4 porting tool. The tool will go through your source code and adapt it to Qt 4. - \o Follow the instructions in the \l{Porting .ui Files to Qt 4} + \o Follow the instructions in the \l{Porting UI Files to Qt 4} page to port Qt Designer files. \o Recompile with Qt 4. For each error, search below for related @@ -347,7 +347,7 @@ macro, removing the need for a \c Q_OVERRIDE() macro. The table below lists the Qt properties that have been renamed in - Qt 4. Occurrences of these in \e{Qt Designer} \c .ui files are + Qt 4. Occurrences of these in \e{Qt Designer} UI files are automatically converted to the new name by \c uic. \table @@ -406,11 +406,11 @@ Some properties have been removed from Qt 4, but the associated access functions are provided if \c QT3_SUPPORT is defined to help - porting to Qt 4. When converting Qt 3 \c .ui files to Qt 4, \c uic + porting to Qt 4. When converting Qt 3 UI files to Qt 4, \c uic generates calls to the Qt 3 compatibility functions. Note that this only applies to the properties of the Qt3Support library, i.e. \c QT3_SUPPORT properties of the other libraries must be - ported manually when converting Qt 3 .ui files to Qt 4. + ported manually when converting Qt 3 UI files to Qt 4. The table below lists these properties with the read and write functions that you can use instead. The documentation for the @@ -518,7 +518,7 @@ (Notice the \c & in the parameter declaration.) \omit - \section1 Qt Designer .ui Files + \section1 Qt Designer UI Files ### \endomit @@ -1977,7 +1977,7 @@ \table \header \o Qt 3 function \o Qt 4 equivalents - \row \o QImageIO::description() \o QImageWriter::description() + \row \o QImageIO::description() \o QImageWriter::text() \row \o QImageIO::fileName() \o QImageReader::fileName() and QImageWriter::fileName() \row \o QImageIO::format() \o QImageReader::format() and QImageWriter::format() \row \o QImageIO::gamma() \o QImageWriter::gamma() @@ -1988,7 +1988,7 @@ \row \o QImageIO::parameters() \o N/A \row \o QImageIO::quality() \o QImageWriter::quality() \row \o QImageIO::read() \o QImageReader::read() - \row \o QImageIO::setDescription() \o QImageWriter::setDescription() + \row \o QImageIO::setDescription() \o QImageWriter::setText() \row \o QImageIO::setFileName() \o QImageReader::setFileName() and QImageWriter::setFileName() \row \o QImageIO::setFormat() \o QImageReader::setFormat() and QImageWriter::setFormat() \row \o QImageIO::setGamma() \o QImageWriter::setGamma() @@ -2350,8 +2350,9 @@ Q3NetworkProtocolFactory<T>, and Q3NetworkOperation and have been moved to the Qt3Support library. - In Qt 4 applications, you can use classes like QFtp and QHttp - directly to perform file-related actions on a remote host. + In Qt 4 applications, you can use classes like QFtp and + QNetworkAccessManager directly to perform file-related actions on + a remote host. \section1 QObject @@ -3241,12 +3242,11 @@ moved to the Qt3Support library. In Qt 4, there is no direct equivalent to Q3SocketDevice: - \list - \o If you use Q3SocketDevice in a thread to perform blocking network - I/O (a technique encouraged by the \e{Qt Quarterly} article - \l{http://doc.trolltech.com/qq/qq09-networkthread.html}{Unblocking Networking}), - you can now use QTcpSocket, QFtp, or QHttp instead, which can now be used from - non-GUI threads. + \list \o If you use Q3SocketDevice in a thread to perform blocking + network I/O (a technique encouraged by the \e{Qt Quarterly} + article \l{http://doc.trolltech.com/qq/qq09-networkthread.html} + {Unblocking Networking}), you can now use QTcpSocket, QFtp, or + QNetworkAccessManager, which can be used from non-GUI threads. \o If you use Q3SocketDevice for UDP, you can now use QUdpSocket instead. diff --git a/doc/src/properties.qdoc b/doc/src/properties.qdoc index 65d3fc8..2d03e91 100644 --- a/doc/src/properties.qdoc +++ b/doc/src/properties.qdoc @@ -56,7 +56,7 @@ \section1 Requirements for Declaring Properties To declare a property, use the \l {Q_PROPERTY()} {Q_PROPERTY()} - macro in a class that inherits QObject. + macro in a class that inherits QObject. \snippet doc/src/snippets/code/doc_src_properties.qdoc 0 @@ -71,10 +71,10 @@ \list \o A \c READ accessor function is required. It is for reading the - property value. It must be const and must return either the - property's type or a pointer or reference to that type. e.g., - QWidget::focus is a read-only property with \c READ function - QWidget::hasFocus(). + property value. Ideally, a const function is used for this purpose, + and it must return either the property's type or a pointer or + reference to that type. e.g., QWidget::focus is a read-only property + with \c READ function, QWidget::hasFocus(). \o A \c WRITE accessor function is optional. It is for setting the property value. It must return void and must take exactly one @@ -122,6 +122,17 @@ editable property for (checkable) buttons. Note that QItemDelegate gets and sets a widget's \c USER property. + \o The presence of the \c CONSTANT attibute indicates that the property + value is constant. For a given object instance, the READ method of a + constant property must return the same value every time it is called. This + constant value may be different for different instances of the object. A + constant property cannot have a WRTE method or a NOTIFY signal. + + \o The presence of the \c FINAL attribute indicates that the property + will not be overridden by a derived class. This can be used for performance + optimizations in some cases, but is not enforced by moc. Care must be taken + never to override a \c FINAL property. + \endlist The \c READ, \c WRITE, and \c RESET functions can be inherited. diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc index afd881f..0921ae7 100644 --- a/doc/src/qmake-manual.qdoc +++ b/doc/src/qmake-manual.qdoc @@ -235,7 +235,7 @@ \row \o CONFIG \o General project configuration options. \row \o DESTDIR \o The directory in which the executable or binary file will be placed. - \row \o FORMS \o A list of .ui files to be processed by \c uic. + \row \o FORMS \o A list of UI files to be processed by \c uic. \row \o HEADERS \o A list of filenames of header (.h) files used when building the project. \row \o QT \o Qt-specific configuration options. @@ -701,8 +701,8 @@ If a directory is specified, it will be included in the \c DEPENDPATH variable, and relevant code from there will be included in the generated project file. If a file is given, it will be appended to the correct - variable, depending on its extension; for example, .ui files are added - to \c FORMS, and .cpp files are added to \c SOURCES. + variable, depending on its extension; for example, UI files are added + to \c FORMS, and C++ files are added to \c SOURCES. You may also pass assignments on the command line in this mode. When doing so, these assignments will be placed last in the generated project file. @@ -829,6 +829,29 @@ Note that, if a project is later moved on the disk, \c qmake must be run again to process the project file and create a new Xcode project file. + \section2 On supporting two build targets simultaneously + + Implementing this is currently not feasible, because the XCode + concept of Active Build Configurations is conceptually different + from the qmake idea of build targets. + + The XCode Active Build Configurations settings are for modifying + xcode configurations, compiler flags and similar build + options. Unlike Visual Studio, XCode does not allow for the + selection of specific library files based on whether debug or + release build configurations are selected. The qmake debug and + release settings control which library files are linked to the + executable. + + It is currently not possible to set files in XCode configuration + settings from the qmake generated xcode project file. The way the + libraries are linked in the "Frameworks & Libraries" phase in the + XCode build system. + + Furthermore, The selected "Active Build Configuration" is stored + in a .pbxuser file, which is generated by xcode on first load, not + created by qmake. + \section1 Windows Features specific to this platform include support for creating Visual @@ -858,10 +881,12 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 21 - Each time you update the project file, you need to run \c qmake to generate an updated Visual Studio project. + \note If you are using the Visual Studio Add-in, you can import \c .pro + files via the \gui{Qt->Import from .pro file} menu item. + \section2 Visual Studio 2005 Manifest Files When deploying Qt applications built using Visual Studio 2005, it is @@ -1035,8 +1060,9 @@ (see \l{LibDepend}{Library Dependencies} for more info). \endtable - Please note that \c create_prl is required when \i {building} a static library, - while \c link_prl is required when \i {using} a static library. + Please note that \c create_prl is required when \e {building} a + static library, while \c link_prl is required when \e {using} a + static library. On Windows (or if Qt is configured with \c{-debug_and_release}, adding the \c build_all option to the \c CONFIG variable makes this rule the default @@ -1278,10 +1304,10 @@ \target FORMS \section1 FORMS - This variable specifies the .ui files (see \link + This variable specifies the UI files (see \link designer-manual.html Qt Designer \endlink) to be processed through \c uic before compiling. All dependencies, headers and source files required - to build these .ui files will automatically be added to the project. + to build these UI files will automatically be added to the project. For example: @@ -1294,10 +1320,10 @@ \target FORMS3 \section1 FORMS3 - This variable specifies the old style .ui files to be processed + This variable specifies the old style UI files to be processed through \c uic3 before compiling, when \c CONFIG contains uic3. All dependencies, headers and source files required to build these - .ui files will automatically be added to the project. + UI files will automatically be added to the project. For example: @@ -1941,6 +1967,14 @@ typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \target QMAKE_INCDIR_EGL + \section1 QMAKE_INCDIR_EGL + + This variable contains the location of EGL header files to be added + to INCLUDEPATH when building an application with OpenGL/ES or + OpenVG support. The value of this variable is typically handled by + \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \target QMAKE_INCDIR_OPENGL \section1 QMAKE_INCDIR_OPENGL @@ -1949,6 +1983,20 @@ value of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + If the OpenGL implementation uses EGL (most OpenGL/ES systems), + then QMAKE_INCDIR_EGL may also need to be set. + + \target QMAKE_INCDIR_OPENVG + \section1 QMAKE_INCDIR_OPENVG + + This variable contains the location of OpenVG header files to be added + to INCLUDEPATH when building an application with OpenVG support. The + value of this variable is typically handled by \c qmake or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + + If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also + need to be set. + \target QMAKE_INCDIR_QT \section1 QMAKE_INCDIR_QT @@ -2097,6 +2145,13 @@ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LIBDIR_EGL + + This variable contains the location of the EGL library + directory, when EGL is used with OpenGL/ES or OpenVG. The value + of this variable is typically handled by \c qmake or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LIBDIR_OPENGL This variable contains the location of the OpenGL library @@ -2104,6 +2159,19 @@ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + If the OpenGL implementation uses EGL (most OpenGL/ES systems), + then QMAKE_LIBDIR_EGL may also need to be set. + + \section1 QMAKE_LIBDIR_OPENVG + + This variable contains the location of the OpenVG library + directory. The value of this variable is typically handled by + \c qmake or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + + If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL + may also need to be set. + \section1 QMAKE_LIBDIR_QT This variable contains the location of the Qt library @@ -2135,18 +2203,41 @@ project on Windows. \l{#QMAKE_LIBS_WINDOW}{QMAKE_LIBS_WINDOW} should now be used instead. + \section1 QMAKE_LIBS_EGL + + This variable contains all EGL libraries when building Qt with + OpenGL/ES or OpenVG. The value of this variable is typically + handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. The usual value is \c{-lEGL}. + \section1 QMAKE_LIBS_OPENGL This variable contains all OpenGL libraries. The value of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + If the OpenGL implementation uses EGL (most OpenGL/ES systems), + then QMAKE_LIBS_EGL may also need to be set. + \section1 QMAKE_LIBS_OPENGL_QT This variable contains all OpenGL Qt libraries.The value of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LIBS_OPENVG + + This variable contains all OpenVG libraries. The value of this + variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} + and rarely needs to be modified. The usual value is \c{-lOpenVG}. + + Some OpenVG engines are implemented on top of OpenGL. This will + be detected at configure time and QMAKE_LIBS_OPENGL will be implicitly + added to QMAKE_LIBS_OPENVG wherever the OpenVG libraries are linked. + + If the OpenVG implementation uses EGL, then QMAKE_LIBS_EGL may also + need to be set. + \section1 QMAKE_LIBS_QT This variable contains all Qt libraries.The value of this @@ -3322,10 +3413,6 @@ \o output_function \o Specifies a custom qmake function that is used to specify the filename to be created. \row - \o variables - \o Indicates that the variables specified here are replaced with $(QMAKE_COMP_VARNAME) when refered to - in the pro file as $(VARNAME). - \row \o variable_out \o The variable that the files created from the output should be added to. \endtable @@ -4064,7 +4151,7 @@ \list \o HEADERS - A list of all the header files for the application. \o SOURCES - A list of all the source files for the application. - \o FORMS - A list of all the .ui files (created using \c{Qt Designer}) + \o FORMS - A list of all the UI files (created using \c{Qt Designer}) for the application. \o LEXSOURCES - A list of all the lex source files for the application. \o YACCSOURCES - A list of all the yacc source files for the application. @@ -4082,7 +4169,7 @@ \endlist You only need to use the system variables that you have values for, - for instance, if you don't have any extra INCLUDEPATHs then you don't + for instance, if you do not have any extra INCLUDEPATHs then you do not need to specify any, \c qmake will add in the default ones needed. For instance, an example project file might look like this: diff --git a/doc/src/qmsdev.qdoc b/doc/src/qmsdev.qdoc index b8d8f85..127b514 100644 --- a/doc/src/qmsdev.qdoc +++ b/doc/src/qmsdev.qdoc @@ -87,7 +87,7 @@ the existing project. If you want to add an existing dialog to your project, then just select the - relevant \c .ui file. This will then add it to your existing project and add + relevant UI file. This will then add it to your existing project and add the relevant steps to create the generated code. \section2 Using the 'Qt Designer' button diff --git a/doc/src/qsql.qdoc b/doc/src/qsql.qdoc index 5315413..bb8f090 100644 --- a/doc/src/qsql.qdoc +++ b/doc/src/qsql.qdoc @@ -41,12 +41,13 @@ /*! \namespace QSql + \inmodule QtSql \brief The QSql namespace contains miscellaneous identifiers used throughout the Qt SQL library. + \inheaderfile QtSql \ingroup database \mainclass - \omit ### \module sql \endomit \sa {QtSql Module} */ diff --git a/doc/src/qsqldatatype-table.qdoc b/doc/src/qsqldatatype-table.qdoc index 5ab6413..2055e6a 100644 --- a/doc/src/qsqldatatype-table.qdoc +++ b/doc/src/qsqldatatype-table.qdoc @@ -34,36 +34,34 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ /*! - \module QtSql - - \page qsqldatatype-table.html - - \title QtSql Module - Recommended use of data types + \page sql-types.html + \title QtSql Module - Recommended Use of Data Types - \section1 Recommended use of types and widgets in Qt supported Databases + \section1 Recommended Use of Types in Qt Supported Databases This table shows the recommended data types used when extracting data from the databases supported in Qt. It is important to note that the - types used in Qt not necessary are valid as input to the specific - database. One example could be that a double would work perfect as - input for floating point records in a database, but not necessary - as output to the database since it would be stored with 64-bit in C++. + types used in Qt are not necessarily valid as input to the specific + database. One example could be that a double would work perfectly as + input for floating point records in a database, but not necessarily + as a storage format for output from the database since it would be stored + with 64-bit precision in C++. \tableofcontents - \section2 IBM DB2 data type + \section2 IBM DB2 Data Types - \table - \row - \header IBM DB2 data type - \header SQL Type Description - \header Recommended input (C++ data type and Qt ) + \table 90% + \header + \o IBM DB2 data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o SMALLINT \o 16-bit signed integer @@ -124,13 +122,13 @@ \o Mapped to QDateTime \endtable - \section2 Borland InterBase data type + \section2 Borland InterBase Data Types - \table - \row - \header Borland InterBase data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o Borland InterBase data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BOOLEAN \o Boolean @@ -189,13 +187,13 @@ \o Mapped to QDateTime \endtable - \section2 MySQL data type + \section2 MySQL Data Types - \table - \row - \header MySQL data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o MySQL data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o TINYINT \o 8 bit signed integer @@ -290,13 +288,13 @@ \o Mapped to QString \endtable - \section2 Oracle Call Interface data type + \section2 Oracle Call Interface Data Types - \table - \row - \header Oracle Call Interface data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o Oracle Call Interface data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o NUMBER \o FLOAT, DOUBLE, PRECISIONc REAL @@ -338,13 +336,13 @@ \o Mapped to QDateTime \endtable - \section2 ODBC data type + \section2 ODBC Data Types - \table - \row - \header ODBC data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o ODBC data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BIT \o Boolean @@ -407,13 +405,13 @@ \o Mapped to QDateTime \endtable - \section2 PostgreSQL data type + \section2 PostgreSQL Data Types - \table - \row - \header PostgreSQL data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o PostgreSQL data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BOOLEAN \o Boolean @@ -484,13 +482,13 @@ \o Mapped to QDateTime \endtable - \section2 QSQLITE SQLite version 3 data type + \section2 QSQLITE SQLite version 3 Data Types - \table - \row - \header QSQLITE SQLite version 3 data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o QSQLITE SQLite version 3 data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o NULL \o NULL value. @@ -518,13 +516,13 @@ \o Mapped to QByteArray \endtable - \section2 Sybase Adaptive Server data type + \section2 Sybase Adaptive Server Data Types - \table - \row - \header Sybase Adaptive Server data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o Sybase Adaptive Server data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BINARY \o Describes a fixed-length binary value up to 255 bytes in size. @@ -535,8 +533,7 @@ \o Mapped to QString \row \o DATETIME - \o Date and time. Range: 1753-01-01 00:00:00 through - 9999-12-31 23:59:59. + \o Date and time. Range: 1753-01-01 00:00:00 through 9999-12-31 23:59:59. \o Mapped to QDateTime \row \o NCHAR @@ -577,8 +574,8 @@ \endtable \section2 SQLite Version 2 - SQLite V.2 is "typeless". This means that you can store any kind of - data you want in any column of any table, regardless of the declared - data type of that column. We recommend that you map the data to QString. + SQLite version 2 is "typeless". This means that you can store any kind of + data you want in any column of any table, regardless of the declared + data type of that column. We recommend that you map the data to QString. */ diff --git a/doc/src/qt3to4.qdoc b/doc/src/qt3to4.qdoc index 9ffd52e..47e85b4 100644 --- a/doc/src/qt3to4.qdoc +++ b/doc/src/qt3to4.qdoc @@ -50,7 +50,7 @@ to Qt 4. It is designed to automate the most tedious part of the porting effort. - See \l{Porting to Qt 4} and \l{Porting .ui Files to Qt 4} for + See \l{Porting to Qt 4} and \l{Porting UI Files to Qt 4} for more information about porting Qt 3 applications to Qt 4. \section1 Usage diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 2fda7cf..6f59cae 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -235,7 +235,7 @@ for your project (using "DEFINES +=") on to moc, which has its own built-in C++ preprocessor. - To compile code that uses .ui files, you will also need this line in + To compile code that uses UI files, you will also need this line in the .pro file: \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 2 diff --git a/doc/src/qt4-network.qdoc b/doc/src/qt4-network.qdoc index 3b3091e..5e1999e 100644 --- a/doc/src/qt4-network.qdoc +++ b/doc/src/qt4-network.qdoc @@ -109,9 +109,10 @@ of programming, with the networking logic concentrated in one or two functions instead of spread across multiple slots. - QFtp and QHttp use QTcpSocket internally to implement the FTP and - HTTP protocols. Both classes work asynchronously and can schedule - (i.e., queue) requests. + QFtp and QNetworkAccessManager and its associated classes use + QTcpSocket internally to implement the FTP and HTTP protocols. The + classes work asynchronously and can schedule (i.e., queue) + requests. The network module contains four helper classes: QHostAddress, QHostInfo, QUrl, and QUrlInfo. QHostAddress stores an IPv4 or IPv6 @@ -198,8 +199,7 @@ level QNetworkProtocol and QUrlOperator abstraction has been eliminated. These classes attempted the impossible (unify FTP and HTTP under one roof), and unsurprisingly failed at that. Qt 4 - still provides QFtp and QHttp classes, but only with the more - mature API that appeared in Qt 3.1. + still provides QFtp, and it also proveds the QNetworkAccessManager. The QSocket class in Qt 3 has been renamed QTcpSocket. The new class is reentrant and supports blocking. It's also easier to diff --git a/doc/src/qtdesigner.qdoc b/doc/src/qtdesigner.qdoc index 2117b27..0959bd9 100644 --- a/doc/src/qtdesigner.qdoc +++ b/doc/src/qtdesigner.qdoc @@ -52,7 +52,7 @@ that enable you to access Qt Designer's components. In addition, the QFormBuilder class provides the possibility of - constructing user interfaces from \c .ui files at run-time. + constructing user interfaces from UI files at run-time. To include the definitions of the module's classes, use the following directive: @@ -155,7 +155,7 @@ The \c QtDesigner module contains the QFormBuilder class that provides a mechanism for dynamically creating user interfaces at - run-time, based on \c .ui files created with \QD. This class is + run-time, based on UI files created with \QD. This class is typically used by custom components and applications that embed \QD. Standalone applications that need to dynamically generate user interfaces at run-time use the QUiLoader class, found in @@ -166,1376 +166,3 @@ \sa {Qt Designer Manual}, {QtUiTools Module} */ - -/*! - \class QDesignerMemberSheetExtension - - \brief The QDesignerMemberSheetExtension class allows you to - manipulate a widget's member functions which is displayed when - configuring connections using Qt Designer's mode for editing - signals and slots. - - \inmodule QtDesigner - - QDesignerMemberSheetExtension is a collection of functions that is - typically used to query a widget's member functions, and to - manipulate the member functions' appearance in \QD's signals and - slots editing mode. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2 - - When implementing a custom widget plugin, a pointer to \QD's - current QDesignerFormEditorInterface object (\c formEditor in the - example above) is provided by the - QDesignerCustomWidgetInterface::initialize() function's parameter. - - The member sheet (and any other extension), can be retrieved by - querying \QD's extension manager using the qt_extension() - function. When you want to release the extension, you only need to - delete the pointer. - - All widgets have a default member sheet used in \QD's signals and - slots editing mode with the widget's member functions. But - QDesignerMemberSheetExtension also provides an interface for - creating custom member sheet extensions. - - \warning \QD uses the QDesignerMemberSheetExtension to facilitate - the signal and slot editing mode. Whenever a connection between - two widgets is requested, \QD will query for the widgets' member - sheet extensions. If a widget has an implemented member sheet - extension, this extension will override the default member sheet. - - To create a member sheet extension, your extension class must - inherit from both QObject and QDesignerMemberSheetExtension. Then, - since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3 - - This enables \QD to use qobject_cast() to query for - supported interfaces using nothing but a QObject pointer. - - In \QD the extensions are not created until they are - required. For that reason, when implementing a member sheet - extension, you must also create a QExtensionFactory, i.e a class - that is able to make an instance of your extension, and register - it using \QD's \l {QExtensionManager}{extension manager}. - - When a widget's member sheet extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a member sheet - extension for that widget, is found. This factory will then make - an instance of the extension. If no such factory is found, \QD - will use the default member sheet. - - There are four available types of extensions in \QD: - QDesignerContainerExtension, QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and - QDesignerTaskMenuExtension. \QD's behavior is the same whether the - requested extension is associated with a multi page container, a - member sheet, a property sheet or a task menu. - - The QExtensionFactory class provides a standard extension - factory, and can also be used as an interface for custom - extension factories. You can either create a new - QExtensionFactory and reimplement the - QExtensionFactory::createExtension() function. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a member sheet extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5 - - For a complete example using an extension class, see \l - {designer/taskmenuextension}{Task Menu Extension example}. The - example shows how to create a custom widget plugin for Qt - Designer, and how to to use the QDesignerTaskMenuExtension class - to add custom items to \QD's task menu. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerMemberSheetExtension::~QDesignerMemberSheetExtension() - - Destroys the member sheet extension. -*/ - -/*! - \fn int QDesignerMemberSheetExtension::count() const - - Returns the extension's number of member functions. -*/ - -/*! - \fn int QDesignerMemberSheetExtension::indexOf(const QString &name) const - - Returns the index of the member function specified by the given \a - name. - - \sa memberName() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::memberName(int index) const - - Returns the name of the member function with the given \a index. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::memberGroup(int index) const - - Returns the name of the member group specified for the function - with the given \a index. - - \sa indexOf(), setMemberGroup() -*/ - -/*! - \fn void QDesignerMemberSheetExtension::setMemberGroup(int index, const QString &group) - - Sets the member group of the member function with the given \a - index, to \a group. - - \sa indexOf(), memberGroup() -*/ - -/*! - \fn bool QDesignerMemberSheetExtension::isVisible(int index) const - - Returns true if the member function with the given \a index is - visible in \QD's signal and slot editor, otherwise false. - - \sa indexOf(), setVisible() -*/ - -/*! - \fn void QDesignerMemberSheetExtension::setVisible(int index, bool visible) - - If \a visible is true, the member function with the given \a index - is visible in \QD's signals and slots editing mode; otherwise the - member function is hidden. - - \sa indexOf(), isVisible() -*/ - -/*! - \fn virtual bool QDesignerMemberSheetExtension::isSignal(int index) const - - Returns true if the member function with the given \a index is a - signal, otherwise false. - - \sa indexOf() -*/ - -/*! - \fn bool QDesignerMemberSheetExtension::isSlot(int index) const - - Returns true if the member function with the given \a index is a - slot, otherwise false. - - \sa indexOf() -*/ - -/*! - \fn bool QDesignerMemberSheetExtension::inheritedFromWidget(int index) const - - Returns true if the member function with the given \a index is - inherited from QWidget, otherwise false. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::declaredInClass(int index) const - - Returns the name of the class in which the member function with - the given \a index is declared. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::signature(int index) const - - Returns the signature of the member function with the given \a - index. - - \sa indexOf() -*/ - -/*! - \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterTypes(int index) const - - Returns the parameter types of the member function with the given - \a index, as a QByteArray list. - - \sa indexOf(), parameterNames() -*/ - -/*! - \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterNames(int index) const - - Returns the parameter names of the member function with the given - \a index, as a QByteArray list. - - \sa indexOf(), parameterTypes() -*/ - - -// Doc: Interface only - -/*! - \class QDesignerLayoutDecorationExtension - \brief The QDesignerLayoutDecorationExtension class provides an extension to a layout in \QD. - \inmodule QtDesigner - \internal -*/ - -/*! - \enum QDesignerLayoutDecorationExtension::InsertMode - - This enum describes the modes that are used to insert items into a layout. - - \value InsertWidgetMode Widgets are inserted into empty cells in a layout. - \value InsertRowMode Whole rows are inserted into a vertical or grid layout. - \value InsertColumnMode Whole columns are inserted into a horizontal or grid layout. -*/ - -/*! - \fn virtual QDesignerLayoutDecorationExtension::~QDesignerLayoutDecorationExtension() - - Destroys the extension. -*/ - -/*! - \fn virtual QList<QWidget*> QDesignerLayoutDecorationExtension::widgets(QLayout *layout) const - - Returns the widgets that are managed by the given \a layout. - - \sa insertWidget(), removeWidget() -*/ - -/*! - \fn QRect QDesignerLayoutDecorationExtension::itemInfo(int index) const - - Returns the rectangle covered by the item at the given \a index in the layout. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::indexOf(QWidget *widget) const - - Returns the index of the specified \a widget in the layout. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::indexOf(QLayoutItem *item) const - - Returns the index of the specified layout \a item. -*/ - -/*! - \fn QDesignerLayoutDecorationExtension::InsertMode QDesignerLayoutDecorationExtension::currentInsertMode() const - - Returns the current insertion mode. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::currentIndex() const - - Returns the current index in the layout. -*/ - -/*! - \fn QPair<int, int> QDesignerLayoutDecorationExtension::currentCell() const - - Returns a pair containing the row and column of the current cell in the layout. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::insertWidget(QWidget *widget, const QPair<int, int> &cell) - - Inserts the given \a widget into the specified \a cell in the layout. - - \sa removeWidget() -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::removeWidget(QWidget *widget) - - Removes the specified \a widget from the layout. - - \sa insertWidget() -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::insertRow(int row) - - Inserts a new row into the form at the position specified by \a row. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::insertColumn(int column) - - Inserts a new column into the form at the position specified by \a column. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::simplify() - - Simplifies the layout by removing unnecessary empty rows and columns, and by changing the - number of rows or columns spanned by widgets. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::findItemAt(const QPoint &position) const - - Returns the index of the item in the layout that covers the given \a position. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::findItemAt(int row, int column) const - - Returns the item in the layout that occupies the specified \a row and \a column in the layout. - - Currently, this only applies to grid layouts. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::adjustIndicator(const QPoint &position, int index) - - Adjusts the indicator for the item specified by \a index so that - it lies at the given \a position on the form. -*/ - - -// Doc: Interface only - -/*! - \class QDesignerContainerExtension - \brief The QDesignerContainerExtension class allows you to add pages to - a custom multi-page container in Qt Designer's workspace. - \inmodule QtDesigner - - QDesignerContainerExtension provide an interface for creating - custom container extensions. A container extension consists of a - collection of functions that \QD needs to manage a multi-page - container plugin, and a list of the container's pages. - - \image containerextension-example.png - - \warning This is \e not an extension for container plugins in - general, only custom \e multi-page containers. - - To create a container extension, your extension class must inherit - from both QObject and QDesignerContainerExtension. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6 - - Since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - You must reimplement several functions to enable \QD to manage a - custom multi-page container widget: \QD uses count() to keep track - of the number pages in your container, widget() to return the page - at a given index in the list of the container's pages, and - currentIndex() to return the list index of the selected page. \QD - uses the addWidget() function to add a given page to the - container, expecting it to be appended to the list of pages, while - it expects the insertWidget() function to add a given page to the - container by inserting it at a given index. - - In \QD the extensions are not created until they are - required. For that reason you must also create a - QExtensionFactory, i.e a class that is able to make an instance of - your extension, and register it using \QD's \l - {QExtensionManager}{extension manager}. - - When a container extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a container - extension, is found. This factory will then create the extension - for the plugin. - - There are four available types of extensions in \QD: - QDesignerContainerExtension , QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. - \QD's behavior is the same whether the requested extension is - associated with a multi page container, a member sheet, a property - sheet or a task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a container extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8 - - For a complete example using the QDesignerContainerExtension - class, see the \l {designer/containerextension}{Container - Extension example}. The example shows how to create a custom - multi-page plugin for \QD. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerContainerExtension::~QDesignerContainerExtension() - - Destroys the extension. -*/ - -/*! - \fn int QDesignerContainerExtension::count() const - - Returns the number of pages in the container. -*/ - -/*! - \fn QWidget *QDesignerContainerExtension::widget(int index) const - - Returns the page at the given \a index in the extension's list of - pages. - - \sa addWidget(), insertWidget() -*/ - -/*! - \fn int QDesignerContainerExtension::currentIndex() const - - Returns the index of the currently selected page in the - container. - - \sa setCurrentIndex() -*/ - -/*! - \fn void QDesignerContainerExtension::setCurrentIndex(int index) - - Sets the currently selected page in the container to be the - page at the given \a index in the extension's list of pages. - - \sa currentIndex() -*/ - -/*! - \fn void QDesignerContainerExtension::addWidget(QWidget *page) - - Adds the given \a page to the container by appending it to the - extension's list of pages. - - \sa insertWidget(), remove(), widget() -*/ - -/*! - \fn void QDesignerContainerExtension::insertWidget(int index, QWidget *page) - - Adds the given \a page to the container by inserting it at the - given \a index in the extension's list of pages. - - \sa addWidget(), remove(), widget() -*/ - -/*! - \fn void QDesignerContainerExtension::remove(int index) - - Removes the page at the given \a index from the extension's list - of pages. - - \sa addWidget(), insertWidget() -*/ - - -// Doc: Interface only - -/*! - \class QDesignerTaskMenuExtension - \brief The QDesignerTaskMenuExtension class allows you to add custom - menu entries to Qt Designer's task menu. - \inmodule QtDesigner - - QDesignerTaskMenuExtension provides an interface for creating - custom task menu extensions. It is typically used to create task - menu entries that are specific to a plugin in \QD. - - \QD uses the QDesignerTaskMenuExtension to feed its task - menu. Whenever a task menu is requested, \QD will query - for the selected widget's task menu extension. - - \image taskmenuextension-example-faded.png - - A task menu extension is a collection of QActions. The actions - appear as entries in the task menu when the plugin with the - specified extension is selected. The image above shows the custom - \gui {Edit State...} action which appears in addition to \QD's - default task menu entries: \gui Cut, \gui Copy, \gui Paste etc. - - To create a custom task menu extension, your extension class must - inherit from both QObject and QDesignerTaskMenuExtension. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9 - - Since we are implementing an interface, we must ensure that it - is made known to the meta-object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - You must reimplement the taskActions() function to return a list - of actions that will be included in \QD task menu. Optionally, you - can reimplement the preferredEditAction() function to set the - action that is invoked when selecting your plugin and pressing - \key F2. The preferred edit action must be one of the actions - returned by taskActions() and, if it's not defined, pressing the - \key F2 key will simply be ignored. - - In \QD, extensions are not created until they are required. A - task menu extension, for example, is created when you click the - right mouse button over a widget in \QD's workspace. For that - reason you must also construct an extension factory, using either - QExtensionFactory or a subclass, and register it using \QD's - \l {QExtensionManager}{extension manager}. - - When a task menu extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until it finds one that is able to create a task menu - extension for the selected widget. This factory will then make an - instance of the extension. - - There are four available types of extensions in \QD: - QDesignerContainerExtension, QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension, and QDesignerTaskMenuExtension. - \QD's behavior is the same whether the requested extension is - associated with a container, a member sheet, a property sheet or a - task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a task menu extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11 - - For a complete example using the QDesignerTaskMenuExtension class, - see the \l {designer/taskmenuextension}{Task Menu Extension - example}. The example shows how to create a custom widget plugin - for \QD, and how to to use the QDesignerTaskMenuExtension - class to add custom items to \QD's task menu. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerTaskMenuExtension::~QDesignerTaskMenuExtension() - - Destroys the task menu extension. -*/ - -/*! - \fn QAction *QDesignerTaskMenuExtension::preferredEditAction() const - - Returns the action that is invoked when selecting a plugin with - the specified extension and pressing \key F2. - - The action must be one of the actions returned by taskActions(). -*/ - -/*! - \fn QList<QAction*> QDesignerTaskMenuExtension::taskActions() const - - Returns the task menu extension as a list of actions which will be - included in \QD's task menu when a plugin with the specified - extension is selected. - - The function must be reimplemented to add actions to the list. -*/ - - -// Doc: Interface only - -/*! - \class QDesignerCustomWidgetCollectionInterface - - \brief The QDesignerCustomWidgetCollectionInterface class allows - you to include several custom widgets in one single library. - - \inmodule QtDesigner - - When implementing a custom widget plugin, you build it as a - separate library. If you want to include several custom widget - plugins in the same library, you must in addition subclass - QDesignerCustomWidgetCollectionInterface. - - QDesignerCustomWidgetCollectionInterface contains one single - function returning a list of the collection's - QDesignerCustomWidgetInterface objects. For example, if you have - several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and - \c CustomWidgetThree, the class definition may look like this: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12 - - In the class constructor you add the interfaces to your custom - widgets to the list which you return in the customWidgets() - function: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13 - - Note that instead of exporting each custom widget plugin using the - Q_EXPORT_PLUGIN2() macro, you export the entire collection. The - Q_EXPORT_PLUGIN2() macro ensures that \QD can access and construct - the custom widgets. Without this macro, there is no way for \QD to - use them. - - \sa QDesignerCustomWidgetInterface, {Creating Custom Widgets for - Qt Designer} -*/ - -/*! - \fn QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface() { - - Destroys the custom widget collection interface. -*/ - -/*! - \fn QList<QDesignerCustomWidgetInterface*> QDesignerCustomWidgetCollectionInterface::customWidgets() const - - Returns a list of interfaces to the collection's custom widgets. -*/ - - -// Doc: Interface only - -/*! - \class QDesignerCustomWidgetInterface - - \brief The QDesignerCustomWidgetInterface class enables Qt Designer - to access and construct custom widgets. - - \inmodule QtDesigner - - QDesignerCustomWidgetInterface provides a custom widget with an - interface. The class contains a set of functions that must be subclassed - to return basic information about the widget, such as its class name and - the name of its header file. Other functions must be implemented to - initialize the plugin when it is loaded, and to construct instances of - the custom widget for \QD to use. - - When implementing a custom widget you must subclass - QDesignerCustomWidgetInterface to expose your widget to \QD. For - example, this is the declaration for the plugin used in the - \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that - enables an analog clock custom widget to be used by \QD: - - \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0 - - Note that the only part of the class definition that is specific - to this particular custom widget is the class name. In addition, - since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - After \QD loads a custom widget plugin, it calls the interface's - initialize() function to enable it to set up any resources that it - may need. This function is called with a QDesignerFormEditorInterface - parameter that provides the plugin with a gateway to all of \QD's API. - - \QD constructs instances of the custom widget by calling the plugin's - createWidget() function with a suitable parent widget. Plugins must - construct and return an instance of a custom widget with the specified - parent widget. - - In the implementation of the class you must remember to export - your custom widget plugin to \QD using the Q_EXPORT_PLUGIN2() - macro. For example, if a library called \c libcustomwidgetplugin.so - (on Unix) or \c libcustomwidget.dll (on Windows) contains a widget - class called \c MyCustomWidget, we can export it by adding the - following line to the file containing the plugin implementation: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14 - - This macro ensures that \QD can access and construct the custom widget. - Without this macro, there is no way for \QD to use it. - - When implementing a custom widget plugin, you build it as a - separate library. If you want to include several custom widget - plugins in the same library, you must in addition subclass - QDesignerCustomWidgetCollectionInterface. - - \warning If your custom widget plugin contains QVariant - properties, be aware that only the following \l - {QVariant::Type}{types} are supported: - - \list - \o QVariant::ByteArray - \o QVariant::Bool - \o QVariant::Color - \o QVariant::Cursor - \o QVariant::Date - \o QVariant::DateTime - \o QVariant::Double - \o QVariant::Int - \o QVariant::Point - \o QVariant::Rect - \o QVariant::Size - \o QVariant::SizePolicy - \o QVariant::String - \o QVariant::Time - \o QVariant::UInt - \endlist - - For a complete example using the QDesignerCustomWidgetInterface - class, see the \l {designer/customwidgetplugin}{Custom Widget - Example}. The example shows how to create a custom widget plugin - for \QD. - - \sa QDesignerCustomWidgetCollectionInterface {Creating Custom - Widgets for Qt Designer} -*/ - -/*! - \fn QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface() - - Destroys the custom widget interface. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::name() const - - Returns the class name of the custom widget supplied by the interface. - - The name returned \e must be identical to the class name used for the - custom widget. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::group() const - - Returns the name of the group to which the custom widget belongs. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::toolTip() const - - Returns a short description of the widget that can be used by \QD - in a tool tip. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::whatsThis() const - - Returns a description of the widget that can be used by \QD in - "What's This?" help for the widget. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::includeFile() const - - Returns the path to the include file that \l uic uses when - creating code for the custom widget. -*/ - -/*! - \fn QIcon QDesignerCustomWidgetInterface::icon() const - - Returns the icon used to represent the custom widget in \QD's - widget box. -*/ - -/*! - \fn bool QDesignerCustomWidgetInterface::isContainer() const - - Returns true if the custom widget is intended to be used as a - container; otherwise returns false. - - Most custom widgets are not used to hold other widgets, so their - implementations of this function will return false, but custom - containers will return true to ensure that they behave correctly - in \QD. -*/ - -/*! - \fn QWidget *QDesignerCustomWidgetInterface::createWidget(QWidget *parent) - - Returns a new instance of the custom widget, with the given \a - parent. -*/ - -/*! - \fn bool QDesignerCustomWidgetInterface::isInitialized() const - - Returns true if the widget has been initialized; otherwise returns - false. - - \sa initialize() -*/ - -/*! - \fn void QDesignerCustomWidgetInterface::initialize(QDesignerFormEditorInterface *formEditor) - - Initializes the widget for use with the specified \a formEditor - interface. - - \sa isInitialized() -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::domXml() const - - Returns the XML that is used to describe the custom widget's - properties to \QD. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::codeTemplate() const - - This function is reserved for future use by \QD. - - \omit - Returns the code template that \QD includes in forms that contain - the custom widget when they are saved. - \endomit -*/ - -/*! - \macro QDESIGNER_WIDGET_EXPORT - \relates QDesignerCustomWidgetInterface - \since 4.1 - - This macro is used when defining custom widgets to ensure that they are - correctly exported from plugins for use with \QD. - - On some platforms, the symbols required by \QD to create new widgets - are removed from plugins by the build system, making them unusable. - Using this macro ensures that the symbols are retained on those platforms, - and has no side effects on other platforms. - - For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin} - example exports a custom widget class with the following declaration: - - \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0 - \dots - \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2 - - \sa {Creating Custom Widgets for Qt Designer} -*/ - - -// Doc: Abstract class - -/*! - \class QDesignerDnDItemInterface - \brief The QDesignerDnDItemInterface class provides an interface that is used to manage items - during a drag and drop operation. - \inmodule QtDesigner - \internal -*/ - -/*! - \enum QDesignerDnDItemInterface::DropType - - This enum describes the result of a drag and drop operation. - - \value MoveDrop The item was moved. - \value CopyDrop The item was copied. -*/ - -/*! - \fn QDesignerDnDItemInterface::QDesignerDnDItemInterface() - - Constructs a new interface to a drag and drop item. -*/ - -/*! - \fn QDesignerDnDItemInterface::~QDesignerDnDItemInterface() - - Destroys the interface to the item. -*/ - -/*! - \fn DomUI *QDesignerDnDItemInterface::domUi() const - - Returns a user interface object for the item. -*/ - -/*! - \fn QWidget *QDesignerDnDItemInterface::widget() const - - Returns the widget being copied or moved in the drag and drop operation. - - \sa source() -*/ - -/*! - \fn QWidget *QDesignerDnDItemInterface::decoration() const - - Returns the widget used to represent the item. -*/ - -/*! - \fn QPoint QDesignerDnDItemInterface::hotSpot() const - - Returns the cursor's hotspot. - - \sa QDrag::hotSpot() -*/ - -/*! - \fn DropType QDesignerDnDItemInterface::type() const - - Returns the type of drag and drop operation in progress. -*/ - -/*! - \fn QWidget *QDesignerDnDItemInterface::source() const - - Returns the widget that is the source of the drag and drop operation; i.e. the original - container of the widget being dragged. - - \sa widget() -*/ - - -// Doc: Abstract class - -/*! - \class QDesignerIconCacheInterface - \brief The QDesignerIconCacheInterface class provides an interface to \QD's icon cache. - \inmodule QtDesigner - \internal -*/ - -/*! - \fn QDesignerIconCacheInterface::QDesignerIconCacheInterface(QObject *parent) - - Constructs a new interface with the given \a parent. -*/ - -/*! - \fn QIcon QDesignerIconCacheInterface::nameToIcon(const QString &filePath, const QString &qrcPath) - - Returns the icon associated with the name specified by \a filePath in the resource - file specified by \a qrcPath. - - If \a qrcPath refers to a valid resource file, the name used for the file path is a path - within those resources; otherwise the file path refers to a local file. - - \sa {The Qt Resource System}, nameToPixmap() -*/ - -/*! - \fn QPixmap QDesignerIconCacheInterface::nameToPixmap(const QString &filePath, const QString &qrcPath) - - Returns the pixmap associated with the name specified by \a filePath in the resource - file specified by \a qrcPath. - - If \a qrcPath refers to a valid resource file, the name used for the file path is a path - within those resources; otherwise the file path refers to a local file. - - \sa {The Qt Resource System}, nameToIcon() -*/ - -/*! - \fn QString QDesignerIconCacheInterface::iconToFilePath(const QIcon &icon) const - - Returns the file path associated with the given \a icon. The file path is a path within - an application resources. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::iconToQrcPath(const QIcon &icon) const - - Returns the path to the resource file that refers to the specified \a icon. The resource - path refers to a local file. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::pixmapToFilePath(const QPixmap &pixmap) const - - Returns the file path associated with the given \a pixmap. The file path is a path within - an application resources. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::pixmapToQrcPath(const QPixmap &pixmap) const - - Returns the path to the resource file that refers to the specified \a pixmap. The resource - path refers to a local file. -*/ - -/*! - \fn QList<QPixmap> QDesignerIconCacheInterface::pixmapList() const - - Returns a list of pixmaps for the icons provided by the icon cache. -*/ - -/*! - \fn QList<QIcon> QDesignerIconCacheInterface::iconList() const - - Returns a list of icons provided by the icon cache. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &workingDirectory) const - - Returns a path to a resource specified by the \a filePath within - the resource file located at \a qrcPath. If \a workingDirectory is - a valid path to a directory, the path returned will be relative to - that directory; otherwise an absolute path is returned. - - \omit - ### Needs checking - \endomit -*/ - - -// Doc: Interface only - -/*! - \class QDesignerPropertySheetExtension - - \brief The QDesignerPropertySheetExtension class allows you to - manipulate a widget's properties which is displayed in Qt - Designer's property editor. - - \sa QDesignerDynamicPropertySheetExtension - - \inmodule QtDesigner - - QDesignerPropertySheetExtension provides a collection of functions that - are typically used to query a widget's properties, and to - manipulate the properties' appearance in the property editor. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15 - - Note that if you change the value of a property using the - QDesignerPropertySheetExtension::setProperty() function, the undo - stack is not updated. To ensure that a property's value can be - reverted using the undo stack, you must use the - QDesignerFormWindowCursorInterface::setProperty() function, or its - buddy \l - {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, - instead. - - When implementing a custom widget plugin, a pointer to \QD's - current QDesignerFormEditorInterface object (\c formEditor in the - example above) is provided by the - QDesignerCustomWidgetInterface::initialize() function's parameter. - - The property sheet, or any other extension, can be retrieved by - querying \QD's extension manager using the qt_extension() - function. When you want to release the extension, you only need to - delete the pointer. - - All widgets have a default property sheet which populates \QD's - property editor with the widget's properties (i.e the ones defined - with the Q_PROPERTY() macro). But QDesignerPropertySheetExtension - also provides an interface for creating custom property sheet - extensions. - - \warning \QD uses the QDesignerPropertySheetExtension to feed its - property editor. Whenever a widget is selected in its workspace, - \QD will query for the widget's property sheet extension. If the - selected widget has an implemented property sheet extension, this - extension will override the default property sheet. - - To create a property sheet extension, your extension class must - inherit from both QObject and - QDesignerPropertySheetExtension. Then, since we are implementing - an interface, we must ensure that it's made known to the meta - object system using the Q_INTERFACES() macro: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16 - - This enables \QD to use qobject_cast() to query for supported - interfaces using nothing but a QObject pointer. - - In \QD the extensions are not created until they are - required. For that reason, when implementing a property sheet - extension, you must also create a QExtensionFactory, i.e a class - that is able to make an instance of your extension, and register - it using \QD's \l {QExtensionManager}{extension manager}. - - When a property sheet extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a property - sheet extension for the selected widget, is found. This factory - will then make an instance of the extension. If no such factory - can be found, \QD will use the default property sheet. - - There are four available types of extensions in \QD: - QDesignerContainerExtension, QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. Qt - Designer's behavior is the same whether the requested extension is - associated with a multi page container, a member sheet, a property - sheet or a task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a property sheet extension extension as well. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18 - - For a complete example using an extension class, see the \l - {designer/taskmenuextension}{Task Menu Extension example}. The - example shows how to create a custom widget plugin for Qt - Designer, and how to to use the QDesignerTaskMenuExtension class - to add custom items to \QD's task menu. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerPropertySheetExtension::~QDesignerPropertySheetExtension() - - Destroys the property sheet extension. -*/ - -/*! - \fn int QDesignerPropertySheetExtension::count() const - - Returns the selected widget's number of properties. -*/ - -/*! - \fn int QDesignerPropertySheetExtension::indexOf(const QString &name) const - - Returns the index for a given property \a name. - - \sa propertyName() -*/ - -/*! - \fn QString QDesignerPropertySheetExtension::propertyName(int index) const - - Returns the name of the property at the given \a index. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerPropertySheetExtension::propertyGroup(int index) const - - Returns the property group for the property at the given \a index. - - \QD's property editor supports property groups, i.e. sections of - related properties. A property can be related to a group using the - setPropertyGroup() function. The default group of any property is - the name of the class that defines it. For example, the - QObject::objectName property appears within the QObject property - group. - - \sa indexOf(), setPropertyGroup() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setPropertyGroup(int index, const QString &group) - - Sets the property group for the property at the given \a index to - \a group. - - Relating a property to a group makes it appear within that group's - section in the property editor. The default property group of any - property is the name of the class that defines it. For example, - the QObject::objectName property appears within the QObject - property group. - - \sa indexOf(), property(), propertyGroup() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::hasReset(int index) const - - Returns true if the property at the given \a index has a reset - button in \QD's property editor, otherwise false. - - \sa indexOf(), reset() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::reset(int index) - - Resets the value of the property at the given \a index, to the - default value. Returns true if a default value could be found, otherwise false. - - \sa indexOf(), hasReset(), isChanged() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::isVisible(int index) const - - Returns true if the property at the given \a index is visible in - \QD's property editor, otherwise false. - - \sa indexOf(), setVisible() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setVisible(int index, bool visible) - - If \a visible is true, the property at the given \a index is - visible in \QD's property editor; otherwise the property is - hidden. - - \sa indexOf(), isVisible() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::isAttribute(int index) const - - Returns true if the property at the given \a index is an attribute, - which will be \e excluded from the .ui file, otherwise false. - - \sa indexOf(), setAttribute() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setAttribute(int index, bool attribute) - - If \a attribute is true, the property at the given \a index is - made an attribute which will be \e excluded from the .ui file; - otherwise it will be included. - - \sa indexOf(), isAttribute() -*/ - -/*! - \fn QVariant QDesignerPropertySheetExtension::property(int index) const - - Returns the value of the property at the given \a index. - - \sa indexOf(), setProperty(), propertyGroup() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setProperty(int index, const QVariant &value) - - Sets the \a value of the property at the given \a index. - - \warning If you change the value of a property using this - function, the undo stack is not updated. To ensure that a - property's value can be reverted using the undo stack, you must - use the QDesignerFormWindowCursorInterface::setProperty() - function, or its buddy \l - {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, - instead. - - \sa indexOf(), property(), propertyGroup() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::isChanged(int index) const - - Returns true if the value of the property at the given \a index - differs from the property's default value, otherwise false. - - \sa indexOf(), setChanged(), reset() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setChanged(int index, bool changed) - - Sets whether the property at the given \a index is different from - its default value, or not, depending on the \a changed parameter. - - \sa indexOf(), isChanged() -*/ - -// Doc: Interface only - -/*! - \class QDesignerDynamicPropertySheetExtension - - \brief The QDesignerDynamicPropertySheetExtension class allows you to - manipulate a widget's dynamic properties in Qt Designer's property editor. - - \sa QDesignerPropertySheetExtension, {QObject#Dynamic Properties}{Dynamic Properties} - - \inmodule QtDesigner - \since 4.3 -*/ - -/*! - \fn QDesignerDynamicPropertySheetExtension::~QDesignerDynamicPropertySheetExtension() - - Destroys the dynamic property sheet extension. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::dynamicPropertiesAllowed() const - - Returns true if the widget supports dynamic properties; otherwise returns false. -*/ - -/*! - \fn int QDesignerDynamicPropertySheetExtension::addDynamicProperty(const QString &propertyName, const QVariant &value) - - Adds a dynamic property named \a propertyName and sets its value to \a value. - Returns the index of the property if it was added successfully; otherwise returns -1 to - indicate failure. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::removeDynamicProperty(int index) - - Removes the dynamic property at the given \a index. - Returns true if the operation succeeds; otherwise returns false. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::isDynamicProperty(int index) const - - Returns true if the property at the given \a index is a dynamic property; otherwise - returns false. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::canAddDynamicProperty(const QString &propertyName) const - - Returns true if \a propertyName is a valid, unique name for a dynamic - property; otherwise returns false. - -*/ diff --git a/doc/src/qthelp.qdoc b/doc/src/qthelp.qdoc index 7260b6e..92c9609 100644 --- a/doc/src/qthelp.qdoc +++ b/doc/src/qthelp.qdoc @@ -279,7 +279,7 @@ \section1 Qt Help Project File Format - The file format is XML based. For a better understanding of + The file format is XML-based. For a better understanding of the format we'll discuss the following example: \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 7 @@ -398,11 +398,13 @@ Finally, the actual documentation files have to be listed. Make sure that all files neccessary to display the help are mentioned, i.e. - stylesheets or similar files need to be there as well. The file, like all + stylesheets or similar files need to be there as well. The files, like all file references in a Qt help project, are relative to the help project file - itself. All listed files will be compressed and written to the Qt compressed - help file. So, in the end, one single Qt help file contains all - documentation files along with the contents and indices. \note The - referenced files must be inside the same directory (or within a subdirectory) - as the help project file. An absolute file path is not supported either. + itself. As the example shows, files (but not directories) can also be + specified as patterns using wildcards. All listed files will be compressed + and written to the Qt compressed help file. So, in the end, one single Qt + help file contains all documentation files along with the contents and + indices. \note The referenced files must be inside the same directory + (or within a subdirectory) as the help project file. An absolute file path + is not supported either. */ diff --git a/doc/src/qtnetwork.qdoc b/doc/src/qtnetwork.qdoc index 0eca161..3802273 100644 --- a/doc/src/qtnetwork.qdoc +++ b/doc/src/qtnetwork.qdoc @@ -51,7 +51,7 @@ write TCP/IP clients and servers. The network module provides classes to make network programming - easier and portable. It offers classes such as QHttp and QFtp that + easier and portable. It offers classes such as QFtp that implement specific application-level protocols, lower-level classes such as QTcpSocket, QTcpServer and QUdpSocket that represent low level network concepts, and high level classes such as QNetworkRequest, @@ -81,7 +81,7 @@ \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 1 - \section1 High Level Network Operations + \section1 High Level Network Operations for HTTP and FTP The Network Access API is a collection of classes for performing common network operations. The API provides an abstraction layer @@ -94,6 +94,8 @@ with a request, such as any header information and the encryption used. The URL specified when a request object is constructed determines the protocol used for a request. + Currently HTTP, FTP and local file URLs are supported for uploading + and downloading. The coordination of network operations is performed by the QNetworkAccessManager class. Once a request has been created, @@ -113,65 +115,50 @@ Each application or library can create one or more instances of QNetworkAccessManager to handle network communication. + + \section1 Writing FTP Clients with QFtp - \section1 Writing HTTP and FTP Clients with QHttp and QFtp + FTP (File Transfer Protocol) is a protocol used almost exclusively + for browsing remote directories and for transferring files. - HTTP (Hypertext Transfer Protocol) is an application-level - network protocol used mainly for downloading HTML and XML files, - but it is also used as a high-level transport protocol for many - other types of data, from images and movies to purchase orders - and banking transactions. In contrast, FTP (File Transfer - Protocol) is a protocol used almost exclusively for browsing - remote directories and for transferring files. + \image httpstack.png FTP Client and Server - \image httpstack.png HTTP Client and Server - - HTTP is a simpler protocol than FTP in many ways. It uses only - one network connection, while FTP uses two (one for sending - commands, and one for transferring data). HTTP is a stateless - protocol; requests and responses are always self-contained. The + FTP uses two network connections, one for sending + commands and one for transferring data. The FTP protocol has a state and requires the client to send several commands before a file transfer takes place. + FTP clients establish a connection + and keeps it open throughout the session. In each session, multiple + transfers can occur. - In practice, HTTP clients often use separate connections for - separate requests, whereas FTP clients establish one connection - and keep it open throughout the session. - - The QHttp and QFtp classes provide client-side support for HTTP - and FTP. Since the two protocols are used to solve the same - problems, the QHttp and QFtp classes have many features in - common: - + The QFtp class provides client-side support for FTP. + It has the following characteristics: \list - \o \e{Non-blocking behavior.} QHttp and QFtp are asynchronous. - You can schedule a series of commands (also called "requests" for - HTTP). The commands are executed later, when control returns to - Qt's event loop. + \o \e{Non-blocking behavior.} QFtp is asynchronous. + You can schedule a series of commands which are executed later, + when control returns to Qt's event loop. \o \e{Command IDs.} Each command has a unique ID number that you can use to follow the execution of the command. For example, QFtp emits the \l{QFtp::commandStarted()}{commandStarted()} and \l{QFtp::commandFinished()}{commandFinished()} signal with the - command ID for each command that is executed. QHttp has a - \l{QHttp::requestStarted()}{requestStarted()} and a - \l{QHttp::requestFinished()}{requestFinished()} signal that work - the same way. - - \o \e{Data transfer progress indicators.} QHttp and QFtp emit - signals whenever data is transferred - (QFtp::dataTransferProgress(), QHttp::dataReadProgress(), and - QHttp::dataSendProgress()). You could connect these signals to - QProgressBar::setProgress() or QProgressDialog::setProgress(), + command ID for each command that is executed. + + \o \e{Data transfer progress indicators.} QFtp emits signals + whenever data is transferred (QFtp::dataTransferProgress(), + QNetworkReply::downloadProgress(), and + QNetworkReply::uploadProgress()). You could connect these signals + to QProgressBar::setProgress() or QProgressDialog::setProgress(), for example. - \o \e{QIODevice support.} Both classes support convenient + \o \e{QIODevice support.} The class supports convenient uploading from and downloading to \l{QIODevice}s, in addition to a QByteArray-based API. \endlist - There are two main ways of using QHttp and QFtp. The most common + There are two main ways of using QFtp. The most common approach is to keep track of the command IDs and follow the execution of every command by connecting to the appropriate signals. The other approach is to schedule all commands at once @@ -182,10 +169,9 @@ commands based on the result of a previous command. It also enables you to provide detailed feedback to the user. - The \l{network/http}{HTTP} and \l{network/ftp}{FTP} examples - illustrate how to write an HTTP and an FTP client. - - Writing your own HTTP or FTP server is possible using the + The \l{network/ftp}{FTP} example + illustrates how to write an FTP client. + Writing your own FTP (or HTTP) server is possible using the lower-level classes QTcpSocket and QTcpServer. \section1 Using TCP with QTcpSocket and QTcpServer @@ -210,10 +196,10 @@ will then stop immediately. QTcpSocket works asynchronously and emits signals to report status - changes and errors, just like QHttp and QFtp. It relies on the - event loop to detect incoming data and to automatically flush - outgoing data. You can write data to the socket using - QTcpSocket::write(), and read data using + changes and errors, just like QNetworkAccessManager and QFtp. It + relies on the event loop to detect incoming data and to + automatically flush outgoing data. You can write data to the + socket using QTcpSocket::write(), and read data using QTcpSocket::read(). QTcpSocket represents two independent streams of data: one for reading and one for writing. diff --git a/doc/src/qtopengl.qdoc b/doc/src/qtopengl.qdoc index 69d33bb..f60ef89 100644 --- a/doc/src/qtopengl.qdoc +++ b/doc/src/qtopengl.qdoc @@ -44,7 +44,7 @@ \title QtOpenGL Module \contentspage Qt's Modules \previouspage QtNetwork - \nextpage QtSql + \nextpage QtOpenVG \ingroup modules \brief The QtOpenGL module offers classes that make it easy to diff --git a/doc/src/qtopenvg.qdoc b/doc/src/qtopenvg.qdoc new file mode 100644 index 0000000..38be288 --- /dev/null +++ b/doc/src/qtopenvg.qdoc @@ -0,0 +1,324 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \module QtOpenVG + \title QtOpenVG Module + \since 4.6 + \contentspage Qt's Modules + \previouspage QtOpenGL + \nextpage QtScript + \ingroup modules + + \brief The QtOpenVG module provides support classes for OpenVG painting. + + \tableofcontents + + OpenVG is a standard API from the + \l{http://www.khronos.org/openvg}{Khronos Group} for accelerated + 2D vector graphics that is appearing in an increasing number of + embedded devices. + + OpenVG is optimized for 2D vector operations, and closely matches + the functionality in QPainter. It can therefore be an excellent + substitute for the default raster-based QPaintEngine on hardware + that supports OpenVG. + + \section1 Building Qt with OpenVG support + + OpenVG support can be enabled by passing the \c{-openvg} option + to configure. It is assumed that the following qmake variables + are set to appropriate values in the qmake.conf file for your + platform: + + \list + \o QMAKE_INCDIR_OPENVG + \o QMAKE_LIBDIR_OPENVG + \o QMAKE_LIBS_OPENVG + \endlist + + Most OpenVG implementations are based on EGL, so the following + variables may also need to be set: + + \list + \o QMAKE_INCDIR_EGL + \o QMAKE_LIBDIR_EGL + \o QMAKE_LIBS_EGL + \endlist + + See \l{qmake Variable Reference} for more information on these variables. + + Two kinds of OpenVG engines are currently supported: EGL based, + and engines built on top of OpenGL such as + \l{http://sourceforge.net/projects/shivavg}{ShivaVG}. + EGL based engines are preferred. + + It is assumed that the EGL implementation has some way to turn a + QWidget::winId() into an EGL rendering surface with + \c{eglCreateWindowSurface()}. If this is not the case, then + modifications may be needed to the code under \c{src/gui/egl} and + \c{src/plugins/graphicssystems/openvg} to accomodate the EGL + implementation. + + The ShivaVG graphics system under \c{src/plugins/graphicssystems/shivavg} + is an example of how to integrate a non-EGL implementation of + OpenVG into Qt. It is currently only supported with Qt/X11 + and being an example only, the resulting screen output may not + be as good as with other OpenVG engines. + + \section1 Using the OpenVG graphics system + + Once the graphics system plugin has been built and installed, + applications can be run as follows to use the plugin: + + \code + app -graphicssystem OpenVG + \endcode + + If ShivaVG is being used, then substitute \c ShivaVG instead of + \c OpenVG in the line above. + + If the plugin fails to load, try setting the \c QT_DEBUG_PLUGINS + environment variable to 1 and try again. Usually the plugin + cannot be loaded because Qt cannot locate it in the directory + \c{plugins/graphicssystems} within the Qt installation, or the + dynamic library path does not include the directory containing + the system's \c libOpenVG.so library. + + \section1 Supported features + + \section2 Context modes + + The default configuration is "single-context" mode, where a single + EGLContext object is used for all drawing, regardless of the surface. + Multiple EGLSurfaces are created, one for each window surface or pixmap. + eglMakeCurrent() is called with the same EGLContext every time, but a + different EGLSurface. + + Single-context mode is necessary for QPixmapData to be implemented in + terms of a VGImage. If single-context mode is not enabled, then QPixmapData + will use the fallback QRasterPixmapData implementation, which is less + efficient performance-wise. + + Single-context mode can be disabled with the QVG_NO_SINGLE_CONTEXT define + if the OpenVG engine does not support one context with multiple surfaces. + + \section2 Transformation matrices + + All affine and projective transformation matrices are supported. + + QVGPaintEngine will use the engine to accelerate affine transformation + matrices only. When a projective transformation matrix is used, + QVGPaintEngine will transform the coordinates before passing them + to the engine. This will probably incur a performance penalty. + + Pixmaps and images are always transformed by the engine, because + OpenVG specifies that projective transformations must work for images. + + It is recommended that client applications should avoid using projective + transformations for non-image elements in performance critical code. + + \section2 Composition modes + + The following composition modes are supported: + + \list + \o QPainter::CompositionMode_SourceOver + \o QPainter::CompositionMode_DestinationOver + \o QPainter::CompositionMode_Source + \o QPainter::CompositionMode_SourceIn + \o QPainter::CompositionMode_DestinationIn + \o QPainter::CompositionMode_Plus + \o QPainter::CompositionMode_Multiply + \o QPainter::CompositionMode_Screen + \o QPainter::CompositionMode_Darken + \o QPainter::CompositionMode_Lighten + \endlist + + The other members of QPainter::CompositionMode are not supported + because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode + enumeration. Any attempt to set an unsupported mode will result in + the actual mode being set to QPainter::CompositionMode_SourceOver. + Client applications should avoid using unsupported modes. + + \section2 Pens and brushes + + All pen styles are supported, including cosmetic pens. + + All brush styles are supported except for conical gradients, which are + not supported by OpenVG 1.1. Conical gradients will be converted into a + solid color brush corresponding to the first color in the gradient's + color ramp. + + Affine matrices are supported for brush transforms, but not projective + matrices. + + \section2 Rectangles, lines, and points + + Rectangles and lines use cached VGPath objects to try to accelerate + drawing operations. vgModifyPathCoords() is used to modify the + co-ordinates in the cached VGPath object each time fillRect(), + drawRects(), or drawLines() is called. + + If the engine does not implement vgModifyPathCoords() properly, then the + QVG_NO_MODIFY_PATH define can be set to disable path caching. This will + incur a performance penalty. + + Points are implemented as lines from the point to itself. The cached + line drawing VGPath object is used when drawing points. + + \section2 Polygons and Ellipses + + Polygon and ellipse drawing creates a new VGPath object every time + drawPolygon() or drawEllipse() is called. If the client application is + making heavy use of these functions, the constant creation and destruction + of VGPath objects could have an impact on performance. + + If a projective transformation is active, ellipses are converted into + cubic curves prior to transformation, which may further impact performance. + + Client applications should avoid polygon and ellipse drawing in performance + critical code if possible. + + \section2 Other Objects + + Most other objects (arcs, pies, etc) use drawPath(), which takes a + QPainterPath argument. The default implementation in QPainterEngineEx + converts the QPainterPath into a QVectorPath and then calls draw(), + which in turn converts the QVectorPath into a VGPath for drawing. + + To reduce the overhead, we have overridden drawPath() in QVGPaintEngine + to convert QPainterPath's directly into VGPath's. This should help improve + performance compared to the default implementation. + + Client applications should try to avoid these types of objects in + performance critical code because of the QPainterPath to VGPath + conversion cost. + + \section2 Clipping + + Clipping with QRect, QRectF, and QRegion objects is supported on all + OpenVG engines with vgMask() if the transformation matrix is the identity + or a simple origin translation. + + Clipping with an arbitrary QPainterPath, or setting the clip region when + the transformation matrix is simple, is supported only if the OpenVG engine + has the vgRenderToMask() function (OpenVG 1.1 and higher). + + The QVG_NO_RENDER_TO_MASK define will disable the use of vgRenderToMask(). + + The QVG_SCISSOR_CLIP define will disable clipping with vgMask() or + vgRenderToMask() and instead use the scissor rectangle list to perform + clipping. Clipping with an arbitrary QPainterPath will not be supported. + The QVG_SCISSOR_CLIP define should only be used if the OpenVG engine + does not support vgMask() or vgRenderToMask(). + + \section2 Opacity + + Opacity is supported for all drawing operations. Solid color pens, + solid color brushes, gradient brushes, and image drawing with drawPixmap() + and drawImage() will probably have the best performance compared to + other kinds of pens and brushes. + + \section2 Text Drawing + + If OpenVG 1.1 is used, the paint engine will use VG fonts to cache glyphs + while drawing. If the engine does not support VG fonts correctly, + QVG_NO_DRAW_GLYPHS can be defined to disable this mode. Text drawing + performance will suffer if VG fonts are not used. + + By default, image-based glyphs are used. If QVG_NO_IMAGE_GLYPHS is defined, + then path-based glyphs will be used instead. QVG_NO_IMAGE_GLYPHS is ignored + if QVG_NO_DRAW_GLYPHS is defined. + + If path-based glyphs are used, then the OpenVG engine will need to + support hinting to render text with good results. Image-based glyphs + avoids the need for hinting and will usually give better results than + path-based glyphs. + + \section2 Pixmaps + + In single-context mode, pixmaps will be implemented using VGImage + unless QVG_NO_PIXMAP_DATA is defined. + + QVGPixmapData will convert QImage's into VGImage's when the application + calls drawPixmap(), and the pixmap will be kept in VGImage form for the + lifetime of the QVGPixmapData object. When the application tries to paint + into a QPixmap with QPainter, the data will be converted back into a + QImage and the raster paint engine will be used to render into the QImage. + + This arrangement optimizes for the case of drawing the same static pixmap + over and over (e.g. for icons), but does not optimize the case of drawing + into pixmaps. + + Bitmaps must use QRasterPixmapData. They are not accelerated with + VGImage at present. + + \section2 Pixmap filters + + Convolution, colorize, and drop shadow filters are accelerated using + OpenVG operations. + + \section1 Known issues + + Performance of copying the contents of an OpenVG-rendered window to the + screen needs platform-specific work in the QVGWindowSurface class. + + Clipping with arbitrary non-rectangular paths only works on engines + that support vgRenderToMask(). Simple rectangular paths are supported + on all engines that correctly implement vgMask(). + + The paint engine is not yet thread-safe, so it is not recommended for + use in threaded Qt applications that draw from multiple threads. + Drawing should be limited to the main GUI thread. + + Performance of projective matrices for non-image drawing is not as good + as for affine matrices. + + QPixmap's are implemented as VGImage objects so that they can be quickly + rendered with drawPixmap(). Rendering into a QPixmap using QPainter + will use the default Qt raster paint engine on a QImage copy of the + QPixmap, and will not be accelerated. This issue may be addressed in + a future version of the engine. + + ShivaVG support is highly experimental and limited to Qt/X11. It is + provided as an example of how to integrate a non-EGL engine. + */ diff --git a/doc/src/qtscript.qdoc b/doc/src/qtscript.qdoc index ac13ddf..6b8f639 100644 --- a/doc/src/qtscript.qdoc +++ b/doc/src/qtscript.qdoc @@ -44,7 +44,7 @@ \title QtScript Module \since 4.3 \contentspage Qt's Modules - \previouspage QtOpenGL + \previouspage QtOpenVG \nextpage QtScriptTools \ingroup modules \ingroup scripting @@ -1782,20 +1782,20 @@ \list 1 \o Run \c lupdate to extract translatable text from the script source code - of the Qt application, resulting in a message file for translators (a \c - .ts file). The utility recognizes qsTr(), qsTranslate() and the - \c{QT_TR*_NOOP()} functions described above and produces \c .ts files + of the Qt application, resulting in a message file for translators (a TS + file). The utility recognizes qsTr(), qsTranslate() and the + \c{QT_TR*_NOOP()} functions described above and produces TS files (usually one per language). - \o Provide translations for the source texts in the \c .ts file, using - \e{Qt Linguist}. Since \c .ts files are in XML format, you can also + \o Provide translations for the source texts in the TS file, using + \e{Qt Linguist}. Since TS files are in XML format, you can also edit them by hand. - \o Run \c lrelease to obtain a light-weight message file (a \c .qm - file) from the \c .ts file, suitable only for end use. Think of the \c - .ts files as "source files", and \c .qm files as "object files". The - translator edits the \c .ts files, but the users of your application - only need the \c .qm files. Both kinds of files are platform and + \o Run \c lrelease to obtain a light-weight message file (a QM + file) from the TS file, suitable only for end use. Think of the TS + files as "source files", and QM files as "object files". The + translator edits the TS files, but the users of your application + only need the QM files. Both kinds of files are platform and locale independent. \endlist @@ -1805,7 +1805,7 @@ translations from previous releases. When running \c lupdate, you must specify the location of the script(s), - and the name of the \c{.ts} file to produce. Examples: + and the name of the TS file to produce. Examples: \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 87 @@ -1823,7 +1823,7 @@ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 89 - When running \c lrelease, you must specify the name of the \c{.ts} input + When running \c lrelease, you must specify the name of the TS input file; or, if you are using a qmake project file to manage script translations, you specify the name of that file. \c lrelease will create \c myscript_la.qm, the binary representation of the translation. diff --git a/doc/src/qtuiloader.qdoc b/doc/src/qtuiloader.qdoc index 137cfeb..0a23366 100644 --- a/doc/src/qtuiloader.qdoc +++ b/doc/src/qtuiloader.qdoc @@ -53,7 +53,7 @@ These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource - file containing a \c{.ui} file is needed. Applications that use the + file containing a UI file is needed. Applications that use the form handling classes need to be configured to be built against the QtUiTools module. This is done by including the following declaration in a \c qmake project file to ensure that the application is compiled diff --git a/doc/src/qtxmlpatterns.qdoc b/doc/src/qtxmlpatterns.qdoc index 6b82c0d..3177736 100644 --- a/doc/src/qtxmlpatterns.qdoc +++ b/doc/src/qtxmlpatterns.qdoc @@ -839,6 +839,33 @@ with the \c fn:id() function. See \l{http://www.w3.org/TR/xml-id/}{xml:id Version 1.0} for details. + \section2 XML Schema 1.0 + + There are two ways QtXmlPatterns can be used to validate schemas: + You can use the C++ API in your Qt application using the classes + QXmlSchema and QXmlSchemaValidator, or you can use the command line + utility named xmlpatternsvalidator (located in the "bin" directory + of your Qt build). + + The QtXmlPatterns implementation of XML Schema validation supports + the schema specification version 1.0 in large parts. Known problems + of the implementation and areas where conformancy may be questionable + are: + + \list + \o Large \c minOccurs or \c maxOccurs values or deeply nested ones + require huge amount of memory which might cause the system to freeze. + Such a schema should be rewritten to use \c unbounded as value instead + of large numbers. This restriction will hopefully be fixed in a later release. + \o Comparison of really small or large floating point values might lead to + wrong results in some cases. However such numbers should not be relevant + for day-to-day usage. + \o Regular expression support is currently not conformant but follows + Qt's QRegExp standard syntax. + \o Identity constraint checks can not use the values of default or fixed + attribute definitions. + \endlist + \section2 Resource Loading When QtXmlPatterns loads an XML resource, e.g., using the @@ -884,6 +911,54 @@ URIs are first passed to QAbstractUriResolver. Check QXmlQuery::setUriResolver() for possible rewrites. + \section1 License Information + + The XML Schema implementation provided by this module contains the \c xml.xsd file + (located in \c{src/xmlpatterns/schema/schemas}) which is licensed under the terms + given below. This module is always built with XML Schema support enabled. + + \legalese + W3C\copyright SOFTWARE NOTICE AND LICENSE + + This license came from: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + This work (and included software, documentation such as READMEs, or other + related items) is being provided by the copyright holders under the following + license. By obtaining, using and/or copying this work, you (the licensee) + agree that you have read, understood, and will comply with the following + terms and conditions. + + Permission to copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and without + fee or royalty is hereby granted, provided that you include the following on + ALL copies of the software and documentation or portions thereof, including + modifications: + + 1. The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work.\br + 2. Any pre-existing intellectual property disclaimers, notices, or terms + and conditions. If none exist, the W3C Software Short Notice should be + included (hypertext is preferred, text is permitted) + within the body of any redistributed or derivative code.\br + 3. Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.) + + THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS + MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT + LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR + PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE + ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. + + The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, written + prior permission. Title to copyright in this software and any associated + documentation will at all times remain with copyright holders. + \endlegalese */ /*! diff --git a/doc/src/resources.qdoc b/doc/src/resources.qdoc index e4d4c35..6f3f939 100644 --- a/doc/src/resources.qdoc +++ b/doc/src/resources.qdoc @@ -175,7 +175,7 @@ Qt's resources support the concept of a search path list. If you then refer to a resource with \c : instead of \c :/ as the prefix, the resource will be looked up using the search path list. The search - path list is empty at startup; call QDir::addResourceSearchPath() to + path list is empty at startup; call QDir::addSearchPath() to add paths to it. If you have resources in a static library, you might need to diff --git a/doc/src/richtext.qdoc b/doc/src/richtext.qdoc index 41afbcf..c43db0c 100644 --- a/doc/src/richtext.qdoc +++ b/doc/src/richtext.qdoc @@ -714,8 +714,8 @@ Ideas for other sections: \previouspage Common Rich Text Editing Tasks Qt's text widgets are able to display rich text, specified using a subset of \l{HTML 4} - markup. Widgets that use QTextDocument, such as QLabel, QTextEdit, QTreeWidgetItem and - the other item widgets, are able to display rich text specified in this way. + markup. Widgets that use QTextDocument, such as QLabel and QTextEdit, are able to display + rich text specified in this way. \tableofcontents @@ -1058,8 +1058,11 @@ Ideas for other sections: \o Specifies where an image or a text will be placed in another element. Note that the \c float property is only supported for tables and images. \row \o \c text-transform - \o [ uppercase | lowercase | smallcaps ] + \o [ uppercase | lowercase ] \o Select the transformation that will be performed on the text prior to displaying it. + \row \o \c font-variant + \o small-caps + \o Perform the smallcaps transformation on the text prior to displaying it. \row \o \c word-spacing \o <width>px \o Specifies an alternate spacing between each word. diff --git a/doc/src/signalsandslots.qdoc b/doc/src/signalsandslots.qdoc index fdfb3d4..09eb0a6 100644 --- a/doc/src/signalsandslots.qdoc +++ b/doc/src/signalsandslots.qdoc @@ -178,15 +178,19 @@ looping in the case of cyclic connections (e.g., if \c{b.valueChanged()} were connected to \c{a.setValue()}). - A signal is emitted for every connection you make; if you - duplicate a connection, two signals will be emitted. You can - always break a connection using QObject::disconnect(). + By default, for every connection you make, a signal is emitted; + two signals are emitted for duplicate connections. You can break + all of these connections with a single disconnect() call. + If you pass the Qt::UniqueConnection \a type, the connection will only + be made if it is not a duplicate. If there is already a duplicate + (exact same signal to the exact same slot on the same objects), + the connection will fail and connect will return false This example illustrates that objects can work together without needing to know any information about each other. To enable this, the objects only need to be connected together, and this can be achieved with some simple QObject::connect() function calls, or with \c{uic}'s - \l{Using a Designer .ui File in Your Application#Automatic Connections} + \l{Using a Designer UI File in Your Application#Automatic Connections} {automatic connections} feature. \section1 Building the Example @@ -218,8 +222,8 @@ will continue immediately, and the slots will be executed later. If several slots are connected to one signal, the slots will be - executed one after the other, in an arbitrary order, when the signal - is emitted. + executed one after the other, in the order they have been connected, + when the signal is emitted. Signals are automatically generated by the \l moc and must not be implemented in the \c .cpp file. They can never have return types diff --git a/doc/src/snippets/animation/sequential/icons.qrc b/doc/src/snippets/animation/sequential/icons.qrc new file mode 100644 index 0000000..d55f797 --- /dev/null +++ b/doc/src/snippets/animation/sequential/icons.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC><RCC version="1.0"> + <qresource> + <file>icons/left.png</file> + <file>icons/right.png</file> + </qresource> +</RCC> diff --git a/doc/src/snippets/animation/sequential/icons/left.png b/doc/src/snippets/animation/sequential/icons/left.png Binary files differnew file mode 100644 index 0000000..5dd8da0 --- /dev/null +++ b/doc/src/snippets/animation/sequential/icons/left.png diff --git a/doc/src/snippets/animation/sequential/icons/right.png b/doc/src/snippets/animation/sequential/icons/right.png Binary files differnew file mode 100644 index 0000000..ac61326 --- /dev/null +++ b/doc/src/snippets/animation/sequential/icons/right.png diff --git a/doc/src/snippets/animation/sequential/main.cpp b/doc/src/snippets/animation/sequential/main.cpp new file mode 100644 index 0000000..aff8f29 --- /dev/null +++ b/doc/src/snippets/animation/sequential/main.cpp @@ -0,0 +1,50 @@ +#include <QApplication> +#include <QLabel> +#include <QPropertyAnimation> +#include <QSequentialAnimationGroup> +#include "tracer.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QWidget window; + window.resize(720, 96); + window.show(); + + QLabel *label1 = new QLabel(&window); + label1->setPixmap(QPixmap(":/icons/left.png")); + label1->move(16, 16); + label1->show(); + + QLabel *label2 = new QLabel(&window); + label2->setPixmap(QPixmap(":/icons/right.png")); + label2->move(320, 16); + label2->show(); + + QPropertyAnimation *anim1 = new QPropertyAnimation(label1, "pos"); + anim1->setDuration(2500); + anim1->setStartValue(QPoint(16, 16)); + anim1->setEndValue(QPoint(320, 16)); + + QPropertyAnimation *anim2 = new QPropertyAnimation(label2, "pos"); + anim2->setDuration(2500); + anim2->setStartValue(QPoint(320, 16)); + anim2->setEndValue(QPoint(640, 16)); + + QSequentialAnimationGroup group; + group.addAnimation(anim1); + group.addAnimation(anim2); + + Tracer tracer(&window); + + QObject::connect(anim1, SIGNAL(valueChanged(QVariant)), + &tracer, SLOT(recordValue(QVariant))); + QObject::connect(anim2, SIGNAL(valueChanged(QVariant)), + &tracer, SLOT(recordValue(QVariant))); + QObject::connect(anim1, SIGNAL(finished()), &tracer, SLOT(checkValue())); + QObject::connect(anim2, SIGNAL(finished()), &tracer, SLOT(checkValue())); + + group.start(); + return app.exec(); +} diff --git a/doc/src/snippets/animation/sequential/sequential.pro b/doc/src/snippets/animation/sequential/sequential.pro new file mode 100644 index 0000000..fcf017f --- /dev/null +++ b/doc/src/snippets/animation/sequential/sequential.pro @@ -0,0 +1,4 @@ +HEADERS = tracer.h +RESOURCES = icons.qrc +SOURCES = main.cpp \ + tracer.cpp diff --git a/doc/src/snippets/animation/sequential/tracer.cpp b/doc/src/snippets/animation/sequential/tracer.cpp new file mode 100644 index 0000000..49bd51e --- /dev/null +++ b/doc/src/snippets/animation/sequential/tracer.cpp @@ -0,0 +1,25 @@ +#include <QAbstractAnimation> +#include <QDebug> +#include <QPoint> +#include "tracer.h" + +Tracer::Tracer(QObject *parent) + : QObject(parent) +{ +} + +void Tracer::checkValue() +{ + QAbstractAnimation *animation = static_cast<QAbstractAnimation *>(sender()); + if (time != animation->duration()) { + qDebug() << "Animation's last recorded time" << time; + qDebug() << "Expected" << animation->duration(); + } +} + +void Tracer::recordValue(const QVariant &value) +{ + QAbstractAnimation *animation = static_cast<QAbstractAnimation *>(sender()); + this->value = value; + time = animation->currentTime(); +} diff --git a/doc/src/snippets/animation/sequential/tracer.h b/doc/src/snippets/animation/sequential/tracer.h new file mode 100644 index 0000000..1adb018 --- /dev/null +++ b/doc/src/snippets/animation/sequential/tracer.h @@ -0,0 +1,23 @@ +#ifndef TRACER_H +#define TRACER_H + +#include <QObject> +#include <QVariant> + +class Tracer : public QObject +{ + Q_OBJECT + +public: + Tracer(QObject *parent = 0); + +public slots: + void checkValue(); + void recordValue(const QVariant &value); + +private: + QVariant value; + int time; +}; + +#endif diff --git a/doc/src/snippets/code/doc_src_emb-charinput.qdoc b/doc/src/snippets/code/doc_src_emb-charinput.qdoc index 2539e13..f6b33fe 100644 --- a/doc/src/snippets/code/doc_src_emb-charinput.qdoc +++ b/doc/src/snippets/code/doc_src_emb-charinput.qdoc @@ -4,7 +4,7 @@ //! [1] -configure -qt-kbd-s15000 +configure -qt-kbd-linuxinput //! [1] diff --git a/doc/src/snippets/code/doc_src_introtodbus.qdoc b/doc/src/snippets/code/doc_src_introtodbus.qdoc index bedfe7f..97b14e9 100644 --- a/doc/src/snippets/code/doc_src_introtodbus.qdoc +++ b/doc/src/snippets/code/doc_src_introtodbus.qdoc @@ -1,3 +1,8 @@ //! [0] org.freedesktop.DBus //! [0] + +//! [QDBUS_DEBUG] +examples/dbus/remotecontrolledcar/controller/controller & +QDBUS_DEBUG=1 examples/dbus/remotecontrolledcar/car/car & +//! [QDBUS_DEBUG] diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc index ce3b997..5697300 100644 --- a/doc/src/snippets/code/doc_src_linguist-manual.qdoc +++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc @@ -42,7 +42,7 @@ Options: -pluralonly Only include plural form messages. -silent - Don't explain what is being done. + Do not explain what is being done. -version Display the version of lupdate and exit. //! [4] @@ -55,14 +55,14 @@ Usage: Options: -help Display this information and exit -compress - Compress the .qm files + Compress the QM files -nounfinished Do not include unfinished translations -removeidentical If the translated text is the same as the source text, do not include the message -silent - Don't explain what is being done + Do not explain what is being done -version Display the version of lrelease and exit //! [5] diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc index 377cc9c..3c9109f 100644 --- a/doc/src/snippets/code/doc_src_properties.qdoc +++ b/doc/src/snippets/code/doc_src_properties.qdoc @@ -7,7 +7,9 @@ Q_PROPERTY(type name [DESIGNABLE bool] [SCRIPTABLE bool] [STORED bool] - [USER bool]) + [USER bool] + [CONSTANT] + [FINAL]) //! [0] diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index edb66bc..82c710d 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -689,7 +689,7 @@ qmake -o Makefile hello.pro //! [115] -qmake -tp vc -o hello.dsp hello.pro +qmake -tp vc hello.pro //! [115] diff --git a/doc/src/snippets/code/doc_src_qthelp.qdoc b/doc/src/snippets/code/doc_src_qthelp.qdoc index 11d231f..949e2a5 100644 --- a/doc/src/snippets/code/doc_src_qthelp.qdoc +++ b/doc/src/snippets/code/doc_src_qthelp.qdoc @@ -92,8 +92,7 @@ if (links.count()) { </keywords> <files> <file>classic.css</file> - <file>index.html</file> - <file>doc.html</file> + <file>*.html</file> </files> </filterSection> </QtHelpProject> @@ -154,8 +153,7 @@ if (links.count()) { ... <files> <file>classic.css</file> - <file>index.html</file> - <file>doc.html</file> + <file>*.html</file> </files> ... //! [13] diff --git a/doc/src/snippets/code/doc_src_styles.qdoc b/doc/src/snippets/code/doc_src_styles.qdoc index e11dc05..9d5756a 100644 --- a/doc/src/snippets/code/doc_src_styles.qdoc +++ b/doc/src/snippets/code/doc_src_styles.qdoc @@ -1,5 +1,5 @@ //! [0] - opt.init(q); + opt.initFrom(q); if (down) opt.state |= QStyle::State_Sunken; if (tristate && noChange) diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc index 60622d3..a62148f 100644 --- a/doc/src/snippets/code/doc_src_stylesheet.qdoc +++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc @@ -1538,6 +1538,11 @@ QSplitter::handle:horizontal { QSplitter::handle:vertical { height: 2px; } + +QSplitter::handle:pressed { + url(images/splitter_pressed.png); +} + //! [142] diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp index 287181a..50052c3 100644 --- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp +++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp @@ -358,6 +358,30 @@ QString global_greeting(int type) //! [36] +//! [qttrid] + //% "%n fooish bar(s) found.\n" + //% "Do you want to continue?" + QString text = qtTrId("qtn_foo_bar", n); +//! [qttrid] + + +//! [qttrid_noop] +static const char * const ids[] = { + //% "This is the first text." + QT_TRID_NOOP("qtn_1st_text"), + //% "This is the second text." + QT_TRID_NOOP("qtn_2nd_text"), + 0 +}; + +void TheClass::addLabels() +{ + for (int i = 0; ids[i]; ++i) + new QLabel(qtTrId(ids[i]), this); +} +//! [qttrid_noop] + + //! [37] qWarning("%s: %s", qPrintable(key), qPrintable(value)); //! [37] diff --git a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp index 2ab15ee..89b4f33 100644 --- a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp +++ b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp @@ -13,9 +13,9 @@ info1.size(); // returns 56201 info1.symLinkTarget(); // returns "/opt/pretty++/bin/untabify" QFileInfo info2(info1.symLinkTarget()); -info1.isSymLink(); // returns false -info1.absoluteFilePath(); // returns "/opt/pretty++/bin/untabify" -info1.size(); // returns 56201 +info2.isSymLink(); // returns false +info2.absoluteFilePath(); // returns "/opt/pretty++/bin/untabify" +info2.size(); // returns 56201 #endif //! [0] diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp index 5a7c5a7..5c0f80c 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp @@ -376,6 +376,15 @@ hostNameLabel->setText(tr("Name:")); QString example = tr("Example"); //! [40] +//! [meta data] +//: This is a comment for the translator. +//= qtn_foo_bar +//~ loc-layout_id foo_dialog +//~ loc-blank False +//~ magic-stuff This might mean something magic. +QString text = MyMagicClass::tr("Sim sala bim."); +//! [meta data] + //! [explicit tr context] QString text = QScrollBar::tr("Page up"); //! [explicit tr context] diff --git a/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp b/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp new file mode 100644 index 0000000..65358ea --- /dev/null +++ b/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp @@ -0,0 +1,4 @@ +//! [0] +qreal myEasingFunction(qreal progress); +//! [0] + diff --git a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp index 7d75e1b..3b9a756 100644 --- a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp @@ -190,10 +190,10 @@ QVector<QString> vect = list.toVector(); //! [23] -QSet<double> set; -set << 20.0 << 30.0 << 40.0 << ... << 70.0; +QSet<int> set; +set << 20 << 30 << 40 << ... << 70; -QList<double> list = QList<double>::fromSet(set); +QList<int> list = QList<int>::fromSet(set); qSort(list); //! [23] diff --git a/doc/src/snippets/code/src_gui_image_qpixmap.cpp b/doc/src/snippets/code/src_gui_image_qpixmap.cpp index f86eeae..822b466 100644 --- a/doc/src/snippets/code/src_gui_image_qpixmap.cpp +++ b/doc/src/snippets/code/src_gui_image_qpixmap.cpp @@ -10,3 +10,9 @@ static const char * const start_xpm[]={ QPixmap myPixmap; myPixmap->setMask(myPixmap->createHeuristicMask()); //! [1] + +//! [2] +QPixmap pixmap("background.png"); +QRegion exposed; +pixmap.scroll(10, 10, pixmap.rect(), &exposed); +//! [2] diff --git a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp index c4b6353..2a04f64 100644 --- a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp +++ b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp @@ -13,7 +13,7 @@ painter->drawPixmap(0, 0, p); //! [1] QPixmap pm; -if (!QPixmapCache::find("my_big_image", pm)) { +if (!QPixmapCache::find("my_big_image", &pm)) { pm.load("bigimage.png"); QPixmapCache::insert("my_big_image", pm); } diff --git a/doc/src/snippets/code/src_gui_qproxystyle.cpp b/doc/src/snippets/code/src_gui_qproxystyle.cpp new file mode 100644 index 0000000..46a2a5f --- /dev/null +++ b/doc/src/snippets/code/src_gui_qproxystyle.cpp @@ -0,0 +1,45 @@ +//! [0] +class MyProxyStyle : public QProxyStyle +{ +public: + + int styleHint(StyleHint hint, const QStyleOption *option = 0, + const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const + { + if (hint == QStyle::SH_UnderlineShortcut) + return 1; + return QProxyStyle::styleHint(hint, option, widget, returnData); + } +}; + +//! [0] + +//! [1] +#include "textedit.h" +#include <QApplication> +#include <QProxyStyle> + +class MyProxyStyle : public QProxyStyle +{ + public: + int styleHint(StyleHint hint, const QStyleOption *option = 0, + const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const + { + if (hint == QStyle::SH_UnderlineShortcut) + return 0; + return QProxyStyle::styleHint(hint, option, widget, returnData); + } +}; + +int main(int argc, char **argv) +{ + Q_INIT_RESOURCE(textedit); + + QApplication a(argc, argv); + a.setStyle(new MyProxyStyle); + TextEdit mw; + mw.resize(700, 800); + mw.show(); + //... +} +//! [1] diff --git a/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp b/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp new file mode 100644 index 0000000..acd3938 --- /dev/null +++ b/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp @@ -0,0 +1,24 @@ +//! [0] +QNetworkAccessManager *manager = new QNetworkAccessManager(this); +QNetworkDiskCache *diskCache = new QNetworkDiskCache(this); +diskCache->setCacheDirectory("cacheDir"); +manager->setCache(diskCache); +//! [0] + +//! [1] +// do a normal request (preferred from network, as this is the default) +QNetworkRequest request(QUrl(QString("http://www.qtsoftware.com"))); +manager->get(request); + +// do a request preferred from cache +QNetworkRequest request2(QUrl(QString("http://www.qtsoftware.com"))); +request2.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache); +manager->get(request2); +//! [1] + +//! [2] +void replyFinished(QNetworkReply *reply) { + QVariant fromCache = reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute); + qDebug() << "page from cache?" << fromCache.toBool(); +} +//! [2] diff --git a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp new file mode 100644 index 0000000..78b388b --- /dev/null +++ b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp @@ -0,0 +1,10 @@ +//! [0] +QList<QSslCertificate> cert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem")); +QSslError error(QSslError::SelfSignedCertificate, cert.at(0)); +QList<QSslError> expectedSslErrors; +expectedSslErrors.append(error); + +QNetworkReply *reply = manager.get(QNetworkRequest(QUrl("https://server.tld/index.html"))); +reply->ignoreSslErrors(expectedSslErrors); +// here connect signals etc. +//! [0] diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp index afffbab..7845e9b 100644 --- a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp +++ b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp @@ -54,3 +54,14 @@ socket->connectToHostEncrypted("imap", 993); if (socket->waitForEncrypted(1000)) qDebug("Encrypted!"); //! [5] + +//! [6] +QList<QSslCertificate> cert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem")); +QSslError error(QSslError::SelfSignedCertificate, cert.at(0)); +QList<QSslError> expectedSslErrors; +expectedSslErrors.append(error); + +QSslSocket socket; +socket.ignoreSslErrors(expectedSslErrors); +socket.connectToHostEncrypted("server.tld", 443); +//! [6] diff --git a/doc/src/snippets/qprocess-environment/main.cpp b/doc/src/snippets/qprocess-environment/main.cpp index 4ede32b..baca968 100644 --- a/doc/src/snippets/qprocess-environment/main.cpp +++ b/doc/src/snippets/qprocess-environment/main.cpp @@ -43,6 +43,7 @@ void startProcess() { + { //! [0] QProcess process; QStringList env = QProcess::systemEnvironment(); @@ -51,6 +52,18 @@ env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1;C:\\B process.setEnvironment(env); process.start("myapp"); //! [0] + } + + { +//! [1] +QProcess process; +QHash<QString, QString> env = QProcess::systemEnvironmentHash(); +env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable +env["PATH"] += ";C:\\Bin"; +process.setEnvironment(env); +process.start("myapp"); +//! [1] + } } int main(int argc, char *argv[]) diff --git a/doc/src/snippets/qstring/stringbuilder.cpp b/doc/src/snippets/qstring/stringbuilder.cpp new file mode 100644 index 0000000..90803e2 --- /dev/null +++ b/doc/src/snippets/qstring/stringbuilder.cpp @@ -0,0 +1,28 @@ + +//! [0] + QString foo; + QString type = "long"; + + foo->setText(QLatin1String("vector<") + type + QLatin1String(">::iterator")); + + if (foo.startsWith("(" + type + ") 0x")) + ... +//! [0] + +//! [3] + #define QT_USE_FAST_CONCATENATION +//! [3] + +//! [4] + #define QT_USE_FAST_CONCATENATION + #define QT_USE_FAST_OPERATOR_PLUS +//! [4] + +//! [5] + #include <QStringBuilder> + + QString hello("hello"); + QStringRef el(&hello, 2, 3); + QLatin1String world("world"); + QString message = hello % el % world % QChar('!'); +//! [5] diff --git a/doc/src/snippets/qxmlschema/main.cpp b/doc/src/snippets/qxmlschema/main.cpp new file mode 100644 index 0000000..e5989ee --- /dev/null +++ b/doc/src/snippets/qxmlschema/main.cpp @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore> +#include <QtXmlPatterns> + +class Schema +{ + public: + void loadFromUrl() const; + void loadFromFile() const; + void loadFromData() const; +}; + +void Schema::loadFromUrl() const +{ +//! [0] + QUrl url("http://www.schema-example.org/myschema.xsd"); + + QXmlSchema schema; + if (schema.load(url) == true) + qDebug() << "schema is valid"; + else + qDebug() << "schema is invalid"; +//! [0] +} + +void Schema::loadFromFile() const +{ +//! [1] + QFile file("myschema.xsd"); + file.open(QIODevice::ReadOnly); + + QXmlSchema schema; + schema.load(&file, QUrl::fromLocalFile(file.fileName())); + + if (schema.isValid()) + qDebug() << "schema is valid"; + else + qDebug() << "schema is invalid"; +//! [1] +} + +void Schema::loadFromData() const +{ +//! [2] + QByteArray data( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<xsd:schema" + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" + " xmlns=\"http://www.qtsoftware.com/xmlschematest\"" + " targetNamespace=\"http://www.qtsoftware.com/xmlschematest\"" + " version=\"1.0\"" + " elementFormDefault=\"qualified\">" + "</xsd:schema>" ); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchema schema; + schema.load(&buffer); + + if (schema.isValid()) + qDebug() << "schema is valid"; + else + qDebug() << "schema is invalid"; +//! [2] +} + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + + Schema schema; + + schema.loadFromUrl(); + schema.loadFromFile(); + schema.loadFromData(); + + return 0; +} diff --git a/doc/src/snippets/qxmlschema/qxmlschema.pro b/doc/src/snippets/qxmlschema/qxmlschema.pro new file mode 100644 index 0000000..7e8782a --- /dev/null +++ b/doc/src/snippets/qxmlschema/qxmlschema.pro @@ -0,0 +1,3 @@ +SOURCES += main.cpp + +QT += xmlpatterns diff --git a/doc/src/snippets/qxmlschemavalidator/main.cpp b/doc/src/snippets/qxmlschemavalidator/main.cpp new file mode 100644 index 0000000..581f40f --- /dev/null +++ b/doc/src/snippets/qxmlschemavalidator/main.cpp @@ -0,0 +1,160 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore> +#include <QtXmlPatterns> + +class SchemaValidator +{ + public: + void validateFromUrl() const; + void validateFromFile() const; + void validateFromData() const; + void validateComplete() const; + + private: + QXmlSchema getSchema() const; +}; + +void SchemaValidator::validateFromUrl() const +{ +//! [0] + const QXmlSchema schema = getSchema(); + + const QUrl url("http://www.schema-example.org/test.xml"); + + QXmlSchemaValidator validator(schema); + if (validator.validate(url)) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; +//! [0] +} + +void SchemaValidator::validateFromFile() const +{ +//! [1] + const QXmlSchema schema = getSchema(); + + QFile file("test.xml"); + file.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + if (validator.validate(&file, QUrl::fromLocalFile(file.fileName()))) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; +//! [1] +} + +void SchemaValidator::validateFromData() const +{ +//! [2] + const QXmlSchema schema = getSchema(); + + QByteArray data("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<test></test>"); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + if (validator.validate(&buffer)) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; +//! [2] +} + +QXmlSchema SchemaValidator::getSchema() const +{ + QByteArray data("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<xsd:schema" + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" + " xmlns=\"http://www.qtsoftware.com/xmlschematest\"" + " targetNamespace=\"http://www.qtsoftware.com/xmlschematest\"" + " version=\"1.0\"" + " elementFormDefault=\"qualified\">" + "</xsd:schema>"); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchema schema; + schema.load(&buffer); + + return schema; +} + +void SchemaValidator::validateComplete() const +{ +//! [3] + QUrl schemaUrl("file:///home/user/schema.xsd"); + + QXmlSchema schema; + schema.load(schemaUrl); + + if (schema.isValid()) { + QFile file("test.xml"); + file.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + if (validator.validate(&file, QUrl::fromLocalFile(file.fileName()))) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; + } +//! [3] +} + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + + SchemaValidator validator; + + validator.validateFromUrl(); + validator.validateFromFile(); + validator.validateFromData(); + validator.validateComplete(); + + return 0; +} diff --git a/doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro b/doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro new file mode 100644 index 0000000..7e8782a --- /dev/null +++ b/doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro @@ -0,0 +1,3 @@ +SOURCES += main.cpp + +QT += xmlpatterns diff --git a/doc/src/snippets/snippets.pro b/doc/src/snippets/snippets.pro index 50e33b3..e3e7eca 100644 --- a/doc/src/snippets/snippets.pro +++ b/doc/src/snippets/snippets.pro @@ -73,6 +73,8 @@ SUBDIRS = brush \ quiloader \ qx11embedcontainer \ qx11embedwidget \ + qxmlschema \ + qxmlschemavalidator \ reading-selections \ scribe-overview \ separations \ 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; +} diff --git a/doc/src/snippets/statemachine/main.cpp b/doc/src/snippets/statemachine/main.cpp new file mode 100644 index 0000000..f20d245 --- /dev/null +++ b/doc/src/snippets/statemachine/main.cpp @@ -0,0 +1,48 @@ + +#include <QtGui> + +int main(int argv, char **args) +{ + QApplication app(argv, args); + + QLabel *label = new QLabel; + +//![0] + QStateMachine machine; + QState *s1 = new QState(); + QState *s2 = new QState(); + QState *s3 = new QState(); +//![0] + +//![4] + s1->assignProperty(label, "text", "In state s1"); + s2->assignProperty(label, "text", "In state s2"); + s3->assignProperty(label, "text", "In state s3"); +//![4] + +//![5] + QObject::connect(s3, SIGNAL(entered()), button, SLOT(showMaximized())); + QObject::connect(s3, SIGNAL(exited()), button, SLOT(showMinimized())); +//![5] + +//![1] + s1->addTransition(button, SIGNAL(clicked()), s2); + s2->addTransition(button, SIGNAL(clicked()), s3); + s3->addTransition(button, SIGNAL(clicked()), s1); +//![1] + +//![2] + machine.addState(s1); + machine.addState(s2); + machine.addState(s3); + machine.setInitialState(s1); +//![2] + +//![3] + machine.start(); +//![3] + + label->show(); + + return app.exec(); +} diff --git a/doc/src/snippets/statemachine/main2.cpp b/doc/src/snippets/statemachine/main2.cpp new file mode 100644 index 0000000..60a61e7 --- /dev/null +++ b/doc/src/snippets/statemachine/main2.cpp @@ -0,0 +1,51 @@ + +#include <QtGui> + +int main(int argv, char **args) +{ + QApplication app(argv, args); + + QStateMachine machine; + +//![0] + QState *s1 = new QState(); + QState *s11 = new QState(s1); + QState *s12 = new QState(s1); + QState *s13 = new QState(s1); + s1->setInitialState(s11); + machine.addState(s1); +//![0] + +//![2] + s12>addTransition(quitButton, SIGNAL(clicked()), s12); +//![2] + +//![1] + QFinalState *s2 = new QFinalState(); + s1->addTransition(quitButton, SIGNAL(clicked()), s2); + machine.addState(s2); + + QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit())); +//![1] + + QButton *interruptButton = new QPushButton("Interrupt Button"); + +//![3] + QHistoryState *s1h = s1->addHistoryState(); + + QState *s3 = new QState(); + s3->assignProperty(label, "text", "In s3"); + QMessageBox mbox; + mbox.addButton(QMessageBox::Ok); + mbox.setText("Interrupted!"); + mbox.setIcon(QMessageBox::Information); + QObject::connect(s3, SIGNAL(entered()), &mbox, SLOT(exec())); + s3->addTransition(s1h); + machine.addState(s3); + + s1->addTransition(interruptButton, SIGNAL(clicked()), s3); +//![3] + + return app.exec(); +} + diff --git a/doc/src/snippets/statemachine/main3.cpp b/doc/src/snippets/statemachine/main3.cpp new file mode 100644 index 0000000..b04b850 --- /dev/null +++ b/doc/src/snippets/statemachine/main3.cpp @@ -0,0 +1,21 @@ + +#include <QtGui> + +int main(int argv, char **args) +{ + QApplication app(argv, args); + +//![0] + QState *s1 = new QState(QState::ParallelStates); + // s11 and s12 will be entered in parallel + QState *s11 = new QState(s1); + QState *s12 = new QState(s1); +//![0] + +//![1] + s1->addTransition(s1, SIGNAL(finished()), s2); +//![1] + + return app.exec(); +} + diff --git a/doc/src/snippets/statemachine/main4.cpp b/doc/src/snippets/statemachine/main4.cpp new file mode 100644 index 0000000..5681bbd --- /dev/null +++ b/doc/src/snippets/statemachine/main4.cpp @@ -0,0 +1,71 @@ + +#include <QtGui> + + +//![0] +struct StringEvent : public QEvent +{ + StringEvent(const QString &val) + : QEvent(QEvent::Type(QEvent::User+1)), + value(val) {} + + QString value; +}; +//![0] + +//![1] +class StringTransition : public QAbstractTransition +{ +public: + StringTransition(const QString &value) + : m_value(value) {} + +protected: + virtual bool eventTest(QEvent *e) const + { + if (e->type() != QEvent::Type(QEvent::User+1)) // StringEvent + return false; + StringEvent *se = static_cast<StringEvent*>(e); + return (m_value == se->value); + } + + virtual void onTransition(QEvent *) {} + +private: + QString m_value; +}; +//![1] + +int main(int argv, char **args) +{ + QApplication app(argv, args); + +//![2] + QStateMachine machine; + QState *s1 = new QState(); + QState *s2 = new QState(); + QFinalState *done = new QFinalState(); + + StringTransition *t1 = new StringTransition("Hello"); + t1->setTargetState(s2); + s1->addTransition(t1); + StringTransition *t2 = new StringTransition("world"); + t2->setTargetState(done); + s2->addTransition(t2); + + machine.addState(s1); + machine.addState(s2); + machine.addState(done); + machine.setInitialState(s1); +//![2] + +//![3] + machine.postEvent(new StringEvent("Hello")); + machine.postEvent(new StringEvent("world")); +//![3] + + return app.exec(); +} + +#include "main4.moc" + diff --git a/doc/src/snippets/statemachine/main5.cpp b/doc/src/snippets/statemachine/main5.cpp new file mode 100644 index 0000000..90ad8c7 --- /dev/null +++ b/doc/src/snippets/statemachine/main5.cpp @@ -0,0 +1,103 @@ + +#include <QtGui> + +int main(int argv, char **args) +{ + QApplication app(argv, args); + + { +//![0] + QStateMachine machine; + machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); +//![0] + +//![1] + QState *s1 = new QState(); + s1->assignProperty(object, "fooBar", 1.0); + machine.addState(s1); + machine.setInitialState(s1); + + QState *s2 = new QState(); + machine.addState(s2); +//![1] + } + + { + +//![2] + QStateMachine machine; + machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); + + QState *s1 = new QState(); + s1->assignProperty(object, "fooBar", 1.0); + machine.addState(s1); + machine.setInitialState(s1); + + QState *s2 = new QState(s1); + s2->assignProperty(object, "fooBar", 2.0); + s1->setInitialState(s2); + + QState *s3 = new QState(s1); +//![2] + + } + + { +//![3] + QState *s1 = new QState(); + QState *s2 = new QState(); + + s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50)); + s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100)); + + s1->addTransition(button, SIGNAL(clicked()), s2); +//![3] + + } + + { +//![4] + QState *s1 = new QState(); + QState *s2 = new QState(); + + s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50)); + s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100)); + + QSignalTransition *transition = s1->addTransition(button, SIGNAL(clicked()), s2); + transition->addAnimation(new QPropertyAnimation(button, "geometry")); +//![4] + + } + + { + +//![5] + QState *s1 = new QState(); + s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50)); + + QState *s2 = new QState(); + + s1->addTransition(s1, SIGNAL(polished()), s2); +//![5] + + } + + { + +//![6] + QState *s1 = new QState(); + QState *s2 = new QState(); + + s2->assignProperty(object, "fooBar", 2.0); + s1->addTransition(s2); + + QStateMachine machine; + machine.setInitialState(s1); + machine.addDefaultAnimation(new QPropertyAnimation(object, "fooBar")); +//![6] + + } + + return app.exec(); +} + diff --git a/doc/src/snippets/stringlistmodel/model.cpp b/doc/src/snippets/stringlistmodel/model.cpp index 76329dd..49e0fc7 100644 --- a/doc/src/snippets/stringlistmodel/model.cpp +++ b/doc/src/snippets/stringlistmodel/model.cpp @@ -59,6 +59,11 @@ int StringListModel::rowCount(const QModelIndex &parent) const } //! [0] + +#ifdef 0 +// This represents a read-only version of data(), an early stage in the +// development of the example leading to an editable StringListModel. + /*! Returns an appropriate value for the requested data. If the view requests an invalid index, an invalid variant is returned. @@ -66,7 +71,7 @@ int StringListModel::rowCount(const QModelIndex &parent) const string to be returned. */ -//! [1] +//! [1-data-read-only] QVariant StringListModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) @@ -80,6 +85,31 @@ QVariant StringListModel::data(const QModelIndex &index, int role) const else return QVariant(); } +//! [1-data-read-only] +#endif + + +/*! + Returns an appropriate value for the requested data. + If the view requests an invalid index, an invalid variant is returned. + Any valid index that corresponds to a string in the list causes that + string to be returned. +*/ + +//! [1] +QVariant StringListModel::data(const QModelIndex &index, int role) const +{ + if (!index.isValid()) + return QVariant(); + + if (index.row() >= stringList.size()) + return QVariant(); + + if (role == Qt::DisplayRole || role == Qt::EditRole) + return stringList.at(index.row()); + else + return QVariant(); +} //! [1] /*! diff --git a/doc/src/snippets/widgets-tutorial/template.cpp b/doc/src/snippets/widgets-tutorial/template.cpp new file mode 100644 index 0000000..5958676 --- /dev/null +++ b/doc/src/snippets/widgets-tutorial/template.cpp @@ -0,0 +1,14 @@ +#include <QtGui> + +// Include header files for application components. +// ... + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + // Set up and show widgets. + // ... + + return app.exec(); +} diff --git a/doc/src/statemachine.qdoc b/doc/src/statemachine.qdoc new file mode 100644 index 0000000..d2b508d --- /dev/null +++ b/doc/src/statemachine.qdoc @@ -0,0 +1,536 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page statemachine-api.html + \title The State Machine Framework + \brief An overview of the State Machine framework for constructing and executing state graphs. + \ingroup architecture + + \tableofcontents + + The State Machine framework provides classes for creating and executing + state graphs. The concepts and notation are based on those from Harel's + \l{Statecharts: A visual formalism for complex systems}{Statecharts}, which + is also the basis of UML state diagrams. The semantics of state machine + execution are based on \l{State Chart XML: State Machine Notation for + Control Abstraction}{State Chart XML (SCXML)}. + + Statecharts provide a graphical way of modeling how a system reacts to + stimuli. This is done by defining the possible \e states that the system can + be in, and how the system can move from one state to another (\e transitions + between states). A key characteristic of event-driven systems (such as Qt + applications) is that behavior often depends not only on the last or current + event, but also the events that preceded it. With statecharts, this + information is easy to express. + + The State Machine framework provides an API and execution model that can be + used to effectively embed the elements and semantics of statecharts in Qt + applications. The framework integrates tightly with Qt's meta-object system; + for example, transitions between states can be triggered by signals, and + states can be configured to set properties and invoke methods on QObjects. + Qt's event system is used to drive the state machines. + + \section1 A Simple State Machine + + To demonstrate the core functionality of the State Machine API, let's look + at a small example: A state machine with three states, \c s1, \c s2 and \c + s3. The state machine is controlled by a single QPushButton; when the button + is clicked, the machine transitions to another state. Initially, the state + machine is in state \c s1. The statechart for this machine is as follows: + + \img statemachine-button.png + \omit + \caption This is a caption + \endomit + + The following snippet shows the code needed to create such a state machine. + First, we create the state machine and states: + + \snippet doc/src/snippets/statemachine/main.cpp 0 + + Then, we create the transitions by using the QState::addTransition() + function: + + \snippet doc/src/snippets/statemachine/main.cpp 1 + + Next, we add the states to the machine and set the machine's initial state: + + \snippet doc/src/snippets/statemachine/main.cpp 2 + + Finally, we start the state machine: + + \snippet doc/src/snippets/statemachine/main.cpp 3 + + The state machine executes asynchronously, i.e. it becomes part of your + application's event loop. + + \section1 Doing Useful Work on State Entry and Exit + + The above state machine merely transitions from one state to another, it + doesn't perform any operations. The QState::assignProperty() function can be + used to have a state set a property of a QObject when the state is + entered. In the following snippet, the value that should be assigned to a + QLabel's text property is specified for each state: + + \snippet doc/src/snippets/statemachine/main.cpp 4 + + When any of the states is entered, the label's text will be changed + accordingly. + + The QState::entered() signal is emitted when the state is entered, and the + QState::exited() signal is emitted when the state is exited. In the + following snippet, the button's showMaximized() slot will be called when + state \c s3 is entered, and the button's showMinimized() slot will be called + when \c s3 is exited: + + \snippet doc/src/snippets/statemachine/main.cpp 5 + + Custom states can reimplement QAbstractState::onEntry() and + QAbstractState::onExit(). + + \section1 State Machines That Finish + + The state machine defined in the previous section never finishes. In order + for a state machine to be able to finish, it needs to have a top-level \e + final state (QFinalState object). When the state machine enters a top-level + final state, the machine will emit the QStateMachine::finished() signal and + halt. + + All you need to do to introduce a final state in the graph is create a + QFinalState object and use it as the target of one or more transitions. + + \section1 Sharing Transitions By Grouping States + + Assume we wanted the user to be able to quit the application at any time by + clicking a Quit button. In order to achieve this, we need to create a final + state and make it the target of a transition associated with the Quit + button's clicked() signal. We could add a transition from each of \c s1, \c + s2 and \c s3; however, this seems redundant, and one would also have to + remember to add such a transition from every new state that is added in the + future. + + We can achieve the same behavior (namely that clicking the Quit button quits + the state machine, regardless of which state the state machine is in) by + grouping states \c s1, \c s2 and \c s3. This is done by creating a new + top-level state and making the three original states children of the new + state. The following diagram shows the new state machine. + + \img statemachine-button-nested.png + \omit + \caption This is a caption + \endomit + + The three original states have been renamed \c s11, \c s12 and \c s13 to + reflect that they are now children of the new top-level state, \c s1. Child + states implicitly inherit the transitions of their parent state. This means + it is now sufficient to add a single transition from \c s1 to the final + state \c s2. New states added to \c s1 will also automatically inherit this + transition. + + All that's needed to group states is to specify the proper parent when the + state is created. You also need to specify which of the child states is the + initial one (i.e. which child state the state machine should enter when the + parent state is the target of a transition). + + \snippet doc/src/snippets/statemachine/main2.cpp 0 + + \snippet doc/src/snippets/statemachine/main2.cpp 1 + + In this case we want the application to quit when the state machine is + finished, so the machine's finished() signal is connected to the + application's quit() slot. + + A child state can override an inherited transition. For example, the + following code adds a transition that effectively causes the Quit button to + be ignored when the state machine is in state \c s12. + + \snippet doc/src/snippets/statemachine/main2.cpp 2 + + A transition can have any state as its target, i.e. the target state does + not have to be on the same level in the state hierarchy as the source state. + + \section1 Using History States to Save and Restore the Current State + + Imagine that we wanted to add an "interrupt" mechanism to the example + discussed in the previous section; the user should be able to click a button + to have the state machine perform some non-related task, after which the + state machine should resume whatever it was doing before (i.e. return to the + old state, which is one of \c s11, \c s12 and \c s13 in this case). + + Such behavior can easily be modeled using \e{history states}. A history + state (QHistoryState object) is a pseudo-state that represents the child + state that the parent state was in the last time the parent state was + exited. + + A history state is created as a child of the state for which we wish to + record the current child state; when the state machine detects the presence + of such a state at runtime, it automatically records the current (real) + child state when the parent state is exited. A transition to the history + state is in fact a transition to the child state that the state machine had + previously saved; the state machine automatically "forwards" the transition + to the real child state. + + The following diagram shows the state machine after the interrupt mechanism + has been added. + + \img statemachine-button-history.png + \omit + \caption This is a caption + \endomit + + The following code shows how it can be implemented; in this example we + simply display a message box when \c s3 is entered, then immediately return + to the previous child state of \c s1 via the history state. + + \snippet doc/src/snippets/statemachine/main2.cpp 3 + + \section1 Using Parallel States to Avoid a Combinatorial Explosion of States + + Assume that you wanted to model a set of mutually exclusive properties of a + car in a single state machine. Let's say the properties we are interested in + are Clean vs Dirty, and Moving vs Not moving. It would take four mutually + exclusive states and eight transitions to be able to represent and freely + move between all possible combinations. + + \img statemachine-nonparallel.png + \omit + \caption This is a caption + \endomit + + If we added a third property (say, Red vs Blue), the total number of states + would double, to eight; and if we added a fourth property (say, Enclosed vs + Convertible), the total number of states would double again, to 16. + + Using parallel states, the total number of states and transitions grows + linearly as we add more properties, instead of exponentially. Furthermore, + states can be added to or removed from the parallel state without affecting + any of their sibling states. + + \img statemachine-parallel.png + \omit + \caption This is a caption + \endomit + + To create a parallel state group, pass QState::ParallelStates to the QState + constructor. + + \snippet doc/src/snippets/statemachine/main3.cpp 0 + + When a parallel state group is entered, all its child states will be + simultaneously entered. Transitions within the individual child states + operate normally. However, any of the child states may take a transition + outside the parent state. When this happens, the parent state and all of its + child states are exited. + + \section1 Detecting that a Composite State has Finished + + A child state can be final (a QFinalState object); when a final child state + is entered, the parent state emits the QState::finished() signal. The + following diagram shows a composite state \c s1 which does some processing + before entering a final state: + + \img statemachine-finished.png + \omit + \caption This is a caption + \endomit + + When \c s1 's final state is entered, \c s1 will automatically emit + finished(). We use a signal transition to cause this event to trigger a + state change: + + \snippet doc/src/snippets/statemachine/main3.cpp 1 + + Using final states in composite states is useful when you want to hide the + internal details of a composite state; i.e. the only thing the outside world + should be able to do is enter the state, and get a notification when the + state has completed its work. This is a very powerful abstraction and + encapsulation mechanism when building complex (deeply nested) state + machines. (In the above example, you could of course create a transition + directly from \c s1 's \c done state rather than relying on \c s1 's + finished() signal, but with the consequence that implementation details of + \c s1 are exposed and depended on). + + For parallel state groups, the QState::finished() signal is emitted when \e + all the child states have entered final states. + + \section1 Events, Transitions and Guards + + A QStateMachine runs its own event loop. For signal transitions + (QSignalTransition objects), QStateMachine automatically posts a + QSignalEvent to itself when it intercepts the corresponding signal; + similarly, for QObject event transitions (QEventTransition objects) a + QWrappedEvent is posted. + + You can post your own events to the state machine using + QStateMachine::postEvent(). + + When posting a custom event to the state machine, you typically also have + one or more custom transitions that can be triggered from events of that + type. To create such a transition, you subclass QAbstractTransition and + reimplement QAbstractTransition::eventTest(), where you check if an event + matches your event type (and optionally other criteria, e.g. attributes of + the event object). + + Here we define our own custom event type, \c StringEvent, for posting + strings to the state machine: + + \snippet doc/src/snippets/statemachine/main4.cpp 0 + + Next, we define a transition that only triggers when the event's string + matches a particular string (a \e guarded transition): + + \snippet doc/src/snippets/statemachine/main4.cpp 1 + + In the eventTest() reimplementation, we first check if the event type is the + desired one; if so, we cast the event to a StringEvent and perform the + string comparison. + + The following is a statechart that uses the custom event and transition: + + \img statemachine-customevents.png + \omit + \caption This is a caption + \endomit + + Here's what the implementation of the statechart looks like: + + \snippet doc/src/snippets/statemachine/main4.cpp 2 + + Once the machine is started, we can post events to it. + + \snippet doc/src/snippets/statemachine/main4.cpp 3 + + An event that is not handled by any relevant transition will be silently + consumed by the state machine. It can be useful to group states and provide + a default handling of such events; for example, as illustrated in the + following statechart: + + \img statemachine-customevents2.png + \omit + \caption This is a caption + \endomit + + For deeply nested statecharts, you can add such "fallback" transitions at + the level of granularity that's most appropriate. + + \section1 Using Restore Policy To Automatically Restore Properties + + In some state machines it can be useful to focus the attention on assigning properties in states, + not on restoring them when the state is no longer active. If you know that a property should + always be restored to its initial value when the machine enters a state that does not explicitly + give the property a value, you can set the global restore policy to + QStateMachine::RestoreProperties. + + \code + QStateMachine machine; + machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); + \endcode + + When this restore policy is set, the machine will automatically restore all properties. If it + enters a state where a given property is not set, it will first search the hierarchy of ancestors + to see if the property is defined there. If it is, the property will be restored to the value + defined by the closest ancestor. If not, it will be restored to its initial value (i.e. the + value of the property before any property assignments in states were executed.) + + Take the following code: + \code + QStateMachine machine; + machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); + + QState *s1 = new QState(); + s1->assignProperty(object, "fooBar", 1.0); + machine.addState(s1); + machine.setInitialState(s1); + + QState *s2 = new QState(); + machine.addState(s2); + \endcode + + Lets say the property \c fooBar is 0.0 when the machine starts. When the machine is in state + \c s1, the property will be 1.0, since the state explicitly assigns this value to it. When the + machine is in state \c s2, no value is explicitly defined for the property, so it will implicitly + be restored to 0.0. + + If we are using nested states, the parent defines a value for the property which is inherited by + all descendants that do not explicitly assign a value to the property. + \code + QStateMachine machine; + machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); + + QState *s1 = new QState(); + s1->assignProperty(object, "fooBar", 1.0); + machine.addState(s1); + machine.setInitialState(s1); + + QState *s2 = new QState(s1); + s2->assignProperty(object, "fooBar", 2.0); + s1->setInitialState(s2); + + QState *s3 = new QState(s1); + \endcode + + Here \c s1 has two children: \c s2 and \c s3. When \c s2 is entered, the property \c fooBar + will have the value 2.0, since this is explicitly defined for the state. When the machine is in + state \c s3, no value is defined for the state, but \c s1 defines the property to be 1.0, so this + is the value that will be assigned to \c fooBar. + + \section1 Animating Property Assignments + + The State Machine API connects with the Animation API in Qt to allow automatically animating + properties as they are assigned in states. + + Say we have the following code: + \code + QState *s1 = new QState(); + QState *s2 = new QState(); + + s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50)); + s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100)); + + s1->addTransition(button, SIGNAL(clicked()), s2); + \endcode + + Here we define two states of a user interface. In \c s1 the \c button is small, and in \c s2 + it is bigger. If we click the button to transition from \c s1 to \c s2, the geometry of the button + will be set immediately when a given state has been entered. If we want the transition to be + smooth, however, all we need to do is make a QPropertyAnimation and add this to the transition + object. + + \code + QState *s1 = new QState(); + QState *s2 = new QState(); + + s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50)); + s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100)); + + QSignalTransition *transition = s1->addTransition(button, SIGNAL(clicked()), s2); + transition->addAnimation(new QPropertyAnimation(button, "geometry")); + \endcode + + Adding an animation for the property in question means that the property assignment will no + longer take immediate effect when the state has been entered. Instead, the animation will start + playing when the state has been entered and smoothly animate the property assignment. Since we + do not set the start value or end value of the animation, these will be set implicitly. The + start value of the animation will be the property's current value when the animation starts, and + the end value will be set based on the property assignments defined for the state. + + If the global restore policy of the state machine is set to QStateMachine::RestoreProperties, + it is possible to also add animations for the property restorations. + + \section1 Detecting That All Properties Have Been Set In A State + + When animations are used to assign properties, a state no longer defines the exact values that a + property will have when the machine is in the given state. While the animation is running, the + property can potentially have any value, depending on the animation. + + In some cases, it can be useful to be able to detect when the property has actually been assigned + the value defined by a state. For this, we can use the state's polished() signal. + \code + QState *s1 = new QState(); + s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50)); + + QState *s2 = new QState(); + + s1->addTransition(s1, SIGNAL(polished()), s2); + \endcode + + The machine will be in state \c s1 until the \c geometry property has been set. Then it will + immediately transition into \c s2. If the transition into \c s1 has an animation for the \c + geometry property, then the machine will stay in \c s1 until the animation has finished. If there + is no animation, it will simply set the property and immediately enter state \c s2. + + Either way, when the machine is in state \c s2, the property \c geometry has been assigned the + defined value. + + If the global restore policy is set to QStateMachine::RestoreProperties, the state will not emit + the polished() signal until these have been executed as well. + + \section1 What happens if a state is exited before the animation has finished + + If a state has property assignments, and the transition into the state has animations for the + properties, the state can potentially be exited before the properties have been assigned to the + values defines by the state. This is true in particular when there are transitions out from the + state that do not depend on the state being polished, as described in the previous section. + + The State Machine API guarantees that a property assigned by the state machine either: + \list + \o Has a value explicitly assigned to the property. + \o Is currently being animated into a value explicitly assigned to the property. + \endlist + + When a state is exited prior to the animation finishing, the behavior of the state machine depends + on the target state of the transition. If the target state explicitly assigns a value to the + property, no additional action will be taken. The property will be assigned the value defined by + the target state. + + If the target state does not assign any value to the property, there are two + options: By default, the property will be assigned the value defined by the state it is leaving + (the value it would have been assigned if the animation had been permitted to finish playing.) If + a global restore policy is set, however, this will take precedence, and the property will be + restored as usual. + + \section1 Default Animations + + As described earlier, you can add animations to transitions to make sure property assignments + in the target state are animated. If you want a specific animation to be used for a given property + regardless of which transition is taken, you can add it as a default animation to the state + machine. This is in particular useful when the properties assigned (or restored) by specific + states is not known when the machine is constructed. + + \code + QState *s1 = new QState(); + QState *s2 = new QState(); + + s2->assignProperty(object, "fooBar", 2.0); + s1->addTransition(s2); + + QStateMachine machine; + machine.setInitialState(s1); + machine.addDefaultAnimation(new QPropertyAnimation(object, "fooBar")); + \endcode + + When the machine is in state \c s2, the machine will play the default animation for the + property \c fooBar since this property is assigned by \c s2. + + Note that animations explicitly set on transitions will take precedence over any default + animation for the given property. +*/ diff --git a/doc/src/styles.qdoc b/doc/src/styles.qdoc index b818c4a..752fef0 100644 --- a/doc/src/styles.qdoc +++ b/doc/src/styles.qdoc @@ -246,7 +246,7 @@ defined by the \l{QStyle::}{State} enum. Some of the state flags have different meanings depending on the widget, but others are common for all widgets like State_Disabled. It is QStyleOption that sets - the common states with QStyleOption::init(); the rest of the + the common states with QStyleOption::initFrom(); the rest of the states are set by the individual widgets. Most notably, the style options contain the palette and bounding @@ -502,7 +502,7 @@ \snippet doc/src/snippets/code/doc_src_styles.qdoc 0 First we let QStyleOption set up the option with the information - that is common for all widgets with \c init(). We will look at + that is common for all widgets with \c initFrom(). We will look at this shortly. The down boolean is true when the user press the box down; this is @@ -514,7 +514,7 @@ set - you set this in QStyle::polish(). In addition, the style option also contains the text, icon, and icon size of the button. - \l{QStyleOption::}{init()} sets up the style option with the + \l{QStyleOption::}{initFrom()} sets up the style option with the attributes that are common for all widgets. We print its implementation here: @@ -726,9 +726,9 @@ \section2 Common Widget Properties Some states and variables are common for all widgets. These are - set with QStyleOption::init(). Not all elements use this function; + set with QStyleOption::initFrom(). Not all elements use this function; it is the widgets that create the style options, and for some - elements the information from \l{QStyleOption::}{init()} is not + elements the information from \l{QStyleOption::}{initFrom()} is not necessary. A table with the common states follows: @@ -1451,7 +1451,7 @@ \o Set if it is a horizontal splitter \endtable - QSplitter does not use \l{QStyleOption::}{init()} to set up its + QSplitter does not use \l{QStyleOption::}{initFrom()} to set up its option; it sets the State_MouseOver and State_Disabled flags itself. @@ -1625,7 +1625,7 @@ QToolBarSaparator uses QStyleOption for their style option. It sets the State_horizontal flag if the toolbar they live in is - horizontal. Other than that, they use \l{QStyleOption::}{init()}. + horizontal. Other than that, they use \l{QStyleOption::}{initFrom()}. The style option for QToolBar is QStyleOptionToolBar. The only state flag set (besides the common flags) is State_Horizontal @@ -1757,7 +1757,7 @@ The setup of the style option for CE_MenuTearOff and CE_MenuScroller also uses QStyleOptionMenuItem; they only set the \c menuRect variable in addition to the common settings with - QStyleOption's \l{QStyleOption::}{init()}. + QStyleOption's \l{QStyleOption::}{initFrom()}. \section3 Menu Bar diff --git a/doc/src/supported-platforms.qdoc b/doc/src/supported-platforms.qdoc new file mode 100644 index 0000000..3f35e14 --- /dev/null +++ b/doc/src/supported-platforms.qdoc @@ -0,0 +1,141 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page supported-platforms.html + \title Supported Platforms + \brief The platforms supported by Nokia for Qt. + \ingroup platform-notes + + Qt Software strives to provide support for the platforms most + frequently used by Qt users. We have designed our internal testing procedure to + divide platforms into three test categories (Tier 1, Tier 2 and Tier 3) in order + to prioritize internal testing and development resources so that the most + frequently used platforms are subjected to our most rigorous testing processes. + + Qt is supported on a variety of 32-bit and 64-bit platforms, and can + usually be built on each platform with GCC, a vendor-supplied compiler, or + a third party compiler. Although Qt may be built on a range of platform-compiler + combinations, only a subset of these are actively supported by Nokia. + + \tableofcontents + + Information about the specific platforms Qt runs on can be found on the + \l{Platform Notes} page. Information about the compilers used on each platform + can be found on the \l{Compiler Notes} page. + + \section1 Tier 1 Platforms + + All Tier 1 platforms are subjected to our unit test suite and other internal + testing tools on a frequent basis (prior to new version releases, source tree + branching, and at other significant period points in the development process). + Errors or bugs discovered in these platforms are prioritized for correction + by the development team. Significant errors discovered in Tier 1 platforms can + impact release dates and Qt Development Frameworks strives to resolve all known + high priority errors in Tier 1 platforms prior to new version releases. + + \table + \header \o Platform + \o Compilers + \row \o Linux (32 and 64-bit) + \o gcc 4.2 + \row \o Microsoft Windows XP + \o gcc 3.4.2 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit) + \row \o Microsoft Windows Vista + \o MSVC 2005, 2008 + \row \o Microsoft Windows Vista 64bit + \o MSVC 2008 + \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Carbon, Cocoa 32 and 64bit) + \o As provided by Apple + \row \o Embedded Linux QWS (ARM) + \o gcc (\l{http:\\www.codesourcery.com}{Codesourcery version)} + \row \o Windows CE 5.0 (ARMv4i, x86, MIPS) + \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii) + \endtable + + \section1 Tier 2 Platforms + + Tier 2 platforms are subjected to our unit test suite and other internal testing + tools prior to release of new product versions. Qt users should note, however, + that errors may be present in released product versions for Tier 2 platforms and, + subject to resource availability, known errors in Tier 2 platforms may or may not + be corrected prior to new version releases. + + \table + \header \o Platform + \o Compilers + \row \o Apple Mac OS X 10.4 "Tiger" + \o As provided by Apple + \row \o HPUXi 11.11 + \o aCC 3.57, gcc 3.4 + \row \o HPUXi 11.23 + \o aCC 6.10 + \row \o Solaris 10 UltraSparc + \o Sun Studio 12 + \row \o AIX 6 + \o Power5 xlC 7 + \row \o Microsoft Windows XP + \o Intel Compiler + \row \o Linux + \o Intel Compiler + \row \o Embedded Linux QWS (Mips, PowerPC) + \o gcc (\l{http:\\www.codesourcery.com}{Codesourcery version)} + \row \o Windows CE 6.0 (ARMv4i, x86, MIPS) + \o MSVC 2008 WinCE 6.0 Professional + \endtable + + \section1 Tier 3 Platforms (Not supported by Nokia) + + All platforms not specifically listed above are not supported by Nokia. Nokia does + not run its unit test suite or perform any other internal tests on platforms not + listed above. Qt users should note, however, that there may be various open source + projects, community users and/or Qt partners who are able to provide assistance with + platforms not supported by Nokia. + + \section1 General Legal Disclaimer + + Please note that Qt Software’s products are offered on an "as is" basis without warranty + of any kind and that our products are not error or bug free. To the maximum extent + permitted by applicable law, Nokia on behalf of itself and its suppliers, disclaims all + warranties and conditions, either express or implied, including, but not limited to, + implied warranties of merchantability, fitness for a particular purpose, title and + non-infringement with regard to the Licensed Software. +*/ diff --git a/doc/src/tech-preview/images/mainwindow-docks-example.png b/doc/src/tech-preview/images/mainwindow-docks-example.png Binary files differdeleted file mode 100644 index a5641fd..0000000 --- a/doc/src/tech-preview/images/mainwindow-docks-example.png +++ /dev/null diff --git a/doc/src/tech-preview/images/mainwindow-docks.png b/doc/src/tech-preview/images/mainwindow-docks.png Binary files differdeleted file mode 100644 index 96dafc3..0000000 --- a/doc/src/tech-preview/images/mainwindow-docks.png +++ /dev/null diff --git a/doc/src/tech-preview/images/plaintext-layout.png b/doc/src/tech-preview/images/plaintext-layout.png Binary files differdeleted file mode 100644 index 9a0f9c1..0000000 --- a/doc/src/tech-preview/images/plaintext-layout.png +++ /dev/null diff --git a/doc/src/tech-preview/known-issues.html b/doc/src/tech-preview/known-issues.html deleted file mode 100644 index 885104e..0000000 --- a/doc/src/tech-preview/known-issues.html +++ /dev/null @@ -1,110 +0,0 @@ -<html> -<head> -<title>Known issues</title> -<link rel="stylesheet" href="http://qtsoftware.com/trollstyle.css"> -<style type="text/css"> - H2 { position: relative; top: 10px; } - H4 { margin-left: 15px; } - .issue { margin-left: 15px; } - .workaround { margin-left: 30px; margin-right: 30px; padding: 2px; border-style: solid; border-color: #AACA00; border-width: 1px; } -</style> -</head> -<body bgcolor="#ffffff"> -<table border="0" cellpadding="0" cellspacing="0" width="100%"> - <tr bgcolor="#E5E5E5"> - <td><img src="http://doc.trolltech.com/doctitle.png" width="443" height="32" border="0"></td> - <td align="right" valign="middle"></td></tr></table> -<h1>Known Issues: Qt 4.0.0 Technology Preview 1</h1> -<p> - This is the list of known and reported issues for the Qt 4.0.0 - Technology Preview 1. This list is updated daily. -</p> -<br><br> -<table width="100%"> - <tr><td align="left"><b><a href="#buildissues">Build Issues</a></b></td></tr> - <tr><td align="left"><b><a href="#general">General</a></b></td></tr> - <tr><td align="left"><b><a href="#demos">Demos</a></b></td></tr> - <tr><td align="left"><b><a href="#window">Windows specific</a></b></td></tr> - <tr><td align="left"><b><a href="#x11">X11 specific</a></b></td></tr> - <tr><td align="left"><b><a href="#mac">Mac specific</a></b></td></tr> -</table> -<br><br> -<!-- Build section ------------------------------------------------- --> -<a name="buildissues"></a> -<h2>Build Issues</h2> - <h4>Static libraries on Mac OS X</h4> - <p class="issue">Building a static build on mac will fail the first time.</p> - <p class="workaround">Run qmake a second time.</p> - - <h4>QTDIR</h4> - <p class="issue">Some applications(e.g. uic3) need QTDIR set and QTDIR/bin in the path to work.</p> - <p class="workaround">Set QTDIR and PATH as described in INSTALL.</p> - - <h4>ODBC driver on Windows</h4> - <p class="issue">Problems compiling the ODBC driver.</p> - <p class="workaround">Change the include from qapplication.h to qcoreapplication.h</p> - - <h4>QtGui does not link because of accessibility errors</h4> - <p class="issue">undefined reference to QAccessible::setRootObject(QObject*)</p> - <p class="workaround">Rerun configure and rebuild, if that does not help, add the contents of $QTDIR/.qt.config to $QTDIR/.qmake.cache</p> - - -<!-- General section ---------------------------------------------- --> -<a name="general"></a> -<h2>General</h2> - - <h4>No connection to Oracle</h4> - <p class="issue">I cannot connect to my Oracle server</p> - <p class="workaround">Use the Oracle >= 9 client libraries, currently there is no workaround for OCI 8</p> - - <h4>QSqlModel</h4> - <p class="issue">Only the first 16 rows from a database result are displayed</p> - <p class="workaround">You are using a database driver which does not report back the size of a result set and incremental fetching is not yet implemented in the itemviews. You can either use another database like MySQL or increase the QSQL_PREFETCH in qsqlmodel.cpp</p> - - -<!-- Demos section ------------------------------------------------- --> -<a name="demos"></a> -<h2>Demos</h2> - - <h4>-</h4> - - -<!-- Windows platform section -------------------------------------- --> -<a name="window"></a> -<h2>Windows specific</h2> - - <h4>Qt Assistant</h4> - <p class="issue">Problems with zooming and laying out text. Sometimes the text overlaps.</p> - - <h4>GDI handle leak</h4> - <p class="issue">Setting fonts through QPainter::setFont() leaks GDI - handles on windows. This is for instance visible in the OpenGL - part of the Arthur demo. The issue will be fixed before the next - preview.</p> - -<!-- X11 platform section ------------------------------------------ --> -<a name="x11"></a> -<h2>X11 specific</h2> - - <h4>-</h4> - - -<!-- Mac platform section ------------------------------------------ --> -<a name="mac"></a> -<h2>Mac specific</h2> - - <h4>QComboBox</h4> - <p class="issue">Does not have the native Mac look and feel yet. It is rendered in a Windows-like style.</p> - - <h4>Clicking on widgets</h4> - <p class="issue"><i>Jaguar 10.2 only:</i> Clicking on widgets that has a focusrect may fail.</p> - <p class="workaround">Use 10.3 for now.</p> - - -<!-- [Page footer] ------------------------------------------------- --> -<table width="100%"> - <tr><td><hr size="1" noshade></td></tr> - <tr><td align="center" valign="bottom"><a href="http://qtsoftware.com">qtsoftware.com</a></td></tr> -</table> -</body> -</html> diff --git a/doc/src/templates.qdoc b/doc/src/templates.qdoc index 5a8acf7..8cfb851 100644 --- a/doc/src/templates.qdoc +++ b/doc/src/templates.qdoc @@ -162,7 +162,7 @@ without having to know the exact types of the objects we are connecting. This is impossible with a template based solution. This kind of runtime introspection opens up new possibilities, for example GUIs that are - generated and connected from Qt Designer's XML \c{ui} files. + generated and connected from Qt Designer's XML UI files. \section1 Calling Performance is Not Everything diff --git a/doc/src/threads.qdoc b/doc/src/threads.qdoc index c9d0904..067de5f 100644 --- a/doc/src/threads.qdoc +++ b/doc/src/threads.qdoc @@ -262,48 +262,41 @@ \keyword thread-safe \section1 Reentrancy and Thread-Safety - Throughout the Qt documentation, the terms \e reentrant and \e - thread-safe are used to specify how a function can be used in - multithreaded applications: + Throughout the documentation, the terms \e{reentrant} and + \e{thread-safe} are used to mark classes and functions to indicate + how they can be used in multithread applications: \list - \o A \e reentrant function can be called simultaneously by - multiple threads provided that each invocation of the function - references unique data. - \o A \e thread-safe function can be called simultaneously by - multiple threads when each invocation references shared data. - All access to the shared data is serialized. + \o A \e thread-safe function can be called simultaneously from + multiple threads, even when the invocations use shared data, + because all references to the shared data are serialized. + \o A \e reentrant function can also be called simultaneously from + multiple threads, but only if each invocation uses its own data. \endlist - By extension, a class is said to be reentrant if each and every - one of its functions can be called simultaneously by multiple - threads on different instances of the class. Similarly, the class - is said to be thread-safe if the functions can be called by - different threads on the same instance. + Hence, a \e{thread-safe} function is always \e{reentrant}, but a + \e{reentrant} function is not always \e{thread-safe}. - Classes in the documentation will be documented as thread-safe only - if they are intended to be used by multiple threads. + By extension, a class is said to be \e{reentrant} if its member + functions can be called safely from multiple threads, as long as + each thread uses a \e{different} instance of the class. The class + is \e{thread-safe} if its member functions can be called safely + from multiple threads, even if all the threads use the \e{same} + instance of the class. - Note that the terminology in this domain isn't entirely - standardized. POSIX uses a somewhat different definition of - reentrancy and thread-safety for its C APIs. When dealing with an - object-oriented C++ class library such as Qt, the definitions - must be adapted. - - Most C++ classes are inherently reentrant, since they typically - only reference member data. Any thread can call such a member - function on an instance of the class, as long as no other thread - is calling a member function on the same instance. For example, - the \c Counter class below is reentrant: + C++ classes are often reentrant, simply because they only access + their own member data. Any thread can call a member function on an + instance of a reentrant class, as long as no other thread can call + a member function on the \e{same} instance of the class at the + same time. For example, the \c Counter class below is reentrant: \snippet doc/src/snippets/threads/threads.cpp 3 \snippet doc/src/snippets/threads/threads.cpp 4 The class isn't thread-safe, because if multiple threads try to modify the data member \c n, the result is undefined. This is - because C++'s \c ++ and \c -- operators aren't necessarily - atomic. Indeed, they usually expand to three machine - instructions: + because the \c ++ and \c -- operators aren't always atomic. + Indeed, they usually expand to three machine instructions: \list 1 \o Load the variable's value in a register. @@ -332,14 +325,27 @@ declared with the \c mutable qualifier because we need to lock and unlock the mutex in \c value(), which is a const function. - Most Qt classes are reentrant and not thread-safe, to avoid the - overhead of repeatedly locking and unlocking a QMutex. For - example, QString is reentrant, meaning that you can use it in - different threads, but you can't access the same QString object - from different threads simultaneously (unless you protect it with - a mutex yourself). A few classes and functions are thread-safe; - these are mainly thread-related classes such as QMutex, or - fundamental functions such as QCoreApplication::postEvent(). + Many Qt classes are \e{reentrant}, but they are not made + \e{thread-safe}, because making them thread-safe would incur the + extra overhead of repeatedly locking and unlocking a QMutex. For + example, QString is reentrant but not thread-safe. You can safely + access \e{different} instances of QString from multiple threads + simultaneously, but you can't safely access the \e{same} instance + of QString from multiple threads simultaneously (unless you + protect the accesses yourself with a QMutex). + + Some Qt classes and functions are thread-safe. These are mainly + the thread-related classes (e.g. QMutex) and fundamental functions + (e.g. QCoreApplication::postEvent()). + + \note Qt Classes are only documented as \e{thread-safe} if they + are intended to be used by multiple threads. + + \note Terminology in the multithreading domain isn't entirely + standardized. POSIX uses definitions of reentrant and thread-safe + that are somewhat different for its C APIs. When using other + object-oriented C++ class libraries with Qt, be sure the + definitions are understood. \section1 Threads and QObjects @@ -356,13 +362,12 @@ \section2 QObject Reentrancy QObject is reentrant. Most of its non-GUI subclasses, such as - QTimer, QTcpSocket, QUdpSocket, QHttp, QFtp, and QProcess, are - also reentrant, making it possible to use these classes from - multiple threads simultaneously. Note that these classes are - designed to be created and used from within a single thread; - creating an object in one thread and calling its functions from - another thread is not guaranteed to work. There are three - constraints to be aware of: + QTimer, QTcpSocket, QUdpSocket, QFtp, and QProcess, are also + reentrant, making it possible to use these classes from multiple + threads simultaneously. Note that these classes are designed to be + created and used from within a single thread; creating an object + in one thread and calling its functions from another thread is not + guaranteed to work. There are three constraints to be aware of: \list \o \e{The child of a QObject must always be created in the thread @@ -428,20 +433,22 @@ an object and its children (the object cannot be moved if it has a parent). - Calling \c delete on a QObject from another thread than the - thread where it is created (or accessing the object in other - ways) is unsafe unless you can guarantee that the object isn't - processing events at the same moment. Use QObject::deleteLater() - instead; it will post a - \l{QEvent::DeferredDelete}{DeferredDelete} event, which the - event loop of the object's thread will eventually pick up. + Calling \c delete on a QObject from a thread other than the one + that \e owns the object (or accessing the object in other ways) is + unsafe, unless you guarantee that the object isn't processing + events at that moment. Use QObject::deleteLater() instead, and a + \l{QEvent::DeferredDelete}{DeferredDelete} event will be posted, + which the event loop of the object's thread will eventually pick + up. By default, the thread that \e owns a QObject is the thread + that \e creates the QObject, but not after QObject::moveToThread() + has been called. If no event loop is running, events won't be delivered to the - object. For example, if you create a QTimer object in a thread - but never call \l{QThread::exec()}{exec()}, the QTimer will never emit its - \l{QTimer::timeout()}{timeout()} signal. Calling - \l{QObject::deleteLater()}{deleteLater()} won't work either. (These - restrictions apply to the main thread as well.) + object. For example, if you create a QTimer object in a thread but + never call \l{QThread::exec()}{exec()}, the QTimer will never emit + its \l{QTimer::timeout()}{timeout()} signal. Calling + \l{QObject::deleteLater()}{deleteLater()} won't work + either. (These restrictions apply to the main thread as well.) You can manually post events to any object in any thread at any time using the thread-safe function diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc index 7f832ab..15be0ade 100644 --- a/doc/src/topics.qdoc +++ b/doc/src/topics.qdoc @@ -150,18 +150,6 @@ These guides provide specific help about specific Qt-related topics. */ /*! -\group licensing -\title Licensing Information -\ingroup topics -\brief Information about licenses and licensing issues. - -These documents include information about Qt's licenses and the licenses -of third party components used in Qt. - -\generatelist{related} -*/ - -/*! \group platform-notes \title Platform-Specific Notes \ingroup topics diff --git a/doc/src/trolltech-webpages.qdoc b/doc/src/trolltech-webpages.qdoc index 7d48167..abbe4e0 100644 --- a/doc/src/trolltech-webpages.qdoc +++ b/doc/src/trolltech-webpages.qdoc @@ -165,11 +165,6 @@ */ /*! - \externalpage http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/ - \title Qt 4 Supported Platforms -*/ - -/*! \externalpage http://www.qtsoftware.com/products/qtopia/ \title Qt Extended */ @@ -243,3 +238,8 @@ \externalpage http://www.qtsoftware.com/developer/faqs/qt/installation \title Installation FAQ */ + +/*! + \externalpage http://qt.gitorious.org + \title Public Qt Repository +*/ diff --git a/doc/src/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc index 1481d8a..739f047 100644 --- a/doc/src/tutorials/addressbook-fr.qdoc +++ b/doc/src/tutorials/addressbook-fr.qdoc @@ -220,7 +220,7 @@ On remarque que le label \c AddressLabel est positionné en utilisant Qt::AlignTop comme argument optionnel. Ceci est destiné à assurer qu'il ne sera pas centré verticalement dans la cellule (1,0). Pour un aperçu rapide des layouts de Qt, - consultez la section \l{Layout Classes}. + consultez la section \l{Layout Management}. Afin d'installer l'objet layout dans un widget, il faut appeler la méthode \l{QWidget::setLayout()}{setLayout()} du widget en question: @@ -239,13 +239,16 @@ \snippet tutorials/addressbook/part1/main.cpp main function - On construit un nouveau widget \c AddressBook sur le tas en utilisant le mot-clé - \c new et en invoquant sa méthode \l{QWidget::show()}{show()} pour l'afficher. + On construit un nouveau widget \c AddressBook sur la pile et on invoque + sa méthode \l{QWidget::show()}{show()} pour l'afficher. Cependant, le widget ne sera pas visible tant que la boucle d'évènements n'aura pas été lancée. On démarre la boucle d'évènements en appelant la méthode \l{QApplication::}{exec()} de l'application; le résultat renvoyé par cette méthode est lui même utilisé comme valeur de retour pour la méthode \c main(). + On comprend maintenant pourquoi \c AddressBook a été créé sur la pile: à la fin + du programme, l'objet sort du scope de la fonction \c main() et tous ses widgets enfants + sont supprimés, assurant ainsi qu'il n'y aura pas de fuites de mémoire. */ /*! diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc index 7eea4ad..fd08bfe 100644 --- a/doc/src/tutorials/addressbook.qdoc +++ b/doc/src/tutorials/addressbook.qdoc @@ -222,8 +222,8 @@ Notice that \c addressLabel is positioned using Qt::AlignTop as an additional argument. This is to make sure it is not vertically centered in - cell (1,0). For a basic overview on Qt Layouts, refer to the \l{Layout Classes} - document. + cell (1,0). For a basic overview on Qt Layouts, refer to the + \l{Layout Management} documentation. In order to install the layout object onto the widget, we have to invoke the widget's \l{QWidget::setLayout()}{setLayout()} function: @@ -242,12 +242,15 @@ \snippet tutorials/addressbook/part1/main.cpp main function - We construct a new \c AddressBook widget on the heap using the \c new - keyword and invoke its \l{QWidget::show()}{show()} function to display it. + We construct a new \c AddressBook widget on the stack and invoke + its \l{QWidget::show()}{show()} function to display it. However, the widget will not be shown until the application's event loop is started. We start the event loop by calling the application's \l{QApplication::}{exec()} function; the result returned by this function - is used as the return value from the \c main() function. + is used as the return value from the \c main() function. At this point, + it becomes apparent why we instanciated \c AddressBook on the stack: It + will now go out of scope. Therefore, \c AddressBook and all its child widgets + will be deleted, thus preventing memory leaks. */ /*! @@ -694,10 +697,11 @@ \snippet tutorials/addressbook/part5/finddialog.h FindDialog header - We define a public function, \c getFindText() for use by classes that - instantiate \c FindDialog, which allows them to obtain the text - entered by the user. A public slot, \c findClicked(), is defined to - handle the search string when the user clicks the \gui Find button. + We define a public function, \c getFindText(), to be used by classes that + instantiate \c FindDialog. This function allows these classes to obtain the + search string entered by the user. A public slot, \c findClicked(), is also + defined to handle the search string when the user clicks the \gui Find + button. Lastly, we define the private variables, \c findButton, \c lineEdit and \c findText, corresponding to the \gui Find button, the line edit @@ -712,15 +716,15 @@ \snippet tutorials/addressbook/part5/finddialog.cpp constructor - We set the layout and window title, as well as connect the signals - to their respective slots. Notice that \c{findButton}'s - \l{QPushButton::clicked()}{clicked()} signal is connected to to - \c findClicked() and \l{QDialog::accept()}{accept()}. The - \l{QDialog::accept()}{accept()} slot provided by QDialog hides - the dialog and sets the result code to \l{QDialog::}{Accepted}. - We use this function to help \c{AddressBook}'s \c findContact() function - know when the \c FindDialog object has been closed. This will be - further explained when discussing the \c findContact() function. + We set the layout and window title, as well as connect the signals to their + respective slots. Notice that \c{findButton}'s \l{QPushButton::clicked()} + {clicked()} signal is connected to to \c findClicked() and + \l{QDialog::accept()}{accept()}. The \l{QDialog::accept()}{accept()} slot + provided by QDialog hides the dialog and sets the result code to + \l{QDialog::}{Accepted}. We use this function to help \c{AddressBook}'s + \c findContact() function know when the \c FindDialog object has been + closed. We will explain this logic in further detail when discussing the + \c findContact() function. \image addressbook-tutorial-part5-signals-and-slots.png @@ -814,21 +818,23 @@ \image addressbook-tutorial-part6-screenshot.png - Although browsing and searching for contacts are useful features, our address - book is not really fully ready for use until we can saving existing contacts - and load them again at a later time. - Qt provides a number of classes for \l{Input/Output and Networking}{input and output}, - but we have chosen to use two which are simple to use in combination: QFile and - QDataStream. + Although browsing and searching for contacts are useful features, our + address book is not ready for use until we can save existing contacts and + load them again at a later time. - A QFile object represents a file on disk that can be read from and written to. - QFile is a subclass of the more general QIODevice class which represents many - different kinds of devices. + Qt provides a number of classes for \l{Input/Output and Networking} + {input and output}, but we have chosen to use two which are simple to use + in combination: QFile and QDataStream. + + A QFile object represents a file on disk that can be read from and written + to. QFile is a subclass of the more general QIODevice class which + represents many different kinds of devices. + + A QDataStream object is used to serialize binary data so that it can be + stored in a QIODevice and retrieved again later. Reading from a QIODevice + and writing to it is as simple as opening the stream - with the respective + device as a parameter - and reading from or writing to it. - A QDataStream object is used to serialize binary data so that it can be stored - in a QIODevice and retrieved again later. Reading from a QIODevice and writing - to it is as simple as opening the stream - with the respective device as a - parameter - and reading from or writing to it. \section1 Defining the AddressBook Class @@ -870,7 +876,7 @@ \image addressbook-tutorial-part6-save.png - If \c fileName is not empty, we create a QFile object, \c file with + If \c fileName is not empty, we create a QFile object, \c file, with \c fileName. QFile works with QDataStream as QFile is a QIODevice. Next, we attempt to open the file in \l{QIODevice::}{WriteOnly} mode. @@ -900,18 +906,18 @@ \image addressbook-tutorial-part6-load.png If \c fileName is not empty, again, we use a QFile object, \c file, and - attempt to open it in \l{QIODevice::}{ReadOnly} mode. In a similar way - to our implementation of \c saveToFile(), if this attempt is unsuccessful, - we display a QMessageBox to inform the user. + attempt to open it in \l{QIODevice::}{ReadOnly} mode. Similar to our + implementation of \c saveToFile(), if this attempt is unsuccessful, we + display a QMessageBox to inform the user. \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2 Otherwise, we instantiate a QDataStream object, \c in, set its version as above and read the serialized data into the \c contacts data structure. - Note that we empty \c contacts before reading data into it to simplify the - file reading process. A more advanced method would be to read the contacts - into temporary QMap object, and copy only the contacts that do not already - exist in \c contacts. + The \c contacts object is emptied before data is read into it to simplify + the file reading process. A more advanced method would be to read the + contacts into a temporary QMap object, and copy over non-duplicate contacts + into \c contacts. \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3 diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc index 23a7611..8a4b3f4 100644 --- a/doc/src/tutorials/widgets-tutorial.qdoc +++ b/doc/src/tutorials/widgets-tutorial.qdoc @@ -41,11 +41,14 @@ /*! \page widgets-tutorial.html + \startpage {index.html}{Qt Reference Documentation} + \nextpage {tutorials/widgets/toplevel}{Creating a Window} \title Widgets Tutorial \ingroup tutorials - \brief This tutorial covers basic usage of widgets and layouts, showing how they are used to build GUI applications. + \brief This tutorial covers basic usage of widgets and layouts, showing how + they are used to build GUI applications. \section1 Introduction @@ -68,7 +71,60 @@ occupied by its parent. This means that, when a window is deleted, all the widgets it contains are automatically deleted. - \section1 Creating a Window + \section1 Writing a main Function + + Many of the GUI examples in Qt follow the pattern of having a \c{main.cpp} + file containing code to initialize the application, and a number of other + source and header files containing the application logic and custom GUI + components. + + A typical \c main() function, written in \c{main.cpp}, looks like this: + + \quotefile doc/src/snippets/widgets-tutorial/template.cpp + + We first construct a QApplication object which is configured using any + arguments passed in from the command line. After any widgets have been + created and shown, we call QApplication::exec() to start Qt's event loop. + Control passes to Qt until this function returns, at which point we return + the value we obtain from this function. + + In each part of this tutorial, we provide an example that is written + entirely within a \c main() function. In more sophisticated examples, the + code to set up widgets and layouts is written in other parts of the + example. For example, the GUI for a main window may be set up in the + constructor of a QMainWindow subclass. + + The \l{Qt Examples#Widgets}{Widgets examples} are a good place to look for + more complex and complete examples and applications. + + \section1 Building Examples and Tutorials + + If you obtained a binary package of Qt or compiled it yourself, the + examples described in this tutorial should already be ready to run. + However, if you may wish to modify them and recompile them, you need to + perform the following steps: + + \list 1 + \o At the command line, enter the directory containing the example you + wish to recompile. + \o Type \c qmake and press \key{Return}. If this doesn't work, make sure + that the executable is on your path, or enter its full location. + \o On Linux/Unix and Mac OS X, type \c make and press \key{Return}; + on Windows with Visual Studio, type \c nmake and press \key{Return}. + \endlist + + An executable file should have been created within the current directory. + On Windows, this file may be located within a \c debug or \c release + subdirectory. You can run this file to see the example code at work. +*/ + +/*! + \page widgets-tutorial-toplevel.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial} + \nextpage {Widgets Tutorial - Child Widgets} + \example tutorials/widgets/toplevel + \title Widgets Tutorial - Creating a Window If a widget is created without a parent, it is treated as a window, or \e{top-level widget}, when it is shown. Since it has no parent object to @@ -82,7 +138,7 @@ <table align="left" width="100%"> <tr class="qt-code"><td> \endraw - \snippet snippets/widgets-tutorial/toplevel/main.cpp create, resize and show + \snippet tutorials/widgets/toplevel/main.cpp main program \raw HTML </td><td align="right"> \endraw @@ -92,15 +148,28 @@ </table> \endraw - We can add a child widget to this window by passing \c window as the - parent to its constructor. In this case, we add a button to the window - and place it in a specific location: + To create a real GUI, we need to place widgets inside the window. To do + this, we pass a QWidget instance to a widget's constructor, as we will + demonstrate in the next part of this tutorial. +*/ + +/*! + \page widgets-tutorial-childwidget.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial - Creating a Window} + \nextpage {Widgets Tutorial - Using Layouts} + \example tutorials/widgets/childwidget + \title Widgets Tutorial - Child Widgets + + We can add a child widget to the window created in the previous example by + passing \c window as the parent to its constructor. In this case, we add a + button to the window and place it in a specific location: \raw HTML <table align="left" width="100%"> <tr class="qt-code"><td> \endraw - \snippet snippets/widgets-tutorial/childwidget/main.cpp create, position and show + \snippet tutorials/widgets/childwidget/main.cpp main program \raw HTML </td><td align="right"> \endraw @@ -112,9 +181,16 @@ The button is now a child of the window and will be deleted when the window is destroyed. Note that hiding or closing the window does not - automatically destroy it. + automatically destroy it. It will be destroyed when the example exits. +*/ - \section1 Using Layouts +/*! + \page widgets-tutorial-windowlayout.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial - Child Widgets} + \nextpage {Widgets Tutorial - Nested Layouts} + \example tutorials/widgets/windowlayout + \title Widgets Tutorial - Using Layouts Usually, child widgets are arranged inside a window using layout objects rather than by specifying positions and sizes explicitly. Here, we @@ -125,7 +201,7 @@ <table align="left" width="100%"> <tr class="qt-code"><td> \endraw - \snippet snippets/widgets-tutorial/windowlayout/main.cpp create, lay out widgets and show + \snippet tutorials/widgets/windowlayout/main.cpp main program \raw HTML </td><td align="right"> \endraw @@ -149,17 +225,31 @@ manage the label and line edit and set the layout on the window, both the widgets and the layout itself are ''reparented'' to become children of the window. +*/ + +/*! + \page widgets-tutorial-nestedlayouts.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial - Using Layouts} + \example tutorials/widgets/nestedlayouts + \title Widgets Tutorial - Nested Layouts Just as widgets can contain other widgets, layouts can be used to provide different levels of grouping for widgets. Here, we want to display a label alongside a line edit at the top of a window, above a table view showing the results of a query. + We achieve this by creating two layouts: \c{queryLayout} is a QHBoxLayout + that contains QLabel and QLineEdit widgets placed side-by-side; + \c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a + QTableView arranged vertically. + \raw HTML <table align="left" width="100%"> <tr class="qt-code"><td> \endraw - \snippet snippets/widgets-tutorial/nestedlayouts/main.cpp create, lay out widgets and show + \snippet tutorials/widgets/nestedlayouts/main.cpp first part + \snippet tutorials/widgets/nestedlayouts/main.cpp last part \raw HTML </td><td align="right"> \endraw @@ -169,6 +259,26 @@ </table> \endraw + Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()} + function to insert the \c{queryLayout} above the \c{resultView} table. + + We have omitted the code that sets up the model containing the data shown + by the QTableView widget, \c resultView. For completeness, we show this below. + As well as QHBoxLayout and QVBoxLayout, Qt also provides QGridLayout and QFormLayout classes to help with more complex user interfaces. + These can be seen if you run \l{Qt Designer}. + + \section1 Setting up the Model + + In the code above, we did not show where the table's data came from + because we wanted to concentrate on the use of layouts. Here, we see + that the model holds a number of items corresponding to rows, each of + which is set up to contain data for two columns. + + \snippet tutorials/widgets/nestedlayouts/main.cpp set up the model + + The use of models and views is covered in the + \l{Qt Examples#Item Views}{item view examples} and in the + \l{Model/View Programming} overview. */ |