Changeset 561 for trunk/demos
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 213 edited
- 259 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/demos/affine/affine.pro
r2 r561 19 19 INSTALLS += target sources 20 20 21 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 22 21 23 wince*: { 22 24 DEPLOYMENT_PLUGIN += qjpeg -
trunk/demos/affine/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 QList<QWidget *> widgets = qFindChildren<QWidget *>(&xformWidget); 57 foreach (QWidget *w, widgets) 57 foreach (QWidget *w, widgets) { 58 58 w->setStyle(arthurStyle); 59 w->setAttribute(Qt::WA_AcceptTouchEvents); 60 } 59 61 60 62 xformWidget.show(); -
trunk/demos/affine/xform.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 69 69 ctrlPoints << QPointF(250, 250) << QPointF(350, 250); 70 70 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))); 73 73 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 74 74 } … … 896 896 view->reset(); 897 897 vectorType->setChecked(true); 898 textEditor->setText("Qt Software");898 textEditor->setText("Qt Affine Transformation Demo"); 899 899 textEditor->setEnabled(false); 900 900 -
trunk/demos/affine/xform.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/arthurplugin/arthurplugin.pro
r490 r561 46 46 INSTALLS += target sources 47 47 48 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 49 48 50 win32-msvc* { 49 51 QMAKE_CFLAGS += /Zm500 -
trunk/demos/arthurplugin/plugin.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 56 56 QT_FORWARD_DECLARE_CLASS(QDesignerFormEditorInterface) 57 57 58 static inline QString customWidgetDomXml(const QString &className) 58 // Specify "text" to be a singleline property (no richtext) 59 static 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 76 static inline QString customWidgetDomXml(const QString &className, 77 const QString &customSection = QString()) 59 78 { 60 79 QString rc = QLatin1String("<ui language=\"c++\"><widget class=\""); … … 64 83 objectName[0] = objectName.at(0).toLower(); 65 84 rc += objectName; 66 rc += QLatin1String("\"/></ui>"); 85 rc += QLatin1String("\"/>"); 86 rc += customSection; 87 rc += QLatin1String("</ui>"); 67 88 return rc; 68 89 } … … 81 102 82 103 protected: 83 DemoPlugin(const QString &className);104 explicit DemoPlugin(const QString &className, const QString &customSection = QString()); 84 105 85 106 public: … … 106 127 }; 107 128 108 DemoPlugin::DemoPlugin(const QString &className ) :129 DemoPlugin::DemoPlugin(const QString &className, const QString &customSection) : 109 130 m_className(className), 110 m_domXml(customWidgetDomXml(className )),131 m_domXml(customWidgetDomXml(className, customSection)), 111 132 m_initialized(false) 112 133 { … … 118 139 119 140 public: 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"); } 122 143 123 144 QWidget *createWidget(QWidget *parent) … … 127 148 deform->setAnimated(false); 128 149 deform->setFontSize(20); 129 deform->setText( "Arthur Widgets Demo");150 deform->setText(QLatin1String("Arthur Widgets Demo")); 130 151 131 152 return deform; … … 133 154 }; 134 155 156 DeformPlugin::DeformPlugin(QObject *parent) : 157 QObject(parent), 158 DemoPlugin(QLatin1String("PathDeformRendererEx"), 159 textSingleLinePropertyDeclaration(QLatin1String("PathDeformRendererEx"))) 160 { 161 } 162 135 163 class XFormRendererEx : public XFormView 136 164 { … … 145 173 Q_OBJECT 146 174 public: 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"); } 149 177 150 178 QWidget *createWidget(QWidget *parent) 151 179 { 152 180 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"))); 155 183 return xform; 156 184 } 157 185 }; 158 186 187 XFormPlugin::XFormPlugin(QObject *parent) : 188 QObject(parent), 189 DemoPlugin(QLatin1String("XFormRendererEx"), 190 textSingleLinePropertyDeclaration(QLatin1String("XFormRendererEx"))) 191 { 192 } 159 193 160 194 class GradientEditorPlugin : public QObject, public DemoPlugin … … 162 196 Q_OBJECT 163 197 public: 164 GradientEditorPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientEditor")) { }198 explicit GradientEditorPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientEditor")) { } 165 199 QString includeFile() const { return "gradients.h"; } 166 200 … … 185 219 public: 186 220 GradientRendererPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientRendererEx")) { } 187 QString includeFile() const { return "gradients.h"; }221 QString includeFile() const { return QLatin1String("gradients.h"); } 188 222 189 223 QWidget *createWidget(QWidget *parent) … … 199 233 Q_OBJECT 200 234 public: 201 PathStrokeRendererEx(QWidget *p) : PathStrokeRenderer(p) { }235 explicit PathStrokeRendererEx(QWidget *p) : PathStrokeRenderer(p) { } 202 236 QSize sizeHint() const { return QSize(300, 200); } 203 237 }; … … 207 241 Q_OBJECT 208 242 public: 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"); } 211 245 212 246 QWidget *createWidget(QWidget *parent) … … 222 256 Q_OBJECT 223 257 public: 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"); } 226 260 227 261 QWidget *createWidget(QWidget *parent) … … 240 274 241 275 public: 242 ArthurPlugins(QObject *parent = 0);276 explicit ArthurPlugins(QObject *parent = 0); 243 277 QList<QDesignerCustomWidgetInterface*> customWidgets() const { return m_plugins; } 244 278 -
trunk/demos/books/bookdelegate.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/books/bookdelegate.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/books/books.pro
r2 r561 14 14 INSTALLS += target sources 15 15 16 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 17 16 18 wince*: { 17 19 CONFIG(debug, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll -
trunk/demos/books/bookwindow.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/books/bookwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/books/initdb.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/books/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/basic.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/basic.vsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/boxes.pro
r2 r561 12 12 glbuffers.h \ 13 13 glextensions.h \ 14 glshaders.h \15 14 gltrianglemesh.h \ 16 15 qtbox.h \ 17 16 roundedbox.h \ 18 17 scene.h \ 19 trackball.h \ 20 vector.h 18 trackball.h 21 19 SOURCES += 3rdparty/fbm.c \ 22 20 glbuffers.cpp \ 23 21 glextensions.cpp \ 24 glshaders.cpp \25 22 main.cpp \ 26 23 qtbox.cpp \ … … 46 43 47 44 win32-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 50 49 } -
trunk/demos/boxes/dotted.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/fresnel.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/glass.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/glbuffers.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 41 41 42 42 #include "glbuffers.h" 43 #include <QtGui/qmatrix4x4.h> 43 44 44 45 //============================================================================// … … 347 348 } 348 349 349 void GLRenderTargetCube::getViewMatrix( gfx::Matrix4x4f& mat, int face)350 void GLRenderTargetCube::getViewMatrix(QMatrix4x4& mat, int face) 350 351 { 351 352 if (face < 0 || face >= 6) { … … 372 373 }; 373 374 374 m emset(mat.bits(), 0, sizeof(float) * 16);375 mat.fill(0.0f); 375 376 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]; 377 378 mat(3, 3) = 1.0f; 378 379 } 379 380 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 } 381 void 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 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 48 48 #include <QtGui> 49 49 #include <QtOpenGL> 50 51 #include "vector.h"52 50 53 51 #define BUFFER_OFFSET(i) ((char*)0 + (i)) … … 60 58 returnStatement; \ 61 59 } 60 61 QT_BEGIN_NAMESPACE 62 class QMatrix4x4; 63 QT_END_NAMESPACE 62 64 63 65 class GLTexture … … 136 138 virtual bool failed() {return m_failed || m_fbo.failed();} 137 139 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); 140 142 private: 141 143 GLFrameBufferObject m_fbo; -
trunk/demos/boxes/glextensions.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 47 47 { 48 48 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)66 49 67 50 RESOLVE_GL_FUNC(GenFramebuffersEXT) … … 87 70 88 71 return ok; 89 }90 91 bool GLExtensionFunctions::glslSupported() {92 return CreateShaderObjectARB93 && CreateShaderObjectARB94 && ShaderSourceARB95 && CompileShaderARB96 && GetObjectParameterivARB97 && DeleteObjectARB98 && GetInfoLogARB99 && CreateProgramObjectARB100 && AttachObjectARB101 && DetachObjectARB102 && LinkProgramARB103 && UseProgramObjectARB104 && GetUniformLocationARB105 && Uniform1iARB106 && Uniform1fARB107 && Uniform4fARB108 && UniformMatrix4fvARB;109 72 } 110 73 -
trunk/demos/boxes/glextensions.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 47 47 /* 48 48 Functions resolved: 49 50 glCreateShaderObjectARB51 glShaderSourceARB52 glCompileShaderARB53 glGetObjectParameterivARB54 glDeleteObjectARB55 glGetInfoLogARB56 glCreateProgramObjectARB57 glAttachObjectARB58 glDetachObjectARB59 glLinkProgramARB60 glUseProgramObjectARB61 glGetUniformLocationARB62 glUniform1iARB63 glUniform1fARB64 glUniform4fARB65 glUniformMatrix4fvARB66 49 67 50 glGenFramebuffersEXT … … 121 104 #endif 122 105 106 #ifndef GL_ARB_vertex_buffer_object 107 typedef ptrdiff_t GLsizeiptrARB; 108 #endif 109 123 110 #ifndef GL_VERSION_1_5 124 typedef ptrdiff_t GLsizeiptr;125 111 #define GL_ARRAY_BUFFER 0x8892 126 112 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 … … 136 122 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00 137 123 #endif 138 139 #ifndef GL_ARB_vertex_shader140 #define GL_VERTEX_SHADER_ARB 0x8B31141 #endif142 143 #ifndef GL_ARB_fragment_shader144 #define GL_FRAGMENT_SHADER_ARB 0x8B30145 #endif146 147 #ifndef GL_ARB_shader_objects148 typedef char GLcharARB;149 typedef unsigned int GLhandleARB;150 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81151 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82152 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84153 #endif154 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 *);171 124 172 125 typedef void (APIENTRY *_glGenFramebuffersEXT) (GLsizei, GLuint *); … … 186 139 typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *); 187 140 typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint); 188 typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptr , const GLvoid *, GLenum);141 typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); 189 142 typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *); 190 143 typedef void *(APIENTRY *_glMapBuffer) (GLenum, GLenum); … … 195 148 bool resolve(const QGLContext *context); 196 149 197 bool glslSupported();198 150 bool fboSupported(); 199 151 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;217 152 218 153 _glGenFramebuffersEXT GenFramebuffersEXT; … … 244 179 } 245 180 246 #define glCreateShaderObjectARB getGLExtensionFunctions().CreateShaderObjectARB247 #define glShaderSourceARB getGLExtensionFunctions().ShaderSourceARB248 #define glCompileShaderARB getGLExtensionFunctions().CompileShaderARB249 #define glGetObjectParameterivARB getGLExtensionFunctions().GetObjectParameterivARB250 #define glDeleteObjectARB getGLExtensionFunctions().DeleteObjectARB251 #define glGetInfoLogARB getGLExtensionFunctions().GetInfoLogARB252 #define glCreateProgramObjectARB getGLExtensionFunctions().CreateProgramObjectARB253 #define glAttachObjectARB getGLExtensionFunctions().AttachObjectARB254 #define glDetachObjectARB getGLExtensionFunctions().DetachObjectARB255 #define glLinkProgramARB getGLExtensionFunctions().LinkProgramARB256 #define glUseProgramObjectARB getGLExtensionFunctions().UseProgramObjectARB257 #define glGetUniformLocationARB getGLExtensionFunctions().GetUniformLocationARB258 #define glUniform1iARB getGLExtensionFunctions().Uniform1iARB259 #define glUniform1fARB getGLExtensionFunctions().Uniform1fARB260 #define glUniform4fARB getGLExtensionFunctions().Uniform4fARB261 #define glUniformMatrix4fvARB getGLExtensionFunctions().UniformMatrix4fvARB262 263 181 #define glGenFramebuffersEXT getGLExtensionFunctions().GenFramebuffersEXT 264 182 #define glGenRenderbuffersEXT getGLExtensionFunctions().GenRenderbuffersEXT -
trunk/demos/boxes/gltrianglemesh.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/granite.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 69 69 { 70 70 int subStringLength = strlen(subString); 71 return (strncmp(extensionString, subString, subStringLength) == 0) 71 return (strncmp(extensionString, subString, subStringLength) == 0) 72 72 && ((extensionString[subStringLength] == ' ') || (extensionString[subStringLength] == '\0')); 73 73 } … … 138 138 "work poorly or not at all on your system."); 139 139 140 widget->makeCurrent(); // The current context must be set before calling Scene's constructor 141 Scene scene(1024, 768, maxTextureSize); 140 142 GraphicsView view; 141 143 view.setViewport(widget); 142 144 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); 145 146 view.show(); 146 147 -
trunk/demos/boxes/marble.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/qtbox.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 123 123 124 124 foreach (QGraphicsItem *item, selected) { 125 ItemBase *itemBase = dynamic_cast<ItemBase *>(item);125 ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item); 126 126 if (itemBase) 127 127 scene->addItem(itemBase->createNew(itemBase->m_size, itemBase->pos().x() + itemBase->m_size, itemBase->pos().y())); … … 138 138 139 139 foreach (QGraphicsItem *item, selected) { 140 ItemBase *itemBase = dynamic_cast<ItemBase *>(item);140 ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item); 141 141 if (itemBase) 142 142 delete itemBase; … … 153 153 154 154 foreach (QGraphicsItem *item, selected) { 155 ItemBase *itemBase = dynamic_cast<ItemBase *>(item);155 ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item); 156 156 if (itemBase) { 157 157 itemBase->prepareGeometryChange(); … … 172 172 173 173 foreach (QGraphicsItem *item, selected) { 174 ItemBase *itemBase = dynamic_cast<ItemBase *>(item);174 ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item); 175 175 if (itemBase) { 176 176 itemBase->prepareGeometryChange(); … … 258 258 } 259 259 260 int ItemBase::type() const 261 { 262 return Type; 263 } 264 265 260 266 bool ItemBase::isInResizeArea(const QPointF &pos) 261 267 { … … 270 276 { 271 277 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); 275 281 } 276 282 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); 285 292 } 286 293 … … 313 320 }; 314 321 322 painter->beginNativePainting(); 323 315 324 glMatrixMode(GL_PROJECTION); 316 325 glPushMatrix(); … … 352 361 353 362 glBegin(GL_TRIANGLE_STRIP); 354 glNormal3fv( m_normals[2 * dir + 0].bits());363 glNormal3fv(reinterpret_cast<float *>(&m_normals[2 * dir + 0])); 355 364 for (int i = 0; i < 2; ++i) { 356 365 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))])); 359 368 } 360 369 } … … 362 371 363 372 glBegin(GL_TRIANGLE_STRIP); 364 glNormal3fv( m_normals[2 * dir + 1].bits());373 glNormal3fv(reinterpret_cast<float *>(&m_normals[2 * dir + 1])); 365 374 for (int i = 0; i < 2; ++i) { 366 375 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))])); 369 378 } 370 379 } … … 385 394 glMatrixMode(GL_PROJECTION); 386 395 glPopMatrix(); 396 397 painter->endNativePainting(); 387 398 388 399 ItemBase::paint(painter, option, widget); -
trunk/demos/boxes/qtbox.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 45 45 #include <QtGui> 46 46 47 #include "vector.h"47 #include <QtGui/qvector3d.h> 48 48 #include "glbuffers.h" 49 49 50 class ItemBase : public Q Object, public QGraphicsItem50 class ItemBase : public QGraphicsItem 51 51 { 52 Q_OBJECT53 52 public: 53 enum { Type = UserType + 1 }; 54 54 55 ItemBase(int size, int x, int y); 55 56 virtual ~ItemBase(); … … 65 66 virtual void keyPressEvent(QKeyEvent *event); 66 67 virtual void wheelEvent(QGraphicsSceneWheelEvent *event); 68 virtual int type() const; 67 69 bool isInResizeArea(const QPointF &pos); 68 70 … … 86 88 virtual ItemBase *createNew(int size, int x, int y); 87 89 private: 88 gfx::Vector3fm_vertices[8];89 gfx::Vector2fm_texCoords[4];90 gfx::Vector3fm_normals[6];90 QVector3D m_vertices[8]; 91 QVector3D m_texCoords[4]; 92 QVector3D m_normals[6]; 91 93 GLTexture *m_texture; 92 94 }; -
trunk/demos/boxes/reflection.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/refraction.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/boxes/roundedbox.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 47 47 48 48 VertexDescription 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 52 53 {VertexDescription::Null, 0, 0, 0, 0}, 53 54 }; … … 79 80 80 81 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); 85 85 int winding = (corner & 1) ^ ((corner >> 1) & 1) ^ (corner >> 2); 86 86 int offsX = ((corner ^ 1) - corner) * vertexCountPerCorner; … … 130 130 131 131 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); 134 135 135 136 vp[vidx].position = scale * pos; 136 137 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); 138 139 139 140 // Corner polygons -
trunk/demos/boxes/roundedbox.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 50 50 51 51 #include "gltrianglemesh.h" 52 #include "vector.h" 52 #include <QtGui/qvector3d.h> 53 #include <QtGui/qvector2d.h> 53 54 #include "glbuffers.h" 54 55 55 56 struct P3T2N3Vertex 56 57 { 57 gfx::Vector3fposition;58 gfx::Vector2ftexCoord;59 gfx::Vector3fnormal;58 QVector3D position; 59 QVector2D texCoord; 60 QVector3D normal; 60 61 static VertexDescription description[]; 61 62 }; -
trunk/demos/boxes/scene.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 41 42 #include <QDebug> 42 43 #include "scene.h" 44 #include <QtGui/qmatrix4x4.h> 45 #include <QtGui/qvector3d.h> 43 46 44 47 #include "3rdparty/fbm.h" … … 343 346 m_parameterEdits << colorEdit; 344 347 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))); 346 349 ++row; 347 350 } else if (type == "float") { … … 351 354 m_parameterEdits << floatEdit; 352 355 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))); 354 357 ++row; 355 358 } … … 485 488 setSceneRect(0, 0, width, height); 486 489 487 m_trackBalls[0] = TrackBall(0.0 005f, gfx::Vector3f::vector(0, 1, 0), TrackBall::Sphere);488 m_trackBalls[1] = TrackBall(0.00 01f, 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); 490 493 491 494 m_renderOptions = new RenderOptionsDialog; … … 494 497 495 498 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))); 498 501 connect(m_renderOptions, SIGNAL(textureChanged(int)), this, SLOT(setTexture(int))); 499 502 connect(m_renderOptions, SIGNAL(shaderChanged(int)), this, SLOT(setShader(int))); … … 532 535 if (m_mainCubemap) 533 536 delete m_mainCubemap; 534 foreach ( GLProgram *program, m_programs)537 foreach (QGLShaderProgram *program, m_programs) 535 538 if (program) delete program; 536 539 if (m_vertexShader) 537 540 delete m_vertexShader; 538 foreach ( GLFragmentShader *shader, m_fragmentShaders)541 foreach (QGLShader *shader, m_fragmentShaders) 539 542 if (shader) delete shader; 540 543 foreach (GLRenderTargetCube *rt, m_cubemaps) … … 550 553 m_box = new GLRoundedBox(0.25f, 1.0f, 10); 551 554 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")); 553 557 554 558 QStringList list; … … 556 560 << ":/res/boxes/cubemap_negy.jpg" << ":/res/boxes/cubemap_posz.jpg" << ":/res/boxes/cubemap_negz.jpg"; 557 561 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(); 562 568 563 569 const int NOISE_SIZE = 128; // for a different size, B and BM in fbm.c must also be changed … … 611 617 files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable); 612 618 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()); 615 622 // The program does not take ownership over the shaders, so store them in a vector so they can be deleted afterwards. 616 program->a ttach(*m_vertexShader);617 program->a ttach(*shader);618 if ( program->failed()) {623 program->addShader(m_vertexShader); 624 program->addShader(shader); 625 if (!program->link()) { 619 626 qWarning("Failed to compile and link shader program"); 620 627 qWarning("Vertex shader log:"); … … 635 642 636 643 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(); 639 646 } 640 647 641 648 if (m_programs.size() == 0) 642 m_programs << new GLProgram;649 m_programs << new QGLShaderProgram; 643 650 644 651 m_renderOptions->emitParameterChanged(); 652 } 653 654 static 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 663 static 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); 645 670 } 646 671 647 672 // If one of the boxes should not be rendered, set excludeBox to its index. 648 673 // 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();674 void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) 675 { 676 QMatrix4x4 invView = view.inverted(); 652 677 653 678 // If multi-texturing is supported, use three saplers. … … 665 690 glDisable(GL_CULL_FACE); 666 691 667 gfx::Matrix4x4fviewRotation(view);692 QMatrix4x4 viewRotation(view); 668 693 viewRotation(3, 0) = viewRotation(3, 1) = viewRotation(3, 2) = 0.0f; 669 694 viewRotation(0, 3) = viewRotation(1, 3) = viewRotation(2, 3) = 0.0f; 670 695 viewRotation(3, 3) = 1.0f; 671 glLoadMatrixf(viewRotation.bits());696 loadMatrix(viewRotation); 672 697 glScalef(20.0f, 20.0f, 20.0f); 673 698 … … 676 701 m_environment->bind(); 677 702 m_environmentProgram->bind(); 678 m_environmentProgram->set Int("tex", 0);679 m_environmentProgram->set Int("env", 1);680 m_environmentProgram->set Int("noise", 2);703 m_environmentProgram->setUniformValue("tex", GLint(0)); 704 m_environmentProgram->setUniformValue("env", GLint(1)); 705 m_environmentProgram->setUniformValue("noise", GLint(2)); 681 706 m_box->draw(); 682 m_environmentProgram-> unbind();707 m_environmentProgram->release(); 683 708 m_environment->unbind(); 684 709 } 685 710 686 glLoadMatrixf(view.bits());711 loadMatrix(view); 687 712 688 713 glEnable(GL_CULL_FACE); … … 694 719 695 720 glPushMatrix(); 696 gfx::Matrix4x4fm;697 m _trackBalls[1].rotation().matrix(m);698 glMultMatrixf(m.bits());721 QMatrix4x4 m; 722 m.rotate(m_trackBalls[1].rotation()); 723 multMatrix(m); 699 724 700 725 glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f); … … 709 734 } 710 735 m_programs[i]->bind(); 711 m_programs[i]->set Int("tex", 0);712 m_programs[i]->set Int("env", 1);713 m_programs[i]->set Int("noise", 2);714 m_programs[i]->set Matrix("view", view);715 m_programs[i]->set Matrix("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); 716 741 m_box->draw(); 717 m_programs[i]-> unbind();742 m_programs[i]->release(); 718 743 719 744 if (glActiveTexture) { … … 727 752 728 753 if (-1 != excludeBox) { 729 gfx::Matrix4x4fm;730 m _trackBalls[0].rotation().matrix(m);731 glMultMatrixf(m.bits());754 QMatrix4x4 m; 755 m.rotate(m_trackBalls[0].rotation()); 756 multMatrix(m); 732 757 733 758 if (glActiveTexture) { … … 739 764 740 765 m_programs[m_currentShader]->bind(); 741 m_programs[m_currentShader]->set Int("tex", 0);742 m_programs[m_currentShader]->set Int("env", 1);743 m_programs[m_currentShader]->set Int("noise", 2);744 m_programs[m_currentShader]->set Matrix("view", view);745 m_programs[m_currentShader]->set Matrix("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); 746 771 m_box->draw(); 747 m_programs[m_currentShader]-> unbind();772 m_programs[m_currentShader]->release(); 748 773 749 774 if (glActiveTexture) { … … 830 855 const int N = (m_updateAllCubemaps ? 1 : 3); 831 856 832 gfx::Matrix4x4fmat;857 QMatrix4x4 mat; 833 858 GLRenderTargetCube::getProjectionMatrix(mat, 0.1f, 100.0f); 834 859 835 860 glMatrixMode(GL_PROJECTION); 836 861 glPushMatrix(); 837 glLoadMatrixf(mat.bits());862 loadMatrix(mat); 838 863 839 864 glMatrixMode(GL_MODELVIEW); 840 865 glPushMatrix(); 841 866 842 gfx::Vector3fcenter;867 QVector3D center; 843 868 844 869 for (int i = m_frame % N; i < m_cubemaps.size(); i += N) { … … 847 872 848 873 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)); 850 876 851 877 for (int face = 0; face < 6; ++face) { … … 853 879 854 880 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); 857 883 858 884 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); … … 886 912 float height = float(painter->device()->height()); 887 913 914 painter->beginNativePainting(); 888 915 setStates(); 889 916 … … 898 925 glMatrixMode(GL_MODELVIEW); 899 926 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); 906 930 renderBoxes(view); 907 931 908 932 defaultStates(); 909 933 ++m_frame; 934 935 painter->endNativePainting(); 910 936 } 911 937 … … 937 963 938 964 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()); 940 966 event->accept(); 941 967 } else { 942 m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());968 m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), QQuaternion()); 943 969 } 944 970 } … … 961 987 962 988 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()); 964 990 event->accept(); 965 991 } … … 983 1009 984 1010 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()); 986 1012 event->accept(); 987 1013 } … … 1022 1048 { 1023 1049 // set the color in all programs 1024 foreach ( GLProgram *program, m_programs) {1050 foreach (QGLShaderProgram *program, m_programs) { 1025 1051 program->bind(); 1026 program->set Color(name, color);1027 program-> unbind();1052 program->setUniformValue(program->uniformLocation(name), QColor(color)); 1053 program->release(); 1028 1054 } 1029 1055 } … … 1032 1058 { 1033 1059 // set the color in all programs 1034 foreach ( GLProgram *program, m_programs) {1060 foreach (QGLShaderProgram *program, m_programs) { 1035 1061 program->bind(); 1036 program->set Float(name, value);1037 program-> unbind();1062 program->setUniformValue(program->uniformLocation(name), value); 1063 program->release(); 1038 1064 } 1039 1065 } -
trunk/demos/boxes/scene.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 51 51 #include "roundedbox.h" 52 52 #include "gltrianglemesh.h" 53 #include "vector.h"54 53 #include "trackball.h" 55 54 #include "glbuffers.h" 56 #include "glshaders.h"57 55 #include "qtbox.h" 58 56 59 57 #define PI 3.14159265358979 58 59 QT_BEGIN_NAMESPACE 60 class QMatrix4x4; 61 QT_END_NAMESPACE 60 62 61 63 class ParameterEdit : public QWidget … … 107 109 class GraphicsWidget : public QGraphicsProxyWidget 108 110 { 111 public: 112 GraphicsWidget() : QGraphicsProxyWidget(0, Qt::Window) {} 109 113 protected: 110 114 virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); … … 196 200 void newItem(ItemDialog::ItemType type); 197 201 protected: 198 void renderBoxes(const gfx::Matrix4x4f&view, int excludeBox = -2);202 void renderBoxes(const QMatrix4x4 &view, int excludeBox = -2); 199 203 void setStates(); 200 204 void setLights(); … … 232 236 GLRenderTargetCube *m_mainCubemap; 233 237 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 }; 242 244 243 245 #endif -
trunk/demos/boxes/trackball.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 41 41 42 42 #include "trackball.h" 43 #include "scene.h" 43 44 44 45 //============================================================================// … … 52 53 , m_mode(mode) 53 54 { 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(); 56 57 m_lastTime = QTime::currentTime(); 57 58 } 58 59 59 TrackBall::TrackBall(float angularVelocity, const gfx::Vector3f& axis, TrackMode mode)60 TrackBall::TrackBall(float angularVelocity, const QVector3D& axis, TrackMode mode) 60 61 : m_axis(axis) 61 62 , m_angularVelocity(angularVelocity) … … 64 65 , m_mode(mode) 65 66 { 66 m_rotation = gfx::Quaternionf::quaternion(1.0f, 0.0f, 0.0f, 0.0f);67 m_rotation = QQuaternion(); 67 68 m_lastTime = QTime::currentTime(); 68 69 } 69 70 70 void TrackBall::push(const QPointF& p, const gfx::Quaternionf&)71 void TrackBall::push(const QPointF& p, const QQuaternion &) 71 72 { 72 73 m_rotation = rotation(); … … 77 78 } 78 79 79 void TrackBall::move(const QPointF& p, const gfx::Quaternionf&transformation)80 void TrackBall::move(const QPointF& p, const QQuaternion &transformation) 80 81 { 81 82 if (!m_pressed) … … 91 92 { 92 93 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; 97 98 } 98 99 break; 99 100 case Sphere: 100 101 { 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); 103 104 if (sqrZ > 0) 104 lastPos3D [2] = sqrt(sqrZ);105 lastPos3D.setZ(sqrt(sqrZ)); 105 106 else 106 107 lastPos3D.normalize(); 107 108 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); 110 111 if (sqrZ > 0) 111 currentPos3D [2] = sqrt(sqrZ);112 currentPos3D.setZ(sqrt(sqrZ)); 112 113 else 113 114 currentPos3D.normalize(); 114 115 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))); 117 118 118 119 m_angularVelocity = angle / msecs; 119 120 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; 122 123 } 123 124 break; 124 125 } 126 125 127 126 128 m_lastPos = p; … … 128 130 } 129 131 130 void TrackBall::release(const QPointF& p, const gfx::Quaternionf&transformation)132 void TrackBall::release(const QPointF& p, const QQuaternion &transformation) 131 133 { 132 134 // Calling move() caused the rotation to stop if the framerate was too low. … … 147 149 } 148 150 149 gfx::QuaternionfTrackBall::rotation() const151 QQuaternion TrackBall::rotation() const 150 152 { 151 153 if (m_paused || m_pressed) … … 154 156 QTime currentTime = QTime::currentTime(); 155 157 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; 157 159 } 158 160 -
trunk/demos/boxes/trackball.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 45 45 #include <QtGui> 46 46 47 #include "vector.h" 47 #include <QtGui/qvector3d.h> 48 #include <QtGui/qquaternion.h> 48 49 49 50 class TrackBall … … 56 57 }; 57 58 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); 59 60 // 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); 63 64 void start(); // starts clock 64 65 void stop(); // stops clock 65 gfx::Quaternionfrotation() const;66 QQuaternion rotation() const; 66 67 private: 67 gfx::Quaternionfm_rotation;68 gfx::Vector3fm_axis;68 QQuaternion m_rotation; 69 QVector3D m_axis; 69 70 float m_angularVelocity; 70 71 -
trunk/demos/boxes/wood.fsh
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/autosaver.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/autosaver.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/bookmarks.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 , m_bookmarkModel(0) 74 74 { 75 connect(this, SIGNAL(entryAdded(BookmarkNode 75 connect(this, SIGNAL(entryAdded(BookmarkNode*)), 76 76 m_saveTimer, SLOT(changeOccurred())); 77 connect(this, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode*)),77 connect(this, SIGNAL(entryRemoved(BookmarkNode*,int,BookmarkNode*)), 78 78 m_saveTimer, SLOT(changeOccurred())); 79 connect(this, SIGNAL(entryChanged(BookmarkNode 79 connect(this, SIGNAL(entryChanged(BookmarkNode*)), 80 80 m_saveTimer, SLOT(changeOccurred())); 81 81 } … … 363 363 , m_bookmarksManager(bookmarkManager) 364 364 { 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*))); 371 371 } 372 372 … … 734 734 , m_bookmarksManager(0) 735 735 { 736 connect(this, SIGNAL(activated( const QModelIndex &)),737 this, SLOT(activated( const QModelIndex &)));736 connect(this, SIGNAL(activated(QModelIndex)), 737 this, SLOT(activated(QModelIndex))); 738 738 setMaxRows(-1); 739 739 setHoverRole(BookmarksModel::UrlStringRole); … … 793 793 tree->header()->resizeSection(0, header); 794 794 tree->header()->setStretchLastSection(true); 795 connect(tree, SIGNAL(activated( const QModelIndex&)),795 connect(tree, SIGNAL(activated(QModelIndex)), 796 796 this, SLOT(open())); 797 797 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))); 800 800 connect(addFolderButton, SIGNAL(clicked()), 801 801 this, SLOT(newFolder())); … … 885 885 setRootIndex(model->index(0, 0)); 886 886 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())); 890 890 setAcceptDrops(true); 891 891 } … … 957 957 button->setText(idx.data().toString()); 958 958 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))); 961 961 menu->setModel(m_bookmarksModel); 962 962 menu->setRootIndex(idx); -
trunk/demos/browser/bookmarks.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/browser.pro
r2 r561 4 4 5 5 CONFIG += qt warn_on 6 contains(QT_BUILD_PARTS, tools): CONFIG += uitools6 contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools 7 7 else: DEFINES += QT_NO_UITOOLS 8 9 release:DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT 8 10 9 11 FORMS += \ … … 79 81 QMAKE_INFO_PLIST = Info_mac.plist 80 82 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 } 81 93 } 82 94 … … 87 99 # install 88 100 target.path = $$[QT_INSTALL_DEMOS]/browser 89 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls 101 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls data 90 102 sources.path = $$[QT_INSTALL_DEMOS]/browser 91 103 INSTALLS += target sources 104 105 symbian { 106 TARGET.UID3 = 0xA000CF70 107 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 108 } -
trunk/demos/browser/browserapplication.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 80 80 , m_localServer(0) 81 81 { 82 QCoreApplication::setOrganizationName(QLatin1String(" Trolltech"));82 QCoreApplication::setOrganizationName(QLatin1String("Qt")); 83 83 QCoreApplication::setApplicationName(QLatin1String("demobrowser")); 84 84 QCoreApplication::setApplicationVersion(QLatin1String("0.1")); … … 206 206 directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName(); 207 207 QWebSettings::setIconDatabasePath(directory); 208 QWebSettings::setOfflineStoragePath(directory); 208 209 209 210 setWindowIcon(QIcon(QLatin1String(":browser.svg"))); … … 247 248 QUrl url = settings.value(QLatin1String("userStyleSheet")).toUrl(); 248 249 defaultSettings->setUserStyleSheetUrl(url); 250 251 defaultSettings->setAttribute(QWebSettings::DnsPrefetchEnabled, true); 249 252 250 253 settings.endGroup(); -
trunk/demos/browser/browserapplication.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/browsermainwindow.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 82 82 , m_reload(0) 83 83 { 84 setToolButtonStyle(Qt::ToolButtonFollowStyle); 84 85 setAttribute(Qt::WA_DeleteOnClose, true); 85 86 statusBar()->setSizeGripEnabled(true); … … 90 91 BookmarksModel *boomarksModel = BrowserApplication::bookmarksManager()->bookmarksModel(); 91 92 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))); 94 95 connect(m_bookmarksToolbar->toggleViewAction(), SIGNAL(toggled(bool)), 95 96 this, SLOT(updateBookmarksToolbarActionText(bool))); … … 109 110 setCentralWidget(centralWidget); 110 111 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))); 119 120 connect(m_tabWidget, SIGNAL(loadProgress(int)), 120 121 this, SLOT(slotLoadProgress(int))); 121 122 connect(m_tabWidget, SIGNAL(tabsChanged()), 122 123 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*))); 127 128 connect(m_tabWidget, SIGNAL(menuBarVisibilityChangeRequested(bool)), 128 129 menuBar(), SLOT(setVisible(bool))); … … 369 370 // History 370 371 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))); 375 376 historyMenu->setTitle(tr("Hi&story")); 376 377 menuBar()->addMenu(historyMenu); … … 404 405 // Bookmarks 405 406 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))); 410 411 bookmarksMenu->setTitle(tr("&Bookmarks")); 411 412 menuBar()->addMenu(bookmarksMenu); … … 455 456 connect(m_historyBackMenu, SIGNAL(aboutToShow()), 456 457 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*))); 459 460 m_navigationBar->addAction(m_historyBack); 460 461 … … 463 464 connect(m_historyForwardMenu, SIGNAL(aboutToShow()), 464 465 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*))); 467 468 m_historyForward->setMenu(m_historyForwardMenu); 468 469 m_navigationBar->addAction(m_historyForward); … … 478 479 m_toolbarSearch = new ToolbarSearch(m_navigationBar); 479 480 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))); 481 482 482 483 m_chaseWidget = new ChaseWidget(this); … … 487 488 { 488 489 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))); 491 492 dialog->show(); 492 493 } … … 550 551 } 551 552 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 http590 if (url.scheme().isEmpty())591 url = QUrl::fromEncoded("http://" + string.toUtf8(), QUrl::TolerantMode);592 return url;593 553 } 594 554 … … 677 637 return; 678 638 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*))); 681 641 dialog->exec(); 682 642 #endif … … 740 700 int ret = QMessageBox::warning(this, QString(), 741 701 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()), 743 703 QMessageBox::Yes | QMessageBox::No, 744 704 QMessageBox::No); … … 839 799 QSettings settings; 840 800 settings.beginGroup(QLatin1String("MainWindow")); 841 QString home = settings.value(QLatin1String("home"), QLatin1String("http://qt software.com/")).toString();801 QString home = settings.value(QLatin1String("home"), QLatin1String("http://qt.nokia.com/")).toString(); 842 802 loadPage(home); 843 803 } … … 873 833 void BrowserMainWindow::loadPage(const QString &page) 874 834 { 875 QUrl url = guessUrlFromString(page);835 QUrl url = QUrl::fromUserInput(page); 876 836 loadUrl(url); 877 837 } -
trunk/demos/browser/browsermainwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 69 69 70 70 public: 71 static QUrl guessUrlFromString(const QString &url);72 71 TabWidget *tabWidget() const; 73 72 WebView *currentTab() const; -
trunk/demos/browser/chasewidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/chasewidget.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/cookiejar.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 669 669 domainLineEdit->setCompleter(new QCompleter(cookieModel, domainLineEdit)); 670 670 671 connect(domainLineEdit, SIGNAL(textChanged( const QString &)),672 this, SLOT(textChanged( const QString &)));671 connect(domainLineEdit, SIGNAL(textChanged(QString)), 672 this, SLOT(textChanged(QString))); 673 673 connect(blockButton, SIGNAL(clicked()), this, SLOT(block())); 674 674 connect(allowButton, SIGNAL(clicked()), this, SLOT(allow())); -
trunk/demos/browser/cookiejar.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/data/defaultbookmarks.xbel
r2 r561 4 4 <folder folded="yes"> 5 5 <title>Bookmarks Bar</title> 6 <bookmark href="http://qt software.com/">7 <title>Qt Software</title>6 <bookmark href="http://qt.nokia.com/"> 7 <title>Qt Home Page</title> 8 8 </bookmark> 9 9 <bookmark href="http://webkit.org/"> 10 10 <title>WebKit.org</title> 11 11 </bookmark> 12 <bookmark href="http:// doc.trolltech.com/">12 <bookmark href="http://qt.nokia.com/doc/"> 13 13 <title>Qt Documentation</title> 14 14 </bookmark> 15 <bookmark href="http:// doc.trolltech.com/qq/">15 <bookmark href="http://qt.nokia.com/doc/qq/"> 16 16 <title>Qt Quarterly</title> 17 17 </bookmark> 18 <bookmark href="http://labs. trolltech.com/">18 <bookmark href="http://labs.qt.nokia.com/"> 19 19 <title>Qt Labs</title> 20 20 </bookmark> … … 31 31 <title>xkcd</title> 32 32 </bookmark> 33 <bookmark href="http://twitter.com/qtbynokia"> 34 <title>Twitter</title> 35 </bookmark> 33 36 </folder> 34 37 <folder folded="yes"> -
trunk/demos/browser/downloadmanager.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 95 95 connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), 96 96 this, SLOT(error(QNetworkReply::NetworkError))); 97 connect(m_reply, SIGNAL(downloadProgress(qint64, 98 this, SLOT(downloadProgress(qint64, 97 connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)), 98 this, SLOT(downloadProgress(qint64,qint64))); 99 99 connect(m_reply, SIGNAL(metaDataChanged()), 100 100 this, SLOT(metaDataChanged())); -
trunk/demos/browser/downloadmanager.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittableview.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittableview.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittreeview.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/edittreeview.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/history.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 78 78 connect(&m_expiredTimer, SIGNAL(timeout()), 79 79 this, SLOT(checkForExpired())); 80 connect(this, SIGNAL(entryAdded( const HistoryItem &)),80 connect(this, SIGNAL(entryAdded(HistoryItem)), 81 81 m_saveTimer, SLOT(changeOccurred())); 82 connect(this, SIGNAL(entryRemoved( const HistoryItem &)),82 connect(this, SIGNAL(entryRemoved(HistoryItem)), 83 83 m_saveTimer, SLOT(changeOccurred())); 84 84 load(); … … 370 370 connect(m_history, SIGNAL(historyReset()), 371 371 this, SLOT(historyReset())); 372 connect(m_history, SIGNAL(entryRemoved( const HistoryItem &)),372 connect(m_history, SIGNAL(entryRemoved(HistoryItem)), 373 373 this, SLOT(historyReset())); 374 374 375 connect(m_history, SIGNAL(entryAdded( const HistoryItem &)),375 connect(m_history, SIGNAL(entryAdded(HistoryItem)), 376 376 this, SLOT(entryAdded())); 377 377 connect(m_history, SIGNAL(entryUpdated(int)), … … 596 596 , m_history(0) 597 597 { 598 connect(this, SIGNAL(activated( const QModelIndex &)),599 this, SLOT(activated( const QModelIndex &)));598 connect(this, SIGNAL(activated(QModelIndex)), 599 this, SLOT(activated(QModelIndex))); 600 600 setHoverRole(HistoryModel::UrlStringRole); 601 601 } … … 640 640 { 641 641 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))); 644 644 dialog->show(); 645 645 } … … 688 688 tree->header()->resizeSection(0, header); 689 689 tree->header()->setStretchLastSection(true); 690 connect(tree, SIGNAL(activated( const QModelIndex&)),690 connect(tree, SIGNAL(activated(QModelIndex)), 691 691 this, SLOT(open())); 692 692 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))); 695 695 } 696 696 … … 752 752 if (sourceModel()) { 753 753 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))); 760 760 } 761 761 … … 765 765 m_loaded = false; 766 766 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))); 773 773 } 774 774 } … … 907 907 return false; 908 908 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))); 911 911 beginRemoveRows(parent, row, lastRow); 912 912 int oldCount = rowCount(); … … 915 915 sourceModel()->removeRows(start, end - start + 1); 916 916 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))); 919 919 m_loaded = false; 920 920 if (oldCount - count != rowCount()) … … 989 989 if (sourceModel()) { 990 990 disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 991 disconnect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),991 disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), 992 992 this, SLOT(sourceReset())); 993 disconnect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),993 disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), 994 994 this, SLOT(sourceReset())); 995 995 } … … 999 999 if (newSourceModel) { 1000 1000 connect(newSourceModel, SIGNAL(modelReset()), this, SLOT(sourceReset())); 1001 connect(sourceModel(), SIGNAL(rowsInserted( const QModelIndex &, int,int)),1001 connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), 1002 1002 this, SLOT(sourceReset())); 1003 connect(sourceModel(), SIGNAL(rowsRemoved( const QModelIndex &, int,int)),1003 connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), 1004 1004 this, SLOT(sourceReset())); 1005 1005 } … … 1178 1178 disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 1179 1179 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))); 1184 1184 } 1185 1185 … … 1189 1189 connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); 1190 1190 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))); 1195 1195 } 1196 1196 -
trunk/demos/browser/history.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/htmls/notfound.html
r2 r561 50 50 <h2>When connecting to: %3.</h2> 51 51 <ul> 52 <li>Check the address for errors such as <b>ww</b>. trolltech.com53 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> 54 54 <li>If the address is correct, try checking the network 55 55 connection.</li> -
trunk/demos/browser/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/modelmenu.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/modelmenu.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/networkaccessmanager.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 #include <QtNetwork/QNetworkDiskCache> 59 59 #include <QtNetwork/QNetworkProxy> 60 #include <QtNetwork/QNetworkRequest> 60 61 #include <QtNetwork/QNetworkReply> 61 62 #include <QtNetwork/QSslError> 62 63 63 64 NetworkAccessManager::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*)), 67 70 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*))); 70 75 #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>))); 73 78 #endif 74 79 loadSettings(); … … 78 83 diskCache->setCacheDirectory(location); 79 84 setCache(diskCache); 85 } 86 87 QNetworkReply* 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 96 void 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 80 117 } 81 118 -
trunk/demos/browser/networkaccessmanager.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 44 44 45 45 #include <QtNetwork/QNetworkAccessManager> 46 #include <QtNetwork/QNetworkRequest> 46 47 47 48 class NetworkAccessManager : public QNetworkAccessManager … … 52 53 NetworkAccessManager(QObject *parent = 0); 53 54 55 virtual QNetworkReply* createRequest ( Operation op, const QNetworkRequest & req, QIODevice * outgoingData = 0 ); 56 54 57 private: 55 58 QList<QString> sslTrustedHostList; 59 qint64 requestFinishedCount; 60 qint64 requestFinishedFromCacheCount; 61 qint64 requestFinishedPipelinedCount; 62 qint64 requestFinishedSecureCount; 56 63 57 64 public slots: 58 65 void loadSettings(); 66 void requestFinished(QNetworkReply *reply); 59 67 60 68 private slots: -
trunk/demos/browser/searchlineedit.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 51 51 : QAbstractButton(parent) 52 52 { 53 #ifndef QT_NO_CURSOR 53 54 setCursor(Qt::ArrowCursor); 55 #endif // QT_NO_CURSOR 54 56 setToolTip(tr("Clear")); 55 57 setVisible(false); … … 104 106 { 105 107 setObjectName(QLatin1String("SearchButton")); 108 #ifndef QT_NO_CURSOR 106 109 setCursor(Qt::ArrowCursor); 110 #endif //QT_NO_CURSOR 107 111 setFocusPolicy(Qt::NoFocus); 108 112 } … … 166 170 m_searchButton(new SearchButton(this)) 167 171 { 168 connect(lineEdit(), SIGNAL(textChanged( const QString &)),169 this, SIGNAL(textChanged( const QString &)));172 connect(lineEdit(), SIGNAL(textChanged(QString)), 173 this, SIGNAL(textChanged(QString))); 170 174 setLeftWidget(m_searchButton); 171 175 m_inactiveText = tr("Search"); -
trunk/demos/browser/searchlineedit.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/settings.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 90 90 QSettings settings; 91 91 settings.beginGroup(QLatin1String("MainWindow")); 92 QString defaultHome = QLatin1String("http://qt software.com");92 QString defaultHome = QLatin1String("http://qt.nokia.com"); 93 93 homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString()); 94 94 settings.endGroup(); -
trunk/demos/browser/settings.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/squeezelabel.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/squeezelabel.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/tabwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 65 65 setContextMenuPolicy(Qt::CustomContextMenu); 66 66 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))); 69 69 70 70 QString alt = QLatin1String("Alt+%1"); … … 222 222 connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(reloadTab(int))); 223 223 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))); 225 225 setTabBar(m_tabBar); 226 226 setDocumentMode(true); … … 258 258 connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), 259 259 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*))); 262 262 m_recentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this); 263 263 m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu); … … 305 305 WebView *oldWebView = this->webView(m_lineEdits->currentIndex()); 306 306 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))); 311 311 disconnect(oldWebView, SIGNAL(loadProgress(int)), 312 312 this, SIGNAL(loadProgress(int))); 313 313 } 314 314 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))); 319 319 connect(webView, SIGNAL(loadProgress(int)), 320 320 this, SIGNAL(loadProgress(int))); … … 451 451 connect(webView, SIGNAL(iconChanged()), 452 452 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))); 457 457 connect(webView->page(), SIGNAL(windowCloseRequested()), 458 458 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*))); 463 463 connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)), 464 464 this, SIGNAL(menuBarVisibilityChangeRequested(bool))); … … 561 561 hasFocus = tab->hasFocus(); 562 562 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 } 567 570 } 568 571 QWidget *lineEdit = m_lineEdits->widget(index); … … 762 765 return; 763 766 connect(m_root, SIGNAL(triggered()), this, SLOT(rootTriggered())); 764 connect(root, SIGNAL(destroyed(QObject 767 connect(root, SIGNAL(destroyed(QObject*)), this, SLOT(rootDestroyed())); 765 768 root->setEnabled(false); 766 769 } … … 811 814 { 812 815 if (m_currentParent) 813 disconnect(m_currentParent, SIGNAL(destroyed(QObject 816 disconnect(m_currentParent, SIGNAL(destroyed(QObject*)), 814 817 this, SLOT(currentDestroyed())); 815 818 … … 825 828 m_root->setChecked(source->isChecked()); 826 829 m_root->setEnabled(source->isEnabled()); 827 connect(m_currentParent, SIGNAL(destroyed(QObject 830 connect(m_currentParent, SIGNAL(destroyed(QObject*)), 828 831 this, SLOT(currentDestroyed())); 829 832 } -
trunk/demos/browser/tabwidget.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/toolbarsearch.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/toolbarsearch.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/urllineedit.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 88 88 connect(m_clearButton, SIGNAL(clicked()), 89 89 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))); 92 92 } 93 93 … … 271 271 m_webView = webView; 272 272 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))); 275 275 connect(webView, SIGNAL(loadFinished(bool)), 276 276 this, SLOT(webViewIconChanged())); -
trunk/demos/browser/urllineedit.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/webview.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 #include <QtWebKit/QWebHitTestResult> 56 56 57 #ifndef QT_NO_UITOOLS 57 58 #include <QtUiTools/QUiLoader> 59 #endif //QT_NO_UITOOLS 58 60 59 61 #include <QtCore/QDebug> … … 67 69 { 68 70 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*))); 71 73 } 72 74 … … 150 152 bool isOpened = file.open(QIODevice::ReadOnly); 151 153 Q_ASSERT(isOpened); 154 Q_UNUSED(isOpened) 155 152 156 QString title = tr("Error loading page: %1").arg(reply->url().toString()); 153 157 QString html = QString(QLatin1String(file.readAll())) … … 189 193 { 190 194 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))); 193 197 connect(this, SIGNAL(loadProgress(int)), 194 198 this, SLOT(setProgress(int))); 195 199 connect(this, SIGNAL(loadFinished(bool)), 196 200 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))); 201 205 page()->setForwardUnsupportedContent(true); 202 206 -
trunk/demos/browser/webview.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/browser/xbel.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 134 134 BookmarkNode *root = new BookmarkNode(BookmarkNode::Root); 135 135 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.")); 146 143 } 147 144 } … … 153 150 Q_ASSERT(isStartElement() && name() == QLatin1String("xbel")); 154 151 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(); 170 161 } 171 162 } … … 178 169 folder->expanded = (attributes().value(QLatin1String("folded")) == QLatin1String("no")); 179 170 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(); 200 184 } 201 185 } … … 225 209 BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark, parent); 226 210 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(); 240 218 } 241 219 if (bookmark->title.isEmpty()) 242 220 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 }258 221 } 259 222 -
trunk/demos/browser/xbel.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 88 88 89 89 private: 90 void skipUnknownElement();91 90 void readXBEL(BookmarkNode *parent); 92 91 void readTitle(BookmarkNode *parent); -
trunk/demos/chip/chip.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 75 75 fillColor = fillColor.light(125); 76 76 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) { 79 80 painter->fillRect(QRectF(0, 0, 110, 70), fillColor); 80 81 return; … … 101 102 painter->setBrush(b); 102 103 103 if ( option->levelOfDetail>= 1) {104 if (lod >= 1) { 104 105 painter->setPen(QPen(Qt::gray, 1)); 105 106 painter->drawLine(15, 54, 94, 54); … … 109 110 110 111 // Draw text 111 if ( option->levelOfDetail>= 2) {112 if (lod >= 2) { 112 113 QFont font("Times", 10); 113 114 font.setStyleStrategy(QFont::ForceOutline); … … 123 124 // Draw lines 124 125 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)) { 127 128 lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5)); 128 129 lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62)); 129 130 } 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)) { 131 132 lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5)); 132 133 lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5)); 133 134 } 134 135 } 135 if ( option->levelOfDetail>= 0.4) {136 if (lod >= 0.4) { 136 137 const QLineF lineData[] = { 137 138 QLineF(25, 35, 35, 35), -
trunk/demos/chip/chip.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/chip/chip.pro
r2 r561 18 18 INSTALLS += target sources 19 19 20 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/chip/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/chip/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/chip/mainwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/chip/view.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/chip/view.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/composition/composition.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 378 378 p.fillRect(QRect(0, 0, m_pbuffer->width(), m_pbuffer->height()), Qt::transparent); 379 379 380 p.save(); 380 p.save(); // Needed when using the GL1 engine 381 p.beginNativePainting(); // Needed when using the GL2 engine 382 381 383 glBindTexture(GL_TEXTURE_2D, m_base_tex); 382 384 glEnable(GL_TEXTURE_2D); … … 400 402 401 403 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 403 407 404 408 drawSource(p); … … 407 411 } 408 412 409 glWidget()->makeCurrent(); 413 painter->beginNativePainting(); // Needed when using the GL2 engine 414 glWidget()->makeCurrent(); // Needed when using the GL1 engine 410 415 glBindTexture(GL_TEXTURE_2D, m_compositing_tex); 411 416 glEnable(GL_TEXTURE_2D); 417 glEnable(GL_BLEND); 418 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 412 419 glColor4f(1.,1.,1.,1.); 413 420 glBegin(GL_QUADS); … … 427 434 glEnd(); 428 435 glDisable(GL_TEXTURE_2D); 436 painter->endNativePainting(); // Needed when using the GL2 engine 429 437 } else 430 438 #endif … … 450 458 m_buffer = m_base_buffer; 451 459 #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()); 453 461 #endif 454 462 -
trunk/demos/composition/composition.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/composition/composition.pro
r2 r561 18 18 INSTALLS += target sources 19 19 20 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 21 20 22 win32-msvc* { 21 23 QMAKE_CXXFLAGS += /Zm500 -
trunk/demos/composition/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 43 43 44 44 #include <QApplication> 45 #ifdef QT_OPENGL_SUPPORT 46 #include <QtOpenGL> 47 #endif 45 48 46 49 int main(int argc, char **argv) … … 48 51 // Q_INIT_RESOURCE(deform); 49 52 53 #ifdef QT_OPENGL_SUPPORT 54 QGL::setPreferredPaintEngine(QPaintEngine::OpenGL); 55 #endif 50 56 QApplication app(argc, argv); 51 57 -
trunk/demos/deform/deform.pro
r2 r561 18 18 sources.path = $$[QT_INSTALL_DEMOS]/deform 19 19 INSTALLS += target sources 20 21 symbian { 22 TARGET.UID3 = 0xA000A63D 23 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 24 } -
trunk/demos/deform/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 69 69 deformWidget.show(); 70 70 71 #ifdef QT_KEYPAD_NAVIGATION 72 QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); 73 #endif 71 74 return app.exec(); 72 75 } -
trunk/demos/deform/pathdeform.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 54 54 #include <qmath.h> 55 55 56 57 56 PathDeformControls::PathDeformControls(QWidget *parent, PathDeformRenderer* renderer, bool smallScreen) 58 57 : QWidget(parent) … … 242 241 QRect screen_size = QApplication::desktop()->screenGeometry(); 243 242 radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/5); 243 244 244 m_renderer->setText(tr("Qt")); 245 245 } -
trunk/demos/deform/pathdeform.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/demos.pro
r515 r561 1 1 TEMPLATE = subdirs 2 2 SUBDIRS = \ 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 17 18 19 symbian: SUBDIRS = \ 20 demos_shared \ 21 demos_deform \ 22 demos_pathstroke 23 24 wince*: 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 18 41 contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl):!contains(QT_CONFIG, opengles2):{ 19 42 SUBDIRS += demos_boxes … … 21 44 22 45 mac*: SUBDIRS += demos_macmainwindow 23 wince*| embedded: SUBDIRS += embedded46 wince*|symbian|embedded|x11: SUBDIRS += embedded 24 47 25 48 !contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin … … 28 51 contains(QT_BUILD_PARTS, tools):{ 29 52 !wince*:!os2:SUBDIRS += demos_sqlbrowser demos_qtdemo 30 wince*|os2: 53 wince*|os2:SUBDIRS += demos_sqlbrowser 31 54 } 32 55 } 33 contains(QT_CONFIG, phonon) !static:SUBDIRS += demos_mediaplayer34 contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg): SUBDIRS += demos_browser56 contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer 57 contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):!symbian:SUBDIRS += demos_browser 35 58 36 59 # install … … 38 61 sources.path = $$[QT_INSTALL_DEMOS] 39 62 INSTALLS += sources 63 64 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 40 65 41 66 demos_chip.subdir = chip … … 57 82 demos_undo.subdir = undo 58 83 demos_qtdemo.subdir = qtdemo 59 demos_mediaplayer.subdir = mediaplayer84 demos_mediaplayer.subdir = qmediaplayer 60 85 61 86 demos_browser.subdir = browser 62 87 63 88 demos_boxes.subdir = boxes 89 demos_sub-attaq.subdir = sub-attaq 64 90 65 91 #CONFIG += ordered -
trunk/demos/embeddeddialogs/customproxy.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/embeddeddialogs/customproxy.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/embeddeddialogs/embeddeddialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 62 62 connect(ui->spacing, SIGNAL(valueChanged(int)), 63 63 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))); 66 66 connect(ui->style, SIGNAL(activated(QString)), 67 67 this, SLOT(styleChanged(QString))); -
trunk/demos/embeddeddialogs/embeddeddialog.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/embeddeddialogs/embeddeddialogs.pro
r2 r561 16 16 sources.path = $$[QT_INSTALL_DEMOS]/embeddeddialogs 17 17 INSTALLS += target sources 18 19 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/embeddeddialogs/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 77 77 view.setRenderHints(view.renderHints() | QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 78 78 view.setBackgroundBrush(QPixmap(":/No-Ones-Laughing-3.jpg")); 79 view.setCacheMode(QGraphicsView::CacheBackground);80 79 view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); 81 80 view.show(); -
trunk/demos/gradients/gradients.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 79 79 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); 80 80 81 connect(m_hoverPoints, SIGNAL(pointsChanged( const QPolygonF &)), this, SIGNAL(colorsChanged()));81 connect(m_hoverPoints, SIGNAL(pointsChanged(QPolygonF)), this, SIGNAL(colorsChanged())); 82 82 } 83 83 … … 356 356 editorGroupLayout->addWidget(default4Button); 357 357 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))); 360 360 361 361 connect(m_linearButton, SIGNAL(clicked()), m_renderer, SLOT(setLinearGradient())); -
trunk/demos/gradients/gradients.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/gradients/gradients.pro
r2 r561 17 17 sources.path = $$[QT_INSTALL_DEMOS]/gradients 18 18 INSTALLS += target sources 19 20 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/gradients/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 54 54 gradientWidget.setStyle(arthurStyle); 55 55 QList<QWidget *> widgets = qFindChildren<QWidget *>(&gradientWidget); 56 foreach (QWidget *w, widgets) 56 foreach (QWidget *w, widgets) { 57 57 w->setStyle(arthurStyle); 58 w->setAttribute(Qt::WA_AcceptTouchEvents); 59 } 58 60 gradientWidget.show(); 59 61 -
trunk/demos/interview/interview.pro
r2 r561 17 17 INSTALLS += target sources 18 18 19 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/interview/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/interview/model.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/interview/model.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/macmainwindow/macmainwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/macmainwindow/macmainwindow.mm
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/macmainwindow/macmainwindow.pro
r2 r561 13 13 } 14 14 15 LIBS += -framework Cocoa 15 LIBS += -framework Cocoa -framework Carbon 16 16 17 17 # install -
trunk/demos/macmainwindow/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/colorswatch.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/colorswatch.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/mainwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/mainwindow.pro
r2 r561 15 15 INSTALLS += target sources 16 16 17 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/mainwindow/toolbar.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/mainwindow/toolbar.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/pathstroke/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 pathStrokeWidget.setStyle(arthurStyle); 59 59 QList<QWidget *> widgets = qFindChildren<QWidget *>(&pathStrokeWidget); 60 foreach (QWidget *w, widgets) 60 foreach (QWidget *w, widgets) { 61 61 w->setStyle(arthurStyle); 62 w->setAttribute(Qt::WA_AcceptTouchEvents); 63 } 62 64 63 65 if (smallScreen) … … 66 68 pathStrokeWidget.show(); 67 69 70 #ifdef QT_KEYPAD_NAVIGATION 71 QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); 72 #endif 68 73 return app.exec(); 69 74 } -
trunk/demos/pathstroke/pathstroke.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 403 403 m_wasAnimated = true; 404 404 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 405 setAttribute(Qt::WA_AcceptTouchEvents); 405 406 } 406 407 … … 511 512 Q_ASSERT(m_points.size() == m_vectors.size()); 512 513 for (int i=0; i<m_points.size(); ++i) { 513 514 if (i == m_activePoint)515 continue;516 517 514 QPointF pos = m_points.at(i); 518 515 QPointF vec = m_vectors.at(i); … … 533 530 void PathStrokeRenderer::mousePressEvent(QMouseEvent *e) 534 531 { 532 if (!m_fingerPointMapping.isEmpty()) 533 return; 535 534 setDescriptionEnabled(false); 536 535 m_activePoint = -1; … … 557 556 void PathStrokeRenderer::mouseMoveEvent(QMouseEvent *e) 558 557 { 558 if (!m_fingerPointMapping.isEmpty()) 559 return; 559 560 // If we've moved more then 25 pixels, assume user is dragging 560 561 if (!m_mouseDrag && QPoint(m_mousePress - e->pos()).manhattanLength() > 25) … … 569 570 void PathStrokeRenderer::mouseReleaseEvent(QMouseEvent *) 570 571 { 572 if (!m_fingerPointMapping.isEmpty()) 573 return; 571 574 m_activePoint = -1; 572 575 setAnimation(m_wasAnimated); … … 587 590 } 588 591 592 bool 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 589 676 void PathStrokeRenderer::setAnimation(bool animation) 590 677 { -
trunk/demos/pathstroke/pathstroke.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 61 61 void mouseReleaseEvent(QMouseEvent *e); 62 62 void timerEvent(QTimerEvent *e); 63 bool event(QEvent *e); 63 64 64 65 QSize sizeHint() const { return QSize(500, 500); } … … 119 120 QPoint m_mousePress; 120 121 bool m_mouseDrag; 122 123 QHash<int, int> m_fingerPointMapping; 121 124 }; 122 125 -
trunk/demos/pathstroke/pathstroke.pro
r2 r561 19 19 INSTALLS += target sources 20 20 21 symbian { 22 TARGET.UID3 = 0xA000A63E 23 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 24 } -
trunk/demos/qtdemo/colors.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 // Properties: 74 74 bool Colors::openGlRendering = false; 75 bool Colors::direct3dRendering = false;76 75 bool Colors::softwareRendering = false; 77 bool Colors::openGlAwailable = true; 78 bool Colors::direct3dAwailable = true; 76 bool Colors::openGlAvailable = true; 79 77 bool Colors::xRenderPresent = true; 80 78 … … 98 96 bool Colors::verbose = false; 99 97 bool Colors::pause = true; 100 int Colors::fps = 100;98 int Colors::fps = 60; 101 99 int Colors::menuCount = 18; 102 100 float Colors::animSpeed = 1.0; … … 207 205 if (s == "-opengl") 208 206 Colors::openGlRendering = true; 209 else if (s == "-direct3d")210 Colors::direct3dRendering = true;211 207 else if (s == "-software") 212 208 Colors::softwareRendering = true; … … 271 267 else if (s.startsWith("-h") || s.startsWith("-help")){ 272 268 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]] ") 274 270 + "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] " 275 271 + "[-use-window-mask] [-no-rescale] " … … 279 275 + "[-ticker-morph-speed<float>] [-ticker-text<string>]"); 280 276 exit(0); 277 } else if (s == "-verbose") { 278 // this option was already handled above 281 279 } else{ 282 280 QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s); … … 291 289 { 292 290 Colors::openGlRendering = false; 293 Colors::direct3dRendering = false;294 291 Colors::softwareRendering = true; 295 292 Colors::noTicker = true; … … 326 323 #endif 327 324 { 328 Colors::openGlA wailable = false;325 Colors::openGlAvailable = false; 329 326 if (Colors::verbose) 330 327 qDebug("- OpenGL not recommended on this system"); 331 328 } 332 333 #if defined(Q_WS_WIN)334 Colors::direct3dAwailable = false; // for now.335 #endif336 329 337 330 #if defined(Q_WS_X11) 338 331 // check if X render is present: 339 332 QPixmap tmp(1, 1); 340 if (!tmp.x11PictureHandle() ){333 if (!tmp.x11PictureHandle() && tmp.paintEngine()->type() == QPaintEngine::X11){ 341 334 Colors::xRenderPresent = false; 342 335 if (Colors::verbose) … … 370 363 } 371 364 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){ 380 366 // 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) 387 368 Colors::openGlRendering = true; 388 369 else -
trunk/demos/qtdemo/colors.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 82 82 83 83 // properties: 84 static bool openGlAvailable; 84 85 static bool openGlRendering; 85 static bool direct3dRendering;86 86 static bool softwareRendering; 87 static bool openGlAwailable;88 static bool direct3dAwailable;89 87 static bool xRenderPresent; 90 88 static bool noAdapt; -
trunk/demos/qtdemo/demoitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demoitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demoitemanimation.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demoitemanimation.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demoscene.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demoscene.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demotextitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/demotextitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/dockitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/dockitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/examplecontent.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/examplecontent.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/guide.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/guide.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/guidecircle.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/guidecircle.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/guideline.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/guideline.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/headingitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/headingitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/imageitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/imageitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/itemcircleanimation.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 303 303 304 304 this->qtGuide1 = new GuideCircle(QRectF(x, y, 260, 260), -36, 342); 305 this->currGuide = 0; 305 306 new GuideLine(QPointF(x + 240, y + 268), this->qtGuide1); 306 307 new GuideLine(QPointF(x + 265, y + 246), this->qtGuide1); -
trunk/demos/qtdemo/itemcircleanimation.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/letteritem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/letteritem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 64 64 this->useTimer = false; 65 65 this->updateTimer.setSingleShot(true); 66 this-> trolltechLogo = 0;66 this->companyLogo = 0; 67 67 this->qtLogo = 0; 68 68 this->setupWidget(); … … 74 74 MainWindow::~MainWindow() 75 75 { 76 delete this-> trolltechLogo;76 delete this->companyLogo; 77 77 delete this->qtLogo; 78 78 } … … 101 101 QWidget *viewport = 0; 102 102 103 if (Colors::direct3dRendering){104 viewport->setAttribute(Qt::WA_MSWindowsUseDirect3D);105 setCacheMode(QGraphicsView::CacheNone);106 if (Colors::verbose)107 qDebug() << "- using Direct3D";108 }109 103 #ifndef QT_NO_OPENGL 110 else if (Colors::openGlRendering){104 if (Colors::openGlRendering) { 111 105 QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers)); 112 106 if (Colors::noScreenSync) … … 117 111 if (Colors::verbose) 118 112 qDebug() << "- using OpenGL"; 119 } 113 } else // software rendering 120 114 #endif 121 else{ // software rendering 115 { 116 // software rendering 122 117 viewport = new QWidget; 123 118 setCacheMode(QGraphicsView::CacheBackground); … … 264 259 265 260 this->viewport()->update(); 266 if (Colors::softwareRendering)267 QApplication::syncX();268 269 261 if (this->useTimer) 270 262 this->updateTimer.start(int(1000 / Colors::fps)); … … 279 271 } 280 272 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); 282 274 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); 284 276 this->qtLogo->setZValue(100); 285 277 this->pausedLabel = new DemoTextItem(QString("PAUSED"), Colors::buttonFont(), Qt::white, -1, this->scene, 0); … … 390 382 if (Colors::openGlRendering) 391 383 s += "OpenGL"; 392 else if (Colors::direct3dRendering)393 s += "Direct3D";394 384 else 395 385 s += "software"; … … 467 457 DemoItem::setMatrix(this->matrix()); 468 458 469 if (this-> trolltechLogo){459 if (this->companyLogo){ 470 460 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()); 473 463 QRectF qtb = this->qtLogo->boundingRect(); 474 464 this->qtLogo->setPos(802 - qtb.width(), 0); -
trunk/demos/qtdemo/mainwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 99 99 QTime fpsTime; 100 100 QPixmap background; 101 ImageItem * trolltechLogo;101 ImageItem *companyLogo; 102 102 ImageItem *qtLogo; 103 103 bool doneAdapt; -
trunk/demos/qtdemo/menucontent.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/menucontent.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/menumanager.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 325 325 #ifdef Q_OS_WIN 326 326 //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); 330 331 #endif 331 332 -
trunk/demos/qtdemo/menumanager.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/qtdemo.pro
r521 r561 1 1 CONFIG += assistant help x11inc 2 2 TARGET = qtdemo 3 DESTDIR = $$QT_BUILD_TREE/bin 3 DEMO_DESTDIR = $$QT_BUILD_TREE 4 isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../.. 5 DESTDIR = $$DEMO_DESTDIR/bin 4 6 INSTALLS += target sources 7 8 5 9 QT += xml network 6 10 … … 64 68 } 65 69 70 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 71 66 72 # install 67 73 target.path = $$[QT_INSTALL_BINS] -
trunk/demos/qtdemo/qtdemo.rc
r2 r561 1 #include "winver.h" 2 1 3 IDI_ICON1 ICON DISCARDABLE "qtdemo.ico" 2 4 5 VS_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 13 BEGIN 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 32 END -
trunk/demos/qtdemo/scanitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/scanitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/score.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/score.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/textbutton.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/textbutton.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/qtdemo/xml/examples.xml
r2 r561 17 17 <example filename="interview" name="Interview" /> 18 18 <example filename="browser" name="Browser" /> 19 <example filename=" mediaplayer" name="Media Player" />19 <example filename="qmediaplayer" name="Media Player" /> 20 20 <example filename="boxes" name="Boxes" /> 21 <example filename="sub-attaq" name="Sub-attaq" /> 21 22 </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> 22 31 <category dirname="qtconcurrent" name="Concurrent Programming"> 23 32 <example filename="map" name="Map" executable="false" /> … … 79 88 <example filename="dirview" name="Directory View" /> 80 89 <example filename="fetchmore" name="Fetch More" /> 90 <example filename="frozencolumn" name="Frozen Column" /> 81 91 <example filename="pixelator" name="Pixelator" /> 82 92 <example filename="puzzle" name="Puzzle " image="itemviewspuzzle-example.png"/> … … 113 123 <example filename="fortuneclient" name="Fortune Client" /> 114 124 <example filename="fortuneserver" name="Fortune Server" /> 115 <example filename=" ftp" changedirectory="false" name="FTP Client" />125 <example filename="qftp" changedirectory="false" name="FTP Client" /> 116 126 <example filename="http" changedirectory="false" name="HTTP Client" /> 117 127 <example filename="loopback" name="Loopback" /> … … 119 129 <example filename="torrent" name="Torrent Client" /> 120 130 <example filename="securesocketclient" name="Secure Socket Client" /> 131 <example filename="googlesuggest" name="Google Suggest" /> 121 132 </category> 122 133 <category dirname="opengl" name="OpenGL"> … … 143 154 </category> 144 155 <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" /> 146 162 </category> 147 163 <category dirname="richtext" name="Rich Text"> … … 167 183 <example filename="sqlwidgetmapper" name="SQL Widget Mapper" /> 168 184 </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> 169 191 <category dirname="threads" name="Threading"> 170 192 <example filename="mandelbrot" name="Mandelbrot" /> … … 175 197 <example filename="customcompleter" name="Custom Completer" /> 176 198 <example filename="i18n" name="Internationalization" /> 199 <example filename="inputpanel" name="Input Panel" /> 177 200 <example filename="plugandpaint" name="Plug and Paint" /> 178 201 <example filename="regexp" name="Regular Expressions" /> … … 214 237 <example filename="windowflags" name="Window Flags" /> 215 238 </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> 216 245 <category dirname="xml" name="XML"> 217 246 <example filename="saxbookmarks" name="SAX Bookmarks" /> … … 225 254 <example filename="filetree" name="File Tree" /> 226 255 <example filename="trafficinfo" name="Traffic Info" /> 256 <example filename="schema" name="XML Schema Validation" /> 227 257 </category> 228 258 </categories> -
trunk/demos/shared/arthurstyle.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/shared/arthurstyle.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/shared/arthurwidgets.cpp
r514 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/shared/arthurwidgets.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 50 50 #if defined(QT_OPENGL_SUPPORT) 51 51 #include <QGLWidget> 52 #include <QEvent> 52 53 class GLWidget : public QGLWidget 53 54 { 54 55 public: 55 56 GLWidget(QWidget *parent) 56 : QGLWidget(QGLFormat(QGL::SampleBuffers), parent) {} 57 : QGLWidget(QGLFormat(QGL::SampleBuffers), parent) 58 { 59 setAttribute(Qt::WA_AcceptTouchEvents); 60 } 57 61 void disableAutoBufferSwap() { setAutoBufferSwap(false); } 58 62 void paintEvent(QPaintEvent *) { parentWidget()->update(); } 63 protected: 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 } 59 78 }; 60 79 #endif -
trunk/demos/shared/hoverpoints.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 54 54 m_widget = widget; 55 55 widget->installEventFilter(this); 56 widget->setAttribute(Qt::WA_AcceptTouchEvents); 56 57 57 58 m_connectionType = CurveConnection; … … 66 67 m_enabled = true; 67 68 68 connect(this, SIGNAL(pointsChanged( const QPolygonF &)),69 connect(this, SIGNAL(pointsChanged(QPolygonF)), 69 70 m_widget, SLOT(update())); 70 71 } … … 87 88 case QEvent::MouseButtonPress: 88 89 { 90 if (!m_fingerPointMapping.isEmpty()) 91 return true; 89 92 QMouseEvent *me = (QMouseEvent *) event; 90 93 … … 148 151 149 152 case QEvent::MouseButtonRelease: 153 if (!m_fingerPointMapping.isEmpty()) 154 return true; 150 155 m_currentIndex = -1; 151 156 break; 152 157 153 158 case QEvent::MouseMove: 159 if (!m_fingerPointMapping.isEmpty()) 160 return true; 154 161 if (m_currentIndex >= 0) 155 162 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; 156 236 break; 157 237 … … 263 343 void HoverPoints::setPoints(const QPolygonF &points) 264 344 { 345 if (points.size() != m_points.size()) 346 m_fingerPointMapping.clear(); 265 347 m_points.clear(); 266 348 for (int i=0; i<points.size(); ++i) -
trunk/demos/shared/hoverpoints.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 134 134 bool m_enabled; 135 135 136 QHash<int, int> m_fingerPointMapping; 137 136 138 QPen m_pointPen; 137 139 QBrush m_pointBrush; -
trunk/demos/shared/shared.pri
r2 r561 17 17 hpux-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a 18 18 hpuxi-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a 19 !hpuxi-acc*:!hpux-acc*:LIBS += -ldemo_shared 19 symbian:LIBS += -ldemo_shared.lib 20 !hpuxi-acc*:!hpux-acc*:!symbian:LIBS += -ldemo_shared 20 21 -
trunk/demos/shared/shared.pro
r2 r561 30 30 sources.path = $$[QT_INSTALL_DEMOS]/shared 31 31 INSTALLS += sources 32 32 33 !cross_compile:INSTALLS += target 33 34 35 symbian { 36 TARGET.UID3 = 0xA000A63C 37 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 38 } -
trunk/demos/spreadsheet/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/spreadsheet/printview.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/spreadsheet/printview.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/spreadsheet/spreadsheet.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 74 74 75 75 statusBar(); 76 connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, 76 connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), 77 77 this, SLOT(updateStatus(QTableWidgetItem*))); 78 connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, 78 connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), 79 79 this, SLOT(updateColor(QTableWidgetItem*))); 80 80 connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), … … 421 421 int row, col; 422 422 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)); 424 424 } 425 425 } … … 482 482 table->setItem(4, 0, new SpreadSheetItem("Flight (LA)")); 483 483 table->setItem(5, 0, new SpreadSheetItem("Taxi")); 484 table->setItem(6, 0, new SpreadSheetItem("Di inner"));484 table->setItem(6, 0, new SpreadSheetItem("Dinner")); 485 485 table->setItem(7, 0, new SpreadSheetItem("Hotel")); 486 486 table->setItem(8, 0, new SpreadSheetItem("Flight (Oslo)")); … … 524 524 525 525 table->setItem(9, 2, new SpreadSheetItem()); 526 table->item(9, 2)->setBackgroundColor(Qt::lightGray); 526 527 527 528 // column 3 … … 624 625 PrintView view; 625 626 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*))); 628 629 dlg.exec(); 629 630 #endif -
trunk/demos/spreadsheet/spreadsheet.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/spreadsheet/spreadsheet.pro
r2 r561 28 28 # install 29 29 target.path = $$[QT_INSTALL_DEMOS]/spreadsheet 30 sources.files = $$SOURCES $$RESOURCES *.pro images 30 sources.files = $$SOURCES $$RESOURCES *.pro images $$HEADERS 31 31 sources.path = $$[QT_INSTALL_DEMOS]/spreadsheet 32 32 INSTALLS += target sources 33 33 34 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/spreadsheet/spreadsheetdelegate.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 52 52 if (index.column() == 1) { 53 53 QDateTimeEdit *editor = new QDateTimeEdit(parent); 54 editor->setDisplayFormat("dd/M/yyy ");54 editor->setDisplayFormat("dd/M/yyyy"); 55 55 editor->setCalendarPopup(true); 56 56 return editor; … … 94 94 dateEditor->setDate(QDate::fromString( 95 95 index.model()->data(index, Qt::EditRole).toString(), 96 "d/M/yy "));96 "d/M/yyyy")); 97 97 } 98 98 } … … 108 108 QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor); 109 109 if (dateEditor) { 110 model->setData(index, dateEditor->date().toString("dd/M/yyy "));110 model->setData(index, dateEditor->date().toString("dd/M/yyyy")); 111 111 } 112 112 } -
trunk/demos/spreadsheet/spreadsheetdelegate.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/spreadsheet/spreadsheetitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/spreadsheet/spreadsheetitem.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/browser.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/browser.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/connectionwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/connectionwidget.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/qsqlconnectiondialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/qsqlconnectiondialog.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/sqlbrowser/sqlbrowser.pro
r493 r561 22 22 INSTALLS += target sources 23 23 24 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 25 24 26 wince*: { 25 27 DEPLOYMENT_PLUGIN += qsqlite -
trunk/demos/textedit/example.html
r224 r561 27 27 <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> 28 28 <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 past ingit 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> 30 30 <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> 31 31 <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 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/textedit/textedit.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 76 76 : QMainWindow(parent) 77 77 { 78 setToolButtonStyle(Qt::ToolButtonFollowStyle); 78 79 setupFileActions(); 79 80 setupEditActions(); … … 88 89 89 90 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))); 92 93 connect(textEdit, SIGNAL(cursorPositionChanged()), 93 94 this, SLOT(cursorPositionChanged())); … … 128 129 connect(textEdit, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool))); 129 130 131 #ifndef QT_NO_CLIPBOARD 130 132 connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged())); 133 #endif 131 134 132 135 QString initialFile = ":/example.html"; … … 158 161 QAction *a; 159 162 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); 161 166 a->setShortcut(QKeySequence::New); 162 167 connect(a, SIGNAL(triggered()), this, SLOT(fileNew())); … … 164 169 menu->addAction(a); 165 170 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); 167 173 a->setShortcut(QKeySequence::Open); 168 174 connect(a, SIGNAL(triggered()), this, SLOT(fileOpen())); … … 172 178 menu->addSeparator(); 173 179 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); 175 182 a->setShortcut(QKeySequence::Save); 176 183 connect(a, SIGNAL(triggered()), this, SLOT(fileSave())); … … 180 187 181 188 a = new QAction(tr("Save &As..."), this); 189 a->setPriority(QAction::LowPriority); 182 190 connect(a, SIGNAL(triggered()), this, SLOT(fileSaveAs())); 183 191 menu->addAction(a); … … 185 193 186 194 #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); 188 198 a->setShortcut(QKeySequence::Print); 189 199 connect(a, SIGNAL(triggered()), this, SLOT(filePrint())); … … 191 201 menu->addAction(a); 192 202 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); 194 205 connect(a, SIGNAL(triggered()), this, SLOT(filePrintPreview())); 195 206 menu->addAction(a); 196 207 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); 198 211 a->setShortcut(Qt::CTRL + Qt::Key_D); 199 212 connect(a, SIGNAL(triggered()), this, SLOT(filePrintPdf())); … … 215 228 tb->setWindowTitle(tr("Edit Actions")); 216 229 addToolBar(tb); 217 218 230 QMenu *menu = new QMenu(tr("&Edit"), this); 219 231 menuBar()->addMenu(menu); 220 232 221 233 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); 223 236 a->setShortcut(QKeySequence::Undo); 224 237 tb->addAction(a); 225 238 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); 227 242 a->setShortcut(QKeySequence::Redo); 228 243 tb->addAction(a); 229 244 menu->addAction(a); 230 245 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); 232 249 a->setShortcut(QKeySequence::Cut); 233 250 tb->addAction(a); 234 251 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); 236 255 a->setShortcut(QKeySequence::Copy); 237 256 tb->addAction(a); 238 257 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); 240 261 a->setShortcut(QKeySequence::Paste); 241 262 tb->addAction(a); 242 263 menu->addAction(a); 264 #ifndef QT_NO_CLIPBOARD 243 265 actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty()); 266 #endif 244 267 } 245 268 … … 253 276 menuBar()->addMenu(menu); 254 277 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); 256 280 actionTextBold->setShortcut(Qt::CTRL + Qt::Key_B); 257 QFont bold; 281 actionTextBold->setPriority(QAction::LowPriority); 282 QFont bold; 258 283 bold.setBold(true); 259 284 actionTextBold->setFont(bold); … … 263 288 actionTextBold->setCheckable(true); 264 289 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); 266 293 actionTextItalic->setShortcut(Qt::CTRL + Qt::Key_I); 267 294 QFont italic; … … 273 300 actionTextItalic->setCheckable(true); 274 301 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); 276 304 actionTextUnderline->setShortcut(Qt::CTRL + Qt::Key_U); 305 actionTextUnderline->setPriority(QAction::LowPriority); 277 306 QFont underline; 278 307 underline.setUnderline(true); … … 286 315 287 316 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*))); 289 318 290 319 // Make sure the alignLeft is always left of the alignRight 291 320 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); 295 325 } 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); 301 331 302 332 actionAlignLeft->setShortcut(Qt::CTRL + Qt::Key_L); 303 333 actionAlignLeft->setCheckable(true); 334 actionAlignLeft->setPriority(QAction::LowPriority); 304 335 actionAlignCenter->setShortcut(Qt::CTRL + Qt::Key_E); 305 336 actionAlignCenter->setCheckable(true); 337 actionAlignCenter->setPriority(QAction::LowPriority); 306 338 actionAlignRight->setShortcut(Qt::CTRL + Qt::Key_R); 307 339 actionAlignRight->setCheckable(true); 340 actionAlignRight->setPriority(QAction::LowPriority); 308 341 actionAlignJustify->setShortcut(Qt::CTRL + Qt::Key_J); 309 342 actionAlignJustify->setCheckable(true); 343 actionAlignJustify->setPriority(QAction::LowPriority); 310 344 311 345 tb->addActions(grp->actions()); … … 337 371 comboStyle->addItem("Ordered List (Alpha lower)"); 338 372 comboStyle->addItem("Ordered List (Alpha upper)"); 373 comboStyle->addItem("Ordered List (Roman lower)"); 374 comboStyle->addItem("Ordered List (Roman upper)"); 339 375 connect(comboStyle, SIGNAL(activated(int)), 340 376 this, SLOT(textStyle(int))); … … 342 378 comboFont = new QFontComboBox(tb); 343 379 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))); 346 382 347 383 comboSize = new QComboBox(tb); … … 354 390 comboSize->addItem(QString::number(size)); 355 391 356 connect(comboSize, SIGNAL(activated( const QString &)),357 this, SLOT(textSize( const QString &)));392 connect(comboSize, SIGNAL(activated(QString)), 393 this, SLOT(textSize(QString))); 358 394 comboSize->setCurrentIndex(comboSize->findText(QString::number(QApplication::font() 359 395 .pointSize()))); … … 476 512 QPrinter printer(QPrinter::HighResolution); 477 513 QPrintPreviewDialog preview(&printer, this); 478 connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter*)));514 connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*))); 479 515 preview.exec(); 480 516 #endif … … 574 610 style = QTextListFormat::ListUpperAlpha; 575 611 break; 612 case 7: 613 style = QTextListFormat::ListLowerRoman; 614 break; 615 case 8: 616 style = QTextListFormat::ListUpperRoman; 617 break; 576 618 } 577 619 … … 639 681 void TextEdit::clipboardDataChanged() 640 682 { 683 #ifndef QT_NO_CLIPBOARD 641 684 actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty()); 685 #endif 642 686 } 643 687 -
trunk/demos/textedit/textedit.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/textedit/textedit.pro
r2 r561 20 20 INSTALLS += target sources 21 21 22 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) -
trunk/demos/undo/commands.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/commands.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/document.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/document.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/mainwindow.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the demonstration applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/demos/undo/undo.pro
r2 r561 16 16 INSTALLS += target sources 17 17 18 symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
Note:
See TracChangeset
for help on using the changeset viewer.