mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
a bunch of revisions
This commit is contained in:
parent
1220bf06dc
commit
113386fdae
16 changed files with 109 additions and 112 deletions
|
|
@ -1,6 +1,7 @@
|
|||
QT += widgets
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin release
|
||||
CONFIG += plugin release no_keywords
|
||||
LIBS += -L/usr/local/lib -lecl
|
||||
DESTDIR = ../
|
||||
TARGET = cpp
|
||||
OBJECTS_DIR = ./tmp/
|
||||
|
|
@ -10,5 +11,14 @@ win32 {
|
|||
include(../../src/windows.pri)
|
||||
}
|
||||
|
||||
HEADERS += lib.h
|
||||
SOURCES += lib.cpp
|
||||
# 'marshal.*' and 'qt_ecl.*' only needed for calling Lisp
|
||||
|
||||
HEADERS += \
|
||||
lib.h \
|
||||
../../src/cpp/marshal.h \
|
||||
../../src/cpp/qt_ech.h
|
||||
|
||||
SOURCES += \
|
||||
lib.cpp \
|
||||
../../src/cpp/marshal.cpp \
|
||||
../../src/cpp/qt_ecl.cpp
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "lib.h"
|
||||
#include "../../src/cpp/ecl_fun.h" // for calling Lisp
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QtDebug>
|
||||
|
|
@ -19,7 +20,10 @@ QObject* ini() {
|
|||
return cpp;
|
||||
}
|
||||
|
||||
// functiones defined Q_INVOKABLE
|
||||
|
||||
QVariant CPP::hello(const QVariant& arg) {
|
||||
|
||||
QString msg;
|
||||
QDebug debug(&msg);
|
||||
debug << arg;
|
||||
|
|
@ -29,4 +33,9 @@ QVariant CPP::hello(const QVariant& arg) {
|
|||
return arg;
|
||||
}
|
||||
|
||||
QVariant CPP::callLisp(const QVariant& arg) {
|
||||
|
||||
return ecl_fun("cl:format", false, "~R", arg);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ public:
|
|||
// max. 10 arguments of type QVariant
|
||||
// return type must also be a QVariant
|
||||
Q_INVOKABLE QVariant hello(const QVariant&);
|
||||
Q_INVOKABLE QVariant callLisp(const QVariant&);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -5,3 +5,6 @@
|
|||
;; qrun* needed in Slime (not running on UI thread)
|
||||
|
||||
(qrun* (print (hello *cpp* '(1 "two" (1.25 #(50 -50 75))))))
|
||||
|
||||
(qrun* (print (call-lisp *cpp* 125)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue