diff options
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; |