Files
surfer/swisssurfer/src/webpage.hxx

30 lines
753 B
C++
Raw Normal View History

2011-02-28 08:30:57 +00:00
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#ifndef __WEBPAGE_HXX__
#define __WEBPAGE_HXX__
#include <QtWebKit/QWebPage>
#include <QtCore/QProcessEnvironment>
2011-02-28 08:30:57 +00:00
class Browser;
class WebPage: public QWebPage {
public:
WebPage(Browser* b, QObject *parent = 0): QWebPage(parent), _browser(b) {}
protected:
virtual QWebPage* createWindow(WebWindowType type);
virtual QString userAgentForUrl(const QUrl& url) const {
return QProcessEnvironment::systemEnvironment()
.value("SWISSSURFER_USERAGENT", QWebPage::userAgentForUrl(url));
}
2011-02-28 08:30:57 +00:00
private:
Browser* _browser;
};
#endif