Changeset 561 for trunk/demos


Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
5 deleted
213 edited
259 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/affine/affine.pro

    r2 r561  
    1919INSTALLS += target sources
    2020
     21symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     22
    2123wince*: {
    2224    DEPLOYMENT_PLUGIN += qjpeg
  • trunk/demos/affine/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5555
    5656    QList<QWidget *> widgets = qFindChildren<QWidget *>(&xformWidget);
    57     foreach (QWidget *w, widgets)
     57    foreach (QWidget *w, widgets) {
    5858        w->setStyle(arthurStyle);
     59        w->setAttribute(Qt::WA_AcceptTouchEvents);
     60    }
    5961
    6062    xformWidget.show();
  • trunk/demos/affine/xform.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6969    ctrlPoints << QPointF(250, 250) << QPointF(350, 250);
    7070    pts->setPoints(ctrlPoints);
    71     connect(pts, SIGNAL(pointsChanged(const QPolygonF&)),
    72             this, SLOT(updateCtrlPoints(const QPolygonF &)));
     71    connect(pts, SIGNAL(pointsChanged(QPolygonF)),
     72            this, SLOT(updateCtrlPoints(QPolygonF)));
    7373    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    7474}
     
    896896    view->reset();
    897897    vectorType->setChecked(true);
    898     textEditor->setText("Qt Software");
     898    textEditor->setText("Qt Affine Transformation Demo");
    899899    textEditor->setEnabled(false);
    900900
  • trunk/demos/affine/xform.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/arthurplugin/arthurplugin.pro

    r490 r561  
    4646INSTALLS += target sources
    4747
     48symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     49
    4850win32-msvc* {
    4951        QMAKE_CFLAGS += /Zm500
  • trunk/demos/arthurplugin/plugin.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5656QT_FORWARD_DECLARE_CLASS(QDesignerFormEditorInterface)
    5757
    58 static inline QString customWidgetDomXml(const QString &className)
     58// Specify "text" to be a singleline property (no richtext)
     59static inline QString textSingleLinePropertyDeclaration(const QString &className)
     60{
     61    QString rc = QLatin1String(
     62            "<customwidgets>\n"
     63            "  <customwidget>\n"
     64            "    <class>");
     65    rc += className;
     66    rc += QLatin1String("</class>\n"
     67            "    <propertyspecifications>\n"
     68            "      <stringpropertyspecification name=\"text\" type=\"singleline\"/>\n"
     69            "    </propertyspecifications>\n"
     70            "  </customwidget>\n"
     71            "</customwidgets>\n");
     72    return rc;
     73}
     74
     75// Plain XML for a custom widget
     76static inline QString customWidgetDomXml(const QString &className,
     77                                         const QString &customSection = QString())
    5978{
    6079    QString rc = QLatin1String("<ui language=\"c++\"><widget class=\"");
     
    6483    objectName[0] = objectName.at(0).toLower();
    6584    rc += objectName;
    66     rc += QLatin1String("\"/></ui>");
     85    rc += QLatin1String("\"/>");
     86    rc += customSection;
     87    rc += QLatin1String("</ui>");
    6788    return rc;
    6889}
     
    81102
    82103protected:
    83     DemoPlugin(const QString &className);
     104    explicit DemoPlugin(const QString &className, const QString &customSection = QString());
    84105
    85106public:
     
    106127};
    107128
    108 DemoPlugin::DemoPlugin(const QString &className) :
     129DemoPlugin::DemoPlugin(const QString &className, const QString &customSection) :
    109130    m_className(className),
    110     m_domXml(customWidgetDomXml(className)),
     131    m_domXml(customWidgetDomXml(className, customSection)),
    111132    m_initialized(false)
    112133{
     
    118139
    119140public:
    120     DeformPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("PathDeformRendererEx")) { }
    121     QString includeFile() const { return "deform.h"; }
     141    explicit DeformPlugin(QObject *parent = 0);
     142    QString includeFile() const { return QLatin1String("deform.h"); }
    122143
    123144    QWidget *createWidget(QWidget *parent)
     
    127148        deform->setAnimated(false);
    128149        deform->setFontSize(20);
    129         deform->setText("Arthur Widgets Demo");
     150        deform->setText(QLatin1String("Arthur Widgets Demo"));
    130151
    131152        return deform;
     
    133154};
    134155
     156DeformPlugin::DeformPlugin(QObject *parent) :
     157    QObject(parent),
     158    DemoPlugin(QLatin1String("PathDeformRendererEx"),
     159               textSingleLinePropertyDeclaration(QLatin1String("PathDeformRendererEx")))
     160{
     161}
     162
    135163class XFormRendererEx : public XFormView
    136164{
     
    145173    Q_OBJECT
    146174public:
    147     XFormPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("XFormRendererEx")) { }
    148     QString includeFile() const { return "xform.h"; }
     175    explicit XFormPlugin(QObject *parent = 0);
     176    QString includeFile() const { return QLatin1String("xform.h"); }
    149177
    150178    QWidget *createWidget(QWidget *parent)
    151179    {
    152180        XFormRendererEx *xform = new XFormRendererEx(parent);
    153         xform->setText("Qt - Hello World!!");
    154         xform->setPixmap(QPixmap(":/trolltech/arthurplugin/bg1.jpg"));
     181        xform->setText(QLatin1String("Qt - Hello World!!"));
     182        xform->setPixmap(QPixmap(QLatin1String(":/trolltech/arthurplugin/bg1.jpg")));
    155183        return xform;
    156184    }
    157185};
    158186
     187XFormPlugin::XFormPlugin(QObject *parent) :
     188    QObject(parent),
     189    DemoPlugin(QLatin1String("XFormRendererEx"),
     190               textSingleLinePropertyDeclaration(QLatin1String("XFormRendererEx")))
     191{
     192}
    159193
    160194class GradientEditorPlugin : public QObject, public DemoPlugin
     
    162196    Q_OBJECT
    163197public:
    164     GradientEditorPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientEditor")) { }
     198    explicit GradientEditorPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientEditor")) { }
    165199    QString includeFile() const { return "gradients.h"; }
    166200
     
    185219public:
    186220    GradientRendererPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientRendererEx")) { }
    187     QString includeFile() const { return "gradients.h"; }
     221    QString includeFile() const { return QLatin1String("gradients.h"); }
    188222
    189223    QWidget *createWidget(QWidget *parent)
     
    199233    Q_OBJECT
    200234public:
    201     PathStrokeRendererEx(QWidget *p) : PathStrokeRenderer(p) { }
     235    explicit PathStrokeRendererEx(QWidget *p) : PathStrokeRenderer(p) { }
    202236    QSize sizeHint() const { return QSize(300, 200); }
    203237};
     
    207241    Q_OBJECT
    208242public:
    209     StrokeRenderPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("PathStrokeRendererEx")) { }
    210     QString includeFile() const { return "pathstroke.h"; }
     243    explicit StrokeRenderPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("PathStrokeRendererEx")) { }
     244    QString includeFile() const { return QLatin1String("pathstroke.h"); }
    211245
    212246    QWidget *createWidget(QWidget *parent)
     
    222256    Q_OBJECT
    223257public:
    224     CompositionModePlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("CompositionRenderer")) { }
    225     QString includeFile() const { return "composition.h"; }
     258    explicit CompositionModePlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("CompositionRenderer")) { }
     259    QString includeFile() const { return QLatin1String("composition.h"); }
    226260
    227261    QWidget *createWidget(QWidget *parent)
     
    240274
    241275public:
    242     ArthurPlugins(QObject *parent = 0);
     276    explicit ArthurPlugins(QObject *parent = 0);
    243277    QList<QDesignerCustomWidgetInterface*> customWidgets() const { return m_plugins; }
    244278
  • trunk/demos/books/bookdelegate.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/books/bookdelegate.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/books/books.pro

    r2 r561  
    1414INSTALLS += target sources
    1515
     16symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     17
    1618wince*: {
    1719    CONFIG(debug, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
  • trunk/demos/books/bookwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/books/bookwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/books/initdb.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/books/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/basic.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/basic.vsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/boxes.pro

    r2 r561  
    1212           glbuffers.h \
    1313           glextensions.h \
    14            glshaders.h \
    1514           gltrianglemesh.h \
    1615           qtbox.h \
    1716           roundedbox.h \
    1817           scene.h \
    19            trackball.h \
    20            vector.h
     18           trackball.h
    2119SOURCES += 3rdparty/fbm.c \
    2220           glbuffers.cpp \
    2321           glextensions.cpp \
    24            glshaders.cpp \
    2522           main.cpp \
    2623           qtbox.cpp \
     
    4643
    4744win32-msvc* {
    48     QMAKE_CXXFLAGS += /Zm1200
    49     QMAKE_CFLAGS += /Zm1200
     45    QMAKE_CXXFLAGS -= -Zm200
     46    QMAKE_CFLAGS -= -Zm200
     47    QMAKE_CXXFLAGS += -Zm500
     48    QMAKE_CFLAGS += -Zm500
    5049}
  • trunk/demos/boxes/dotted.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/fresnel.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/glass.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/glbuffers.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4141
    4242#include "glbuffers.h"
     43#include <QtGui/qmatrix4x4.h>
    4344
    4445//============================================================================//
     
    347348}
    348349
    349 void GLRenderTargetCube::getViewMatrix(gfx::Matrix4x4f& mat, int face)
     350void GLRenderTargetCube::getViewMatrix(QMatrix4x4& mat, int face)
    350351{
    351352    if (face < 0 || face >= 6) {
     
    372373    };
    373374
    374     memset(mat.bits(), 0, sizeof(float) * 16);
     375    mat.fill(0.0f);
    375376    for (int i = 0; i < 3; ++i)
    376         mat(perm[face][i], i) = signs[face][i];
     377        mat(i, perm[face][i]) = signs[face][i];
    377378    mat(3, 3) = 1.0f;
    378379}
    379380
    380 void GLRenderTargetCube::getProjectionMatrix(gfx::Matrix4x4f& mat, float nearZ, float farZ)
    381 {
    382     float proj[] = {
    383         1.0f, 0.0f, 0.0f, 0.0f,
    384         0.0f, 1.0f, 0.0f, 0.0f,
    385         0.0f, 0.0f, (nearZ+farZ)/(nearZ-farZ), -1.0f,
    386         0.0f, 0.0f, 2.0f*nearZ*farZ/(nearZ-farZ), 0.0f,
    387     };
    388 
    389     memcpy(mat.bits(), proj, sizeof(float) * 16);
    390 }
     381void GLRenderTargetCube::getProjectionMatrix(QMatrix4x4& mat, float nearZ, float farZ)
     382{
     383    static const QMatrix4x4 reference(
     384            1.0f, 0.0f, 0.0f, 0.0f,
     385            0.0f, 1.0f, 0.0f, 0.0f,
     386            0.0f, 0.0f, 0.0f, 0.0f,
     387            0.0f, 0.0f, -1.0f, 0.0f);
     388
     389    mat = reference;
     390    mat(2, 2) = (nearZ+farZ)/(nearZ-farZ);
     391    mat(2, 3) = 2.0f*nearZ*farZ/(nearZ-farZ);
     392}
  • trunk/demos/boxes/glbuffers.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4848#include <QtGui>
    4949#include <QtOpenGL>
    50 
    51 #include "vector.h"
    5250
    5351#define BUFFER_OFFSET(i) ((char*)0 + (i))
     
    6058    returnStatement;                                                                        \
    6159}
     60
     61QT_BEGIN_NAMESPACE
     62class QMatrix4x4;
     63QT_END_NAMESPACE
    6264
    6365class GLTexture
     
    136138    virtual bool failed() {return m_failed || m_fbo.failed();}
    137139
    138     static void getViewMatrix(gfx::Matrix4x4f& mat, int face);
    139     static void getProjectionMatrix(gfx::Matrix4x4f& mat, float nearZ, float farZ);
     140    static void getViewMatrix(QMatrix4x4& mat, int face);
     141    static void getProjectionMatrix(QMatrix4x4& mat, float nearZ, float farZ);
    140142private:
    141143    GLFrameBufferObject m_fbo;
  • trunk/demos/boxes/glextensions.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4747{
    4848        bool ok = true;
    49 
    50         RESOLVE_GL_FUNC(CreateShaderObjectARB)
    51         RESOLVE_GL_FUNC(ShaderSourceARB)
    52         RESOLVE_GL_FUNC(CompileShaderARB)
    53         RESOLVE_GL_FUNC(GetObjectParameterivARB)
    54         RESOLVE_GL_FUNC(DeleteObjectARB)
    55         RESOLVE_GL_FUNC(GetInfoLogARB)
    56         RESOLVE_GL_FUNC(CreateProgramObjectARB)
    57         RESOLVE_GL_FUNC(AttachObjectARB)
    58         RESOLVE_GL_FUNC(DetachObjectARB)
    59         RESOLVE_GL_FUNC(LinkProgramARB)
    60         RESOLVE_GL_FUNC(UseProgramObjectARB)
    61         RESOLVE_GL_FUNC(GetUniformLocationARB)
    62         RESOLVE_GL_FUNC(Uniform1iARB)
    63         RESOLVE_GL_FUNC(Uniform1fARB)
    64         RESOLVE_GL_FUNC(Uniform4fARB)
    65         RESOLVE_GL_FUNC(UniformMatrix4fvARB)
    6649
    6750        RESOLVE_GL_FUNC(GenFramebuffersEXT)
     
    8770
    8871        return ok;
    89 }
    90 
    91 bool GLExtensionFunctions::glslSupported() {
    92     return CreateShaderObjectARB
    93             && CreateShaderObjectARB
    94             && ShaderSourceARB
    95             && CompileShaderARB
    96             && GetObjectParameterivARB
    97             && DeleteObjectARB
    98             && GetInfoLogARB
    99             && CreateProgramObjectARB
    100             && AttachObjectARB
    101             && DetachObjectARB
    102             && LinkProgramARB
    103             && UseProgramObjectARB
    104             && GetUniformLocationARB
    105             && Uniform1iARB
    106             && Uniform1fARB
    107             && Uniform4fARB
    108             && UniformMatrix4fvARB;
    10972}
    11073
  • trunk/demos/boxes/glextensions.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4747/*
    4848Functions resolved:
    49 
    50 glCreateShaderObjectARB
    51 glShaderSourceARB
    52 glCompileShaderARB
    53 glGetObjectParameterivARB
    54 glDeleteObjectARB
    55 glGetInfoLogARB
    56 glCreateProgramObjectARB
    57 glAttachObjectARB
    58 glDetachObjectARB
    59 glLinkProgramARB
    60 glUseProgramObjectARB
    61 glGetUniformLocationARB
    62 glUniform1iARB
    63 glUniform1fARB
    64 glUniform4fARB
    65 glUniformMatrix4fvARB
    6649
    6750glGenFramebuffersEXT
     
    121104#endif
    122105
     106#ifndef GL_ARB_vertex_buffer_object
     107typedef ptrdiff_t GLsizeiptrARB;
     108#endif
     109
    123110#ifndef GL_VERSION_1_5
    124 typedef ptrdiff_t GLsizeiptr;
    125111#define GL_ARRAY_BUFFER 0x8892
    126112#define GL_ELEMENT_ARRAY_BUFFER 0x8893
     
    136122#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
    137123#endif
    138 
    139 #ifndef GL_ARB_vertex_shader
    140 #define GL_VERTEX_SHADER_ARB 0x8B31
    141 #endif
    142 
    143 #ifndef GL_ARB_fragment_shader
    144 #define GL_FRAGMENT_SHADER_ARB 0x8B30
    145 #endif
    146 
    147 #ifndef GL_ARB_shader_objects
    148 typedef char GLcharARB;
    149 typedef unsigned int GLhandleARB;
    150 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
    151 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82
    152 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
    153 #endif
    154 
    155 typedef GLhandleARB (APIENTRY *_glCreateShaderObjectARB) (GLenum);
    156 typedef void (APIENTRY *_glShaderSourceARB) (GLhandleARB, GLuint, const GLcharARB**, GLint *);
    157 typedef void (APIENTRY *_glCompileShaderARB) (GLhandleARB);
    158 typedef void (APIENTRY *_glGetObjectParameterivARB) (GLhandleARB, GLenum, int *);
    159 typedef void (APIENTRY *_glDeleteObjectARB) (GLhandleARB);
    160 typedef void (APIENTRY *_glGetInfoLogARB) (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
    161 typedef GLhandleARB (APIENTRY *_glCreateProgramObjectARB) ();
    162 typedef void (APIENTRY *_glAttachObjectARB) (GLhandleARB, GLhandleARB);
    163 typedef void (APIENTRY *_glDetachObjectARB) (GLhandleARB, GLhandleARB);
    164 typedef void (APIENTRY *_glLinkProgramARB) (GLhandleARB);
    165 typedef void (APIENTRY *_glUseProgramObjectARB) (GLhandleARB);
    166 typedef GLint (APIENTRY *_glGetUniformLocationARB) (GLhandleARB, const GLcharARB *);
    167 typedef void (APIENTRY *_glUniform1iARB) (GLint, GLint);
    168 typedef void (APIENTRY *_glUniform1fARB) (GLint, GLfloat);
    169 typedef void (APIENTRY *_glUniform4fARB) (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
    170 typedef void (APIENTRY *_glUniformMatrix4fvARB) (GLint, GLuint, GLboolean, const GLfloat *);
    171124
    172125typedef void (APIENTRY *_glGenFramebuffersEXT) (GLsizei, GLuint *);
     
    186139typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *);
    187140typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint);
    188 typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptr, const GLvoid *, GLenum);
     141typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
    189142typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *);
    190143typedef void *(APIENTRY *_glMapBuffer) (GLenum, GLenum);
     
    195148        bool resolve(const QGLContext *context);
    196149
    197     bool glslSupported();
    198150    bool fboSupported();
    199151    bool openGL15Supported(); // the rest: multi-texture, 3D-texture, vertex buffer objects
    200 
    201         _glCreateShaderObjectARB CreateShaderObjectARB;
    202         _glShaderSourceARB ShaderSourceARB;
    203         _glCompileShaderARB CompileShaderARB;
    204         _glGetObjectParameterivARB GetObjectParameterivARB;
    205         _glDeleteObjectARB DeleteObjectARB;
    206         _glGetInfoLogARB GetInfoLogARB;
    207         _glCreateProgramObjectARB CreateProgramObjectARB;
    208         _glAttachObjectARB AttachObjectARB;
    209         _glDetachObjectARB DetachObjectARB;
    210         _glLinkProgramARB LinkProgramARB;
    211         _glUseProgramObjectARB UseProgramObjectARB;
    212         _glGetUniformLocationARB GetUniformLocationARB;
    213         _glUniform1iARB Uniform1iARB;
    214         _glUniform1fARB Uniform1fARB;
    215         _glUniform4fARB Uniform4fARB;
    216         _glUniformMatrix4fvARB UniformMatrix4fvARB;
    217152
    218153        _glGenFramebuffersEXT GenFramebuffersEXT;
     
    244179}
    245180
    246 #define glCreateShaderObjectARB getGLExtensionFunctions().CreateShaderObjectARB
    247 #define glShaderSourceARB getGLExtensionFunctions().ShaderSourceARB
    248 #define glCompileShaderARB getGLExtensionFunctions().CompileShaderARB
    249 #define glGetObjectParameterivARB getGLExtensionFunctions().GetObjectParameterivARB
    250 #define glDeleteObjectARB getGLExtensionFunctions().DeleteObjectARB
    251 #define glGetInfoLogARB getGLExtensionFunctions().GetInfoLogARB
    252 #define glCreateProgramObjectARB getGLExtensionFunctions().CreateProgramObjectARB
    253 #define glAttachObjectARB getGLExtensionFunctions().AttachObjectARB
    254 #define glDetachObjectARB getGLExtensionFunctions().DetachObjectARB
    255 #define glLinkProgramARB getGLExtensionFunctions().LinkProgramARB
    256 #define glUseProgramObjectARB getGLExtensionFunctions().UseProgramObjectARB
    257 #define glGetUniformLocationARB getGLExtensionFunctions().GetUniformLocationARB
    258 #define glUniform1iARB getGLExtensionFunctions().Uniform1iARB
    259 #define glUniform1fARB getGLExtensionFunctions().Uniform1fARB
    260 #define glUniform4fARB getGLExtensionFunctions().Uniform4fARB
    261 #define glUniformMatrix4fvARB getGLExtensionFunctions().UniformMatrix4fvARB
    262 
    263181#define glGenFramebuffersEXT getGLExtensionFunctions().GenFramebuffersEXT
    264182#define glGenRenderbuffersEXT getGLExtensionFunctions().GenRenderbuffersEXT
  • trunk/demos/boxes/gltrianglemesh.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/granite.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6969{
    7070    int subStringLength = strlen(subString);
    71     return (strncmp(extensionString, subString, subStringLength) == 0) 
     71    return (strncmp(extensionString, subString, subStringLength) == 0)
    7272        && ((extensionString[subStringLength] == ' ') || (extensionString[subStringLength] == '\0'));
    7373}
     
    138138        "work poorly or not at all on your system.");
    139139
     140    widget->makeCurrent(); // The current context must be set before calling Scene's constructor
     141    Scene scene(1024, 768, maxTextureSize);
    140142    GraphicsView view;
    141143    view.setViewport(widget);
    142144    view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
    143     widget->makeCurrent(); // The current context must be set before calling Scene's constructor
    144     view.setScene(new Scene(1024, 768, maxTextureSize));
     145    view.setScene(&scene);
    145146    view.show();
    146147
  • trunk/demos/boxes/marble.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/qtbox.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    123123
    124124    foreach (QGraphicsItem *item, selected) {
    125         ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
     125        ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
    126126        if (itemBase)
    127127            scene->addItem(itemBase->createNew(itemBase->m_size, itemBase->pos().x() + itemBase->m_size, itemBase->pos().y()));
     
    138138
    139139    foreach (QGraphicsItem *item, selected) {
    140         ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
     140        ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
    141141        if (itemBase)
    142142            delete itemBase;
     
    153153
    154154    foreach (QGraphicsItem *item, selected) {
    155         ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
     155        ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
    156156        if (itemBase) {
    157157            itemBase->prepareGeometryChange();
     
    172172
    173173    foreach (QGraphicsItem *item, selected) {
    174         ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
     174        ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
    175175        if (itemBase) {
    176176            itemBase->prepareGeometryChange();
     
    258258}
    259259
     260int ItemBase::type() const
     261{
     262    return Type;
     263}
     264
     265
    260266bool ItemBase::isInResizeArea(const QPointF &pos)
    261267{
     
    270276{
    271277    for (int i = 0; i < 8; ++i) {
    272         m_vertices[i][0] = (i & 1 ? 0.5f : -0.5f);
    273         m_vertices[i][1] = (i & 2 ? 0.5f : -0.5f);
    274         m_vertices[i][2] = (i & 4 ? 0.5f : -0.5f);
     278        m_vertices[i].setX(i & 1 ? 0.5f : -0.5f);
     279        m_vertices[i].setY(i & 2 ? 0.5f : -0.5f);
     280        m_vertices[i].setZ(i & 4 ? 0.5f : -0.5f);
    275281    }
    276282    for (int i = 0; i < 4; ++i) {
    277         m_texCoords[i][0] = (i & 1 ? 1.0f : 0.0f);
    278         m_texCoords[i][1] = (i & 2 ? 1.0f : 0.0f);
    279     }
    280     memset(m_normals, 0, sizeof(m_normals));
    281     for (int i = 0; i < 3; ++i) {
    282         m_normals[2 * i + 0][i] = -1.0f;
    283         m_normals[2 * i + 1][i] = 1.0f;
    284     }
     283        m_texCoords[i].setX(i & 1 ? 1.0f : 0.0f);
     284        m_texCoords[i].setY(i & 2 ? 1.0f : 0.0f);
     285    }
     286    m_normals[0] = QVector3D(-1.0f, 0.0f, 0.0f);
     287    m_normals[1] = QVector3D(1.0f, 0.0f, 0.0f);
     288    m_normals[2] = QVector3D(0.0f, -1.0f, 0.0f);
     289    m_normals[3] = QVector3D(0.0f, 1.0f, 0.0f);
     290    m_normals[4] = QVector3D(0.0f, 0.0f, -1.0f);
     291    m_normals[5] = QVector3D(0.0f, 0.0f, 1.0f);
    285292}
    286293
     
    313320    };
    314321
     322    painter->beginNativePainting();
     323
    315324    glMatrixMode(GL_PROJECTION);
    316325    glPushMatrix();
     
    352361
    353362        glBegin(GL_TRIANGLE_STRIP);
    354         glNormal3fv(m_normals[2 * dir + 0].bits());
     363        glNormal3fv(reinterpret_cast<float *>(&m_normals[2 * dir + 0]));
    355364        for (int i = 0; i < 2; ++i) {
    356365            for (int j = 0; j < 2; ++j) {
    357                 glTexCoord2fv(m_texCoords[(j << 1) | i].bits());
    358                 glVertex3fv(m_vertices[(i << ((dir + 2) % 3)) | (j << ((dir + 1) % 3))].bits());
     366                glTexCoord2fv(reinterpret_cast<float *>(&m_texCoords[(j << 1) | i]));
     367                glVertex3fv(reinterpret_cast<float *>(&m_vertices[(i << ((dir + 2) % 3)) | (j << ((dir + 1) % 3))]));
    359368            }
    360369        }
     
    362371
    363372        glBegin(GL_TRIANGLE_STRIP);
    364         glNormal3fv(m_normals[2 * dir + 1].bits());
     373        glNormal3fv(reinterpret_cast<float *>(&m_normals[2 * dir + 1]));
    365374        for (int i = 0; i < 2; ++i) {
    366375            for (int j = 0; j < 2; ++j) {
    367                 glTexCoord2fv(m_texCoords[(j << 1) | i].bits());
    368                 glVertex3fv(m_vertices[(1 << dir) | (i << ((dir + 1) % 3)) | (j << ((dir + 2) % 3))].bits());
     376                glTexCoord2fv(reinterpret_cast<float *>(&m_texCoords[(j << 1) | i]));
     377                glVertex3fv(reinterpret_cast<float *>(&m_vertices[(1 << dir) | (i << ((dir + 1) % 3)) | (j << ((dir + 2) % 3))]));
    369378            }
    370379        }
     
    385394    glMatrixMode(GL_PROJECTION);
    386395    glPopMatrix();
     396
     397    painter->endNativePainting();
    387398
    388399    ItemBase::paint(painter, option, widget);
  • trunk/demos/boxes/qtbox.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4545#include <QtGui>
    4646
    47 #include "vector.h"
     47#include <QtGui/qvector3d.h>
    4848#include "glbuffers.h"
    4949
    50 class ItemBase : public QObject, public QGraphicsItem
     50class ItemBase : public QGraphicsItem
    5151{
    52     Q_OBJECT
    5352public:
     53    enum { Type = UserType + 1 };
     54
    5455    ItemBase(int size, int x, int y);
    5556    virtual ~ItemBase();
     
    6566    virtual void keyPressEvent(QKeyEvent *event);
    6667    virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
     68    virtual int type() const;
    6769    bool isInResizeArea(const QPointF &pos);
    6870
     
    8688    virtual ItemBase *createNew(int size, int x, int y);
    8789private:
    88     gfx::Vector3f m_vertices[8];
    89     gfx::Vector2f m_texCoords[4];
    90     gfx::Vector3f m_normals[6];
     90    QVector3D m_vertices[8];
     91    QVector3D m_texCoords[4];
     92    QVector3D m_normals[6];
    9193    GLTexture *m_texture;
    9294};
  • trunk/demos/boxes/reflection.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/refraction.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/boxes/roundedbox.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4747
    4848VertexDescription P3T2N3Vertex::description[] = {
    49     {VertexDescription::Position, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, position) / sizeof(float), offsetof(P3T2N3Vertex, position), 0},
    50     {VertexDescription::TexCoord, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, texCoord) / sizeof(float), offsetof(P3T2N3Vertex, texCoord), 0},
    51     {VertexDescription::Normal, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, normal) / sizeof(float), offsetof(P3T2N3Vertex, normal), 0},
     49    {VertexDescription::Position, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, position) / sizeof(float), 0, 0},
     50    {VertexDescription::TexCoord, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, texCoord) / sizeof(float), sizeof(QVector3D), 0},
     51    {VertexDescription::Normal, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, normal) / sizeof(float), sizeof(QVector3D) + sizeof(QVector2D), 0},
     52
    5253    {VertexDescription::Null, 0, 0, 0, 0},
    5354};
     
    7980
    8081    for (int corner = 0; corner < 8; ++corner) {
    81         gfx::Vector3f centre;
    82         centre[0] = (corner & 1 ? 1.0f : -1.0f);
    83         centre[1] = (corner & 2 ? 1.0f : -1.0f);
    84         centre[2] = (corner & 4 ? 1.0f : -1.0f);
     82        QVector3D centre(corner & 1 ? 1.0f : -1.0f,
     83                corner & 2 ? 1.0f : -1.0f,
     84                corner & 4 ? 1.0f : -1.0f);
    8585        int winding = (corner & 1) ^ ((corner >> 1) & 1) ^ (corner >> 2);
    8686        int offsX = ((corner ^ 1) - corner) * vertexCountPerCorner;
     
    130130
    131131            for (int j = 0; j <= i; ++j) {
    132                 gfx::Vector3f normal = gfx::Vector3f::vector(i - j, j, n + 1 - i).normalized();
    133                 gfx::Vector3f pos = centre * (0.5f - r + r * normal);
     132                QVector3D normal = QVector3D(i - j, j, n + 1 - i).normalized();
     133                QVector3D offset(0.5f - r, 0.5f - r, 0.5f - r);
     134                QVector3D pos = centre * (offset + r * normal);
    134135
    135136                vp[vidx].position = scale * pos;
    136137                vp[vidx].normal = centre * normal;
    137                 vp[vidx].texCoord = gfx::Vector2f::vector(pos[0], pos[1]) + 0.5f;
     138                vp[vidx].texCoord = QVector2D(pos.x() + 0.5f, pos.y() + 0.5f);
    138139
    139140                // Corner polygons
  • trunk/demos/boxes/roundedbox.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5050
    5151#include "gltrianglemesh.h"
    52 #include "vector.h"
     52#include <QtGui/qvector3d.h>
     53#include <QtGui/qvector2d.h>
    5354#include "glbuffers.h"
    5455
    5556struct P3T2N3Vertex
    5657{
    57     gfx::Vector3f position;
    58     gfx::Vector2f texCoord;
    59     gfx::Vector3f normal;
     58    QVector3D position;
     59    QVector2D texCoord;
     60    QVector3D normal;
    6061    static VertexDescription description[];
    6162};
  • trunk/demos/boxes/scene.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    4141
     42#include <QDebug>
    4243#include "scene.h"
     44#include <QtGui/qmatrix4x4.h>
     45#include <QtGui/qvector3d.h>
    4346
    4447#include "3rdparty/fbm.h"
     
    343346                        m_parameterEdits << colorEdit;
    344347                        layout->addWidget(colorEdit);
    345                         connect(colorEdit, SIGNAL(colorChanged(QRgb, int)), this, SLOT(setColorParameter(QRgb, int)));
     348                        connect(colorEdit, SIGNAL(colorChanged(QRgb,int)), this, SLOT(setColorParameter(QRgb,int)));
    346349                        ++row;
    347350                    } else if (type == "float") {
     
    351354                        m_parameterEdits << floatEdit;
    352355                        layout->addWidget(floatEdit);
    353                         connect(floatEdit, SIGNAL(valueChanged(float, int)), this, SLOT(setFloatParameter(float, int)));
     356                        connect(floatEdit, SIGNAL(valueChanged(float,int)), this, SLOT(setFloatParameter(float,int)));
    354357                        ++row;
    355358                    }
     
    485488    setSceneRect(0, 0, width, height);
    486489
    487     m_trackBalls[0] = TrackBall(0.0005f, gfx::Vector3f::vector(0, 1, 0), TrackBall::Sphere);
    488     m_trackBalls[1] = TrackBall(0.0001f, gfx::Vector3f::vector(0, 0, 1), TrackBall::Sphere);
    489     m_trackBalls[2] = TrackBall(0.0f, gfx::Vector3f::vector(0, 1, 0), TrackBall::Plane);
     490    m_trackBalls[0] = TrackBall(0.05f, QVector3D(0, 1, 0), TrackBall::Sphere);
     491    m_trackBalls[1] = TrackBall(0.005f, QVector3D(0, 0, 1), TrackBall::Sphere);
     492    m_trackBalls[2] = TrackBall(0.0f, QVector3D(0, 1, 0), TrackBall::Plane);
    490493
    491494    m_renderOptions = new RenderOptionsDialog;
     
    494497
    495498    connect(m_renderOptions, SIGNAL(dynamicCubemapToggled(int)), this, SLOT(toggleDynamicCubemap(int)));
    496     connect(m_renderOptions, SIGNAL(colorParameterChanged(const QString &, QRgb)), this, SLOT(setColorParameter(const QString &, QRgb)));
    497     connect(m_renderOptions, SIGNAL(floatParameterChanged(const QString &, float)), this, SLOT(setFloatParameter(const QString &, float)));
     499    connect(m_renderOptions, SIGNAL(colorParameterChanged(QString,QRgb)), this, SLOT(setColorParameter(QString,QRgb)));
     500    connect(m_renderOptions, SIGNAL(floatParameterChanged(QString,float)), this, SLOT(setFloatParameter(QString,float)));
    498501    connect(m_renderOptions, SIGNAL(textureChanged(int)), this, SLOT(setTexture(int)));
    499502    connect(m_renderOptions, SIGNAL(shaderChanged(int)), this, SLOT(setShader(int)));
     
    532535    if (m_mainCubemap)
    533536        delete m_mainCubemap;
    534     foreach (GLProgram *program, m_programs)
     537    foreach (QGLShaderProgram *program, m_programs)
    535538        if (program) delete program;
    536539    if (m_vertexShader)
    537540        delete m_vertexShader;
    538     foreach (GLFragmentShader *shader, m_fragmentShaders)
     541    foreach (QGLShader *shader, m_fragmentShaders)
    539542        if (shader) delete shader;
    540543    foreach (GLRenderTargetCube *rt, m_cubemaps)
     
    550553    m_box = new GLRoundedBox(0.25f, 1.0f, 10);
    551554
    552     m_vertexShader = new GLVertexShader(":/res/boxes/basic.vsh");
     555    m_vertexShader = new QGLShader(QGLShader::Vertex);
     556    m_vertexShader->compileSourceFile(QLatin1String(":/res/boxes/basic.vsh"));
    553557
    554558    QStringList list;
     
    556560         << ":/res/boxes/cubemap_negy.jpg" << ":/res/boxes/cubemap_posz.jpg" << ":/res/boxes/cubemap_negz.jpg";
    557561    m_environment = new GLTextureCube(list, qMin(1024, m_maxTextureSize));
    558     m_environmentShader = new GLFragmentShader(environmentShaderText, strlen(environmentShaderText));
    559     m_environmentProgram = new GLProgram;
    560     m_environmentProgram->attach(*m_vertexShader);
    561     m_environmentProgram->attach(*m_environmentShader);
     562    m_environmentShader = new QGLShader(QGLShader::Fragment);
     563    m_environmentShader->compileSourceCode(environmentShaderText);
     564    m_environmentProgram = new QGLShaderProgram;
     565    m_environmentProgram->addShader(m_vertexShader);
     566    m_environmentProgram->addShader(m_environmentShader);
     567    m_environmentProgram->link();
    562568
    563569    const int NOISE_SIZE = 128; // for a different size, B and BM in fbm.c must also be changed
     
    611617    files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
    612618    foreach (QFileInfo file, files) {
    613         GLProgram *program = new GLProgram;
    614         GLFragmentShader* shader = new GLFragmentShader(file.absoluteFilePath());
     619        QGLShaderProgram *program = new QGLShaderProgram;
     620        QGLShader* shader = new QGLShader(QGLShader::Fragment);
     621        shader->compileSourceFile(file.absoluteFilePath());
    615622        // The program does not take ownership over the shaders, so store them in a vector so they can be deleted afterwards.
    616         program->attach(*m_vertexShader);
    617         program->attach(*shader);
    618         if (program->failed()) {
     623        program->addShader(m_vertexShader);
     624        program->addShader(shader);
     625        if (!program->link()) {
    619626            qWarning("Failed to compile and link shader program");
    620627            qWarning("Vertex shader log:");
     
    635642
    636643        program->bind();
    637         m_cubemaps << (program->hasParameter("env") ? new GLRenderTargetCube(qMin(256, m_maxTextureSize)) : 0);
    638         program->unbind();
     644        m_cubemaps << ((program->uniformLocation("env") != -1) ? new GLRenderTargetCube(qMin(256, m_maxTextureSize)) : 0);
     645        program->release();
    639646    }
    640647
    641648    if (m_programs.size() == 0)
    642         m_programs << new GLProgram;
     649        m_programs << new QGLShaderProgram;
    643650
    644651    m_renderOptions->emitParameterChanged();
     652}
     653
     654static void loadMatrix(const QMatrix4x4& m)
     655{
     656    GLfloat mat[16];
     657    const qreal *data = m.constData();
     658    for (int index = 0; index < 16; ++index)
     659        mat[index] = data[index];
     660    glLoadMatrixf(mat);
     661}
     662
     663static void multMatrix(const QMatrix4x4& m)
     664{
     665    GLfloat mat[16];
     666    const qreal *data = m.constData();
     667    for (int index = 0; index < 16; ++index)
     668        mat[index] = data[index];
     669    glMultMatrixf(mat);
    645670}
    646671
    647672// If one of the boxes should not be rendered, set excludeBox to its index.
    648673// If the main box should not be rendered, set excludeBox to -1.
    649 void Scene::renderBoxes(const gfx::Matrix4x4f &view, int excludeBox)
    650 {
    651     gfx::Matrix4x4f invView = view.inverse();
     674void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
     675{
     676    QMatrix4x4 invView = view.inverted();
    652677
    653678    // If multi-texturing is supported, use three saplers.
     
    665690    glDisable(GL_CULL_FACE);
    666691
    667     gfx::Matrix4x4f viewRotation(view);
     692    QMatrix4x4 viewRotation(view);
    668693    viewRotation(3, 0) = viewRotation(3, 1) = viewRotation(3, 2) = 0.0f;
    669694    viewRotation(0, 3) = viewRotation(1, 3) = viewRotation(2, 3) = 0.0f;
    670695    viewRotation(3, 3) = 1.0f;
    671     glLoadMatrixf(viewRotation.bits());
     696    loadMatrix(viewRotation);
    672697    glScalef(20.0f, 20.0f, 20.0f);
    673698
     
    676701        m_environment->bind();
    677702        m_environmentProgram->bind();
    678         m_environmentProgram->setInt("tex", 0);
    679         m_environmentProgram->setInt("env", 1);
    680         m_environmentProgram->setInt("noise", 2);
     703        m_environmentProgram->setUniformValue("tex", GLint(0));
     704        m_environmentProgram->setUniformValue("env", GLint(1));
     705        m_environmentProgram->setUniformValue("noise", GLint(2));
    681706        m_box->draw();
    682         m_environmentProgram->unbind();
     707        m_environmentProgram->release();
    683708        m_environment->unbind();
    684709    }
    685710
    686     glLoadMatrixf(view.bits());
     711    loadMatrix(view);
    687712
    688713    glEnable(GL_CULL_FACE);
     
    694719
    695720        glPushMatrix();
    696         gfx::Matrix4x4f m;
    697         m_trackBalls[1].rotation().matrix(m);
    698         glMultMatrixf(m.bits());
     721        QMatrix4x4 m;
     722        m.rotate(m_trackBalls[1].rotation());
     723        multMatrix(m);
    699724
    700725        glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f);
     
    709734        }
    710735        m_programs[i]->bind();
    711         m_programs[i]->setInt("tex", 0);
    712         m_programs[i]->setInt("env", 1);
    713         m_programs[i]->setInt("noise", 2);
    714         m_programs[i]->setMatrix("view", view);
    715         m_programs[i]->setMatrix("invView", invView);
     736        m_programs[i]->setUniformValue("tex", GLint(0));
     737        m_programs[i]->setUniformValue("env", GLint(1));
     738        m_programs[i]->setUniformValue("noise", GLint(2));
     739        m_programs[i]->setUniformValue("view", view);
     740        m_programs[i]->setUniformValue("invView", invView);
    716741        m_box->draw();
    717         m_programs[i]->unbind();
     742        m_programs[i]->release();
    718743
    719744        if (glActiveTexture) {
     
    727752
    728753    if (-1 != excludeBox) {
    729         gfx::Matrix4x4f m;
    730         m_trackBalls[0].rotation().matrix(m);
    731         glMultMatrixf(m.bits());
     754        QMatrix4x4 m;
     755        m.rotate(m_trackBalls[0].rotation());
     756        multMatrix(m);
    732757
    733758        if (glActiveTexture) {
     
    739764
    740765        m_programs[m_currentShader]->bind();
    741         m_programs[m_currentShader]->setInt("tex", 0);
    742         m_programs[m_currentShader]->setInt("env", 1);
    743         m_programs[m_currentShader]->setInt("noise", 2);
    744         m_programs[m_currentShader]->setMatrix("view", view);
    745         m_programs[m_currentShader]->setMatrix("invView", invView);
     766        m_programs[m_currentShader]->setUniformValue("tex", GLint(0));
     767        m_programs[m_currentShader]->setUniformValue("env", GLint(1));
     768        m_programs[m_currentShader]->setUniformValue("noise", GLint(2));
     769        m_programs[m_currentShader]->setUniformValue("view", view);
     770        m_programs[m_currentShader]->setUniformValue("invView", invView);
    746771        m_box->draw();
    747         m_programs[m_currentShader]->unbind();
     772        m_programs[m_currentShader]->release();
    748773
    749774        if (glActiveTexture) {
     
    830855    const int N = (m_updateAllCubemaps ? 1 : 3);
    831856
    832     gfx::Matrix4x4f mat;
     857    QMatrix4x4 mat;
    833858    GLRenderTargetCube::getProjectionMatrix(mat, 0.1f, 100.0f);
    834859
    835860    glMatrixMode(GL_PROJECTION);
    836861    glPushMatrix();
    837     glLoadMatrixf(mat.bits());
     862    loadMatrix(mat);
    838863
    839864    glMatrixMode(GL_MODELVIEW);
    840865    glPushMatrix();
    841866
    842     gfx::Vector3f center;
     867    QVector3D center;
    843868
    844869    for (int i = m_frame % N; i < m_cubemaps.size(); i += N) {
     
    847872
    848873        float angle = 2.0f * PI * i / m_cubemaps.size();
    849         center = m_trackBalls[1].rotation().transform(gfx::Vector3f::vector(cos(angle), sin(angle), 0));
     874
     875        center = m_trackBalls[1].rotation().rotatedVector(QVector3D(cos(angle), sin(angle), 0.0f));
    850876
    851877        for (int face = 0; face < 6; ++face) {
     
    853879
    854880            GLRenderTargetCube::getViewMatrix(mat, face);
    855             gfx::Vector4f v = gfx::Vector4f::vector(-center[0], -center[1], -center[2], 1.0);
    856             mat[3] = v * mat;
     881            QVector4D v = QVector4D(-center.x(), -center.y(), -center.z(), 1.0);
     882            mat.setColumn(3, mat * v);
    857883
    858884            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     
    886912    float height = float(painter->device()->height());
    887913
     914    painter->beginNativePainting();
    888915    setStates();
    889916
     
    898925    glMatrixMode(GL_MODELVIEW);
    899926
    900     //gfx::Matrix4x4f view = gfx::Matrix4x4f::identity();
    901     //view(3, 2) -= 2.0f * exp(m_distExp / 1200.0f);
    902 
    903     gfx::Matrix4x4f view;
    904     m_trackBalls[2].rotation().matrix(view);
    905     view(3, 2) -= 2.0f * exp(m_distExp / 1200.0f);
     927    QMatrix4x4 view;
     928    view.rotate(m_trackBalls[2].rotation());
     929    view(2, 3) -= 2.0f * exp(m_distExp / 1200.0f);
    906930    renderBoxes(view);
    907931
    908932    defaultStates();
    909933    ++m_frame;
     934
     935    painter->endNativePainting();
    910936}
    911937
     
    937963
    938964    if (event->buttons() & Qt::MidButton) {
    939         m_trackBalls[2].move(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
     965        m_trackBalls[2].move(pixelPosToViewPos(event->scenePos()), QQuaternion());
    940966        event->accept();
    941967    } else {
    942         m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
     968        m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), QQuaternion());
    943969    }
    944970}
     
    961987
    962988    if (event->buttons() & Qt::MidButton) {
    963         m_trackBalls[2].push(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
     989        m_trackBalls[2].push(pixelPosToViewPos(event->scenePos()), QQuaternion());
    964990        event->accept();
    965991    }
     
    9831009
    9841010    if (event->button() == Qt::MidButton) {
    985         m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
     1011        m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), QQuaternion());
    9861012        event->accept();
    9871013    }
     
    10221048{
    10231049    // set the color in all programs
    1024     foreach (GLProgram *program, m_programs) {
     1050    foreach (QGLShaderProgram *program, m_programs) {
    10251051        program->bind();
    1026         program->setColor(name, color);
    1027         program->unbind();
     1052        program->setUniformValue(program->uniformLocation(name), QColor(color));
     1053        program->release();
    10281054    }
    10291055}
     
    10321058{
    10331059    // set the color in all programs
    1034     foreach (GLProgram *program, m_programs) {
     1060    foreach (QGLShaderProgram *program, m_programs) {
    10351061        program->bind();
    1036         program->setFloat(name, value);
    1037         program->unbind();
     1062        program->setUniformValue(program->uniformLocation(name), value);
     1063        program->release();
    10381064    }
    10391065}
  • trunk/demos/boxes/scene.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5151#include "roundedbox.h"
    5252#include "gltrianglemesh.h"
    53 #include "vector.h"
    5453#include "trackball.h"
    5554#include "glbuffers.h"
    56 #include "glshaders.h"
    5755#include "qtbox.h"
    5856
    5957#define PI 3.14159265358979
     58
     59QT_BEGIN_NAMESPACE
     60class QMatrix4x4;
     61QT_END_NAMESPACE
    6062
    6163class ParameterEdit : public QWidget
     
    107109class GraphicsWidget : public QGraphicsProxyWidget
    108110{
     111public:
     112    GraphicsWidget() : QGraphicsProxyWidget(0, Qt::Window) {}
    109113protected:
    110114    virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
     
    196200    void newItem(ItemDialog::ItemType type);
    197201protected:
    198     void renderBoxes(const gfx::Matrix4x4f &view, int excludeBox = -2);
     202    void renderBoxes(const QMatrix4x4 &view, int excludeBox = -2);
    199203    void setStates();
    200204    void setLights();
     
    232236    GLRenderTargetCube *m_mainCubemap;
    233237    QVector<GLRenderTargetCube *> m_cubemaps;
    234     QVector<GLProgram *> m_programs;
    235     GLVertexShader *m_vertexShader;
    236     QVector<GLFragmentShader *> m_fragmentShaders;
    237     GLFragmentShader *m_environmentShader;
    238     GLProgram *m_environmentProgram;
    239 };
    240 
    241 
     238    QVector<QGLShaderProgram *> m_programs;
     239    QGLShader *m_vertexShader;
     240    QVector<QGLShader *> m_fragmentShaders;
     241    QGLShader *m_environmentShader;
     242    QGLShaderProgram *m_environmentProgram;
     243};
    242244
    243245#endif
  • trunk/demos/boxes/trackball.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4141
    4242#include "trackball.h"
     43#include "scene.h"
    4344
    4445//============================================================================//
     
    5253    , m_mode(mode)
    5354{
    54     m_axis = gfx::Vector3f::vector(0, 1, 0);
    55     m_rotation = gfx::Quaternionf::quaternion(1.0f, 0.0f, 0.0f, 0.0f);
     55    m_axis = QVector3D(0, 1, 0);
     56    m_rotation = QQuaternion();
    5657    m_lastTime = QTime::currentTime();
    5758}
    5859
    59 TrackBall::TrackBall(float angularVelocity, const gfx::Vector3f& axis, TrackMode mode)
     60TrackBall::TrackBall(float angularVelocity, const QVector3D& axis, TrackMode mode)
    6061    : m_axis(axis)
    6162    , m_angularVelocity(angularVelocity)
     
    6465    , m_mode(mode)
    6566{
    66     m_rotation = gfx::Quaternionf::quaternion(1.0f, 0.0f, 0.0f, 0.0f);
     67    m_rotation = QQuaternion();
    6768    m_lastTime = QTime::currentTime();
    6869}
    6970
    70 void TrackBall::push(const QPointF& p, const gfx::Quaternionf &)
     71void TrackBall::push(const QPointF& p, const QQuaternion &)
    7172{
    7273    m_rotation = rotation();
     
    7778}
    7879
    79 void TrackBall::move(const QPointF& p, const gfx::Quaternionf &transformation)
     80void TrackBall::move(const QPointF& p, const QQuaternion &transformation)
    8081{
    8182    if (!m_pressed)
     
    9192        {
    9293            QLineF delta(m_lastPos, p);
    93             m_angularVelocity = delta.length() / msecs;
    94             m_axis = gfx::Vector3f::vector(delta.dy(), -delta.dx(), 0.0f).normalized();
    95             m_axis = transformation.transform(m_axis);
    96             m_rotation *= gfx::Quaternionf::rotation(delta.length(), m_axis);
     94            m_angularVelocity = 180*delta.length() / (PI*msecs);
     95            m_axis = QVector3D(-delta.dy(), delta.dx(), 0.0f).normalized();
     96            m_axis = transformation.rotatedVector(m_axis);
     97            m_rotation = QQuaternion::fromAxisAndAngle(m_axis, 180 / PI * delta.length()) * m_rotation;
    9798        }
    9899        break;
    99100    case Sphere:
    100101        {
    101             gfx::Vector3f lastPos3D = gfx::Vector3f::vector(m_lastPos.x(), m_lastPos.y(), 0);
    102             float sqrZ = 1 - lastPos3D.sqrNorm();
     102            QVector3D lastPos3D = QVector3D(m_lastPos.x(), m_lastPos.y(), 0.0f);
     103            float sqrZ = 1 - QVector3D::dotProduct(lastPos3D, lastPos3D);
    103104            if (sqrZ > 0)
    104                 lastPos3D[2] = sqrt(sqrZ);
     105                lastPos3D.setZ(sqrt(sqrZ));
    105106            else
    106107                lastPos3D.normalize();
    107108
    108             gfx::Vector3f currentPos3D = gfx::Vector3f::vector(p.x(), p.y(), 0);
    109             sqrZ = 1 - currentPos3D.sqrNorm();
     109            QVector3D currentPos3D = QVector3D(p.x(), p.y(), 0.0f);
     110            sqrZ = 1 - QVector3D::dotProduct(currentPos3D, currentPos3D);
    110111            if (sqrZ > 0)
    111                 currentPos3D[2] = sqrt(sqrZ);
     112                currentPos3D.setZ(sqrt(sqrZ));
    112113            else
    113114                currentPos3D.normalize();
    114115
    115             m_axis = gfx::Vector3f::cross(currentPos3D, lastPos3D);
    116             float angle = asin(sqrt(m_axis.sqrNorm()));
     116            m_axis = QVector3D::crossProduct(lastPos3D, currentPos3D);
     117            float angle = 180 / PI * asin(sqrt(QVector3D::dotProduct(m_axis, m_axis)));
    117118
    118119            m_angularVelocity = angle / msecs;
    119120            m_axis.normalize();
    120             m_axis = transformation.transform(m_axis);
    121             m_rotation *= gfx::Quaternionf::rotation(angle, m_axis);
     121            m_axis = transformation.rotatedVector(m_axis);
     122            m_rotation = QQuaternion::fromAxisAndAngle(m_axis, angle) * m_rotation;
    122123        }
    123124        break;
    124125    }
     126
    125127
    126128    m_lastPos = p;
     
    128130}
    129131
    130 void TrackBall::release(const QPointF& p, const gfx::Quaternionf &transformation)
     132void TrackBall::release(const QPointF& p, const QQuaternion &transformation)
    131133{
    132134    // Calling move() caused the rotation to stop if the framerate was too low.
     
    147149}
    148150
    149 gfx::Quaternionf TrackBall::rotation() const
     151QQuaternion TrackBall::rotation() const
    150152{
    151153    if (m_paused || m_pressed)
     
    154156    QTime currentTime = QTime::currentTime();
    155157    float angle = m_angularVelocity * m_lastTime.msecsTo(currentTime);
    156     return m_rotation * gfx::Quaternionf::rotation(angle, m_axis);
     158    return QQuaternion::fromAxisAndAngle(m_axis, angle) * m_rotation;
    157159}
    158160
  • trunk/demos/boxes/trackball.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4545#include <QtGui>
    4646
    47 #include "vector.h"
     47#include <QtGui/qvector3d.h>
     48#include <QtGui/qquaternion.h>
    4849
    4950class TrackBall
     
    5657    };
    5758    TrackBall(TrackMode mode = Sphere);
    58     TrackBall(float angularVelocity, const gfx::Vector3f& axis, TrackMode mode = Sphere);
     59    TrackBall(float angularVelocity, const QVector3D& axis, TrackMode mode = Sphere);
    5960    // coordinates in [-1,1]x[-1,1]
    60     void push(const QPointF& p, const gfx::Quaternionf &transformation);
    61     void move(const QPointF& p, const gfx::Quaternionf &transformation);
    62     void release(const QPointF& p, const gfx::Quaternionf &transformation);
     61    void push(const QPointF& p, const QQuaternion &transformation);
     62    void move(const QPointF& p, const QQuaternion &transformation);
     63    void release(const QPointF& p, const QQuaternion &transformation);
    6364    void start(); // starts clock
    6465    void stop(); // stops clock
    65     gfx::Quaternionf rotation() const;
     66    QQuaternion rotation() const;
    6667private:
    67     gfx::Quaternionf m_rotation;
    68     gfx::Vector3f m_axis;
     68    QQuaternion m_rotation;
     69    QVector3D m_axis;
    6970    float m_angularVelocity;
    7071
  • trunk/demos/boxes/wood.fsh

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/autosaver.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/autosaver.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/bookmarks.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7373    , m_bookmarkModel(0)
    7474{
    75     connect(this, SIGNAL(entryAdded(BookmarkNode *)),
     75    connect(this, SIGNAL(entryAdded(BookmarkNode*)),
    7676            m_saveTimer, SLOT(changeOccurred()));
    77     connect(this, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)),
     77    connect(this, SIGNAL(entryRemoved(BookmarkNode*,int,BookmarkNode*)),
    7878            m_saveTimer, SLOT(changeOccurred()));
    79     connect(this, SIGNAL(entryChanged(BookmarkNode *)),
     79    connect(this, SIGNAL(entryChanged(BookmarkNode*)),
    8080            m_saveTimer, SLOT(changeOccurred()));
    8181}
     
    363363    , m_bookmarksManager(bookmarkManager)
    364364{
    365     connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode *)),
    366             this, SLOT(entryAdded(BookmarkNode *)));
    367     connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)),
    368             this, SLOT(entryRemoved(BookmarkNode *, int, BookmarkNode *)));
    369     connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode *)),
    370             this, SLOT(entryChanged(BookmarkNode *)));
     365    connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode*)),
     366            this, SLOT(entryAdded(BookmarkNode*)));
     367    connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode*,int,BookmarkNode*)),
     368            this, SLOT(entryRemoved(BookmarkNode*,int,BookmarkNode*)));
     369    connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode*)),
     370            this, SLOT(entryChanged(BookmarkNode*)));
    371371}
    372372
     
    734734    , m_bookmarksManager(0)
    735735{
    736     connect(this, SIGNAL(activated(const QModelIndex &)),
    737             this, SLOT(activated(const QModelIndex &)));
     736    connect(this, SIGNAL(activated(QModelIndex)),
     737            this, SLOT(activated(QModelIndex)));
    738738    setMaxRows(-1);
    739739    setHoverRole(BookmarksModel::UrlStringRole);
     
    793793    tree->header()->resizeSection(0, header);
    794794    tree->header()->setStretchLastSection(true);
    795     connect(tree, SIGNAL(activated(const QModelIndex&)),
     795    connect(tree, SIGNAL(activated(QModelIndex)),
    796796            this, SLOT(open()));
    797797    tree->setContextMenuPolicy(Qt::CustomContextMenu);
    798     connect(tree, SIGNAL(customContextMenuRequested(const QPoint &)),
    799             this, SLOT(customContextMenuRequested(const QPoint &)));
     798    connect(tree, SIGNAL(customContextMenuRequested(QPoint)),
     799            this, SLOT(customContextMenuRequested(QPoint)));
    800800    connect(addFolderButton, SIGNAL(clicked()),
    801801            this, SLOT(newFolder()));
     
    885885    setRootIndex(model->index(0, 0));
    886886    connect(m_bookmarksModel, SIGNAL(modelReset()), this, SLOT(build()));
    887     connect(m_bookmarksModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(build()));
    888     connect(m_bookmarksModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(build()));
    889     connect(m_bookmarksModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(build()));
     887    connect(m_bookmarksModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(build()));
     888    connect(m_bookmarksModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(build()));
     889    connect(m_bookmarksModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(build()));
    890890    setAcceptDrops(true);
    891891}
     
    957957            button->setText(idx.data().toString());
    958958            ModelMenu *menu = new ModelMenu(this);
    959             connect(menu, SIGNAL(activated(const QModelIndex &)),
    960                     this, SLOT(activated(const QModelIndex &)));
     959            connect(menu, SIGNAL(activated(QModelIndex)),
     960                    this, SLOT(activated(QModelIndex)));
    961961            menu->setModel(m_bookmarksModel);
    962962            menu->setRootIndex(idx);
  • trunk/demos/browser/bookmarks.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/browser.pro

    r2 r561  
    44
    55CONFIG += qt warn_on
    6 contains(QT_BUILD_PARTS, tools): CONFIG += uitools
     6contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools
    77else: DEFINES += QT_NO_UITOOLS
     8
     9release:DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
    810
    911FORMS += \
     
    7981    QMAKE_INFO_PLIST = Info_mac.plist
    8082    TARGET = Browser
     83
     84    # No 64-bit Flash on Mac, so build the browser 32-bit
     85    contains(QT_CONFIG, x86) {
     86        CONFIG -= x86_64
     87        CONFIG += x86
     88    }
     89    contains(QT_CONFIG, ppc) {
     90        CONFIG -= ppc64
     91        CONFIG += ppc
     92    }
    8193}
    8294
     
    8799# install
    88100target.path = $$[QT_INSTALL_DEMOS]/browser
    89 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls
     101sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls data
    90102sources.path = $$[QT_INSTALL_DEMOS]/browser
    91103INSTALLS += target sources
     104
     105symbian {
     106    TARGET.UID3 = 0xA000CF70
     107    include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     108}
  • trunk/demos/browser/browserapplication.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8080    , m_localServer(0)
    8181{
    82     QCoreApplication::setOrganizationName(QLatin1String("Trolltech"));
     82    QCoreApplication::setOrganizationName(QLatin1String("Qt"));
    8383    QCoreApplication::setApplicationName(QLatin1String("demobrowser"));
    8484    QCoreApplication::setApplicationVersion(QLatin1String("0.1"));
     
    206206        directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
    207207    QWebSettings::setIconDatabasePath(directory);
     208    QWebSettings::setOfflineStoragePath(directory);
    208209
    209210    setWindowIcon(QIcon(QLatin1String(":browser.svg")));
     
    247248    QUrl url = settings.value(QLatin1String("userStyleSheet")).toUrl();
    248249    defaultSettings->setUserStyleSheetUrl(url);
     250
     251    defaultSettings->setAttribute(QWebSettings::DnsPrefetchEnabled, true);
    249252
    250253    settings.endGroup();
  • trunk/demos/browser/browserapplication.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/browsermainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8282    , m_reload(0)
    8383{
     84    setToolButtonStyle(Qt::ToolButtonFollowStyle);
    8485    setAttribute(Qt::WA_DeleteOnClose, true);
    8586    statusBar()->setSizeGripEnabled(true);
     
    9091    BookmarksModel *boomarksModel = BrowserApplication::bookmarksManager()->bookmarksModel();
    9192    m_bookmarksToolbar = new BookmarksToolBar(boomarksModel, this);
    92     connect(m_bookmarksToolbar, SIGNAL(openUrl(const QUrl&)),
    93             m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
     93    connect(m_bookmarksToolbar, SIGNAL(openUrl(QUrl)),
     94            m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl)));
    9495    connect(m_bookmarksToolbar->toggleViewAction(), SIGNAL(toggled(bool)),
    9596            this, SLOT(updateBookmarksToolbarActionText(bool)));
     
    109110        setCentralWidget(centralWidget);
    110111
    111     connect(m_tabWidget, SIGNAL(loadPage(const QString &)),
    112         this, SLOT(loadPage(const QString &)));
    113     connect(m_tabWidget, SIGNAL(setCurrentTitle(const QString &)),
    114         this, SLOT(slotUpdateWindowTitle(const QString &)));
    115     connect(m_tabWidget, SIGNAL(showStatusBarMessage(const QString&)),
    116             statusBar(), SLOT(showMessage(const QString&)));
    117     connect(m_tabWidget, SIGNAL(linkHovered(const QString&)),
    118             statusBar(), SLOT(showMessage(const QString&)));
     112    connect(m_tabWidget, SIGNAL(loadPage(QString)),
     113        this, SLOT(loadPage(QString)));
     114    connect(m_tabWidget, SIGNAL(setCurrentTitle(QString)),
     115        this, SLOT(slotUpdateWindowTitle(QString)));
     116    connect(m_tabWidget, SIGNAL(showStatusBarMessage(QString)),
     117            statusBar(), SLOT(showMessage(QString)));
     118    connect(m_tabWidget, SIGNAL(linkHovered(QString)),
     119            statusBar(), SLOT(showMessage(QString)));
    119120    connect(m_tabWidget, SIGNAL(loadProgress(int)),
    120121            this, SLOT(slotLoadProgress(int)));
    121122    connect(m_tabWidget, SIGNAL(tabsChanged()),
    122123            m_autoSaver, SLOT(changeOccurred()));
    123     connect(m_tabWidget, SIGNAL(geometryChangeRequested(const QRect &)),
    124             this, SLOT(geometryChangeRequested(const QRect &)));
    125     connect(m_tabWidget, SIGNAL(printRequested(QWebFrame *)),
    126             this, SLOT(printRequested(QWebFrame *)));
     124    connect(m_tabWidget, SIGNAL(geometryChangeRequested(QRect)),
     125            this, SLOT(geometryChangeRequested(QRect)));
     126    connect(m_tabWidget, SIGNAL(printRequested(QWebFrame*)),
     127            this, SLOT(printRequested(QWebFrame*)));
    127128    connect(m_tabWidget, SIGNAL(menuBarVisibilityChangeRequested(bool)),
    128129            menuBar(), SLOT(setVisible(bool)));
     
    369370    // History
    370371    HistoryMenu *historyMenu = new HistoryMenu(this);
    371     connect(historyMenu, SIGNAL(openUrl(const QUrl&)),
    372             m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
    373     connect(historyMenu, SIGNAL(hovered(const QString&)), this,
    374             SLOT(slotUpdateStatusbar(const QString&)));
     372    connect(historyMenu, SIGNAL(openUrl(QUrl)),
     373            m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl)));
     374    connect(historyMenu, SIGNAL(hovered(QString)), this,
     375            SLOT(slotUpdateStatusbar(QString)));
    375376    historyMenu->setTitle(tr("Hi&story"));
    376377    menuBar()->addMenu(historyMenu);
     
    404405    // Bookmarks
    405406    BookmarksMenu *bookmarksMenu = new BookmarksMenu(this);
    406     connect(bookmarksMenu, SIGNAL(openUrl(const QUrl&)),
    407             m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
    408     connect(bookmarksMenu, SIGNAL(hovered(const QString&)),
    409             this, SLOT(slotUpdateStatusbar(const QString&)));
     407    connect(bookmarksMenu, SIGNAL(openUrl(QUrl)),
     408            m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl)));
     409    connect(bookmarksMenu, SIGNAL(hovered(QString)),
     410            this, SLOT(slotUpdateStatusbar(QString)));
    410411    bookmarksMenu->setTitle(tr("&Bookmarks"));
    411412    menuBar()->addMenu(bookmarksMenu);
     
    455456    connect(m_historyBackMenu, SIGNAL(aboutToShow()),
    456457            this, SLOT(slotAboutToShowBackMenu()));
    457     connect(m_historyBackMenu, SIGNAL(triggered(QAction *)),
    458             this, SLOT(slotOpenActionUrl(QAction *)));
     458    connect(m_historyBackMenu, SIGNAL(triggered(QAction*)),
     459            this, SLOT(slotOpenActionUrl(QAction*)));
    459460    m_navigationBar->addAction(m_historyBack);
    460461
     
    463464    connect(m_historyForwardMenu, SIGNAL(aboutToShow()),
    464465            this, SLOT(slotAboutToShowForwardMenu()));
    465     connect(m_historyForwardMenu, SIGNAL(triggered(QAction *)),
    466             this, SLOT(slotOpenActionUrl(QAction *)));
     466    connect(m_historyForwardMenu, SIGNAL(triggered(QAction*)),
     467            this, SLOT(slotOpenActionUrl(QAction*)));
    467468    m_historyForward->setMenu(m_historyForwardMenu);
    468469    m_navigationBar->addAction(m_historyForward);
     
    478479    m_toolbarSearch = new ToolbarSearch(m_navigationBar);
    479480    m_navigationBar->addWidget(m_toolbarSearch);
    480     connect(m_toolbarSearch, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&)));
     481    connect(m_toolbarSearch, SIGNAL(search(QUrl)), SLOT(loadUrl(QUrl)));
    481482
    482483    m_chaseWidget = new ChaseWidget(this);
     
    487488{
    488489    BookmarksDialog *dialog = new BookmarksDialog(this);
    489     connect(dialog, SIGNAL(openUrl(const QUrl&)),
    490             m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
     490    connect(dialog, SIGNAL(openUrl(QUrl)),
     491            m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl)));
    491492    dialog->show();
    492493}
     
    550551    }
    551552    m_autoSaver->changeOccurred();
    552 }
    553 
    554 QUrl BrowserMainWindow::guessUrlFromString(const QString &string)
    555 {
    556     QString urlStr = string.trimmed();
    557     QRegExp test(QLatin1String("^[a-zA-Z]+\\:.*"));
    558 
    559     // Check if it looks like a qualified URL. Try parsing it and see.
    560     bool hasSchema = test.exactMatch(urlStr);
    561     if (hasSchema) {
    562         QUrl url = QUrl::fromEncoded(urlStr.toUtf8(), QUrl::TolerantMode);
    563         if (url.isValid())
    564             return url;
    565     }
    566 
    567     // Might be a file.
    568     if (QFile::exists(urlStr)) {
    569         QFileInfo info(urlStr);
    570         return QUrl::fromLocalFile(info.absoluteFilePath());
    571     }
    572 
    573     // Might be a shorturl - try to detect the schema.
    574     if (!hasSchema) {
    575         int dotIndex = urlStr.indexOf(QLatin1Char('.'));
    576         if (dotIndex != -1) {
    577             QString prefix = urlStr.left(dotIndex).toLower();
    578             QByteArray schema = (prefix == QLatin1String("ftp")) ? prefix.toLatin1() : "http";
    579             QUrl url =
    580                 QUrl::fromEncoded(schema + "://" + urlStr.toUtf8(), QUrl::TolerantMode);
    581             if (url.isValid())
    582                 return url;
    583         }
    584     }
    585 
    586     // Fall back to QUrl's own tolerant parser.
    587     QUrl url = QUrl::fromEncoded(string.toUtf8(), QUrl::TolerantMode);
    588 
    589     // finally for cases where the user just types in a hostname add http
    590     if (url.scheme().isEmpty())
    591         url = QUrl::fromEncoded("http://" + string.toUtf8(), QUrl::TolerantMode);
    592     return url;
    593553}
    594554
     
    677637        return;
    678638    QPrintPreviewDialog *dialog = new QPrintPreviewDialog(this);
    679     connect(dialog, SIGNAL(paintRequested(QPrinter *)),
    680             currentTab(), SLOT(print(QPrinter *)));
     639    connect(dialog, SIGNAL(paintRequested(QPrinter*)),
     640            currentTab(), SLOT(print(QPrinter*)));
    681641    dialog->exec();
    682642#endif
     
    740700        int ret = QMessageBox::warning(this, QString(),
    741701                           tr("Are you sure you want to close the window?"
    742                               "  There are %1 tab open").arg(m_tabWidget->count()),
     702                              "  There are %1 tabs open").arg(m_tabWidget->count()),
    743703                           QMessageBox::Yes | QMessageBox::No,
    744704                           QMessageBox::No);
     
    839799    QSettings settings;
    840800    settings.beginGroup(QLatin1String("MainWindow"));
    841     QString home = settings.value(QLatin1String("home"), QLatin1String("http://qtsoftware.com/")).toString();
     801    QString home = settings.value(QLatin1String("home"), QLatin1String("http://qt.nokia.com/")).toString();
    842802    loadPage(home);
    843803}
     
    873833void BrowserMainWindow::loadPage(const QString &page)
    874834{
    875     QUrl url = guessUrlFromString(page);
     835    QUrl url = QUrl::fromUserInput(page);
    876836    loadUrl(url);
    877837}
  • trunk/demos/browser/browsermainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6969
    7070public:
    71     static QUrl guessUrlFromString(const QString &url);
    7271    TabWidget *tabWidget() const;
    7372    WebView *currentTab() const;
  • trunk/demos/browser/chasewidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/chasewidget.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/cookiejar.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    669669    domainLineEdit->setCompleter(new QCompleter(cookieModel, domainLineEdit));
    670670
    671     connect(domainLineEdit, SIGNAL(textChanged(const QString &)),
    672             this, SLOT(textChanged(const QString &)));
     671    connect(domainLineEdit, SIGNAL(textChanged(QString)),
     672            this, SLOT(textChanged(QString)));
    673673    connect(blockButton, SIGNAL(clicked()), this, SLOT(block()));
    674674    connect(allowButton, SIGNAL(clicked()), this, SLOT(allow()));
  • trunk/demos/browser/cookiejar.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/data/defaultbookmarks.xbel

    r2 r561  
    44    <folder folded="yes">
    55        <title>Bookmarks Bar</title>
    6         <bookmark href="http://qtsoftware.com/">
    7             <title>Qt Software</title>
     6        <bookmark href="http://qt.nokia.com/">
     7            <title>Qt Home Page</title>
    88        </bookmark>
    99        <bookmark href="http://webkit.org/">
    1010            <title>WebKit.org</title>
    1111        </bookmark>
    12         <bookmark href="http://doc.trolltech.com/">
     12        <bookmark href="http://qt.nokia.com/doc/">
    1313            <title>Qt Documentation</title>
    1414        </bookmark>
    15         <bookmark href="http://doc.trolltech.com/qq/">
     15        <bookmark href="http://qt.nokia.com/doc/qq/">
    1616            <title>Qt Quarterly</title>
    1717        </bookmark>
    18         <bookmark href="http://labs.trolltech.com/">
     18        <bookmark href="http://labs.qt.nokia.com/">
    1919            <title>Qt Labs</title>
    2020        </bookmark>
     
    3131            <title>xkcd</title>
    3232        </bookmark>
     33       <bookmark href="http://twitter.com/qtbynokia">
     34            <title>Twitter</title>
     35        </bookmark>
    3336    </folder>
    3437    <folder folded="yes">
  • trunk/demos/browser/downloadmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9595    connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
    9696            this, SLOT(error(QNetworkReply::NetworkError)));
    97     connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)),
    98             this, SLOT(downloadProgress(qint64, qint64)));
     97    connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)),
     98            this, SLOT(downloadProgress(qint64,qint64)));
    9999    connect(m_reply, SIGNAL(metaDataChanged()),
    100100            this, SLOT(metaDataChanged()));
  • trunk/demos/browser/downloadmanager.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/edittableview.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/edittableview.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/edittreeview.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/edittreeview.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/history.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7878    connect(&m_expiredTimer, SIGNAL(timeout()),
    7979            this, SLOT(checkForExpired()));
    80     connect(this, SIGNAL(entryAdded(const HistoryItem &)),
     80    connect(this, SIGNAL(entryAdded(HistoryItem)),
    8181            m_saveTimer, SLOT(changeOccurred()));
    82     connect(this, SIGNAL(entryRemoved(const HistoryItem &)),
     82    connect(this, SIGNAL(entryRemoved(HistoryItem)),
    8383            m_saveTimer, SLOT(changeOccurred()));
    8484    load();
     
    370370    connect(m_history, SIGNAL(historyReset()),
    371371            this, SLOT(historyReset()));
    372     connect(m_history, SIGNAL(entryRemoved(const HistoryItem &)),
     372    connect(m_history, SIGNAL(entryRemoved(HistoryItem)),
    373373            this, SLOT(historyReset()));
    374374
    375     connect(m_history, SIGNAL(entryAdded(const HistoryItem &)),
     375    connect(m_history, SIGNAL(entryAdded(HistoryItem)),
    376376            this, SLOT(entryAdded()));
    377377    connect(m_history, SIGNAL(entryUpdated(int)),
     
    596596    , m_history(0)
    597597{
    598     connect(this, SIGNAL(activated(const QModelIndex &)),
    599             this, SLOT(activated(const QModelIndex &)));
     598    connect(this, SIGNAL(activated(QModelIndex)),
     599            this, SLOT(activated(QModelIndex)));
    600600    setHoverRole(HistoryModel::UrlStringRole);
    601601}
     
    640640{
    641641    HistoryDialog *dialog = new HistoryDialog(this);
    642     connect(dialog, SIGNAL(openUrl(const QUrl&)),
    643             this, SIGNAL(openUrl(const QUrl&)));
     642    connect(dialog, SIGNAL(openUrl(QUrl)),
     643            this, SIGNAL(openUrl(QUrl)));
    644644    dialog->show();
    645645}
     
    688688    tree->header()->resizeSection(0, header);
    689689    tree->header()->setStretchLastSection(true);
    690     connect(tree, SIGNAL(activated(const QModelIndex&)),
     690    connect(tree, SIGNAL(activated(QModelIndex)),
    691691            this, SLOT(open()));
    692692    tree->setContextMenuPolicy(Qt::CustomContextMenu);
    693     connect(tree, SIGNAL(customContextMenuRequested(const QPoint &)),
    694             this, SLOT(customContextMenuRequested(const QPoint &)));
     693    connect(tree, SIGNAL(customContextMenuRequested(QPoint)),
     694            this, SLOT(customContextMenuRequested(QPoint)));
    695695}
    696696
     
    752752    if (sourceModel()) {
    753753        disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
    754         disconnect(sourceModel(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
    755                    this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &)));
    756         disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
    757                 this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
    758         disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
    759                 this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
     754        disconnect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
     755                   this, SLOT(dataChanged(QModelIndex,QModelIndex)));
     756        disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
     757                this, SLOT(sourceRowsInserted(QModelIndex,int,int)));
     758        disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
     759                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
    760760    }
    761761
     
    765765        m_loaded = false;
    766766        connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
    767         connect(sourceModel(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
    768                    this, SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &)));
    769         connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
    770                 this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
    771         connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
    772                 this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
     767        connect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
     768                   this, SLOT(sourceDataChanged(QModelIndex,QModelIndex)));
     769        connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
     770                this, SLOT(sourceRowsInserted(QModelIndex,int,int)));
     771        connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
     772                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
    773773    }
    774774}
     
    907907        return false;
    908908    int lastRow = row + count - 1;
    909     disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
    910                 this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
     909    disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
     910                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
    911911    beginRemoveRows(parent, row, lastRow);
    912912    int oldCount = rowCount();
     
    915915    sourceModel()->removeRows(start, end - start + 1);
    916916    endRemoveRows();
    917     connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
    918                 this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
     917    connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
     918                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
    919919    m_loaded = false;
    920920    if (oldCount - count != rowCount())
     
    989989    if (sourceModel()) {
    990990        disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
    991         disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
     991        disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
    992992                this, SLOT(sourceReset()));
    993         disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
     993        disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
    994994                this, SLOT(sourceReset()));
    995995    }
     
    999999    if (newSourceModel) {
    10001000        connect(newSourceModel, SIGNAL(modelReset()), this, SLOT(sourceReset()));
    1001         connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
     1001        connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
    10021002                this, SLOT(sourceReset()));
    1003         connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
     1003        connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
    10041004                this, SLOT(sourceReset()));
    10051005    }
     
    11781178        disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
    11791179        disconnect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset()));
    1180         disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
    1181                 this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
    1182         disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
    1183                 this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
     1180        disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
     1181                this, SLOT(sourceRowsInserted(QModelIndex,int,int)));
     1182        disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
     1183                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
    11841184    }
    11851185
     
    11891189        connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
    11901190        connect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset()));
    1191         connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
    1192                 this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
    1193         connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
    1194                 this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
     1191        connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
     1192                this, SLOT(sourceRowsInserted(QModelIndex,int,int)));
     1193        connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
     1194                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
    11951195    }
    11961196
  • trunk/demos/browser/history.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/htmls/notfound.html

    r2 r561  
    5050    <h2>When connecting to: %3.</h2>
    5151    <ul>
    52       <li>Check the address for errors such as <b>ww</b>.trolltech.com
    53       instead of <b>www</b>.trolltech.com</li>
     52      <li>Check the address for errors such as <b>ww</b>.example.com
     53      instead of <b>www</b>.example.com</li>
    5454      <li>If the address is correct, try checking the network
    5555      connection.</li>
  • trunk/demos/browser/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/modelmenu.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/modelmenu.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/networkaccessmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5858#include <QtNetwork/QNetworkDiskCache>
    5959#include <QtNetwork/QNetworkProxy>
     60#include <QtNetwork/QNetworkRequest>
    6061#include <QtNetwork/QNetworkReply>
    6162#include <QtNetwork/QSslError>
    6263
    6364NetworkAccessManager::NetworkAccessManager(QObject *parent)
    64     : QNetworkAccessManager(parent)
    65 {
    66     connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
     65    : QNetworkAccessManager(parent),
     66    requestFinishedCount(0), requestFinishedFromCacheCount(0), requestFinishedPipelinedCount(0),
     67    requestFinishedSecureCount(0)
     68{
     69    connect(this, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
    6770            SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
    68     connect(this, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)),
    69             SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
     71    connect(this, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
     72            SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
     73    connect(this, SIGNAL(finished(QNetworkReply*)),
     74            SLOT(requestFinished(QNetworkReply*)));
    7075#ifndef QT_NO_OPENSSL
    71     connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
    72             SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
     76    connect(this, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
     77            SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
    7378#endif
    7479    loadSettings();
     
    7883    diskCache->setCacheDirectory(location);
    7984    setCache(diskCache);
     85}
     86
     87QNetworkReply* NetworkAccessManager::createRequest(Operation op, const QNetworkRequest & req, QIODevice * outgoingData)
     88{
     89    QNetworkRequest request = req; // copy so we can modify
     90    // this is a temporary hack until we properly use the pipelining flags from QtWebkit
     91    // pipeline everything! :)
     92    request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
     93    return QNetworkAccessManager::createRequest(op, request, outgoingData);
     94}
     95
     96void NetworkAccessManager::requestFinished(QNetworkReply *reply)
     97{
     98    requestFinishedCount++;
     99
     100    if (reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool() == true)
     101        requestFinishedFromCacheCount++;
     102
     103    if (reply->attribute(QNetworkRequest::HttpPipeliningWasUsedAttribute).toBool() == true)
     104        requestFinishedPipelinedCount++;
     105
     106    if (reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool() == true)
     107        requestFinishedSecureCount++;
     108
     109    if (requestFinishedCount % 10)
     110        return;
     111
     112    double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount));
     113    double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount));
     114    double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount));
     115    qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure);
     116
    80117}
    81118
  • trunk/demos/browser/networkaccessmanager.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4444
    4545#include <QtNetwork/QNetworkAccessManager>
     46#include <QtNetwork/QNetworkRequest>
    4647
    4748class NetworkAccessManager : public QNetworkAccessManager
     
    5253    NetworkAccessManager(QObject *parent = 0);
    5354
     55    virtual QNetworkReply* createRequest ( Operation op, const QNetworkRequest & req, QIODevice * outgoingData = 0 );
     56
    5457private:
    5558    QList<QString> sslTrustedHostList;
     59    qint64 requestFinishedCount;
     60    qint64 requestFinishedFromCacheCount;
     61    qint64 requestFinishedPipelinedCount;
     62    qint64 requestFinishedSecureCount;
    5663
    5764public slots:
    5865    void loadSettings();
     66    void requestFinished(QNetworkReply *reply);
    5967
    6068private slots:
  • trunk/demos/browser/searchlineedit.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5151  : QAbstractButton(parent)
    5252{
     53#ifndef QT_NO_CURSOR
    5354    setCursor(Qt::ArrowCursor);
     55#endif // QT_NO_CURSOR
    5456    setToolTip(tr("Clear"));
    5557    setVisible(false);
     
    104106{
    105107    setObjectName(QLatin1String("SearchButton"));
     108#ifndef QT_NO_CURSOR
    106109    setCursor(Qt::ArrowCursor);
     110#endif //QT_NO_CURSOR
    107111    setFocusPolicy(Qt::NoFocus);
    108112}
     
    166170    m_searchButton(new SearchButton(this))
    167171{
    168     connect(lineEdit(), SIGNAL(textChanged(const QString &)),
    169             this, SIGNAL(textChanged(const QString &)));
     172    connect(lineEdit(), SIGNAL(textChanged(QString)),
     173            this, SIGNAL(textChanged(QString)));
    170174    setLeftWidget(m_searchButton);
    171175    m_inactiveText = tr("Search");
  • trunk/demos/browser/searchlineedit.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/settings.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9090    QSettings settings;
    9191    settings.beginGroup(QLatin1String("MainWindow"));
    92     QString defaultHome = QLatin1String("http://qtsoftware.com");
     92    QString defaultHome = QLatin1String("http://qt.nokia.com");
    9393    homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString());
    9494    settings.endGroup();
  • trunk/demos/browser/settings.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/squeezelabel.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/squeezelabel.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/tabwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6565    setContextMenuPolicy(Qt::CustomContextMenu);
    6666    setAcceptDrops(true);
    67     connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
    68             this, SLOT(contextMenuRequested(const QPoint &)));
     67    connect(this, SIGNAL(customContextMenuRequested(QPoint)),
     68            this, SLOT(contextMenuRequested(QPoint)));
    6969
    7070    QString alt = QLatin1String("Alt+%1");
     
    222222    connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(reloadTab(int)));
    223223    connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(reloadAllTabs()));
    224     connect(m_tabBar, SIGNAL(tabMoved(int, int)), this, SLOT(moveTab(int, int)));
     224    connect(m_tabBar, SIGNAL(tabMoved(int,int)), this, SLOT(moveTab(int,int)));
    225225    setTabBar(m_tabBar);
    226226    setDocumentMode(true);
     
    258258    connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()),
    259259            this, SLOT(aboutToShowRecentTabsMenu()));
    260     connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)),
    261             this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
     260    connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction*)),
     261            this, SLOT(aboutToShowRecentTriggeredAction(QAction*)));
    262262    m_recentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this);
    263263    m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
     
    305305    WebView *oldWebView = this->webView(m_lineEdits->currentIndex());
    306306    if (oldWebView) {
    307         disconnect(oldWebView, SIGNAL(statusBarMessage(const QString&)),
    308                 this, SIGNAL(showStatusBarMessage(const QString&)));
    309         disconnect(oldWebView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
    310                 this, SIGNAL(linkHovered(const QString&)));
     307        disconnect(oldWebView, SIGNAL(statusBarMessage(QString)),
     308                this, SIGNAL(showStatusBarMessage(QString)));
     309        disconnect(oldWebView->page(), SIGNAL(linkHovered(QString,QString,QString)),
     310                this, SIGNAL(linkHovered(QString)));
    311311        disconnect(oldWebView, SIGNAL(loadProgress(int)),
    312312                this, SIGNAL(loadProgress(int)));
    313313    }
    314314
    315     connect(webView, SIGNAL(statusBarMessage(const QString&)),
    316             this, SIGNAL(showStatusBarMessage(const QString&)));
    317     connect(webView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
    318             this, SIGNAL(linkHovered(const QString&)));
     315    connect(webView, SIGNAL(statusBarMessage(QString)),
     316            this, SIGNAL(showStatusBarMessage(QString)));
     317    connect(webView->page(), SIGNAL(linkHovered(QString,QString,QString)),
     318            this, SIGNAL(linkHovered(QString)));
    319319    connect(webView, SIGNAL(loadProgress(int)),
    320320            this, SIGNAL(loadProgress(int)));
     
    451451    connect(webView, SIGNAL(iconChanged()),
    452452            this, SLOT(webViewIconChanged()));
    453     connect(webView, SIGNAL(titleChanged(const QString &)),
    454             this, SLOT(webViewTitleChanged(const QString &)));
    455     connect(webView, SIGNAL(urlChanged(const QUrl &)),
    456             this, SLOT(webViewUrlChanged(const QUrl &)));
     453    connect(webView, SIGNAL(titleChanged(QString)),
     454            this, SLOT(webViewTitleChanged(QString)));
     455    connect(webView, SIGNAL(urlChanged(QUrl)),
     456            this, SLOT(webViewUrlChanged(QUrl)));
    457457    connect(webView->page(), SIGNAL(windowCloseRequested()),
    458458            this, SLOT(windowCloseRequested()));
    459     connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)),
    460             this, SIGNAL(geometryChangeRequested(const QRect &)));
    461     connect(webView->page(), SIGNAL(printRequested(QWebFrame *)),
    462             this, SIGNAL(printRequested(QWebFrame *)));
     459    connect(webView->page(), SIGNAL(geometryChangeRequested(QRect)),
     460            this, SIGNAL(geometryChangeRequested(QRect)));
     461    connect(webView->page(), SIGNAL(printRequested(QWebFrame*)),
     462            this, SIGNAL(printRequested(QWebFrame*)));
    463463    connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
    464464            this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
     
    561561        hasFocus = tab->hasFocus();
    562562
    563         m_recentlyClosedTabsAction->setEnabled(true);
    564         m_recentlyClosedTabs.prepend(tab->url());
    565         if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
    566             m_recentlyClosedTabs.removeLast();
     563        QWebSettings *globalSettings = QWebSettings::globalSettings();
     564        if (!globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) {
     565            m_recentlyClosedTabsAction->setEnabled(true);
     566            m_recentlyClosedTabs.prepend(tab->url());
     567            if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
     568                m_recentlyClosedTabs.removeLast();
     569        }
    567570    }
    568571    QWidget *lineEdit = m_lineEdits->widget(index);
     
    762765        return;
    763766    connect(m_root, SIGNAL(triggered()), this, SLOT(rootTriggered()));
    764     connect(root, SIGNAL(destroyed(QObject *)), this, SLOT(rootDestroyed()));
     767    connect(root, SIGNAL(destroyed(QObject*)), this, SLOT(rootDestroyed()));
    765768    root->setEnabled(false);
    766769}
     
    811814{
    812815    if (m_currentParent)
    813         disconnect(m_currentParent, SIGNAL(destroyed(QObject *)),
     816        disconnect(m_currentParent, SIGNAL(destroyed(QObject*)),
    814817                   this, SLOT(currentDestroyed()));
    815818
     
    825828    m_root->setChecked(source->isChecked());
    826829    m_root->setEnabled(source->isEnabled());
    827     connect(m_currentParent, SIGNAL(destroyed(QObject *)),
     830    connect(m_currentParent, SIGNAL(destroyed(QObject*)),
    828831            this, SLOT(currentDestroyed()));
    829832}
  • trunk/demos/browser/tabwidget.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/toolbarsearch.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/toolbarsearch.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/urllineedit.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8888    connect(m_clearButton, SIGNAL(clicked()),
    8989            m_lineEdit, SLOT(clear()));
    90     connect(m_lineEdit, SIGNAL(textChanged(const QString&)),
    91             m_clearButton, SLOT(textChanged(const QString&)));
     90    connect(m_lineEdit, SIGNAL(textChanged(QString)),
     91            m_clearButton, SLOT(textChanged(QString)));
    9292}
    9393
     
    271271    m_webView = webView;
    272272    m_iconLabel->m_webView = webView;
    273     connect(webView, SIGNAL(urlChanged(const QUrl &)),
    274         this, SLOT(webViewUrlChanged(const QUrl &)));
     273    connect(webView, SIGNAL(urlChanged(QUrl)),
     274        this, SLOT(webViewUrlChanged(QUrl)));
    275275    connect(webView, SIGNAL(loadFinished(bool)),
    276276        this, SLOT(webViewIconChanged()));
  • trunk/demos/browser/urllineedit.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/webview.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5555#include <QtWebKit/QWebHitTestResult>
    5656
     57#ifndef QT_NO_UITOOLS
    5758#include <QtUiTools/QUiLoader>
     59#endif  //QT_NO_UITOOLS
    5860
    5961#include <QtCore/QDebug>
     
    6769{
    6870    setNetworkAccessManager(BrowserApplication::networkAccessManager());
    69     connect(this, SIGNAL(unsupportedContent(QNetworkReply *)),
    70             this, SLOT(handleUnsupportedContent(QNetworkReply *)));
     71    connect(this, SIGNAL(unsupportedContent(QNetworkReply*)),
     72            this, SLOT(handleUnsupportedContent(QNetworkReply*)));
    7173}
    7274
     
    150152    bool isOpened = file.open(QIODevice::ReadOnly);
    151153    Q_ASSERT(isOpened);
     154    Q_UNUSED(isOpened)
     155
    152156    QString title = tr("Error loading page: %1").arg(reply->url().toString());
    153157    QString html = QString(QLatin1String(file.readAll()))
     
    189193{
    190194    setPage(m_page);
    191     connect(page(), SIGNAL(statusBarMessage(const QString&)),
    192             SLOT(setStatusBarText(const QString&)));
     195    connect(page(), SIGNAL(statusBarMessage(QString)),
     196            SLOT(setStatusBarText(QString)));
    193197    connect(this, SIGNAL(loadProgress(int)),
    194198            this, SLOT(setProgress(int)));
    195199    connect(this, SIGNAL(loadFinished(bool)),
    196200            this, SLOT(loadFinished()));
    197     connect(page(), SIGNAL(loadingUrl(const QUrl&)),
    198             this, SIGNAL(urlChanged(const QUrl &)));
    199     connect(page(), SIGNAL(downloadRequested(const QNetworkRequest &)),
    200             this, SLOT(downloadRequested(const QNetworkRequest &)));
     201    connect(page(), SIGNAL(loadingUrl(QUrl)),
     202            this, SIGNAL(urlChanged(QUrl)));
     203    connect(page(), SIGNAL(downloadRequested(QNetworkRequest)),
     204            this, SLOT(downloadRequested(QNetworkRequest)));
    201205    page()->setForwardUnsupportedContent(true);
    202206
  • trunk/demos/browser/webview.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/browser/xbel.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    134134    BookmarkNode *root = new BookmarkNode(BookmarkNode::Root);
    135135    setDevice(device);
    136     while (!atEnd()) {
    137         readNext();
    138         if (isStartElement()) {
    139             QString version = attributes().value(QLatin1String("version")).toString();
    140             if (name() == QLatin1String("xbel")
    141                 && (version.isEmpty() || version == QLatin1String("1.0"))) {
    142                 readXBEL(root);
    143             } else {
    144                 raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
    145             }
     136    if (readNextStartElement()) {
     137        QString version = attributes().value(QLatin1String("version")).toString();
     138        if (name() == QLatin1String("xbel")
     139            && (version.isEmpty() || version == QLatin1String("1.0"))) {
     140            readXBEL(root);
     141        } else {
     142            raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
    146143        }
    147144    }
     
    153150    Q_ASSERT(isStartElement() && name() == QLatin1String("xbel"));
    154151
    155     while (!atEnd()) {
    156         readNext();
    157         if (isEndElement())
    158             break;
    159 
    160         if (isStartElement()) {
    161             if (name() == QLatin1String("folder"))
    162                 readFolder(parent);
    163             else if (name() == QLatin1String("bookmark"))
    164                 readBookmarkNode(parent);
    165             else if (name() == QLatin1String("separator"))
    166                 readSeparator(parent);
    167             else
    168                 skipUnknownElement();
    169         }
     152    while (readNextStartElement()) {
     153        if (name() == QLatin1String("folder"))
     154            readFolder(parent);
     155        else if (name() == QLatin1String("bookmark"))
     156            readBookmarkNode(parent);
     157        else if (name() == QLatin1String("separator"))
     158            readSeparator(parent);
     159        else
     160            skipCurrentElement();
    170161    }
    171162}
     
    178169    folder->expanded = (attributes().value(QLatin1String("folded")) == QLatin1String("no"));
    179170
    180     while (!atEnd()) {
    181         readNext();
    182 
    183         if (isEndElement())
    184             break;
    185 
    186         if (isStartElement()) {
    187             if (name() == QLatin1String("title"))
    188                 readTitle(folder);
    189             else if (name() == QLatin1String("desc"))
    190                 readDescription(folder);
    191             else if (name() == QLatin1String("folder"))
    192                 readFolder(folder);
    193             else if (name() == QLatin1String("bookmark"))
    194                 readBookmarkNode(folder);
    195             else if (name() == QLatin1String("separator"))
    196                 readSeparator(folder);
    197             else
    198                 skipUnknownElement();
    199         }
     171    while (readNextStartElement()) {
     172        if (name() == QLatin1String("title"))
     173            readTitle(folder);
     174        else if (name() == QLatin1String("desc"))
     175            readDescription(folder);
     176        else if (name() == QLatin1String("folder"))
     177            readFolder(folder);
     178        else if (name() == QLatin1String("bookmark"))
     179            readBookmarkNode(folder);
     180        else if (name() == QLatin1String("separator"))
     181            readSeparator(folder);
     182        else
     183            skipCurrentElement();
    200184    }
    201185}
     
    225209    BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark, parent);
    226210    bookmark->url = attributes().value(QLatin1String("href")).toString();
    227     while (!atEnd()) {
    228         readNext();
    229         if (isEndElement())
    230             break;
    231 
    232         if (isStartElement()) {
    233             if (name() == QLatin1String("title"))
    234                 readTitle(bookmark);
    235             else if (name() == QLatin1String("desc"))
    236                 readDescription(bookmark);
    237             else
    238                 skipUnknownElement();
    239         }
     211    while (readNextStartElement()) {
     212        if (name() == QLatin1String("title"))
     213            readTitle(bookmark);
     214        else if (name() == QLatin1String("desc"))
     215            readDescription(bookmark);
     216        else
     217            skipCurrentElement();
    240218    }
    241219    if (bookmark->title.isEmpty())
    242220        bookmark->title = QObject::tr("Unknown title");
    243 }
    244 
    245 void XbelReader::skipUnknownElement()
    246 {
    247     Q_ASSERT(isStartElement());
    248 
    249     while (!atEnd()) {
    250         readNext();
    251 
    252         if (isEndElement())
    253             break;
    254 
    255         if (isStartElement())
    256             skipUnknownElement();
    257     }
    258221}
    259222
  • trunk/demos/browser/xbel.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8888
    8989private:
    90     void skipUnknownElement();
    9190    void readXBEL(BookmarkNode *parent);
    9291    void readTitle(BookmarkNode *parent);
  • trunk/demos/chip/chip.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7575        fillColor = fillColor.light(125);
    7676
    77     if (option->levelOfDetail < 0.2) {
    78         if (option->levelOfDetail < 0.125) {
     77    const qreal lod = option->levelOfDetailFromTransform(painter->worldTransform());
     78    if (lod < 0.2) {
     79        if (lod < 0.125) {
    7980            painter->fillRect(QRectF(0, 0, 110, 70), fillColor);
    8081            return;
     
    101102    painter->setBrush(b);
    102103
    103     if (option->levelOfDetail >= 1) {
     104    if (lod >= 1) {
    104105        painter->setPen(QPen(Qt::gray, 1));
    105106        painter->drawLine(15, 54, 94, 54);
     
    109110
    110111    // Draw text
    111     if (option->levelOfDetail >= 2) {
     112    if (lod >= 2) {
    112113        QFont font("Times", 10);
    113114        font.setStyleStrategy(QFont::ForceOutline);
     
    123124    // Draw lines
    124125    QVarLengthArray<QLineF, 36> lines;
    125     if (option->levelOfDetail >= 0.5) {
    126         for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) {
     126    if (lod >= 0.5) {
     127        for (int i = 0; i <= 10; i += (lod > 0.5 ? 1 : 2)) {
    127128            lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5));
    128129            lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62));
    129130        }
    130         for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) {
     131        for (int i = 0; i <= 6; i += (lod > 0.5 ? 1 : 2)) {
    131132            lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5));
    132133            lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5));
    133134        }
    134135    }
    135     if (option->levelOfDetail >= 0.4) {
     136    if (lod >= 0.4) {
    136137        const QLineF lineData[] = {
    137138            QLineF(25, 35, 35, 35),
  • trunk/demos/chip/chip.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/chip/chip.pro

    r2 r561  
    1818INSTALLS += target sources
    1919
     20symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/chip/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/chip/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/chip/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/chip/view.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/chip/view.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/composition/composition.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    378378            p.fillRect(QRect(0, 0, m_pbuffer->width(), m_pbuffer->height()), Qt::transparent);
    379379
    380             p.save();
     380            p.save(); // Needed when using the GL1 engine
     381            p.beginNativePainting(); // Needed when using the GL2 engine
     382
    381383            glBindTexture(GL_TEXTURE_2D, m_base_tex);
    382384            glEnable(GL_TEXTURE_2D);
     
    400402
    401403            glDisable(GL_TEXTURE_2D);
    402             p.restore();
     404
     405            p.endNativePainting(); // Needed when using the GL2 engine
     406            p.restore(); // Needed when using the GL1 engine
    403407
    404408            drawSource(p);
     
    407411        }
    408412
    409         glWidget()->makeCurrent();
     413        painter->beginNativePainting(); // Needed when using the GL2 engine
     414        glWidget()->makeCurrent(); // Needed when using the GL1 engine
    410415        glBindTexture(GL_TEXTURE_2D, m_compositing_tex);
    411416        glEnable(GL_TEXTURE_2D);
     417        glEnable(GL_BLEND);
     418        glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
    412419        glColor4f(1.,1.,1.,1.);
    413420        glBegin(GL_QUADS);
     
    427434        glEnd();
    428435        glDisable(GL_TEXTURE_2D);
     436        painter->endNativePainting(); // Needed when using the GL2 engine
    429437    } else
    430438#endif
     
    450458        m_buffer = m_base_buffer;
    451459#else
    452         memcpy(m_buffer.bits(), m_base_buffer.bits(), m_buffer.numBytes());
     460        memcpy(m_buffer.bits(), m_base_buffer.bits(), m_buffer.byteCount());
    453461#endif
    454462
  • trunk/demos/composition/composition.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/composition/composition.pro

    r2 r561  
    1818INSTALLS += target sources
    1919
     20symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     21
    2022win32-msvc* {
    2123    QMAKE_CXXFLAGS += /Zm500
  • trunk/demos/composition/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4343
    4444#include <QApplication>
     45#ifdef QT_OPENGL_SUPPORT
     46#include <QtOpenGL>
     47#endif
    4548
    4649int main(int argc, char **argv)
     
    4851 //   Q_INIT_RESOURCE(deform);
    4952
     53#ifdef QT_OPENGL_SUPPORT
     54    QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
     55#endif
    5056    QApplication app(argc, argv);
    5157
  • trunk/demos/deform/deform.pro

    r2 r561  
    1818sources.path = $$[QT_INSTALL_DEMOS]/deform
    1919INSTALLS += target sources
     20
     21symbian {
     22    TARGET.UID3 = 0xA000A63D
     23    include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     24}
  • trunk/demos/deform/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6969        deformWidget.show();
    7070
     71#ifdef QT_KEYPAD_NAVIGATION
     72    QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
     73#endif
    7174    return app.exec();
    7275}
  • trunk/demos/deform/pathdeform.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454#include <qmath.h>
    5555
    56 
    5756PathDeformControls::PathDeformControls(QWidget *parent, PathDeformRenderer* renderer, bool smallScreen)
    5857      : QWidget(parent)
     
    242241    QRect screen_size = QApplication::desktop()->screenGeometry();
    243242    radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/5);
     243
    244244    m_renderer->setText(tr("Qt"));
    245245}
  • trunk/demos/deform/pathdeform.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/demos.pro

    r515 r561  
    11TEMPLATE    = subdirs
    22SUBDIRS     = \
    3         demos_shared \
    4         demos_deform \
    5         demos_gradients \
    6         demos_pathstroke \
    7         demos_affine \
    8         demos_composition \
    9         demos_books \
    10         demos_interview \
    11         demos_mainwindow \
    12         demos_spreadsheet \
    13         demos_textedit \
    14         demos_chip \
    15         demos_embeddeddialogs \
    16         demos_undo
     3            demos_shared \
     4            demos_deform \
     5            demos_gradients \
     6            demos_pathstroke \
     7            demos_affine \
     8            demos_composition \
     9            demos_books \
     10            demos_interview \
     11            demos_mainwindow \
     12            demos_spreadsheet \
     13            demos_textedit \
     14            demos_chip \
     15            demos_embeddeddialogs \
     16            demos_undo \
     17            demos_sub-attaq
    1718
     19symbian: SUBDIRS = \
     20            demos_shared \
     21            demos_deform \
     22            demos_pathstroke
     23           
     24wince*:  SUBDIRS = \
     25            demos_shared \
     26            demos_deform \
     27            demos_gradients \
     28            demos_pathstroke \
     29            demos_affine \
     30            demos_composition \
     31            demos_books \
     32            demos_interview \
     33            demos_mainwindow \
     34            demos_spreadsheet \
     35            demos_textedit \
     36            # demos_chip \
     37            demos_embeddeddialogs \
     38            demos_undo \
     39            demos_sub-attaq
     40           
    1841contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl):!contains(QT_CONFIG, opengles2):{
    1942SUBDIRS += demos_boxes
     
    2144
    2245mac*: SUBDIRS += demos_macmainwindow
    23 wince*|embedded: SUBDIRS += embedded
     46wince*|symbian|embedded|x11: SUBDIRS += embedded
    2447
    2548!contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin
     
    2851contains(QT_BUILD_PARTS, tools):{
    2952!wince*:!os2:SUBDIRS += demos_sqlbrowser demos_qtdemo
    30 wince*|os2: SUBDIRS += demos_sqlbrowser
     53wince*|os2:SUBDIRS += demos_sqlbrowser
    3154}
    3255}
    33 contains(QT_CONFIG, phonon)!static:SUBDIRS += demos_mediaplayer
    34 contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):SUBDIRS += demos_browser
     56contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer
     57contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):!symbian:SUBDIRS += demos_browser
    3558
    3659# install
     
    3861sources.path = $$[QT_INSTALL_DEMOS]
    3962INSTALLS += sources
     63
     64symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
    4065
    4166demos_chip.subdir = chip
     
    5782demos_undo.subdir = undo
    5883demos_qtdemo.subdir = qtdemo
    59 demos_mediaplayer.subdir = mediaplayer
     84demos_mediaplayer.subdir = qmediaplayer
    6085
    6186demos_browser.subdir = browser
    6287
    6388demos_boxes.subdir = boxes
     89demos_sub-attaq.subdir = sub-attaq
    6490
    6591#CONFIG += ordered
  • trunk/demos/embeddeddialogs/customproxy.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/embeddeddialogs/customproxy.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/embeddeddialogs/embeddeddialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6262    connect(ui->spacing, SIGNAL(valueChanged(int)),
    6363            this, SLOT(spacingChanged(int)));
    64     connect(ui->fontComboBox, SIGNAL(currentFontChanged(const QFont &)),
    65             this, SLOT(fontChanged(const QFont &)));
     64    connect(ui->fontComboBox, SIGNAL(currentFontChanged(QFont)),
     65            this, SLOT(fontChanged(QFont)));
    6666    connect(ui->style, SIGNAL(activated(QString)),
    6767            this, SLOT(styleChanged(QString)));
  • trunk/demos/embeddeddialogs/embeddeddialog.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/embeddeddialogs/embeddeddialogs.pro

    r2 r561  
    1616sources.path = $$[QT_INSTALL_DEMOS]/embeddeddialogs
    1717INSTALLS += target sources
     18
     19symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/embeddeddialogs/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7777    view.setRenderHints(view.renderHints() | QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
    7878    view.setBackgroundBrush(QPixmap(":/No-Ones-Laughing-3.jpg"));
    79     view.setCacheMode(QGraphicsView::CacheBackground);
    8079    view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
    8180    view.show();
  • trunk/demos/gradients/gradients.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7979    setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
    8080
    81     connect(m_hoverPoints, SIGNAL(pointsChanged(const QPolygonF &)), this, SIGNAL(colorsChanged()));
     81    connect(m_hoverPoints, SIGNAL(pointsChanged(QPolygonF)), this, SIGNAL(colorsChanged()));
    8282}
    8383
     
    356356    editorGroupLayout->addWidget(default4Button);
    357357
    358     connect(m_editor, SIGNAL(gradientStopsChanged(const QGradientStops &)),
    359             m_renderer, SLOT(setGradientStops(const QGradientStops &)));
     358    connect(m_editor, SIGNAL(gradientStopsChanged(QGradientStops)),
     359            m_renderer, SLOT(setGradientStops(QGradientStops)));
    360360
    361361    connect(m_linearButton, SIGNAL(clicked()), m_renderer, SLOT(setLinearGradient()));
  • trunk/demos/gradients/gradients.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/gradients/gradients.pro

    r2 r561  
    1717sources.path = $$[QT_INSTALL_DEMOS]/gradients
    1818INSTALLS += target sources
     19
     20symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/gradients/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454    gradientWidget.setStyle(arthurStyle);
    5555    QList<QWidget *> widgets = qFindChildren<QWidget *>(&gradientWidget);
    56     foreach (QWidget *w, widgets)
     56    foreach (QWidget *w, widgets) {
    5757        w->setStyle(arthurStyle);
     58        w->setAttribute(Qt::WA_AcceptTouchEvents);
     59    }
    5860    gradientWidget.show();
    5961
  • trunk/demos/interview/interview.pro

    r2 r561  
    1717INSTALLS += target sources
    1818
     19symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/interview/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/interview/model.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/interview/model.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/macmainwindow/macmainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/macmainwindow/macmainwindow.mm

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/macmainwindow/macmainwindow.pro

    r2 r561  
    1313}
    1414
    15 LIBS += -framework Cocoa
     15LIBS += -framework Cocoa -framework Carbon
    1616
    1717# install
  • trunk/demos/macmainwindow/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/colorswatch.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/colorswatch.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/mainwindow.pro

    r2 r561  
    1515INSTALLS += target sources
    1616
     17symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/mainwindow/toolbar.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/mainwindow/toolbar.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/pathstroke/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5858    pathStrokeWidget.setStyle(arthurStyle);
    5959    QList<QWidget *> widgets = qFindChildren<QWidget *>(&pathStrokeWidget);
    60     foreach (QWidget *w, widgets)
     60    foreach (QWidget *w, widgets) {
    6161        w->setStyle(arthurStyle);
     62        w->setAttribute(Qt::WA_AcceptTouchEvents);
     63    }
    6264
    6365    if (smallScreen)
     
    6668        pathStrokeWidget.show();
    6769
     70#ifdef QT_KEYPAD_NAVIGATION
     71    QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
     72#endif
    6873    return app.exec();
    6974}
  • trunk/demos/pathstroke/pathstroke.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    403403    m_wasAnimated = true;
    404404    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     405    setAttribute(Qt::WA_AcceptTouchEvents);
    405406}
    406407
     
    511512    Q_ASSERT(m_points.size() == m_vectors.size());
    512513    for (int i=0; i<m_points.size(); ++i) {
    513 
    514         if (i == m_activePoint)
    515             continue;
    516 
    517514        QPointF pos = m_points.at(i);
    518515        QPointF vec = m_vectors.at(i);
     
    533530void PathStrokeRenderer::mousePressEvent(QMouseEvent *e)
    534531{
     532    if (!m_fingerPointMapping.isEmpty())
     533        return;
    535534    setDescriptionEnabled(false);
    536535    m_activePoint = -1;
     
    557556void PathStrokeRenderer::mouseMoveEvent(QMouseEvent *e)
    558557{
     558    if (!m_fingerPointMapping.isEmpty())
     559        return;
    559560    // If we've moved more then 25 pixels, assume user is dragging
    560561    if (!m_mouseDrag && QPoint(m_mousePress - e->pos()).manhattanLength() > 25)
     
    569570void PathStrokeRenderer::mouseReleaseEvent(QMouseEvent *)
    570571{
     572    if (!m_fingerPointMapping.isEmpty())
     573        return;
    571574    m_activePoint = -1;
    572575    setAnimation(m_wasAnimated);
     
    587590}
    588591
     592bool PathStrokeRenderer::event(QEvent *e)
     593{
     594    bool touchBegin = false;
     595    switch (e->type()) {
     596    case QEvent::TouchBegin:
     597        touchBegin = true;
     598    case QEvent::TouchUpdate:
     599        {
     600            const QTouchEvent *const event = static_cast<const QTouchEvent*>(e);
     601            const QList<QTouchEvent::TouchPoint> points = event->touchPoints();
     602            foreach (const QTouchEvent::TouchPoint &touchPoint, points) {
     603                const int id = touchPoint.id();
     604                switch (touchPoint.state()) {
     605                case Qt::TouchPointPressed:
     606                    {
     607                        // find the point, move it
     608                        QSet<int> activePoints = QSet<int>::fromList(m_fingerPointMapping.values());
     609                        int activePoint = -1;
     610                        qreal distance = -1;
     611                        const int pointsCount = m_points.size();
     612                        for (int i=0; i<pointsCount; ++i) {
     613                            if (activePoints.contains(i))
     614                                continue;
     615
     616                            qreal d = QLineF(touchPoint.pos(), m_points.at(i)).length();
     617                            if ((distance < 0 && d < 12 * m_pointSize) || d < distance) {
     618                                distance = d;
     619                                activePoint = i;
     620                            }
     621                        }
     622                        if (activePoint != -1) {
     623                            m_fingerPointMapping.insert(touchPoint.id(), activePoint);
     624                            m_points[activePoint] = touchPoint.pos();
     625                        }
     626                    }
     627                    break;
     628                case Qt::TouchPointReleased:
     629                    {
     630                        // move the point and release
     631                        QHash<int,int>::iterator it = m_fingerPointMapping.find(id);
     632                        m_points[it.value()] = touchPoint.pos();
     633                        m_fingerPointMapping.erase(it);
     634                    }
     635                    break;
     636                case Qt::TouchPointMoved:
     637                    {
     638                        // move the point
     639                        const int pointIdx = m_fingerPointMapping.value(id, -1);
     640                        if (pointIdx >= 0)
     641                            m_points[pointIdx] = touchPoint.pos();
     642                    }
     643                    break;
     644                default:
     645                    break;
     646                }
     647            }
     648            if (m_fingerPointMapping.isEmpty()) {
     649                e->ignore();
     650                return false;
     651            } else {
     652                if (touchBegin) {
     653                    m_wasAnimated = m_timer.isActive();
     654                    setAnimation(false);
     655                }
     656                update();
     657                return true;
     658            }
     659        }
     660        break;
     661    case QEvent::TouchEnd:
     662        if (m_fingerPointMapping.isEmpty()) {
     663            e->ignore();
     664            return false;
     665        }
     666        m_fingerPointMapping.clear();
     667        setAnimation(m_wasAnimated);
     668        return true;
     669        break;
     670    default:
     671        break;
     672    }
     673    return QWidget::event(e);
     674}
     675
    589676void PathStrokeRenderer::setAnimation(bool animation)
    590677{
  • trunk/demos/pathstroke/pathstroke.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6161    void mouseReleaseEvent(QMouseEvent *e);
    6262    void timerEvent(QTimerEvent *e);
     63    bool event(QEvent *e);
    6364
    6465    QSize sizeHint() const { return QSize(500, 500); }
     
    119120    QPoint m_mousePress;
    120121    bool m_mouseDrag;
     122
     123    QHash<int, int> m_fingerPointMapping;
    121124};
    122125
  • trunk/demos/pathstroke/pathstroke.pro

    r2 r561  
    1919INSTALLS += target sources
    2020
     21symbian {
     22    TARGET.UID3 = 0xA000A63E
     23    include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     24}
  • trunk/demos/qtdemo/colors.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7373// Properties:
    7474bool Colors::openGlRendering = false;
    75 bool Colors::direct3dRendering = false;
    7675bool Colors::softwareRendering = false;
    77 bool Colors::openGlAwailable = true;
    78 bool Colors::direct3dAwailable = true;
     76bool Colors::openGlAvailable = true;
    7977bool Colors::xRenderPresent = true;
    8078
     
    9896bool Colors::verbose = false;
    9997bool Colors::pause = true;
    100 int Colors::fps = 100;
     98int Colors::fps = 60;
    10199int Colors::menuCount = 18;
    102100float Colors::animSpeed = 1.0;
     
    207205        if (s == "-opengl")
    208206            Colors::openGlRendering = true;
    209         else if (s == "-direct3d")
    210             Colors::direct3dRendering = true;
    211207        else if (s == "-software")
    212208            Colors::softwareRendering = true;
     
    271267        else if (s.startsWith("-h") || s.startsWith("-help")){
    272268            QMessageBox::warning(0, "Arguments",
    273                                  QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-direct3d] [-software] [-fullscreen] [-ticker[0|1]] ")
     269                                 QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-software] [-fullscreen] [-ticker[0|1]] ")
    274270                                 + "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]]  "
    275271                                 + "[-use-window-mask] [-no-rescale] "
     
    279275                                 + "[-ticker-morph-speed<float>] [-ticker-text<string>]");
    280276            exit(0);
     277        } else if (s == "-verbose") {
     278            // this option was already handled above
    281279        } else{
    282280            QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s);
     
    291289{
    292290    Colors::openGlRendering = false;
    293     Colors::direct3dRendering = false;
    294291    Colors::softwareRendering = true;
    295292    Colors::noTicker = true;
     
    326323#endif
    327324    {
    328         Colors::openGlAwailable = false;
     325        Colors::openGlAvailable = false;
    329326        if (Colors::verbose)
    330327            qDebug("- OpenGL not recommended on this system");
    331328    }
    332 
    333 #if defined(Q_WS_WIN)
    334     Colors::direct3dAwailable = false; // for now.
    335 #endif
    336329
    337330#if defined(Q_WS_X11)
    338331    // check if X render is present:
    339332    QPixmap tmp(1, 1);
    340     if (!tmp.x11PictureHandle()){
     333    if (!tmp.x11PictureHandle() && tmp.paintEngine()->type() == QPaintEngine::X11){
    341334        Colors::xRenderPresent = false;
    342335        if (Colors::verbose)
     
    370363    }
    371364
    372 #if !defined(Q_WS_WIN)
    373     if (Colors::direct3dRendering){
    374         Colors::direct3dRendering = false;
    375             qDebug() << "- WARNING: Direct3D specified, but not supported on this platform";
    376     }
    377 #endif
    378 
    379     if (!Colors::openGlRendering && !Colors::direct3dRendering && !Colors::softwareRendering){
     365    if (!Colors::openGlRendering && !Colors::softwareRendering){
    380366        // The user has not decided rendering system. So we do it instead:
    381 #if defined(Q_WS_WIN)
    382         if (Colors::direct3dAwailable)
    383             Colors::direct3dRendering = true;
    384         else
    385 #endif
    386         if (Colors::openGlAwailable)
     367        if (Colors::openGlAvailable)
    387368            Colors::openGlRendering = true;
    388369        else
  • trunk/demos/qtdemo/colors.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8282
    8383    // properties:
     84    static bool openGlAvailable;
    8485    static bool openGlRendering;
    85     static bool direct3dRendering;
    8686    static bool softwareRendering;
    87     static bool openGlAwailable;
    88     static bool direct3dAwailable;
    8987    static bool xRenderPresent;
    9088    static bool noAdapt;
  • trunk/demos/qtdemo/demoitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demoitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demoitemanimation.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demoitemanimation.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demoscene.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demoscene.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demotextitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/demotextitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/dockitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/dockitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/examplecontent.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/examplecontent.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/guide.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/guide.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/guidecircle.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/guidecircle.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/guideline.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/guideline.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/headingitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/headingitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/imageitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/imageitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/itemcircleanimation.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    303303
    304304    this->qtGuide1 = new GuideCircle(QRectF(x, y, 260, 260), -36, 342);
     305    this->currGuide = 0;
    305306    new GuideLine(QPointF(x + 240, y + 268), this->qtGuide1);
    306307    new GuideLine(QPointF(x + 265, y + 246), this->qtGuide1);
  • trunk/demos/qtdemo/itemcircleanimation.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/letteritem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/letteritem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6464    this->useTimer = false;
    6565    this->updateTimer.setSingleShot(true);
    66     this->trolltechLogo = 0;
     66    this->companyLogo = 0;
    6767    this->qtLogo = 0;
    6868    this->setupWidget();
     
    7474MainWindow::~MainWindow()
    7575{
    76     delete this->trolltechLogo;
     76    delete this->companyLogo;
    7777    delete this->qtLogo;
    7878}
     
    101101    QWidget *viewport = 0;
    102102
    103     if (Colors::direct3dRendering){
    104         viewport->setAttribute(Qt::WA_MSWindowsUseDirect3D);
    105         setCacheMode(QGraphicsView::CacheNone);
    106         if (Colors::verbose)
    107             qDebug() << "- using Direct3D";
    108     }
    109103#ifndef QT_NO_OPENGL
    110     else if (Colors::openGlRendering){
     104    if (Colors::openGlRendering) {
    111105        QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers));
    112106        if (Colors::noScreenSync)
     
    117111        if (Colors::verbose)
    118112            qDebug() << "- using OpenGL";
    119     }
     113    } else // software rendering
    120114#endif
    121     else{ // software rendering
     115    {
     116        // software rendering
    122117        viewport = new QWidget;
    123118        setCacheMode(QGraphicsView::CacheBackground);
     
    264259
    265260    this->viewport()->update();
    266     if (Colors::softwareRendering)
    267         QApplication::syncX();
    268 
    269261    if (this->useTimer)
    270262        this->updateTimer.start(int(1000 / Colors::fps));
     
    279271    }
    280272
    281     this->trolltechLogo = new ImageItem(QImage(":/images/trolltech-logo.png"), 1000, 1000, this->scene, 0, true, 0.5f);
     273    this->companyLogo = new ImageItem(QImage(":/images/trolltech-logo.png"), 1000, 1000, this->scene, 0, true, 0.5f);
    282274    this->qtLogo = new ImageItem(QImage(":/images/qtlogo_small.png"), 1000, 1000, this->scene, 0, true, 0.5f);
    283     this->trolltechLogo->setZValue(100);
     275    this->companyLogo->setZValue(100);
    284276    this->qtLogo->setZValue(100);
    285277    this->pausedLabel = new DemoTextItem(QString("PAUSED"), Colors::buttonFont(), Qt::white, -1, this->scene, 0);
     
    390382            if (Colors::openGlRendering)
    391383                s += "OpenGL";
    392             else if (Colors::direct3dRendering)
    393                 s += "Direct3D";
    394384            else
    395385                s += "software";
     
    467457    DemoItem::setMatrix(this->matrix());
    468458
    469     if (this->trolltechLogo){
     459    if (this->companyLogo){
    470460        const QRectF r = this->scene->sceneRect();
    471         QRectF ttb = this->trolltechLogo->boundingRect();
    472         this->trolltechLogo->setPos(int((r.width() - ttb.width()) / 2), 595 - ttb.height());
     461        QRectF ttb = this->companyLogo->boundingRect();
     462        this->companyLogo->setPos(int((r.width() - ttb.width()) / 2), 595 - ttb.height());
    473463        QRectF qtb = this->qtLogo->boundingRect();
    474464        this->qtLogo->setPos(802 - qtb.width(), 0);
  • trunk/demos/qtdemo/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9999    QTime fpsTime;
    100100    QPixmap background;
    101     ImageItem *trolltechLogo;
     101    ImageItem *companyLogo;
    102102    ImageItem *qtLogo;
    103103    bool doneAdapt;
  • trunk/demos/qtdemo/menucontent.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/menucontent.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/menumanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    325325#ifdef Q_OS_WIN
    326326    //make sure it finds the dlls on windows
    327     QString curpath = QString::fromLocal8Bit(qgetenv("PATH").constData());
    328     QString newpath = QString("PATH=%1;%2").arg(QLibraryInfo::location(QLibraryInfo::BinariesPath), curpath);
    329     process->setEnvironment(QStringList(newpath));
     327    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
     328    env.insert(QLatin1String("PATH"), QLibraryInfo::location(QLibraryInfo::BinariesPath)
     329               + QLatin1Char(';') + env.value(QLatin1String("Path")));
     330    process->setProcessEnvironment(env);
    330331#endif
    331332
  • trunk/demos/qtdemo/menumanager.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/qtdemo.pro

    r521 r561  
    11CONFIG += assistant help x11inc
    22TARGET = qtdemo
    3 DESTDIR = $$QT_BUILD_TREE/bin
     3DEMO_DESTDIR = $$QT_BUILD_TREE
     4isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../..
     5DESTDIR = $$DEMO_DESTDIR/bin
    46INSTALLS += target sources
     7
     8
    59QT += xml network
    610
     
    6468}
    6569
     70symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     71
    6672# install
    6773target.path = $$[QT_INSTALL_BINS]
  • trunk/demos/qtdemo/qtdemo.rc

    r2 r561  
     1#include "winver.h"
     2
    13IDI_ICON1               ICON    DISCARDABLE     "qtdemo.ico"
    24
     5VS_VERSION_INFO VERSIONINFO
     6 FILEVERSION 1,0,0,0
     7 PRODUCTVERSION 1,0,0,0
     8 FILEFLAGS 0x0L
     9 FILEFLAGSMASK 0x3fL
     10 FILEOS 0x00040004L
     11 FILETYPE 0x1L
     12 FILESUBTYPE 0x0L
     13BEGIN
     14    BLOCK "StringFileInfo"
     15    BEGIN
     16        BLOCK "000004b0"
     17        BEGIN
     18            VALUE "CompanyName", "Nokia Corporation and/or its subsidiary(-ies)"
     19            VALUE "FileDescription", "Qt Examples and Demos"
     20            VALUE "FileVersion", "1.0.0.0"
     21            VALUE "LegalCopyright", "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
     22            VALUE "InternalName", "qtdemo"
     23            VALUE "OriginalFilename", "qtdemo.exe"
     24            VALUE "ProductName", "Qt Examples and Demos"
     25            VALUE "ProductVersion", "1.0.0.0"
     26        END
     27    END
     28    BLOCK "VarFileInfo"
     29    BEGIN
     30        VALUE "Translation", 0x0, 1200
     31    END
     32END
  • trunk/demos/qtdemo/scanitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/scanitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/score.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/score.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/textbutton.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/textbutton.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/qtdemo/xml/examples.xml

    r2 r561  
    1717    <example filename="interview" name="Interview" />
    1818    <example filename="browser" name="Browser" />
    19     <example filename="mediaplayer" name="Media Player" />
     19    <example filename="qmediaplayer" name="Media Player" />
    2020    <example filename="boxes" name="Boxes" />
     21    <example filename="sub-attaq" name="Sub-attaq" />
    2122  </demos>
     23  <category dirname="animation" name="Animation Framework">
     24    <example filename="animatedtiles" name="Animated Tiles" />
     25    <example filename="appchooser" name="Appchooser" />
     26    <example filename="easing" name="Easing Curves" />
     27    <example filename="moveblocks" name="Moving Blocks" />
     28    <example filename="states" name="States" />
     29    <example filename="stickman" name="Stickman" />
     30  </category>
    2231  <category dirname="qtconcurrent" name="Concurrent Programming">
    2332    <example filename="map" name="Map" executable="false" />
     
    7988    <example filename="dirview" name="Directory View" />
    8089    <example filename="fetchmore" name="Fetch More" />
     90    <example filename="frozencolumn" name="Frozen Column" />
    8191    <example filename="pixelator" name="Pixelator" />
    8292    <example filename="puzzle" name="Puzzle " image="itemviewspuzzle-example.png"/>
     
    113123    <example filename="fortuneclient" name="Fortune Client" />
    114124    <example filename="fortuneserver" name="Fortune Server" />
    115     <example filename="ftp" changedirectory="false" name="FTP Client" />
     125    <example filename="qftp" changedirectory="false" name="FTP Client" />
    116126    <example filename="http" changedirectory="false" name="HTTP Client" />
    117127    <example filename="loopback" name="Loopback" />
     
    119129    <example filename="torrent" name="Torrent Client" />
    120130    <example filename="securesocketclient" name="Secure Socket Client" />
     131    <example filename="googlesuggest" name="Google Suggest" />
    121132  </category>
    122133  <category dirname="opengl" name="OpenGL">
     
    143154  </category>
    144155  <category dirname="phonon" name="Phonon">
    145     <example filename="musicplayer" name="Music Player" />
     156    <example filename="qmusicplayer" name="Music Player" />
     157  </category>
     158  <category dirname="multimedia" name="Multimedia">
     159    <example filename="audiodevices" name="Audio Devices" />
     160    <example filename="audiooutput" name="Audio Output" />
     161    <example filename="audioinput" name="Audio Input" />
    146162  </category>
    147163  <category dirname="richtext" name="Rich Text">
     
    167183    <example filename="sqlwidgetmapper" name="SQL Widget Mapper" />
    168184  </category>
     185  <category dirname="statemachine" name="State Machine">
     186    <example filename="eventtransitions" name="Event Transitions" />
     187    <example filename="rogue" name="Rogue" />
     188    <example filename="trafficlight" name="Traffic Light" />
     189    <example filename="twowaybutton" name="Two-way Button" />
     190  </category>
    169191  <category dirname="threads" name="Threading">
    170192    <example filename="mandelbrot" name="Mandelbrot" />
     
    175197    <example filename="customcompleter" name="Custom Completer" />
    176198    <example filename="i18n" name="Internationalization" />
     199    <example filename="inputpanel" name="Input Panel" />
    177200    <example filename="plugandpaint" name="Plug and Paint" />
    178201    <example filename="regexp" name="Regular Expressions" />
     
    214237    <example filename="windowflags" name="Window Flags" />
    215238  </category>
     239  <category dirname="webkit" name="WebKit">
     240    <example filename="formextractor" name="Form Extractor" />
     241    <example filename="previewer" name="HTML Previewer" />
     242    <example filename="fancybrowser" name="Fancy Browser" />
     243    <example filename="googlechat" name="Google Chat" />
     244  </category>
    216245  <category dirname="xml" name="XML">
    217246    <example filename="saxbookmarks" name="SAX Bookmarks" />
     
    225254    <example filename="filetree" name="File Tree" />
    226255    <example filename="trafficinfo" name="Traffic Info" />
     256    <example filename="schema" name="XML Schema Validation" />
    227257  </category> 
    228258</categories>
  • trunk/demos/shared/arthurstyle.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/shared/arthurstyle.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/shared/arthurwidgets.cpp

    r514 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/shared/arthurwidgets.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5050#if defined(QT_OPENGL_SUPPORT)
    5151#include <QGLWidget>
     52#include <QEvent>
    5253class GLWidget : public QGLWidget
    5354{
    5455public:
    5556    GLWidget(QWidget *parent)
    56         : QGLWidget(QGLFormat(QGL::SampleBuffers), parent) {}
     57        : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
     58    {
     59        setAttribute(Qt::WA_AcceptTouchEvents);
     60    }
    5761    void disableAutoBufferSwap() { setAutoBufferSwap(false); }
    5862    void paintEvent(QPaintEvent *) { parentWidget()->update(); }
     63protected:
     64    bool event(QEvent *event)
     65    {
     66        switch (event->type()) {
     67        case QEvent::TouchBegin:
     68        case QEvent::TouchUpdate:
     69        case QEvent::TouchEnd:
     70            event->ignore();
     71            return false;
     72            break;
     73        default:
     74            break;
     75        }
     76        return QGLWidget::event(event);
     77    }
    5978};
    6079#endif
  • trunk/demos/shared/hoverpoints.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454    m_widget = widget;
    5555    widget->installEventFilter(this);
     56    widget->setAttribute(Qt::WA_AcceptTouchEvents);
    5657
    5758    m_connectionType = CurveConnection;
     
    6667    m_enabled = true;
    6768
    68     connect(this, SIGNAL(pointsChanged(const QPolygonF &)),
     69    connect(this, SIGNAL(pointsChanged(QPolygonF)),
    6970            m_widget, SLOT(update()));
    7071}
     
    8788        case QEvent::MouseButtonPress:
    8889        {
     90            if (!m_fingerPointMapping.isEmpty())
     91                return true;
    8992            QMouseEvent *me = (QMouseEvent *) event;
    9093
     
    148151
    149152        case QEvent::MouseButtonRelease:
     153            if (!m_fingerPointMapping.isEmpty())
     154                return true;
    150155            m_currentIndex = -1;
    151156            break;
    152157
    153158        case QEvent::MouseMove:
     159            if (!m_fingerPointMapping.isEmpty())
     160                return true;
    154161            if (m_currentIndex >= 0)
    155162                movePoint(m_currentIndex, ((QMouseEvent *)event)->pos());
     163            break;
     164        case QEvent::TouchBegin:
     165        case QEvent::TouchUpdate:
     166            {
     167                const QTouchEvent *const touchEvent = static_cast<const QTouchEvent*>(event);
     168                const QList<QTouchEvent::TouchPoint> points = touchEvent->touchPoints();
     169                const qreal pointSize = qMax(m_pointSize.width(), m_pointSize.height());
     170                foreach (const QTouchEvent::TouchPoint &touchPoint, points) {
     171                    const int id = touchPoint.id();
     172                    switch (touchPoint.state()) {
     173                    case Qt::TouchPointPressed:
     174                        {
     175                            // find the point, move it
     176                            QSet<int> activePoints = QSet<int>::fromList(m_fingerPointMapping.values());
     177                            int activePoint = -1;
     178                            qreal distance = -1;
     179                            const int pointsCount = m_points.size();
     180                            const int activePointCount = activePoints.size();
     181                            if (pointsCount == 2 && activePointCount == 1) { // only two points
     182                                activePoint = activePoints.contains(0) ? 1 : 0;
     183                            } else {
     184                                for (int i=0; i<pointsCount; ++i) {
     185                                    if (activePoints.contains(i))
     186                                        continue;
     187
     188                                    qreal d = QLineF(touchPoint.pos(), m_points.at(i)).length();
     189                                    if ((distance < 0 && d < 12 * pointSize) || d < distance) {
     190                                        distance = d;
     191                                        activePoint = i;
     192                                    }
     193
     194                                }
     195                            }
     196                            if (activePoint != -1) {
     197                                m_fingerPointMapping.insert(touchPoint.id(), activePoint);
     198                                movePoint(activePoint, touchPoint.pos());
     199                            }
     200                        }
     201                        break;
     202                    case Qt::TouchPointReleased:
     203                        {
     204                            // move the point and release
     205                            QHash<int,int>::iterator it = m_fingerPointMapping.find(id);
     206                            movePoint(it.value(), touchPoint.pos());
     207                            m_fingerPointMapping.erase(it);
     208                        }
     209                        break;
     210                    case Qt::TouchPointMoved:
     211                        {
     212                            // move the point
     213                            const int pointIdx = m_fingerPointMapping.value(id, -1);
     214                            if (pointIdx >= 0) // do we track this point?
     215                                movePoint(pointIdx, touchPoint.pos());
     216                        }
     217                        break;
     218                    default:
     219                        break;
     220                    }
     221                }
     222                if (m_fingerPointMapping.isEmpty()) {
     223                    event->ignore();
     224                    return false;
     225                } else {
     226                    return true;
     227                }
     228            }
     229            break;
     230        case QEvent::TouchEnd:
     231            if (m_fingerPointMapping.isEmpty()) {
     232                event->ignore();
     233                return false;
     234            }
     235            return true;
    156236            break;
    157237
     
    263343void HoverPoints::setPoints(const QPolygonF &points)
    264344{
     345    if (points.size() != m_points.size())
     346        m_fingerPointMapping.clear();
    265347    m_points.clear();
    266348    for (int i=0; i<points.size(); ++i)
  • trunk/demos/shared/hoverpoints.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    134134    bool m_enabled;
    135135
     136    QHash<int, int> m_fingerPointMapping;
     137
    136138    QPen m_pointPen;
    137139    QBrush m_pointBrush;
  • trunk/demos/shared/shared.pri

    r2 r561  
    1717hpux-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
    1818hpuxi-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
    19 !hpuxi-acc*:!hpux-acc*:LIBS += -ldemo_shared
     19symbian:LIBS += -ldemo_shared.lib
     20!hpuxi-acc*:!hpux-acc*:!symbian:LIBS += -ldemo_shared
    2021
  • trunk/demos/shared/shared.pro

    r2 r561  
    3030sources.path = $$[QT_INSTALL_DEMOS]/shared
    3131INSTALLS += sources
     32
    3233!cross_compile:INSTALLS += target
    3334
     35symbian {
     36    TARGET.UID3 = 0xA000A63C
     37    include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     38}
  • trunk/demos/spreadsheet/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/spreadsheet/printview.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/spreadsheet/printview.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/spreadsheet/spreadsheet.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7474
    7575    statusBar();
    76     connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
     76    connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)),
    7777            this, SLOT(updateStatus(QTableWidgetItem*)));
    78     connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
     78    connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)),
    7979            this, SLOT(updateColor(QTableWidgetItem*)));
    8080    connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)),
     
    421421        int row, col;
    422422        decode_pos(out, &row, &col);
    423         table->item(row, col)->setText(tr("%1, %2, %3").arg(op, cell1, cell2));
     423        table->item(row, col)->setText(tr("%1 %2 %3").arg(op, cell1, cell2));
    424424    }
    425425}
     
    482482    table->setItem(4, 0, new SpreadSheetItem("Flight (LA)"));
    483483    table->setItem(5, 0, new SpreadSheetItem("Taxi"));
    484     table->setItem(6, 0, new SpreadSheetItem("Diinner"));
     484    table->setItem(6, 0, new SpreadSheetItem("Dinner"));
    485485    table->setItem(7, 0, new SpreadSheetItem("Hotel"));
    486486    table->setItem(8, 0, new SpreadSheetItem("Flight (Oslo)"));
     
    524524
    525525    table->setItem(9, 2, new SpreadSheetItem());
     526    table->item(9, 2)->setBackgroundColor(Qt::lightGray);
    526527
    527528    // column 3
     
    624625    PrintView view;
    625626    view.setModel(table->model());
    626     connect(&dlg, SIGNAL(paintRequested(QPrinter *)),
    627             &view, SLOT(print(QPrinter *)));
     627    connect(&dlg, SIGNAL(paintRequested(QPrinter*)),
     628            &view, SLOT(print(QPrinter*)));
    628629    dlg.exec();
    629630#endif
  • trunk/demos/spreadsheet/spreadsheet.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/spreadsheet/spreadsheet.pro

    r2 r561  
    2828# install
    2929target.path = $$[QT_INSTALL_DEMOS]/spreadsheet
    30 sources.files = $$SOURCES $$RESOURCES *.pro images
     30sources.files = $$SOURCES $$RESOURCES *.pro images $$HEADERS
    3131sources.path = $$[QT_INSTALL_DEMOS]/spreadsheet
    3232INSTALLS += target sources
    3333
     34symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/spreadsheet/spreadsheetdelegate.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5252    if (index.column() == 1) {
    5353        QDateTimeEdit *editor = new QDateTimeEdit(parent);
    54         editor->setDisplayFormat("dd/M/yyy");
     54        editor->setDisplayFormat("dd/M/yyyy");
    5555        editor->setCalendarPopup(true);
    5656        return editor;
     
    9494            dateEditor->setDate(QDate::fromString(
    9595            index.model()->data(index, Qt::EditRole).toString(),
    96             "d/M/yy"));
     96            "d/M/yyyy"));
    9797        }
    9898    }
     
    108108        QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor);
    109109        if (dateEditor) {
    110             model->setData(index, dateEditor->date().toString("dd/M/yyy"));
     110            model->setData(index, dateEditor->date().toString("dd/M/yyyy"));
    111111        }
    112112    }
  • trunk/demos/spreadsheet/spreadsheetdelegate.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/spreadsheet/spreadsheetitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/spreadsheet/spreadsheetitem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/browser.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/browser.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/connectionwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/connectionwidget.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/qsqlconnectiondialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/qsqlconnectiondialog.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/sqlbrowser/sqlbrowser.pro

    r493 r561  
    2222INSTALLS += target sources
    2323
     24symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
     25
    2426wince*: {
    2527    DEPLOYMENT_PLUGIN += qsqlite
  • trunk/demos/textedit/example.html

    r224 r561  
    2727<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Images</span></p>
    2828<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Inline images are treated like ordinary ranges of characters in the text editor, so they flow with the surrounding text. Images can also be selected in the same way as text, making it easy to cut, copy, and paste them. </span></p>
    29 <p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and pasting it into different parts of this document.</span></p>
     29<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and paste it into different parts of this document.</span></p>
    3030<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Tables</span></p>
    3131<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">QTextEdit can arrange and format tables, supporting features such as row and column spans, text formatting within cells, and size constraints for columns. </span></p>
  • trunk/demos/textedit/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/textedit/textedit.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7676    : QMainWindow(parent)
    7777{
     78    setToolButtonStyle(Qt::ToolButtonFollowStyle);
    7879    setupFileActions();
    7980    setupEditActions();
     
    8889
    8990    textEdit = new QTextEdit(this);
    90     connect(textEdit, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)),
    91             this, SLOT(currentCharFormatChanged(const QTextCharFormat &)));
     91    connect(textEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)),
     92            this, SLOT(currentCharFormatChanged(QTextCharFormat)));
    9293    connect(textEdit, SIGNAL(cursorPositionChanged()),
    9394            this, SLOT(cursorPositionChanged()));
     
    128129    connect(textEdit, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool)));
    129130
     131#ifndef QT_NO_CLIPBOARD
    130132    connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
     133#endif
    131134
    132135    QString initialFile = ":/example.html";
     
    158161    QAction *a;
    159162
    160     a = new QAction(QIcon(rsrcPath + "/filenew.png"), tr("&New"), this);
     163    QIcon newIcon = QIcon::fromTheme("document-new", QIcon(rsrcPath + "/filenew.png"));
     164    a = new QAction( newIcon, tr("&New"), this);
     165    a->setPriority(QAction::LowPriority);
    161166    a->setShortcut(QKeySequence::New);
    162167    connect(a, SIGNAL(triggered()), this, SLOT(fileNew()));
     
    164169    menu->addAction(a);
    165170
    166     a = new QAction(QIcon(rsrcPath + "/fileopen.png"), tr("&Open..."), this);
     171    a = new QAction(QIcon::fromTheme("document-open", QIcon(rsrcPath + "/fileopen.png")),
     172                    tr("&Open..."), this);
    167173    a->setShortcut(QKeySequence::Open);
    168174    connect(a, SIGNAL(triggered()), this, SLOT(fileOpen()));
     
    172178    menu->addSeparator();
    173179
    174     actionSave = a = new QAction(QIcon(rsrcPath + "/filesave.png"), tr("&Save"), this);
     180    actionSave = a = new QAction(QIcon::fromTheme("document-save", QIcon(rsrcPath + "/filesave.png")),
     181                                 tr("&Save"), this);
    175182    a->setShortcut(QKeySequence::Save);
    176183    connect(a, SIGNAL(triggered()), this, SLOT(fileSave()));
     
    180187
    181188    a = new QAction(tr("Save &As..."), this);
     189    a->setPriority(QAction::LowPriority);
    182190    connect(a, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
    183191    menu->addAction(a);
     
    185193
    186194#ifndef QT_NO_PRINTER
    187     a = new QAction(QIcon(rsrcPath + "/fileprint.png"), tr("&Print..."), this);
     195    a = new QAction(QIcon::fromTheme("document-print", QIcon(rsrcPath + "/fileprint.png")),
     196                    tr("&Print..."), this);
     197    a->setPriority(QAction::LowPriority);   
    188198    a->setShortcut(QKeySequence::Print);
    189199    connect(a, SIGNAL(triggered()), this, SLOT(filePrint()));
     
    191201    menu->addAction(a);
    192202
    193     a = new QAction(QIcon(rsrcPath + "/fileprint.png"), tr("Print Preview..."), this);
     203    a = new QAction(QIcon::fromTheme("fileprint", QIcon(rsrcPath + "/fileprint.png")),
     204                    tr("Print Preview..."), this);
    194205    connect(a, SIGNAL(triggered()), this, SLOT(filePrintPreview()));
    195206    menu->addAction(a);
    196207
    197     a = new QAction(QIcon(rsrcPath + "/exportpdf.png"), tr("&Export PDF..."), this);
     208    a = new QAction(QIcon::fromTheme("exportpdf", QIcon(rsrcPath + "/exportpdf.png")),
     209    tr("&Export PDF..."), this);
     210    a->setPriority(QAction::LowPriority);
    198211    a->setShortcut(Qt::CTRL + Qt::Key_D);
    199212    connect(a, SIGNAL(triggered()), this, SLOT(filePrintPdf()));
     
    215228    tb->setWindowTitle(tr("Edit Actions"));
    216229    addToolBar(tb);
    217 
    218230    QMenu *menu = new QMenu(tr("&Edit"), this);
    219231    menuBar()->addMenu(menu);
    220232
    221233    QAction *a;
    222     a = actionUndo = new QAction(QIcon(rsrcPath + "/editundo.png"), tr("&Undo"), this);
     234    a = actionUndo = new QAction(QIcon::fromTheme("edit-undo", QIcon(rsrcPath + "/editundo.png")),
     235                                              tr("&Undo"), this);
    223236    a->setShortcut(QKeySequence::Undo);
    224237    tb->addAction(a);
    225238    menu->addAction(a);
    226     a = actionRedo = new QAction(QIcon(rsrcPath + "/editredo.png"), tr("&Redo"), this);
     239    a = actionRedo = new QAction(QIcon::fromTheme("edit-redo", QIcon(rsrcPath + "/editredo.png")),
     240                                              tr("&Redo"), this);
     241    a->setPriority(QAction::LowPriority);
    227242    a->setShortcut(QKeySequence::Redo);
    228243    tb->addAction(a);
    229244    menu->addAction(a);
    230245    menu->addSeparator();
    231     a = actionCut = new QAction(QIcon(rsrcPath + "/editcut.png"), tr("Cu&t"), this);
     246    a = actionCut = new QAction(QIcon::fromTheme("edit-cut", QIcon(rsrcPath + "/editcut.png")),
     247                                             tr("Cu&t"), this);
     248    a->setPriority(QAction::LowPriority);
    232249    a->setShortcut(QKeySequence::Cut);
    233250    tb->addAction(a);
    234251    menu->addAction(a);
    235     a = actionCopy = new QAction(QIcon(rsrcPath + "/editcopy.png"), tr("&Copy"), this);
     252    a = actionCopy = new QAction(QIcon::fromTheme("edit-copy", QIcon(rsrcPath + "/editcopy.png")),
     253                                 tr("&Copy"), this);
     254    a->setPriority(QAction::LowPriority);
    236255    a->setShortcut(QKeySequence::Copy);
    237256    tb->addAction(a);
    238257    menu->addAction(a);
    239     a = actionPaste = new QAction(QIcon(rsrcPath + "/editpaste.png"), tr("&Paste"), this);
     258    a = actionPaste = new QAction(QIcon::fromTheme("edit-paste", QIcon(rsrcPath + "/editpaste.png")),
     259                                  tr("&Paste"), this);
     260    a->setPriority(QAction::LowPriority);
    240261    a->setShortcut(QKeySequence::Paste);
    241262    tb->addAction(a);
    242263    menu->addAction(a);
     264#ifndef QT_NO_CLIPBOARD
    243265    actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
     266#endif
    244267}
    245268
     
    253276    menuBar()->addMenu(menu);
    254277
    255     actionTextBold = new QAction(QIcon(rsrcPath + "/textbold.png"), tr("&Bold"), this);
     278    actionTextBold = new QAction(QIcon::fromTheme("format-text-bold", QIcon(rsrcPath + "/textbold.png")),
     279                                 tr("&Bold"), this);
    256280    actionTextBold->setShortcut(Qt::CTRL + Qt::Key_B);
    257     QFont bold;
     281    actionTextBold->setPriority(QAction::LowPriority);
     282        QFont bold;
    258283    bold.setBold(true);
    259284    actionTextBold->setFont(bold);
     
    263288    actionTextBold->setCheckable(true);
    264289
    265     actionTextItalic = new QAction(QIcon(rsrcPath + "/textitalic.png"), tr("&Italic"), this);
     290    actionTextItalic = new QAction(QIcon::fromTheme("format-text-italic", QIcon(rsrcPath + "/textitalic.png")),
     291                                   tr("&Italic"), this);
     292    actionTextItalic->setPriority(QAction::LowPriority);
    266293    actionTextItalic->setShortcut(Qt::CTRL + Qt::Key_I);
    267294    QFont italic;
     
    273300    actionTextItalic->setCheckable(true);
    274301
    275     actionTextUnderline = new QAction(QIcon(rsrcPath + "/textunder.png"), tr("&Underline"), this);
     302    actionTextUnderline = new QAction(QIcon::fromTheme("format-text-underline", QIcon(rsrcPath + "/textunder.png")),
     303                                      tr("&Underline"), this);
    276304    actionTextUnderline->setShortcut(Qt::CTRL + Qt::Key_U);
     305    actionTextUnderline->setPriority(QAction::LowPriority);
    277306    QFont underline;
    278307    underline.setUnderline(true);
     
    286315
    287316    QActionGroup *grp = new QActionGroup(this);
    288     connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(textAlign(QAction *)));
     317    connect(grp, SIGNAL(triggered(QAction*)), this, SLOT(textAlign(QAction*)));
    289318
    290319    // Make sure the alignLeft  is always left of the alignRight
    291320    if (QApplication::isLeftToRight()) {
    292         actionAlignLeft = new QAction(QIcon(rsrcPath + "/textleft.png"), tr("&Left"), grp);
    293         actionAlignCenter = new QAction(QIcon(rsrcPath + "/textcenter.png"), tr("C&enter"), grp);
    294         actionAlignRight = new QAction(QIcon(rsrcPath + "/textright.png"), tr("&Right"), grp);
     321        actionAlignLeft = new QAction(QIcon::fromTheme("format-justify-left", QIcon(rsrcPath + "/textleft.png")),
     322                                      tr("&Left"), grp);
     323        actionAlignCenter = new QAction(QIcon::fromTheme("format-justify-center", QIcon(rsrcPath + "/textcenter.png")), tr("C&enter"), grp);
     324        actionAlignRight = new QAction(QIcon::fromTheme("format-justify-right", QIcon(rsrcPath + "/textright.png")), tr("&Right"), grp);
    295325    } else {
    296         actionAlignRight = new QAction(QIcon(rsrcPath + "/textright.png"), tr("&Right"), grp);
    297         actionAlignCenter = new QAction(QIcon(rsrcPath + "/textcenter.png"), tr("C&enter"), grp);
    298         actionAlignLeft = new QAction(QIcon(rsrcPath + "/textleft.png"), tr("&Left"), grp);
    299     }
    300     actionAlignJustify = new QAction(QIcon(rsrcPath + "/textjustify.png"), tr("&Justify"), grp);
     326        actionAlignRight = new QAction(QIcon::fromTheme("format-justify-right", QIcon(rsrcPath + "/textright.png")), tr("&Right"), grp);
     327        actionAlignCenter = new QAction(QIcon::fromTheme("format-justify-center", QIcon(rsrcPath + "/textcenter.png")), tr("C&enter"), grp);
     328        actionAlignLeft = new QAction(QIcon::fromTheme("format-justify-left", QIcon(rsrcPath + "/textleft.png")), tr("&Left"), grp);
     329    }
     330    actionAlignJustify = new QAction(QIcon::fromTheme("format-justify-fill", QIcon(rsrcPath + "/textjustify.png")), tr("&Justify"), grp);
    301331
    302332    actionAlignLeft->setShortcut(Qt::CTRL + Qt::Key_L);
    303333    actionAlignLeft->setCheckable(true);
     334    actionAlignLeft->setPriority(QAction::LowPriority);
    304335    actionAlignCenter->setShortcut(Qt::CTRL + Qt::Key_E);
    305336    actionAlignCenter->setCheckable(true);
     337    actionAlignCenter->setPriority(QAction::LowPriority);
    306338    actionAlignRight->setShortcut(Qt::CTRL + Qt::Key_R);
    307339    actionAlignRight->setCheckable(true);
     340    actionAlignRight->setPriority(QAction::LowPriority);
    308341    actionAlignJustify->setShortcut(Qt::CTRL + Qt::Key_J);
    309342    actionAlignJustify->setCheckable(true);
     343    actionAlignJustify->setPriority(QAction::LowPriority);
    310344
    311345    tb->addActions(grp->actions());
     
    337371    comboStyle->addItem("Ordered List (Alpha lower)");
    338372    comboStyle->addItem("Ordered List (Alpha upper)");
     373    comboStyle->addItem("Ordered List (Roman lower)");
     374    comboStyle->addItem("Ordered List (Roman upper)");
    339375    connect(comboStyle, SIGNAL(activated(int)),
    340376            this, SLOT(textStyle(int)));
     
    342378    comboFont = new QFontComboBox(tb);
    343379    tb->addWidget(comboFont);
    344     connect(comboFont, SIGNAL(activated(const QString &)),
    345             this, SLOT(textFamily(const QString &)));
     380    connect(comboFont, SIGNAL(activated(QString)),
     381            this, SLOT(textFamily(QString)));
    346382
    347383    comboSize = new QComboBox(tb);
     
    354390        comboSize->addItem(QString::number(size));
    355391
    356     connect(comboSize, SIGNAL(activated(const QString &)),
    357             this, SLOT(textSize(const QString &)));
     392    connect(comboSize, SIGNAL(activated(QString)),
     393            this, SLOT(textSize(QString)));
    358394    comboSize->setCurrentIndex(comboSize->findText(QString::number(QApplication::font()
    359395                                                                   .pointSize())));
     
    476512    QPrinter printer(QPrinter::HighResolution);
    477513    QPrintPreviewDialog preview(&printer, this);
    478     connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter *)));
     514    connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*)));
    479515    preview.exec();
    480516#endif
     
    574610                style = QTextListFormat::ListUpperAlpha;
    575611                break;
     612            case 7:
     613                style = QTextListFormat::ListLowerRoman;
     614                break;
     615            case 8:
     616                style = QTextListFormat::ListUpperRoman;
     617                break;
    576618        }
    577619
     
    639681void TextEdit::clipboardDataChanged()
    640682{
     683#ifndef QT_NO_CLIPBOARD
    641684    actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
     685#endif
    642686}
    643687
  • trunk/demos/textedit/textedit.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/textedit/textedit.pro

    r2 r561  
    2020INSTALLS += target sources
    2121
     22symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  • trunk/demos/undo/commands.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/commands.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/document.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/document.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/mainwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/mainwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the demonstration applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/demos/undo/undo.pro

    r2 r561  
    1616INSTALLS += target sources
    1717
     18symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
Note: See TracChangeset for help on using the changeset viewer.