summaryrefslogtreecommitdiff
path: root/src/webtab.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-01 10:56:10 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-11 12:52:53 +0200
commite3cdb49f2aa6b84f60deabbd20945e02a48193c7 (patch)
treeeca32ed4bb33092a4d630ddbd5817039c4033ffd /src/webtab.cpp
parentAdd GFDL-1.2 licensing for docs (diff)
downloadrekonq-e3cdb49f2aa6b84f60deabbd20945e02a48193c7.tar.xz
Move to KMessageWidget
Port rekonq notification bars to KMessageWidget: walletbar, crash notification bar, set favorite preview bar. Remove old no more used notification bar.
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r--src/webtab.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp
index 09940173..386ad5dc 100644
--- a/src/webtab.cpp
+++ b/src/webtab.cpp
@@ -27,8 +27,8 @@
// Self Includes
#include "webtab.h"
-#include "rekonq_defines.h"
#include "webtab.moc"
+
// Auto Includes
#include "rekonq.h"
@@ -140,12 +140,12 @@ void WebTab::createWalletBar(const QString &key, const QUrl &url)
{
m_walletBar = new WalletBar(this);
m_walletBar.data()->onSaveFormData(key, url);
- qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, m_walletBar.data());
+ m_walletBar.data()->animatedShow();
}
else
{
disconnect(wallet);
- m_walletBar.data()->notifyUser();
+ m_walletBar.data()->animatedShow();
}
connect(m_walletBar.data(), SIGNAL(saveFormDataAccepted(const QString &)),
@@ -160,13 +160,13 @@ void WebTab::createPreviewSelectorBar(int index)
if (m_previewSelectorBar.isNull())
{
m_previewSelectorBar = new PreviewSelectorBar(index, this);
- qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, m_previewSelectorBar.data());
+ m_previewSelectorBar.data()->animatedShow();
}
else
{
disconnect(m_previewSelectorBar.data());
m_previewSelectorBar.data()->setIndex(index);
- m_previewSelectorBar.data()->notifyUser();
+ m_previewSelectorBar.data()->animatedHide();
}
connect(page(), SIGNAL(loadStarted()), m_previewSelectorBar.data(), SLOT(loadProgress()), Qt::UniqueConnection);
@@ -176,12 +176,6 @@ void WebTab::createPreviewSelectorBar(int index)
}
-void WebTab::insertBar(NotificationBar *bar)
-{
- qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, bar);
-}
-
-
bool WebTab::hasRSSInfo()
{
QWebElementCollection col = page()->mainFrame()->findAllElements("link[type=\"application/rss+xml\"]");
@@ -254,7 +248,7 @@ void WebTab::setPart(KParts::ReadOnlyPart *p, const KUrl &u)
KUrl WebTab::extractOpensearchUrl(QWebElement e)
{
- QString href = e.attribute(QLatin1String("href"));
+ QString href = e.attribute(QL1S("href"));
KUrl url = KUrl(href);
if (!href.contains(":"))
{
@@ -272,15 +266,15 @@ KUrl WebTab::extractOpensearchUrl(QWebElement e)
bool WebTab::hasNewSearchEngine()
{
- QWebElement e = page()->mainFrame()->findFirstElement(QLatin1String("head >link[rel=\"search\"][ type=\"application/opensearchdescription+xml\"]"));
+ QWebElement e = page()->mainFrame()->findFirstElement(QL1S("head >link[rel=\"search\"][ type=\"application/opensearchdescription+xml\"]"));
return !e.isNull() && !rApp->opensearchManager()->engineExists(extractOpensearchUrl(e));
}
void WebTab::showSearchEngine(const QPoint &pos)
{
- QWebElement e = page()->mainFrame()->findFirstElement(QLatin1String("head >link[rel=\"search\"][ type=\"application/opensearchdescription+xml\"]"));
- QString title = e.attribute(QLatin1String("title"));
+ QWebElement e = page()->mainFrame()->findFirstElement(QL1S("head >link[rel=\"search\"][ type=\"application/opensearchdescription+xml\"]"));
+ QString title = e.attribute(QL1S("title"));
if (!title.isEmpty())
{
WebShortcutWidget *widget = new WebShortcutWidget(window());