|
|
|
@ -11,6 +11,8 @@ |
|
|
|
|
#include <qbrowserlib/ui_swisswebwidget.h> |
|
|
|
|
|
|
|
|
|
#include <QtGui/QMainWindow> |
|
|
|
|
#include <QtGui/QToolBar> |
|
|
|
|
#include <QtGui/QStatusBar> |
|
|
|
|
|
|
|
|
|
//! @addtogroup qbrowserlib
|
|
|
|
|
//! @{
|
|
|
|
@ -27,6 +29,18 @@ namespace qbrowserlib { |
|
|
|
|
public: |
|
|
|
|
SwissWebWidget(QWidget* p=0): QWidget(p) { |
|
|
|
|
setupUi(this); |
|
|
|
|
QMainWindow* w(qobject_cast<QMainWindow*>(p)); |
|
|
|
|
if (w) { |
|
|
|
|
/*! Within a QMainWindow, the widget automatically reparents
|
|
|
|
|
the top buttons to the toolbar and the bottom status |
|
|
|
|
line to the window's status bar. */ |
|
|
|
|
QToolBar* t(w->addToolBar(trUtf8("Browser Tools", |
|
|
|
|
"name of the browser's toolbar"))); |
|
|
|
|
_tools->setParent(t); |
|
|
|
|
_statusbar->removeWidget(_status); |
|
|
|
|
for (int i(_statusbar->count()); i>0;) |
|
|
|
|
w->statusBar()->addWidget(_statusbar->itemAt(--i)->widget()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
protected: |
|
|
|
|
}; |
|
|
|
|