ruby-qt6-qtcore 1.0.1 → 2.0.1
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 +4 -4
- data/.rubocop.yml +1 -0
- data/Rakefile +4 -0
- data/ext/qt6/qtcore/{bando-rb.cpp → bando-core-rb.cpp} +4 -2
- data/ext/qt6/qtcore/bando-core-rb.hpp +5 -0
- data/ext/qt6/qtcore/bando-qobject-rb.cpp +3 -3
- data/ext/qt6/qtcore/bando-qobject-rb.hpp +4 -3
- data/ext/qt6/qtcore/extconf.rb +4 -12
- data/ext/qt6/qtcore/qabstractitemmodel-rb.cpp +31 -31
- data/ext/qt6/qtcore/qabstractitemmodel-rb.hpp +4 -3
- data/ext/qt6/qtcore/qanystringview-rb.cpp +3 -3
- data/ext/qt6/qtcore/qanystringview-rb.hpp +4 -3
- data/ext/qt6/qtcore/qbasictimer-rb.cpp +3 -3
- data/ext/qt6/qtcore/qbasictimer-rb.hpp +4 -3
- data/ext/qt6/qtcore/qbytearray-rb.cpp +30 -3
- data/ext/qt6/qtcore/qbytearray-rb.hpp +4 -3
- data/ext/qt6/qtcore/qchar-rb.cpp +3 -3
- data/ext/qt6/qtcore/qchar-rb.hpp +4 -3
- data/ext/qt6/qtcore/qcoreapplication-rb.cpp +14 -14
- data/ext/qt6/qtcore/qcoreapplication-rb.hpp +4 -3
- data/ext/qt6/qtcore/qcoreevent-rb.cpp +6 -7
- data/ext/qt6/qtcore/qcoreevent-rb.hpp +4 -3
- data/ext/qt6/qtcore/qdatetime-rb.cpp +5 -5
- data/ext/qt6/qtcore/qdatetime-rb.hpp +4 -3
- data/ext/qt6/qtcore/qdir-rb.cpp +3 -3
- data/ext/qt6/qtcore/qdir-rb.hpp +4 -3
- data/ext/qt6/qtcore/qeventloop-rb.cpp +33 -0
- data/ext/qt6/qtcore/qeventloop-rb.hpp +5 -0
- data/ext/qt6/qtcore/qfile-rb.cpp +3 -3
- data/ext/qt6/qtcore/qfile-rb.hpp +4 -3
- data/ext/qt6/qtcore/qfiledevice-rb.cpp +3 -3
- data/ext/qt6/qtcore/qfiledevice-rb.hpp +4 -3
- data/ext/qt6/qtcore/qfileinfo-rb.cpp +3 -3
- data/ext/qt6/qtcore/qfileinfo-rb.hpp +4 -3
- data/ext/qt6/qtcore/qiodevice-rb.cpp +10 -10
- data/ext/qt6/qtcore/qiodevice-rb.hpp +4 -3
- data/ext/qt6/qtcore/qiodevicebase-rb.cpp +3 -3
- data/ext/qt6/qtcore/qiodevicebase-rb.hpp +4 -3
- data/ext/qt6/qtcore/qitemselection-rb.cpp +4 -4
- data/ext/qt6/qtcore/qitemselection-rb.hpp +4 -3
- data/ext/qt6/qtcore/qitemselectionmodel-rb.cpp +9 -9
- data/ext/qt6/qtcore/qitemselectionmodel-rb.hpp +4 -3
- data/ext/qt6/qtcore/qlibraryinfo-rb.cpp +3 -3
- data/ext/qt6/qtcore/qlibraryinfo-rb.hpp +4 -3
- data/ext/qt6/qtcore/qline-rb.cpp +4 -4
- data/ext/qt6/qtcore/qline-rb.hpp +4 -3
- data/ext/qt6/qtcore/qlocale-rb.cpp +3 -3
- data/ext/qt6/qtcore/qlocale-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmargins-rb.cpp +4 -4
- data/ext/qt6/qtcore/qmargins-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetaclassinfo-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmetaclassinfo-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetamethod-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmetamethod-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetaobject-rb.cpp +4 -4
- data/ext/qt6/qtcore/qmetaobject-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetaobjectbuilder-rb.cpp +6 -6
- data/ext/qt6/qtcore/qmetaobjectbuilder-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetatype-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmetatype-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmimetype-rb.cpp +28 -0
- data/ext/qt6/qtcore/qmimetype-rb.hpp +5 -0
- data/ext/qt6/qtcore/qmodelindex-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmodelindex-rb.hpp +4 -3
- data/ext/qt6/qtcore/qobject-rb.cpp +8 -8
- data/ext/qt6/qtcore/qobject-rb.hpp +4 -3
- data/ext/qt6/qtcore/qpoint-rb.cpp +4 -4
- data/ext/qt6/qtcore/qpoint-rb.hpp +4 -3
- data/ext/qt6/qtcore/qprocess-rb.cpp +123 -0
- data/ext/qt6/qtcore/qprocess-rb.hpp +5 -0
- data/ext/qt6/qtcore/qprocessenvironment-rb.cpp +32 -0
- data/ext/qt6/qtcore/qprocessenvironment-rb.hpp +5 -0
- data/ext/qt6/qtcore/qrect-rb.cpp +8 -4
- data/ext/qt6/qtcore/qrect-rb.hpp +4 -3
- data/ext/qt6/qtcore/qregularexpression-rb.cpp +16 -4
- data/ext/qt6/qtcore/qregularexpression-rb.hpp +4 -3
- data/ext/qt6/qtcore/qresource-rb.cpp +3 -3
- data/ext/qt6/qtcore/qresource-rb.hpp +4 -3
- data/ext/qt6/qtcore/qsettings-rb.cpp +3 -3
- data/ext/qt6/qtcore/qsettings-rb.hpp +4 -3
- data/ext/qt6/qtcore/qsignalmapper-rb.cpp +7 -7
- data/ext/qt6/qtcore/qsignalmapper-rb.hpp +4 -3
- data/ext/qt6/qtcore/qsize-rb.cpp +4 -4
- data/ext/qt6/qtcore/qsize-rb.hpp +4 -3
- data/ext/qt6/qtcore/qstandardpaths-rb.cpp +61 -0
- data/ext/qt6/qtcore/qstandardpaths-rb.hpp +5 -0
- data/ext/qt6/qtcore/qstring-rb.cpp +5 -3
- data/ext/qt6/qtcore/qstring-rb.hpp +4 -3
- data/ext/qt6/qtcore/qstringlist-rb.cpp +5 -41
- data/ext/qt6/qtcore/qstringlist-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-af-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-af-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-gl-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-gl-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-mr-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-mr-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-sz-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-sz-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-flags-al-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-flags-al-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-flags-mz-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-flags-mz-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtcore-rb.cpp +26 -8
- data/ext/qt6/qtcore/qtcore-rb.hpp +1 -1
- data/ext/qt6/qtcore/qtcoreversion-rb.cpp +2 -2
- data/ext/qt6/qtcore/qtcoreversion-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtextstream-rb.cpp +3 -3
- data/ext/qt6/qtcore/qtextstream-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtimer-rb.cpp +4 -6
- data/ext/qt6/qtcore/qtimer-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtranslator-rb.cpp +3 -3
- data/ext/qt6/qtcore/qtranslator-rb.hpp +4 -3
- data/ext/qt6/qtcore/qurl-rb.cpp +10 -6
- data/ext/qt6/qtcore/qurl-rb.hpp +4 -3
- data/ext/qt6/qtcore/qurlquery-rb.cpp +33 -0
- data/ext/qt6/qtcore/qurlquery-rb.hpp +5 -0
- data/ext/qt6/qtcore/quuid-rb.cpp +3 -3
- data/ext/qt6/qtcore/quuid-rb.hpp +4 -3
- data/ext/qt6/qtcore/qvariant-rb.cpp +6 -3
- data/ext/qt6/qtcore/qvariant-rb.hpp +4 -3
- data/ext/qt6/qtcore/qvariantlist-rb.cpp +16 -0
- data/ext/qt6/qtcore/qvariantlist-rb.hpp +5 -0
- data/ext/qt6/qtcore/qvariantmap-rb.cpp +16 -0
- data/ext/qt6/qtcore/qvariantmap-rb.hpp +5 -0
- data/ext/qt6/qtcore/t-qtcore-rb.cpp +14 -6
- data/ext/qt6/qtcore/t-qtcore-rb.hpp +4 -3
- data/lib/qt6/ducktyping.rb +10 -3
- data/lib/qt6/qtcore/private/metamethod.rb +1 -1
- data/lib/qt6/qtcore/private/metaobject.rb +5 -4
- data/lib/qt6/qtcore/qabstractitemmodel.rb +2 -2
- data/lib/qt6/qtcore/qanystringview.rb +0 -6
- data/lib/qt6/qtcore/qbytearray.rb +13 -0
- data/lib/qt6/qtcore/qcoreapplication.rb +31 -3
- data/lib/qt6/qtcore/qdate.rb +1 -1
- data/lib/qt6/qtcore/qdatetime.rb +2 -2
- data/lib/qt6/qtcore/qeventloop.rb +17 -0
- data/lib/qt6/qtcore/qitemselection.rb +6 -1
- data/lib/qt6/qtcore/qlocale.rb +1 -1
- data/lib/qt6/qtcore/qmimetype.rb +9 -0
- data/lib/qt6/qtcore/qobject.rb +13 -2
- data/lib/qt6/qtcore/qprocess.rb +50 -0
- data/lib/qt6/qtcore/qprocessenvironment.rb +11 -0
- data/lib/qt6/qtcore/qregularexpression.rb +1 -1
- data/lib/qt6/qtcore/qregularexpressionmatchiterator.rb +9 -0
- data/lib/qt6/qtcore/qstandardpaths.rb +15 -0
- data/lib/qt6/qtcore/qstring.rb +7 -6
- data/lib/qt6/qtcore/qstringlist.rb +45 -2
- data/lib/qt6/qtcore/qtime.rb +1 -1
- data/lib/qt6/qtcore/qtimer.rb +1 -1
- data/lib/qt6/qtcore/qurl.rb +25 -0
- data/lib/qt6/qtcore/qurlquery.rb +41 -0
- data/lib/qt6/qtcore/quuid.rb +1 -1
- data/lib/qt6/qtcore/qvariant.rb +5 -1
- data/lib/qt6/qtcore/qvariantlist.rb +60 -0
- data/lib/qt6/qtcore/qvariantmap.rb +47 -0
- data/lib/qt6/qtcore/version.rb +1 -1
- data/lib/qt6/qtcore.rb +10 -0
- data/lib/qt6/refinements/kernel.rb +22 -5
- data/lib/qt6/refinements/object.rb +15 -0
- data/lib/qt6/refinements/symbol.rb +8 -0
- metadata +33 -6
- data/ext/qt6/qtcore/bando-rb.hpp +0 -4
|
@@ -28,23 +28,29 @@
|
|
|
28
28
|
#include "qline-rb.hpp"
|
|
29
29
|
#include "qlocale-rb.hpp"
|
|
30
30
|
#include "qmargins-rb.hpp"
|
|
31
|
+
#include "qmimetype-rb.hpp"
|
|
31
32
|
#include "qmodelindex-rb.hpp"
|
|
32
33
|
#include "qpoint-rb.hpp"
|
|
34
|
+
#include "qprocessenvironment-rb.hpp"
|
|
33
35
|
#include "qrect-rb.hpp"
|
|
34
36
|
#include "qregularexpression-rb.hpp"
|
|
35
37
|
#include "qresource-rb.hpp"
|
|
36
38
|
#include "qsize-rb.hpp"
|
|
39
|
+
#include "qstandardpaths-rb.hpp"
|
|
37
40
|
#include "qtextstream-rb.hpp"
|
|
38
41
|
#include "qurl-rb.hpp"
|
|
42
|
+
#include "qurlquery-rb.hpp"
|
|
39
43
|
#include "quuid-rb.hpp"
|
|
40
44
|
#include "qvariant-rb.hpp"
|
|
41
45
|
|
|
42
46
|
#include "qobject-rb.hpp"
|
|
43
47
|
#include "qabstractitemmodel-rb.hpp"
|
|
44
48
|
#include "qcoreapplication-rb.hpp"
|
|
49
|
+
#include "qeventloop-rb.hpp"
|
|
45
50
|
#include "qiodevice-rb.hpp"
|
|
46
51
|
#include "qfiledevice-rb.hpp"
|
|
47
52
|
#include "qfile-rb.hpp"
|
|
53
|
+
#include "qprocess-rb.hpp"
|
|
48
54
|
#include "qitemselectionmodel-rb.hpp"
|
|
49
55
|
#include "qsettings-rb.hpp"
|
|
50
56
|
#include "qsignalmapper-rb.hpp"
|
|
@@ -54,17 +60,21 @@
|
|
|
54
60
|
#include "t-qtcore-rb.hpp"
|
|
55
61
|
#include "qitemselection-rb.hpp"
|
|
56
62
|
#include "qstringlist-rb.hpp"
|
|
63
|
+
#include "qvariantlist-rb.hpp"
|
|
64
|
+
#include "qvariantmap-rb.hpp"
|
|
57
65
|
|
|
58
|
-
#include "bando-rb.hpp"
|
|
66
|
+
#include "bando-core-rb.hpp"
|
|
59
67
|
#include "bando-qobject-rb.hpp"
|
|
60
68
|
|
|
69
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
70
|
+
|
|
61
71
|
extern "C" void Init_qtcore()
|
|
62
72
|
{
|
|
63
|
-
return
|
|
64
|
-
|
|
73
|
+
return detail::cpp_protect([] {
|
|
74
|
+
define_buffer<char *>();
|
|
65
75
|
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
Module rb_mQt6 = define_module("RubyQt6");
|
|
77
|
+
Module rb_mQt6QtCore = define_module_under(rb_mQt6, "QtCore");
|
|
68
78
|
|
|
69
79
|
Init_qtcoreversion(rb_mQt6QtCore);
|
|
70
80
|
Init_qt_enum_af(rb_mQt6QtCore);
|
|
@@ -95,36 +105,44 @@ extern "C" void Init_qtcore()
|
|
|
95
105
|
Init_qline(rb_mQt6QtCore);
|
|
96
106
|
Init_qlocale(rb_mQt6QtCore);
|
|
97
107
|
Init_qmargins(rb_mQt6QtCore);
|
|
108
|
+
Init_qmimetype(rb_mQt6QtCore);
|
|
98
109
|
Init_qmodelindex(rb_mQt6QtCore);
|
|
99
110
|
Init_qpoint(rb_mQt6QtCore);
|
|
111
|
+
Init_qprocessenvironment(rb_mQt6QtCore);
|
|
100
112
|
Init_qrect(rb_mQt6QtCore);
|
|
101
113
|
Init_qregularexpression(rb_mQt6QtCore);
|
|
102
114
|
Init_qresource(rb_mQt6QtCore);
|
|
103
115
|
Init_qsize(rb_mQt6QtCore);
|
|
116
|
+
Init_qstandardpaths(rb_mQt6QtCore);
|
|
104
117
|
Init_qtextstream(rb_mQt6QtCore);
|
|
105
118
|
Init_qurl(rb_mQt6QtCore);
|
|
119
|
+
Init_qurlquery(rb_mQt6QtCore);
|
|
106
120
|
Init_quuid(rb_mQt6QtCore);
|
|
107
121
|
Init_qvariant(rb_mQt6QtCore);
|
|
108
122
|
|
|
109
123
|
Init_qobject(rb_mQt6QtCore);
|
|
110
124
|
Init_qabstractitemmodel(rb_mQt6QtCore);
|
|
111
125
|
Init_qcoreapplication(rb_mQt6QtCore);
|
|
126
|
+
Init_qeventloop(rb_mQt6QtCore);
|
|
112
127
|
Init_qiodevice(rb_mQt6QtCore);
|
|
113
128
|
Init_qfiledevice(rb_mQt6QtCore);
|
|
114
129
|
Init_qfile(rb_mQt6QtCore);
|
|
130
|
+
Init_qprocess(rb_mQt6QtCore);
|
|
115
131
|
Init_qitemselectionmodel(rb_mQt6QtCore);
|
|
116
132
|
Init_qsettings(rb_mQt6QtCore);
|
|
117
133
|
Init_qsignalmapper(rb_mQt6QtCore);
|
|
118
134
|
Init_qtimer(rb_mQt6QtCore);
|
|
119
135
|
Init_qtranslator(rb_mQt6QtCore);
|
|
120
136
|
|
|
121
|
-
|
|
137
|
+
Module rb_mQt6T = define_module_under(rb_mQt6, "T");
|
|
122
138
|
Init_t_qtcore(rb_mQt6T);
|
|
123
139
|
Init_qitemselection(rb_mQt6QtCore);
|
|
124
140
|
Init_qstringlist(rb_mQt6QtCore);
|
|
141
|
+
Init_qvariantlist(rb_mQt6QtCore);
|
|
142
|
+
Init_qvariantmap(rb_mQt6QtCore);
|
|
125
143
|
|
|
126
|
-
|
|
127
|
-
|
|
144
|
+
Module rb_mQt6Bando = define_module_under(rb_mQt6, "Bando");
|
|
145
|
+
Init_bando_core(rb_mQt6Bando);
|
|
128
146
|
Init_bando_qobject(rb_mQt6Bando);
|
|
129
147
|
});
|
|
130
148
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#include "qtcoreversion-rb.hpp"
|
|
2
2
|
#include <qtcoreversion.h>
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
5
5
|
|
|
6
|
-
void Init_qtcoreversion(
|
|
6
|
+
void Init_qtcoreversion(Module rb_mQt6QtCore)
|
|
7
7
|
{
|
|
8
8
|
rb_mQt6QtCore.define_constant("QTCORE_VERSION", QTCORE_VERSION_STR);
|
|
9
9
|
}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
#include <QIODevice>
|
|
7
7
|
#include <QLocale>
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Class rb_cQTextStream;
|
|
12
12
|
|
|
13
|
-
void Init_qtextstream(
|
|
13
|
+
void Init_qtextstream(Module rb_mQt6QtCore)
|
|
14
14
|
{
|
|
15
15
|
rb_cQTextStream =
|
|
16
16
|
// RubyQt6::QtCore::QTextStream
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
#include <QBindable>
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Class rb_cQTimer;
|
|
9
9
|
|
|
10
|
-
void Init_qtimer(
|
|
10
|
+
void Init_qtimer(Module rb_mQt6QtCore)
|
|
11
11
|
{
|
|
12
12
|
rb_cQTimer =
|
|
13
13
|
// RubyQt6::QtCore::QTimer
|
|
@@ -29,10 +29,8 @@ void Init_qtimer(Rice::Module rb_mQt6QtCore)
|
|
|
29
29
|
.define_method("remaining_time", &QTimer::remainingTime)
|
|
30
30
|
.define_method("remaining_time_as_duration", &QTimer::remainingTimeAsDuration)
|
|
31
31
|
.define_method<void (QTimer::*)(int)>("set_interval", &QTimer::setInterval, Arg("msec"))
|
|
32
|
-
.define_method<void (QTimer::*)(std::chrono::milliseconds)>("set_interval", &QTimer::setInterval, Arg("value"))
|
|
33
32
|
.define_method("set_single_shot", &QTimer::setSingleShot, Arg("single_shot"))
|
|
34
33
|
.define_method("set_timer_type", &QTimer::setTimerType, Arg("atype"))
|
|
35
|
-
.define_method<void (QTimer::*)(std::chrono::milliseconds)>("start", &QTimer::start, Arg("value"))
|
|
36
34
|
.define_method("timer_id", &QTimer::timerId)
|
|
37
35
|
.define_method("timer_type", &QTimer::timerType)
|
|
38
36
|
// Public Slots
|
|
@@ -40,7 +38,7 @@ void Init_qtimer(Rice::Module rb_mQt6QtCore)
|
|
|
40
38
|
.define_method<void (QTimer::*)()>("start", &QTimer::start)
|
|
41
39
|
.define_method("stop", &QTimer::stop)
|
|
42
40
|
// Signals
|
|
43
|
-
.define_method("timeout", &QTimer::timeout)
|
|
41
|
+
// .define_method("timeout", &QTimer::timeout)
|
|
44
42
|
// Static Public Members
|
|
45
43
|
.define_singleton_function<void (*)(int, Qt::TimerType, const QObject *, const char *)>("_single_shot", &QTimer::singleShot, Arg("msec"), Arg("timer_type"), Arg("receiver"), Arg("member"))
|
|
46
44
|
.define_singleton_function<void (*)(int, const QObject *, const char *)>("_single_shot", &QTimer::singleShot, Arg("msec"), Arg("receiver"), Arg("member"));
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
#include <QLocale>
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Class rb_cQTranslator;
|
|
9
9
|
|
|
10
|
-
void Init_qtranslator(
|
|
10
|
+
void Init_qtranslator(Module rb_mQt6QtCore)
|
|
11
11
|
{
|
|
12
12
|
rb_cQTranslator =
|
|
13
13
|
// RubyQt6::QtCore::QTranslator
|
data/ext/qt6/qtcore/qurl-rb.cpp
CHANGED
|
@@ -5,15 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
#include <QUrlQuery>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Class rb_cQUrl;
|
|
11
11
|
|
|
12
|
-
void Init_qurl(
|
|
12
|
+
void Init_qurl(Module rb_mQt6QtCore)
|
|
13
13
|
{
|
|
14
14
|
rb_cQUrl =
|
|
15
15
|
// RubyQt6::QtCore::QUrl
|
|
16
16
|
define_class_under<QUrl>(rb_mQt6QtCore, "QUrl")
|
|
17
|
+
// RubyQt6-Defined Functions
|
|
18
|
+
.define_method("_to_string", [](QUrl *self, int options) -> QString { return self->toString(QFlag(options)); }, Arg("options"))
|
|
19
|
+
.define_singleton_function("_qvariant_register_metatype", []() -> int { return qRegisterMetaType<QUrl>(); })
|
|
20
|
+
.define_singleton_function("_qvariant_from_value", [](const QUrl &value) -> QVariant { return QVariant::fromValue(value); })
|
|
21
|
+
.define_singleton_function("_qvariant_to_value", [](const QVariant &qvariant) -> QUrl { return qvariant.value<QUrl>(); })
|
|
17
22
|
// Constructor
|
|
18
23
|
.define_constructor(Constructor<QUrl>())
|
|
19
24
|
.define_constructor(Constructor<QUrl, const QString &>(), Arg("url"))
|
|
@@ -57,17 +62,16 @@ void Init_qurl(Rice::Module rb_mQt6QtCore)
|
|
|
57
62
|
.define_method("to_display_string", &QUrl::toDisplayString, Arg("options") = static_cast<QUrl::FormattingOptions>(QUrl::ComponentFormattingOption::PrettyDecoded))
|
|
58
63
|
.define_method("to_encoded", &QUrl::toEncoded, Arg("options") = static_cast<QUrl::FormattingOptions>(QUrl::ComponentFormattingOption::PrettyDecoded))
|
|
59
64
|
.define_method("to_local_file", &QUrl::toLocalFile)
|
|
60
|
-
.define_method("to_string", &QUrl::toString, Arg("options") = static_cast<QUrl::FormattingOptions>(QUrl::ComponentFormattingOption::PrettyDecoded))
|
|
61
65
|
.define_method("url", &QUrl::url, Arg("options") = static_cast<QUrl::FormattingOptions>(QUrl::ComponentFormattingOption::PrettyDecoded))
|
|
62
66
|
.define_method("user_info", &QUrl::userInfo, Arg("options") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::ComponentFormattingOption::PrettyDecoded))
|
|
63
67
|
.define_method("user_name", &QUrl::userName, Arg("options") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::ComponentFormattingOption::FullyDecoded))
|
|
64
68
|
// Static Public Members
|
|
65
69
|
.define_singleton_function("from_ace", &QUrl::fromAce, Arg("domain"), Arg("options") = static_cast<QUrl::AceProcessingOptions>(QUrl::AceProcessingOptions {}))
|
|
66
70
|
.define_singleton_function("from_encoded", &QUrl::fromEncoded, Arg("input"), Arg("mode") = static_cast<QUrl::ParsingMode>(QUrl::ParsingMode::TolerantMode))
|
|
67
|
-
.define_singleton_function("
|
|
71
|
+
.define_singleton_function("_from_local_file", &QUrl::fromLocalFile, Arg("localfile"))
|
|
68
72
|
.define_singleton_function("from_percent_encoding", &QUrl::fromPercentEncoding, Arg("input"))
|
|
69
73
|
.define_singleton_function("from_string_list", &QUrl::fromStringList, Arg("uris"), Arg("mode") = static_cast<QUrl::ParsingMode>(QUrl::ParsingMode::TolerantMode))
|
|
70
|
-
.define_singleton_function("
|
|
74
|
+
.define_singleton_function("_from_user_input", &QUrl::fromUserInput, Arg("user_input"), Arg("working_directory") = static_cast<const QString &>(QString()), Arg("options") = static_cast<QUrl::UserInputResolutionOptions>(QUrl::UserInputResolutionOption::DefaultResolution))
|
|
71
75
|
.define_singleton_function("idn_whitelist", &QUrl::idnWhitelist)
|
|
72
76
|
.define_singleton_function("set_idn_whitelist", &QUrl::setIdnWhitelist, Arg("list"))
|
|
73
77
|
.define_singleton_function("to_ace", &QUrl::toAce, Arg("domain"), Arg("options") = static_cast<QUrl::AceProcessingOptions>(QUrl::AceProcessingOptions {}))
|
data/ext/qt6/qtcore/qurl-rb.hpp
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#include "qurlquery-rb.hpp"
|
|
2
|
+
#include <qurlquery.h>
|
|
3
|
+
|
|
4
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
5
|
+
|
|
6
|
+
Class rb_cQUrlQuery;
|
|
7
|
+
|
|
8
|
+
void Init_qurlquery(Module rb_mQt6QtCore)
|
|
9
|
+
{
|
|
10
|
+
rb_cQUrlQuery =
|
|
11
|
+
// RubyQt6::QtCore::QUrlQuery
|
|
12
|
+
define_class_under<QUrlQuery>(rb_mQt6QtCore, "QUrlQuery")
|
|
13
|
+
// Constructor
|
|
14
|
+
.define_constructor(Constructor<QUrlQuery>())
|
|
15
|
+
// Public Functions
|
|
16
|
+
.define_method("_add_query_item", &QUrlQuery::addQueryItem, Arg("key"), Arg("value"))
|
|
17
|
+
.define_method("all_query_item_values", &QUrlQuery::allQueryItemValues, Arg("key"), Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
18
|
+
.define_method("clear", &QUrlQuery::clear)
|
|
19
|
+
.define_method("_has_query_item", &QUrlQuery::hasQueryItem, Arg("key"))
|
|
20
|
+
.define_method("detached?", &QUrlQuery::isDetached)
|
|
21
|
+
.define_method("empty?", &QUrlQuery::isEmpty)
|
|
22
|
+
.define_method("query", &QUrlQuery::query, Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
23
|
+
.define_method("query_item_value", &QUrlQuery::queryItemValue, Arg("key"), Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
24
|
+
.define_method("query_items", &QUrlQuery::queryItems, Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
25
|
+
.define_method("query_pair_delimiter", &QUrlQuery::queryPairDelimiter)
|
|
26
|
+
.define_method("query_value_delimiter", &QUrlQuery::queryValueDelimiter)
|
|
27
|
+
.define_method("_remove_all_query_items", &QUrlQuery::removeAllQueryItems, Arg("key"))
|
|
28
|
+
.define_method("_remove_query_item", &QUrlQuery::removeQueryItem, Arg("key"))
|
|
29
|
+
.define_method("_set_query", &QUrlQuery::setQuery, Arg("query"))
|
|
30
|
+
.define_method("set_query_delimiters", &QUrlQuery::setQueryDelimiters, Arg("value_delimiter"), Arg("pair_delimiter"))
|
|
31
|
+
.define_method("set_query_items", &QUrlQuery::setQueryItems, Arg("query"))
|
|
32
|
+
.define_method("to_string", &QUrlQuery::toString, Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded));
|
|
33
|
+
}
|
data/ext/qt6/qtcore/quuid-rb.cpp
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
#include <quuid.h>
|
|
3
3
|
#include <rice/qt6/qenum.hpp>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Class rb_cQUuid;
|
|
8
8
|
|
|
9
9
|
int QUuid_operator_compare(QUuid *lhs, QUuid *rhs)
|
|
10
10
|
{
|
|
@@ -13,7 +13,7 @@ int QUuid_operator_compare(QUuid *lhs, QUuid *rhs)
|
|
|
13
13
|
return 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
void Init_quuid(
|
|
16
|
+
void Init_quuid(Module rb_mQt6QtCore)
|
|
17
17
|
{
|
|
18
18
|
rb_cQUuid =
|
|
19
19
|
// RubyQt6::QtCore::QUuid
|
data/ext/qt6/qtcore/quuid-rb.hpp
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
#include <QSizeF>
|
|
15
15
|
#include <QSizeF>
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Class rb_cQVariant;
|
|
20
20
|
|
|
21
|
-
void Init_qvariant(
|
|
21
|
+
void Init_qvariant(Module rb_mQt6QtCore)
|
|
22
22
|
{
|
|
23
23
|
rb_cQVariant =
|
|
24
24
|
// RubyQt6::QtCore::QVariant
|
|
@@ -29,6 +29,7 @@ void Init_qvariant(Rice::Module rb_mQt6QtCore)
|
|
|
29
29
|
.define_singleton_function("from_double", [](double value) -> QVariant { return QVariant(value); })
|
|
30
30
|
.define_singleton_function("from_qstring", [](const char *value) -> QVariant { return QVariant(QString(value)); })
|
|
31
31
|
.define_singleton_function("from_qstring", [](const QString &value) -> QVariant { return QVariant(value); })
|
|
32
|
+
.define_singleton_function("from_qbytearray", [](const QByteArray &value) -> QVariant { return QVariant(value); })
|
|
32
33
|
.define_singleton_function("from_qdatetime", [](const QDateTime &value) -> QVariant { return QVariant(value); })
|
|
33
34
|
.define_singleton_function("from_qdate", [](const QDate &value) -> QVariant { return QVariant(value); })
|
|
34
35
|
.define_singleton_function("from_qtime", [](const QTime &value) -> QVariant { return QVariant(value); })
|
|
@@ -50,6 +51,7 @@ void Init_qvariant(Rice::Module rb_mQt6QtCore)
|
|
|
50
51
|
.define_singleton_function("to_int", [](const QVariant &qvariant) -> int { return qvariant.toInt(); })
|
|
51
52
|
.define_singleton_function("to_double", [](const QVariant &qvariant) -> double { return qvariant.toDouble(); })
|
|
52
53
|
.define_singleton_function("to_qstring", [](const QVariant &qvariant) -> QString { return qvariant.toString(); })
|
|
54
|
+
.define_singleton_function("to_qbytearray", [](const QVariant &qvariant) -> QByteArray { return qvariant.toByteArray(); })
|
|
53
55
|
.define_singleton_function("to_qdatetime", [](const QVariant &qvariant) -> QDateTime { return qvariant.toDateTime(); })
|
|
54
56
|
.define_singleton_function("to_qdate", [](const QVariant &qvariant) -> QDate { return qvariant.toDate(); })
|
|
55
57
|
.define_singleton_function("to_qtime", [](const QVariant &qvariant) -> QTime { return qvariant.toTime(); })
|
|
@@ -64,6 +66,7 @@ void Init_qvariant(Rice::Module rb_mQt6QtCore)
|
|
|
64
66
|
.define_singleton_function("to_qstringlist", [](const QVariant &qvariant) -> QStringList { return qvariant.toStringList(); })
|
|
65
67
|
.define_singleton_function("_to_qobject", [](const QVariant &qvariant) -> QObject * { return qvariant.value<QObject *>(); })
|
|
66
68
|
// Public Functions
|
|
69
|
+
.define_method<bool (QVariant::*)(QMetaType)>("convert", &QVariant::convert, Arg("target_type"))
|
|
67
70
|
.define_method("valid?", &QVariant::isValid)
|
|
68
71
|
.define_method("type_id", &QVariant::typeId)
|
|
69
72
|
.define_method("type_name", &QVariant::typeName);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#include "qvariantlist-rb.hpp"
|
|
2
|
+
#include <qvariantlist.h>
|
|
3
|
+
|
|
4
|
+
#include <QList>
|
|
5
|
+
#include <QVariant>
|
|
6
|
+
|
|
7
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
8
|
+
|
|
9
|
+
Class rb_cQVariantList;
|
|
10
|
+
|
|
11
|
+
void Init_qvariantlist(Module rb_mQt6QtCore)
|
|
12
|
+
{
|
|
13
|
+
rb_cQVariantList =
|
|
14
|
+
// RubyQt6::QtCore::QVariantList
|
|
15
|
+
define_class_under<QVariantList, QList<QVariant>>(rb_mQt6QtCore, "QVariantList");
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#include "qvariantmap-rb.hpp"
|
|
2
|
+
#include <qvariantmap.h>
|
|
3
|
+
|
|
4
|
+
#include <QMap>
|
|
5
|
+
#include <QVariant>
|
|
6
|
+
|
|
7
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
8
|
+
|
|
9
|
+
Class rb_cQVariantMap;
|
|
10
|
+
|
|
11
|
+
void Init_qvariantmap(Module rb_mQt6QtCore)
|
|
12
|
+
{
|
|
13
|
+
rb_cQVariantMap =
|
|
14
|
+
// RubyQt6::QtCore::QVariantMap
|
|
15
|
+
define_class_under<QVariantMap, QMap<QString, QVariant>>(rb_mQt6QtCore, "QVariantMap");
|
|
16
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
#include "t-qtcore-rb.hpp"
|
|
2
2
|
#include <rice/qt6/qlist.hpp>
|
|
3
|
+
#include <rice/qt6/qmap.hpp>
|
|
3
4
|
|
|
4
5
|
#include <QItemSelectionRange>
|
|
5
6
|
#include <QModelIndex>
|
|
6
|
-
#include <QObject>
|
|
7
7
|
#include <QString>
|
|
8
|
+
#include <QUrl>
|
|
8
9
|
#include <QVariant>
|
|
10
|
+
#include <QObject>
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
11
13
|
|
|
12
|
-
void Init_t_qtcore(
|
|
14
|
+
void Init_t_qtcore(Module rb_mQt6T)
|
|
13
15
|
{
|
|
14
16
|
// QList<QByteArray>
|
|
15
17
|
define_qlist_under<QByteArray>(rb_mQt6T);
|
|
@@ -20,12 +22,18 @@ void Init_t_qtcore(Rice::Module rb_mQt6T)
|
|
|
20
22
|
// QList<QModelIndex> -> QModelIndexList
|
|
21
23
|
define_qlist_under<QModelIndex>(rb_mQt6T);
|
|
22
24
|
|
|
23
|
-
// QList<QObject *>
|
|
24
|
-
define_qlist_under<QObject *>(rb_mQt6T);
|
|
25
|
-
|
|
26
25
|
// QList<QString> -> QStringList
|
|
27
26
|
define_qlist_under<QString>(rb_mQt6T);
|
|
28
27
|
|
|
28
|
+
// QList<QUrl>
|
|
29
|
+
define_qlist_under<QUrl>(rb_mQt6T);
|
|
30
|
+
|
|
29
31
|
// QList<QVariant>
|
|
30
32
|
define_qlist_under<QVariant>(rb_mQt6T);
|
|
33
|
+
|
|
34
|
+
// QList<QObject *>
|
|
35
|
+
define_qlist_under<QObject *>(rb_mQt6T);
|
|
36
|
+
|
|
37
|
+
// QMap<QString, QVariant>
|
|
38
|
+
define_qmap_under<QString, QVariant>(rb_mQt6T);
|
|
31
39
|
}
|
data/lib/qt6/ducktyping.rb
CHANGED
|
@@ -43,10 +43,17 @@ module RubyQt6
|
|
|
43
43
|
QtCore::QString.new(str)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
def self.to_qkeysequence(key)
|
|
47
|
+
return key unless key.is_a?(String) || key.is_a?(QtCore::QString) || key.is_a?(Integer) || key.is_a?(QtGui::QKeySequence::StandardKey)
|
|
48
|
+
QtGui::QKeySequence.new(key)
|
|
49
|
+
end
|
|
50
|
+
|
|
46
51
|
def self.to_qvariantlist(array)
|
|
47
|
-
array.each_with_object(
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
array.each_with_object(QtCore::QVariantList.new) { |e, memo| memo << QtCore::QVariant.new(e) }
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.to_qvariantmap(hash)
|
|
56
|
+
hash.each_with_object(QtCore::QVariantMap.new) { |(k, v), memo| memo[k.to_qstr] = QtCore::QVariant.new(v) }
|
|
50
57
|
end
|
|
51
58
|
|
|
52
59
|
def self.to_qflags(enum_or_flags)
|
|
@@ -57,7 +57,7 @@ module RubyQt6
|
|
|
57
57
|
def qsignature_name
|
|
58
58
|
case @underlying
|
|
59
59
|
when :libQt6 then QtCore::Private.inflector.camelize(@name)
|
|
60
|
-
when :ruby then
|
|
60
|
+
when :ruby then @name
|
|
61
61
|
else raise "Unknown underlying type: #{@underlying}"
|
|
62
62
|
end
|
|
63
63
|
end
|
|
@@ -6,25 +6,26 @@ module RubyQt6
|
|
|
6
6
|
class MetaObject
|
|
7
7
|
attr_reader :metamethods
|
|
8
8
|
|
|
9
|
-
def self.find_receiver_metamethod!(receiver,
|
|
9
|
+
def self.find_receiver_metamethod!(receiver, receiver_metamethod_name, signal)
|
|
10
10
|
if signal.nil?
|
|
11
11
|
signature = "anonymous()"
|
|
12
12
|
signal = QtCore::Private::MetaMethod.new(signature, :signal, :ruby)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
name = QtCore::Private::MetaMethod.normalized_name(
|
|
15
|
+
name = QtCore::Private::MetaMethod.normalized_name(receiver_metamethod_name.to_s)
|
|
16
16
|
compatible_methods = signal.parameters.count.downto(0).map do |n|
|
|
17
17
|
QtCore::Private::MetaMethod.normalized_signature(name, signal.parameters[0...n])
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
receiver_class = receiver.is_a?(Class) ? receiver : receiver.class
|
|
21
|
+
mo = receiver_class._rubyqt6_metaobject
|
|
21
22
|
until mo.nil?
|
|
22
23
|
mo.metamethods.each { |meth| return meth if compatible_methods.include?(meth.signature) }
|
|
23
24
|
mo.metamethods.each { |meth| return meth if name == meth.name } if mo.ruby?
|
|
24
25
|
mo = mo.super_class
|
|
25
26
|
end
|
|
26
27
|
|
|
27
|
-
qlass =
|
|
28
|
+
qlass = receiver_class.name.split("::").last
|
|
28
29
|
raise "No compatible metamethod: #{qlass}##{name}"
|
|
29
30
|
end
|
|
30
31
|
|