diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-15 12:58:56 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-15 12:58:56 +0200 |
commit | 32d0da0ba3c17281c4a69ee84b42e98246eb3c5d (patch) | |
tree | 4f0b2e33e16bcb5e77db737d59720b7650bcb0d2 | |
parent | Fixing state. Rekonq is not usable now, but this seems a good tech preview. (diff) | |
download | rekonq-32d0da0ba3c17281c4a69ee84b42e98246eb3c5d.tar.xz |
First adjustments and code about it (it's really simple, anyway..Qt rocks!!!)
-rw-r--r-- | src/homepage.cpp | 18 | ||||
-rw-r--r-- | src/mainview.cpp | 21 | ||||
-rw-r--r-- | src/mainview.h | 2 | ||||
-rw-r--r-- | src/webpage.cpp | 3 |
4 files changed, 9 insertions, 35 deletions
diff --git a/src/homepage.cpp b/src/homepage.cpp index 52668036..0cd966f4 100644 --- a/src/homepage.cpp +++ b/src/homepage.cpp @@ -95,20 +95,14 @@ QString HomePage::speedDial() QString speed = QString(); for(int i = 0; i< urls.count(); ++i) { - QString fileName = QString("thumb") + QString::number(i) + QString(".png"); - QString path = KStandardDirs::locateLocal("cache", QString("thumbs/") + fileName, true); - if( !QFile::exists(path) ) - { - kDebug() << "websnap" << i << "========================================================="; - WebSnap *ws = new WebSnap(urls.at(i), fileName); - - // we need polish being in an extant object!! - connect(ws, SIGNAL(finished()), Application::instance()->mainWindow()->mainView(), SLOT(polish())); - } - + QString pageName = QString("page") + QString::number(i); + speed += "<div class=\"thumbnail\">"; speed += "<a href=\"" + urls.at(i) + "\">"; - speed += "<img src=\"" + path + "\" width=\"200\" alt=\"" + names.at(i) + "\" />"; + speed += "<object type=\"application/x-qt-plugin\"; classId=\"WebView\" name=\"" + pageName + "\" width=\"200\">"; + speed += "<param name=\"load\" value=\"" + urls.at(i) + "\">"; + speed += "</object>"; +// speed += "<img src=\"" + path + "\" width=\"200\" alt=\"" + names.at(i) + "\" />"; speed += "<br />"; speed += names.at(i) + "</a></div>"; } diff --git a/src/mainview.cpp b/src/mainview.cpp index 2a3545b4..038562e8 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -594,24 +594,3 @@ KUrl::List MainView::recentlyClosedTabs() { return m_recentlyClosedTabs; } - - -void MainView::polish() -{ - static int i = 0; - WebSnap *ws = qobject_cast<WebSnap*>(sender()); - delete ws; - - i++; - if(i<9) - { - WebView *w = currentWebView(); - HomePage p(w); - w->setHtml( p.rekonqHomePage() ); - kDebug() << "ciao---------------------------------------------____"; - } - else - { - kDebug() << "EROORORORORORORORORORO"; - } -} diff --git a/src/mainview.h b/src/mainview.h index 1ba4a63d..8a5c5cfa 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -124,8 +124,6 @@ public slots: void slotWebReload(); void slotWebStop(); - void polish(); - private slots: void slotCurrentChanged(int index); diff --git a/src/webpage.cpp b/src/webpage.cpp index b33d2cce..ea902932 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -73,6 +73,9 @@ WebPage::WebPage(QObject *parent) , m_pressedButtons(Qt::NoButton) , m_requestedUrl() { + // Enable plugin support + settings()->setAttribute(QWebSettings::PluginsEnabled, true); + setForwardUnsupportedContent(true); setNetworkAccessManager(Application::networkAccessManager()); |