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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<skin version="0.11">
|
<skin version="0.11">
|
||||||
<name>vergilius</name>
|
<name>involutus</name>
|
||||||
<author>
|
<author>
|
||||||
<name>Martin Rotter</name>
|
<name>Martin Rotter</name>
|
||||||
<email>rotter.martinos@gmail.com</email>
|
<email>rotter.martinos@gmail.com</email>
|
||||||
|
@ -17,6 +17,19 @@ WebPage::WebPage(QObject *parent)
|
|||||||
WebPage::~WebPage() {
|
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) {
|
QWebPage *WebPage::createWindow(WebWindowType type) {
|
||||||
return QWebPage::createWindow(type);
|
return QWebPage::createWindow(type);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,9 @@ class WebPage : public QWebPage {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
QWebPage *createWindow(WebWindowType type);
|
QWebPage *createWindow(WebWindowType type);
|
||||||
|
bool acceptNavigationRequest(QWebFrame *frame,
|
||||||
|
const QNetworkRequest &request,
|
||||||
|
NavigationType type);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BASEWEBPAGE_H
|
#endif // BASEWEBPAGE_H
|
||||||
|
@ -25,7 +25,7 @@ class WebBrowser : public TabContent {
|
|||||||
public:
|
public:
|
||||||
// Constructors and destructors.
|
// Constructors and destructors.
|
||||||
explicit WebBrowser(QWidget *parent = 0);
|
explicit WebBrowser(QWidget *parent = 0);
|
||||||
~WebBrowser();
|
virtual ~WebBrowser();
|
||||||
|
|
||||||
// Reloads icons for all buttons.
|
// Reloads icons for all buttons.
|
||||||
void setupIcons();
|
void setupIcons();
|
||||||
@ -60,7 +60,7 @@ class WebBrowser : public TabContent {
|
|||||||
void navigateToUrl(const QString &url);
|
void navigateToUrl(const QString &url);
|
||||||
void navigateToUrl(const QUrl &url);
|
void navigateToUrl(const QUrl &url);
|
||||||
|
|
||||||
// Navigates to message.
|
// Navigates to single message.
|
||||||
void navigateToMessage(const Message &message);
|
void navigateToMessage(const Message &message);
|
||||||
|
|
||||||
// Navigates to messages via "newspaper" view.
|
// Navigates to messages via "newspaper" view.
|
||||||
|
@ -35,7 +35,6 @@ class WebView : public QWebView {
|
|||||||
bool decreaseWebPageZoom();
|
bool decreaseWebPageZoom();
|
||||||
bool resetWebPageZoom();
|
bool resetWebPageZoom();
|
||||||
|
|
||||||
protected slots:
|
|
||||||
// Executes if loading of any page is done.
|
// Executes if loading of any page is done.
|
||||||
void onLoadFinished(bool ok);
|
void onLoadFinished(bool ok);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user