2012-11-07 09:57:38 +00:00
|
|
|
/*! @file
|
|
|
|
|
|
|
|
|
|
@id $Id$
|
|
|
|
|
*/
|
|
|
|
|
// 1 2 3 4 5 6 7 8
|
|
|
|
|
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
|
|
|
|
|
2015-11-05 10:42:44 +00:00
|
|
|
#ifndef __WEBWIDGETIFC_HXX
|
|
|
|
|
#define __WEBWIDGETIFC_HXX
|
2012-11-07 09:57:38 +00:00
|
|
|
|
|
|
|
|
#include <qbrowserlib/log.hxx>
|
2015-11-05 10:42:44 +00:00
|
|
|
#include <qbrowserlib/webwidget.hxx>
|
2012-11-07 09:57:38 +00:00
|
|
|
#include <QtDesigner>
|
|
|
|
|
|
|
|
|
|
//! @defgroup designer
|
|
|
|
|
//! @{
|
|
|
|
|
|
2015-11-05 10:42:44 +00:00
|
|
|
//! WebWidget widget for Qt Designer
|
|
|
|
|
class WebWidgetIfc: public QObject,
|
2012-11-07 11:43:29 +00:00
|
|
|
public QDesignerCustomWidgetInterface {
|
2012-11-07 09:57:38 +00:00
|
|
|
Q_OBJECT;
|
|
|
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface);
|
2015-03-15 20:55:28 +00:00
|
|
|
#if QT_VERSION >= 0x050000
|
|
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "webwidgetifc.json");
|
|
|
|
|
#endif
|
2012-11-07 09:57:38 +00:00
|
|
|
public:
|
|
|
|
|
bool isContainer() const {
|
|
|
|
|
TRC;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
QIcon icon() const {
|
|
|
|
|
TRC;
|
2015-11-05 10:42:44 +00:00
|
|
|
return QIcon(":/icons/webwidget.png");
|
2012-11-07 09:57:38 +00:00
|
|
|
}
|
|
|
|
|
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;
|
2015-11-05 10:42:44 +00:00
|
|
|
return "qbrowserlib/webwidget.hxx";
|
2012-11-07 09:57:38 +00:00
|
|
|
}
|
|
|
|
|
QString namespaceName() const {
|
|
|
|
|
TRC;
|
|
|
|
|
return "qbrowserlib";
|
|
|
|
|
}
|
|
|
|
|
QString className() const {
|
|
|
|
|
TRC;
|
2015-11-05 10:42:44 +00:00
|
|
|
return "WebWidget";
|
2012-11-07 09:57:38 +00:00
|
|
|
}
|
|
|
|
|
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;
|
2015-11-05 10:42:44 +00:00
|
|
|
return new qbrowserlib::WebWidget(parent);
|
2012-11-07 09:57:38 +00:00
|
|
|
}
|
|
|
|
|
bool isInitialized() {
|
|
|
|
|
TRC;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
#endif
|