ruby-qt6-qtgui 1.0.0 → 2.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 (126) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -0
  3. data/ext/qt6/qtgui/extconf.rb +3 -13
  4. data/ext/qt6/qtgui/qaction-rb.cpp +12 -12
  5. data/ext/qt6/qtgui/qaction-rb.hpp +4 -3
  6. data/ext/qt6/qtgui/qactiongroup-rb.cpp +6 -6
  7. data/ext/qt6/qtgui/qactiongroup-rb.hpp +4 -3
  8. data/ext/qt6/qtgui/qbrush-rb.cpp +6 -4
  9. data/ext/qt6/qtgui/qbrush-rb.hpp +4 -3
  10. data/ext/qt6/qtgui/qclipboard-rb.cpp +8 -8
  11. data/ext/qt6/qtgui/qclipboard-rb.hpp +4 -3
  12. data/ext/qt6/qtgui/qcolor-rb.cpp +8 -3
  13. data/ext/qt6/qtgui/qcolor-rb.hpp +4 -3
  14. data/ext/qt6/qtgui/qcursor-rb.cpp +3 -3
  15. data/ext/qt6/qtgui/qcursor-rb.hpp +4 -3
  16. data/ext/qt6/qtgui/qdesktopservices-rb.cpp +17 -0
  17. data/ext/qt6/qtgui/qdesktopservices-rb.hpp +5 -0
  18. data/ext/qt6/qtgui/qevent-rb.cpp +45 -45
  19. data/ext/qt6/qtgui/qevent-rb.hpp +4 -3
  20. data/ext/qt6/qtgui/qfilesystemmodel-rb.cpp +7 -7
  21. data/ext/qt6/qtgui/qfilesystemmodel-rb.hpp +4 -3
  22. data/ext/qt6/qtgui/qfont-rb.cpp +6 -4
  23. data/ext/qt6/qtgui/qfont-rb.hpp +4 -3
  24. data/ext/qt6/qtgui/qfontdatabase-rb.cpp +3 -3
  25. data/ext/qt6/qtgui/qfontdatabase-rb.hpp +4 -3
  26. data/ext/qt6/qtgui/qfontinfo-rb.cpp +3 -3
  27. data/ext/qt6/qtgui/qfontinfo-rb.hpp +4 -3
  28. data/ext/qt6/qtgui/qfontmetrics-rb.cpp +4 -4
  29. data/ext/qt6/qtgui/qfontmetrics-rb.hpp +4 -3
  30. data/ext/qt6/qtgui/qgradient-rb.cpp +86 -0
  31. data/ext/qt6/qtgui/qgradient-rb.hpp +5 -0
  32. data/ext/qt6/qtgui/qguiapplication-rb.cpp +16 -18
  33. data/ext/qt6/qtgui/qguiapplication-rb.hpp +4 -3
  34. data/ext/qt6/qtgui/qicon-rb.cpp +3 -3
  35. data/ext/qt6/qtgui/qicon-rb.hpp +4 -3
  36. data/ext/qt6/qtgui/qimage-rb.cpp +3 -3
  37. data/ext/qt6/qtgui/qimage-rb.hpp +4 -3
  38. data/ext/qt6/qtgui/qimagewriter-rb.cpp +3 -3
  39. data/ext/qt6/qtgui/qimagewriter-rb.hpp +4 -3
  40. data/ext/qt6/qtgui/qkeysequence-rb.cpp +3 -4
  41. data/ext/qt6/qtgui/qkeysequence-rb.hpp +4 -3
  42. data/ext/qt6/qtgui/qmovie-rb.cpp +10 -10
  43. data/ext/qt6/qtgui/qmovie-rb.hpp +4 -3
  44. data/ext/qt6/qtgui/qpagedpaintdevice-rb.cpp +3 -3
  45. data/ext/qt6/qtgui/qpagedpaintdevice-rb.hpp +4 -3
  46. data/ext/qt6/qtgui/qpaintdevice-rb.cpp +3 -3
  47. data/ext/qt6/qtgui/qpaintdevice-rb.hpp +4 -3
  48. data/ext/qt6/qtgui/qpainter-rb.cpp +3 -3
  49. data/ext/qt6/qtgui/qpainter-rb.hpp +4 -3
  50. data/ext/qt6/qtgui/qpainterpath-rb.cpp +4 -4
  51. data/ext/qt6/qtgui/qpainterpath-rb.hpp +4 -3
  52. data/ext/qt6/qtgui/qpainterpathstroker-rb.cpp +3 -3
  53. data/ext/qt6/qtgui/qpainterpathstroker-rb.hpp +4 -3
  54. data/ext/qt6/qtgui/qpalette-rb.cpp +5 -3
  55. data/ext/qt6/qtgui/qpalette-rb.hpp +4 -3
  56. data/ext/qt6/qtgui/qpen-rb.cpp +5 -3
  57. data/ext/qt6/qtgui/qpen-rb.hpp +4 -3
  58. data/ext/qt6/qtgui/qpicture-rb.cpp +3 -3
  59. data/ext/qt6/qtgui/qpicture-rb.hpp +4 -3
  60. data/ext/qt6/qtgui/qpixmap-rb.cpp +7 -6
  61. data/ext/qt6/qtgui/qpixmap-rb.hpp +4 -3
  62. data/ext/qt6/qtgui/qpolygon-rb.cpp +4 -4
  63. data/ext/qt6/qtgui/qpolygon-rb.hpp +4 -3
  64. data/ext/qt6/qtgui/qregion-rb.cpp +3 -3
  65. data/ext/qt6/qtgui/qregion-rb.hpp +4 -3
  66. data/ext/qt6/qtgui/qscreen-rb.cpp +13 -13
  67. data/ext/qt6/qtgui/qscreen-rb.hpp +4 -3
  68. data/ext/qt6/qtgui/qshortcut-rb.cpp +6 -6
  69. data/ext/qt6/qtgui/qshortcut-rb.hpp +4 -3
  70. data/ext/qt6/qtgui/qstandarditemmodel-rb.cpp +7 -7
  71. data/ext/qt6/qtgui/qstandarditemmodel-rb.hpp +4 -3
  72. data/ext/qt6/qtgui/qstylehints-rb.cpp +73 -0
  73. data/ext/qt6/qtgui/qstylehints-rb.hpp +5 -0
  74. data/ext/qt6/qtgui/qtextcursor-rb.cpp +3 -3
  75. data/ext/qt6/qtgui/qtextcursor-rb.hpp +4 -3
  76. data/ext/qt6/qtgui/qtextdocument-rb.cpp +13 -14
  77. data/ext/qt6/qtgui/qtextdocument-rb.hpp +4 -3
  78. data/ext/qt6/qtgui/qtextformat-rb.cpp +30 -11
  79. data/ext/qt6/qtgui/qtextformat-rb.hpp +4 -3
  80. data/ext/qt6/qtgui/qtextlayout-rb.cpp +88 -0
  81. data/ext/qt6/qtgui/qtextlayout-rb.hpp +5 -0
  82. data/ext/qt6/qtgui/qtextlist-rb.cpp +3 -3
  83. data/ext/qt6/qtgui/qtextlist-rb.hpp +4 -3
  84. data/ext/qt6/qtgui/qtextobject-rb.cpp +47 -5
  85. data/ext/qt6/qtgui/qtextobject-rb.hpp +4 -3
  86. data/ext/qt6/qtgui/qtextoption-rb.cpp +3 -3
  87. data/ext/qt6/qtgui/qtextoption-rb.hpp +4 -3
  88. data/ext/qt6/qtgui/qtexttable-rb.cpp +4 -4
  89. data/ext/qt6/qtgui/qtexttable-rb.hpp +4 -3
  90. data/ext/qt6/qtgui/qtgui-rb.cpp +14 -4
  91. data/ext/qt6/qtgui/qtgui-rb.hpp +1 -1
  92. data/ext/qt6/qtgui/qtguiversion-rb.cpp +2 -2
  93. data/ext/qt6/qtgui/qtguiversion-rb.hpp +4 -3
  94. data/ext/qt6/qtgui/qtransform-rb.cpp +3 -3
  95. data/ext/qt6/qtgui/qtransform-rb.hpp +4 -3
  96. data/ext/qt6/qtgui/qvalidator-rb.cpp +18 -18
  97. data/ext/qt6/qtgui/qvalidator-rb.hpp +4 -3
  98. data/ext/qt6/qtgui/qwindow-rb.cpp +23 -28
  99. data/ext/qt6/qtgui/qwindow-rb.hpp +4 -3
  100. data/ext/qt6/qtgui/t-qtgui-rb.cpp +10 -2
  101. data/ext/qt6/qtgui/t-qtgui-rb.hpp +4 -3
  102. data/lib/qt6/qtgui/qaction.rb +5 -0
  103. data/lib/qt6/qtgui/qactiongroup.rb +1 -1
  104. data/lib/qt6/qtgui/qbrush.rb +9 -0
  105. data/lib/qt6/qtgui/qcolor.rb +14 -0
  106. data/lib/qt6/qtgui/qconicalgradient.rb +27 -0
  107. data/lib/qt6/qtgui/qdesktopservices.rb +9 -0
  108. data/lib/qt6/qtgui/qfont.rb +11 -0
  109. data/lib/qt6/qtgui/qgradient.rb +27 -0
  110. data/lib/qt6/qtgui/qguiapplication.rb +2 -3
  111. data/lib/qt6/qtgui/qicon.rb +1 -1
  112. data/lib/qt6/qtgui/qkeysequence.rb +0 -2
  113. data/lib/qt6/qtgui/qlineargradient.rb +28 -0
  114. data/lib/qt6/qtgui/qpalette.rb +6 -0
  115. data/lib/qt6/qtgui/qpen.rb +6 -0
  116. data/lib/qt6/qtgui/qpixmap.rb +6 -0
  117. data/lib/qt6/qtgui/qradialgradient.rb +53 -0
  118. data/lib/qt6/qtgui/qstandarditem.rb +11 -0
  119. data/lib/qt6/qtgui/qstylehints.rb +25 -0
  120. data/lib/qt6/qtgui/qtextblock.rb +22 -0
  121. data/lib/qt6/qtgui/qtextlayout.rb +46 -0
  122. data/lib/qt6/qtgui/qtextlength.rb +25 -0
  123. data/lib/qt6/qtgui/qtexttableformat.rb +11 -0
  124. data/lib/qt6/qtgui/version.rb +1 -1
  125. data/lib/qt6/qtgui.rb +9 -0
  126. metadata +27 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb289db3cfd2fd11812f3e88ca7f924b8683640f9cde94d4b3d09900810d8a47
4
- data.tar.gz: 3525b00bf1850c5d9b1cf1de2bd7dc4e7b9cdf003ca492304b37619d2969fea3
3
+ metadata.gz: a6ad75c4691d95ffe882847fd386ce429378fc87ac46e9dd9d150331091e7ea8
4
+ data.tar.gz: 12456cf5461abc6ad9f3e8605679055f08a586114a4a5e7f8227faf19361d0da
5
5
  SHA512:
6
- metadata.gz: b36ace3c3c0663415d4f58c903af6a6755ccf93bec5d9bf1a877a7cfc4c5714ecc0168e89a194bf7fecad454643a49c93785548d2828f80f371cb4c9a6c98903
7
- data.tar.gz: 9e9e5866e0efb8ffe9351f69442136cf6b2b42905d0efb4f2f42fd214bada7f7ac2fb0fd85fa0f9292dcaf663e0b290d84043433d1d052aa5c028673f64a5f48
6
+ metadata.gz: f2194d2e588a5f5fa5390433a26e8f02bc02d6b9d53b6e9780d111928213e6cb4ee5b7cabba6433a2ac43b3bc0666ef8cf0444776aabce25cc772fb388cbbba2
7
+ data.tar.gz: 6b2a72030a2c8184ddc285d8346999715a4d250b62bdfdbab5cc8fcede8ec269b2a1250e0d166fc4ad5bd18ed8c2448be5c31d3bc1c21511e8b0a9406e528eb4
data/Rakefile CHANGED
@@ -8,6 +8,10 @@ Rake::ExtensionTask.new("qtgui", GEMSPEC) do |ext|
8
8
  ext.ext_dir = "ext/qt6/qtgui"
