From 9ae8812ef5b764046f3314cf983fd5d1303f42ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Mon, 13 Feb 2012 15:29:07 +0000 Subject: [PATCH] done point 1) in refs #108; separated ButtonLineEdit for refs #115 --- src/browser.hxx | 150 +++++++----------- src/designer/buttonlineedit.png | Bin 0 -> 1318 bytes src/designer/buttonlineeditwidgetifc.cxx | 15 ++ src/designer/buttonlineeditwidgetifc.hxx | 77 +++++++++ src/designer/makefile.am | 16 +- src/designer/qmake.pro.in | 15 +- src/designer/resources.qrc.in | 3 +- .../{webview.png => swisswebview.png} | Bin src/designer/webviewwidgetifc.hxx | 17 +- src/main.cxx | 27 ++-- src/qbrowserlib/buttonlineedit.hxx | 80 ++++++++++ src/qbrowserlib/makefile.am | 2 +- src/qbrowserlib/pluginfactory.hxx | 2 + src/qbrowserlib/qmake.pro.in | 5 +- src/qbrowserlib/saveorrun.hxx | 1 + src/swissbrowser_de.ts | 50 +++--- src/swissbrowser_en.ts | 50 +++--- src/swissbrowser_fr.ts | 50 +++--- src/swissbrowser_it.ts | 50 +++--- 19 files changed, 377 insertions(+), 233 deletions(-) create mode 100644 src/designer/buttonlineedit.png create mode 100644 src/designer/buttonlineeditwidgetifc.cxx create mode 100644 src/designer/buttonlineeditwidgetifc.hxx rename src/designer/{webview.png => swisswebview.png} (100%) create mode 100644 src/qbrowserlib/buttonlineedit.hxx diff --git a/src/browser.hxx b/src/browser.hxx index 6f36f4a..fea933a 100644 --- a/src/browser.hxx +++ b/src/browser.hxx @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -22,11 +21,12 @@ #include +#include +#include + #include -#include #include #include -#include #include #include #include @@ -41,6 +41,8 @@ #include #include +#include + #include #include #include @@ -50,6 +52,8 @@ #define LOG qDebug()<<__PRETTY_FUNCTION__ #endif +extern QString TMP; + //! @addtogroup browser //! @{ @@ -104,18 +108,25 @@ class Browser: public QMainWindow, protected Ui::Browser { _zoom->setPageStep(10); _zoom->setTickPosition(QSlider::TicksAbove); assert(connect(_zoom, SIGNAL(valueChanged(int)), SLOT(zoom(int)))); - if (!_quirks) { + if (_kiosk||!_quirks) { _toolbar->addAction(actionReload); _toolbar->addAction(actionStop); } if (!_kiosk) { QComboBox* combo(new QComboBox(_toolbar)); _url = combo; + QFrame* urlFrame(new QFrame); + QHBoxLayout* layout(new QHBoxLayout); + urlFrame->setLayout(layout); + _toolbar->addWidget(urlFrame); + urlFrame->setSizePolicy(QSizePolicy::Preferred, + QSizePolicy::Preferred); + layout->addWidget(_url); combo->setInsertPolicy(QComboBox::NoInsert); combo->setLineEdit(new ButtonLineEdit(combo)); combo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); - combo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, - QSizePolicy::Preferred)); + combo->setSizePolicy(QSizePolicy::MinimumExpanding, + QSizePolicy::Preferred); combo->setEditable(!_kiosk); assert(connect(combo, SIGNAL(currentIndexChanged(const QString&)), SLOT(load(QString)))); @@ -126,8 +137,8 @@ class Browser: public QMainWindow, protected Ui::Browser { if (_quirks) { dynamic_cast(combo->lineEdit())->add (actionStop); - dynamic_cast(combo->lineEdit())->add - (actionReload); + dynamic_cast(combo->lineEdit())->add + (actionReload); } if (!_quirks) { dynamic_cast(combo->lineEdit())->add @@ -141,21 +152,25 @@ class Browser: public QMainWindow, protected Ui::Browser { QLineEdit* label(new QLineEdit(_toolbar)); _url = label; label->setReadOnly(true); - _url->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, - QSizePolicy::Minimum)); + // _url->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, + // QSizePolicy::Minimum)); + _toolbar->addWidget(_url); + } + if (!_kiosk) { + QFrame* searchFrame(new QFrame); + QHBoxLayout* layout(new QHBoxLayout); + layout->addWidget(_searchEngines); + layout->addWidget(_search); + searchFrame->setLayout(layout); + _toolbar->addWidget(searchFrame); + _search->add(actionSearch); + _searchEngines->setSizePolicy(QSizePolicy::Preferred, + QSizePolicy::Preferred); + _search->setSizePolicy(QSizePolicy::Preferred, + QSizePolicy::Preferred); + searchFrame->setSizePolicy(QSizePolicy::Preferred, + QSizePolicy::Preferred); } - _toolbar->addWidget(_url); - QFrame* searchFrame(new QFrame); - searchFrame->setBackgroundRole(QPalette::Base); - searchFrame->setAutoFillBackground(true); - QHBoxLayout* layout(new QHBoxLayout); - layout->addWidget(_searchEngines); - _searchEngines->setStyleSheet(tr("background-color: white", - "search engines combobox")); - layout->addWidget(_search); - searchFrame->setLayout(layout); - _toolbar->addWidget(searchFrame); - _search->add(actionSearch); if (!_quirks) _search->add(actionClearSearch); _search->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum)); @@ -203,10 +218,13 @@ 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")); + // temporary caching of favicons + QWebSettings::setIconDatabasePath(TMP); } ~Browser() { LOG; + QWebSettings::clearIconDatabase(); for (DownloadProcesses::iterator it(_downloadProcesses.begin()); it!=_downloadProcesses.end(); ++it) { LOG<<"cleanup:"<second->fileName(); @@ -225,6 +243,7 @@ class Browser: public QMainWindow, protected Ui::Browser { return true; } + //! Create new empty tab. SwissWebView* newTab() { SwissWebView* browser(new SwissWebView); newTab(browser); @@ -279,11 +298,10 @@ class Browser: public QMainWindow, protected Ui::Browser { if (!view) view=qobject_cast(_tabs->currentWidget()); view->load(page); } - + + //! Slot that receives and initializes a new SwissWebView void newTab(SwissWebView* browser) { browser->page()->setNetworkAccessManager(&_networkManager); - assert(connect(&_networkManager, SIGNAL(finished(QNetworkReply*)), - SLOT(finished(QNetworkReply*)))); _url->setFocus(); // SwissWebView assert(connect(browser, SIGNAL(newView(SwissWebView*)), @@ -557,6 +575,7 @@ class Browser: public QMainWindow, protected Ui::Browser { if (_searchEngines->count()==0) _searchEngines->addItem(QIcon(":/icons/gg"), tr("gg"), tr("http://www.google.com/search?hl=%2&q=%1")); + _searchEngines->setVisible(_searchEngines->count()>1); } void on_actionAddBookmark_triggered() { @@ -880,15 +899,12 @@ class Browser: public QMainWindow, protected Ui::Browser { QWebView* view(qobject_cast(sender())); int index = _tabs->indexOf(view); if (index<0) return; + LOG<<"get icon for "<url(); QIcon icon(QWebSettings::iconForUrl(view->url())); - if (icon.isNull()) { - LOG<<"Icon for URL is Null"<url(); - QPixmap pixmap(QWebSettings::webGraphic - (QWebSettings::DefaultFrameIconGraphic)); - if (!pixmap.isNull()) icon = pixmap; - } else icon = icon.pixmap(16, 16); - if (icon.isNull()) LOG<<"Icon is still null"; - _tabs->setTabIcon(index, icon); + if (!icon.isNull()) return _tabs->setTabIcon(index, icon); + LOG<<"icon for url is null"<url(); + _tabs->setTabIcon(index, QWebSettings::webGraphic + (QWebSettings::DefaultFrameIconGraphic)); } void titleChanged(const QString& text) { @@ -1388,27 +1404,19 @@ class Browser: public QMainWindow, protected Ui::Browser { void started() { QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); - if (_quirks) { - actionStop->setEnabled(true); - } else { - actionStop->setVisible(true); - actionReload->setVisible(false); - } + actionStop->setVisible(true); + actionReload->setVisible(false); _progress->setRange(0, 0); _progress->setValue(0); _progress->setEnabled(true); _progress->show(); } - + void finished() { LOG; QApplication::restoreOverrideCursor(); - if (_quirks) { - actionStop->setEnabled(false); - } else { - actionStop->setVisible(false); - actionReload->setVisible(true); - } + actionStop->setVisible(false); + actionReload->setVisible(true); _progress->setRange(0, 1); _progress->setValue(1); _progress->setEnabled(false); @@ -1502,56 +1510,6 @@ class Browser: public QMainWindow, protected Ui::Browser { } } - private: - - class ButtonLineEdit: public QLineEdit { - public: - 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); - _buttons.push_back(b); - resizeEvent(0); - 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)); - } - private: - typedef QList Buttons; - Buttons _buttons; - QString _style; - }; - private: QWidget* _url; diff --git a/src/designer/buttonlineedit.png b/src/designer/buttonlineedit.png new file mode 100644 index 0000000000000000000000000000000000000000..c78bbe189c7476e42f8e57b3448b97880401fd3a GIT binary patch literal 1318 zcmV+>1=;$EP)&u; z^Ma|sjS=r@+8RV>BX)6;cbchR&U(aOf14qMD2lSL|9U$K_2J&VyVe2w!Ub8DtpoOj z3%2;Y9za9DT>!WX6z&4RU7&dBLMD?*rBdN=m=Hn;35Ua}R4S9n?48gQ#S0`!N+c3y zLrNqPk|en+w8jG$BuR?JV%BpLi^cT$I2PLC!KrCrU|@WFymEQ|%mIK@E<>&4?8P+z zi9{luPFn~8^mdCNxIMR}uG99m=Ua`{}~^0|P% zUM*yy-n-+-$VjC;JmjC8F5iD30}up6pVtm%bad2END%~_9&9;1*dhqpUerPsMEej| znVOoS1!}?aW984u@P#j*^mK{6-A%8)yJQ%wE~omNk9G(EjzopSVIP36E(9O^Cj+?q zxBSCIStC?aEEWkNfj~f0S#KAXmzS|)!R@&%LBM2w^Yf1b0M1@qTUk}~!J6{KFXh2^ z4yO8B)RCupngAT@5UC4lp_dVb+=4LjZYq8J)Kxb#CEX&im+{VTRfc5qD>0C~h<$Aji3WWd+Un%vy+1z_v zJk}xfz0vf^7i&NMyz$Zd{zC_eK3HD{aObb5-U|eTfDn`53Xw>p=fsI(v3M(=FPF== z^7&G!^!mw@^?oAa@%Y%-7=Ym`CHh>v(zo(>Fi*4^FK*4EH(%4{}kCcOFWq5ij;Y5CJL2d-WU zUcD5Y_@-4aH01aB`R}h?D-;U!vO!KwyM$VOET^VOm@F=BkNm}`@1>{!V0}ZG`D2Ua z)TAiN;^JZ?5+U?4+Ot_Vh4CP~u(05k(3S@MG-Z~FW1%(PxIoEfv&m$#vY&@Sp=2`2 za`<&DG=qN!4e;-pDBJ~ryFlSC0Ne!%cLCroP`C>KcYz|_nV<7|4BjL91AhCcXB~&X zaeKz#`vUOPuRixNd@TUn1qyco;4VE9Ma2EjnIfBC10>E9M ca2EjJf23yLf+T + +//! @defgroup designer +//! @{ + +Q_EXPORT_PLUGIN2(buttonlineedit, ButtonLineEditWidgetIfc); + +//! @} diff --git a/src/designer/buttonlineeditwidgetifc.hxx b/src/designer/buttonlineeditwidgetifc.hxx new file mode 100644 index 0000000..7dcb8bf --- /dev/null +++ b/src/designer/buttonlineeditwidgetifc.hxx @@ -0,0 +1,77 @@ +/*! @file + + @id $Id$ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +#ifndef __BUTTONLINEEDITWIDGETIFC_HXX +#define __BUTTONLINEEDITWIDGETIFC_HXX + +#include +#include + +#ifndef LOG +#define LOG qDebug()<<__PRETTY_FUNCTION__ +#endif + +//! @defgroup designer +//! @{ + +//! Buttonlineedit widget for Qt Designer +class ButtonLineEditWidgetIfc: public QObject, + public QDesignerCustomWidgetInterface { + Q_OBJECT; + Q_INTERFACES(QDesignerCustomWidgetInterface); + public: + bool isContainer() const { + LOG; + return false; + } + QIcon icon() const { + LOG; + return QIcon(":/icons/buttonlineedit.png"); + } + QString domXml() const { + LOG; + return + QString + ("" + " " + " " + " " + " %1" + " " + " " + "") + .arg(name()) + .arg(name().toLower()); + } + QString group() const { + LOG; + return "Input Widgets"; + } + QString includeFile() const { + LOG; + return "qbrowserlib/buttonlineedit.hxx"; + } + QString name() const { + LOG; + return "ButtonLineEdit"; + } + QString toolTip() const { + LOG; + return ""; + } + QString whatsThis() const { + LOG; + return ""; + } + QWidget *createWidget(QWidget *parent) { + LOG; + return new ButtonLineEdit(parent); + } +}; + +//! @} +#endif diff --git a/src/designer/makefile.am b/src/designer/makefile.am index 36aa8fb..df80b50 100644 --- a/src/designer/makefile.am +++ b/src/designer/makefile.am @@ -27,10 +27,10 @@ ALL_SRC = @srcdir@/*.[ch]xx \ # @srcdir@/*.ui QMAKE_PROJECT = qmake.pro -QMAKE_MAKEFILE = makefile.qmake -QMAKE_TARGET = libqbrowserlib-plugin.so +QMAKE_TARGET = qbrowserlib-swisswebview qbrowserlib-buttonlineedit TARGETS = ${QMAKE_TARGET} +QMAKE_MAKEFILE = ${QMAKE_TARGET:%=makefile.qmake.%} all: ${TARGETS} $ #$(LANGS:%=@PACKAGENAME@_%.ts) @@ -71,24 +71,24 @@ print: # ${LUPDATE} @LUPDATE_ARGS@ ${QMAKE_PROJECT} ${QMAKE_MAKEFILE}: ${QMAKE_PROJECT} ${ALL_SRC} - ${QMAKE} -o $@ $< + ${QMAKE} -o $@ $< CONFIG+=${@:makefile.qmake.%=%} # $(LANGS:%=@PACKAGENAME@_%.qm) ${QMAKE_TARGET}: ${QMAKE_MAKEFILE} ${ALL_SRC} - make -f ${QMAKE_MAKEFILE} + make -f makefile.qmake.$@ install-data-local: ${QMAKE_MAKEFILE} ${mkinstalldirs} ${DESTDIR}${QT_INSTALL_PLUGINS} - ${INSTALL} ${QMAKE_TARGET}* ${DESTDIR}${QT_INSTALL_PLUGINS} + ${INSTALL} ${QMAKE_TARGET:%=lib%*} ${DESTDIR}${QT_INSTALL_PLUGINS} uninstall-local: - rm -r ${DESTDIR}${QT_INSTALL_PLUGINS}/${QMAKE_TARGET}* + -rm -r ${QMAKE_TARGET:%=${DESTDIR}${QT_INSTALL_PLUGINS}/lib%*} clean-local: - -rm -r ${QMAKE_TARGET}* + -rm -r ${QMAKE_TARGET:%=lib%*} # $(LANGS:%=@PACKAGENAME@_%.qm) CLEANFILES = ${TARGETS} ${TARGETS:%=%.exe} \ *.o *.obj qrc_*.cpp ui_*.h moc_*.cpp \ - ${QMAKE_TARGET} + ${QMAKE_TARGET:%=lib%*} MAINTAINERCLEANFILES = makefile.in ${QMAKE_MAKEFILE} diff --git a/src/designer/qmake.pro.in b/src/designer/qmake.pro.in index 492d820..566e34a 100644 --- a/src/designer/qmake.pro.in +++ b/src/designer/qmake.pro.in @@ -29,15 +29,22 @@ win32 { CONFIG += release } -SOURCES = webviewwidgetifc.cxx -HEADERS = webviewwidgetifc.hxx - FORMS = RESOURCES = resources.qrc TEMPLATE = lib -TARGET = qbrowserlib-plugin + +qbrowserlib-swisswebview { + SOURCES = webviewwidgetifc.cxx + HEADERS = webviewwidgetifc.hxx + TARGET = qbrowserlib-swisswebview +} +qbrowserlib-buttonlineedit { + SOURCES = buttonlineeditwidgetifc.cxx + HEADERS = buttonlineeditwidgetifc.hxx + TARGET = qbrowserlib-buttonlineedit +} CODECFORSRC = UTF-8 CODECFORTR = UTF-8 diff --git a/src/designer/resources.qrc.in b/src/designer/resources.qrc.in index a9390af..fce231a 100644 --- a/src/designer/resources.qrc.in +++ b/src/designer/resources.qrc.in @@ -1,5 +1,6 @@ - webview.png + swisswebview.png + buttonlineedit.png diff --git a/src/designer/webview.png b/src/designer/swisswebview.png similarity index 100% rename from src/designer/webview.png rename to src/designer/swisswebview.png diff --git a/src/designer/webviewwidgetifc.hxx b/src/designer/webviewwidgetifc.hxx index 98e8d91..f0a9f3e 100644 --- a/src/designer/webviewwidgetifc.hxx +++ b/src/designer/webviewwidgetifc.hxx @@ -24,13 +24,14 @@ class SwissWebViewWidgetIfc: public QObject, Q_OBJECT; Q_INTERFACES(QDesignerCustomWidgetInterface); public: + SwissWebViewWidgetIfc(): _initialized(false) {} bool isContainer() const { LOG; - return false; + return true; } QIcon icon() const { LOG; - return QIcon(":/icons/webview.png"); + return QIcon(":/icons/swisswebview.png"); } QString domXml() const { LOG; @@ -53,7 +54,7 @@ class SwissWebViewWidgetIfc: public QObject, } QString includeFile() const { LOG; - return "qbrowserlib/webview.hxx"; + return "qbrowserlib/swisswebview.hxx"; } QString name() const { LOG; @@ -71,6 +72,16 @@ class SwissWebViewWidgetIfc: public QObject, LOG; return new SwissWebView(parent); } + bool isInitialized() { + LOG; + return _initialized; + } + void initialized() { + LOG; + _initialized = true; + } + private: + bool _initialized; }; //! @} diff --git a/src/main.cxx b/src/main.cxx index 9d90eed..17b44d5 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -26,23 +26,26 @@ #include -/*! @mainpage The Secure Swiss PKCS#11 WebBrowser - - The browser is divided into a library, qbrowserlib that implements - generic browsing utilities, the main browser page that collects - those features into a main window, a PKCS#11 Post-SuisseID - hardware token client authentication and a designer plugin for - flexible GUI creation. - */ //! @defgroup browser The SwissBrowser Executable and Main Window //! @defgroup pkcs11 The PKCS#11 Client Authentication //! @defgroup qbrowserlib The Swiss Browser Library //! @defgroup designer Qt Designer Plugin for Browser Related Widgets +/*! @mainpage The Secure Swiss PKCS#11 WebBrowser + + The browser is divided into a library, @ref qbrowserlib that implements + generic browsing utilities, the main @ref browser page that collects + those features into a main window, a @ref pkcs11 Post-SuisseID + hardware token client authentication and a @ref designer plugin for + flexible GUI creation. + */ + //! @addtogroup browser //! @{ +QString TMP; + const QByteArray SWISSSIGN_EV_GOLD_CA_2009_G2 ("-----BEGIN CERTIFICATE-----\n" "MIIGvzCCBaegAwIBAgIQAPI39KUS4aGJo+mkR4+YuTANBgkqhkiG9w0BAQUFADBN\n" @@ -309,6 +312,7 @@ int main(int argv, char** argc) try { <<"Port"< ...]\n" "Options:\n" " -h, --help show this help text\n" + " -t --tmp path temporary folder for data caching\n" " -k, --kiosk no url bar\n" " if you sepcify -k and -s, -k must be first\n" " -q, --quirks alternate user interface\n" @@ -357,13 +362,15 @@ int main(int argv, char** argc) try { " PROXY_TYPE \"http\" or \"socks\" or \"\" (actual: %2)\n" " PROXY_PORT proxy port number (actual: %3)\n" " PROXY_HOST proxy host name (actual: %4)\n" - " SWISSSURFER_USERAGENT fake user agent (actual: %6)\n") + " SWISS_USERAGENT fake user agent (actual: %6)\n") .arg(QFileInfo(argc[0]).fileName()) .arg(env["PROXY_TYPE"]).arg(env["PROXY_PORT"]).arg(env["PROXY_HOST"]) - .arg(env["LANGUAGE"]).arg(env["SWISSSURFER_USERAGENT"]) + .arg(env["LANGUAGE"]).arg(env["SWISS_USERAGENT"]) .toStdString() < +#include +#include +#include +#include + +#ifndef LOG +#define LOG qDebug()<<__PRETTY_FUNCTION__ +#endif + +//! @addtogroup qbrowserlib +//! @{ + +//! A QLineEdit that may have buttons to the right within the lineedit. +class ButtonLineEdit: public QLineEdit { + Q_OBJECT; + public: + 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); + _buttons.push_back(b); + resizeEvent(0); + return *this; + } + ButtonLineEdit& changeStyleSheet(QString s) { + LOG; + _style = s; + resizeEvent(0); + return *this; + } + static void foreachActionWidget(QAction& a, void(QWidget::*f)()) { + QList widgets(a.associatedWidgets()); + for (QList::iterator w(widgets.begin()); w!=widgets.end(); ++w) + ((*w)->*f)(); + } + 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)); + } + private: + typedef QList Buttons; + Buttons _buttons; + QString _style; +}; + +//! @} +#endif diff --git a/src/qbrowserlib/makefile.am b/src/qbrowserlib/makefile.am index 352df3f..3a8500b 100644 --- a/src/qbrowserlib/makefile.am +++ b/src/qbrowserlib/makefile.am @@ -80,7 +80,7 @@ install-data-local: ${INSTALL} ${QMAKE_TARGET}* ${DESTDIR}${libdir} uninstall-local: - rm -r ${DESTDIR}${libdir}/${QMAKE_TARGET}* + -rm -r ${DESTDIR}${libdir}/${QMAKE_TARGET}* clean-local: -rm -r ${QMAKE_TARGET}* diff --git a/src/qbrowserlib/pluginfactory.hxx b/src/qbrowserlib/pluginfactory.hxx index 4978a2b..70e9767 100644 --- a/src/qbrowserlib/pluginfactory.hxx +++ b/src/qbrowserlib/pluginfactory.hxx @@ -19,6 +19,8 @@ //! @addtogroup qbrowserlib //! @{ +//! Handle PDF Documents +/*! */ class PluginFactory: public QWebPluginFactory { public: PluginFactory(QObject* p=0): QWebPluginFactory(p) { diff --git a/src/qbrowserlib/qmake.pro.in b/src/qbrowserlib/qmake.pro.in index 1a4d9f0..94cd397 100644 --- a/src/qbrowserlib/qmake.pro.in +++ b/src/qbrowserlib/qmake.pro.in @@ -36,8 +36,9 @@ TRANSLATIONS = @srcdir@/qbrowserlib_en.ts \ SOURCES = -HEADERS = @srcdir@/swisswebview.hxx @srcdir@/swisswebpage.hxx \ - @srcdir@/pluginfactory.hxx @srcdir@/saveorrun.hxx +HEADERS = @srcdir@/swisswebview.hxx @srcdir@/swisswebpage.hxx \ + @srcdir@/pluginfactory.hxx @srcdir@/saveorrun.hxx \ + @srcdir@/buttonlineedit.hxx FORMS = @srcdir@/saveorrun.ui diff --git a/src/qbrowserlib/saveorrun.hxx b/src/qbrowserlib/saveorrun.hxx index 83953a1..3651ea2 100644 --- a/src/qbrowserlib/saveorrun.hxx +++ b/src/qbrowserlib/saveorrun.hxx @@ -26,6 +26,7 @@ //! @addtogroup qbrowserlib //! @{ +//! Ask User for Saving or Opening a Download class SaveOrRun: public QWidget, public Ui::SaveOrRun { Q_OBJECT; diff --git a/src/swissbrowser_de.ts b/src/swissbrowser_de.ts index 2cbbbcd..7f8052d 100644 --- a/src/swissbrowser_de.ts +++ b/src/swissbrowser_de.ts @@ -263,11 +263,6 @@ Clear Search - - background-color: white - search engines combobox - - SSL Not Supported @@ -696,10 +691,32 @@ openssl-%7 application name + + Cannot read PEM certificate from file: %1 + + + + Read PEM certificates from file: %1 + + + + Cannot read PEM RSA key from file: %1 + + + + Read private key from file: %1 + + + + Too few arguments. +Try: %1 --help + + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text + -t --tmp path temporary folder for data caching -k, --kiosk no url bar if you sepcify -k and -s, -k must be first -q, --quirks alternate user interface @@ -719,31 +736,10 @@ Environment: PROXY_TYPE "http" or "socks" or "" (actual: %2) PROXY_PORT proxy port number (actual: %3) PROXY_HOST proxy host name (actual: %4) - SWISSSURFER_USERAGENT fake user agent (actual: %6) + SWISS_USERAGENT fake user agent (actual: %6) - - Cannot read PEM certificate from file: %1 - - - - Read PEM certificates from file: %1 - - - - Cannot read PEM RSA key from file: %1 - - - - Read private key from file: %1 - - - - Too few arguments. -Try: %1 --help - - Settings diff --git a/src/swissbrowser_en.ts b/src/swissbrowser_en.ts index 7850840..56e3c1f 100644 --- a/src/swissbrowser_en.ts +++ b/src/swissbrowser_en.ts @@ -263,11 +263,6 @@ Clear Search - - background-color: white - search engines combobox - - SSL Not Supported @@ -696,10 +691,32 @@ openssl-%7 application name + + Cannot read PEM certificate from file: %1 + + + + Read PEM certificates from file: %1 + + + + Cannot read PEM RSA key from file: %1 + + + + Read private key from file: %1 + + + + Too few arguments. +Try: %1 --help + + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text + -t --tmp path temporary folder for data caching -k, --kiosk no url bar if you sepcify -k and -s, -k must be first -q, --quirks alternate user interface @@ -719,31 +736,10 @@ Environment: PROXY_TYPE "http" or "socks" or "" (actual: %2) PROXY_PORT proxy port number (actual: %3) PROXY_HOST proxy host name (actual: %4) - SWISSSURFER_USERAGENT fake user agent (actual: %6) + SWISS_USERAGENT fake user agent (actual: %6) - - Cannot read PEM certificate from file: %1 - - - - Read PEM certificates from file: %1 - - - - Cannot read PEM RSA key from file: %1 - - - - Read private key from file: %1 - - - - Too few arguments. -Try: %1 --help - - Settings diff --git a/src/swissbrowser_fr.ts b/src/swissbrowser_fr.ts index 2cbbbcd..7f8052d 100644 --- a/src/swissbrowser_fr.ts +++ b/src/swissbrowser_fr.ts @@ -263,11 +263,6 @@ Clear Search - - background-color: white - search engines combobox - - SSL Not Supported @@ -696,10 +691,32 @@ openssl-%7 application name + + Cannot read PEM certificate from file: %1 + + + + Read PEM certificates from file: %1 + + + + Cannot read PEM RSA key from file: %1 + + + + Read private key from file: %1 + + + + Too few arguments. +Try: %1 --help + + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text + -t --tmp path temporary folder for data caching -k, --kiosk no url bar if you sepcify -k and -s, -k must be first -q, --quirks alternate user interface @@ -719,31 +736,10 @@ Environment: PROXY_TYPE "http" or "socks" or "" (actual: %2) PROXY_PORT proxy port number (actual: %3) PROXY_HOST proxy host name (actual: %4) - SWISSSURFER_USERAGENT fake user agent (actual: %6) + SWISS_USERAGENT fake user agent (actual: %6) - - Cannot read PEM certificate from file: %1 - - - - Read PEM certificates from file: %1 - - - - Cannot read PEM RSA key from file: %1 - - - - Read private key from file: %1 - - - - Too few arguments. -Try: %1 --help - - Settings diff --git a/src/swissbrowser_it.ts b/src/swissbrowser_it.ts index 9f16069..c54fa5c 100644 --- a/src/swissbrowser_it.ts +++ b/src/swissbrowser_it.ts @@ -263,11 +263,6 @@ Clear Search - - background-color: white - search engines combobox - - SSL Not Supported @@ -696,10 +691,32 @@ openssl-%7 application name + + Cannot read PEM certificate from file: %1 + + + + Read PEM certificates from file: %1 + + + + Cannot read PEM RSA key from file: %1 + + + + Read private key from file: %1 + + + + Too few arguments. +Try: %1 --help + + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text + -t --tmp path temporary folder for data caching -k, --kiosk no url bar if you sepcify -k and -s, -k must be first -q, --quirks alternate user interface @@ -719,31 +736,10 @@ Environment: PROXY_TYPE "http" or "socks" or "" (actual: %2) PROXY_PORT proxy port number (actual: %3) PROXY_HOST proxy host name (actual: %4) - SWISSSURFER_USERAGENT fake user agent (actual: %6) + SWISS_USERAGENT fake user agent (actual: %6) - - Cannot read PEM certificate from file: %1 - - - - Read PEM certificates from file: %1 - - - - Cannot read PEM RSA key from file: %1 - - - - Read private key from file: %1 - - - - Too few arguments. -Try: %1 --help - - Settings