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
@@ -0,0 +1,123 @@
1
+ #include "qprocess-rb.hpp"
2
+ #include <qprocess.h>
3
+ #include <rice/qt6/qenum.hpp>
4
+
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
+
7
+ Class rb_cQProcess;
8
+
9
+ void Init_qprocess(Module rb_mQt6QtCore)
10
+ {
11
+ rb_cQProcess =
12
+ // RubyQt6::QtCore::QProcess
13
+ define_class_under<QProcess, QIODevice>(rb_mQt6QtCore, "QProcess")
14
+ // RubyQt6-Defined Functions
15
+ .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QProcess::staticMetaObject; })
16
+ // Constructor
17
+ .define_constructor(Constructor<QProcess, QObject *>(), Arg("parent"))
18
+ // Public Functions
19
+ .define_method("arguments", &QProcess::arguments)
20
+ .define_method("bytes_to_write", &QProcess::bytesToWrite)
21
+ .define_method("child_process_modifier", &QProcess::childProcessModifier)
22
+ .define_method("close", &QProcess::close)
23
+ .define_method("close_read_channel", &QProcess::closeReadChannel, Arg("channel"))
24
+ .define_method("close_write_channel", &QProcess::closeWriteChannel)
25
+ .define_method("environment", &QProcess::environment)
26
+ .define_method("error", &QProcess::error)
27
+ .define_method("exit_code", &QProcess::exitCode)
28
+ .define_method("exit_status", &QProcess::exitStatus)
29
+ .define_method("fail_child_process_modifier", &QProcess::failChildProcessModifier, Arg("description"), Arg("error") = static_cast<int>(0))
30
+ .define_method("input_channel_mode", &QProcess::inputChannelMode)
31
+ .define_method("sequential?", &QProcess::isSequential)
32
+ .define_method("open", &QProcess::open, Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
33
+ .define_method("process_channel_mode", &QProcess::processChannelMode)
34
+ .define_method("process_environment", &QProcess::processEnvironment)
35
+ .define_method("process_id", &QProcess::processId)
36
+ .define_method("program", &QProcess::program)
37
+ .define_method("read_all_standard_error", &QProcess::readAllStandardError)
38
+ .define_method("read_all_standard_output", &QProcess::readAllStandardOutput)
39
+ .define_method("read_channel", &QProcess::readChannel)
40
+ .define_method("set_arguments", &QProcess::setArguments, Arg("arguments"))
41
+ .define_method("set_child_process_modifier", &QProcess::setChildProcessModifier, Arg("modifier"))
42
+ .define_method("set_environment", &QProcess::setEnvironment, Arg("environment"))
43
+ .define_method("set_input_channel_mode", &QProcess::setInputChannelMode, Arg("mode"))
44
+ .define_method("set_process_channel_mode", &QProcess::setProcessChannelMode, Arg("mode"))
45
+ .define_method("set_process_environment", &QProcess::setProcessEnvironment, Arg("environment"))
46
+ .define_method("set_program", &QProcess::setProgram, Arg("program"))
47
+ .define_method("set_read_channel", &QProcess::setReadChannel, Arg("channel"))
48
+ .define_method("set_standard_error_file", &QProcess::setStandardErrorFile, Arg("file_name"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::Truncate))
49
+ .define_method("set_standard_input_file", &QProcess::setStandardInputFile, Arg("file_name"))
50
+ .define_method("set_standard_output_file", &QProcess::setStandardOutputFile, Arg("file_name"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::Truncate))
51
+ .define_method("set_standard_output_process", &QProcess::setStandardOutputProcess, Arg("destination"))
52
+ .define_method("set_working_directory", &QProcess::setWorkingDirectory, Arg("dir"))
53
+ .define_method<void (QProcess::*)(QIODeviceBase::OpenMode)>("start", &QProcess::start, Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
54
+ .define_method<void (QProcess::*)(const QString &, const QStringList &, QIODeviceBase::OpenMode)>("start", &QProcess::start, Arg("program"), Arg("arguments") = static_cast<const QStringList &>(QStringList {}), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
55
+ .define_method("start_command", &QProcess::startCommand, Arg("command"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
56
+ .define_method<bool (QProcess::*)(qint64 *)>("start_detached", &QProcess::startDetached, Arg("pid") = static_cast<qint64 *>(nullptr))
57
+ .define_method("state", &QProcess::state)
58
+ .define_method("wait_for_bytes_written", &QProcess::waitForBytesWritten, Arg("msecs") = static_cast<int>(30000))
59
+ .define_method("wait_for_finished", &QProcess::waitForFinished, Arg("msecs") = static_cast<int>(30000))
60
+ .define_method("wait_for_ready_read", &QProcess::waitForReadyRead, Arg("msecs") = static_cast<int>(30000))
61
+ .define_method("wait_for_started", &QProcess::waitForStarted, Arg("msecs") = static_cast<int>(30000))
62
+ .define_method("working_directory", &QProcess::workingDirectory)
63
+ // Public Slots
64
+ .define_method("kill", &QProcess::kill)
65
+ .define_method("terminate", &QProcess::terminate)
66
+ // Signals
67
+ // .define_method("error_occurred", &QProcess::errorOccurred, Arg("error"))
68
+ // .define_method("finished", &QProcess::finished, Arg("exit_code"), Arg("exit_status") = static_cast<QProcess::ExitStatus>(QProcess::NormalExit))
69
+ // .define_method("ready_read_standard_error", &QProcess::readyReadStandardError)
70
+ // .define_method("ready_read_standard_output", &QProcess::readyReadStandardOutput)
71
+ // .define_method("started", &QProcess::started)
72
+ // .define_method("state_changed", &QProcess::stateChanged, Arg("state"))
73
+ // Static Public Members
74
+ .define_singleton_function("_execute", &QProcess::execute, Arg("program"), Arg("arguments"))
75
+ .define_singleton_function("null_device", &QProcess::nullDevice)
76
+ .define_singleton_function("split_command", &QProcess::splitCommand, Arg("command"))
77
+ .define_singleton_function<bool (*)(const QString &, const QStringList &, const QString &, qint64 *)>("start_detached", &QProcess::startDetached, Arg("program"), Arg("arguments") = static_cast<const QStringList &>(QStringList {}), Arg("working_directory") = static_cast<const QString &>(QString()), Arg("pid") = static_cast<qint64 *>(nullptr))
78
+ .define_singleton_function("system_environment", &QProcess::systemEnvironment);
79
+
80
+ Data_Type<QProcess::ExitStatus> rb_cQProcessExitStatus =
81
+ // RubyQt6::QtCore::QProcess::ExitStatus
82
+ define_qenum_under<QProcess::ExitStatus>(rb_cQProcess, "ExitStatus");
83
+ define_qenum_value_under(rb_cQProcessExitStatus, "NormalExit", QProcess::ExitStatus::NormalExit);
84
+ define_qenum_value_under(rb_cQProcessExitStatus, "CrashExit", QProcess::ExitStatus::CrashExit);
85
+
86
+ Data_Type<QProcess::InputChannelMode> rb_cQProcessInputChannelMode =
87
+ // RubyQt6::QtCore::QProcess::InputChannelMode
88
+ define_qenum_under<QProcess::InputChannelMode>(rb_cQProcess, "InputChannelMode");
89
+ define_qenum_value_under(rb_cQProcessInputChannelMode, "ManagedInputChannel", QProcess::InputChannelMode::ManagedInputChannel);
90
+ define_qenum_value_under(rb_cQProcessInputChannelMode, "ForwardedInputChannel", QProcess::InputChannelMode::ForwardedInputChannel);
91
+
92
+ Data_Type<QProcess::ProcessChannel> rb_cQProcessProcessChannel =
93
+ // RubyQt6::QtCore::QProcess::ProcessChannel
94
+ define_qenum_under<QProcess::ProcessChannel>(rb_cQProcess, "ProcessChannel");
95
+ define_qenum_value_under(rb_cQProcessProcessChannel, "StandardOutput", QProcess::ProcessChannel::StandardOutput);
96
+ define_qenum_value_under(rb_cQProcessProcessChannel, "StandardError", QProcess::ProcessChannel::StandardError);
97
+
98
+ Data_Type<QProcess::ProcessChannelMode> rb_cQProcessProcessChannelMode =
99
+ // RubyQt6::QtCore::QProcess::ProcessChannelMode
100
+ define_qenum_under<QProcess::ProcessChannelMode>(rb_cQProcess, "ProcessChannelMode");
101
+ define_qenum_value_under(rb_cQProcessProcessChannelMode, "SeparateChannels", QProcess::ProcessChannelMode::SeparateChannels);
102
+ define_qenum_value_under(rb_cQProcessProcessChannelMode, "MergedChannels", QProcess::ProcessChannelMode::MergedChannels);
103
+ define_qenum_value_under(rb_cQProcessProcessChannelMode, "ForwardedChannels", QProcess::ProcessChannelMode::ForwardedChannels);
104
+ define_qenum_value_under(rb_cQProcessProcessChannelMode, "ForwardedOutputChannel", QProcess::ProcessChannelMode::ForwardedOutputChannel);
105
+ define_qenum_value_under(rb_cQProcessProcessChannelMode, "ForwardedErrorChannel", QProcess::ProcessChannelMode::ForwardedErrorChannel);
106
+
107
+ Data_Type<QProcess::ProcessError> rb_cQProcessProcessError =
108
+ // RubyQt6::QtCore::QProcess::ProcessError
109
+ define_qenum_under<QProcess::ProcessError>(rb_cQProcess, "ProcessError");
110
+ define_qenum_value_under(rb_cQProcessProcessError, "FailedToStart", QProcess::ProcessError::FailedToStart);
111
+ define_qenum_value_under(rb_cQProcessProcessError, "Crashed", QProcess::ProcessError::Crashed);
112
+ define_qenum_value_under(rb_cQProcessProcessError, "Timedout", QProcess::ProcessError::Timedout);
113
+ define_qenum_value_under(rb_cQProcessProcessError, "ReadError", QProcess::ProcessError::ReadError);
114
+ define_qenum_value_under(rb_cQProcessProcessError, "WriteError", QProcess::ProcessError::WriteError);
115
+ define_qenum_value_under(rb_cQProcessProcessError, "UnknownError", QProcess::ProcessError::UnknownError);
116
+
117
+ Data_Type<QProcess::ProcessState> rb_cQProcessProcessState =
118
+ // RubyQt6::QtCore::QProcess::ProcessState
119
+ define_qenum_under<QProcess::ProcessState>(rb_cQProcess, "ProcessState");
120
+ define_qenum_value_under(rb_cQProcessProcessState, "NotRunning", QProcess::ProcessState::NotRunning);
121
+ define_qenum_value_under(rb_cQProcessProcessState, "Starting", QProcess::ProcessState::Starting);
122
+ define_qenum_value_under(rb_cQProcessProcessState, "Running", QProcess::ProcessState::Running);
123
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qprocess(Module rb_mQt6QtCore);
@@ -0,0 +1,32 @@
1
+ #include "qprocess-rb.hpp"
2
+ #include <qprocess.h>
3
+ #include <rice/qt6/qenum.hpp>
4
+
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
+
7
+ Class rb_cQProcessEnvironment;
8
+
9
+ void Init_qprocessenvironment(Module rb_mQt6QtCore)
10
+ {
11
+ rb_cQProcessEnvironment =
12
+ // RubyQt6::QtCore::QProcessEnvironment
13
+ define_class_under<QProcessEnvironment>(rb_mQt6QtCore, "QProcessEnvironment")
14
+ // Public Functions
15
+ .define_method("clear", &QProcessEnvironment::clear)
16
+ .define_method("contains", &QProcessEnvironment::contains, Arg("name"))
17
+ .define_method("inherits_from_parent", &QProcessEnvironment::inheritsFromParent)
18
+ .define_method<void (QProcessEnvironment::*)(const QString &, const QString &)>("insert", &QProcessEnvironment::insert, Arg("name"), Arg("value"))
19
+ .define_method<void (QProcessEnvironment::*)(const QProcessEnvironment &)>("insert", &QProcessEnvironment::insert, Arg("e"))
20
+ .define_method("empty?", &QProcessEnvironment::isEmpty)
21
+ .define_method("keys", &QProcessEnvironment::keys)
22
+ .define_method("remove", &QProcessEnvironment::remove, Arg("name"))
23
+ .define_method("to_string_list", &QProcessEnvironment::toStringList)
24
+ .define_method("value", &QProcessEnvironment::value, Arg("name"), Arg("default_value") = static_cast<const QString &>(QString()))
25
+ // Static Public Members
26
+ .define_singleton_function("system_environment", &QProcessEnvironment::systemEnvironment);
27
+
28
+ Data_Type<QProcessEnvironment::Initialization> rb_cQProcessEnvironmentInitialization =
29
+ // RubyQt6::QtCore::QProcessEnvironment::Initialization
30
+ define_qenum_under<QProcessEnvironment::Initialization>(rb_cQProcessEnvironment, "Initialization");
31
+ define_qenum_value_under(rb_cQProcessEnvironmentInitialization, "InheritFromParent", QProcessEnvironment::Initialization::InheritFromParent);
32
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qprocessenvironment(Module rb_mQt6QtCore);
@@ -1,17 +1,19 @@
1
1
  #include "qrect-rb.hpp"
2
2
  #include <qrect.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQRect;
7
- Rice::Class rb_cQRectF;
6
+ Class rb_cQRect;
7
+ Class rb_cQRectF;
8
8
 
9
- void Init_qrect(Rice::Module rb_mQt6QtCore)
9
+ void Init_qrect(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQRect =
12
12
  // RubyQt6::QtCore::QRect
13
13
  define_class_under<QRect>(rb_mQt6QtCore, "QRect")
14
14
  // RubyQt6-Defined Functions
15
+ .define_method("+", [](QRect *self, QMargins *margins) -> QRect { return *self + *margins; })
16
+ .define_method("-", [](QRect *self, QMargins *margins) -> QRect { return *self - *margins; })
15
17
  .define_singleton_function("_operator_equal", [](QRect *lhs, QRect *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
16
18
  .define_singleton_function("_operator_equal", [](QRect *lhs, QRectF *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
17
19
  // Constructor
@@ -88,6 +90,8 @@ void Init_qrect(Rice::Module rb_mQt6QtCore)
88
90
  // RubyQt6::QtCore::QRectF
89
91
  define_class_under<QRectF>(rb_mQt6QtCore, "QRectF")
90
92
  // RubyQt6-Defined Functions
93
+ .define_method("+", [](QRectF *self, QMarginsF *margins) -> QRectF { return *self + *margins; })
94
+ .define_method("-", [](QRectF *self, QMarginsF *margins) -> QRectF { return *self - *margins; })
91
95
  .define_singleton_function("_operator_equal", [](QRectF *lhs, QRect *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
92
96
  .define_singleton_function("_operator_equal", [](QRectF *lhs, QRectF *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
93
97
  // Constructor
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qrect(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qrect(Module rb_mQt6QtCore);
@@ -3,12 +3,13 @@
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_cQRegularExpression;
9
- Rice::Class rb_cQRegularExpressionMatch;
8
+ Class rb_cQRegularExpression;
9
+ Class rb_cQRegularExpressionMatch;
10
+ Class rb_cQRegularExpressionMatchIterator;
10
11
 
11
- void Init_qregularexpression(Rice::Module rb_mQt6QtCore)
12
+ void Init_qregularexpression(Module rb_mQt6QtCore)
12
13
  {
13
14
  rb_cQRegularExpression =
14
15
  // RubyQt6::QtCore::QRegularExpression
@@ -111,4 +112,15 @@ void Init_qregularexpression(Rice::Module rb_mQt6QtCore)
111
112
  .define_method("match_options", &QRegularExpressionMatch::matchOptions)
112
113
  .define_method("match_type", &QRegularExpressionMatch::matchType)
113
114
  .define_method("regular_expression", &QRegularExpressionMatch::regularExpression);
115
+
116
+ rb_cQRegularExpressionMatchIterator =
117
+ // RubyQt6::QtCore::QRegularExpressionMatchIterator
118
+ define_class_under<QRegularExpressionMatchIterator>(rb_mQt6QtCore, "QRegularExpressionMatchIterator")
119
+ // Public Functions
120
+ .define_method("has_next", &QRegularExpressionMatchIterator::hasNext)
121
+ .define_method("match_options", &QRegularExpressionMatchIterator::matchOptions)
122
+ .define_method("match_type", &QRegularExpressionMatchIterator::matchType)
123
+ .define_method("next", &QRegularExpressionMatchIterator::next)
124
+ .define_method("peek_next", &QRegularExpressionMatchIterator::peekNext)
125
+ .define_method("regular_expression", &QRegularExpressionMatchIterator::regularExpression);
114
126
  }
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qregularexpression(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qregularexpression(Module rb_mQt6QtCore);
@@ -4,11 +4,11 @@
4
4
 
5
5
  #include <QDateTime>
6
6
 
7
- using namespace Rice;
7
+ RICE4RUBYQT6_USE_NAMESPACE
8
8
 
9
- Rice::Class rb_cQResource;
9
+ Class rb_cQResource;
10
10
 
11
- void Init_qresource(Rice::Module rb_mQt6QtCore)
11
+ void Init_qresource(Module rb_mQt6QtCore)
12
12
  {
13
13
  rb_cQResource =
14
14
  // RubyQt6::QtCore::QResource
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qresource(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qresource(Module rb_mQt6QtCore);
@@ -2,11 +2,11 @@
2
2
  #include <qsettings.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQSettings;
7
+ Class rb_cQSettings;
8
8
 
9
- void Init_qsettings(Rice::Module rb_mQt6QtCore)
9
+ void Init_qsettings(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQSettings =
12
12
  // RubyQt6::QtCore::QSettings
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qsettings(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qsettings(Module rb_mQt6QtCore);
@@ -1,11 +1,11 @@
1
1
  #include "qsignalmapper-rb.hpp"
2
2
  #include <qsignalmapper.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQSignalMapper;
6
+ Class rb_cQSignalMapper;
7
7
 
8
- void Init_qsignalmapper(Rice::Module rb_mQt6QtCore)
8
+ void Init_qsignalmapper(Module rb_mQt6QtCore)
9
9
  {
10
10
  rb_cQSignalMapper =
11
11
  // RubyQt6::QtCore::QSignalMapper
@@ -24,9 +24,9 @@ void Init_qsignalmapper(Rice::Module rb_mQt6QtCore)
24
24
  .define_method<void (QSignalMapper::*)(QObject *, int)>("_set_mapping", &QSignalMapper::setMapping, Arg("sender"), Arg("id"))
25
25
  // Public Slots
26
26
  .define_method<void (QSignalMapper::*)()>("map", &QSignalMapper::map)
27
- .define_method<void (QSignalMapper::*)(QObject *)>("map", &QSignalMapper::map, Arg("sender"))
27
+ .define_method<void (QSignalMapper::*)(QObject *)>("map", &QSignalMapper::map, Arg("sender"));
28
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"));
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
32
  }
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qsignalmapper(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qsignalmapper(Module rb_mQt6QtCore);
@@ -1,12 +1,12 @@
1
1
  #include "qsize-rb.hpp"
2
2
  #include <qsize.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQSize;
7
- Rice::Class rb_cQSizeF;
6
+ Class rb_cQSize;
7
+ Class rb_cQSizeF;
8
8
 
9
- void Init_qsize(Rice::Module rb_mQt6QtCore)
9
+ void Init_qsize(Module rb_mQt6QtCore)
10
10
  {
11
11
  rb_cQSize =
12
12
  // RubyQt6::QtCore::QSize
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qsize(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qsize(Module rb_mQt6QtCore);
@@ -0,0 +1,61 @@
1
+ #include "qstandardpaths-rb.hpp"
2
+ #include <qstandardpaths.h>
3
+ #include <rice/qt6/qenum.hpp>
4
+ #include <rice/qt6/qflags.hpp>
5
+
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
+
8
+ Class rb_cQStandardPaths;
9
+
10
+ void Init_qstandardpaths(Module rb_mQt6QtCore)
11
+ {
12
+ rb_cQStandardPaths =
13
+ // RubyQt6::QtCore::QStandardPaths
14
+ define_class_under<QStandardPaths>(rb_mQt6QtCore, "QStandardPaths")
15
+ // Static Public Members
16
+ .define_singleton_function("display_name", &QStandardPaths::displayName, Arg("type"))
17
+ .define_singleton_function("find_executable", &QStandardPaths::findExecutable, Arg("executable_name"), Arg("paths") = static_cast<const QStringList &>(QStringList()))
18
+ .define_singleton_function("test_mode_enabled?", &QStandardPaths::isTestModeEnabled)
19
+ .define_singleton_function("locate", &QStandardPaths::locate, Arg("type"), Arg("file_name"), Arg("options") = static_cast<QStandardPaths::LocateOptions>(QStandardPaths::LocateFile))
20
+ .define_singleton_function("locate_all", &QStandardPaths::locateAll, Arg("type"), Arg("file_name"), Arg("options") = static_cast<QStandardPaths::LocateOptions>(QStandardPaths::LocateFile))
21
+ .define_singleton_function("set_test_mode_enabled", &QStandardPaths::setTestModeEnabled, Arg("test_mode"))
22
+ .define_singleton_function("standard_locations", &QStandardPaths::standardLocations, Arg("type"))
23
+ .define_singleton_function("writable_location", &QStandardPaths::writableLocation, Arg("type"));
24
+
25
+ Data_Type<QStandardPaths::LocateOption> rb_cQStandardPathsLocateOption =
26
+ // RubyQt6::QtCore::QStandardPaths::LocateOption
27
+ define_qenum_under<QStandardPaths::LocateOption>(rb_cQStandardPaths, "LocateOption");
28
+ define_qenum_value_under(rb_cQStandardPathsLocateOption, "LocateFile", QStandardPaths::LocateOption::LocateFile);
29
+ define_qenum_value_under(rb_cQStandardPathsLocateOption, "LocateDirectory", QStandardPaths::LocateOption::LocateDirectory);
30
+
31
+ Data_Type<QStandardPaths::StandardLocation> rb_cQStandardPathsStandardLocation =
32
+ // RubyQt6::QtCore::QStandardPaths::StandardLocation
33
+ define_qenum_under<QStandardPaths::StandardLocation>(rb_cQStandardPaths, "StandardLocation");
34
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "DesktopLocation", QStandardPaths::StandardLocation::DesktopLocation);
35
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "DocumentsLocation", QStandardPaths::StandardLocation::DocumentsLocation);
36
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "FontsLocation", QStandardPaths::StandardLocation::FontsLocation);
37
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "ApplicationsLocation", QStandardPaths::StandardLocation::ApplicationsLocation);
38
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "MusicLocation", QStandardPaths::StandardLocation::MusicLocation);
39
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "MoviesLocation", QStandardPaths::StandardLocation::MoviesLocation);
40
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "PicturesLocation", QStandardPaths::StandardLocation::PicturesLocation);
41
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "TempLocation", QStandardPaths::StandardLocation::TempLocation);
42
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "HomeLocation", QStandardPaths::StandardLocation::HomeLocation);
43
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "AppLocalDataLocation", QStandardPaths::StandardLocation::AppLocalDataLocation);
44
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "CacheLocation", QStandardPaths::StandardLocation::CacheLocation);
45
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "GenericDataLocation", QStandardPaths::StandardLocation::GenericDataLocation);
46
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "RuntimeLocation", QStandardPaths::StandardLocation::RuntimeLocation);
47
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "ConfigLocation", QStandardPaths::StandardLocation::ConfigLocation);
48
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "DownloadLocation", QStandardPaths::StandardLocation::DownloadLocation);
49
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "GenericCacheLocation", QStandardPaths::StandardLocation::GenericCacheLocation);
50
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "GenericConfigLocation", QStandardPaths::StandardLocation::GenericConfigLocation);
51
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "AppDataLocation", QStandardPaths::StandardLocation::AppDataLocation);
52
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "AppConfigLocation", QStandardPaths::StandardLocation::AppConfigLocation);
53
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "PublicShareLocation", QStandardPaths::StandardLocation::PublicShareLocation);
54
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "TemplatesLocation", QStandardPaths::StandardLocation::TemplatesLocation);
55
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "StateLocation", QStandardPaths::StandardLocation::StateLocation);
56
+ define_qenum_value_under(rb_cQStandardPathsStandardLocation, "GenericStateLocation", QStandardPaths::StandardLocation::GenericStateLocation);
57
+
58
+ Data_Type<QFlags<QStandardPaths::LocateOption>> rb_cQStandardPathsLocateOptions =
59
+ // RubyQt6::QtCore::QStandardPaths::LocateOptions
60
+ define_qflags_under<QStandardPaths::LocateOption>(rb_cQStandardPaths, "LocateOptions");
61
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qstandardpaths(Module rb_mQt6QtCore);
@@ -3,9 +3,9 @@
3
3
 
4
4
  #include <QRegularExpression>
5
5
 
6
- using namespace Rice;
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
7
 
8
- Rice::Class rb_cQString;
8
+ Class rb_cQString;
9
9
 
10
10
  std::optional<QString> QString_slice(QString *self, qsizetype start, qsizetype length)
11
11
  {
@@ -37,7 +37,7 @@ QString QString_replace(QString *self, qsizetype start, const QString &after)
37
37
  return self->replace(start, 1, after);
38
38
  }
39
39
 
40
- void Init_qstring(Rice::Module rb_mQt6QtCore)
40
+ void Init_qstring(Module rb_mQt6QtCore)
41
41
  {
42
42
  rb_cQString =
43
43
  // RubyQt6::QtCore::QString
@@ -62,6 +62,8 @@ void Init_qstring(Rice::Module rb_mQt6QtCore)
62
62
  .define_method("to_std_string", &QString::toStdString)
63
63
  .define_method<bool (QString::*)(const QRegularExpression &, QRegularExpressionMatch *) const>("_contains", &QString::contains, Arg("re"), Arg("rmatch") = static_cast<QRegularExpressionMatch *>(nullptr))
64
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<qsizetype (QString::*)(const QString &, qsizetype, Qt::CaseSensitivity) const>("_index_of", &QString::indexOf, Arg("s"), Arg("from") = static_cast<qsizetype>(0), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
66
+ .define_method<qsizetype (QString::*)(const QRegularExpression &, qsizetype, QRegularExpressionMatch *) const>("_index_of", &QString::indexOf, Arg("re"), Arg("from") = static_cast<qsizetype>(0), Arg("rmatch") = static_cast<QRegularExpressionMatch *>(nullptr))
65
67
  .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
68
  .define_method<QStringList (QString::*)(const QRegularExpression &, Qt::SplitBehavior) const>("_split", &QString::split, Arg("sep"), Arg("behavior") = static_cast<Qt::SplitBehavior>(Qt::KeepEmptyParts));
67
69
  }
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qstring(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qstring(Module rb_mQt6QtCore);
@@ -3,51 +3,15 @@
3
3
 
4
4
  #include <QList>
5
5
 
6
- using namespace Rice;
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
7
 
8
- Rice::Class rb_cQStringList;
8
+ Class rb_cQStringList;
9
9
 
10
- void Init_qstringlist(Rice::Module rb_mQt6QtCore)
10
+ void Init_qstringlist(Module rb_mQt6QtCore)
11
11
  {
12
12
  rb_cQStringList =
13
13
  // RubyQt6::QtCore::QStringList
14
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
- });
15
+ .define_method("join", [](QStringList *self, const char *separator) -> QString { return self->join(separator); }, Arg("separator") = static_cast<const char *>(nullptr))
16
+ .define_method("join", [](QStringList *self, QString &separator) -> QString { return self->join(separator); }, Arg("separator") = static_cast<const QString &>(QString()));
53
17
  }
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qstringlist(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qstringlist(Module rb_mQt6QtCore);
@@ -2,9 +2,9 @@
2
2
  #include <qnamespace.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- void Init_qt_enum_af(Rice::Module rb_mQt6QtCore)
7
+ void Init_qt_enum_af(Module rb_mQt6QtCore)
8
8
  {
9
9
  Module rb_mQt =
10
10
  // RubyQt6::QtCore::Qt
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qt_enum_af(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qt_enum_af(Module rb_mQt6QtCore);
@@ -2,9 +2,9 @@
2
2
  #include <qnamespace.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- void Init_qt_enum_gl(Rice::Module rb_mQt6QtCore)
7
+ void Init_qt_enum_gl(Module rb_mQt6QtCore)
8
8
  {
9
9
  Module rb_mQt =
10
10
  // RubyQt6::QtCore::Qt
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qt_enum_gl(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qt_enum_gl(Module rb_mQt6QtCore);
@@ -2,9 +2,9 @@
2
2
  #include <qnamespace.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- void Init_qt_enum_mr(Rice::Module rb_mQt6QtCore)
7
+ void Init_qt_enum_mr(Module rb_mQt6QtCore)
8
8
  {
9
9
  Module rb_mQt =
10
10
  // RubyQt6::QtCore::Qt
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qt_enum_mr(Rice::Module rb_mQt6QtCore);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qt_enum_mr(Module rb_mQt6QtCore);