diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-02-09 12:32:58 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-02-09 12:32:58 +0100 |
commit | e8e00372f5e1a881b1ce83a3623208dae7833f4c (patch) | |
tree | 86e724a3fe7fdd69420da3d74fc32c6745eb35b2 /src/webtab.cpp | |
parent | Free MainWindow from PreviewSelectorBar (diff) | |
download | rekonq-e8e00372f5e1a881b1ce83a3623208dae7833f4c.tar.xz |
HUGE CHANGE on Preview Page Choosing
The idea here is to free rekonq from unuseful weight while browsing
and better maintain code.
- Moved PreviewSelectorBar to be one of the WebTab bar
- (this way position moved to up rather then down)
- creation on use && deletion on close (SAVE MEMORY)
- free others page for browsing
- fix copyright
- CLEAN API (is private/public a misconception?) && comments
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r-- | src/webtab.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp index b3eb71f0..fb925d6e 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -39,6 +39,7 @@ #include "webpage.h" #include "bookmarksmanager.h" #include "walletbar.h" +#include "previewselectorbar.h" // KDE Includes #include <KService> @@ -165,3 +166,16 @@ void WebTab::createWalletBar(const QString &key, const QUrl &url) connect(walletBar, SIGNAL(saveFormDataRejected(const QString &)), wallet, SLOT(rejectSaveFormDataRequest(const QString &))); } + + +void WebTab::createPreviewSelectorBar(int index) +{ + QWidget *messageBar = layout()->itemAt(0)->widget(); + PreviewSelectorBar *bar = new PreviewSelectorBar(index, messageBar); + messageBar->layout()->addWidget(bar); + + connect(page(), SIGNAL(loadStarted()), bar, SLOT(loadProgress())); + connect(page(), SIGNAL(loadProgress(int)), bar, SLOT(loadProgress())); + connect(page(), SIGNAL(loadFinished(bool)), bar, SLOT(loadFinished())); + connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), bar, SLOT(verifyUrl())); +} |