9
9
  ext.lib_dir = "lib/qt6/qtgui"
10
10
  end
11
+ Rake::Task["rake:compile"].enhance do
12
+ mkdir_p Pathname.new(GEMSPEC.gem_build_complete_path).parent
13
+ touch GEMSPEC.gem_build_complete_path
14
+ end
11
15
 
12
16
  require "rubocop/rake_task"
13
17
  RuboCop::RakeTask.new
@@ -1,16 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RUBYQT6_RICE_LIB_PATH = File.join(__dir__, "../../../../rice/lib")
4
- if File.exist?(RUBYQT6_RICE_LIB_PATH)
5
- require File.join(RUBYQT6_RICE_LIB_PATH, "mkmf-rubyqt6.rb")
6
- else
7
- require "mkmf-rubyqt6"
8
- end
3
+ RUBYQT6_RICE_GEM_PATH = Gem::Specification.find_by_name("ruby-qt6-rice").full_gem_path
4
+ require File.join(RUBYQT6_RICE_GEM_PATH, "lib/mkmf-rubyqt6.rb")
9
5
 
10
- includedir = qt_install_headers
11
- append_cppflags("-I#{includedir}")
12
- append_cppflags("-I#{includedir}/QtCore")
13
- append_cppflags("-I#{includedir}/QtGui")
14
- abort "libQt6Gui is missing, please install qt6-base" unless have_library("Qt6Gui")
15
-
16
- create_makefile("qt6/qtgui/qtgui")
6
+ rubyqt6_extconf("QtGui", depends: ["QtCore"])
@@ -5,11 +5,11 @@
5
5
  #include <QActionGroup>
6
6
  #include <QFont>
7
7
 
8
- using namespace Rice;
8
+ RICE4RUBYQT6_USE_NAMESPACE
9
9
 
10
- Rice::Class rb_cQAction;
10
+ Class rb_cQAction;
11
11
 
