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.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/Rakefile +4 -0
  4. data/ext/qt6/qtcore/{bando-rb.cpp → bando-core-rb.cpp} +4 -2
  5. data/ext/qt6/qtcore/bando-core-rb.hpp +5 -0
  6. data/ext/qt6/qtcore/bando-qobject-rb.cpp +3 -3
  7. data/ext/qt6/qtcore/bando-qobject-rb.hpp +4 -3
  8. data/ext/qt6/qtcore/extconf.rb +4 -12
  9. data/ext/qt6/qtcore/qabstractitemmodel-rb.cpp +31 -31
  10. data/ext/qt6/qtcore/qabstractitemmodel-rb.hpp +4 -3
  11. data/ext/qt6/qtcore/qanystringview-rb.cpp +3 -3
  12. data/ext/qt6/qtcore/qanystringview-rb.hpp +4 -3
  13. data/ext/qt6/qtcore/qbasictimer-rb.cpp +3 -3
  14. data/ext/qt6/qtcore/qbasictimer-rb.hpp +4 -3
  15. data/ext/qt6/qtcore/qbytearray-rb.cpp +30 -3
  16. data/ext/qt6/qtcore/qbytearray-rb.hpp +4 -3
  17. data/ext/qt6/qtcore/qchar-rb.cpp +3 -3
  18. data/ext/qt6/qtcore/qchar-rb.hpp +4 -3
  19. data/ext/qt6/qtcore/qcoreapplication-rb.cpp +14 -14
  20. data/ext/qt6/qtcore/qcoreapplication-rb.hpp +4 -3
  21. data/ext/qt6/qtcore/qcoreevent-rb.cpp +6 -7
  22. data/ext/qt6/qtcore/qcoreevent-rb.hpp +4 -3
  23. data/ext/qt6/qtcore/qdatetime-rb.cpp +5 -5
  24. data/ext/qt6/qtcore/qdatetime-rb.hpp +4 -3
  25. data/ext/qt6/qtcore/qdir-rb.cpp +3 -3
  26. data/ext/qt6/qtcore/qdir-rb.hpp +4 -3
  27. data/ext/qt6/qtcore/qeventloop-rb.cpp +33 -0
  28. data/ext/qt6/qtcore/qeventloop-rb.hpp +5 -0
  29. data/ext/qt6/qtcore/qfile-rb.cpp +3 -3
  30. data/ext/qt6/qtcore/qfile-rb.hpp +4 -3
  31. data/ext/qt6/qtcore/qfiledevice-rb.cpp +3 -3
  32. data/ext/qt6/qtcore/qfiledevice-rb.hpp +4 -3
  33. data/ext/qt6/qtcore/qfileinfo-rb.cpp +3 -3
  34. data/ext/qt6/qtcore/qfileinfo-rb.hpp +4 -3
  35. data/ext/qt6/qtcore/qiodevice-rb.cpp +10 -10
  36. data/ext/qt6/qtcore/qiodevice-rb.hpp +4 -3
  37. data/ext/qt6/qtcore/qiodevicebase-rb.cpp +3 -3
  38. data/ext/qt6/qtcore/qiodevicebase-rb.hpp +4 -3
  39. data/ext/qt6/qtcore/qitemselection-rb.cpp +4 -4
  40. data/ext/qt6/qtcore/qitemselection-rb.hpp +4 -3
  41. data/ext/qt6/qtcore/qitemselectionmodel-rb.cpp +9 -9
  42. data/ext/qt6/qtcore/qitemselectionmodel-rb.hpp +4 -3
  43. data/ext/qt6/qtcore/qlibraryinfo-rb.cpp +3 -3
  44. data/ext/qt6/qtcore/qlibraryinfo-rb.hpp +4 -3
  45. data/ext/qt6/qtcore/qline-rb.cpp +4 -4
  46. data/ext/qt6/qtcore/qline-rb.hpp +4 -3
  47. data/ext/qt6/qtcore/qlocale-rb.cpp +3 -3
  48. data/ext/qt6/qtcore/qlocale-rb.hpp +4 -3
  49. data/ext/qt6/qtcore/qmargins-rb.cpp +4 -4
  50. data/ext/qt6/qtcore/qmargins-rb.hpp +4 -3
  51. data/ext/qt6/qtcore/qmetaclassinfo-rb.cpp +3 -3
  52. data/ext/qt6/qtcore/qmetaclassinfo-rb.hpp +4 -3
  53. data/ext/qt6/qtcore/qmetamethod-rb.cpp +3 -3
  54. data/ext/qt6/qtcore/qmetamethod-rb.hpp +4 -3
  55. data/ext/qt6/qtcore/qmetaobject-rb.cpp +4 -4
  56. data/ext/qt6/qtcore/qmetaobject-rb.hpp +4 -3
  57. data/ext/qt6/qtcore/qmetaobjectbuilder-rb.cpp +6 -6
  58. data/ext/qt6/qtcore/qmetaobjectbuilder-rb.hpp +4 -3
  59. data/ext/qt6/qtcore/qmetatype-rb.cpp +3 -3
  60. data/ext/qt6/qtcore/qmetatype-rb.hpp +4 -3
  61. data/ext/qt6/qtcore/qmimetype-rb.cpp +28 -0
  62. data/ext/qt6/qtcore/qmimetype-rb.hpp +5 -0
  63. data/ext/qt6/qtcore/qmodelindex-rb.cpp +3 -3
  64. data/ext/qt6/qtcore/qmodelindex-rb.hpp +4 -3
  65. data/ext/qt6/qtcore/qobject-rb.cpp +8 -8
  66. data/ext/qt6/qtcore/qobject-rb.hpp +4 -3
  67. data/ext/qt6/qtcore/qpoint-rb.cpp +4 -4
  68. data/ext/qt6/qtcore/qpoint-rb.hpp +4 -3
  69. data/ext/qt6/qtcore/qprocess-rb.cpp +123 -0
  70. data/ext/qt6/qtcore/qprocess-rb.hpp +5 -0
  71. data/ext/qt6/qtcore/qprocessenvironment-rb.cpp +32 -0
  72. data/ext/qt6/qtcore/qprocessenvironment-rb.hpp +5 -0
  73. data/ext/qt6/qtcore/qrect-rb.cpp +8 -4
  74. data/ext/qt6/qtcore/qrect-rb.hpp +4 -3
  75. data/ext/qt6/qtcore/qregularexpression-rb.cpp +16 -4
  76. data/ext/qt6/qtcore/qregularexpression-rb.hpp +4 -3
  77. data/ext/qt6/qtcore/qresource-rb.cpp +3 -3
  78. data/ext/qt6/qtcore/qresource-rb.hpp +4 -3
  79. data/ext/qt6/qtcore/qsettings-rb.cpp +3 -3
  80. data/ext/qt6/qtcore/qsettings-rb.hpp +4 -3
  81. data/ext/qt6/qtcore/qsignalmapper-rb.cpp +7 -7
  82. data/ext/qt6/qtcore/qsignalmapper-rb.hpp +4 -3
  83. data/ext/qt6/qtcore/qsize-rb.cpp +4 -4
  84. data/ext/qt6/qtcore/qsize-rb.hpp +4 -3
  85. data/ext/qt6/qtcore/qstandardpaths-rb.cpp +61 -0
  86. data/ext/qt6/qtcore/qstandardpaths-rb.hpp +5 -0
  87. data/ext/qt6/qtcore/qstring-rb.cpp +5 -3
  88. data/ext/qt6/qtcore/qstring-rb.hpp +4 -3
  89. data/ext/qt6/qtcore/qstringlist-rb.cpp +5 -41
  90. data/ext/qt6/qtcore/qstringlist-rb.hpp +4 -3
  91. data/ext/qt6/qtcore/qt-enum-af-rb.cpp +2 -2
  92. data/ext/qt6/qtcore/qt-enum-af-rb.hpp +4 -3
  93. data/ext/qt6/qtcore/qt-enum-gl-rb.cpp +2 -2
  94. data/ext/qt6/qtcore/qt-enum-gl-rb.hpp +4 -3
  95. data/ext/qt6/qtcore/qt-enum-mr-rb.cpp +2 -2
  96. data/ext/qt6/qtcore/qt-enum-mr-rb.hpp +4 -3
  97. data/ext/qt6/qtcore/qt-enum-sz-rb.cpp +2 -2
  98. data/ext/qt6/qtcore/qt-enum-sz-rb.hpp +4 -3
  99. data/ext/qt6/qtcore/qt-flags-al-rb.cpp +2 -2
  100. data/ext/qt6/qtcore/qt-flags-al-rb.hpp +4 -3
  101. data/ext/qt6/qtcore/qt-flags-mz-rb.cpp +2 -2
  102. data/ext/qt6/qtcore/qt-flags-mz-rb.hpp +4 -3
  103. data/ext/qt6/qtcore/qtcore-rb.cpp +26 -8
  104. data/ext/qt6/qtcore/qtcore-rb.hpp +1 -1
  105. data/ext/qt6/qtcore/qtcoreversion-rb.cpp +2 -2
  106. data/ext/qt6/qtcore/qtcoreversion-rb.hpp +4 -3
  107. data/ext/qt6/qtcore/qtextstream-rb.cpp +3 -3
  108. data/ext/qt6/qtcore/qtextstream-rb.hpp +4 -3
  109. data/ext/qt6/qtcore/qtimer-rb.cpp +4 -6
  110. data/ext/qt6/qtcore/qtimer-rb.hpp +4 -3
  111. data/ext/qt6/qtcore/qtranslator-rb.cpp +3 -3
  112. data/ext/qt6/qtcore/qtranslator-rb.hpp +4 -3
  113. data/ext/qt6/qtcore/qurl-rb.cpp +10 -6
  114. data/ext/qt6/qtcore/qurl-rb.hpp +4 -3
  115. data/ext/qt6/qtcore/qurlquery-rb.cpp +33 -0
  116. data/ext/qt6/qtcore/qurlquery-rb.hpp +5 -0
  117. data/ext/qt6/qtcore/quuid-rb.cpp +3 -3
  118. data/ext/qt6/qtcore/quuid-rb.hpp +4 -3
  119. data/ext/qt6/qtcore/qvariant-rb.cpp +6 -3
  120. data/ext/qt6/qtcore/qvariant-rb.hpp +4 -3
  121. data/ext/qt6/qtcore/qvariantlist-rb.cpp +16 -0
  122. data/ext/qt6/qtcore/qvariantlist-rb.hpp +5 -0
  123. data/ext/qt6/qtcore/qvariantmap-rb.cpp +16 -0
  124. data/ext/qt6/qtcore/qvariantmap-rb.hpp +5 -0
  125. data/ext/qt6/qtcore/t-qtcore-rb.cpp +14 -6
  126. data/ext/qt6/qtcore/t-qtcore-rb.hpp +4 -3
  127. data/lib/qt6/ducktyping.rb +10 -3
  128. data/lib/qt6/qtcore/private/metamethod.rb +1 -1
  129. data/lib/qt6/qtcore/private/metaobject.rb +5 -4
  130. data/lib/qt6/qtcore/qabstractitemmodel.rb +2 -2
  131. data/lib/qt6/qtcore/qanystringview.rb +0 -6
  132. data/lib/qt6/qtcore/qbytearray.rb +13 -0
  133. data/lib/qt6/qtcore/qcoreapplication.rb +31 -3
  134. data/lib/qt6/qtcore/qdate.rb +1 -1
  135. data/lib/qt6/qtcore/qdatetime.rb +2 -2
  136. data/lib/qt6/qtcore/qeventloop.rb +17 -0
  137. data/lib/qt6/qtcore/qitemselection.rb +6 -1
  138. data/lib/qt6/qtcore/qlocale.rb +1 -1
  139. data/lib/qt6/qtcore/qmimetype.rb +9 -0
  140. data/lib/qt6/qtcore/qobject.rb +13 -2
  141. data/lib/qt6/qtcore/qprocess.rb +50 -0
  142. data/lib/qt6/qtcore/qprocessenvironment.rb +11 -0
  143. data/lib/qt6/qtcore/qregularexpression.rb +1 -1
  144. data/lib/qt6/qtcore/qregularexpressionmatchiterator.rb +9 -0
  145. data/lib/qt6/qtcore/qstandardpaths.rb +15 -0
  146. data/lib/qt6/qtcore/qstring.rb +7 -6
  147. data/lib/qt6/qtcore/qstringlist.rb +45 -2
  148. data/lib/qt6/qtcore/qtime.rb +1 -1
  149. data/lib/qt6/qtcore/qtimer.rb +1 -1
  150. data/lib/qt6/qtcore/qurl.rb +25 -0
  151. data/lib/qt6/qtcore/qurlquery.rb +41 -0
  152. data/lib/qt6/qtcore/quuid.rb +1 -1
  153. data/lib/qt6/qtcore/qvariant.rb +5 -1
  154. data/lib/qt6/qtcore/qvariantlist.rb +60 -0
  155. data/lib/qt6/qtcore/qvariantmap.rb +47 -0
  156. data/lib/qt6/qtcore/version.rb +1 -1
  157. data/lib/qt6/qtcore.rb +10 -0
  158. data/lib/qt6/refinements/kernel.rb +22 -5
  159. data/lib/qt6/refinements/object.rb +15 -0
  160. data/lib/qt6/refinements/symbol.rb +8 -0
  161. metadata +33 -6
  162. data/ext/qt6/qtcore/bando-rb.hpp +0 -4
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qfileinfo(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qfileinfo(Module rb_mQt6QtCore);
@@ -1,11 +1,11 @@
1
1
  #include "qiodevice-rb.hpp"
2
2
  #include <qiodevice.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQIODevice;
6
+ Class rb_cQIODevice;
7
7
 
8
- void Init_qiodevice(Rice::Module rb_mQt6QtCore)
8
+ void Init_qiodevice(Module rb_mQt6QtCore)
9
9
  {
10
10
  rb_cQIODevice =
11
11
  // RubyQt6::QtCore::QIODevice
@@ -60,12 +60,12 @@ void Init_qiodevice(Rice::Module rb_mQt6QtCore)
60
60
  .define_method<qint64 (QIODevice::*)(const QByteArray &)>("write", &QIODevice::write, Arg("data"))
61
61
  .define_method<qint64 (QIODevice::*)(const char *)>("write", &QIODevice::write, Arg("data"))
62
62
  .define_method<qint64 (QIODevice::*)(const char *, qint64)>("write", &QIODevice::write, Arg("data"), Arg("len"))
63
- .define_method("write_channel_count", &QIODevice::writeChannelCount)
63
+ .define_method("write_channel_count", &QIODevice::writeChannelCount);
64
64
  // Signals
65
- .define_method("about_to_close", &QIODevice::aboutToClose)
66
- .define_method("bytes_written", &QIODevice::bytesWritten, Arg("bytes"))
67
- .define_method("channel_bytes_written", &QIODevice::channelBytesWritten, Arg("channel"), Arg("bytes"))
68
- .define_method("channel_ready_read", &QIODevice::channelReadyRead, Arg("channel"))
69
- .define_method("read_channel_finished", &QIODevice::readChannelFinished)
70
- .define_method("ready_read", &QIODevice::readyRead);
65
+ // .define_method("about_to_close", &QIODevice::aboutToClose)
66
+ // .define_method("bytes_written", &QIODevice::bytesWritten, Arg("bytes"))
67
+ // .define_method("channel_bytes_written", &QIODevice::channelBytesWritten, Arg("channel"), Arg("bytes"))
68
+ // .define_method("channel_ready_read", &QIODevice::channelReadyRead, Arg("channel"))
69
+ // .define_method("read_channel_finished", &QIODevice::readChannelFinished)
70
+ // .define_method("ready_read", &QIODevice::readyRead);
71
71
  }
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qiodevice(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qiodevice(Module rb_mQt6QtCore);
@@ -3,11 +3,11 @@
3
3
  #include <rice/qt6/qenum.hpp>
4
4
  #include <rice/qt6/qflags.hpp>
5
5
 
6
- using namespace Rice;
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
7
 
8
- Rice::Class rb_cQIODeviceBase;
8
+ Class rb_cQIODeviceBase;
9
9
 
10
- void Init_qiodevicebase(Rice::Module rb_mQt6QtCore)
10
+ void Init_qiodevicebase(Module rb_mQt6QtCore)
11
11
  {
12
12
  rb_cQIODeviceBase =
13
13
  // RubyQt6::QtCore::QIODeviceBase
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qiodevicebase(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qiodevicebase(Module rb_mQt6QtCore);
@@ -1,12 +1,12 @@
1
1
  #include "qitemselection-rb.hpp"
2
2
  #include <qitemselectionmodel.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQItemSelectionRange;
7
- Rice::Class rb_cQItemSelection;
6
+ Class rb_cQItemSelectionRange;
7
+ Class rb_cQItemSelection;
8
8
 
9
- void Init_qitemselection(Rice::Module rb_mQt6QtCore)
9
+ void Init_qitemselection(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQItemSelectionRange =
12
12
  // RubyQt6::QtCore::QItemSelectionRange
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qitemselection(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qitemselection(Module rb_mQt6QtCore);
@@ -5,11 +5,11 @@
5
5
 
6
6
  #include <QBindable>
7
7
 
8
- using namespace Rice;
8
+ RICE4RUBYQT6_USE_NAMESPACE
9
9
 
10
- Rice::Class rb_cQItemSelectionModel;
10
+ Class rb_cQItemSelectionModel;
11
11
 
12
- void Init_qitemselectionmodel(Rice::Module rb_mQt6QtCore)
12
+ void Init_qitemselectionmodel(Module rb_mQt6QtCore)
13
13
  {
14
14
  rb_cQItemSelectionModel =
15
15
  // RubyQt6::QtCore::QItemSelectionModel
@@ -41,13 +41,13 @@ void Init_qitemselectionmodel(Rice::Module rb_mQt6QtCore)
41
41
  .define_method("reset", &QItemSelectionModel::reset)
42
42
  .define_method<void (QItemSelectionModel::*)(const QItemSelection &, QItemSelectionModel::SelectionFlags)>("select", &QItemSelectionModel::select, Arg("selection"), Arg("command"))
43
43
  .define_method<void (QItemSelectionModel::*)(const QModelIndex &, QItemSelectionModel::SelectionFlags)>("select", &QItemSelectionModel::select, Arg("index"), Arg("command"))
44
- .define_method("set_current_index", &QItemSelectionModel::setCurrentIndex, Arg("index"), Arg("command"))
44
+ .define_method("set_current_index", &QItemSelectionModel::setCurrentIndex, Arg("index"), Arg("command"));
45
45
  // Signals
46
- .define_method("current_changed", &QItemSelectionModel::currentChanged, Arg("current"), Arg("previous"))
47
- .define_method("current_column_changed", &QItemSelectionModel::currentColumnChanged, Arg("current"), Arg("previous"))
48
- .define_method("current_row_changed", &QItemSelectionModel::currentRowChanged, Arg("current"), Arg("previous"))
49
- .define_method("model_changed", &QItemSelectionModel::modelChanged, Arg("model"))
50
- .define_method("selection_changed", &QItemSelectionModel::selectionChanged, Arg("selected"), Arg("deselected"));
46
+ // .define_method("current_changed", &QItemSelectionModel::currentChanged, Arg("current"), Arg("previous"))
47
+ // .define_method("current_column_changed", &QItemSelectionModel::currentColumnChanged, Arg("current"), Arg("previous"))
48
+ // .define_method("current_row_changed", &QItemSelectionModel::currentRowChanged, Arg("current"), Arg("previous"))
49
+ // .define_method("model_changed", &QItemSelectionModel::modelChanged, Arg("model"))
50
+ // .define_method("selection_changed", &QItemSelectionModel::selectionChanged, Arg("selected"), Arg("deselected"));
51
51
 
52
52
  Data_Type<QItemSelectionModel::SelectionFlag> rb_cQItemSelectionModelSelectionFlag =
53
53
  // RubyQt6::QtCore::QItemSelectionModel::SelectionFlag
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qitemselectionmodel(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qitemselectionmodel(Module rb_mQt6QtCore);
@@ -2,11 +2,11 @@
2
2
  #include <qlibraryinfo.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQLibraryInfo;
7
+ Class rb_cQLibraryInfo;
8
8
 
9
- void Init_qlibraryinfo(Rice::Module rb_mQt6QtCore)
9
+ void Init_qlibraryinfo(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQLibraryInfo =
12
12
  // RubyQt6::QtCore::QLibraryInfo
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qlibraryinfo(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qlibraryinfo(Module rb_mQt6QtCore);
@@ -1,12 +1,12 @@
1
1
  #include "qline-rb.hpp"
2
2
  #include <qline.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQLine;
7
- Rice::Class rb_cQLineF;
6
+ Class rb_cQLine;
7
+ Class rb_cQLineF;
8
8
 
9
- void Init_qline(Rice::Module rb_mQt6QtCore)
9
+ void Init_qline(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQLine =
12
12
  // RubyQt6::QtCore::QLine
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qline(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qline(Module rb_mQt6QtCore);
@@ -6,11 +6,11 @@
6
6
  #include <QCalendar>
7
7
  #include <QDateTime>
8
8
 
9
- using namespace Rice;
9
+ RICE4RUBYQT6_USE_NAMESPACE
10
10
 
11
- Rice::Class rb_cQLocale;
11
+ Class rb_cQLocale;
12
12
 
13
- void Init_qlocale(Rice::Module rb_mQt6QtCore)
13
+ void Init_qlocale(Module rb_mQt6QtCore)
14
14
  {
15
15
  rb_cQLocale =
16
16
  // RubyQt6::QtCore::QLocale
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qlocale(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qlocale(Module rb_mQt6QtCore);
@@ -1,12 +1,12 @@
1
1
  #include "qmargins-rb.hpp"
2
2
  #include <qmargins.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQMargins;
7
- Rice::Class rb_cQMarginsF;
6
+ Class rb_cQMargins;
7
+ Class rb_cQMarginsF;
8
8
 
9
- void Init_qmargins(Rice::Module rb_mQt6QtCore)
9
+ void Init_qmargins(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQMargins =
12
12
  // RubyQt6::QtCore::QMargins
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmargins(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmargins(Module rb_mQt6QtCore);
@@ -1,11 +1,11 @@
1
1
  #include "qmetaclassinfo-rb.hpp"
2
2
  #include <qmetaobject.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQMetaClassInfo;
6
+ Class rb_cQMetaClassInfo;
7
7
 
8
- void Init_qmetaclassinfo(Rice::Module rb_mQt6QtCore)
8
+ void Init_qmetaclassinfo(Module rb_mQt6QtCore)
9
9
  {
10
10
  rb_cQMetaClassInfo =
11
11
  // RubyQt6::QtCore::QMetaClassInfo
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmetaclassinfo(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmetaclassinfo(Module rb_mQt6QtCore);
@@ -2,11 +2,11 @@
2
2
  #include <qmetaobject.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQMetaMethod;
7
+ Class rb_cQMetaMethod;
8
8
 
9
- void Init_qmetamethod(Rice::Module rb_mQt6QtCore)
9
+ void Init_qmetamethod(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQMetaMethod =
12
12
  // RubyQt6::QtCore::QMetaMethod
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmetamethod(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmetamethod(Module rb_mQt6QtCore);
@@ -2,12 +2,12 @@
2
2
  #include <qmetaobject.h>
3
3
  #include <qobjectdefs.h>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQMetaObject;
8
- Rice::Class rb_cQMetaObjectConnection;
7
+ Class rb_cQMetaObject;
8
+ Class rb_cQMetaObjectConnection;
9
9
 
10
- void Init_qmetaobject(Rice::Module rb_mQt6QtCore)
10
+ void Init_qmetaobject(Module rb_mQt6QtCore)
11
11
  {
12
12
  rb_cQMetaObject =
13
13
  // RubyQt6::QtCore::QMetaObject
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmetaobject(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmetaobject(Module rb_mQt6QtCore);
@@ -1,14 +1,14 @@
1
1
  #include "qmetaobjectbuilder-rb.hpp"
2
2
  #include "private/qmetaobjectbuilder_p.h"
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQMetaObjectBuilder;
7
- Rice::Class rb_cQMetaMethodBuilder;
8
- Rice::Class rb_cQMetaPropertyBuilder;
9
- Rice::Class rb_cQMetaEnumBuilder;
6
+ Class rb_cQMetaObjectBuilder;
7
+ Class rb_cQMetaMethodBuilder;
8
+ Class rb_cQMetaPropertyBuilder;
9
+ Class rb_cQMetaEnumBuilder;
10
10
 
11
- void Init_qmetaobjectbuilder(Rice::Module rb_mQt6QtCore)
11
+ void Init_qmetaobjectbuilder(Module rb_mQt6QtCore)
12
12
  {
13
13
  rb_cQMetaObjectBuilder =
14
14
  // RubyQt6::QtCore::QMetaObjectBuilder
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmetaobjectbuilder(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmetaobjectbuilder(Module rb_mQt6QtCore);
@@ -2,11 +2,11 @@
2
2
  #include <qmetatype.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQMetaType;
7
+ Class rb_cQMetaType;
8
8
 
9
- void Init_qmetatype(Rice::Module rb_mQt6QtCore)
9
+ void Init_qmetatype(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQMetaType =
12
12
  // RubyQt6::QtCore::QMetaType
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmetatype(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmetatype(Module rb_mQt6QtCore);
@@ -0,0 +1,28 @@
1
+ #include "qmimetype-rb.hpp"
2
+ #include <qmimetype.h>
3
+
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
+
6
+ Class rb_cQMimeType;
7
+
8
+ void Init_qmimetype(Module rb_mQt6QtCore)
9
+ {
10
+ rb_cQMimeType =
11
+ // RubyQt6::QtCore::QMimeType
12
+ define_class_under<QMimeType>(rb_mQt6QtCore, "QMimeType")
13
+ // Public Functions
14
+ .define_method("aliases", &QMimeType::aliases)
15
+ .define_method("all_ancestors", &QMimeType::allAncestors)
16
+ .define_method("comment", &QMimeType::comment)
17
+ .define_method("filter_string", &QMimeType::filterString)
18
+ .define_method("generic_icon_name", &QMimeType::genericIconName)
19
+ .define_method("glob_patterns", &QMimeType::globPatterns)
20
+ .define_method("icon_name", &QMimeType::iconName)
21
+ .define_method("inherits", &QMimeType::inherits, Arg("mime_type_name"))
22
+ .define_method("default?", &QMimeType::isDefault)
23
+ .define_method("valid?", &QMimeType::isValid)
24
+ .define_method("name", &QMimeType::name)
25
+ .define_method("parent_mime_types", &QMimeType::parentMimeTypes)
26
+ .define_method("preferred_suffix", &QMimeType::preferredSuffix)
27
+ .define_method("suffixes", &QMimeType::suffixes);
28
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmimetype(Module rb_mQt6QtCore);
@@ -1,11 +1,11 @@
1
1
  #include "qmodelindex-rb.hpp"
2
2
  #include <qabstractitemmodel.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQModelIndex;
6
+ Class rb_cQModelIndex;
7
7
 
8
- void Init_qmodelindex(Rice::Module rb_mQt6QtCore)
8
+ void Init_qmodelindex(Module rb_mQt6QtCore)
9
9
  {
10
10
  rb_cQModelIndex =
11
11
  // RubyQt6::QtCore::QModelIndex
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qmodelindex(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qmodelindex(Module rb_mQt6QtCore);
@@ -8,9 +8,9 @@
8
8
  #include <QThread>
9
9
  #include <QVariant>
10
10
 
11
- using namespace Rice;
11
+ RICE4RUBYQT6_USE_NAMESPACE
12
12
 
13
- Rice::Class rb_cQObject;
13
+ Class rb_cQObject;
14
14
 
15
15
  int QObject_emit(QObject *sender, const QMetaMethod *signal, const std::vector<QVariant> &args)
16
16
  {
@@ -25,14 +25,16 @@ int QObject_emit(QObject *sender, const QMetaMethod *signal, const std::vector<Q
25
25
  return -1;
26
26
  }
27
27
 
28
- void Init_qobject(Rice::Module rb_mQt6QtCore)
28
+ void Init_qobject(Module rb_mQt6QtCore)
29
29
  {
30
30
  rb_cQObject =
31
31
  // RubyQt6::QtCore::QObject
32
32
  define_class_under<QObject>(rb_mQt6QtCore, "QObject")
33
33
  // RubyQt6-Defined Functions
34
+ .define_method("_qobject_ptr", [](QObject *self) -> uintptr_t { return (uintptr_t)self; })
34
35
  .define_singleton_function("_emit", QObject_emit, Arg("sender"), Arg("signal"), Arg("args"))
35
36
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QObject::staticMetaObject; })
37
+ .define_singleton_function("_delete_now", [](QObject *object) -> void { delete object; }, Arg("object").takeOwnership())
36
38
  .define_singleton_function("_take_ownership_from_ruby", [](QObject *) -> void {}, Arg("object").takeOwnership())
37
39
  // Constructor
38
40
  .define_constructor(Constructor<QObject, QObject *>(), Arg("parent"))
@@ -59,19 +61,17 @@ void Init_qobject(Rice::Module rb_mQt6QtCore)
59
61
  .define_method("_parent", &QObject::parent)
60
62
  .define_method("property", &QObject::property, Arg("name"))
61
63
  .define_method("remove_event_filter", &QObject::removeEventFilter, Arg("obj"))
62
- .define_method<void (QObject::*)(const QString &)>("set_object_name", &QObject::setObjectName, Arg("name"))
64
+ .define_method<void (QObject::*)(const QString &)>("_set_object_name", &QObject::setObjectName, Arg("name"))
63
65
  .define_method("set_parent", &QObject::setParent, Arg("parent"))
64
66
  .define_method<bool (QObject::*)(const char *, QVariant &&)>("set_property", &QObject::setProperty, Arg("name"), Arg("value"))
65
- .define_method<bool (QObject::*)(const char *, const QVariant &)>("set_property", &QObject::setProperty, Arg("name"), Arg("value"))
66
67
  .define_method("signals_blocked", &QObject::signalsBlocked)
67
68
  .define_method<int (QObject::*)(int, Qt::TimerType)>("start_timer", &QObject::startTimer, Arg("interval"), Arg("timer_type") = static_cast<Qt::TimerType>(Qt::CoarseTimer))
68
- .define_method<int (QObject::*)(std::chrono::nanoseconds, Qt::TimerType)>("start_timer", &QObject::startTimer, Arg("time"), Arg("timer_type") = static_cast<Qt::TimerType>(Qt::CoarseTimer))
69
69
  .define_method("thread", &QObject::thread)
70
70
  // Public Slots
71
71
  .define_method("delete_later", &QObject::deleteLater)
72
72
  // Signals
73
- .define_method("destroyed", &QObject::destroyed, Arg("obj") = static_cast<QObject *>(nullptr))
74
- .define_method("object_name_changed", &QObject::objectNameChanged, Arg("object_name"))
73
+ // .define_method("destroyed", &QObject::destroyed, Arg("obj") = static_cast<QObject *>(nullptr))
74
+ // .define_method("object_name_changed", &QObject::objectNameChanged, Arg("object_name"))
75
75
  // Static Public Members
76
76
  .define_singleton_function<QMetaObject::Connection (*)(const QObject *, const char *, const QObject *, const char *, Qt::ConnectionType)>("_connect", &QObject::connect, Arg("sender"), Arg("signal"), Arg("receiver"), Arg("member"), Arg("type") = static_cast<Qt::ConnectionType>(Qt::AutoConnection))
77
77
  .define_singleton_function<bool (*)(const QObject *, const char *, const QObject *, const char *)>("_disconnect", &QObject::disconnect, Arg("sender"), Arg("signal"), Arg("receiver"), Arg("member"))
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qobject(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qobject(Module rb_mQt6QtCore);
@@ -1,12 +1,12 @@
1
1
  #include "qpoint-rb.hpp"
2
2
  #include <qpoint.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQPoint;
7
- Rice::Class rb_cQPointF;
6
+ Class rb_cQPoint;
7
+ Class rb_cQPointF;
8
8
 
9
- void Init_qpoint(Rice::Module rb_mQt6QtCore)
9
+ void Init_qpoint(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQPoint =
12
12
  // RubyQt6::QtCore::QPoint
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qpoint(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qpoint(Module rb_mQt6QtCore);