ruby-qt6-qtcore 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.
Files changed (189) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +2 -0
  3. data/.rubocop.yml +14 -0
  4. data/LICENSE +185 -0
  5. data/README.md +3 -0
  6. data/Rakefile +19 -0
  7. data/ext/qt6/qtcore/bando-qobject-rb.cpp +17 -0
  8. data/ext/qt6/qtcore/bando-qobject-rb.hpp +4 -0
  9. data/ext/qt6/qtcore/bando-rb.cpp +37 -0
  10. data/ext/qt6/qtcore/bando-rb.hpp +4 -0
  11. data/ext/qt6/qtcore/extconf.rb +18 -0
  12. data/ext/qt6/qtcore/qabstractitemmodel-rb.cpp +123 -0
  13. data/ext/qt6/qtcore/qabstractitemmodel-rb.hpp +4 -0
  14. data/ext/qt6/qtcore/qanystringview-rb.cpp +19 -0
  15. data/ext/qt6/qtcore/qanystringview-rb.hpp +4 -0
  16. data/ext/qt6/qtcore/qbasictimer-rb.cpp +24 -0
  17. data/ext/qt6/qtcore/qbasictimer-rb.hpp +4 -0
  18. data/ext/qt6/qtcore/qbytearray-rb.cpp +17 -0
  19. data/ext/qt6/qtcore/qbytearray-rb.hpp +4 -0
  20. data/ext/qt6/qtcore/qchar-rb.cpp +404 -0
  21. data/ext/qt6/qtcore/qchar-rb.hpp +4 -0
  22. data/ext/qt6/qtcore/qcoreapplication-rb.cpp +74 -0
  23. data/ext/qt6/qtcore/qcoreapplication-rb.hpp +4 -0
  24. data/ext/qt6/qtcore/qcoreevent-rb.cpp +234 -0
  25. data/ext/qt6/qtcore/qcoreevent-rb.hpp +4 -0
  26. data/ext/qt6/qtcore/qdatetime-rb.cpp +188 -0
  27. data/ext/qt6/qtcore/qdatetime-rb.hpp +4 -0
  28. data/ext/qt6/qtcore/qdir-rb.cpp +133 -0
  29. data/ext/qt6/qtcore/qdir-rb.hpp +4 -0
  30. data/ext/qt6/qtcore/qfile-rb.cpp +52 -0
  31. data/ext/qt6/qtcore/qfile-rb.hpp +4 -0
  32. data/ext/qt6/qtcore/qfiledevice-rb.cpp +105 -0
  33. data/ext/qt6/qtcore/qfiledevice-rb.hpp +4 -0
  34. data/ext/qt6/qtcore/qfileinfo-rb.cpp +92 -0
  35. data/ext/qt6/qtcore/qfileinfo-rb.hpp +4 -0
  36. data/ext/qt6/qtcore/qiodevice-rb.cpp +71 -0
  37. data/ext/qt6/qtcore/qiodevice-rb.hpp +4 -0
  38. data/ext/qt6/qtcore/qiodevicebase-rb.cpp +33 -0
  39. data/ext/qt6/qtcore/qiodevicebase-rb.hpp +4 -0
  40. data/ext/qt6/qtcore/qitemselection-rb.cpp +51 -0
  41. data/ext/qt6/qtcore/qitemselection-rb.hpp +4 -0
  42. data/ext/qt6/qtcore/qitemselectionmodel-rb.cpp +70 -0
  43. data/ext/qt6/qtcore/qitemselectionmodel-rb.hpp +4 -0
  44. data/ext/qt6/qtcore/qlibraryinfo-rb.cpp +36 -0
  45. data/ext/qt6/qtcore/qlibraryinfo-rb.hpp +4 -0
  46. data/ext/qt6/qtcore/qline-rb.cpp +84 -0
  47. data/ext/qt6/qtcore/qline-rb.hpp +4 -0
  48. data/ext/qt6/qtcore/qlocale-rb.cpp +1033 -0
  49. data/ext/qt6/qtcore/qlocale-rb.hpp +4 -0
  50. data/ext/qt6/qtcore/qmargins-rb.cpp +53 -0
  51. data/ext/qt6/qtcore/qmargins-rb.hpp +4 -0
  52. data/ext/qt6/qtcore/qmetaclassinfo-rb.cpp +16 -0
  53. data/ext/qt6/qtcore/qmetaclassinfo-rb.hpp +4 -0
  54. data/ext/qt6/qtcore/qmetamethod-rb.cpp +66 -0
  55. data/ext/qt6/qtcore/qmetamethod-rb.hpp +4 -0
  56. data/ext/qt6/qtcore/qmetaobject-rb.cpp +49 -0
  57. data/ext/qt6/qtcore/qmetaobject-rb.hpp +4 -0
  58. data/ext/qt6/qtcore/qmetaobjectbuilder-rb.cpp +157 -0
  59. data/ext/qt6/qtcore/qmetaobjectbuilder-rb.hpp +4 -0
  60. data/ext/qt6/qtcore/qmetatype-rb.cpp +109 -0
  61. data/ext/qt6/qtcore/qmetatype-rb.hpp +4 -0
  62. data/ext/qt6/qtcore/qmodelindex-rb.cpp +30 -0
  63. data/ext/qt6/qtcore/qmodelindex-rb.hpp +4 -0
  64. data/ext/qt6/qtcore/qobject-rb.cpp +80 -0
  65. data/ext/qt6/qtcore/qobject-rb.hpp +4 -0
  66. data/ext/qt6/qtcore/qpoint-rb.cpp +65 -0
  67. data/ext/qt6/qtcore/qpoint-rb.hpp +4 -0
  68. data/ext/qt6/qtcore/qrect-rb.cpp +162 -0
  69. data/ext/qt6/qtcore/qrect-rb.hpp +4 -0
  70. data/ext/qt6/qtcore/qregularexpression-rb.cpp +114 -0
  71. data/ext/qt6/qtcore/qregularexpression-rb.hpp +4 -0
  72. data/ext/qt6/qtcore/qresource-rb.cpp +48 -0
  73. data/ext/qt6/qtcore/qresource-rb.hpp +4 -0
  74. data/ext/qt6/qtcore/qsettings-rb.cpp +72 -0
  75. data/ext/qt6/qtcore/qsettings-rb.hpp +4 -0
  76. data/ext/qt6/qtcore/qsignalmapper-rb.cpp +32 -0
  77. data/ext/qt6/qtcore/qsignalmapper-rb.hpp +4 -0
  78. data/ext/qt6/qtcore/qsize-rb.cpp +81 -0
  79. data/ext/qt6/qtcore/qsize-rb.hpp +4 -0
  80. data/ext/qt6/qtcore/qstring-rb.cpp +67 -0
  81. data/ext/qt6/qtcore/qstring-rb.hpp +4 -0
  82. data/ext/qt6/qtcore/qstringlist-rb.cpp +53 -0
  83. data/ext/qt6/qtcore/qstringlist-rb.hpp +4 -0
  84. data/ext/qt6/qtcore/qt-enum-af-rb.cpp +345 -0
  85. data/ext/qt6/qtcore/qt-enum-af-rb.hpp +4 -0
  86. data/ext/qt6/qtcore/qt-enum-gl-rb.cpp +703 -0
  87. data/ext/qt6/qtcore/qt-enum-gl-rb.hpp +4 -0
  88. data/ext/qt6/qtcore/qt-enum-mr-rb.cpp +159 -0
  89. data/ext/qt6/qtcore/qt-enum-mr-rb.hpp +4 -0
  90. data/ext/qt6/qtcore/qt-enum-sz-rb.cpp +390 -0
  91. data/ext/qt6/qtcore/qt-enum-sz-rb.hpp +4 -0
  92. data/ext/qt6/qtcore/qt-flags-al-rb.cpp +61 -0
  93. data/ext/qt6/qtcore/qt-flags-al-rb.hpp +4 -0
  94. data/ext/qt6/qtcore/qt-flags-mz-rb.cpp +61 -0
  95. data/ext/qt6/qtcore/qt-flags-mz-rb.hpp +4 -0
  96. data/ext/qt6/qtcore/qtcore-rb.cpp +130 -0
  97. data/ext/qt6/qtcore/qtcore-rb.hpp +3 -0
  98. data/ext/qt6/qtcore/qtcoreversion-rb.cpp +9 -0
  99. data/ext/qt6/qtcore/qtcoreversion-rb.hpp +4 -0
  100. data/ext/qt6/qtcore/qtextstream-rb.cpp +99 -0
  101. data/ext/qt6/qtcore/qtextstream-rb.hpp +4 -0
  102. data/ext/qt6/qtcore/qtimer-rb.cpp +47 -0
  103. data/ext/qt6/qtcore/qtimer-rb.hpp +4 -0
  104. data/ext/qt6/qtcore/qtranslator-rb.cpp +26 -0
  105. data/ext/qt6/qtcore/qtranslator-rb.hpp +4 -0
  106. data/ext/qt6/qtcore/qurl-rb.cpp +140 -0
  107. data/ext/qt6/qtcore/qurl-rb.hpp +4 -0
  108. data/ext/qt6/qtcore/quuid-rb.cpp +60 -0
  109. data/ext/qt6/qtcore/quuid-rb.hpp +4 -0
  110. data/ext/qt6/qtcore/qvariant-rb.cpp +70 -0
  111. data/ext/qt6/qtcore/qvariant-rb.hpp +4 -0
  112. data/ext/qt6/qtcore/t-qtcore-rb.cpp +31 -0
  113. data/ext/qt6/qtcore/t-qtcore-rb.hpp +4 -0
  114. data/lib/qt6/bando/dsl.rb +91 -0
  115. data/lib/qt6/bando/qobject.rb +9 -0
  116. data/lib/qt6/configuration.rb +16 -0
  117. data/lib/qt6/ducktyping.rb +74 -0
  118. data/lib/qt6/qtcore/private/_nodoc.rb +9 -0
  119. data/lib/qt6/qtcore/private/inflector.rb +27 -0
  120. data/lib/qt6/qtcore/private/metamethod.rb +67 -0
  121. data/lib/qt6/qtcore/private/metaobject.rb +98 -0
  122. data/lib/qt6/qtcore/private/signal.rb +26 -0
  123. data/lib/qt6/qtcore/private/signalmanager.rb +30 -0
  124. data/lib/qt6/qtcore/qabstractitemmodel.rb +42 -0
  125. data/lib/qt6/qtcore/qabstractlistmodel.rb +12 -0
  126. data/lib/qt6/qtcore/qabstracttablemodel.rb +12 -0
  127. data/lib/qt6/qtcore/qanystringview.rb +33 -0
  128. data/lib/qt6/qtcore/qbasictimer.rb +16 -0
  129. data/lib/qt6/qtcore/qbool.rb +21 -0
  130. data/lib/qt6/qtcore/qbytearray.rb +22 -0
  131. data/lib/qt6/qtcore/qchar.rb +46 -0
  132. data/lib/qt6/qtcore/qchildevent.rb +9 -0
  133. data/lib/qt6/qtcore/qcoreapplication.rb +44 -0
  134. data/lib/qt6/qtcore/qdate.rb +43 -0
  135. data/lib/qt6/qtcore/qdatetime.rb +54 -0
  136. data/lib/qt6/qtcore/qdir.rb +34 -0
  137. data/lib/qt6/qtcore/qdynamicpropertychangeevent.rb +9 -0
  138. data/lib/qt6/qtcore/qevent.rb +11 -0
  139. data/lib/qt6/qtcore/qfile.rb +21 -0
  140. data/lib/qt6/qtcore/qfiledevice.rb +29 -0
  141. data/lib/qt6/qtcore/qfileinfo.rb +30 -0
  142. data/lib/qt6/qtcore/qiodevice.rb +31 -0
  143. data/lib/qt6/qtcore/qiodevicebase.rb +13 -0
  144. data/lib/qt6/qtcore/qitemselection.rb +11 -0
  145. data/lib/qt6/qtcore/qitemselectionmodel.rb +40 -0
  146. data/lib/qt6/qtcore/qitemselectionrange.rb +25 -0
  147. data/lib/qt6/qtcore/qlibraryinfo.rb +11 -0
  148. data/lib/qt6/qtcore/qline.rb +42 -0
  149. data/lib/qt6/qtcore/qlinef.rb +42 -0
  150. data/lib/qt6/qtcore/qlocale.rb +44 -0
  151. data/lib/qt6/qtcore/qmargins.rb +38 -0
  152. data/lib/qt6/qtcore/qmarginsf.rb +38 -0
  153. data/lib/qt6/qtcore/qmetaclassinfo.rb +13 -0
  154. data/lib/qt6/qtcore/qmetamethod.rb +20 -0
  155. data/lib/qt6/qtcore/qmetamethodbuilder.rb +12 -0
  156. data/lib/qt6/qtcore/qmetaobject.rb +12 -0
  157. data/lib/qt6/qtcore/qmetaobjectbuilder.rb +30 -0
  158. data/lib/qt6/qtcore/qmetatype.rb +31 -0
  159. data/lib/qt6/qtcore/qmodelindex.rb +16 -0
  160. data/lib/qt6/qtcore/qobject.rb +103 -0
  161. data/lib/qt6/qtcore/qpoint.rb +36 -0
  162. data/lib/qt6/qtcore/qpointf.rb +36 -0
  163. data/lib/qt6/qtcore/qrect.rb +46 -0
  164. data/lib/qt6/qtcore/qrectf.rb +46 -0
  165. data/lib/qt6/qtcore/qregularexpression.rb +34 -0
  166. data/lib/qt6/qtcore/qregularexpressionmatch.rb +16 -0
  167. data/lib/qt6/qtcore/qresource.rb +29 -0
  168. data/lib/qt6/qtcore/qsettings.rb +73 -0
  169. data/lib/qt6/qtcore/qsignalmapper.rb +33 -0
  170. data/lib/qt6/qtcore/qsize.rb +36 -0
  171. data/lib/qt6/qtcore/qsizef.rb +36 -0
  172. data/lib/qt6/qtcore/qstring.rb +58 -0
  173. data/lib/qt6/qtcore/qstringlist.rb +18 -0
  174. data/lib/qt6/qtcore/qt/qvariant.rb +46 -0
  175. data/lib/qt6/qtcore/qt.rb +226 -0
  176. data/lib/qt6/qtcore/qtcoreversion.rb +6 -0
  177. data/lib/qt6/qtcore/qtextstream.rb +32 -0
  178. data/lib/qt6/qtcore/qtime.rb +49 -0
  179. data/lib/qt6/qtcore/qtimer.rb +32 -0
  180. data/lib/qt6/qtcore/qtimerevent.rb +9 -0
  181. data/lib/qt6/qtcore/qtranslator.rb +27 -0
  182. data/lib/qt6/qtcore/qurl.rb +55 -0
  183. data/lib/qt6/qtcore/quuid.rb +47 -0
  184. data/lib/qt6/qtcore/qvariant.rb +48 -0
  185. data/lib/qt6/qtcore/version.rb +7 -0
  186. data/lib/qt6/qtcore.rb +86 -0
  187. data/lib/qt6/refinements/kernel.rb +38 -0
  188. data/lib/qt6/refinements/string.rb +8 -0
  189. metadata +244 -0
@@ -0,0 +1,32 @@
1
+ #include "qsignalmapper-rb.hpp"
2
+ #include <qsignalmapper.h>
3
+
4
+ using namespace Rice;
5
+
6
+ Rice::Class rb_cQSignalMapper;
7
+
8
+ void Init_qsignalmapper(Rice::Module rb_mQt6QtCore)
9
+ {
10
+ rb_cQSignalMapper =
11
+ // RubyQt6::QtCore::QSignalMapper
12
+ define_class_under<QSignalMapper, QObject>(rb_mQt6QtCore, "QSignalMapper")
13
+ // RubyQt6-Defined Functions
14
+ .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QSignalMapper::staticMetaObject; })
15
+ // Constructor
16
+ .define_constructor(Constructor<QSignalMapper, QObject *>(), Arg("parent"))
17
+ // Public Functions
18
+ .define_method<QObject *(QSignalMapper::*)(QObject *) const>("mapping", &QSignalMapper::mapping, Arg("object"))
19
+ .define_method<QObject *(QSignalMapper::*)(const QString &) const>("mapping", &QSignalMapper::mapping, Arg("text"))
20
+ .define_method<QObject *(QSignalMapper::*)(int) const>("mapping", &QSignalMapper::mapping, Arg("id"))
21
+ .define_method("remove_mappings", &QSignalMapper::removeMappings, Arg("sender"))
22
+ .define_method<void (QSignalMapper::*)(QObject *, QObject *)>("_set_mapping", &QSignalMapper::setMapping, Arg("sender"), Arg("object"))
23
+ .define_method<void (QSignalMapper::*)(QObject *, const QString &)>("_set_mapping", &QSignalMapper::setMapping, Arg("sender"), Arg("text"))
24
+ .define_method<void (QSignalMapper::*)(QObject *, int)>("_set_mapping", &QSignalMapper::setMapping, Arg("sender"), Arg("id"))
25
+ // Public Slots
26
+ .define_method<void (QSignalMapper::*)()>("map", &QSignalMapper::map)
27
+ .define_method<void (QSignalMapper::*)(QObject *)>("map", &QSignalMapper::map, Arg("sender"))
28
+ // Signals
29
+ .define_method("mapped_int", &QSignalMapper::mappedInt, Arg("id"))
30
+ .define_method("mapped_object", &QSignalMapper::mappedObject, Arg("object"))
31
+ .define_method("mapped_string", &QSignalMapper::mappedString, Arg("text"));
32
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qsignalmapper(Rice::Module rb_mQt6QtCore);
@@ -0,0 +1,81 @@
1
+ #include "qsize-rb.hpp"
2
+ #include <qsize.h>
3
+
4
+ using namespace Rice;
5
+
6
+ Rice::Class rb_cQSize;
7
+ Rice::Class rb_cQSizeF;
8
+
9
+ void Init_qsize(Rice::Module rb_mQt6QtCore)
10
+ {
11
+ rb_cQSize =
12
+ // RubyQt6::QtCore::QSize
13
+ define_class_under<QSize>(rb_mQt6QtCore, "QSize")
14
+ // RubyQt6-Defined Functions
15
+ .define_method("*", [](QSize *self, qreal factor) -> QSize { return *self * factor; })
16
+ .define_method("+", [](QSize *self, QSize *other) -> QSize { return *self + *other; })
17
+ .define_method("-", [](QSize *self, QSize *other) -> QSize { return *self - *other; })
18
+ .define_method("/", [](QSize *self, qreal divisor) -> QSize { return *self / divisor; })
19
+ .define_singleton_function("_operator_equal", [](QSize *lhs, QSize *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
20
+ .define_singleton_function("_operator_equal", [](QSize *lhs, QSizeF *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
21
+ // Constructor
22
+ .define_constructor(Constructor<QSize>())
23
+ .define_constructor(Constructor<QSize, int, int>(), Arg("width"), Arg("height"))
24
+ // Public Functions
25
+ .define_method("bounded_to", &QSize::boundedTo, Arg("other_size"))
26
+ .define_method("expanded_to", &QSize::expandedTo, Arg("other_size"))
27
+ .define_method("grown_by", &QSize::grownBy, Arg("margins"))
28
+ .define_method("height", &QSize::height)
29
+ .define_method("empty?", &QSize::isEmpty)
30
+ .define_method("null?", &QSize::isNull)
31
+ .define_method("valid?", &QSize::isValid)
32
+ .define_method("rheight", &QSize::rheight)
33
+ .define_method("rwidth", &QSize::rwidth)
34
+ .define_method<void (QSize::*)(int, int, Qt::AspectRatioMode) noexcept>("scale", &QSize::scale, Arg("w"), Arg("h"), Arg("mode"))
35
+ .define_method<void (QSize::*)(const QSize &, Qt::AspectRatioMode) noexcept>("scale", &QSize::scale, Arg("s"), Arg("mode"))
36
+ .define_method<QSize (QSize::*)(int, int, Qt::AspectRatioMode) const noexcept>("scaled", &QSize::scaled, Arg("w"), Arg("h"), Arg("mode"))
37
+ .define_method<QSize (QSize::*)(const QSize &, Qt::AspectRatioMode) const noexcept>("scaled", &QSize::scaled, Arg("s"), Arg("mode"))
38
+ .define_method("set_height", &QSize::setHeight, Arg("height"))
39
+ .define_method("set_width", &QSize::setWidth, Arg("width"))
40
+ .define_method("shrunk_by", &QSize::shrunkBy, Arg("margins"))
41
+ .define_method("to_size_f", &QSize::toSizeF)
42
+ .define_method("transpose", &QSize::transpose)
43
+ .define_method("transposed", &QSize::transposed)
44
+ .define_method("width", &QSize::width);
45
+
46
+ rb_cQSizeF =
47
+ // RubyQt6::QtCore::QSizeF
48
+ define_class_under<QSizeF>(rb_mQt6QtCore, "QSizeF")
49
+ // RubyQt6-Defined Functions
50
+ .define_method("*", [](QSizeF *self, qreal factor) -> QSizeF { return *self * factor; })
51
+ .define_method("+", [](QSizeF *self, QSizeF *other) -> QSizeF { return *self + *other; })
52
+ .define_method("-", [](QSizeF *self, QSizeF *other) -> QSizeF { return *self - *other; })
53
+ .define_method("/", [](QSizeF *self, qreal divisor) -> QSizeF { return *self / divisor; })
54
+ .define_singleton_function("_operator_equal", [](QSizeF *lhs, QSize *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
55
+ .define_singleton_function("_operator_equal", [](QSizeF *lhs, QSizeF *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
56
+ // Constructor
57
+ .define_constructor(Constructor<QSizeF>())
58
+ .define_constructor(Constructor<QSizeF, qreal, qreal>(), Arg("width"), Arg("height"))
59
+ .define_constructor(Constructor<QSizeF, const QSize &>(), Arg("size"))
60
+ // Public Functions
61
+ .define_method("bounded_to", &QSizeF::boundedTo, Arg("other_size"))
62
+ .define_method("expanded_to", &QSizeF::expandedTo, Arg("other_size"))
63
+ .define_method("grown_by", &QSizeF::grownBy, Arg("margins"))
64
+ .define_method("height", &QSizeF::height)
65
+ .define_method("empty?", &QSizeF::isEmpty)
66
+ .define_method("null?", &QSizeF::isNull)
67
+ .define_method("valid?", &QSizeF::isValid)
68
+ .define_method("rheight", &QSizeF::rheight)
69
+ .define_method("rwidth", &QSizeF::rwidth)
70
+ .define_method<void (QSizeF::*)(qreal, qreal, Qt::AspectRatioMode) noexcept>("scale", &QSizeF::scale, Arg("w"), Arg("h"), Arg("mode"))
71
+ .define_method<void (QSizeF::*)(const QSizeF &, Qt::AspectRatioMode) noexcept>("scale", &QSizeF::scale, Arg("s"), Arg("mode"))
72
+ .define_method<QSizeF (QSizeF::*)(qreal, qreal, Qt::AspectRatioMode) const noexcept>("scaled", &QSizeF::scaled, Arg("w"), Arg("h"), Arg("mode"))
73
+ .define_method<QSizeF (QSizeF::*)(const QSizeF &, Qt::AspectRatioMode) const noexcept>("scaled", &QSizeF::scaled, Arg("s"), Arg("mode"))
74
+ .define_method("set_height", &QSizeF::setHeight, Arg("height"))
75
+ .define_method("set_width", &QSizeF::setWidth, Arg("width"))
76
+ .define_method("shrunk_by", &QSizeF::shrunkBy, Arg("margins"))
77
+ .define_method("to_size", &QSizeF::toSize)
78
+ .define_method("transpose", &QSizeF::transpose)
79
+ .define_method("transposed", &QSizeF::transposed)
80
+ .define_method("width", &QSizeF::width);
81
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qsize(Rice::Module rb_mQt6QtCore);
@@ -0,0 +1,67 @@
1
+ #include "qstring-rb.hpp"
2
+ #include <qstring.h>
3
+
4
+ #include <QRegularExpression>
5
+
6
+ using namespace Rice;
7
+
8
+ Rice::Class rb_cQString;
9
+
10
+ std::optional<QString> QString_slice(QString *self, qsizetype start, qsizetype length)
11
+ {
12
+ if (start < 0) {
13
+ start = start + self->size();
14
+ if (start < 0) return std::nullopt;
15
+ } else if (start >= self->size()) {
16
+ return std::nullopt;
17
+ }
18
+
19
+ if (length < 0) {
20
+ return std::nullopt;
21
+ } else if (start + length > self->size()) {
22
+ return self->sliced(start);
23
+ } else {
24
+ return self->sliced(start, length);
25
+ }
26
+ }
27
+
28
+ QString QString_replace(QString *self, qsizetype start, const QString &after)
29
+ {
30
+ if (start < 0) {
31
+ start = start + self->size();
32
+ if (start < 0) throw std::out_of_range("index " + std::to_string(start - self->size()) + " out of string");
33
+ } else if (start > self->size()) {
34
+ throw std::out_of_range("index " + std::to_string(start) + " out of string");
35
+ }
36
+
37
+ return self->replace(start, 1, after);
38
+ }
39
+
40
+ void Init_qstring(Rice::Module rb_mQt6QtCore)
41
+ {
42
+ rb_cQString =
43
+ // RubyQt6::QtCore::QString
44
+ define_class_under<QString>(rb_mQt6QtCore, "QString")
45
+ // RubyQt6-Defined Functions
46
+ .define_method("downcase", [](QString *self) -> QString { return self->toLower(); })
47
+ .define_method("upcase", [](QString *self) -> QString { return self->toUpper(); })
48
+ .define_method("[]", QString_slice, Arg("start"), Arg("length") = static_cast<qsizetype>(1))
49
+ .define_method("[]=", QString_replace, Arg("index"), Arg("after"))
50
+ .define_method("[]=", [](QString *self, qsizetype index, const char *after) -> QString { return QString_replace(self, index, after); }, Arg("index"), Arg("after"))
51
+ // Constructor
52
+ .define_constructor(Constructor<QString, const char *>(), Arg("str"))
53
+ .define_constructor(Constructor<QString, const QString &>(), Arg("other"))
54
+ // Public Functions
55
+ .define_method("capacity", &QString::capacity)
56
+ .define_method("empty?", &QString::isEmpty)
57
+ .define_method("length", &QString::length)
58
+ .define_method("max_size", &QString::max_size)
59
+ .define_method("reserve", &QString::reserve, Arg("size"))
60
+ .define_method("shrink_to_fit", &QString::shrink_to_fit)
61
+ .define_method("size", &QString::size)
62
+ .define_method("to_std_string", &QString::toStdString)
63
+ .define_method<bool (QString::*)(const QRegularExpression &, QRegularExpressionMatch *) const>("_contains", &QString::contains, Arg("re"), Arg("rmatch") = static_cast<QRegularExpressionMatch *>(nullptr))
64
+ .define_method<bool (QString::*)(const QString &, Qt::CaseSensitivity) const>("_contains", &QString::contains, Arg("s"), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
65
+ .define_method<QStringList (QString::*)(const QString &, Qt::SplitBehavior, Qt::CaseSensitivity) const>("_split", &QString::split, Arg("sep"), Arg("behavior") = static_cast<Qt::SplitBehavior>(Qt::KeepEmptyParts), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
66
+ .define_method<QStringList (QString::*)(const QRegularExpression &, Qt::SplitBehavior) const>("_split", &QString::split, Arg("sep"), Arg("behavior") = static_cast<Qt::SplitBehavior>(Qt::KeepEmptyParts));
67
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qstring(Rice::Module rb_mQt6QtCore);
@@ -0,0 +1,53 @@
1
+ #include "qstringlist-rb.hpp"
2
+ #include <qstringlist.h>
3
+
4
+ #include <QList>
5
+
6
+ using namespace Rice;
7
+
8
+ Rice::Class rb_cQStringList;
9
+
10
+ void Init_qstringlist(Rice::Module rb_mQt6QtCore)
11
+ {
12
+ rb_cQStringList =
13
+ // RubyQt6::QtCore::QStringList
14
+ define_class_under<QStringList, QList<QString>>(rb_mQt6QtCore, "QStringList")
15
+ .define_method("count", [](QStringList *self, const char *str) -> qsizetype {
16
+ Data_Object<QStringList> self_(self);
17
+ auto r = self_.call("count", QString(str));
18
+ return detail::From_Ruby<qsizetype>().convert(r);
19
+ })
20
+ .define_method("include?", [](QStringList *self, const char *str) -> bool {
21
+ Data_Object<QStringList> self_(self);
22
+ auto r = self_.call("include?", QString(str));
23
+ return detail::From_Ruby<bool>().convert(r);
24
+ })
25
+ .define_method("index", [](QStringList *self, const char *str) -> std::optional<qsizetype> {
26
+ Data_Object<QStringList> self_(self);
27
+ auto r = self_.call("index", QString(str));
28
+ return detail::From_Ruby<std::optional<qsizetype>>().convert(r);
29
+ })
30
+ .define_method("insert", [](QStringList *self, qsizetype index, const char *str) -> QStringList * {
31
+ Data_Object<QStringList> self_(self);
32
+ auto _ = self_.call("insert", index, QString(str));
33
+ return self;
34
+ })
35
+ .define_method("push", [](QStringList *self, const char * str) -> QStringList * {
36
+ Data_Object<QStringList> self_(self);
37
+ auto _ = self_.call("push", QString(str));
38
+ return self;
39
+ })
40
+ .define_method("delete", [](QStringList *self, const char * str) -> std::optional<QString> {
41
+ Data_Object<QStringList> self_(self);
42
+ auto r = self_.call("delete", QString(str));
43
+ return detail::From_Ruby<std::optional<QString>>().convert(r);
44
+ })
45
+ .define_method("[]=", [](QStringList *self, qsizetype index, const char *str) -> QString {
46
+ Data_Object<QStringList> self_(self);
47
+ auto r = self_.call("[]=", index, QString(str));
48
+ return detail::From_Ruby<QString>().convert(r);
49
+ })
50
+ .define_method("_join", [](QStringList *self, QString &separator) -> QString {
51
+ return self->join(separator);
52
+ });
53
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qstringlist(Rice::Module rb_mQt6QtCore);
@@ -0,0 +1,345 @@
1
+ #include "qt-enum-af-rb.hpp"
2
+ #include <qnamespace.h>
3
+ #include <rice/qt6/qenum.hpp>
4
+
5
+ using namespace Rice;
6
+
7
+ void Init_qt_enum_af(Rice::Module rb_mQt6QtCore)
8
+ {
9
+ Module rb_mQt =
10
+ // RubyQt6::QtCore::Qt
11
+ define_module_under(rb_mQt6QtCore, "Qt");
12
+
13
+ Data_Type<Qt::AlignmentFlag> rb_cQtAlignmentFlag =
14
+ // RubyQt6::QtCore::Qt::AlignmentFlag
15
+ define_qenum_under<Qt::AlignmentFlag>(rb_mQt, "AlignmentFlag");
16
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignLeft", Qt::AlignmentFlag::AlignLeft);
17
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignLeading", Qt::AlignmentFlag::AlignLeading);
18
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignRight", Qt::AlignmentFlag::AlignRight);
19
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignTrailing", Qt::AlignmentFlag::AlignTrailing);
20
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignHCenter", Qt::AlignmentFlag::AlignHCenter);
21
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignJustify", Qt::AlignmentFlag::AlignJustify);
22
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignAbsolute", Qt::AlignmentFlag::AlignAbsolute);
23
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignHorizontal_Mask", Qt::AlignmentFlag::AlignHorizontal_Mask);
24
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignTop", Qt::AlignmentFlag::AlignTop);
25
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignBottom", Qt::AlignmentFlag::AlignBottom);
26
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignVCenter", Qt::AlignmentFlag::AlignVCenter);
27
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignBaseline", Qt::AlignmentFlag::AlignBaseline);
28
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignVertical_Mask", Qt::AlignmentFlag::AlignVertical_Mask);
29
+ define_qenum_value_under(rb_cQtAlignmentFlag, "AlignCenter", Qt::AlignmentFlag::AlignCenter);
30
+
31
+ Data_Type<Qt::AnchorPoint> rb_cQtAnchorPoint =
32
+ // RubyQt6::QtCore::Qt::AnchorPoint
33
+ define_qenum_under<Qt::AnchorPoint>(rb_mQt, "AnchorPoint");
34
+ define_qenum_value_under(rb_cQtAnchorPoint, "AnchorLeft", Qt::AnchorPoint::AnchorLeft);
35
+ define_qenum_value_under(rb_cQtAnchorPoint, "AnchorHorizontalCenter", Qt::AnchorPoint::AnchorHorizontalCenter);
36
+ define_qenum_value_under(rb_cQtAnchorPoint, "AnchorRight", Qt::AnchorPoint::AnchorRight);
37
+ define_qenum_value_under(rb_cQtAnchorPoint, "AnchorTop", Qt::AnchorPoint::AnchorTop);
38
+ define_qenum_value_under(rb_cQtAnchorPoint, "AnchorVerticalCenter", Qt::AnchorPoint::AnchorVerticalCenter);
39
+ define_qenum_value_under(rb_cQtAnchorPoint, "AnchorBottom", Qt::AnchorPoint::AnchorBottom);
40
+
41
+ Data_Type<Qt::ApplicationAttribute> rb_cQtApplicationAttribute =
42
+ // RubyQt6::QtCore::Qt::ApplicationAttribute
43
+ define_qenum_under<Qt::ApplicationAttribute>(rb_mQt, "ApplicationAttribute");
44
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_QtQuickUseDefaultSizePolicy", Qt::ApplicationAttribute::AA_QtQuickUseDefaultSizePolicy);
45
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontShowIconsInMenus", Qt::ApplicationAttribute::AA_DontShowIconsInMenus);
46
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_NativeWindows", Qt::ApplicationAttribute::AA_NativeWindows);
47
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontCreateNativeWidgetSiblings", Qt::ApplicationAttribute::AA_DontCreateNativeWidgetSiblings);
48
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_PluginApplication", Qt::ApplicationAttribute::AA_PluginApplication);
49
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontUseNativeMenuBar", Qt::ApplicationAttribute::AA_DontUseNativeMenuBar);
50
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_MacDontSwapCtrlAndMeta", Qt::ApplicationAttribute::AA_MacDontSwapCtrlAndMeta);
51
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_Use96Dpi", Qt::ApplicationAttribute::AA_Use96Dpi);
52
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DisableNativeVirtualKeyboard", Qt::ApplicationAttribute::AA_DisableNativeVirtualKeyboard);
53
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontUseNativeMenuWindows", Qt::ApplicationAttribute::AA_DontUseNativeMenuWindows);
54
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_SynthesizeTouchForUnhandledMouseEvents", Qt::ApplicationAttribute::AA_SynthesizeTouchForUnhandledMouseEvents);
55
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_SynthesizeMouseForUnhandledTouchEvents", Qt::ApplicationAttribute::AA_SynthesizeMouseForUnhandledTouchEvents);
56
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_ForceRasterWidgets", Qt::ApplicationAttribute::AA_ForceRasterWidgets);
57
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_UseDesktopOpenGL", Qt::ApplicationAttribute::AA_UseDesktopOpenGL);
58
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_UseOpenGLES", Qt::ApplicationAttribute::AA_UseOpenGLES);
59
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_UseSoftwareOpenGL", Qt::ApplicationAttribute::AA_UseSoftwareOpenGL);
60
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_ShareOpenGLContexts", Qt::ApplicationAttribute::AA_ShareOpenGLContexts);
61
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_SetPalette", Qt::ApplicationAttribute::AA_SetPalette);
62
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_UseStyleSheetPropagationInWidgetStyles", Qt::ApplicationAttribute::AA_UseStyleSheetPropagationInWidgetStyles);
63
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontUseNativeDialogs", Qt::ApplicationAttribute::AA_DontUseNativeDialogs);
64
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_SynthesizeMouseForUnhandledTabletEvents", Qt::ApplicationAttribute::AA_SynthesizeMouseForUnhandledTabletEvents);
65
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_CompressHighFrequencyEvents", Qt::ApplicationAttribute::AA_CompressHighFrequencyEvents);
66
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontCheckOpenGLContextThreadAffinity", Qt::ApplicationAttribute::AA_DontCheckOpenGLContextThreadAffinity);
67
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DisableShaderDiskCache", Qt::ApplicationAttribute::AA_DisableShaderDiskCache);
68
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DontShowShortcutsInContextMenus", Qt::ApplicationAttribute::AA_DontShowShortcutsInContextMenus);
69
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_CompressTabletEvents", Qt::ApplicationAttribute::AA_CompressTabletEvents);
70
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_DisableSessionManager", Qt::ApplicationAttribute::AA_DisableSessionManager);
71
+ define_qenum_value_under(rb_cQtApplicationAttribute, "AA_AttributeCount", Qt::ApplicationAttribute::AA_AttributeCount);
72
+
73
+ Data_Type<Qt::ApplicationState> rb_cQtApplicationState =
74
+ // RubyQt6::QtCore::Qt::ApplicationState
75
+ define_qenum_under<Qt::ApplicationState>(rb_mQt, "ApplicationState");
76
+ define_qenum_value_under(rb_cQtApplicationState, "ApplicationSuspended", Qt::ApplicationState::ApplicationSuspended);
77
+ define_qenum_value_under(rb_cQtApplicationState, "ApplicationHidden", Qt::ApplicationState::ApplicationHidden);
78
+ define_qenum_value_under(rb_cQtApplicationState, "ApplicationInactive", Qt::ApplicationState::ApplicationInactive);
79
+ define_qenum_value_under(rb_cQtApplicationState, "ApplicationActive", Qt::ApplicationState::ApplicationActive);
80
+
81
+ Data_Type<Qt::ArrowType> rb_cQtArrowType =
82
+ // RubyQt6::QtCore::Qt::ArrowType
83
+ define_qenum_under<Qt::ArrowType>(rb_mQt, "ArrowType");
84
+ define_qenum_value_under(rb_cQtArrowType, "NoArrow", Qt::ArrowType::NoArrow);
85
+ define_qenum_value_under(rb_cQtArrowType, "UpArrow", Qt::ArrowType::UpArrow);
86
+ define_qenum_value_under(rb_cQtArrowType, "DownArrow", Qt::ArrowType::DownArrow);
87
+ define_qenum_value_under(rb_cQtArrowType, "LeftArrow", Qt::ArrowType::LeftArrow);
88
+ define_qenum_value_under(rb_cQtArrowType, "RightArrow", Qt::ArrowType::RightArrow);
89
+
90
+ Data_Type<Qt::AspectRatioMode> rb_cQtAspectRatioMode =
91
+ // RubyQt6::QtCore::Qt::AspectRatioMode
92
+ define_qenum_under<Qt::AspectRatioMode>(rb_mQt, "AspectRatioMode");
93
+ define_qenum_value_under(rb_cQtAspectRatioMode, "IgnoreAspectRatio", Qt::AspectRatioMode::IgnoreAspectRatio);
94
+ define_qenum_value_under(rb_cQtAspectRatioMode, "KeepAspectRatio", Qt::AspectRatioMode::KeepAspectRatio);
95
+ define_qenum_value_under(rb_cQtAspectRatioMode, "KeepAspectRatioByExpanding", Qt::AspectRatioMode::KeepAspectRatioByExpanding);
96
+
97
+ Data_Type<Qt::Axis> rb_cQtAxis =
98
+ // RubyQt6::QtCore::Qt::Axis
99
+ define_qenum_under<Qt::Axis>(rb_mQt, "Axis");
100
+ define_qenum_value_under(rb_cQtAxis, "XAxis", Qt::Axis::XAxis);
101
+ define_qenum_value_under(rb_cQtAxis, "YAxis", Qt::Axis::YAxis);
102
+ define_qenum_value_under(rb_cQtAxis, "ZAxis", Qt::Axis::ZAxis);
103
+
104
+ Data_Type<Qt::BGMode> rb_cQtBGMode =
105
+ // RubyQt6::QtCore::Qt::BGMode
106
+ define_qenum_under<Qt::BGMode>(rb_mQt, "BGMode");
107
+ define_qenum_value_under(rb_cQtBGMode, "TransparentMode", Qt::BGMode::TransparentMode);
108
+ define_qenum_value_under(rb_cQtBGMode, "OpaqueMode", Qt::BGMode::OpaqueMode);
109
+
110
+ Data_Type<Qt::BrushStyle> rb_cQtBrushStyle =
111
+ // RubyQt6::QtCore::Qt::BrushStyle
112
+ define_qenum_under<Qt::BrushStyle>(rb_mQt, "BrushStyle");
113
+ define_qenum_value_under(rb_cQtBrushStyle, "NoBrush", Qt::BrushStyle::NoBrush);
114
+ define_qenum_value_under(rb_cQtBrushStyle, "SolidPattern", Qt::BrushStyle::SolidPattern);
115
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense1Pattern", Qt::BrushStyle::Dense1Pattern);
116
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense2Pattern", Qt::BrushStyle::Dense2Pattern);
117
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense3Pattern", Qt::BrushStyle::Dense3Pattern);
118
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense4Pattern", Qt::BrushStyle::Dense4Pattern);
119
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense5Pattern", Qt::BrushStyle::Dense5Pattern);
120
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense6Pattern", Qt::BrushStyle::Dense6Pattern);
121
+ define_qenum_value_under(rb_cQtBrushStyle, "Dense7Pattern", Qt::BrushStyle::Dense7Pattern);
122
+ define_qenum_value_under(rb_cQtBrushStyle, "HorPattern", Qt::BrushStyle::HorPattern);
123
+ define_qenum_value_under(rb_cQtBrushStyle, "VerPattern", Qt::BrushStyle::VerPattern);
124
+ define_qenum_value_under(rb_cQtBrushStyle, "CrossPattern", Qt::BrushStyle::CrossPattern);
125
+ define_qenum_value_under(rb_cQtBrushStyle, "BDiagPattern", Qt::BrushStyle::BDiagPattern);
126
+ define_qenum_value_under(rb_cQtBrushStyle, "FDiagPattern", Qt::BrushStyle::FDiagPattern);
127
+ define_qenum_value_under(rb_cQtBrushStyle, "DiagCrossPattern", Qt::BrushStyle::DiagCrossPattern);
128
+ define_qenum_value_under(rb_cQtBrushStyle, "LinearGradientPattern", Qt::BrushStyle::LinearGradientPattern);
129
+ define_qenum_value_under(rb_cQtBrushStyle, "RadialGradientPattern", Qt::BrushStyle::RadialGradientPattern);
130
+ define_qenum_value_under(rb_cQtBrushStyle, "ConicalGradientPattern", Qt::BrushStyle::ConicalGradientPattern);
131
+ define_qenum_value_under(rb_cQtBrushStyle, "TexturePattern", Qt::BrushStyle::TexturePattern);
132
+
133
+ Data_Type<Qt::CaseSensitivity> rb_cQtCaseSensitivity =
134
+ // RubyQt6::QtCore::Qt::CaseSensitivity
135
+ define_qenum_under<Qt::CaseSensitivity>(rb_mQt, "CaseSensitivity");
136
+ define_qenum_value_under(rb_cQtCaseSensitivity, "CaseInsensitive", Qt::CaseSensitivity::CaseInsensitive);
137
+ define_qenum_value_under(rb_cQtCaseSensitivity, "CaseSensitive", Qt::CaseSensitivity::CaseSensitive);
138
+
139
+ Data_Type<Qt::CheckState> rb_cQtCheckState =
140
+ // RubyQt6::QtCore::Qt::CheckState
141
+ define_qenum_under<Qt::CheckState>(rb_mQt, "CheckState");
142
+ define_qenum_value_under(rb_cQtCheckState, "Unchecked", Qt::CheckState::Unchecked);
143
+ define_qenum_value_under(rb_cQtCheckState, "PartiallyChecked", Qt::CheckState::PartiallyChecked);
144
+ define_qenum_value_under(rb_cQtCheckState, "Checked", Qt::CheckState::Checked);
145
+
146
+ Data_Type<Qt::ChecksumType> rb_cQtChecksumType =
147
+ // RubyQt6::QtCore::Qt::ChecksumType
148
+ define_qenum_under<Qt::ChecksumType>(rb_mQt, "ChecksumType");
149
+ define_qenum_value_under(rb_cQtChecksumType, "ChecksumIso3309", Qt::ChecksumType::ChecksumIso3309);
150
+ define_qenum_value_under(rb_cQtChecksumType, "ChecksumItuV41", Qt::ChecksumType::ChecksumItuV41);
151
+
152
+ Data_Type<Qt::ClipOperation> rb_cQtClipOperation =
153
+ // RubyQt6::QtCore::Qt::ClipOperation
154
+ define_qenum_under<Qt::ClipOperation>(rb_mQt, "ClipOperation");
155
+ define_qenum_value_under(rb_cQtClipOperation, "NoClip", Qt::ClipOperation::NoClip);
156
+ define_qenum_value_under(rb_cQtClipOperation, "ReplaceClip", Qt::ClipOperation::ReplaceClip);
157
+ define_qenum_value_under(rb_cQtClipOperation, "IntersectClip", Qt::ClipOperation::IntersectClip);
158
+
159
+ Data_Type<Qt::ColorScheme> rb_cQtColorScheme =
160
+ // RubyQt6::QtCore::Qt::ColorScheme
161
+ define_qenum_under<Qt::ColorScheme>(rb_mQt, "ColorScheme");
162
+ define_qenum_value_under(rb_cQtColorScheme, "Unknown", Qt::ColorScheme::Unknown);
163
+ define_qenum_value_under(rb_cQtColorScheme, "Light", Qt::ColorScheme::Light);
164
+ define_qenum_value_under(rb_cQtColorScheme, "Dark", Qt::ColorScheme::Dark);
165
+
166
+ Data_Type<Qt::ConnectionType> rb_cQtConnectionType =
167
+ // RubyQt6::QtCore::Qt::ConnectionType
168
+ define_qenum_under<Qt::ConnectionType>(rb_mQt, "ConnectionType");
169
+ define_qenum_value_under(rb_cQtConnectionType, "AutoConnection", Qt::ConnectionType::AutoConnection);
170
+ define_qenum_value_under(rb_cQtConnectionType, "DirectConnection", Qt::ConnectionType::DirectConnection);
171
+ define_qenum_value_under(rb_cQtConnectionType, "QueuedConnection", Qt::ConnectionType::QueuedConnection);
172
+ define_qenum_value_under(rb_cQtConnectionType, "BlockingQueuedConnection", Qt::ConnectionType::BlockingQueuedConnection);
173
+ define_qenum_value_under(rb_cQtConnectionType, "UniqueConnection", Qt::ConnectionType::UniqueConnection);
174
+ define_qenum_value_under(rb_cQtConnectionType, "SingleShotConnection", Qt::ConnectionType::SingleShotConnection);
175
+
176
+ Data_Type<Qt::ContextMenuPolicy> rb_cQtContextMenuPolicy =
177
+ // RubyQt6::QtCore::Qt::ContextMenuPolicy
178
+ define_qenum_under<Qt::ContextMenuPolicy>(rb_mQt, "ContextMenuPolicy");
179
+ define_qenum_value_under(rb_cQtContextMenuPolicy, "NoContextMenu", Qt::ContextMenuPolicy::NoContextMenu);
180
+ define_qenum_value_under(rb_cQtContextMenuPolicy, "DefaultContextMenu", Qt::ContextMenuPolicy::DefaultContextMenu);
181
+ define_qenum_value_under(rb_cQtContextMenuPolicy, "ActionsContextMenu", Qt::ContextMenuPolicy::ActionsContextMenu);
182
+ define_qenum_value_under(rb_cQtContextMenuPolicy, "CustomContextMenu", Qt::ContextMenuPolicy::CustomContextMenu);
183
+ define_qenum_value_under(rb_cQtContextMenuPolicy, "PreventContextMenu", Qt::ContextMenuPolicy::PreventContextMenu);
184
+
185
+ Data_Type<Qt::ContextMenuTrigger> rb_cQtContextMenuTrigger =
186
+ // RubyQt6::QtCore::Qt::ContextMenuTrigger
187
+ define_qenum_under<Qt::ContextMenuTrigger>(rb_mQt, "ContextMenuTrigger");
188
+ define_qenum_value_under(rb_cQtContextMenuTrigger, "Press", Qt::ContextMenuTrigger::Press);
189
+ define_qenum_value_under(rb_cQtContextMenuTrigger, "Release", Qt::ContextMenuTrigger::Release);
190
+
191
+ Data_Type<Qt::CoordinateSystem> rb_cQtCoordinateSystem =
192
+ // RubyQt6::QtCore::Qt::CoordinateSystem
193
+ define_qenum_under<Qt::CoordinateSystem>(rb_mQt, "CoordinateSystem");
194
+ define_qenum_value_under(rb_cQtCoordinateSystem, "DeviceCoordinates", Qt::CoordinateSystem::DeviceCoordinates);
195
+ define_qenum_value_under(rb_cQtCoordinateSystem, "LogicalCoordinates", Qt::CoordinateSystem::LogicalCoordinates);
196
+
197
+ Data_Type<Qt::Corner> rb_cQtCorner =
198
+ // RubyQt6::QtCore::Qt::Corner
199
+ define_qenum_under<Qt::Corner>(rb_mQt, "Corner");
200
+ define_qenum_value_under(rb_cQtCorner, "TopLeftCorner", Qt::Corner::TopLeftCorner);
201
+ define_qenum_value_under(rb_cQtCorner, "TopRightCorner", Qt::Corner::TopRightCorner);
202
+ define_qenum_value_under(rb_cQtCorner, "BottomLeftCorner", Qt::Corner::BottomLeftCorner);
203
+ define_qenum_value_under(rb_cQtCorner, "BottomRightCorner", Qt::Corner::BottomRightCorner);
204
+
205
+ Data_Type<Qt::CursorMoveStyle> rb_cQtCursorMoveStyle =
206
+ // RubyQt6::QtCore::Qt::CursorMoveStyle
207
+ define_qenum_under<Qt::CursorMoveStyle>(rb_mQt, "CursorMoveStyle");
208
+ define_qenum_value_under(rb_cQtCursorMoveStyle, "LogicalMoveStyle", Qt::CursorMoveStyle::LogicalMoveStyle);
209
+ define_qenum_value_under(rb_cQtCursorMoveStyle, "VisualMoveStyle", Qt::CursorMoveStyle::VisualMoveStyle);
210
+
211
+ Data_Type<Qt::CursorShape> rb_cQtCursorShape =
212
+ // RubyQt6::QtCore::Qt::CursorShape
213
+ define_qenum_under<Qt::CursorShape>(rb_mQt, "CursorShape");
214
+ define_qenum_value_under(rb_cQtCursorShape, "ArrowCursor", Qt::CursorShape::ArrowCursor);
215
+ define_qenum_value_under(rb_cQtCursorShape, "UpArrowCursor", Qt::CursorShape::UpArrowCursor);
216
+ define_qenum_value_under(rb_cQtCursorShape, "CrossCursor", Qt::CursorShape::CrossCursor);
217
+ define_qenum_value_under(rb_cQtCursorShape, "WaitCursor", Qt::CursorShape::WaitCursor);
218
+ define_qenum_value_under(rb_cQtCursorShape, "IBeamCursor", Qt::CursorShape::IBeamCursor);
219
+ define_qenum_value_under(rb_cQtCursorShape, "SizeVerCursor", Qt::CursorShape::SizeVerCursor);
220
+ define_qenum_value_under(rb_cQtCursorShape, "SizeHorCursor", Qt::CursorShape::SizeHorCursor);
221
+ define_qenum_value_under(rb_cQtCursorShape, "SizeBDiagCursor", Qt::CursorShape::SizeBDiagCursor);
222
+ define_qenum_value_under(rb_cQtCursorShape, "SizeFDiagCursor", Qt::CursorShape::SizeFDiagCursor);
223
+ define_qenum_value_under(rb_cQtCursorShape, "SizeAllCursor", Qt::CursorShape::SizeAllCursor);
224
+ define_qenum_value_under(rb_cQtCursorShape, "BlankCursor", Qt::CursorShape::BlankCursor);
225
+ define_qenum_value_under(rb_cQtCursorShape, "SplitVCursor", Qt::CursorShape::SplitVCursor);
226
+ define_qenum_value_under(rb_cQtCursorShape, "SplitHCursor", Qt::CursorShape::SplitHCursor);
227
+ define_qenum_value_under(rb_cQtCursorShape, "PointingHandCursor", Qt::CursorShape::PointingHandCursor);
228
+ define_qenum_value_under(rb_cQtCursorShape, "ForbiddenCursor", Qt::CursorShape::ForbiddenCursor);
229
+ define_qenum_value_under(rb_cQtCursorShape, "WhatsThisCursor", Qt::CursorShape::WhatsThisCursor);
230
+ define_qenum_value_under(rb_cQtCursorShape, "BusyCursor", Qt::CursorShape::BusyCursor);
231
+ define_qenum_value_under(rb_cQtCursorShape, "OpenHandCursor", Qt::CursorShape::OpenHandCursor);
232
+ define_qenum_value_under(rb_cQtCursorShape, "ClosedHandCursor", Qt::CursorShape::ClosedHandCursor);
233
+ define_qenum_value_under(rb_cQtCursorShape, "DragCopyCursor", Qt::CursorShape::DragCopyCursor);
234
+ define_qenum_value_under(rb_cQtCursorShape, "DragMoveCursor", Qt::CursorShape::DragMoveCursor);
235
+ define_qenum_value_under(rb_cQtCursorShape, "DragLinkCursor", Qt::CursorShape::DragLinkCursor);
236
+ define_qenum_value_under(rb_cQtCursorShape, "LastCursor", Qt::CursorShape::LastCursor);
237
+ define_qenum_value_under(rb_cQtCursorShape, "BitmapCursor", Qt::CursorShape::BitmapCursor);
238
+ define_qenum_value_under(rb_cQtCursorShape, "CustomCursor", Qt::CursorShape::CustomCursor);
239
+
240
+ Data_Type<Qt::DateFormat> rb_cQtDateFormat =
241
+ // RubyQt6::QtCore::Qt::DateFormat
242
+ define_qenum_under<Qt::DateFormat>(rb_mQt, "DateFormat");
243
+ define_qenum_value_under(rb_cQtDateFormat, "TextDate", Qt::DateFormat::TextDate);
244
+ define_qenum_value_under(rb_cQtDateFormat, "ISODate", Qt::DateFormat::ISODate);
245
+ define_qenum_value_under(rb_cQtDateFormat, "RFC2822Date", Qt::DateFormat::RFC2822Date);
246
+ define_qenum_value_under(rb_cQtDateFormat, "ISODateWithMs", Qt::DateFormat::ISODateWithMs);
247
+
248
+ Data_Type<Qt::DayOfWeek> rb_cQtDayOfWeek =
249
+ // RubyQt6::QtCore::Qt::DayOfWeek
250
+ define_qenum_under<Qt::DayOfWeek>(rb_mQt, "DayOfWeek");
251
+ define_qenum_value_under(rb_cQtDayOfWeek, "Monday", Qt::DayOfWeek::Monday);
252
+ define_qenum_value_under(rb_cQtDayOfWeek, "Tuesday", Qt::DayOfWeek::Tuesday);
253
+ define_qenum_value_under(rb_cQtDayOfWeek, "Wednesday", Qt::DayOfWeek::Wednesday);
254
+ define_qenum_value_under(rb_cQtDayOfWeek, "Thursday", Qt::DayOfWeek::Thursday);
255
+ define_qenum_value_under(rb_cQtDayOfWeek, "Friday", Qt::DayOfWeek::Friday);
256
+ define_qenum_value_under(rb_cQtDayOfWeek, "Saturday", Qt::DayOfWeek::Saturday);
257
+ define_qenum_value_under(rb_cQtDayOfWeek, "Sunday", Qt::DayOfWeek::Sunday);
258
+
259
+ Data_Type<Qt::DockWidgetArea> rb_cQtDockWidgetArea =
260
+ // RubyQt6::QtCore::Qt::DockWidgetArea
261
+ define_qenum_under<Qt::DockWidgetArea>(rb_mQt, "DockWidgetArea");
262
+ define_qenum_value_under(rb_cQtDockWidgetArea, "LeftDockWidgetArea", Qt::DockWidgetArea::LeftDockWidgetArea);
263
+ define_qenum_value_under(rb_cQtDockWidgetArea, "RightDockWidgetArea", Qt::DockWidgetArea::RightDockWidgetArea);
264
+ define_qenum_value_under(rb_cQtDockWidgetArea, "TopDockWidgetArea", Qt::DockWidgetArea::TopDockWidgetArea);
265
+ define_qenum_value_under(rb_cQtDockWidgetArea, "BottomDockWidgetArea", Qt::DockWidgetArea::BottomDockWidgetArea);
266
+ define_qenum_value_under(rb_cQtDockWidgetArea, "DockWidgetArea_Mask", Qt::DockWidgetArea::DockWidgetArea_Mask);
267
+ define_qenum_value_under(rb_cQtDockWidgetArea, "AllDockWidgetAreas", Qt::DockWidgetArea::AllDockWidgetAreas);
268
+ define_qenum_value_under(rb_cQtDockWidgetArea, "NoDockWidgetArea", Qt::DockWidgetArea::NoDockWidgetArea);
269
+
270
+ Data_Type<Qt::DockWidgetAreaSizes> rb_cQtDockWidgetAreaSizes =
271
+ // RubyQt6::QtCore::Qt::DockWidgetAreaSizes
272
+ define_qenum_under<Qt::DockWidgetAreaSizes>(rb_mQt, "DockWidgetAreaSizes");
273
+ define_qenum_value_under(rb_cQtDockWidgetAreaSizes, "NDockWidgetAreas", Qt::DockWidgetAreaSizes::NDockWidgetAreas);
274
+
275
+ Data_Type<Qt::DropAction> rb_cQtDropAction =
276
+ // RubyQt6::QtCore::Qt::DropAction
277
+ define_qenum_under<Qt::DropAction>(rb_mQt, "DropAction");
278
+ define_qenum_value_under(rb_cQtDropAction, "CopyAction", Qt::DropAction::CopyAction);
279
+ define_qenum_value_under(rb_cQtDropAction, "MoveAction", Qt::DropAction::MoveAction);
280
+ define_qenum_value_under(rb_cQtDropAction, "LinkAction", Qt::DropAction::LinkAction);
281
+ define_qenum_value_under(rb_cQtDropAction, "ActionMask", Qt::DropAction::ActionMask);
282
+ define_qenum_value_under(rb_cQtDropAction, "TargetMoveAction", Qt::DropAction::TargetMoveAction);
283
+ define_qenum_value_under(rb_cQtDropAction, "IgnoreAction", Qt::DropAction::IgnoreAction);
284
+
285
+ Data_Type<Qt::Edge> rb_cQtEdge =
286
+ // RubyQt6::QtCore::Qt::Edge
287
+ define_qenum_under<Qt::Edge>(rb_mQt, "Edge");
288
+ define_qenum_value_under(rb_cQtEdge, "TopEdge", Qt::Edge::TopEdge);
289
+ define_qenum_value_under(rb_cQtEdge, "LeftEdge", Qt::Edge::LeftEdge);
290
+ define_qenum_value_under(rb_cQtEdge, "RightEdge", Qt::Edge::RightEdge);
291
+ define_qenum_value_under(rb_cQtEdge, "BottomEdge", Qt::Edge::BottomEdge);
292
+
293
+ Data_Type<Qt::EnterKeyType> rb_cQtEnterKeyType =
294
+ // RubyQt6::QtCore::Qt::EnterKeyType
295
+ define_qenum_under<Qt::EnterKeyType>(rb_mQt, "EnterKeyType");
296
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeyDefault", Qt::EnterKeyType::EnterKeyDefault);
297
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeyReturn", Qt::EnterKeyType::EnterKeyReturn);
298
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeyDone", Qt::EnterKeyType::EnterKeyDone);
299
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeyGo", Qt::EnterKeyType::EnterKeyGo);
300
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeySend", Qt::EnterKeyType::EnterKeySend);
301
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeySearch", Qt::EnterKeyType::EnterKeySearch);
302
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeyNext", Qt::EnterKeyType::EnterKeyNext);
303
+ define_qenum_value_under(rb_cQtEnterKeyType, "EnterKeyPrevious", Qt::EnterKeyType::EnterKeyPrevious);
304
+
305
+ Data_Type<Qt::EventPriority> rb_cQtEventPriority =
306
+ // RubyQt6::QtCore::Qt::EventPriority
307
+ define_qenum_under<Qt::EventPriority>(rb_mQt, "EventPriority");
308
+ define_qenum_value_under(rb_cQtEventPriority, "HighEventPriority", Qt::EventPriority::HighEventPriority);
309
+ define_qenum_value_under(rb_cQtEventPriority, "NormalEventPriority", Qt::EventPriority::NormalEventPriority);
310
+ define_qenum_value_under(rb_cQtEventPriority, "LowEventPriority", Qt::EventPriority::LowEventPriority);
311
+
312
+ Data_Type<Qt::FillRule> rb_cQtFillRule =
313
+ // RubyQt6::QtCore::Qt::FillRule
314
+ define_qenum_under<Qt::FillRule>(rb_mQt, "FillRule");
315
+ define_qenum_value_under(rb_cQtFillRule, "OddEvenFill", Qt::FillRule::OddEvenFill);
316
+ define_qenum_value_under(rb_cQtFillRule, "WindingFill", Qt::FillRule::WindingFill);
317
+
318
+ Data_Type<Qt::FindChildOption> rb_cQtFindChildOption =
319
+ // RubyQt6::QtCore::Qt::FindChildOption
320
+ define_qenum_under<Qt::FindChildOption>(rb_mQt, "FindChildOption");
321
+ define_qenum_value_under(rb_cQtFindChildOption, "FindDirectChildrenOnly", Qt::FindChildOption::FindDirectChildrenOnly);
322
+ define_qenum_value_under(rb_cQtFindChildOption, "FindChildrenRecursively", Qt::FindChildOption::FindChildrenRecursively);
323
+
324
+ Data_Type<Qt::FocusPolicy> rb_cQtFocusPolicy =
325
+ // RubyQt6::QtCore::Qt::FocusPolicy
326
+ define_qenum_under<Qt::FocusPolicy>(rb_mQt, "FocusPolicy");
327
+ define_qenum_value_under(rb_cQtFocusPolicy, "NoFocus", Qt::FocusPolicy::NoFocus);
328
+ define_qenum_value_under(rb_cQtFocusPolicy, "TabFocus", Qt::FocusPolicy::TabFocus);
329
+ define_qenum_value_under(rb_cQtFocusPolicy, "ClickFocus", Qt::FocusPolicy::ClickFocus);
330
+ define_qenum_value_under(rb_cQtFocusPolicy, "StrongFocus", Qt::FocusPolicy::StrongFocus);
331
+ define_qenum_value_under(rb_cQtFocusPolicy, "WheelFocus", Qt::FocusPolicy::WheelFocus);
332
+
333
+ Data_Type<Qt::FocusReason> rb_cQtFocusReason =
334
+ // RubyQt6::QtCore::Qt::FocusReason
335
+ define_qenum_under<Qt::FocusReason>(rb_mQt, "FocusReason");
336
+ define_qenum_value_under(rb_cQtFocusReason, "MouseFocusReason", Qt::FocusReason::MouseFocusReason);
337
+ define_qenum_value_under(rb_cQtFocusReason, "TabFocusReason", Qt::FocusReason::TabFocusReason);
338
+ define_qenum_value_under(rb_cQtFocusReason, "BacktabFocusReason", Qt::FocusReason::BacktabFocusReason);
339
+ define_qenum_value_under(rb_cQtFocusReason, "ActiveWindowFocusReason", Qt::FocusReason::ActiveWindowFocusReason);
340
+ define_qenum_value_under(rb_cQtFocusReason, "PopupFocusReason", Qt::FocusReason::PopupFocusReason);
341
+ define_qenum_value_under(rb_cQtFocusReason, "ShortcutFocusReason", Qt::FocusReason::ShortcutFocusReason);
342
+ define_qenum_value_under(rb_cQtFocusReason, "MenuBarFocusReason", Qt::FocusReason::MenuBarFocusReason);
343
+ define_qenum_value_under(rb_cQtFocusReason, "OtherFocusReason", Qt::FocusReason::OtherFocusReason);
344
+ define_qenum_value_under(rb_cQtFocusReason, "NoFocusReason", Qt::FocusReason::NoFocusReason);
345
+ }
@@ -0,0 +1,4 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+
4
+ void Init_qt_enum_af(Rice::Module rb_mQt6QtCore);