diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-01-09 12:10:19 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-01-09 12:10:19 +0100 |
commit | 5391120be8cfd3a5d752ac8c7b66bf17b690f303 (patch) | |
tree | 7fdacbbbcc941e7cf2a05a32175d6ea4a3bb006a /src/mainview.cpp | |
parent | removed LoadPage method to semplify API (diff) | |
download | rekonq-5391120be8cfd3a5d752ac8c7b66bf17b690f303.tar.xz |
BIG change!!
Removed use of proxy webactionmapper to manage web actions..
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 115 |
1 files changed, 84 insertions, 31 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index d4318cdf..f61a7593 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -19,9 +19,11 @@ * ============================================================ */ -// Local Includes +// Self Includes #include "mainview.h" +#include "mainview.moc" +// Local Includes #include "tabbar.h" #include "browserapplication.h" #include "mainwindow.h" @@ -212,6 +214,87 @@ MainView::~MainView() } +// ======================================================================================================== + KAction *MainView::newTabAction() const {return m_newTabAction; } + KAction *MainView::closeTabAction() const {return m_closeTabAction; } + KAction *MainView::recentlyClosedTabsAction() const {return m_recentlyClosedTabsAction;} + KAction *MainView::nextTabAction() const{} + KAction *MainView::previousTabAction() const{} + + void MainView::slotWebReload() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Reload); + action->trigger(); + } + + void MainView::slotWebBack() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Back); + action->trigger(); + } + + void MainView::slotWebForward() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Forward); + action->trigger(); + } + + void MainView::slotWebUndo() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Undo); + action->trigger(); + } + + void MainView::slotWebRedo() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Redo); + action->trigger(); + } + + void MainView::slotWebCut() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Cut); + action->trigger(); + } + + void MainView::slotWebCopy() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Copy); + action->trigger(); + } + + void MainView::slotWebPaste() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + QAction *action = currentParent->action(QWebPage::Paste); + action->trigger(); + } + + void MainView::slotWebSelectAll() + { + WebView *webView = currentWebView(); + QWebPage *currentParent = webView->webPage(); + // FIXME + } + +// ======================================================================================================== + + void MainView::clear() { // clear the recently closed tabs @@ -298,36 +381,6 @@ void MainView::currentChanged(int index) } -KAction *MainView::newTabAction() const -{ - return m_newTabAction; -} - - -KAction *MainView::closeTabAction() const -{ - return m_closeTabAction; -} - - -KAction *MainView::recentlyClosedTabsAction() const -{ - return m_recentlyClosedTabsAction; -} - - -KAction *MainView::nextTabAction() const -{ - return m_nextTabAction; -} - - -KAction *MainView::previousTabAction() const -{ - return m_previousTabAction; -} - - QWidget *MainView::lineEditStack() const { return m_lineEdits; |