review module :webengine, adding Qt/Lisp meta type for FunctorOrLambda

This commit is contained in:
polos 2017-03-26 18:51:33 +02:00
parent 7ad19371fb
commit 64da2454ed
13 changed files with 117 additions and 68 deletions

View file

@ -21,7 +21,10 @@ Defines Lisp methods for all Qt methods/signals/slots of given library.<br>(See
This macro simplifies the definition of UI variables: This macro simplifies the definition of UI variables:
<br> <br>
<pre> <pre>
(defvar-ui *main* *label* *line-edit*...) (defvar-ui *main*
&nbsp;&nbsp;*label*
&nbsp;&nbsp;*line-edit*
&nbsp;&nbsp;...)
;; the above will expand to: ;; the above will expand to:

View file

@ -7,6 +7,12 @@
(defvar *view* (qnew "QWebEngineView")) (defvar *view* (qnew "QWebEngineView"))
(defun to-text ()
;; N.B: This call is asynchronous (because WebEngine is all asynchronous).
;; So, we won't have a return value, but need to pass a function.
;; (See 'FunctorOrLambda' in both Qt Assistant and EQL sources.)
(|toPlainText| (|page| *view*) (lambda (text) (print text))))
(x:do-with *view* (x:do-with *view*
(|setUrl| (qnew "QUrl(QString)" "http://planet.lisp.org/")) (|setUrl| (qnew "QUrl(QString)" "http://planet.lisp.org/"))
(|resize| '(800 600)) (|resize| '(800 600))

View file

@ -319,34 +319,36 @@
"")) ""))
(defun add-namespace (name class) (defun add-namespace (name class)
(unless (empty-string name) (if (string= "FunctorOrLambda" name)
(if (and class "FunctorOrLambda"
(string/= "Handle" name) (unless (empty-string name)
(not (starts-with "GL" name))) (if (and class
(let ((1st (char name 0)) (string/= "Handle" name)
(templ (position #\< name))) (not (starts-with "GL" name)))
(when templ (let ((1st (char name 0))
(setf 1st (char name (incf templ)))) (templ (position #\< name)))
(if (and (not (qt-class-p (if templ (when templ
(subseq name templ (1- (length name))) (setf 1st (char name (incf templ))))
name))) (if (and (not (qt-class-p (if templ
(not (find #\: name)) (subseq name templ (1- (length name)))
(upper-case-p 1st)) name)))
(if templ (not (find #\: name))
(format nil "~A~A::~A" (upper-case-p 1st))
(subseq name 0 templ) (if templ
class (format nil "~A~A::~A"
(subseq name templ)) (subseq name 0 templ)
(if-it (and (not (search "()" name)) class
(position #\( name)) (subseq name templ))
(let* ((names (split (subseq name (1+ it) (1- (length name))) (if-it (and (not (search "()" name))
#\|))) (position #\( name))
(join (mapcar (lambda (name) (format nil "~A::~A" class name)) (let* ((names (split (subseq name (1+ it) (1- (length name)))
names) #\|)))
#\|)) (join (mapcar (lambda (name) (format nil "~A::~A" class name))
(format nil "~A::~A" class name))) names)
name)) #\|))
name))) (format nil "~A::~A" class name)))
name))
name))))
(defun constructor-p (x) (defun constructor-p (x)
(find :constructor x)) (find :constructor x))
@ -1161,6 +1163,7 @@
"QHashIntQByteArray" "QHashIntQByteArray"
"QLine" "QLine"
"QLineF" "QLineF"
"QList<ExtraSelection>"
"QList<QAction*>" "QList<QAction*>"
"QList<QByteArray>" "QList<QByteArray>"
"QList<QDockWidget*>" "QList<QDockWidget*>"

View file

@ -13,7 +13,6 @@ QJsonDocument
QJsonObject QJsonObject
QJsonValue QJsonValue
QLatin1String QLatin1String
QList<ExtraSelection>
QList<FrameRateRange> QList<FrameRateRange>
QList<Plugin> QList<Plugin>
QList<QAudioDeviceInfo> QList<QAudioDeviceInfo>
@ -74,6 +73,4 @@ QVariantHash
QVector<QSslEllipticCurve> QVector<QSslEllipticCurve>
QVector<QStaticPlugin> QVector<QStaticPlugin>
QVector<QVariant> QVector<QVariant>
QWebChannel
QWebEngineContextMenuData
QWindowList QWindowList

View file

@ -54,7 +54,6 @@
"DefaultAction" "DefaultAction"
"EditFocus" "EditFocus"
"ExecutionEngine" "ExecutionEngine"
"Functor"
"QIconEngine" "QIconEngine"
"QPaintEngine" "QPaintEngine"
"QPrintEngine" "QPrintEngine"
@ -75,7 +74,7 @@
"KeyValue" "KeyValue"
"NavigationMode" "NavigationMode"
" Margins " " Margins "
(format nil "Margins~Cmargins" #\Tab) "Margins margins"
"MSG" "MSG"
"OffsetData" "OffsetData"
"PaperSources" "PaperSources"
@ -86,7 +85,7 @@
"RSgImage" "RSgImage"
"SearchHit" "SearchHit"
"T " "T "
(format nil "T~C" #\Tab) "T "
"Q_PID" "Q_PID"
"Q_IPV6ADDR" "Q_IPV6ADDR"
"QAbstractOpenGLFunctions" "QAbstractOpenGLFunctions"
@ -127,9 +126,11 @@
"QVector2D *" "QVector2D *"
"QVector3D *" "QVector3D *"
"QVector4D *" "QVector4D *"
"QWebChannel"
"QWebEngineContextMenuData"
"QWebEngineHistory" "QWebEngineHistory"
"QWebHistory" "QWebHistory"
(format nil "QWebEngineScriptCollection &~C" #\Tab) "QWebEngineScriptCollection & "
"QWebNetworkRequest" "QWebNetworkRequest"
"QWSEvent" "QWSEvent"
"QXmlStreamReader" "QXmlStreamReader"
@ -159,9 +160,9 @@
"Renderer *" "Renderer *"
"TexturePoint2D *" "TexturePoint2D *"
;; exclude what won't compile with Qt 5.5.1: ;; exclude what won't compile with Qt 5.5.1:
"QAudio::Role" ; 5.6 "QAudio::Role" ; 5.6
"textureFactoryForImage(" ; 5.6 "textureFactoryForImage(" ; 5.6
(format nil "~CmoveMedia(" #\Tab) ; 5.7 " moveMedia(" ; 5.7
)) ))
(defvar *check* nil) (defvar *check* nil)
@ -263,7 +264,9 @@
(when (search skip x:it) (when (search skip x:it)
(return t))) (return t)))
(and (search "QHash<" x:it) (and (search "QHash<" x:it)
(not (search "QHash<int, QByteArray>" x:it)))) ; needed in QAbstractItemModel (not (search "QHash<int, QByteArray>" x:it))) ; needed in QAbstractItemModel
(and (search "Functor" x:it)
(not (search "FunctorOrLambda" x:it)))) ; needed for QWebEngine
(when (search "QByteArray const" x:it) (when (search "QByteArray const" x:it)
(setf x:it (x:string-substitute "const QByteArray" "QByteArray const" x:it))) (setf x:it (x:string-substitute "const QByteArray" "QByteArray const" x:it)))
(when (search "QHash<int, QByteArray>" x:it) (when (search "QHash<int, QByteArray>" x:it)

View file

@ -5305,20 +5305,24 @@
"QAction * action ( WebAction ) const" "QAction * action ( WebAction ) const"
"QColor backgroundColor () const" "QColor backgroundColor () const"
"QSizeF contentsSize () const" "QSizeF contentsSize () const"
"const QWebEngineContextMenuData & contextMenuData () const"
"QMenu * createStandardContextMenu ()" "QMenu * createStandardContextMenu ()"
"void findText ( const QString & , FindFlags = FindFlags() )" "void findText ( const QString & , FindFlags = FindFlags() )"
"void findText ( const QString & , FindFlags , FunctorOrLambda )"
"bool hasSelection () const" "bool hasSelection () const"
"QIcon icon () const" "QIcon icon () const"
"QUrl iconUrl () const" "QUrl iconUrl () const"
"bool isAudioMuted () const" "bool isAudioMuted () const"
"void load ( const QUrl & )" "void load ( const QUrl & )"
"void print ( QPrinter * , FunctorOrLambda )"
"void printToPdf ( const QString & , const QPageLayout & = QPageLayout_DEFAULT )" "void printToPdf ( const QString & , const QPageLayout & = QPageLayout_DEFAULT )"
"void printToPdf ( FunctorOrLambda , const QPageLayout & = QPageLayout_DEFAULT )"
"QWebEngineProfile * profile () const" "QWebEngineProfile * profile () const"
"bool recentlyAudible () const" "bool recentlyAudible () const"
"void replaceMisspelledWord ( const QString & )" "void replaceMisspelledWord ( const QString & )"
"QUrl requestedUrl () const" "QUrl requestedUrl () const"
"void runJavaScript ( const QString & , quint32 , FunctorOrLambda )"
"void runJavaScript ( const QString & , quint32 )" "void runJavaScript ( const QString & , quint32 )"
"void runJavaScript ( const QString & , FunctorOrLambda )"
"void runJavaScript ( const QString & )" "void runJavaScript ( const QString & )"
"void save ( const QString & , QWebEngineDownloadItem::SavePageFormat = QWebEngineDownloadItem::MimeHtmlSaveFormat ) const" "void save ( const QString & , QWebEngineDownloadItem::SavePageFormat = QWebEngineDownloadItem::MimeHtmlSaveFormat ) const"
"QPointF scrollPosition () const" "QPointF scrollPosition () const"
@ -5330,15 +5334,14 @@
"void setHtml ( const QString & , const QUrl & = QUrl() )" "void setHtml ( const QString & , const QUrl & = QUrl() )"
"void setUrl ( const QUrl & )" "void setUrl ( const QUrl & )"
"void setView ( QWidget * )" "void setView ( QWidget * )"
"void setWebChannel ( QWebChannel * , uint )"
"void setWebChannel ( QWebChannel * )"
"void setZoomFactor ( qreal )" "void setZoomFactor ( qreal )"
"QWebEngineSettings * settings () const" "QWebEngineSettings * settings () const"
"QString title () const" "QString title () const"
"void toHtml ( FunctorOrLambda ) const"
"void toPlainText ( FunctorOrLambda ) const"
"virtual void triggerAction ( WebAction , bool = false )" "virtual void triggerAction ( WebAction , bool = false )"
"QUrl url () const" "QUrl url () const"
"QWidget * view () const" "QWidget * view () const"
"QWebChannel * webChannel () const"
"qreal zoomFactor () const" "qreal zoomFactor () const"
"virtual bool event ( QEvent * )") "virtual bool event ( QEvent * )")
(("QWebEngineProfile" . "QObject") (("QWebEngineProfile" . "QObject")
@ -5387,6 +5390,7 @@
(("QWebEngineView" . "QWidget") (("QWebEngineView" . "QWidget")
"new QWebEngineView ( QWidget * = Q_NULLPTR )" "new QWebEngineView ( QWidget * = Q_NULLPTR )"
"void findText ( const QString & , QWebEnginePage::FindFlags = QWebEnginePage::FindFlags() )" "void findText ( const QString & , QWebEnginePage::FindFlags = QWebEnginePage::FindFlags() )"
"void findText ( const QString & , QWebEnginePage::FindFlags , FunctorOrLambda )"
"bool hasSelection () const" "bool hasSelection () const"
"QIcon icon () const" "QIcon icon () const"
"QUrl iconUrl () const" "QUrl iconUrl () const"

View file

@ -33,6 +33,7 @@ META_TYPE (T_quint8, quint8)
META_TYPE (T_quint16, quint16) META_TYPE (T_quint16, quint16)
META_TYPE (T_quint32, quint32) META_TYPE (T_quint32, quint32)
META_TYPE (T_quint64, quint64) META_TYPE (T_quint64, quint64)
META_TYPE (T_FunctorOrLambda, FunctorOrLambda)
META_TYPE (T_QFileInfo, QFileInfo) META_TYPE (T_QFileInfo, QFileInfo)
META_TYPE (T_QFileInfoList, QFileInfoList) META_TYPE (T_QFileInfoList, QFileInfoList)
META_TYPE (T_QGradient, QGradient) META_TYPE (T_QGradient, QGradient)
@ -1162,6 +1163,14 @@ static cl_object from_qvariantlist(const QVariantList& l) {
l_list = cl_nreverse(l_list); l_list = cl_nreverse(l_list);
return l_list; } return l_list; }
static void* ensurePersistentFunction(cl_object l_fun) {
STATIC_SYMBOL_PKG (s_ensure_persistent_function, "%ENSURE-PERSISTENT-FUNCTION", "EQL") // see "lisp/ini.lisp"
cl_object l_ret = cl_funcall(2, s_ensure_persistent_function, l_fun);
return (Cnil == l_ret) ? 0 : (void*)l_ret; }
void FunctorOrLambda::operator()(const QVariant& var) {
cl_funcall(2, (cl_object)function, from_qvariant_value(var)); }
static MetaArg toMetaArg(const QByteArray& sType, cl_object l_arg) { static MetaArg toMetaArg(const QByteArray& sType, cl_object l_arg) {
void* p = 0; void* p = 0;
const int n = QMetaType::type(sType); const int n = QMetaType::type(sType);
@ -1318,6 +1327,7 @@ static MetaArg toMetaArg(const QByteArray& sType, cl_object l_arg) {
else if(T_quint16 == n) p = new quint16(toUInt<quint16>(l_arg)); else if(T_quint16 == n) p = new quint16(toUInt<quint16>(l_arg));
else if(T_quint32 == n) p = new quint32(toUInt<quint32>(l_arg)); else if(T_quint32 == n) p = new quint32(toUInt<quint32>(l_arg));
else if(T_quint64 == n) p = new quint64(toUInt<quint64>(l_arg)); else if(T_quint64 == n) p = new quint64(toUInt<quint64>(l_arg));
else if(T_FunctorOrLambda == n) p = new FunctorOrLambda(ensurePersistentFunction(l_arg));
// module types // module types
else { else {
bool found = false; bool found = false;
@ -1534,7 +1544,6 @@ static void clearMetaArg(const MetaArg& arg, bool is_ret = false) {
// enums // enums
else if(!sType.endsWith('>') && sType.contains(':')) { else if(!sType.endsWith('>') && sType.contains(':')) {
delete (int*)p; } delete (int*)p; }
// default
else { else {
QMetaType::destroy(n, p); }} QMetaType::destroy(n, p); }}
@ -2203,11 +2212,6 @@ ok3:
error_msg("QINVOKE-METHOD", LIST4(l_obj, l_cast, l_name, l_args)); error_msg("QINVOKE-METHOD", LIST4(l_obj, l_cast, l_name, l_args));
return Cnil; } return Cnil; }
static void* ensurePersistentFunction(cl_object l_fun) {
STATIC_SYMBOL_PKG (s_ensure_persistent_function, "%ENSURE-PERSISTENT-FUNCTION", "EQL") // see "lisp/ini.lisp"
cl_object l_ret = cl_funcall(2, s_ensure_persistent_function, l_fun);
return (Cnil == l_ret) ? 0 : (void*)l_ret; }
cl_object qconnect2(cl_object l_caller, cl_object l_signal, cl_object l_receiver, cl_object l_slot) { cl_object qconnect2(cl_object l_caller, cl_object l_signal, cl_object l_receiver, cl_object l_slot) {
/// args: (caller signal receiver/function &optional slot) /// args: (caller signal receiver/function &optional slot)
/// Connects either a Qt signal to a Qt slot, or a Qt signal to a Lisp function. /// Connects either a Qt signal to a Qt slot, or a Qt signal to a Lisp function.

View file

@ -312,6 +312,16 @@ struct eql_pointer {
eql_pointer(void* v, int i) : pointer(v), id(i) {} eql_pointer(void* v, int i) : pointer(v), id(i) {}
}; };
// for WebEngine
struct FunctorOrLambda {
void* function;
FunctorOrLambda() : function(0) {}
FunctorOrLambda(void* fun) : function(fun) {}
void operator()(const QVariant&);
};
struct QtMetaObject : private QObject { struct QtMetaObject : private QObject {
// commonly used trick to access staticQtMetaObject // commonly used trick to access staticQtMetaObject
static const QMetaObject* get() { return &static_cast<QtMetaObject*>(0)->staticQtMetaObject; } static const QMetaObject* get() { return &static_cast<QtMetaObject*>(0)->staticQtMetaObject; }

View file

@ -7,7 +7,7 @@
#include <QTimer> #include <QTimer>
#include <QStringList> #include <QStringList>
const char EQL::version[] = "17.3.3"; // Mar 2017 const char EQL::version[] = "17.3.4"; // Mar 2017
extern "C" void ini_EQL(cl_object); extern "C" void ini_EQL(cl_object);

View file

@ -46,20 +46,24 @@ public:
Q_INVOKABLE QAction* Maction(QWebEnginePage* o, QWebEnginePage::WebAction x1) const { return o->action(x1); } Q_INVOKABLE QAction* Maction(QWebEnginePage* o, QWebEnginePage::WebAction x1) const { return o->action(x1); }
Q_INVOKABLE QColor MbackgroundColor(QWebEnginePage* o) const { return o->backgroundColor(); } Q_INVOKABLE QColor MbackgroundColor(QWebEnginePage* o) const { return o->backgroundColor(); }
Q_INVOKABLE QSizeF McontentsSize(QWebEnginePage* o) const { return o->contentsSize(); } Q_INVOKABLE QSizeF McontentsSize(QWebEnginePage* o) const { return o->contentsSize(); }
Q_INVOKABLE QWebEngineContextMenuData McontextMenuData(QWebEnginePage* o) const { return o->contextMenuData(); }
Q_INVOKABLE QMenu* McreateStandardContextMenu(QWebEnginePage* o) { return o->createStandardContextMenu(); } Q_INVOKABLE QMenu* McreateStandardContextMenu(QWebEnginePage* o) { return o->createStandardContextMenu(); }
Q_INVOKABLE void MfindText(QWebEnginePage* o, const QString& x1, QWebEnginePage::FindFlags x2 = QWebEnginePage::FindFlags()) { o->findText(x1, x2); } Q_INVOKABLE void MfindText(QWebEnginePage* o, const QString& x1, QWebEnginePage::FindFlags x2 = QWebEnginePage::FindFlags()) { o->findText(x1, x2); }
Q_INVOKABLE void MfindText(QWebEnginePage* o, const QString& x1, QWebEnginePage::FindFlags x2, FunctorOrLambda x3) { o->findText(x1, x2, x3); }
Q_INVOKABLE bool MhasSelection(QWebEnginePage* o) const { return o->hasSelection(); } Q_INVOKABLE bool MhasSelection(QWebEnginePage* o) const { return o->hasSelection(); }
Q_INVOKABLE QIcon Micon(QWebEnginePage* o) const { return o->icon(); } Q_INVOKABLE QIcon Micon(QWebEnginePage* o) const { return o->icon(); }
Q_INVOKABLE QUrl MiconUrl(QWebEnginePage* o) const { return o->iconUrl(); } Q_INVOKABLE QUrl MiconUrl(QWebEnginePage* o) const { return o->iconUrl(); }
Q_INVOKABLE bool MisAudioMuted(QWebEnginePage* o) const { return o->isAudioMuted(); } Q_INVOKABLE bool MisAudioMuted(QWebEnginePage* o) const { return o->isAudioMuted(); }
Q_INVOKABLE void Mload(QWebEnginePage* o, const QUrl& x1) { o->load(x1); } Q_INVOKABLE void Mload(QWebEnginePage* o, const QUrl& x1) { o->load(x1); }
Q_INVOKABLE void Mprint(QWebEnginePage* o, QPrinter* x1, FunctorOrLambda x2) { o->print(x1, x2); }
Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, const QString& x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); } Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, const QString& x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); }
Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, FunctorOrLambda x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); }
Q_INVOKABLE QWebEngineProfile* Mprofile(QWebEnginePage* o) const { return o->profile(); } Q_INVOKABLE QWebEngineProfile* Mprofile(QWebEnginePage* o) const { return o->profile(); }
Q_INVOKABLE bool MrecentlyAudible(QWebEnginePage* o) const { return o->recentlyAudible(); } Q_INVOKABLE bool MrecentlyAudible(QWebEnginePage* o) const { return o->recentlyAudible(); }
Q_INVOKABLE void MreplaceMisspelledWord(QWebEnginePage* o, const QString& x1) { o->replaceMisspelledWord(x1); } Q_INVOKABLE void MreplaceMisspelledWord(QWebEnginePage* o, const QString& x1) { o->replaceMisspelledWord(x1); }
Q_INVOKABLE QUrl MrequestedUrl(QWebEnginePage* o) const { return o->requestedUrl(); } Q_INVOKABLE QUrl MrequestedUrl(QWebEnginePage* o) const { return o->requestedUrl(); }
Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2, FunctorOrLambda x3) { o->runJavaScript(x1, x2, x3); }
Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2) { o->runJavaScript(x1, x2); } Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2) { o->runJavaScript(x1, x2); }
Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, FunctorOrLambda x2) { o->runJavaScript(x1, x2); }
Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1) { o->runJavaScript(x1); } Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1) { o->runJavaScript(x1); }
Q_INVOKABLE void Msave(QWebEnginePage* o, const QString& x1, QWebEngineDownloadItem::SavePageFormat x2 = QWebEngineDownloadItem::MimeHtmlSaveFormat) const { o->save(x1, x2); } Q_INVOKABLE void Msave(QWebEnginePage* o, const QString& x1, QWebEngineDownloadItem::SavePageFormat x2 = QWebEngineDownloadItem::MimeHtmlSaveFormat) const { o->save(x1, x2); }
Q_INVOKABLE QPointF MscrollPosition(QWebEnginePage* o) const { return o->scrollPosition(); } Q_INVOKABLE QPointF MscrollPosition(QWebEnginePage* o) const { return o->scrollPosition(); }
@ -71,15 +75,14 @@ public:
Q_INVOKABLE void MsetHtml(QWebEnginePage* o, const QString& x1, const QUrl& x2 = QUrl()) { o->setHtml(x1, x2); } Q_INVOKABLE void MsetHtml(QWebEnginePage* o, const QString& x1, const QUrl& x2 = QUrl()) { o->setHtml(x1, x2); }
Q_INVOKABLE void MsetUrl(QWebEnginePage* o, const QUrl& x1) { o->setUrl(x1); } Q_INVOKABLE void MsetUrl(QWebEnginePage* o, const QUrl& x1) { o->setUrl(x1); }
Q_INVOKABLE void MsetView(QWebEnginePage* o, QWidget* x1) { o->setView(x1); } Q_INVOKABLE void MsetView(QWebEnginePage* o, QWidget* x1) { o->setView(x1); }
Q_INVOKABLE void MsetWebChannel(QWebEnginePage* o, QWebChannel* x1, uint x2) { o->setWebChannel(x1, x2); }
Q_INVOKABLE void MsetWebChannel(QWebEnginePage* o, QWebChannel* x1) { o->setWebChannel(x1); }
Q_INVOKABLE void MsetZoomFactor(QWebEnginePage* o, qreal x1) { o->setZoomFactor(x1); } Q_INVOKABLE void MsetZoomFactor(QWebEnginePage* o, qreal x1) { o->setZoomFactor(x1); }
Q_INVOKABLE QWebEngineSettings* Msettings(QWebEnginePage* o) const { return o->settings(); } Q_INVOKABLE QWebEngineSettings* Msettings(QWebEnginePage* o) const { return o->settings(); }
Q_INVOKABLE QString Mtitle(QWebEnginePage* o) const { return o->title(); } Q_INVOKABLE QString Mtitle(QWebEnginePage* o) const { return o->title(); }
Q_INVOKABLE void MtoHtml(QWebEnginePage* o, FunctorOrLambda x1) const { o->toHtml(x1); }
Q_INVOKABLE void MtoPlainText(QWebEnginePage* o, FunctorOrLambda x1) const { o->toPlainText(x1); }
Q_INVOKABLE void MtriggerAction(QWebEnginePage* o, QWebEnginePage::WebAction x1, bool x2 = false) { o->triggerAction(x1, x2); } Q_INVOKABLE void MtriggerAction(QWebEnginePage* o, QWebEnginePage::WebAction x1, bool x2 = false) { o->triggerAction(x1, x2); }
Q_INVOKABLE QUrl Murl(QWebEnginePage* o) const { return o->url(); } Q_INVOKABLE QUrl Murl(QWebEnginePage* o) const { return o->url(); }
Q_INVOKABLE QWidget* Mview(QWebEnginePage* o) const { return o->view(); } Q_INVOKABLE QWidget* Mview(QWebEnginePage* o) const { return o->view(); }
Q_INVOKABLE QWebChannel* MwebChannel(QWebEnginePage* o) const { return o->webChannel(); }
Q_INVOKABLE qreal MzoomFactor(QWebEnginePage* o) const { return o->zoomFactor(); } Q_INVOKABLE qreal MzoomFactor(QWebEnginePage* o) const { return o->zoomFactor(); }
Q_INVOKABLE bool Mevent(QWebEnginePage* o, QEvent* x1) { return o->event(x1); } Q_INVOKABLE bool Mevent(QWebEnginePage* o, QEvent* x1) { return o->event(x1); }
}; };
@ -148,6 +151,7 @@ class Q272 : public Q279 { // QWebEngineView
public: public:
Q_INVOKABLE void* C(uint u, QWidget* x1 = 0) { return new LWebEngineView(u, x1); } Q_INVOKABLE void* C(uint u, QWidget* x1 = 0) { return new LWebEngineView(u, x1); }
Q_INVOKABLE void MfindText(QWebEngineView* o, const QString& x1, QWebEnginePage::FindFlags x2 = QWebEnginePage::FindFlags()) { o->findText(x1, x2); } Q_INVOKABLE void MfindText(QWebEngineView* o, const QString& x1, QWebEnginePage::FindFlags x2 = QWebEnginePage::FindFlags()) { o->findText(x1, x2); }
Q_INVOKABLE void MfindText(QWebEngineView* o, const QString& x1, QWebEnginePage::FindFlags x2, FunctorOrLambda x3) { o->findText(x1, x2, x3); }
Q_INVOKABLE bool MhasSelection(QWebEngineView* o) const { return o->hasSelection(); } Q_INVOKABLE bool MhasSelection(QWebEngineView* o) const { return o->hasSelection(); }
Q_INVOKABLE QIcon Micon(QWebEngineView* o) const { return o->icon(); } Q_INVOKABLE QIcon Micon(QWebEngineView* o) const { return o->icon(); }
Q_INVOKABLE QUrl MiconUrl(QWebEngineView* o) const { return o->iconUrl(); } Q_INVOKABLE QUrl MiconUrl(QWebEngineView* o) const { return o->iconUrl(); }

View file

@ -5,7 +5,6 @@
#:|clearAllVisitedLinks| #:|clearAllVisitedLinks|
#:|clearHttpCache| #:|clearHttpCache|
#:|clearVisitedLinks| #:|clearVisitedLinks|
#:|contextMenuData|
#:|cookieAdded| #:|cookieAdded|
#:|cookieRemoved| #:|cookieRemoved|
#:|cookieStore| #:|cookieStore|
@ -31,6 +30,10 @@
#:|loadAllCookies| #:|loadAllCookies|
#:|persistentCookiesPolicy| #:|persistentCookiesPolicy|
#:|persistentStoragePath| #:|persistentStoragePath|
#:|printToPdf(FunctorOrLambda)|
#:|printToPdf(FunctorOrLambda...)|
#:|printToPdf(QString)|
#:|printToPdf(QString...)|
#:|printToPdf| #:|printToPdf|
#:|receivedBytes| #:|receivedBytes|
#:|recentlyAudibleChanged| #:|recentlyAudibleChanged|
@ -42,6 +45,8 @@
#:|requestMethod| #:|requestMethod|
#:|requestStarted| #:|requestStarted|
#:|requestUrl| #:|requestUrl|
#:|runJavaScript(QString,FunctorOrLambda)|
#:|runJavaScript(QString,uint)|
#:|runJavaScript| #:|runJavaScript|
#:|runsOnSubFrames| #:|runsOnSubFrames|
#:|savePageFormat| #:|savePageFormat|
@ -63,11 +68,9 @@
#:|setSourceCode| #:|setSourceCode|
#:|setSpellCheckEnabled| #:|setSpellCheckEnabled|
#:|setSpellCheckLanguages| #:|setSpellCheckLanguages|
#:|setWebChannel|
#:|setWorldId| #:|setWorldId|
#:|spellCheckLanguages| #:|spellCheckLanguages|
#:|storageName| #:|storageName|
#:|toggleOn| #:|toggleOn|
#:|visitedLinksContainsUrl| #:|visitedLinksContainsUrl|
#:|webChannel|
#:|worldId|)) #:|worldId|))

View file

@ -15,9 +15,6 @@
(defun |clearVisitedLinks| (object &rest arguments) (defun |clearVisitedLinks| (object &rest arguments)
(%qinvoke-method object nil "clearVisitedLinks" arguments)) (%qinvoke-method object nil "clearVisitedLinks" arguments))
(defun |contextMenuData| (object &rest arguments)
(%qinvoke-method object nil "contextMenuData" arguments))
(defun |cookieAdded| (object &rest arguments) (defun |cookieAdded| (object &rest arguments)
(%qinvoke-method object nil "cookieAdded" arguments)) (%qinvoke-method object nil "cookieAdded" arguments))
@ -93,6 +90,18 @@
(defun |persistentStoragePath| (object &rest arguments) (defun |persistentStoragePath| (object &rest arguments)
(%qinvoke-method object nil "persistentStoragePath" arguments)) (%qinvoke-method object nil "persistentStoragePath" arguments))
(defun |printToPdf(FunctorOrLambda)| (object &rest arguments)
(%qinvoke-method object nil "printToPdf(FunctorOrLambda)" arguments))
(defun |printToPdf(FunctorOrLambda...)| (object &rest arguments)
(%qinvoke-method object nil "printToPdf(FunctorOrLambda...)" arguments))
(defun |printToPdf(QString)| (object &rest arguments)
(%qinvoke-method object nil "printToPdf(QString)" arguments))
(defun |printToPdf(QString...)| (object &rest arguments)
(%qinvoke-method object nil "printToPdf(QString...)" arguments))
(defun |printToPdf| (object &rest arguments) (defun |printToPdf| (object &rest arguments)
(%qinvoke-method object nil "printToPdf" arguments)) (%qinvoke-method object nil "printToPdf" arguments))
@ -126,6 +135,12 @@
(defun |requestUrl| (object &rest arguments) (defun |requestUrl| (object &rest arguments)
(%qinvoke-method object nil "requestUrl" arguments)) (%qinvoke-method object nil "requestUrl" arguments))
(defun |runJavaScript(QString,FunctorOrLambda)| (object &rest arguments)
(%qinvoke-method object nil "runJavaScript(QString,FunctorOrLambda)" arguments))
(defun |runJavaScript(QString,uint)| (object &rest arguments)
(%qinvoke-method object nil "runJavaScript(QString,uint)" arguments))
(defun |runJavaScript| (object &rest arguments) (defun |runJavaScript| (object &rest arguments)
(%qinvoke-method object nil "runJavaScript" arguments)) (%qinvoke-method object nil "runJavaScript" arguments))
@ -189,9 +204,6 @@
(defun |setSpellCheckLanguages| (object &rest arguments) (defun |setSpellCheckLanguages| (object &rest arguments)
(%qinvoke-method object nil "setSpellCheckLanguages" arguments)) (%qinvoke-method object nil "setSpellCheckLanguages" arguments))
(defun |setWebChannel| (object &rest arguments)
(%qinvoke-method object nil "setWebChannel" arguments))
(defun |setWorldId| (object &rest arguments) (defun |setWorldId| (object &rest arguments)
(%qinvoke-method object nil "setWorldId" arguments)) (%qinvoke-method object nil "setWorldId" arguments))
@ -207,8 +219,5 @@
(defun |visitedLinksContainsUrl| (object &rest arguments) (defun |visitedLinksContainsUrl| (object &rest arguments)
(%qinvoke-method object nil "visitedLinksContainsUrl" arguments)) (%qinvoke-method object nil "visitedLinksContainsUrl" arguments))
(defun |webChannel| (object &rest arguments)
(%qinvoke-method object nil "webChannel" arguments))
(defun |worldId| (object &rest arguments) (defun |worldId| (object &rest arguments)
(%qinvoke-method object nil "worldId" arguments)) (%qinvoke-method object nil "worldId" arguments))

View file

@ -107,7 +107,10 @@
(defmacro defvar-ui (main &rest names) (defmacro defvar-ui (main &rest names)
"args: (main-widget &rest variables) "args: (main-widget &rest variables)
This macro simplifies the definition of UI variables: This macro simplifies the definition of UI variables:
(defvar-ui *main* *label* *line-edit*...) (defvar-ui *main*
&nbsp;&nbsp;*label*
&nbsp;&nbsp;*line-edit*
&nbsp;&nbsp;...)
;; the above will expand to: ;; the above will expand to: