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,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qline.html
6
+ class QLine
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QLine]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(x1, y1, x2, y2)
15
+ # @param x1 [Integer]
16
+ # @param y1 [Integer]
17
+ # @param x2 [Integer]
18
+ # @param y2 [Integer]
19
+ #
20
+ # @overload initialize(p1, p2)
21
+ # @param p1 [QPoint]
22
+ # @param p2 [QPoint]
23
+ def initialize(*args)
24
+ case args.size
25
+ when 4 then _initialize(*args.map(&:to_i))
26
+ else _initialize(*args)
27
+ end
28
+ end
29
+
30
+ # @!visibility private
31
+ def ==(other)
32
+ return false unless other.is_a?(QtCore::QLine) || other.is_a?(QtCore::QLineF)
33
+ self.class._operator_equal(self, other)
34
+ end
35
+
36
+ # @!visibility private
37
+ def inspect
38
+ T.inspect_struct(self, x1:, y1:, x2:, y2:)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qlinef.html
6
+ class QLineF
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QLineF]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(x1, y1, x2, y2)
15
+ # @param x1 [Float]
16
+ # @param y1 [Float]
17
+ # @param x2 [Float]
18
+ # @param y2 [Float]
19
+ #
20
+ # @overload initialize(p1, p2)
21
+ # @param p1 [QPointF]
22
+ # @param p2 [QPointF]
23
+ #
24
+ # @overload initialize(line)
25
+ # @param line [QLine]
26
+ def initialize(*args)
27
+ _initialize(*args)
28
+ end
29
+
30
+ # @!visibility private
31
+ def ==(other)
32
+ return false unless other.is_a?(QtCore::QLine) || other.is_a?(QtCore::QLineF)
33
+ self.class._operator_equal(self, other)
34
+ end
35
+
36
+ # @!visibility private
37
+ def inspect
38
+ T.inspect_struct(self, x1:, y1:, x2:, y2:)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qlocale.html
6
+ class QLocale
7
+ # @!parse class Language ; end
8
+ # @!parse class Script ; end
9
+ # @!parse class Country ; end
10
+ # @!parse class MeasurementSystem ; end
11
+ # @!parse class FormatType ; end
12
+ # @!parse class NumberOption ; end
13
+ # @!parse class NumberOptions ; end
14
+ # @!parse class FloatingPointPrecisionOption; end
15
+ # @!parse class TagSeparator ; end
16
+ # @!parse class CurrencySymbolFormat ; end
17
+ # @!parse class DataSizeFormat ; end
18
+ # @!parse class DataSizeFormats ; end
19
+ # @!parse class LanguageCodeType ; end
20
+ # @!parse class LanguageCodeTypes ; end
21
+ # @!parse class QuotationStyle ; end
22
+ rubyqt6_declare_enum_under QLocale, QLocale::Language
23
+ rubyqt6_declare_enum_under QLocale, QLocale::Script
24
+ rubyqt6_declare_enum_under QLocale, QLocale::Country
25
+ rubyqt6_declare_enum_under QLocale, QLocale::MeasurementSystem
26
+ rubyqt6_declare_enum_under QLocale, QLocale::FormatType
27
+ rubyqt6_declare_enum_under QLocale, QLocale::NumberOption
28
+ rubyqt6_declare_enum_under QLocale, QLocale::FloatingPointPrecisionOption
29
+ rubyqt6_declare_enum_under QLocale, QLocale::TagSeparator
30
+ rubyqt6_declare_enum_under QLocale, QLocale::CurrencySymbolFormat
31
+ rubyqt6_declare_enum_under QLocale, QLocale::DataSizeFormat
32
+ rubyqt6_declare_enum_under QLocale, QLocale::LanguageCodeType
33
+ rubyqt6_declare_enum_under QLocale, QLocale::QuotationStyle
34
+ rubyqt6_declare_qflags QLocale::NumberOptions, QLocale::NumberOption
35
+ rubyqt6_declare_qflags QLocale::DataSizeFormats, QLocale::DataSizeFormat
36
+ rubyqt6_declare_qflags QLocale::LanguageCodeTypes, QLocale::LanguageCodeType
37
+
38
+ # @!visibility private
39
+ def inspect
40
+ T.inspect_struct(self, name: name.to_s)
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmargins.html
6
+ class QMargins
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QMargins]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(left, top, right, bottom)
15
+ # @param left [Integer]
16
+ # @param top [Integer]
17
+ # @param right [Integer]
18
+ # @param bottom [Integer]
19
+ def initialize(*args)
20
+ case args.size
21
+ when 4 then _initialize(*args.map(&:to_i))
22
+ else _initialize(*args)
23
+ end
24
+ end
25
+
26
+ # @!visibility private
27
+ def ==(other)
28
+ return false unless other.is_a?(QtCore::QMargins) || other.is_a?(QtCore::QMarginsF)
29
+ self.class._operator_equal(self, other)
30
+ end
31
+
32
+ # @!visibility private
33
+ def inspect
34
+ T.inspect_struct(self, left:, top:, right:, bottom:)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmarginsf.html
6
+ class QMarginsF
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QMarginsF]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(left, top, right, bottom)
15
+ # @param left [Float]
16
+ # @param top [Float]
17
+ # @param right [Float]
18
+ # @param bottom [Float]
19
+ #
20
+ # @overload initialize(margins)
21
+ # @param margins [QMargins]
22
+ def initialize(*args)
23
+ _initialize(*args)
24
+ end
25
+
26
+ # @!visibility private
27
+ def ==(other)
28
+ return false unless other.is_a?(QtCore::QMargins) || other.is_a?(QtCore::QMarginsF)
29
+ self.class._operator_equal(self, other)
30
+ end
31
+
32
+ # @!visibility private
33
+ def inspect
34
+ T.inspect_struct(self, left:, top:, right:, bottom:)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmetaclassinfo.html
6
+ class QMetaClassInfo
7
+ # @!visibility private
8
+ def inspect
9
+ T.inspect_struct(self, name: name.to_s, value: value.to_s)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmetamethod.html
6
+ class QMetaMethod
7
+ # @!parse class Access ; end
8
+ # @!parse class Attributes; end
9
+ # @!parse class MethodType; end
10
+ rubyqt6_declare_enum_under QMetaMethod, QMetaMethod::Access
11
+ rubyqt6_declare_enum_under QMetaMethod, QMetaMethod::Attributes
12
+ rubyqt6_declare_enum_under QMetaMethod, QMetaMethod::MethodType
13
+
14
+ # @!visibility private
15
+ def inspect
16
+ T.inspect_struct(self, type: method_type.to_s, signature: method_signature.to_s)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @!visibility private
6
+ class QMetaMethodBuilder
7
+ def set_return_type(value)
8
+ _set_return_type(T.to_qbytearray(value))
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmetaobject.html
6
+ class QMetaObject
7
+ # @see https://doc.qt.io/qt-6/qmetaobject-connection.html
8
+ class Connection
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @!visibility private
6
+ class QMetaObjectBuilder
7
+ alias_method :_initialize, :initialize
8
+
9
+ def initialize
10
+ _initialize
11
+ end
12
+
13
+ def add_class_info(name, value)
14
+ _add_class_info(T.to_qbytearray(name), T.to_qbytearray(value))
15
+ end
16
+
17
+ def add_signal(signature)
18
+ _add_signal(T.to_qbytearray(signature))
19
+ end
20
+
21
+ def add_slot(signature)
22
+ _add_slot(T.to_qbytearray(signature))
23
+ end
24
+
25
+ def set_class_name(name)
26
+ _set_class_name(T.to_qbytearray(name))
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmetatype.html
6
+ class QMetaType
7
+ # @!parse class Type; end
8
+ rubyqt6_declare_enum_under QMetaType, QMetaType::Type
9
+
10
+ # @!visibility private
11
+ alias_method :_initialize, :initialize
12
+
13
+ # @!visibility private
14
+ def self.infer(o)
15
+ k = o.class
16
+ k.respond_to?(:default_qmetatype) ? k.default_qmetatype : raise("Could not infer qmetatype")
17
+ end
18
+
19
+ # @param type_id [Integer]
20
+ # @return [QMetaType]
21
+ def initialize(type_id)
22
+ _initialize(type_id)
23
+ end
24
+
25
+ # @!visibility private
26
+ def inspect
27
+ T.inspect_struct(self, id:, name:)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qmodelindex.html
6
+ class QModelIndex
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QModelIndex]
11
+ def initialize
12
+ _initialize
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,103 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qobject.html
6
+ class QObject
7
+ # @!visibility private
8
+ def self.q_object(&blk)
9
+ if !name.start_with?("RubyQt6::")
10
+ if !superclass.name.start_with?("RubyQt6::Bando::")
11
+ raise "Invalid superclass: macro `q_object` only available for subclass of RubyQt6::Bando::<...>"
12
+ end
13
+ end
14
+
15
+ mo = QtCore::Private::MetaObject.new(self)
16
+ mo.instance_exec(&blk)
17
+
18
+ metamethods = mo.metamethods.sort_by { |meth| [meth.name, meth.parameters.size] }
19
+ metamethods.each do |meth|
20
+ if meth.signal?
21
+ define_method(meth.name) do
22
+ QtCore::Private::Signal.new(self, meth)
23
+ end
24
+ elsif meth.slot? && mo.ruby?
25
+ define_method(meth.qsignature_name) do |*args|
26
+ r = __send__(meth.name, *args.map(&:value))
27
+ next if meth.return_type.nil?
28
+
29
+ qmetatype = QtCore::QMetaType.from_name(meth.return_type)
30
+ QtCore::QVariant.new(r, qmetatype)
31
+ end
32
+ end
33
+ end
34
+
35
+ @_rubyqt6_metaobject = mo
36
+ define_singleton_method("_rubyqt6_metaobject") do
37
+ @_rubyqt6_metaobject
38
+ end
39
+
40
+ @_qmetaobject = mo.to_qmetaobject
41
+ define_singleton_method("_qmetaobject") do
42
+ @_qmetaobject
43
+ end
44
+
45
+ nil
46
+ end
47
+
48
+ # @!parse
49
+ q_object do
50
+ signal "destroyed(QObject*)"
51
+ signal "destroyed()"
52
+ signal "objectNameChanged(QString)"
53
+ slot "deleteLater()"
54
+ end
55
+
56
+ # @!visibility private
57
+ alias_method :_initialize, :initialize
58
+
59
+ # @param parent [QObject]
60
+ # @return [QObject]
61
+ def initialize(parent = nil)
62
+ _initialize(parent)
63
+ _take_ownership_from_ruby(self)
64
+ end
65
+
66
+ # @!visibility private
67
+ def children
68
+ _children.map { |child| T.bando_qobject_cast(child) }
69
+ end
70
+
71
+ # @!visibility private
72
+ def find_child(name, options = nil)
73
+ options ||= QtCore::Qt::FindChildrenRecursively
74
+ child = _find_child(T.to_qanystringview(name), T.to_qflags(options))
75
+ T.bando_qobject_cast(child)
76
+ end
77
+
78
+ # @!visibility private
79
+ def find_children(name, options = nil)
80
+ options ||= QtCore::Qt::FindChildrenRecursively
81
+ children = _find_children(T.to_qanystringview(name), T.to_qflags(options))
82
+ children.map { |child| T.bando_qobject_cast(child) }
83
+ end
84
+
85
+ # @!visibility private
86
+ def parent
87
+ T.bando_qobject_cast(_parent)
88
+ end
89
+
90
+ # @!visibility private
91
+ def tr(source_text, disambiguation = "", n = -1)
92
+ context = self.class.name
93
+ QtCore::QCoreApplication.translate(context, source_text, disambiguation, n)
94
+ end
95
+
96
+ private
97
+
98
+ def _take_ownership_from_ruby(object)
99
+ self.class._take_ownership_from_ruby(object)
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qpoint.html
6
+ class QPoint
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QPoint]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(xpos, ypos)
15
+ # @param xpos [Integer]
16
+ # @param ypos [Integer]
17
+ def initialize(*args)
18
+ case args.size
19
+ when 2 then _initialize(*args.map(&:to_i))
20
+ else _initialize(*args)
21
+ end
22
+ end
23
+
24
+ # @!visibility private
25
+ def ==(other)
26
+ return false unless other.is_a?(QtCore::QPoint) || other.is_a?(QtCore::QPointF)
27
+ self.class._operator_equal(self, other)
28
+ end
29
+
30
+ # @!visibility private
31
+ def inspect
32
+ T.inspect_struct(self, x:, y:)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qpointf.html
6
+ class QPointF
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QPointF]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(xpos, ypos)
15
+ # @param xpos [Float]
16
+ # @param ypos [Float]
17
+ #
18
+ # @overload initialize(point)
19
+ # @param point [QPoint]
20
+ def initialize(*args)
21
+ _initialize(*args)
22
+ end
23
+
24
+ # @!visibility private
25
+ def ==(other)
26
+ return false unless other.is_a?(QtCore::QPoint) || other.is_a?(QtCore::QPointF)
27
+ self.class._operator_equal(self, other)
28
+ end
29
+
30
+ # @!visibility private
31
+ def inspect
32
+ T.inspect_struct(self, x:, y:)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qrect.html
6
+ class QRect
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QRect]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(x, y, width, height)
15
+ # @param x [Integer]
16
+ # @param y [Integer]
17
+ # @param width [Integer]
18
+ # @param height [Integer]
19
+ #
20
+ # @overload initialize(top_left, bottom_right)
21
+ # @param top_left [QPoint]
22
+ # @param bottom_right [QPoint]
23
+ #
24
+ # @overload initialize(top_left, size)
25
+ # @param top_left [QPoint]
26
+ # @param size [QSize]
27
+ def initialize(*args)
28
+ case args.size
29
+ when 4 then _initialize(*args.map(&:to_i))
30
+ else _initialize(*args)
31
+ end
32
+ end
33
+
34
+ # @!visibility private
35
+ def ==(other)
36
+ return false unless other.is_a?(QtCore::QRect) || other.is_a?(QtCore::QRectF)
37
+ self.class._operator_equal(self, other)
38
+ end
39
+
40
+ # @!visibility private
41
+ def inspect
42
+ T.inspect_struct(self, x:, y:, width:, height:)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qrectf.html
6
+ class QRectF
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QRectF]
11
+ #
12
+ # @overload initialize
13
+ #
14
+ # @overload initialize(x, y, width, height)
15
+ # @param x [Float]
16
+ # @param y [Float]
17
+ # @param width [Float]
18
+ # @param height [Float]
19
+ #
20
+ # @overload initialize(top_left, bottom_right)
21
+ # @param top_left [QPointF]
22
+ # @param bottom_right [QPointF]
23
+ #
24
+ # @overload initialize(top_left, size)
25
+ # @param top_left [QPointF]
26
+ # @param size [QSizeF]
27
+ #
28
+ # @overload initialize(rect)
29
+ # @param rect [QRect]
30
+ def initialize(*args)
31
+ _initialize(*args)
32
+ end
33
+
34
+ # @!visibility private
35
+ def ==(other)
36
+ return false unless other.is_a?(QtCore::QRect) || other.is_a?(QtCore::QRectF)
37
+ self.class._operator_equal(self, other)
38
+ end
39
+
40
+ # @!visibility private
41
+ def inspect
42
+ T.inspect_struct(self, x:, y:, width:, height:)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qregularexpression.html
6
+ class QRegularExpression
7
+ # @!parse class PatternOption ; end
8
+ # @!parse class MatchType ; end
9
+ # @!parse class MatchOption ; end
10
+ # @!parse class WildcardConversionOption ; end
11
+ # @!parse class PatternOptions ; end
12
+ # @!parse class MatchOptions ; end
13
+ # @!parse class WildcardConversionOptions; end
14
+ rubyqt6_declare_enum_under QRegularExpression, QRegularExpression::PatternOption
15
+ rubyqt6_declare_enum_under QRegularExpression, QRegularExpression::MatchType
16
+ rubyqt6_declare_enum_under QRegularExpression, QRegularExpression::MatchOption
17
+ rubyqt6_declare_enum_under QRegularExpression, QRegularExpression::WildcardConversionOption
18
+ rubyqt6_declare_qflags QRegularExpression::PatternOptions, QRegularExpression::PatternOption
19
+ rubyqt6_declare_qflags QRegularExpression::MatchOptions, QRegularExpression::MatchOption
20
+ rubyqt6_declare_qflags QRegularExpression::WildcardConversionOptions, QRegularExpression::WildcardConversionOption
21
+
22
+ # @!visibility private
23
+ alias_method :_initialize, :initialize
24
+
25
+ # @param pattern [String, QString]
26
+ # @param options [QRegularExpression::PatternOptions]
27
+ # @return [QRegularExpression]
28
+ def initialize(pattern = "", options = nil)
29
+ options ||= QRegularExpression::PatternOption::NoPatternOption
30
+ _initialize(T.to_qstr(pattern), T.to_qflags(options))
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyQt6
4
+ module QtCore
5
+ # @see https://doc.qt.io/qt-6/qregularexpressionmatch.html
6
+ class QRegularExpressionMatch
7
+ # @!visibility private
8
+ alias_method :_initialize, :initialize
9
+
10
+ # @return [QRegularExpressionMatch]
11
+ def initialize
12
+ _initialize
13
+ end
14
+ end
15
+ end
16
+ end