new experimental main browser widget; refs #167

This commit is contained in:
Marc Wäckerlin
2012-11-07 09:57:38 +00:00
parent b0216f59a3
commit 89af031a8f
6 changed files with 346 additions and 1 deletions

View File

@@ -28,7 +28,8 @@ ALL_SRC = @srcdir@/*.[ch]xx \
QMAKE_PROJECT = qmake.pro
QMAKE_TARGET = qbrowserlib-swisswebview qbrowserlib-buttonlineedit
QMAKE_TARGET = qbrowserlib-swisswebview qbrowserlib-buttonlineedit \
qbrowserlib-swisswebview
TARGETS = ${QMAKE_TARGET}
QMAKE_MAKEFILE = ${QMAKE_TARGET:%=makefile.qmake.%}

View File

@@ -49,6 +49,12 @@ qbrowserlib-buttonlineedit {
TARGET = qbrowserlib-buttonlineedit
}
qbrowserlib-swisswebwidget {
SOURCES = webwidgetifc.cxx
HEADERS = webwidgetifc.hxx
TARGET = qbrowserlib-swisswebwidget
}
CODECFORSRC = UTF-8
CODECFORTR = UTF-8

View File

@@ -0,0 +1,15 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <webwidgetifc.hxx>
//! @defgroup designer
//! @{
Q_EXPORT_PLUGIN2(swisswebwidget, SwissWebWidgetIfc);
//! @}

View File

@@ -0,0 +1,87 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#ifndef __SWISSWEBWIDGETWIDGETIFC_HXX
#define __SWISSWEBWIDGETWIDGETIFC_HXX
#include <qbrowserlib/log.hxx>
#include <qbrowserlib/swisswebwidget.hxx>
#include <QtDesigner>
//! @defgroup designer
//! @{
//! SwissWebWidget widget for Qt Designer
class SwissWebWidgetWidgetIfc: public QObject,
public QDesignerCustomWidgetInterface {
Q_OBJECT;
Q_INTERFACES(QDesignerCustomWidgetInterface);
public:
bool isContainer() const {
TRC;
return false;
}
QIcon icon() const {
TRC;
return QIcon(":/icons/swisswebwidget.png");
}
QString domXml() const {
TRC;
return
QString
("<ui language=\"c++\" displayname=\"%2\">"
" <widget class=\"%1\" name=\"%3\"/>"
" <customwidgets>"
" <customwidget>"
" <class>%1</class>"
" </customwidget>"
" </customwidgets>"
"</ui>")
.arg(name())
.arg(className())
.arg(className().toLower());
}
QString group() const {
TRC;
return "Input Widgets";
}
QString includeFile() const {
TRC;
return "qbrowserlib/swisswebwidget.hxx";
}
QString namespaceName() const {
TRC;
return "qbrowserlib";
}
QString className() const {
TRC;
return "SwissWebWidget";
}
QString name() const {
TRC;
return QString("%1::%2").arg(namespaceName()).arg(className());
}
QString toolTip() const {
TRC;
return "";
}
QString whatsThis() const {
TRC;
return "";
}
QWidget *createWidget(QWidget *parent) {
TRC;
return new qbrowserlib::SwissWebWidget(parent);
}
bool isInitialized() {
TRC;
return true;
}
};
//! @}
#endif