/*!
    \page qt4-intro.html
    \title What's New in Qt 4

    \startpage index.html Qt Reference Documentation
    \nextpage The Tulip Container Classes

    This document covers the most important differences between Qt 3
    and Qt 4. Although it is not intended to be a comprehensive
    porting guide, it tells you about the most important portability
    issues that you may encounter. It also explains how to turn on Qt
    3 compatibility support.

    \tableofcontents

    \section1 New Technologies in Qt 4

    Qt 4 introduces the following core technologies:

    \list
    \o \l{The Tulip Container Classes}{Tulip}, a new set of template container classes.

    \o \l{The Interview Framework}{Interview}, a model/view architecture for item views.

    \o \l{The Arthur Paint System}{Arthur}, the Qt 4 painting framework.

    \o \l{The Scribe Classes}{Scribe}, the Unicode text renderer with a public API
    for performing low-level text layout.

    \o \l{The Qt 4 Main Window Classes}{Mainwindow}, a modern action-based
    mainwindow, toolbar, menu, and docking architecture.

    \o The new \l{The New Qt Designer}{\QD} user interface design tool.
    \endlist

    \section1 Recent Additions to Qt 4

    The following features have been added to Qt since the first release of Qt 4:

    In Qt 4.2:
    \list
    \o The \l{Graphics View} framework for producing interactive graphics.
    \o \l{Desktop Integration}{Desktop integration} facilities for applications.
    \o \l{Qt Style Sheets} enable easy, yet powerful customization of
    user interfaces.
    \o Support for the \l{intro-to-dbus.html}{D-Bus} Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism.
    \o An \l{Undo Framework}{Undo framework} based on the
    \l{Books about GUI Design#Design Patterns}{Command pattern}.
    \o Support for model-based \l{QCompleter}{text completion} in standard and
    custom widgets.
    \o New widgets and GUI features, such as QCalendarWidget and
    QGLFramebufferObject.
    \o Classes to provide higher level application infrastructure, such as
    QFileSystemWatcher and QDataWidgetMapper.
    \endlist

    In Qt 4.1:
    \list
    \o Integrated support for rendering
    \l{The Arthur Paint System#SVG Rendering Support}{Scalable Vector Graphics}
    (SVG) drawings and animations.
    \o Support for
       \l{QWidget#Transparency and Double Buffering}{child widget transparency}
       on all platforms.
    \o A Portable Document Format (PDF) backend for Qt's printing system.
    \o A \l{QTestLib Manual}{unit testing framework} for Qt applications and
       libraries.
    \o Modules for \l{QtDesigner}{extending \QD} and
       \l{QtUiTools}{dynamic user interface building}.
    \o New \l{Proxy Models}{proxy models} to enable view-specific sorting and
       filtering of data displayed using item views.
    \o Support for \l{Installing Qt/Mac}{universal binaries} on Mac OS X.
    \o Additional features for developers using \l{QtOpenGL}{OpenGL}, such as
    support for pixel and sample buffers.
    \o A flexible \l{QSyntaxHighlighter}{syntax highlighting class} based on the
       \l{Scribe} rich text framework.
    \o Support for \l{QNetworkProxy}{network proxy} servers using the SOCKS5
       protocol.
    \o Support for OLE verbs and MIME data handling in \l{ActiveQt}.
    \endlist

    For more information about improvements in the current release, see
    the \l{http://www.trolltech.com/developer/notes/changes/changes-4.1.4/}
    {detailed list of changes}.

    \section1 Significant Improvements

    The following modules have been significantly improved for Qt 4:

    \list
    \o A fully cross-platform \l{accessibility}
    module, with support for the emerging SP-API Unix standard in
    addition to Microsoft and Mac Accessibility.
    \o The \l{qt4-sql.html}{SQL module}, which is now based on the
    Interview model/view framework.
    \o The \l{qt4-network.html}{network module}, with better support
    for UDP and synchronous sockets.
    \o The \l{qt4-styles.html}{style API}, which is now decoupled from
    the widgets, meaning that you can draw any user interface element on
    any device (widget, pixmap, etc.).
    \o Enhanced \l{qt4-threads.html}{thread support}, with signal-slot
    connections across threads and per-thread event loops.
    \o A new \l{resource system} for embedding images
    and other resource files into the application executable.
    \endlist

    \section1 Build System

    Unlike previous Qt releases, Qt 4 is a collection of smaller
    libraries:

    \table
    \header \o Library          \o Description
    \row    \o \l{QtCore}       \o Core non-GUI functionality
    \row    \o \l{QtGui}        \o Core GUI functionality
    \row    \o \l{QtNetwork}    \o Network module
    \row    \o \l{QtOpenGL}     \o OpenGL module
    \row    \o \l{QtSql}        \o SQL module
    \row    \o \l{QtSvg}        \o SVG rendering classes
    \row    \o \l{QtXml}        \o XML module
    \row    \o \l{Qt3Support}   \o Qt 3 support classes
    \row    \o \l{QAxContainer} \o ActiveQt client extension
    \row    \o \l{QAxServer}    \o ActiveQt server extension
    \row    \o \l{QtAssistant}  \o Classes for launching Qt Assistant
    \row    \o \l{QtDesigner}   \o Classes for extending and embedding Qt Designer
    \row    \o \l{QtUiTools}       \o Classes for dynamic GUI generation
    \row    \o \l{QtTest}       \o Tool classes for unit testing
    \endtable

    QtCore contains tool classes like QString, QList, and QFile, as
    well as kernel classes like QObject and QTimer. The QApplication
    class has been refactored so that it can be used in non-GUI
    applications. It is split into QCoreApplication (in \l QtCore)
    and QApplication (in \l QtGui).

    This split makes it possible to develop server applications using Qt
    without linking in any unnecessary GUI-related code and without
    requiring GUI-related system libraries to be present on the target
    machine (e.g. Xlib on X11, Carbon on Mac OS X).

    If you use qmake to generate your makefiles, qmake will by default
    link your application against QtCore and QtGui. To remove the
    dependency upon QtGui, add the line

    \code
        QT -= gui
    \endcode

    to your .pro file. To enable the other libraries, add the line

    \code
        QT += network opengl sql qt3support
    \endcode

    Another change to the build system is that moc now understands
    preprocessor directives. qmake automatically passes the defines set
    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
    the .pro file:

    \code
        CONFIG += uic3
    \endcode

    \section1 Include Syntax

    The syntax for including Qt class definitions has become

    \code
        #include <QClassName>
    \endcode

    For example:

    \code
        #include <QString>
        #include <QApplication>
        #include <QSqlTableModel>
    \endcode

    This is guaranteed to work for any public Qt class. The old syntax,

    \code
        #include <qclassname.h>
    \endcode

    still works, but we encourage you to switch to the new syntax.

    If you attempt to include a header file from a library that isn't
    linked against the application, this will result in a
    compile-time warning (e.g., "QSqlQuery: No such file or
    directory"). You can remedy to this problem either by removing
    the offending include or by specifying the missing library in the
    QT entry of your \c .pro file (see \l{Build System} above).

    To include the definitions for all the classes in a library, simply
    specify the name of that library. For example:

    \code
        #include <QtCore>
    \endcode

    \section1 Namespaces

    Qt 2 introduced a class called Qt for global-like constants
    (e.g., \c{Qt::yellow}). The C++ namespace construct was not used
    because not all compilers understood it when it was released.

    With Qt 4, the Qt class has become the Qt namespace. If you want
    to access a constant that is part of the Qt namespace, prefix it
    with \c Qt:: (e.g., \c{Qt::yellow}), or add the directive

    \code
        using namespace Qt;
    \endcode

    at the top of your source files, after your \c #include
    directives. If you use the \c{using namespace} syntax you don't
    need the prefix (e.g., \c yellow is sufficient).

    When porting Qt 3 applications, you may run into some source
    compatibility problems with some of these symbols. For example,
    in Qt 3, it was legal to write \c QWidget::yellow instead of \c
    Qt::yellow, because QWidget inherited from Qt. This won't work in
    Qt 4; you must write \c Qt::yellow or add the "using namespace"
    directive and drop the \c Qt:: prefix.

    The \l{qt3to4 - The Qt 3 to 4 Porting Tool}{qt3to4} porting tool
    automates this conversion.

    \section1 QObject/QWidget Constructors

    In Qt 4 we have tried to simplify the constructors of QObject/QWidget
    subclasses. This makes subclassing easier, at the same time as it
    helps make the Qt library more efficient.

    Constructors no longer take a "const char *name" parameter. If
    you want to specify a name for a QObject, you must call
    QObject::setObjectName() after construction. The object name is
    now a QString. The reasons for this change are:

    \list
    \o  Code that used it looked confusing, for example:

        \code
        QLabel *label1 = new QLabel("Hello", this);
        QLabel *label2 = new QLabel(this, "Hello");
        \endcode

        \c label1 is a QLabel that displays the text "Hello"; \c
        label2 is a QLabel with no text, with the object name
        "Hello".

    \o  From surveys we did, most users didn't use the name, although
        they blindly followed Qt's convention and provided a "const
        char *name" in their subclasses's constructors. For example:

        \code
        MyWidget::MyWidget(QWidget *parent, const char *name)
            : QWidget(parent, name)
        {
            ...
        }
        \endcode

    \o  The name parameter was in Qt since version 1, and it always
        was documented as: "It is not very useful in the current
        version of Qt, but it will become increasingly important in
        the future." Ten years later, it still hasn't fulfilled its
        promise.
    \endlist

    QWidget's \c WFlags data type has been split in two:
    Qt::WindowFlags specifies low-level window flags (the type of
    window and the frame style), whereas Qt::WidgetAttribute
    specifies various higher-level attributes about the widget (e.g.,
    WA_StaticContents). Widget attributes can be set at any time
    using QWidget::setAttribute(); low-level window flags can be
    passed to the QWidget constructor or set later using
    QWidget::setParent(). As a consequence, the constructors of most
    QWidget subclasses don't need to provide a \c WFlags parameter.

    The \e parent parameter of all QObject classes in Qt defaults to
    a 0 pointer, as it used to do in Qt 1. This enables a style of
    programming where widgets are created without parents and then
    inserted in a layout, at which point the layout automatically
    reparents them.

    \section1 Dynamic Casts

    Qt 4 provides a qobject_cast<>() function that performs a dynamic cast
    based on the meta-information generated by moc for QObject
    subclasses. Unlike the standard C++ dynamic_cast<>() construct,
    qobject_cast<>() works even when RTTI is disabled, and it works correctly
    across DLL boundaries.

    Here's the Qt 3 idiom to cast a type to a subtype:

    \code
        // DEPRECATED
        if (obj->inherits("QPushButton")) {
            QPushButton *pushButton = (QPushButton *)obj;
            ...
        }
    \endcode

    The Qt 4 idiom is both cleaner and safer, because typos will always
    result in compiler errors:

    \code
        QPushButton *pushButton = qobject_cast<QPushButton *>(obj);
        if (pushButton) {
            ...
        }
    \endcode

    \section1 QPointer<T>

    The QPointer<T> class provides a pointer to type T (where T inherits
    from QObject) that is automatically set to 0 when the referenced
    object is destroyed. Guarded pointers are useful whenever you want to
    store a pointer to an object you do not own.

    Example:

    \code
        QLabel *label = new QLabel;
        QPointer<QLabel> safeLabel = label;
        safeLabel->setText("Hello world!");
        delete label;
        // safeLabel is now 0, whereas label is a dangling pointer
    \endcode

    QPointer<T> is more or less the same as the old QGuardedPtr<T> class,
    except that it is now implemented in a much more lightweight manner
    than before. The cost of one QPointer<T> object is now approximately
    the same as that of a signal--slot connection.

    \section1 Paint Events

    Qt 4 supports double buffering transparently on all platforms. This
    feature can be turned off on a per-widget basis by calling
    QWidget::setAttribute(Qt::WA_PaintOnScreen).

    A consequence of this is that all painting must now be done from the
    paintEvent() function. This is also required by the HIView API on Mac
    OS X. In practice, this is seldom a problem, since you can call
    update() from anywhere in your code to create a paint event, with the
    region to update as the argument.

    To help porting, QWidget supports a Qt::WA_PaintOutsidePaintEvent
    attribute that can be set to make it possible to paint outside
    \l{QWidget::paintEvent()}{paintEvent()} on Windows and X11.

    \section1 Qt 3 Support Layer

    Qt 4 provides an extension library that applications based on Qt 3,
    called Qt3Support, that Qt applications can link against. This allows
    for more compatibility than ever before, without bloating Qt.

    \list
    \o  Classes that have been replaced by a different class with the
        same name, such as QListView, and classes that no longer exist in Qt 4
        are available with a \c 3 in their name (e.g., Q3ListView, Q3Accel).

    \o  Other classes provide compatibility functions. Most of these are
        implemented inline, so that they don't bloat the Qt libraries.
    \endlist

    To enable the Qt 3 support classes and functions, add the line

    \code
        QT += qt3support
    \endcode

    to your \c .pro file.

    On Visual C++ 7 and GCC 3.2+, using compatibility functions often results
    in a compiler warning (e.g., "'find' is deprecated"). If you want to turn
    off that warning, add the line

    \code
        DEFINES += QT3_SUPPORT
    \endcode

    to your \c .pro file.

    If you want to use compatibility functions but don't want to link
    against the Qt3Support library, add the line

    \code
        DEFINES += QT3_SUPPORT_WARNINGS
    \endcode

    or

    \code
        DEFINES += QT3_SUPPORT
    \endcode

    to your \c .pro file, depending on whether you want compatibility
    function calls to generate compiler warnings or not.
*/

