Some work on newspaper and webpage.
This commit is contained in:
parent
221ae0930b
commit
37f631193e
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.11">
|
||||
<name>vergilius</name>
|
||||
<name>involutus</name>
|
||||
<author>
|
||||
<name>Martin Rotter</name>
|
||||
<email>rotter.martinos@gmail.com</email>
|
||||
|
@ -17,6 +17,19 @@ WebPage::WebPage(QObject *parent)
|
||||
WebPage::~WebPage() {
|
||||
}
|
||||
|
||||
bool WebPage::acceptNavigationRequest(QWebFrame *frame,
|
||||
const QNetworkRequest &request,
|
||||
QWebPage::NavigationType type) {
|
||||
if (type == QWebPage::NavigationTypeLinkClicked &&
|
||||
frame == mainFrame()) {
|
||||
// Make sure that appropriate signal is emitted even if
|
||||
// no delegation is enabled.
|
||||
emit linkClicked(request.url());
|
||||
}
|
||||
|
||||
return QWebPage::acceptNavigationRequest(frame, request, type);
|
||||
}
|
||||
|
||||
QWebPage *WebPage::createWindow(WebWindowType type) {
|
||||
return QWebPage::createWindow(type);
|
||||
}
|
||||
|
@ -14,6 +14,9 @@ class WebPage : public QWebPage {
|
||||
|
||||
protected:
|
||||
QWebPage *createWindow(WebWindowType type);
|
||||
bool acceptNavigationRequest(QWebFrame *frame,
|
||||
const QNetworkRequest &request,
|
||||
NavigationType type);
|
||||
};
|
||||
|
||||
#endif // BASEWEBPAGE_H
|
||||
|
@ -151,7 +151,7 @@ void WebBrowser::onTitleChanged(const QString &new_title) {
|
||||
}
|
||||
}
|
||||
|
||||
void WebBrowser::updateUrl(const QUrl &url) {
|
||||
void WebBrowser::updateUrl(const QUrl &url) {
|
||||
m_txtLocation->setText(url.toString());
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ class WebBrowser : public TabContent {
|
||||
public:
|
||||
// Constructors and destructors.
|
||||
explicit WebBrowser(QWidget *parent = 0);
|
||||
~WebBrowser();
|
||||
virtual ~WebBrowser();
|
||||
|
||||
// Reloads icons for all buttons.
|
||||
void setupIcons();
|
||||
@ -60,7 +60,7 @@ class WebBrowser : public TabContent {
|
||||
void navigateToUrl(const QString &url);
|
||||
void navigateToUrl(const QUrl &url);
|
||||
|
||||
// Navigates to message.
|
||||
// Navigates to single message.
|
||||
void navigateToMessage(const Message &message);
|
||||
|
||||
// Navigates to messages via "newspaper" view.
|
||||
|
@ -35,7 +35,6 @@ class WebView : public QWebView {
|
||||
bool decreaseWebPageZoom();
|
||||
bool resetWebPageZoom();
|
||||
|
||||
protected slots:
|
||||
// Executes if loading of any page is done.
|
||||
void onLoadFinished(bool ok);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user