BIN
src/designer/buttonlineedit.png
Normal file
BIN
src/designer/buttonlineedit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
15
src/designer/buttonlineeditwidgetifc.cxx
Normal file
15
src/designer/buttonlineeditwidgetifc.cxx
Normal file
@@ -0,0 +1,15 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#include <buttonlineeditwidgetifc.hxx>
|
||||
|
||||
//! @defgroup designer
|
||||
//! @{
|
||||
|
||||
Q_EXPORT_PLUGIN2(buttonlineedit, ButtonLineEditWidgetIfc);
|
||||
|
||||
//! @}
|
77
src/designer/buttonlineeditwidgetifc.hxx
Normal file
77
src/designer/buttonlineeditwidgetifc.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#ifndef __BUTTONLINEEDITWIDGETIFC_HXX
|
||||
#define __BUTTONLINEEDITWIDGETIFC_HXX
|
||||
|
||||
#include <qbrowserlib/buttonlineedit.hxx>
|
||||
#include <QtDesigner>
|
||||
|
||||
#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
|
||||
("<ui language=\"c++\" displayname=\"%1\">"
|
||||
" <widget class=\"%1\" name=\"%2\"/>"
|
||||
" <customwidgets>"
|
||||
" <customwidget>"
|
||||
" <class>%1</class>"
|
||||
" </customwidget>"
|
||||
" </customwidgets>"
|
||||
"</ui>")
|
||||
.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
|
@@ -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}
|
||||
|
@@ -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
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/icons">
|
||||
<file>webview.png</file>
|
||||
<file>swisswebview.png</file>
|
||||
<file>buttonlineedit.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 397 B |
@@ -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;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
Reference in New Issue
Block a user