/*!
  \page qt4-3-intro.html
  \title What's New in Qt 4.3

  Qt 4.3 provides many improvements and enhancements over the previous releases
  in the Qt 4 series. This documents covers the most important features in this
  release, separated by category.

  A comprehensive list of changes between Qt 4.2 and Qt 4.3 is included
  in the \c changes-4.3.0 file
  \l{http://www.trolltech.com/developer/notes/changes/changes-4.3.0}{available
  online}. Changes between this release and the previous release are provided
  in the \c{changes-4.3.3} file (also
  \l{http://www.trolltech.com/developer/notes/changes/changes-4.3.3}{available online}).

  A list of other Qt 4 features can be found on the
  \bold{\l{What's New in Qt 4}} page.

  \bold{Highlights}

  \tableofcontents

  \section1 Main Window Styles

  The \l{Main Window and Related Classes}{main window classes} now
  provide support for different main window paradigms, such as
  those found in Visual Studio or KDevelop.

  Dock widgets occupying the same area can now be arranged in horizontal,
  vertical or collapsible tabs. Collapsible tabs are oriented according to
  the location of dock widgets around the main window's central area.

  \raw HTML
  <table align="center" width="80%">
  <tr><td>
  \endraw
  \inlineimage mainwindow-vertical-tabs.png
  \raw HTML
  </td><td>
  \endraw
  \inlineimage mainwindow-custom-dock.png
  \raw HTML
  </td></tr>
  </table>
  \endraw

  API improvements to QDockWidget enable dock widgets to be given custom
  title bars and window styles, and also include support for vertical title
  bars.

  \image mainwindow-vertical-dock.png

  Additionally, support for animations has been extended to tool bars,
  resulting in more sophisticated effects when tool bars and dock widgets
  are rearranged. See the \l{Main Window} demonstration for an extensive
  tour of these new features.

  \section1 QtScript - Application Scripting with ECMAScript

  This release introduces the \l{QtScript}{QtScript module}, providing a
  script engine for the ECMAScript language, based on the \l{ECMA-262}
  standard, that is designed to enable easier integration of scripting
  facilities into end-user applications.

  \image qtscript-context2d.png

  Scripts access application functionality via QObjects that are
  specifically created and exposed by each application. Information
  about the available child objects, properties, signals and slots is
  provided by Qt's \l{Qt Object Model}{object model}. This means that,
  in many cases, script-enabling an application requires little effort
  on the part of the developer.

  \image qtscript-calculator.png

  A set of examples are included to show how classes and functions written
  in C++ can be exposed to the script engine, including
  \l{QtScript Calculator Example}{a port} of the
  \l{Calculator Example}{Calculator example} which shows how a
  QtScript can be used with a user interface created with \QD.

  \section1 Improved Graphics Support

  To improve graphics performance on Windows, this release includes an
  experimental Direct3D paint engine to provide native hardware
  acceleration on Windows systems with suitable graphics hardware.
  Although we have conducted internal testing with a selection of
  graphics cards, we cannot guarantee that this feature will work
  correctly with all hardware or drivers. Please report feedback on
  this feature via the \l{Task Tracker}.

  Qt's interoperability with the Scalable Vector Graphics (SVG) file
  format has been improved by the introduction of the QSvgGenerator class,
  a paint device that can be used to save Qt rendering operations in
  the form of an SVG drawing.
  This class can be used alongside the existing QSvgWidget and QSvgRenderer
  classes to provide full input/output support for vector graphics.

  The OpenGL paint engine has been heavily improved to take advantage of
  new features in modern graphics hardware. Through the extensive usage of
  fragment programs, users with suitable graphics hardware can expect to
  experience much
  faster and higher quality rendering when OpenGL is used.
  Support for an additional anti-aliasing mode for OpenGL allows developers
  to choose between high quality rendering or speed when older or
  less-capable hardware is used.

  The QTransform class adds support for arbitrary matrix operations on
  two-dimensional coordinates, allowing perspective transformations to
  be applied to 2D graphics.

  Support for set operations on paths has been added to QPainterPath,
  improving support for clipping and animations.

  An object bounding mode for gradients that enables them to be defined
  in terms of the bounding rectangle of the objects they are applied to.

  \section1 New Widgets and Desktop Integration Enhancements

  Applications running on Windows Vista automatically support animations
  and other Vista-related enhancements through the use of the new
  QWindowsVistaStyle class, providing a widget style that gives Qt
  applications a native look and feel on Windows Vista.

  Qt 4.3 also provides a number of new and redesigned widgets, including
  the QWizard class which supports application wizard functionality
  in a variety of native styles, including one for Windows Vista
  applications.

  \table
  \row \o \inlineimage qtwizard-modern1.png
       \o \inlineimage qtwizard-mac2.png
       \o \inlineimage qtwizard-aero2.png
  \endtable

  Unified toolbar support on Mac OS X improves the look and feel of
  applications by blending adjacent toolbars and window title bars
  together.

  \image macintosh-unified-toolbar.png

  Qt's range of model/view classes has been expanded to include the
  QColumnView class, an animated list view similar to that found on
  small-screen devices.

  The QMdiArea class provides an Multiple Document Interface (MDI)
  widget that is intended to provide a more consistent API for developers
  to use and more predictable behavior for users.
  The API has been designed to be very similar to that provided by
  QWorkspace in order to make porting between the two widgets a
  straightforward task.

  \image plastique-filedialog.png

  On X11, QFileDialog has been optimized to perform better with directories
  containing large numbers of files, automatically updates when files are
  added or removed, and has a brand new look and feel.

  A platform-independent way to notify users about activity in a window
  is provided by the QApplication::alert() function. This alerts the user
  by using the appropriate notification mechanism for their chosen platform
  and environment.

  QWidget now provides a \l{QWidget::}{locale} property that can be used
  to give individual windows, dialogs and widgets different look and feel
  different languages and regions.

  Almost all standard widgets can be styled with \l{Qt Style Sheets},
  making it easier to customize the appearance of applications.

  An enhanced layout system accommodates many special cases for
  Mac OS X, enabling Mac OS X style to provide a faithful Mac look and
  feel.

  \section1 Qt Designer Improvements

  \QD has seen a number of improvements since Qt 4.2, many of
  which are focused on making the application easier to use. Other
  improvements track other additions and new features in Qt, such as new
  widgets and support for application scripting.

  Support for
  \l{Qt Designer's Widget Editing Mode#The Property Editor}{dynamic properties}
  enables standard Qt widgets and user-created forms to be customized with
  extra information from within \QD.

  \image designer-adding-dynamic-property.png

  The property editor has been updated to support the new margin and spacing
  properties added to Qt as part of improvements to the layout system.

  Selection handling has been improved to allow properties to be changed
  when more than one widget has been selected.

  Drag and drop support has been extended to allow widgets to be dragged to
  the object inspector. Additionally, images can be dragged from the resource
  editor to the action editor and to image/icon properties in the property
  editor.

  A new preferences dialog introduces the ability to set tool window fonts
  (added at the request of Japanese customers).

  Improved selection behaviour in the signal slot editor by introducing
  transparent connection labels and ensuring that widgets are selected
  in preference to connection labels.

  \omit
  Integration with the QtScript module enables the widget construction process
  to be extended using QtScript, making it possible for designers to produce
  appearance and style-related customizations to forms. Developers can also
  take advantage of this feature to set up widgets for use in \QD and
  other situations.
  \endomit

  Improved handling of promoted widgets makes it easier and more convenient
  to work with placeholders for custom widgets; promotion candidates are now
  displayed in the form's context menu. Multiple widgets in a selection can
  now be promoted at the same time.

  Custom widget plugin support has been extended to provide error reporting
  for cases where plugins fail to load. Additionally, \QD is now able
  to scan for newly installed custom widget plugins.

  \QD's configuration options have been extended to allow the default
  form editor grid setting to be set, enabling the grid setting to be specified
  on a per-form basis.

  Enabled multi-line plain and rich text editing for labels.

  \section1 Extended and Improved Infrastructure

  The QtNetwork module has been extended to include
  support for Secure Socket Layer (SSL) communications via the QSslSocket
  class. As a result, QHttp is now able to provide support for the HTTPS
  protocol.

  Qt's network proxying facilties have been extended to cover HTTP CONNECT
  proxying, and also include support for Cram-MD5 and NTLM authentication.

  \l{Qt Linguist} has been extended to provide support for XML Localization
  Interchange File Format (XLIFF) files, improving interoperability with
  third party tools and services that support this format.

  The QtXml module has been expanded with classes to provide
  a streaming API for handling XML: QXmlStreamReader and
  QXmlStreamWriter complement Qt's existing range of SAX and DOM-based
  classes.

  Support for the MSYS environment for MinGW on Windows.

  Qt's threading has been enhanced to include support for timed try-locks
  in QMutex, QReadWriteLock and QSemaphore. Additionally, a
  \l{Qt::}{BlockingQueuedConnection} connection type has been introduced
  to complement \l{Qt::}{DirectConnection} and \l{Qt::}{QueuedConnection}.

  QThread has been updated to provide an \l{QThread::}{idealThreadCount()}
  function. This takes various system-specific factors into account to
  determine the optimal number of threads that can be run on a given
  system.

  The event system \l{QCoreApplication::postEvent()}{has been extended}
  to allow events to be posted with specific priorities, enabling
  applications to prioritize certain types of event depending on the
  activities they are performing.

  QDir has been enhanced with the \l{QDir::}{addSearchPath()} function to
  provide
  an extensible mechanism, allowing search paths to be added at run time
  to \l{The Qt Resource System}{Qt's resource system}.

  The new QDirIterator class provides a convenient and less resource-intensive
  way to traverse large directory structures.

  \omit
  Support for Unicode 5.
  \endomit

  \section1 Qtopia Core

  As in Qt 4.2, many improvements to Qt's graphics support and rendering
  performance are specific to Qtopia Core. These include general speed
  optimizations, accelerated graphics API improvements, and additional
  support for OpenGL ES.

  A new font subsystem has been implemented that allows glyphs rendered at
  run time to be shared between applications. A new pre-rendered font format
  (QPF2) has also been implemented together with a new \c makeqpf tool to
  generate them.

  In addition, support for custom font engine plugins has been added through
  the QAbstractFontEngine and QFontEnginePlugin classes.
*/
