Changeset 769 for trunk/demos
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
- 102 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/demos/browser/browser.pro
r680 r769 6 6 contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools 7 7 else: DEFINES += QT_NO_UITOOLS 8 9 CONFIG(release,release|debug):DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT10 8 11 9 FORMS += \ -
trunk/demos/browser/networkaccessmanager.cpp
r651 r769 113 113 double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount)); 114 114 double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount)); 115 #ifdef QT_DEBUG 115 116 qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure); 116 117 #endif 117 118 } 118 119 -
trunk/demos/browser/webview.cpp
r651 r769 144 144 void WebPage::handleUnsupportedContent(QNetworkReply *reply) 145 145 { 146 if (reply->error() == QNetworkReply::NoError) { 147 BrowserApplication::downloadManager()->handleUnsupportedContent(reply); 146 QString errorString = reply->errorString(); 147 148 if (m_loadingUrl != reply->url()) { 149 // sub resource of this page 150 qWarning() << "Resource" << reply->url().toEncoded() << "has unknown Content-Type, will be ignored."; 151 reply->deleteLater(); 148 152 return; 153 } 154 155 if (reply->error() == QNetworkReply::NoError && !reply->header(QNetworkRequest::ContentTypeHeader).isValid()) { 156 errorString = "Unknown Content-Type"; 149 157 } 150 158 … … 157 165 QString html = QString(QLatin1String(file.readAll())) 158 166 .arg(title) 159 .arg( reply->errorString())167 .arg(errorString) 160 168 .arg(reply->url().toString()); 161 169 -
trunk/demos/composition/composition.cpp
r651 r769 48 48 #include <QMouseEvent> 49 49 #include <qmath.h> 50 51 const int animationInterval = 15; // update every 16 ms = ~60FPS 50 52 51 53 CompositionWidget::CompositionWidget(QWidget *parent) … … 237 239 { 238 240 m_animation_enabled = true; 241 m_animationTimer = startTimer(animationInterval); 239 242 #ifdef Q_WS_QWS 240 243 m_image = QPixmap(":res/composition/flower.jpg"); … … 263 266 rect.translate(-size.width()/2, -size.height()/2); 264 267 return rect; 268 } 269 270 void CompositionRenderer::setAnimationEnabled(bool enabled) 271 { 272 if (m_animation_enabled == enabled) 273 return; 274 m_animation_enabled = enabled; 275 if (enabled) { 276 Q_ASSERT(!m_animationTimer); 277 m_animationTimer = startTimer(animationInterval); 278 } else { 279 killTimer(m_animationTimer); 280 m_animationTimer = 0; 281 } 265 282 } 266 283 … … 472 489 #endif 473 490 } 474 475 if (m_animation_enabled && m_current_object == NoObject) {476 updateCirclePos();477 }478 491 } 479 492 … … 490 503 m_current_object = NoObject; 491 504 } 505 if (m_animation_enabled) { 506 killTimer(m_animationTimer); 507 m_animationTimer = 0; 508 } 492 509 } 493 510 … … 501 518 m_current_object = NoObject; 502 519 503 if (m_animation_enabled) 520 if (m_animation_enabled) { 521 Q_ASSERT(!m_animationTimer); 522 m_animationTimer = startTimer(animationInterval); 523 } 524 } 525 526 void CompositionRenderer::timerEvent(QTimerEvent *event) 527 { 528 if (event->timerId() == m_animationTimer) 504 529 updateCirclePos(); 505 530 } -
trunk/demos/composition/composition.h
r651 r769 110 110 void paint(QPainter *); 111 111 112 void mousePressEvent(QMouseEvent *);113 void mouseMoveEvent(QMouseEvent *);114 void mouseReleaseEvent(QMouseEvent *);115 116 112 void setCirclePos(const QPointF &pos); 117 113 … … 121 117 int circleColor() const { return m_circle_hue; } 122 118 int circleAlpha() const { return m_circle_alpha; } 119 120 protected: 121 void mousePressEvent(QMouseEvent *); 122 void mouseMoveEvent(QMouseEvent *); 123 void mouseReleaseEvent(QMouseEvent *); 124 void timerEvent(QTimerEvent *); 123 125 124 126 public slots: … … 151 153 void setCircleAlpha(int alpha) { m_circle_alpha = alpha; update(); } 152 154 void setCircleColor(int hue) { m_circle_hue = hue; update(); } 153 void setAnimationEnabled(bool enabled) { m_animation_enabled = enabled; update(); }155 void setAnimationEnabled(bool enabled); 154 156 155 157 private: … … 178 180 ObjectType m_current_object; 179 181 bool m_animation_enabled; 182 int m_animationTimer; 180 183 181 184 #ifdef QT_OPENGL_SUPPORT -
trunk/demos/demos.pro
r640 r769 56 56 contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer 57 57 contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):!symbian:SUBDIRS += demos_browser 58 contains(QT_CONFIG, multimedia):SUBDIRS += demos_spectrum 58 59 59 60 # install … … 88 89 demos_boxes.subdir = boxes 89 90 demos_sub-attaq.subdir = sub-attaq 91 demos_spectrum.subdir = spectrum 90 92 91 93 #CONFIG += ordered -
trunk/demos/embedded/anomaly/anomaly.pro
r651 r769 28 28 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 29 29 HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h 30 LIBS += -lesock -l insock -lconnmon30 LIBS += -lesock -lcommdb -linsock # For IAP selection 31 31 TARGET.CAPABILITY = NetworkServices 32 32 TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 -
trunk/demos/embedded/anomaly/src/BrowserView.cpp
r651 r769 83 83 connect(m_controlStrip, SIGNAL(backClicked()), m_webView, SLOT(back())); 84 84 connect(m_controlStrip, SIGNAL(forwardClicked()), m_webView, SLOT(forward())); 85 connect(m_controlStrip, SIGNAL(closeClicked()), qApp, SLOT(quit())); 85 86 86 87 QPalette pal = m_webView->palette(); -
trunk/demos/embedded/anomaly/src/ControlStrip.cpp
r651 r769 51 51 backPixmap.load(":/images/go-previous.png"); 52 52 forwardPixmap.load(":/images/go-next.png"); 53 closePixmap.load(":/images/button-close.png"); 53 54 } 54 55 … … 66 67 { 67 68 int h = height(); 69 int spacing = qMin(h, (width() - h * 4) / 3); 68 70 int x = event->pos().x(); 69 71 … … 75 77 76 78 if (x > width() - h) { 79 emit closeClicked(); 80 event->accept(); 81 return; 82 } 83 84 if ((x < width() - (h + spacing)) && (x > width() - (h * 2 + spacing))) { 77 85 emit forwardClicked(); 78 86 event->accept(); … … 80 88 } 81 89 82 if ((x < width() - 2 * h) && (x > width() - 3 * h)) {90 if ((x < width() - (h * 2 + spacing * 2)) && (x > width() - (h * 3 + spacing * 2))) { 83 91 emit backClicked(); 84 92 event->accept(); … … 90 98 { 91 99 int h = height(); 92 int s = (h - menuPixmap.height()) / 2; 100 int spacing = qMin(h, (width() - h * 4) / 3); 101 int s = (height() - menuPixmap.height()) / 2; 93 102 94 103 QPainter p(this); … … 96 105 p.setCompositionMode(QPainter::CompositionMode_SourceOver); 97 106 p.drawPixmap(s, s, menuPixmap); 98 p.drawPixmap(width() - 3 * h + s, s, backPixmap); 99 p.drawPixmap(width() - h + s, s, forwardPixmap); 107 p.drawPixmap(width() - h + s, s, closePixmap); 108 p.drawPixmap(width() - (h * 2 + spacing) + s, s, forwardPixmap); 109 p.drawPixmap(width() - (h * 3 + spacing * 2) + s, s, backPixmap); 110 100 111 p.end(); 101 112 } -
trunk/demos/embedded/anomaly/src/ControlStrip.h
r651 r769 59 59 void backClicked(); 60 60 void forwardClicked(); 61 void closeClicked(); 61 62 62 63 protected: … … 68 69 QPixmap backPixmap; 69 70 QPixmap forwardPixmap; 71 QPixmap closePixmap; 70 72 }; 71 73 -
trunk/demos/embedded/anomaly/src/anomaly.qrc
r561 r769 6 6 <file>images/list-add.png</file> 7 7 <file>images/list-remove.png</file> 8 <file>images/button-close.png</file> 8 9 </qresource> 9 10 </RCC> -
trunk/demos/embedded/desktopservices/contenttab.cpp
r651 r769 115 115 { 116 116 switch (event->key()) { 117 case Qt::Key_Up:118 if (currentRow() == 0) {119 setCurrentRow(count() - 1);120 } else {121 setCurrentRow(currentRow() - 1);122 }123 break;124 case Qt::Key_Down:125 if (currentRow() == (count() - 1)) {126 setCurrentRow(0);127 } else {128 setCurrentRow(currentRow() + 1);129 }130 break;131 117 case Qt::Key_Select: 132 118 openItem(currentItem()); -
trunk/demos/embedded/flightinfo/flightinfo.pro
r561 r769 10 10 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 11 11 HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h 12 LIBS += -lesock -lconnmon -linsock12 LIBS += -lesock -lcommdb -linsock # For IAP selection 13 13 TARGET.CAPABILITY = NetworkServices 14 14 } -
trunk/demos/embedded/fluidlauncher/config_s60/config.xml
r561 r769 21 21 <example filename="digiflip" name="Flipping Clock" image="screenshots/digiflip.png"/> 22 22 <example filename="qmediaplayer" name="Media Player" image="screenshots/mediaplayer.png" args="-small-screen"/> 23 <example filename="spectrum" name="Spectrum Analyzer" image="screenshots/spectrum.png" args="-small-screen"/> 23 24 </demos> 24 25 <slideshow timeout="60000" interval="10000"> -
trunk/demos/embedded/fluidlauncher/fluidlauncher.pro
r651 r769 98 98 contains(QT_CONFIG, phonon) { 99 99 reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/qmediaplayer_reg.rsc 100 } 101 102 contains(QT_CONFIG, multimedia) { 103 reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/spectrum_reg.rsc 100 104 } 101 105 … … 165 169 $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.mif 166 170 167 # Since Fluidlauncher itself doesn't link webkit, we won't get dependency automatically 168 executables.pkg_prerules += \ 169 "; Dependency to Qt Webkit" \ 170 "(0x200267C2), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {\"QtWebKit\"}" 171 isEmpty(QT_LIBINFIX) { 172 # Since Fluidlauncher itself doesn't link webkit, we won't get dependency automatically 173 executables.pkg_prerules += \ 174 "; Dependency to Qt Webkit" \ 175 "(0x200267C2), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {\"QtWebKit\"}" 176 } 171 177 } 172 178 … … 176 182 mifs.sources += \ 177 183 $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.mif 184 } 185 186 contains(QT_CONFIG, multimedia) { 187 executables.sources += spectrum.exe fftreal.dll 188 resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.rsc 189 mifs.sources += \ 190 $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.mif 178 191 } 179 192 -
trunk/demos/embedded/lightmaps/lightmaps.pro
r561 r769 7 7 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 8 8 HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h 9 LIBS += -lesock -lconnmon -linsock9 LIBS += -lesock -lcommdb -linsock # For IAP selection 10 10 TARGET.CAPABILITY = NetworkServices 11 11 TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 -
trunk/demos/embedded/weatherinfo/weatherinfo.pro
r561 r769 9 9 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 10 10 HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h 11 LIBS += -lesock -lco nnmon -linsock11 LIBS += -lesock -lcommdb -linsock # For IAP selection 12 12 TARGET.CAPABILITY = NetworkServices 13 13 } -
trunk/demos/qtdemo/xml/examples.xml
r561 r769 20 20 <example filename="boxes" name="Boxes" /> 21 21 <example filename="sub-attaq" name="Sub-attaq" /> 22 <example filename="spectrum" name="Spectrum Analyzer" /> 22 23 </demos> 23 24 <category dirname="animation" name="Animation Framework"> -
trunk/demos/sqlbrowser/browser.cpp
r651 r769 147 147 QSqlTableModel *model = new QSqlTableModel(table, connectionWidget->currentDatabase()); 148 148 model->setEditStrategy(QSqlTableModel::OnRowChange); 149 model->setTable( t);149 model->setTable(connectionWidget->currentDatabase().driver()->escapeIdentifier(t, QSqlDriver::TableName)); 150 150 model->select(); 151 151 if (model->lastError().type() != QSqlError::NoError) -
trunk/demos/symbianpkgrules.pri
r561 r769 11 11 " " 12 12 13 default_deployment.pkg_prerules += vendorinfo 13 demos_deployment.pkg_prerules += vendorinfo 14 DEPLOYMENT += demos_deployment 14 15 15 16 isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
Note:
See TracChangeset
for help on using the changeset viewer.