@@ -247,7 +247,7 @@ struct WrapQtIterator
247
247
using WrappedT = typename TypeWrapperT::type;
248
248
using KeyT = typename WrappedT::key_type;
249
249
using ValueT = typename WrappedT::value_type;
250
-
250
+
251
251
wrapped.method (" iteratornext" , [] (WrappedT it) -> WrappedT { ++(it.value ); return it; });
252
252
wrapped.method (" iteratorkey" , [] (WrappedT it) -> KeyT { validate_iterator (it); return it.value .key ();} );
253
253
wrapped.method (" iteratorvalue" , [] (WrappedT it) -> ValueT& { validate_iterator (it); return it.value .value (); } );
@@ -282,6 +282,12 @@ struct WrapQtAssociativeContainer
282
282
283
283
}
284
284
285
+ JLCXX_MODULE define_julia_module_makie (jlcxx::Module& qml_module)
286
+ {
287
+ using namespace jlcxx ;
288
+ qmlwrap::MakieViewport::m_qml_mod = qml_module.julia_module ();
289
+ }
290
+
285
291
JLCXX_MODULE define_julia_module (jlcxx::Module& qml_module)
286
292
{
287
293
using namespace jlcxx ;
@@ -290,8 +296,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& qml_module)
290
296
qmlwrap::JuliaFunction::m_qml_mod = qml_module.julia_module ();
291
297
qmlwrap::ApplicationManager::m_qml_mod = qml_module.julia_module ();
292
298
qmlwrap::JuliaItemModel::m_qml_mod = qml_module.julia_module ();
293
- qmlwrap::MakieViewport::m_qml_mod = qml_module.julia_module ();
294
-
299
+
295
300
// Enums
296
301
qml_module.add_bits <Qt::Orientation>(" Orientation" , jlcxx::julia_type (" CppEnum" ));
297
302
qml_module.set_const (" Horizontal" , Qt::Horizontal);
@@ -390,7 +395,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& qml_module)
390
395
.constructor <QString>()
391
396
.method (" toString" , [] (const QUrl& url) { return url.toString (); });
392
397
qml_module.method (" QUrlFromLocalFile" , QUrl::fromLocalFile);
393
-
398
+
394
399
auto qvar_type = qml_module.add_type <QVariant>(" QVariant" );
395
400
qvar_type.method (" toString" , &QVariant::toString);
396
401
@@ -413,7 +418,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& qml_module)
413
418
.apply <qmlwrap::QHashIteratorWrapper<int , QByteArray>>(qmlwrap::WrapQtIterator ());
414
419
qml_module.add_type <Parametric<TypeVar<1 >,TypeVar<2 >>>(" QHash" , julia_type (" AbstractDict" ))
415
420
.apply <QHash<int , QByteArray>>(qmlwrap::WrapQtAssociativeContainer<qmlwrap::QHashIteratorWrapper>());
416
-
421
+
417
422
qml_module.add_type <QQmlPropertyMap>(" QQmlPropertyMap" , julia_base_type<QObject>())
418
423
.constructor <QObject *>(jlcxx::finalize_policy::no)
419
424
.method (" clear" , &QQmlPropertyMap::clear)
@@ -439,7 +444,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& qml_module)
439
444
jlcxx::stl::apply_stl<QVariant>(qml_module);
440
445
441
446
qml_module.method (" make_qvariant_map" , [] ()
442
- {
447
+ {
443
448
QVariantMap m;
444
449
m[QString (" test" )] = QVariant::fromValue (5 );
445
450
return QVariant::fromValue (m);
0 commit comments