12
- void Init_qaction(Rice::Module rb_mQt6QtGui)
12
+ void Init_qaction(Module rb_mQt6QtGui)
13
13
  {
14
14
  rb_cQAction =
15
15
  // RubyQt6::QtGui::QAction
@@ -47,7 +47,7 @@ void Init_qaction(Rice::Module rb_mQt6QtGui)
47
47
  .define_method("set_menu_role", &QAction::setMenuRole, Arg("menu_role"))
48
48
  .define_method("set_priority", &QAction::setPriority, Arg("priority"))
49
49
  .define_method("set_separator", &QAction::setSeparator, Arg("b"))
50
- .define_method("set_shortcut", &QAction::setShortcut, Arg("shortcut"))
50
+ .define_method("_set_shortcut", &QAction::setShortcut, Arg("shortcut"))
51
51
  .define_method("set_shortcut_context", &QAction::setShortcutContext, Arg("context"))
52
52
  .define_method("set_shortcut_visible_in_context_menu", &QAction::setShortcutVisibleInContextMenu, Arg("show"))
53
53
  .define_method<void (QAction::*)(QKeySequence::StandardKey)>("set_shortcuts", &QAction::setShortcuts, Arg("shortcuts"))
@@ -72,15 +72,15 @@ void Init_qaction(Rice::Module rb_mQt6QtGui)
72
72
  .define_method("set_enabled", &QAction::setEnabled, Arg("b"))
73
73
  .define_method("set_visible", &QAction::setVisible, Arg("b"))
74
74
  .define_method("toggle", &QAction::toggle)
75
- .define_method("trigger", &QAction::trigger)
75
+ .define_method("trigger", &QAction::trigger);
76
76
  // Signals
77
- .define_method("changed", &QAction::changed)
78
- .define_method("checkable_changed", &QAction::checkableChanged, Arg("checkable"))
79
- .define_method("enabled_changed", &QAction::enabledChanged, Arg("enabled"))
80
- .define_method("hovered", &QAction::hovered)
81
- .define_method("toggled", &QAction::toggled, Arg("checked"))
82
- .define_method("triggered", &QAction::triggered, Arg("checked") = static_cast<bool>(false))
83
- .define_method("visible_changed", &QAction::visibleChanged);
77
+ // .define_method("changed", &QAction::changed)
78
+ // .define_method("checkable_changed", &QAction::checkableChanged, Arg("checkable"))
79
+ // .define_method("enabled_changed", &QAction::enabledChanged, Arg("enabled"))
80
+ // .define_method("hovered", &QAction::hovered)
81
+ // .define_method("toggled", &QAction::toggled, Arg("checked"))
82
+ // .define_method("triggered", &QAction::triggered, Arg("checked") = static_cast<bool>(false))
83
+ // .define_method("visible_changed", &QAction::visibleChanged);
84
84
 
85
85
  Data_Type<QAction::MenuRole> rb_cQActionMenuRole =
86
86
  // RubyQt6::QtGui::QAction::MenuRole
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qaction(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qaction(Module rb_mQt6QtGui);
@@ -2,11 +2,11 @@
2
2
  #include <qactiongroup.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQActionGroup;
7
+ Class rb_cQActionGroup;
8
8
 
9
- void Init_qactiongroup(Rice::Module rb_mQt6QtGui)
9
+ void Init_qactiongroup(Module rb_mQt6QtGui)
10
10
  {
11
11
  rb_cQActionGroup =
12
12
  // RubyQt6::QtGui::QActionGroup
@@ -31,10 +31,10 @@ void Init_qactiongroup(Rice::Module rb_mQt6QtGui)
31
31
  .define_method("set_enabled", &QActionGroup::setEnabled, Arg("b"))
32
32
  .define_method("set_exclusion_policy", &QActionGroup::setExclusionPolicy, Arg("policy"))
33
33
  .define_method("set_exclusive", &QActionGroup::setExclusive, Arg("b"))
34
- .define_method("set_visible", &QActionGroup::setVisible, Arg("b"))
34
+ .define_method("set_visible", &QActionGroup::setVisible, Arg("b"));
35
35
  // Signals
36
- .define_method("hovered", &QActionGroup::hovered, Arg("action"))
37
- .define_method("triggered", &QActionGroup::triggered, Arg("action"));
36
+ // .define_method("hovered", &QActionGroup::hovered, Arg("action"))
37
+ // .define_method("triggered", &QActionGroup::triggered, Arg("action"));
38
38
 
39
39
  Data_Type<QActionGroup::ExclusionPolicy> rb_cQActionGroupExclusionPolicy =
40
40
  // RubyQt6::QtGui::QActionGroup::ExclusionPolicy
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qactiongroup(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qactiongroup(Module rb_mQt6QtGui);
@@ -1,15 +1,17 @@
1
1
  #include "qbrush-rb.hpp"
2
2
  #include <qbrush.h>
3
3
 
4
- using namespace Rice;
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
5
 
6
- Rice::Class rb_cQBrush;
6
+ Class rb_cQBrush;
7
7
 
8
- void Init_qbrush(Rice::Module rb_mQt6QtGui)
8
+ void Init_qbrush(Module rb_mQt6QtGui)
9
9
  {
10
10
  rb_cQBrush =
11
11
  // RubyQt6::QtGui::QBrush
12
12
  define_class_under<QBrush>(rb_mQt6QtGui, "QBrush")
13
+ // RubyQt6-Defined Functions
14
+ .define_singleton_function("_operator_equal", [](QBrush *lhs, QBrush *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
13
15
  // Constructor
14
16
  .define_constructor(Constructor<QBrush>())
15
17
  .define_constructor(Constructor<QBrush, Qt::BrushStyle>(), Arg("bs"))
@@ -19,7 +21,7 @@ void Init_qbrush(Rice::Module rb_mQt6QtGui)
19
21
  .define_constructor(Constructor<QBrush, const QColor &>(), Arg("color"))
20
22
  .define_constructor(Constructor<QBrush, const QColor &, Qt::BrushStyle>(), Arg("color"), Arg("bs"))
21
23
  .define_constructor(Constructor<QBrush, const QColor &, const QPixmap &>(), Arg("color"), Arg("pixmap"))
22
- // .define_constructor(Constructor<QBrush, const QGradient &>(), Arg("gradient"))
24
+ .define_constructor(Constructor<QBrush, const QGradient &>(), Arg("gradient"))
23
25
  .define_constructor(Constructor<QBrush, const QImage &>(), Arg("image"))
24
26
  .define_constructor(Constructor<QBrush, const QPixmap &>(), Arg("pixmap"))
25
27
  // Public Functions
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qbrush(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qbrush(Module rb_mQt6QtGui);
@@ -6,11 +6,11 @@
6
6
  #include <QPixmap>
7
7
  #include <QMimeData>
8
8
 
9
- using namespace Rice;
9
+ RICE4RUBYQT6_USE_NAMESPACE
10
10
 
11
- Rice::Class rb_cQClipboard;
11
+ Class rb_cQClipboard;
12
12
 
13
- void Init_qclipboard(Rice::Module rb_mQt6QtGui)
13
+ void Init_qclipboard(Module rb_mQt6QtGui)
14
14
  {
15
15
  rb_cQClipboard =
16
16
  // RubyQt6::QtGui::QClipboard
@@ -32,12 +32,12 @@ void Init_qclipboard(Rice::Module rb_mQt6QtGui)
32
32
  .define_method("supports_find_buffer", &QClipboard::supportsFindBuffer)
33
33
  .define_method("supports_selection", &QClipboard::supportsSelection)
34
34
  .define_method<QString (QClipboard::*)(QClipboard::Mode) const>("text", &QClipboard::text, Arg("mode") = static_cast<QClipboard::Mode>(QClipboard::Mode::Clipboard))
35
- .define_method<QString (QClipboard::*)(QString &, QClipboard::Mode) const>("text", &QClipboard::text, Arg("subtype"), Arg("mode") = static_cast<QClipboard::Mode>(QClipboard::Mode::Clipboard))
35
+ .define_method<QString (QClipboard::*)(QString &, QClipboard::Mode) const>("text", &QClipboard::text, Arg("subtype"), Arg("mode") = static_cast<QClipboard::Mode>(QClipboard::Mode::Clipboard));
36
36
  // Signals
37
- .define_method("changed", &QClipboard::changed, Arg("mode"))
38
- .define_method("data_changed", &QClipboard::dataChanged)
39
- .define_method("find_buffer_changed", &QClipboard::findBufferChanged)
40
- .define_method("selection_changed", &QClipboard::selectionChanged);
37
+ // .define_method("changed", &QClipboard::changed, Arg("mode"))
38
+ // .define_method("data_changed", &QClipboard::dataChanged)
39
+ // .define_method("find_buffer_changed", &QClipboard::findBufferChanged)
40
+ // .define_method("selection_changed", &QClipboard::selectionChanged);
41
41
 
42
42
  Data_Type<QClipboard::Mode> rb_cQClipboardMode =
43
43
  // RubyQt6::QtGui::QClipboard::Mode
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qclipboard(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qclipboard(Module rb_mQt6QtGui);
@@ -2,15 +2,20 @@
2
2
  #include <qcolor.h>
3
3
  #include <rice/qt6/qenum.hpp>
4
4
 
5
- using namespace Rice;
5
+ RICE4RUBYQT6_USE_NAMESPACE
6
6
 
7
- Rice::Class rb_cQColor;
7
+ Class rb_cQColor;
8
8
 
9
- void Init_qcolor(Rice::Module rb_mQt6QtGui)
9
+ void Init_qcolor(Module rb_mQt6QtGui)
10
10
  {
11
11
  rb_cQColor =
12
12
  // RubyQt6::QtGui::QColor
13
13
  define_class_under<QColor>(rb_mQt6QtGui, "QColor")
14
+ // RubyQt6-Defined Functions
15
+ .define_singleton_function("_operator_equal", [](QColor *lhs, QColor *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
16
+ .define_singleton_function("_qvariant_register_metatype", []() -> int { return qRegisterMetaType<QColor>(); })
17
+ .define_singleton_function("_qvariant_from_value", [](const QColor &value) -> QVariant { return QVariant::fromValue(value); })
18
+ .define_singleton_function("_qvariant_to_value", [](const QVariant &qvariant) -> QColor { return qvariant.value<QColor>(); })
14
19
  // Constructor
15
20
  .define_constructor(Constructor<QColor>())
16
21
  .define_constructor(Constructor<QColor, int, int, int>(), Arg("r"), Arg("g"), Arg("b"))
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qcolor(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qcolor(Module rb_mQt6QtGui);
@@ -3,11 +3,11 @@
3
3
 
4
4
  #include <QScreen>
5
5
 
6
- using namespace Rice;
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
7
 
8
- Rice::Class rb_cQCursor;
8
+ Class rb_cQCursor;
9
9
 
10
- void Init_qcursor(Rice::Module rb_mQt6QtGui)
10
+ void Init_qcursor(Module rb_mQt6QtGui)
11
11
  {
12
12
  rb_cQCursor =
13
13
  // RubyQt6::QtGui::QCursor
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qcursor(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qcursor(Module rb_mQt6QtGui);
@@ -0,0 +1,17 @@
1
+ #include "qdesktopservices-rb.hpp"
2
+ #include <qdesktopservices.h>
3
+
4
+ #include <QUrl>
5
+
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
+
8
+ Class rb_cQDesktopServices;
9
+
10
+ void Init_qdesktopservices(Module rb_mQt6QtGui)
11
+ {
12
+ rb_cQDesktopServices =
13
+ // RubyQt6::QtGui::QDesktopServices
14
+ define_class_under<QDesktopServices>(rb_mQt6QtGui, "QDesktopServices")
15
+ // Static Public Members
16
+ .define_singleton_function("open_url", &QDesktopServices::openUrl, Arg("url"));
17
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qdesktopservices(Module rb_mQt6QtGui);
@@ -8,51 +8,51 @@
8
8
  #include <QPointer>
9
9
  #include <QWindow>
10
10
 
11
- using namespace Rice;
12
-
13
- Rice::Class rb_cQActionEvent;
14
- Rice::Class rb_cQApplicationStateChangeEvent;
15
- Rice::Class rb_cQChildWindowEvent;
16
- Rice::Class rb_cQCloseEvent;
17
- Rice::Class rb_cQDragLeaveEvent;
18
- Rice::Class rb_cQDropEvent;
19
- Rice::Class rb_cQDragMoveEvent;
20
- Rice::Class rb_cQDragEnterEvent;
21
- Rice::Class rb_cQExposeEvent;
22
- Rice::Class rb_cQFileOpenEvent;
23
- Rice::Class rb_cQFocusEvent;
24
- Rice::Class rb_cQHelpEvent;
25
- Rice::Class rb_cQHideEvent;
26
- Rice::Class rb_cQIconDragEvent;
27
- Rice::Class rb_cQInputEvent;
28
- Rice::Class rb_cQInputMethodEvent;
29
- Rice::Class rb_cQInputMethodQueryEvent;
30
- Rice::Class rb_cQMoveEvent;
31
- Rice::Class rb_cQPaintEvent;
32
- Rice::Class rb_cQPlatformSurfaceEvent;
33
- Rice::Class rb_cQResizeEvent;
34
- Rice::Class rb_cQScreenOrientationChangeEvent;
35
- Rice::Class rb_cQScrollEvent;
36
- Rice::Class rb_cQScrollPrepareEvent;
37
- Rice::Class rb_cQShortcutEvent;
38
- Rice::Class rb_cQShowEvent;
39
- Rice::Class rb_cQStatusTipEvent;
40
- Rice::Class rb_cQToolBarChangeEvent;
41
- Rice::Class rb_cQWhatsThisClickedEvent;
42
- Rice::Class rb_cQWindowStateChangeEvent;
43
- Rice::Class rb_cQContextMenuEvent;
44
- Rice::Class rb_cQKeyEvent;
45
- Rice::Class rb_cQPointerEvent;
46
- Rice::Class rb_cQSinglePointEvent;
47
- Rice::Class rb_cQEnterEvent;
48
- Rice::Class rb_cQHoverEvent;
49
- Rice::Class rb_cQMouseEvent;
50
- Rice::Class rb_cQNativeGestureEvent;
51
- Rice::Class rb_cQTabletEvent;
52
- Rice::Class rb_cQWheelEvent;
53
- Rice::Class rb_cQTouchEvent;
54
-
55
- void Init_qevent(Rice::Module rb_mQt6QtGui)
11
+ RICE4RUBYQT6_USE_NAMESPACE
12
+
13
+ Class rb_cQActionEvent;
14
+ Class rb_cQApplicationStateChangeEvent;
15
+ Class rb_cQChildWindowEvent;
16
+ Class rb_cQCloseEvent;
17
+ Class rb_cQDragLeaveEvent;
18
+ Class rb_cQDropEvent;
19
+ Class rb_cQDragMoveEvent;
20
+ Class rb_cQDragEnterEvent;
21
+ Class rb_cQExposeEvent;
22
+ Class rb_cQFileOpenEvent;
23
+ Class rb_cQFocusEvent;
24
+ Class rb_cQHelpEvent;
25
+ Class rb_cQHideEvent;
26
+ Class rb_cQIconDragEvent;
27
+ Class rb_cQInputEvent;
28
+ Class rb_cQInputMethodEvent;
29
+ Class rb_cQInputMethodQueryEvent;
30
+ Class rb_cQMoveEvent;
31
+ Class rb_cQPaintEvent;
32
+ Class rb_cQPlatformSurfaceEvent;
33
+ Class rb_cQResizeEvent;
34
+ Class rb_cQScreenOrientationChangeEvent;
35
+ Class rb_cQScrollEvent;
36
+ Class rb_cQScrollPrepareEvent;
37
+ Class rb_cQShortcutEvent;
38
+ Class rb_cQShowEvent;
39
+ Class rb_cQStatusTipEvent;
40
+ Class rb_cQToolBarChangeEvent;
41
+ Class rb_cQWhatsThisClickedEvent;
42
+ Class rb_cQWindowStateChangeEvent;
43
+ Class rb_cQContextMenuEvent;
44
+ Class rb_cQKeyEvent;
45
+ Class rb_cQPointerEvent;
46
+ Class rb_cQSinglePointEvent;
47
+ Class rb_cQEnterEvent;
48
+ Class rb_cQHoverEvent;
49
+ Class rb_cQMouseEvent;
50
+ Class rb_cQNativeGestureEvent;
51
+ Class rb_cQTabletEvent;
52
+ Class rb_cQWheelEvent;
53
+ Class rb_cQTouchEvent;
54
+
55
+ void Init_qevent(Module rb_mQt6QtGui)
56
56
  {
57
57
  rb_cQActionEvent =
58
58
  // RubyQt6::QtGui::QActionEvent
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qevent(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qevent(Module rb_mQt6QtGui);
@@ -6,11 +6,11 @@
6
6
  #include <QAbstractFileIconProvider>
7
7
  #include <QMimeData>
8
8
 
9
- using namespace Rice;
9
+ RICE4RUBYQT6_USE_NAMESPACE
10
10
 
11
- Rice::Class rb_cQFileSystemModel;
11
+ Class rb_cQFileSystemModel;
12
12
 
13
- void Init_qfilesystemmodel(Rice::Module rb_mQt6QtGui)
13
+ void Init_qfilesystemmodel(Module rb_mQt6QtGui)
14
14
  {
15
15
  rb_cQFileSystemModel =
16
16
  // RubyQt6::QtGui::QFileSystemModel
@@ -71,11 +71,11 @@ void Init_qfilesystemmodel(Rice::Module rb_mQt6QtGui)
71
71
  .define_method("sort", &QFileSystemModel::sort, Arg("column"), Arg("order") = static_cast<Qt::SortOrder>(Qt::AscendingOrder))
72
72
  .define_method("supported_drop_actions", &QFileSystemModel::supportedDropActions)
73
73
  .define_method("test_option", &QFileSystemModel::testOption, Arg("option"))
74
- .define_method("type", &QFileSystemModel::type, Arg("index"))
74
+ .define_method("type", &QFileSystemModel::type, Arg("index"));
75
75
  // Signals
76
- .define_method("directory_loaded", &QFileSystemModel::directoryLoaded, Arg("path"))
77
- .define_method("file_renamed", &QFileSystemModel::fileRenamed, Arg("path"), Arg("old_name"), Arg("new_name"))
78
- .define_method("root_path_changed", &QFileSystemModel::rootPathChanged, Arg("new_path"));
76
+ // .define_method("directory_loaded", &QFileSystemModel::directoryLoaded, Arg("path"))
77
+ // .define_method("file_renamed", &QFileSystemModel::fileRenamed, Arg("path"), Arg("old_name"), Arg("new_name"))
78
+ // .define_method("root_path_changed", &QFileSystemModel::rootPathChanged, Arg("new_path"));
79
79
 
80
80
  Data_Type<QFileSystemModel::Roles> rb_cQFileSystemModelRoles =
81
81
  // RubyQt6::QtGui::QFileSystemModel::Roles
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qfilesystemmodel(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qfilesystemmodel(Module rb_mQt6QtGui);
@@ -4,15 +4,17 @@
4
4
 
5
5
  #include <QStringList>
6
6
 
7
- using namespace Rice;
7
+ RICE4RUBYQT6_USE_NAMESPACE
8
8
 
9
- Rice::Class rb_cQFont;
9
+ Class rb_cQFont;
10
10
 
11
- void Init_qfont(Rice::Module rb_mQt6QtGui)
11
+ void Init_qfont(Module rb_mQt6QtGui)
12
12
  {
13
13
  rb_cQFont =
14
14
  // RubyQt6::QtGui::QFont
15
15
  define_class_under<QFont>(rb_mQt6QtGui, "QFont")
16
+ // RubyQt6-Defined Functions
17
+ .define_singleton_function("_operator_equal", [](QFont *lhs, QFont *rhs) -> bool { return *lhs == *rhs; }, Arg("lhs"), Arg("rhs"))
16
18
  // Constructor
17
19
  .define_constructor(Constructor<QFont>())
18
20
  .define_constructor(Constructor<QFont, const QString &>(), Arg("family"))
@@ -52,7 +54,7 @@ void Init_qfont(Rice::Module rb_mQt6QtGui)
52
54
  .define_method("set_bold", &QFont::setBold, Arg("enable"))
53
55
  .define_method("set_capitalization", &QFont::setCapitalization, Arg("caps"))
54
56
  .define_method("set_families", &QFont::setFamilies, Arg("families"))
55
- .define_method("set_family", &QFont::setFamily, Arg("family"))
57
+ .define_method("_set_family", &QFont::setFamily, Arg("family"))
56
58
  .define_method("set_feature", &QFont::setFeature, Arg("tag"), Arg("value"))
57
59
  .define_method("set_fixed_pitch", &QFont::setFixedPitch, Arg("enable"))
58
60
  .define_method("set_hinting_preference", &QFont::setHintingPreference, Arg("hinting_preference"))
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qfont(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qfont(Module rb_mQt6QtGui);
@@ -5,11 +5,11 @@
5
5
  #include <QFontInfo>
6
6
  #include <QList>
7
7
 
8
- using namespace Rice;
8
+ RICE4RUBYQT6_USE_NAMESPACE
9
9
 
10
- Rice::Class rb_cQFontDatabase;
10
+ Class rb_cQFontDatabase;
11
11
 
12
- void Init_qfontdatabase(Rice::Module rb_mQt6QtGui)
12
+ void Init_qfontdatabase(Module rb_mQt6QtGui)
13
13
  {
14
14
  rb_cQFontDatabase =
15
15
  // RubyQt6::QtGui::QFontDatabase
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qfontdatabase(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qfontdatabase(Module rb_mQt6QtGui);
@@ -3,11 +3,11 @@
3
3
 
4
4
  #include <QList>
5
5
 
6
- using namespace Rice;
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
7
 
8
- Rice::Class rb_cQFontInfo;
8
+ Class rb_cQFontInfo;
9
9
 
10
- void Init_qfontinfo(Rice::Module rb_mQt6QtGui)
10
+ void Init_qfontinfo(Module rb_mQt6QtGui)
11
11
  {
12
12
  rb_cQFontInfo =
13
13
  // RubyQt6::QtGui::QFontInfo
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qfontinfo(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qfontinfo(Module rb_mQt6QtGui);
@@ -3,12 +3,12 @@
3
3
 
4
4
  #include <QTextOption>
5
5
 
6
- using namespace Rice;
6
+ RICE4RUBYQT6_USE_NAMESPACE
7
7
 
8
- Rice::Class rb_cQFontMetrics;
9
- Rice::Class rb_cQFontMetricsF;
8
+ Class rb_cQFontMetrics;
9
+ Class rb_cQFontMetricsF;
10
10
 
11
- void Init_qfontmetrics(Rice::Module rb_mQt6QtGui)
11
+ void Init_qfontmetrics(Module rb_mQt6QtGui)
12
12
  {
13
13
  rb_cQFontMetrics =
14
14
  // RubyQt6::QtGui::QFontMetrics
@@ -1,4 +1,5 @@
1
- #include <rice/rice.hpp>
2
- #include <rice/stl.hpp>
1
+ #include <rice/qt6.hpp>
3
2
 
4
- void Init_qfontmetrics(Rice::Module rb_mQt6QtGui);
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qfontmetrics(Module rb_mQt6QtGui);