diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-11-25 18:20:45 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-11-25 18:20:45 (GMT) |
commit | e58b7f0cc139c5fda3d472c38161be8fb718db7d (patch) | |
tree | 3c20cccfe050d125a5f4736ba11b6383e8734be4 /examples/webkit/fancybrowser | |
parent | c2a4a1b1e06f8b0d02e7b56c9eb0c19fd2fae80a (diff) | |
parent | 4c3539dfbc65d5decdd842d4181f9aa3d38d213c (diff) | |
download | Qt-e58b7f0cc139c5fda3d472c38161be8fb718db7d.zip Qt-e58b7f0cc139c5fda3d472c38161be8fb718db7d.tar.gz Qt-e58b7f0cc139c5fda3d472c38161be8fb718db7d.tar.bz2 |
Merge branch '4.6'
Conflicts:
doc/src/modules.qdoc
examples/assistant/simpletextviewer/findfiledialog.cpp
examples/webkit/fancybrowser/mainwindow.cpp
src/gui/widgets/qtabbar.cpp
src/gui/widgets/qtabbar_p.h
tests/auto/qpixmap/tst_qpixmap.cpp
tools/assistant/compat/helpdialog.cpp
tools/assistant/compat/tabbedbrowser.cpp
translations/translations.pri
Diffstat (limited to 'examples/webkit/fancybrowser')
-rw-r--r-- | examples/webkit/fancybrowser/mainwindow.cpp | 12 | ||||
-rw-r--r-- | examples/webkit/fancybrowser/mainwindow.h | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp index 234afba..cfc5500 100644 --- a/examples/webkit/fancybrowser/mainwindow.cpp +++ b/examples/webkit/fancybrowser/mainwindow.cpp @@ -62,7 +62,7 @@ MainWindow::MainWindow(const QUrl& url) view = new QWebView(this); view->load(url); connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation())); - connect(view, SIGNAL(titleChanged(const QString&)), SLOT(adjustTitle())); + connect(view, SIGNAL(titleChanged(QString)), SLOT(adjustTitle())); connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int))); connect(view, SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool))); @@ -87,7 +87,7 @@ MainWindow::MainWindow(const QUrl& url) QMenu *effectMenu = menuBar()->addMenu(tr("&Effect")); effectMenu->addAction("Highlight all links", this, SLOT(highlightAllLinks())); - QAction *rotateAction = new QAction(this); + rotateAction = new QAction(this); rotateAction->setIcon(style()->standardIcon(QStyle::SP_FileDialogDetailedView)); rotateAction->setCheckable(true); rotateAction->setText(tr("Turn images upside down")); @@ -158,8 +158,8 @@ void MainWindow::finishLoading(bool) progress = 100; adjustTitle(); view->page()->mainFrame()->evaluateJavaScript(jQuery); - // Enable this to see the dump of the internal render tree - //qDebug() << view->page()->mainFrame()->renderTreeDump(); + + rotateImages(rotateAction->isChecked()); } //! [6] @@ -172,10 +172,10 @@ void MainWindow::highlightAllLinks() //! [7] //! [8] -void MainWindow::rotateImages(bool toggle) +void MainWindow::rotateImages(bool invert) { QString code; - if (toggle) + if (invert) code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(180deg)') } )"; else code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(0deg)') } )"; diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h index be95614..3afd0be 100644 --- a/examples/webkit/fancybrowser/mainwindow.h +++ b/examples/webkit/fancybrowser/mainwindow.h @@ -66,7 +66,7 @@ protected slots: void slotSourceDownloaded(); void highlightAllLinks(); - void rotateImages(bool toggle); + void rotateImages(bool invert); void removeGifImages(); void removeInlineFrames(); void removeObjectElements(); @@ -76,6 +76,7 @@ private: QString jQuery; QWebView *view; QLineEdit *locationEdit; + QAction *rotateAction; int progress; //! [1] }; |