From 924990afb8d34307bfeeda7fcb33972f3262e8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 21 Sep 2011 11:42:04 +0000 Subject: [PATCH] Changed QComboBox to QEditText for kiosk mode; refs #102 --- swisssurfer/src/browser.hxx | 176 +++++++++++++++++++----------- swisssurfer/src/browser.ui | 17 ++- swisssurfer/src/main.cxx | 5 - swisssurfer/src/qmake.pro.in | 6 +- swisssurfer/src/swisssurfer_de.ts | 145 +++++++++++++----------- swisssurfer/src/swisssurfer_en.ts | 145 +++++++++++++----------- swisssurfer/src/swisssurfer_fr.ts | 145 +++++++++++++----------- swisssurfer/src/swisssurfer_it.ts | 145 +++++++++++++----------- swisssurfer/src/webpage.hxx | 14 +++ 9 files changed, 464 insertions(+), 334 deletions(-) diff --git a/swisssurfer/src/browser.hxx b/swisssurfer/src/browser.hxx index 06fcc13..c2d90d5 100644 --- a/swisssurfer/src/browser.hxx +++ b/swisssurfer/src/browser.hxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -85,17 +86,37 @@ class Browser: public QMainWindow, protected Ui::Browser { _zoom->setPageStep(10); _zoom->setTickPosition(QSlider::TicksAbove); assert(connect(_zoom, SIGNAL(valueChanged(int)), SLOT(zoom(int)))); - _url = new QComboBox(_toolbar); - _url->setInsertPolicy(QComboBox::NoInsert); - _url->setLineEdit(new ButtonLineEdit(_url)); + if (!_kiosk) { + QComboBox* combo(new QComboBox(_toolbar)); + _url = combo; + combo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); + combo->setInsertPolicy(QComboBox::NoInsert); + combo->setLineEdit(new ButtonLineEdit(combo)); + combo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, + QSizePolicy::Preferred)); + combo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); + combo->setEditable(!_kiosk); + assert(connect(combo, SIGNAL(currentIndexChanged(const QString&)), + SLOT(load(QString)))); + assert(connect(combo->lineEdit(), SIGNAL(returnPressed()), + SLOT(load()))); + assert(connect(combo->lineEdit(), SIGNAL(textChanged(QString)), + SLOT(goodUrl()))); + dynamic_cast(combo->lineEdit())->add + (actionAddBookmark); + dynamic_cast(combo->lineEdit())->add + (actionClearLocation); + _editbookmarks = + std::auto_ptr(new EditBookmarks(combo, this)); + } else { + QLineEdit* label(new QLineEdit(_toolbar)); + _url = label; + label->setReadOnly(true); + } _url->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred)); - _url->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); - _url->setEditable(!_kiosk); _toolbar->addWidget(_url); assert(connect(&_errorLog, SIGNAL(reset()), SLOT(errorReset()))); - assert(connect(_url, SIGNAL(currentIndexChanged(const QString&)), - SLOT(load(QString)))); assert(connect(&_networkManager, SIGNAL(finished(QNetworkReply*)), SLOT(finished(QNetworkReply*)))); assert(connect(&_networkManager, SIGNAL(created(QNetworkReply*)), @@ -120,20 +141,6 @@ class Browser: public QMainWindow, protected Ui::Browser { actionNewTab->setEnabled(false); actionNewTab->setVisible(false); } else { - assert(connect(_url->lineEdit(), SIGNAL(returnPressed()), - SLOT(load()))); - assert(connect(_url->lineEdit(), SIGNAL(textChanged(QString)), - SLOT(goodUrl()))); - - dynamic_cast(_url->lineEdit())->add - (actionAddBookmark); - - dynamic_cast(_url->lineEdit())->add - (actionClearLocation); - assert(connect(actionClearLocation, SIGNAL(triggered()), - _url, SLOT(clearEditText()))); - assert(connect(actionClearLocation, SIGNAL(triggered()), - _url, SLOT(setFocus()))); } if (!_kiosk && _settings.flag("SaveWindowState") && _settings()) loadWin(urls.size()); @@ -142,8 +149,6 @@ class Browser: public QMainWindow, protected Ui::Browser { if (!QSslSocket::supportsSsl()) QMessageBox::critical(this, tr("SSL Not Supported"), tr("SSL is not supported on your system")); - _editbookmarks = - std::auto_ptr(new EditBookmarks(_url, this)); } ~Browser() { @@ -167,6 +172,7 @@ class Browser: public QMainWindow, protected Ui::Browser { QWebView* newTab() { QWebView* browser(new QWebView); browser->setPage(new WebPage(this, browser)); + browser->page()->setPluginFactory(new PluginFactory); browser->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); browser->page()->setNetworkAccessManager(&_networkManager); browser->page()->setForwardUnsupportedContent(true); @@ -442,7 +448,10 @@ class Browser: public QMainWindow, protected Ui::Browser { void load() { LOG; - load(_url->currentText()); + if (qobject_cast(_url)) + load(qobject_cast(_url)->currentText()); + else + load(qobject_cast(_url)->text()); } void load(QString page) { @@ -474,7 +483,9 @@ class Browser: public QMainWindow, protected Ui::Browser { } void on_actionAddBookmark_triggered() { - _url->addItem(_url->currentText()); + if (qobject_cast(_url)) + qobject_cast(_url)->addItem + (qobject_cast(_url)->currentText()); } void on_actionEditBookmarks_triggered() { @@ -508,8 +519,14 @@ class Browser: public QMainWindow, protected Ui::Browser { } void on__tabs_currentChanged(int index) { - _url->setEditText(qobject_cast(_tabs->currentWidget()) - ->url().toString()); + if (qobject_cast(_url)) + qobject_cast(_url)->setEditText + (qobject_cast(_tabs->currentWidget()) + ->url().toString()); + else + qobject_cast(_url)->setText + (qobject_cast(_tabs->currentWidget()) + ->url().toString()); activateTab(); } @@ -593,26 +610,43 @@ class Browser: public QMainWindow, protected Ui::Browser { } void on__find_textChanged(QString) { - _find->setStyleSheet(tr("background-color: white", "neutral find")); + _find->changeStyleSheet(tr("background-color: white", "neutral find")); + } + + + void on_actionClearLocation_triggered() { + if (!qobject_cast(_url)) return; + qobject_cast(_url)->clearEditText(); + qobject_cast(_url)->setFocus(); + } + + void on_actionClearFind_triggered() { + if (!_find) return; + _find->clear(); + _find->setFocus(); } void on_actionFind_triggered() { if (!_find) { - statusBar()->addPermanentWidget(_find = new QLineEdit); + statusBar()->addPermanentWidget(_find = new ButtonLineEdit); _find->setText(qobject_cast(_tabs->currentWidget()) ->selectedText()); + _find->addAction(actionUnFind); + _find->addAction(actionClearFind); } disconnect(_find, SIGNAL(returnPressed()), this, SLOT(rfind())); disconnect(_find, SIGNAL(textEdited(QString)), this, SLOT(rfind())); assert(connect(_find, SIGNAL(returnPressed()), SLOT(find()))); assert(connect(_find, SIGNAL(textEdited(QString)), SLOT(find()))); - _find->setStyleSheet(tr("background-color: white", "neutral find")); + _find->changeStyleSheet(tr("background-color: white", "neutral find")); _find->setFocus(); } void on_actionReverseFind_triggered() { if (!_find) { - statusBar()->addPermanentWidget(_find = new QLineEdit); + statusBar()->addPermanentWidget(_find = new ButtonLineEdit); + _find->add(actionUnFind); + _find->add(actionClearFind); _find->setText(qobject_cast(_tabs->currentWidget()) ->selectedText()); } @@ -620,7 +654,7 @@ class Browser: public QMainWindow, protected Ui::Browser { disconnect(_find, SIGNAL(textEdited(QString)), this, SLOT(find())); assert(connect(_find, SIGNAL(returnPressed()), SLOT(rfind()))); assert(connect(_find, SIGNAL(textEdited(QString)), SLOT(rfind()))); - _find->setStyleSheet(tr("background-color: white", "neutral find")); + _find->changeStyleSheet(tr("background-color: white", "neutral find")); _find->setFocus(); } @@ -628,9 +662,9 @@ class Browser: public QMainWindow, protected Ui::Browser { if (qobject_cast(_tabs->currentWidget())->findText (_find->text(), QWebPage::FindWrapsAroundDocument)) - _find->setStyleSheet(tr("background-color: #ADA", "text found")); + _find->changeStyleSheet(tr("background-color: #ADA", "text found")); else - _find->setStyleSheet(tr("background-color: #F77", "text not found")); + _find->changeStyleSheet(tr("background-color: #F77", "text not found")); } void rfind(const QString& txt=QString()) { @@ -638,9 +672,9 @@ class Browser: public QMainWindow, protected Ui::Browser { (_find->text(), QWebPage::FindWrapsAroundDocument |QWebPage::FindBackward)) - _find->setStyleSheet(tr("background-color: #ADA", "text found")); + _find->changeStyleSheet(tr("background-color: #ADA", "text found")); else - _find->setStyleSheet(tr("background-color: #F77", "text not found")); + _find->changeStyleSheet(tr("background-color: #F77", "text not found")); } void on_actionUnFind_triggered() { @@ -690,7 +724,10 @@ class Browser: public QMainWindow, protected Ui::Browser { LOG<currentWidget()) return; LOG<<"signal on current tab"; - if (_url) _url->setEditText(url.toString()); + if (qobject_cast(_url)) + qobject_cast(_url)->setEditText(url.toString()); + else + qobject_cast(_url)->setText(url.toString()); } void linkClicked(const QUrl& url) { @@ -1201,15 +1238,23 @@ class Browser: public QMainWindow, protected Ui::Browser { } void badUrl() { - if (_url && _url->lineEdit()) - dynamic_cast(_url->lineEdit()) + if (qobject_cast(_url)) + dynamic_cast + (qobject_cast(_url)->lineEdit()) ->changeStyleSheet(tr("background-color: #F77", "invalid url")); + else + qobject_cast(_url) + ->setStyleSheet(tr("background-color: #F77", "invalid url")); } void goodUrl() { - if (_url && _url->lineEdit()) - dynamic_cast(_url->lineEdit()) + if (qobject_cast(_url)) + dynamic_cast + (qobject_cast(_url)->lineEdit()) ->changeStyleSheet(tr("background-color: white", "valid url")); + else + qobject_cast(_url) + ->setStyleSheet(tr("background-color: white", "valid url")); } void downloadError(QString error) { @@ -1246,8 +1291,9 @@ class Browser: public QMainWindow, protected Ui::Browser { void saveWin() { LOG<<"Save Window State"; QStringList urls; - for (int i(0); i<_url->count(); ++i) - urls<<_url->itemText(i); + if (qobject_cast(_url)) + for (int i(0); i(_url)->count(); ++i) + urls<(_url)->itemText(i); _settings()->setValue("Window/Urls", urls); QStringList tabs; for (int i(0); i<_tabs->count(); ++i) @@ -1262,7 +1308,8 @@ class Browser: public QMainWindow, protected Ui::Browser { QStringList urls(_settings()->value("Window/Urls").toStringList()); urls.sort(); urls.removeDuplicates(); - _url->addItems(urls); + if (qobject_cast(_url)) + qobject_cast(_url)->addItems(urls); QStringList tabs(_settings()->value("Window/Tabs").toStringList()); if (!noRrestoreTabs) for (QStringList::iterator it(tabs.begin()); it!=tabs.end(); ++it) @@ -1276,7 +1323,7 @@ class Browser: public QMainWindow, protected Ui::Browser { void activateTab() { iconChanged(); - QWebHistory* history(dynamic_cast(_tabs->currentWidget()) + QWebHistory* history(qobject_cast(_tabs->currentWidget()) ->history()); actionForward->setEnabled(history->canGoForward()); actionBack->setEnabled(history->canGoBack()); @@ -1293,14 +1340,18 @@ class Browser: public QMainWindow, protected Ui::Browser { class ButtonLineEdit: public QLineEdit { public: - ButtonLineEdit(QWidget* p): QLineEdit(p) {} + ButtonLineEdit(QWidget* p=0): QLineEdit(p) { + LOG; + } QToolButton* add(QAction* a) { + LOG; QToolButton* b(new QToolButton(this)); b->setDefaultAction(a); add(b); return b; } ButtonLineEdit& add(QToolButton* b) { + LOG; b->setParent(this); b->setStyleSheet("QToolButton { border: none; padding: 0; }"); b->setCursor(Qt::ArrowCursor); @@ -1309,25 +1360,26 @@ class Browser: public QMainWindow, protected Ui::Browser { return *this; } ButtonLineEdit& changeStyleSheet(QString s) { + LOG; _style = s; resizeEvent(0); return *this; } protected: - void resizeEvent(QResizeEvent*) { - QSize sz; - int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); - for (Buttons::iterator it(_buttons.begin()); - it!=_buttons.end(); ++it) { - if (sz.isEmpty()) sz = (*it)->sizeHint(); - else sz.setWidth(sz.width()+(*it)->sizeHint().width()); - (*it)->move(rect().right() - frameWidth - sz.width(), - (rect().bottom() + 1 - (*it)->sizeHint().height())/2); - } - setStyleSheet(QString("QLineEdit { padding-right: %1px; %2 }") - .arg(sz.width() + frameWidth + 1) - .arg(_style)); - } + void resizeEvent(QResizeEvent*) { + QSize sz; + int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + for (Buttons::iterator it(_buttons.begin()); + it!=_buttons.end(); ++it) { + if (sz.isEmpty()) sz = (*it)->sizeHint(); + else sz.setWidth(sz.width()+(*it)->sizeHint().width()); + (*it)->move(rect().right() - frameWidth - sz.width(), + (rect().bottom() + 1 - (*it)->sizeHint().height())/2); + } + setStyleSheet(QString("QLineEdit { padding-right: %1px; %2 }") + .arg(sz.width() + frameWidth + 1) + .arg(_style)); + } private: typedef QList Buttons; Buttons _buttons; @@ -1336,8 +1388,8 @@ class Browser: public QMainWindow, protected Ui::Browser { private: - QComboBox* _url; - QLineEdit* _find; + QWidget* _url; + ButtonLineEdit* _find; QSlider* _zoom; QProgressBar* _progress; QString _home; diff --git a/swisssurfer/src/browser.ui b/swisssurfer/src/browser.ui index bbeeb16..a31590e 100644 --- a/swisssurfer/src/browser.ui +++ b/swisssurfer/src/browser.ui @@ -219,6 +219,9 @@ &Close + + Ctrl+W + @@ -287,7 +290,7 @@ Add New Tab - Ctrl+T + Esc @@ -419,6 +422,18 @@ &Bookmarks + + + + :/icons/clearlocation:/icons/clearlocation + + + Clear Find + + + clear find bar + + diff --git a/swisssurfer/src/main.cxx b/swisssurfer/src/main.cxx index 6d33b96..5e26a58 100644 --- a/swisssurfer/src/main.cxx +++ b/swisssurfer/src/main.cxx @@ -386,11 +386,6 @@ int main(int argv, char** argc) try { return 1; } QSslConfiguration::setDefaultConfiguration(sslConfig); - assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_EV_GOLD_CA_2009_G2)); - assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_GOLD_CA_G2)); - //assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_SERVER_GOLD_CA_2008_G2)))); - assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_SILVER_CA_G2)); - assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_PLATINUM_CA_G2)); //............................................................................ Browser browser(actlib, urls, settings.get(), mimetypes, silent, login); browser.show(); diff --git a/swisssurfer/src/qmake.pro.in b/swisssurfer/src/qmake.pro.in index b293f28..f024327 100644 --- a/swisssurfer/src/qmake.pro.in +++ b/swisssurfer/src/qmake.pro.in @@ -1,6 +1,7 @@ QT += webkit network gui CONFIG += no_keywords -QMAKE_LIBS += -lproxyface -lcryptoki++ -lssl -lcrypto +QMAKE_LIBS += -lproxyface -lcryptoki++ -lssl -lcrypto -lpoppler-qt4 +QMAKE_CXXFLAGS += -std=c++0x unix { !macx { @@ -36,7 +37,8 @@ SOURCES = main.cxx webpage.cxx HEADERS = browser.hxx smartcardauth.hxx pinentry.hxx \ downloadmanager.hxx settings.hxx sslclientnetworkmanager.hxx \ authentication.hxx webpage.hxx errorlog.hxx \ - certificate.hxx logincertificate.hxx editbookmarks.hxx + certificate.hxx logincertificate.hxx editbookmarks.hxx \ + pluginfactory.hxx pdfdisplay.hpp FORMS = browser.ui settings.ui pinentry.ui authentication.ui errorlog.ui \ certificate.ui logincertificate.ui editbookmarks.ui diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index 44f1a7e..db5a5de 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -119,274 +119,285 @@ - + + Ctrl+W + + + + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - - - New Tab - - - Add New Tab + New Tab - Ctrl+T + Add New Tab - + Find - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks + + + Clear Find + + + + + clear find bar + + - + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + + background-color: white neutral find - - + + background-color: #ADA background-color: #7F7 text found - - + + background-color: #F77 background-color: lightred text not found - + About - + %8 Version: %1 Builddate: %2 @@ -406,40 +417,42 @@ openssl-%7 - + %1 - + Save File As ... - + errors show error log - + + background-color: #F77 invalid url - + + background-color: white valid url - + authentication required - + ssl error diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index 011386b..380a1b4 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -79,7 +79,8 @@ - + + Esc @@ -124,248 +125,258 @@ - + + Ctrl+W + + + + &Proxy... - + Print ... - + Print Pre&view ... - + Quick &Print - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - - - New Tab - - - Add New Tab + New Tab - Ctrl+T + Add New Tab - + Find - + find in page - + Ctrl+F - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks - + + Clear Find + + + + + clear find bar + + + + Checking: %1 - + SSL Not Supported - + SSL is not supported on your system - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + Reading: %1 - + Illegal URL: %1 - + Zoom: %1% - + Print Document - + %1 - %2 statusbar actionBack_hovered %1=url %2=title - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + + background-color: white neutral find - - + + background-color: #ADA background-color: #7F7 text found - - + + background-color: #F77 background-color: lightred text not found - + About - + %8 Version: %1 Builddate: %2 @@ -385,56 +396,58 @@ openssl-%7 - + %1 - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Save File As ... - + errors show error log - + + background-color: #F77 invalid url - + + background-color: white valid url - + authentication required - + ssl error diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index 44f1a7e..db5a5de 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -119,274 +119,285 @@ - + + Ctrl+W + + + + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - - - New Tab - - - Add New Tab + New Tab - Ctrl+T + Add New Tab - + Find - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks + + + Clear Find + + + + + clear find bar + + - + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + + background-color: white neutral find - - + + background-color: #ADA background-color: #7F7 text found - - + + background-color: #F77 background-color: lightred text not found - + About - + %8 Version: %1 Builddate: %2 @@ -406,40 +417,42 @@ openssl-%7 - + %1 - + Save File As ... - + errors show error log - + + background-color: #F77 invalid url - + + background-color: white valid url - + authentication required - + ssl error diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index 80aa34f..8a8b0e7 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -79,7 +79,8 @@ - + + Esc @@ -124,246 +125,256 @@ - + + Ctrl+W + + + + &Proxy... - + Print ... - + Print Pre&view ... - + Quick &Print - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - - - New Tab - - - Add New Tab + New Tab - Ctrl+T + Add New Tab - + Find - + find in page - + Ctrl+F - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks - + + Clear Find + + + + + clear find bar + + + + SSL Not Supported - + SSL is not supported on your system - + Checking: %1 - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + Reading: %1 - + Illegal URL: %1 - + Zoom: %1% - + Print Document - + %1 - %2 statusbar actionBack_hovered %1=url %2=title - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + + background-color: white neutral find - - + + background-color: #ADA text found - - + + background-color: #F77 text not found - + About - + %8 Version: %1 Builddate: %2 @@ -375,56 +386,58 @@ openssl-%7 - + %1 - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Save File As ... - + errors show error log - + + background-color: #F77 invalid url - + + background-color: white valid url - + authentication required - + ssl error diff --git a/swisssurfer/src/webpage.hxx b/swisssurfer/src/webpage.hxx index bea42a0..d503ef8 100644 --- a/swisssurfer/src/webpage.hxx +++ b/swisssurfer/src/webpage.hxx @@ -11,6 +11,11 @@ #include #include +#include +#ifndef LOG +#define LOG qDebug()<<__PRETTY_FUNCTION__ +#endif + class Browser; class WebPage: public QWebPage { @@ -23,6 +28,15 @@ class WebPage: public QWebPage { .value("SWISSSURFER_USERAGENT")); return QWebPage::userAgentForUrl(url)+(add.size()?" "+add:QString()); } + QObject* createPlugin(const QString& classid, const QUrl& url, + const QStringList& paramNames, + const QStringList& paramValues) { + LOG<<"classid:"<