ruby-qt6-qtqml 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7a64a83438df3a6dcd48ba10f027a1d238399c8af1a1c931a5af4a51bab38bcf
4
+ data.tar.gz: ad329b554f17012c5583217bdf16decb528b1a21f82bb070e1531ae8c99b14d9
5
+ SHA512:
6
+ metadata.gz: a6827511920247a9079fccecda5c20f226c12b3265fde82e02436ccb33ee021b8ad381b6f594aa69387d91c1aa185f71d6b4a825088786a91e098d71b1515788
7
+ data.tar.gz: 981cb2744339442689b67a538286d3545882909545c7c080e641a5498507010b3856e76179fc21acf47af70bcde560b0e0cd89528bd2cbf9f008e0d23fd68d2c
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ require: standard
2
+
3
+ inherit_gem:
4
+ standard: config/base.yml
5
+
6
+ AllCops:
7
+ SuggestExtensions: false
8
+ Exclude:
9
+ - "bin/**/*"
10
+ - "tmp/**/*"
data/LICENSE ADDED
@@ -0,0 +1,185 @@
1
+ This software is licensed under the LGPLv3, included below.
2
+
3
+ As a special exception to the GNU Lesser General Public License version 3
4
+ ("LGPL3"), the copyright holders of this Library give you permission to
5
+ convey to a third party a Combined Work that links statically or dynamically
6
+ to this Library without providing any Minimal Corresponding Source or
7
+ Minimal Application Code as set out in 4d or providing the installation
8
+ information set out in section 4e, provided that you comply with the other
9
+ provisions of LGPL3 and provided that you meet, for the Application the
10
+ terms and conditions of the license(s) which apply to the Application.
11
+
12
+ Except as stated in this special exception, the provisions of LGPL3 will
13
+ continue to comply in full to this Library. If you modify this Library, you
14
+ may apply this exception to your version of this Library, but you are not
15
+ obliged to do so. If you do not wish to do so, delete this exception
16
+ statement from your version. This exception does not (and cannot) modify any
17
+ license terms which apply to the Application, with which you must still
18
+ comply.
19
+
20
+
21
+ GNU LESSER GENERAL PUBLIC LICENSE
22
+ Version 3, 29 June 2007
23
+
24
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
25
+ Everyone is permitted to copy and distribute verbatim copies
26
+ of this license document, but changing it is not allowed.
27
+
28
+
29
+ This version of the GNU Lesser General Public License incorporates
30
+ the terms and conditions of version 3 of the GNU General Public
31
+ License, supplemented by the additional permissions listed below.
32
+
33
+ 0. Additional Definitions.
34
+
35
+ As used herein, "this License" refers to version 3 of the GNU Lesser
36
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
37
+ General Public License.
38
+
39
+ "The Library" refers to a covered work governed by this License,
40
+ other than an Application or a Combined Work as defined below.
41
+
42
+ An "Application" is any work that makes use of an interface provided
43
+ by the Library, but which is not otherwise based on the Library.
44
+ Defining a subclass of a class defined by the Library is deemed a mode
45
+ of using an interface provided by the Library.
46
+
47
+ A "Combined Work" is a work produced by combining or linking an
48
+ Application with the Library. The particular version of the Library
49
+ with which the Combined Work was made is also called the "Linked
50
+ Version".
51
+
52
+ The "Minimal Corresponding Source" for a Combined Work means the
53
+ Corresponding Source for the Combined Work, excluding any source code
54
+ for portions of the Combined Work that, considered in isolation, are
55
+ based on the Application, and not on the Linked Version.
56
+
57
+ The "Corresponding Application Code" for a Combined Work means the
58
+ object code and/or source code for the Application, including any data
59
+ and utility programs needed for reproducing the Combined Work from the
60
+ Application, but excluding the System Libraries of the Combined Work.
61
+
62
+ 1. Exception to Section 3 of the GNU GPL.
63
+
64
+ You may convey a covered work under sections 3 and 4 of this License
65
+ without being bound by section 3 of the GNU GPL.
66
+
67
+ 2. Conveying Modified Versions.
68
+
69
+ If you modify a copy of the Library, and, in your modifications, a
70
+ facility refers to a function or data to be supplied by an Application
71
+ that uses the facility (other than as an argument passed when the
72
+ facility is invoked), then you may convey a copy of the modified
73
+ version:
74
+
75
+ a) under this License, provided that you make a good faith effort to
76
+ ensure that, in the event an Application does not supply the
77
+ function or data, the facility still operates, and performs
78
+ whatever part of its purpose remains meaningful, or
79
+
80
+ b) under the GNU GPL, with none of the additional permissions of
81
+ this License applicable to that copy.
82
+
83
+ 3. Object Code Incorporating Material from Library Header Files.
84
+
85
+ The object code form of an Application may incorporate material from
86
+ a header file that is part of the Library. You may convey such object
87
+ code under terms of your choice, provided that, if the incorporated
88
+ material is not limited to numerical parameters, data structure
89
+ layouts and accessors, or small macros, inline functions and templates
90
+ (ten or fewer lines in length), you do both of the following:
91
+
92
+ a) Give prominent notice with each copy of the object code that the
93
+ Library is used in it and that the Library and its use are
94
+ covered by this License.
95
+
96
+ b) Accompany the object code with a copy of the GNU GPL and this license
97
+ document.
98
+
99
+ 4. Combined Works.
100
+
101
+ You may convey a Combined Work under terms of your choice that,
102
+ taken together, effectively do not restrict modification of the
103
+ portions of the Library contained in the Combined Work and reverse
104
+ engineering for debugging such modifications, if you also do each of
105
+ the following:
106
+
107
+ a) Give prominent notice with each copy of the Combined Work that
108
+ the Library is used in it and that the Library and its use are
109
+ covered by this License.
110
+
111
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
112
+ document.
113
+
114
+ c) For a Combined Work that displays copyright notices during
115
+ execution, include the copyright notice for the Library among
116
+ these notices, as well as a reference directing the user to the
117
+ copies of the GNU GPL and this license document.
118
+
119
+ d) Do one of the following:
120
+
121
+ 0) Convey the Minimal Corresponding Source under the terms of this
122
+ License, and the Corresponding Application Code in a form
123
+ suitable for, and under terms that permit, the user to
124
+ recombine or relink the Application with a modified version of
125
+ the Linked Version to produce a modified Combined Work, in the
126
+ manner specified by section 6 of the GNU GPL for conveying
127
+ Corresponding Source.
128
+
129
+ 1) Use a suitable shared library mechanism for linking with the
130
+ Library. A suitable mechanism is one that (a) uses at run time
131
+ a copy of the Library already present on the user's computer
132
+ system, and (b) will operate properly with a modified version
133
+ of the Library that is interface-compatible with the Linked
134
+ Version.
135
+
136
+ e) Provide Installation Information, but only if you would otherwise
137
+ be required to provide such information under section 6 of the
138
+ GNU GPL, and only to the extent that such information is
139
+ necessary to install and execute a modified version of the
140
+ Combined Work produced by recombining or relinking the
141
+ Application with a modified version of the Linked Version. (If
142
+ you use option 4d0, the Installation Information must accompany
143
+ the Minimal Corresponding Source and Corresponding Application
144
+ Code. If you use option 4d1, you must provide the Installation
145
+ Information in the manner specified by section 6 of the GNU GPL
146
+ for conveying Corresponding Source.)
147
+
148
+ 5. Combined Libraries.
149
+
150
+ You may place library facilities that are a work based on the
151
+ Library side by side in a single library together with other library
152
+ facilities that are not Applications and are not covered by this
153
+ License, and convey such a combined library under terms of your
154
+ choice, if you do both of the following:
155
+
156
+ a) Accompany the combined library with a copy of the same work based
157
+ on the Library, uncombined with any other library facilities,
158
+ conveyed under the terms of this License.
159
+
160
+ b) Give prominent notice with the combined library that part of it
161
+ is a work based on the Library, and explaining where to find the
162
+ accompanying uncombined form of the same work.
163
+
164
+ 6. Revised Versions of the GNU Lesser General Public License.
165
+
166
+ The Free Software Foundation may publish revised and/or new versions
167
+ of the GNU Lesser General Public License from time to time. Such new
168
+ versions will be similar in spirit to the present version, but may
169
+ differ in detail to address new problems or concerns.
170
+
171
+ Each version is given a distinguishing version number. If the
172
+ Library as you received it specifies that a certain numbered version
173
+ of the GNU Lesser General Public License "or any later version"
174
+ applies to it, you have the option of following the terms and
175
+ conditions either of that published version or of any later version
176
+ published by the Free Software Foundation. If the Library as you
177
+ received it does not specify a version number of the GNU Lesser
178
+ General Public License, you may choose any version of the GNU Lesser
179
+ General Public License ever published by the Free Software Foundation.
180
+
181
+ If the Library as you received it specifies that a proxy can decide
182
+ whether future versions of the GNU Lesser General Public License shall
183
+ apply, that proxy's public statement of acceptance of any version is
184
+ permanent authorization for you to choose that version for the
185
+ Library.
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # RubyQt6-QtQml
2
+
3
+ Ruby Bindings for [Qt Qml](https://doc.qt.io/qt-6/qtqml-index.html).
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ GEMSPEC = Gem::Specification.load("qtqml.gemspec")
5
+
6
+ require "rake/extensiontask"
7
+ Rake::ExtensionTask.new("qtqml", GEMSPEC) do |ext|
8
+ ext.ext_dir = "ext/qt6/qtqml"
9
+ ext.lib_dir = "lib/qt6/qtqml"
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+ RuboCop::RakeTask.new
14
+
15
+ require "rspec/core/rake_task"
16
+ RSpec::Core::RakeTask.new(:spec)
17
+
18
+ task build: :compile
19
+ task default: %i[compile spec]
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ RUBYQT6_RICE_LIB_PATH = File.join(__dir__, "../../../../rice/lib")
4
+ if File.exist?(RUBYQT6_RICE_LIB_PATH)
5
+ require File.join(RUBYQT6_RICE_LIB_PATH, "mkmf-rubyqt6.rb")
6
+ else
7
+ require "mkmf-rubyqt6"
8
+ end
9
+
10
+ includedir = qt_install_headers
11
+ append_cppflags("-I#{includedir}")
12
+ append_cppflags("-I#{includedir}/QtCore")
13
+ append_cppflags("-I#{includedir}/QtQml")
14
+ abort "libQt6Qml is missing, please install qt6-declarative" unless have_library("Qt6Qml")
15
+
16
+ create_makefile("qt6/qtqml/qtqml")
@@ -0,0 +1,45 @@
1
+ #include "qjsengine-rb.hpp"
2
+ #include <qjsengine.h>
3
+
4
+ using namespace Rice;
5
+
6
+ Rice::Class rb_cQJSEngine;
7
+
8
+ void Init_qjsengine(Rice::Module rb_mQt6QtQml)
9
+ {
10
+ rb_cQJSEngine =
11
+ // RubyQt6::QtQml::QJSEngine
12
+ define_class_under<QJSEngine, QObject>(rb_mQt6QtQml, "QJSEngine")
13
+ // RubyQt6-Defined Functions
14
+ .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QJSEngine::staticMetaObject; })
15
+ // Constructor
16
+ .define_constructor(Constructor<QJSEngine, QObject *>(), Arg("parent"))
17
+ // Public Functions
18
+ .define_method("catch_error", &QJSEngine::catchError)
19
+ .define_method("collect_garbage", &QJSEngine::collectGarbage)
20
+ .define_method("evaluate", &QJSEngine::evaluate, Arg("program"), Arg("file_name") = static_cast<const QString &>(QString()), Arg("line_number") = static_cast<int>(1), Arg("exception_stack_trace") = static_cast<QStringList *>(nullptr))
21
+ .define_method("global_object", &QJSEngine::globalObject)
22
+ // .define_method("handle", &QJSEngine::handle)
23
+ .define_method("has_error", &QJSEngine::hasError)
24
+ .define_method("import_module", &QJSEngine::importModule, Arg("file_name"))
25
+ .define_method("install_extensions", &QJSEngine::installExtensions, Arg("extensions"), Arg("object") = static_cast<const QJSValue &>(QJSValue()))
26
+ .define_method("interrupted?", &QJSEngine::isInterrupted)
27
+ .define_method("new_array", &QJSEngine::newArray, Arg("length") = static_cast<uint>(0))
28
+ .define_method("new_error_object", &QJSEngine::newErrorObject, Arg("error_type"), Arg("message") = static_cast<const QString &>(QString()))
29
+ .define_method("new_object", &QJSEngine::newObject)
30
+ .define_method<QJSValue (QJSEngine::*)(const QMetaObject *)>("new_qmetaobject", &QJSEngine::newQMetaObject, Arg("metaobject"))
31
+ .define_method("new_qobject", &QJSEngine::newQObject, Arg("object"))
32
+ .define_method("new_symbol", &QJSEngine::newSymbol, Arg("name"))
33
+ .define_method("register_module", &QJSEngine::registerModule, Arg("module_name"), Arg("value"))
34
+ .define_method("set_interrupted", &QJSEngine::setInterrupted, Arg("interrupted"))
35
+ .define_method("set_ui_language", &QJSEngine::setUiLanguage, Arg("language"))
36
+ .define_method<void (QJSEngine::*)(QJSValue::ErrorType, const QString &)>("throw_error", &QJSEngine::throwError, Arg("error_type"), Arg("message") = static_cast<const QString &>(QString()))
37
+ .define_method<void (QJSEngine::*)(const QJSValue &)>("throw_error", &QJSEngine::throwError, Arg("error"))
38
+ .define_method<void (QJSEngine::*)(const QString &)>("throw_error", &QJSEngine::throwError, Arg("message"))
39
+ .define_method("ui_language", &QJSEngine::uiLanguage)
40
+ // Signals
41
+ .define_method("ui_language_changed", &QJSEngine::uiLanguageChanged)
42
+ // Static Public Members
43
+ .define_singleton_function("object_ownership", &QJSEngine::objectOwnership, Arg("obj"))
44
+ .define_singleton_function("set_object_ownership", &QJSEngine::setObjectOwnership, Arg("obj"), Arg("ownership"));
45
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qjsengine(Rice::Module rb_mQt6QtQml);
@@ -0,0 +1,29 @@
1
+ #include "qqmlapplicationengine-rb.hpp"
2
+ #include <qqmlapplicationengine.h>
3
+
4
+ using namespace Rice;
5
+
6
+ Rice::Class rb_cQQmlApplicationEngine;
7
+
8
+ void Init_qqmlapplicationengine(Rice::Module rb_mQt6QtQml)
9
+ {
10
+ rb_cQQmlApplicationEngine =
11
+ // RubyQt6::QtQml::QQmlApplicationEngine
12
+ define_class_under<QQmlApplicationEngine, QQmlEngine>(rb_mQt6QtQml, "QQmlApplicationEngine")
13
+ // RubyQt6-Defined Functions
14
+ .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QQmlApplicationEngine::staticMetaObject; })
15
+ // Constructor
16
+ .define_constructor(Constructor<QQmlApplicationEngine, QObject *>(), Arg("parent"))
17
+ // Public Functions
18
+ .define_method("root_objects", &QQmlApplicationEngine::rootObjects)
19
+ // Public Slots
20
+ .define_method<void (QQmlApplicationEngine::*)(const QString &)>("load", &QQmlApplicationEngine::load, Arg("file_path"))
21
+ .define_method<void (QQmlApplicationEngine::*)(const QUrl &)>("load", &QQmlApplicationEngine::load, Arg("url"))
22
+ .define_method("load_data", &QQmlApplicationEngine::loadData, Arg("data"), Arg("url") = static_cast<const QUrl &>(QUrl()))
23
+ .define_method("load_from_module", &QQmlApplicationEngine::loadFromModule, Arg("uri"), Arg("type_name"))
24
+ .define_method("set_extra_file_selectors", &QQmlApplicationEngine::setExtraFileSelectors, Arg("extra_file_selectors"))
25
+ .define_method("set_initial_properties", &QQmlApplicationEngine::setInitialProperties, Arg("initial_properties"))
26
+ // Signals
27
+ .define_method("object_created", &QQmlApplicationEngine::objectCreated, Arg("object"), Arg("url"))
28
+ .define_method("object_creation_failed", &QQmlApplicationEngine::objectCreationFailed, Arg("url"));
29
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qqmlapplicationengine(Rice::Module rb_mQt6QtQml);
@@ -0,0 +1,62 @@
1
+ #include "qqmlengine-rb.hpp"
2
+ #include <qqmlengine.h>
3
+
4
+ #include <QQmlContext>
5
+ #include <QQmlIncubationController>
6
+
7
+ using namespace Rice;
8
+
9
+ Rice::Class rb_cQQmlEngine;
10
+
11
+ void Init_qqmlengine(Rice::Module rb_mQt6QtQml)
12
+ {
13
+ rb_cQQmlEngine =
14
+ // RubyQt6::QtQml::QQmlEngine
15
+ define_class_under<QQmlEngine, QJSEngine>(rb_mQt6QtQml, "QQmlEngine")
16
+ // RubyQt6-Defined Functions
17
+ .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QQmlEngine::staticMetaObject; })
18
+ // Constructor
19
+ .define_constructor(Constructor<QQmlEngine, QObject *>(), Arg("parent"))
20
+ // Public Functions
21
+ .define_method("add_image_provider", &QQmlEngine::addImageProvider, Arg("id"), Arg("provider"))
22
+ .define_method("_add_import_path", &QQmlEngine::addImportPath, Arg("dir"))
23
+ .define_method("add_plugin_path", &QQmlEngine::addPluginPath, Arg("dir"))
24
+ .define_method("add_url_interceptor", &QQmlEngine::addUrlInterceptor, Arg("url_interceptor"))
25
+ .define_method("base_url", &QQmlEngine::baseUrl)
26
+ .define_method("capture_property", &QQmlEngine::captureProperty, Arg("object"), Arg("property"))
27
+ .define_method("clear_component_cache", &QQmlEngine::clearComponentCache)
28
+ .define_method("clear_singletons", &QQmlEngine::clearSingletons)
29
+ .define_method("image_provider", &QQmlEngine::imageProvider, Arg("id"))
30
+ .define_method("import_path_list", &QQmlEngine::importPathList)
31
+ .define_method("incubation_controller", &QQmlEngine::incubationController)
32
+ .define_method("intercept_url", &QQmlEngine::interceptUrl, Arg("url"), Arg("type"))
33
+ .define_method("mark_current_function_as_translation_binding", &QQmlEngine::markCurrentFunctionAsTranslationBinding)
34
+ // .define_method("network_access_manager", &QQmlEngine::networkAccessManager)
35
+ // .define_method("network_access_manager_factory", &QQmlEngine::networkAccessManagerFactory)
36
+ .define_method("offline_storage_database_file_path", &QQmlEngine::offlineStorageDatabaseFilePath, Arg("database_name"))
37
+ .define_method("offline_storage_path", &QQmlEngine::offlineStoragePath)
38
+ .define_method("output_warnings_to_standard_error", &QQmlEngine::outputWarningsToStandardError)
39
+ .define_method("plugin_path_list", &QQmlEngine::pluginPathList)
40
+ .define_method("remove_image_provider", &QQmlEngine::removeImageProvider, Arg("id"))
41
+ .define_method("remove_url_interceptor", &QQmlEngine::removeUrlInterceptor, Arg("url_interceptor"))
42
+ .define_method("root_context", &QQmlEngine::rootContext)
43
+ .define_method("set_base_url", &QQmlEngine::setBaseUrl, Arg("url"))
44
+ .define_method("set_import_path_list", &QQmlEngine::setImportPathList, Arg("paths"))
45
+ .define_method("set_incubation_controller", &QQmlEngine::setIncubationController, Arg("controller"))
46
+ // .define_method("set_network_access_manager_factory", &QQmlEngine::setNetworkAccessManagerFactory, Arg("factory"))
47
+ .define_method("set_offline_storage_path", &QQmlEngine::setOfflineStoragePath, Arg("dir"))
48
+ .define_method("set_output_warnings_to_standard_error", &QQmlEngine::setOutputWarningsToStandardError, Arg("enabled"))
49
+ .define_method("set_plugin_path_list", &QQmlEngine::setPluginPathList, Arg("paths"))
50
+ .define_method("trim_component_cache", &QQmlEngine::trimComponentCache)
51
+ .define_method("url_interceptors", &QQmlEngine::urlInterceptors)
52
+ // Public Slots
53
+ .define_method("retranslate", &QQmlEngine::retranslate)
54
+ // Signals
55
+ .define_method("exit", &QQmlEngine::exit, Arg("ret_code"))
56
+ .define_method("offline_storage_path_changed", &QQmlEngine::offlineStoragePathChanged)
57
+ .define_method("quit", &QQmlEngine::quit)
58
+ .define_method("warnings", &QQmlEngine::warnings, Arg("warnings"))
59
+ // Static Public Members
60
+ .define_singleton_function("context_for_object", &QQmlEngine::contextForObject, Arg("obj"))
61
+ .define_singleton_function("set_context_for_object", &QQmlEngine::setContextForObject, Arg("obj"), Arg("context"));
62
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qqmlengine(Rice::Module rb_mQt6QtQml);
@@ -0,0 +1,20 @@
1
+ #include "qtqml-rb.hpp"
2
+ #include "qtqmlversion-rb.hpp"
3
+
4
+ #include "qjsengine-rb.hpp"
5
+ #include "qqmlengine-rb.hpp"
6
+ #include "qqmlapplicationengine-rb.hpp"
7
+
8
+ extern "C" void Init_qtqml()
9
+ {
10
+ return Rice::detail::cpp_protect([] {
11
+ Rice::Module rb_mQt6 = Rice::define_module("RubyQt6");
12
+ Rice::Module rb_mQt6QtQml = define_module_under(rb_mQt6, "QtQml");
13
+
14
+ Init_qtqmlversion(rb_mQt6QtQml);
15
+
16
+ Init_qjsengine(rb_mQt6QtQml);
17
+ Init_qqmlengine(rb_mQt6QtQml);
18
+ Init_qqmlapplicationengine(rb_mQt6QtQml);
19
+ });
20
+ }
@@ -0,0 +1,3 @@
1
+ #include <rice/rice.hpp>
2
+
3
+ extern "C" void Init_qtqml();
@@ -0,0 +1,9 @@
1
+ #include "qtqmlversion-rb.hpp"
2
+ #include <qtqmlversion.h>
3
+
4
+ using namespace Rice;
5
+
6
+ void Init_qtqmlversion(Rice::Module rb_mQt6QtQml)
7
+ {
8
+ rb_mQt6QtQml.define_constant("QTQML_VERSION", QTQML_VERSION_STR);
9
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qtqmlversion(Rice::Module rb_mQt6QtQml);
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtQml
5
+ # @see https://doc.qt.io/qt-6/qjsengine.html
6
+ class QJSEngine < RubyQt6::QtCore::QObject
7
+ # @!parse
8
+ q_object do
9
+ signal "uiLanguageChanged()"
10
+ end
11
+
12
+ # @!visibility private
13
+ alias_method :_initialize, :initialize
14
+
15
+ # @param parent [QObject]
16
+ # @return [QJSEngine]
17
+ def initialize(parent = nil)
18
+ _initialize(parent)
19
+ _take_ownership_from_ruby(self)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtQml
5
+ # @see https://doc.qt.io/qt-6/qqmlapplicationengine.html
6
+ class QQmlApplicationEngine < RubyQt6::QtQml::QQmlEngine
7
+ # @!parse
8
+ q_object do
9
+ signal "objectCreated(QObject*,QUrl)"
10
+ signal "objectCreationFailed(QUrl)"
11
+ slot "load(QString)"
12
+ slot "load(QUrl)"
13
+ slot "loadData(QByteArray,QUrl)"
14
+ slot "loadFromModule(QAnyStringView,QAnyStringView)"
15
+ slot "setExtraFileSelectors(QStringList)"
16
+ slot "setInitialProperties(QVariantMap)"
17
+ end
18
+
19
+ # @!visibility private
20
+ alias_method :_initialize, :initialize
21
+
22
+ # @param parent [QObject]
23
+ # @return [QQmlApplicationEngine]
24
+ def initialize(parent = nil)
25
+ _initialize(parent)
26
+ _take_ownership_from_ruby(self)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtQml
5
+ # @see https://doc.qt.io/qt-6/qqmlengine.html
6
+ class QQmlEngine < RubyQt6::QtQml::QJSEngine
7
+ # @!parse
8
+ q_object do
9
+ signal "exit(int)"
10
+ signal "offlineStoragePathChanged()"
11
+ signal "quit()"
12
+ signal "warnings(QList<QQmlError>)"
13
+ slot "retranslate()"
14
+ end
15
+
16
+ # @!visibility private
17
+ alias_method :_initialize, :initialize
18
+
19
+ # @param parent [QObject]
20
+ # @return [QQmlEngine]
21
+ def initialize(parent = nil)
22
+ _initialize(parent)
23
+ _take_ownership_from_ruby(self)
24
+ end
25
+
26
+ # @!visibility private
27
+ def add_import_path(dir)
28
+ _add_import_path(T.to_qstr(dir))
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtQml
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtQml
5
+ QTQML_RUBYGEM_VERSION = "1.0.0"
6
+ end
7
+ end
data/lib/qt6/qtqml.rb ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "qt6/qtcore"
4
+
5
+ require_relative "qtqml/version"
6
+ require_relative "qtqml/qtqml"
7
+ require_relative "qtqml/qtqmlversion"
8
+
9
+ require_relative "qtqml/qjsengine"
10
+ require_relative "qtqml/qqmlengine"
11
+ require_relative "qtqml/qqmlapplicationengine"
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-qt6-qtqml
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - John Doe
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ruby-qt6-rice
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - '='
17
+ - !ruby/object:Gem::Version
18
+ version: 1.0.0
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - '='
24
+ - !ruby/object:Gem::Version
25
+ version: 1.0.0
26
+ - !ruby/object:Gem::Dependency
27
+ name: ruby-qt6-qtcore
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 1.0.0
40
+ description: Ruby Bindings for Qt Qml.
41
+ email:
42
+ - johndoe@example.com
43
+ executables: []
44
+ extensions:
45
+ - ext/qt6/qtqml/extconf.rb
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".rspec"
49
+ - ".rubocop.yml"
50
+ - LICENSE
51
+ - README.md
52
+ - Rakefile
53
+ - ext/qt6/qtqml/extconf.rb
54
+ - ext/qt6/qtqml/qjsengine-rb.cpp
55
+ - ext/qt6/qtqml/qjsengine-rb.hpp
56
+ - ext/qt6/qtqml/qqmlapplicationengine-rb.cpp
57
+ - ext/qt6/qtqml/qqmlapplicationengine-rb.hpp
58
+ - ext/qt6/qtqml/qqmlengine-rb.cpp
59
+ - ext/qt6/qtqml/qqmlengine-rb.hpp
60
+ - ext/qt6/qtqml/qtqml-rb.cpp
61
+ - ext/qt6/qtqml/qtqml-rb.hpp
62
+ - ext/qt6/qtqml/qtqmlversion-rb.cpp
63
+ - ext/qt6/qtqml/qtqmlversion-rb.hpp
64
+ - lib/qt6/qtqml.rb
65
+ - lib/qt6/qtqml/qjsengine.rb
66
+ - lib/qt6/qtqml/qqmlapplicationengine.rb
67
+ - lib/qt6/qtqml/qqmlengine.rb
68
+ - lib/qt6/qtqml/qtqmlversion.rb
69
+ - lib/qt6/qtqml/version.rb
70
+ homepage: https://github.com/souk4711/ruby-qt6/qtqml
71
+ licenses: []
72
+ metadata:
73
+ homepage_uri: https://github.com/souk4711/ruby-qt6/qtqml
74
+ source_code_uri: https://github.com/souk4711/ruby-qt6/qtqml
75
+ changelog_uri: https://github.com/souk4711/ruby-qt6/qtqml
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 3.1.0
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubygems_version: 3.6.9
91
+ specification_version: 4
92
+ summary: Ruby Bindings for Qt Qml.
93
+ test_files: []