ruby-qt6-qtgui 2.0.0 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6ad75c4691d95ffe882847fd386ce429378fc87ac46e9dd9d150331091e7ea8
4
- data.tar.gz: 12456cf5461abc6ad9f3e8605679055f08a586114a4a5e7f8227faf19361d0da
3
+ metadata.gz: 642252e4576ed1b2a88354cd0c6e3a93bcfb92a27e718220b81f3212bd863ccc
4
+ data.tar.gz: 91c2ba241d63e696b9ea0f1ab8e7e4f7aae0ad80480350b7847a4c6769ef049d
5
5
  SHA512:
6
- metadata.gz: f2194d2e588a5f5fa5390433a26e8f02bc02d6b9d53b6e9780d111928213e6cb4ee5b7cabba6433a2ac43b3bc0666ef8cf0444776aabce25cc772fb388cbbba2
7
- data.tar.gz: 6b2a72030a2c8184ddc285d8346999715a4d250b62bdfdbab5cc8fcede8ec269b2a1250e0d166fc4ad5bd18ed8c2448be5c31d3bc1c21511e8b0a9406e528eb4
6
+ metadata.gz: 450dd2b33c792e7a1dcfdbee5c88912bae6533baa621c4d568610ca04988548a9fc346498f5c4b54de6fb5906ea6a5a26f756717e8a1bc01b22d5a77e88ca7fd
7
+ data.tar.gz: 853c15504a4db2ea10cc76bd5e2b0b64fa97cc9a4a91ca97d497a9eb3180a6c0a2e133b554b50355e36f3f3bc94f732a3d95b950d17e7784a39856f4ccc785ff
@@ -15,6 +15,9 @@ void Init_qaction(Module rb_mQt6QtGui)
15
15
  // RubyQt6::QtGui::QAction
16
16
  define_class_under<QAction, QObject>(rb_mQt6QtGui, "QAction")
17
17
  // RubyQt6-Defined Functions
18
+ .define_singleton_function("_qvariant_register_metatype", []() -> int { return qRegisterMetaType<QAction *>(); })
19
+ .define_singleton_function("_qvariant_from_value", [](QAction *value) -> QVariant { return QVariant::fromValue(value); })
20
+ .define_singleton_function("_qvariant_to_value", [](const QVariant &qvariant) -> QAction * { return qvariant.value<QAction *>(); })
18
21
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAction::staticMetaObject; })
19
22
  // Constructor
20
23
  .define_constructor(Constructor<QAction, const QIcon &, const QString &, QObject *>(), Arg("icon"), Arg("text"), Arg("parent"))
@@ -53,7 +56,7 @@ void Init_qaction(Module rb_mQt6QtGui)
53
56
  .define_method<void (QAction::*)(QKeySequence::StandardKey)>("set_shortcuts", &QAction::setShortcuts, Arg("shortcuts"))
54
57
  .define_method<void (QAction::*)(const QList<QKeySequence> &)>("set_shortcuts", &QAction::setShortcuts, Arg("shortcuts"))
55
58
  .define_method("set_status_tip", &QAction::setStatusTip, Arg("status_tip"))
56
- .define_method("set_text", &QAction::setText, Arg("text"))
59
+ .define_method("_set_text", &QAction::setText, Arg("text"))
57
60
  .define_method("set_tool_tip", &QAction::setToolTip, Arg("tip"))
58
61
  .define_method("set_whats_this", &QAction::setWhatsThis, Arg("what"))
59
62
  .define_method("shortcut", &QAction::shortcut)
@@ -18,6 +18,14 @@ module RubyQt6
18
18
  rubyqt6_declare_enum_under QAction, QAction::Priority
19
19
  rubyqt6_declare_enum_under QAction, QAction::ActionEvent
20
20
 
21
+ # @!parse
22
+ QtCore::QVariant.register(
23
+ _qvariant_register_metatype,
24
+ method(:_qvariant_from_value),
25
+ method(:_qvariant_to_value),
26
+ from: self
27
+ )
28
+
21
29
  # @!parse
22
30
  q_object do
23
31
  signal "changed()"
@@ -65,6 +73,21 @@ module RubyQt6
65
73
  _take_ownership_from_ruby(self)
66
74
  end
67
75
 
76
+ # @!visibility private
77
+ def menu
78
+ QtWidgets::QMenu._ioc_qaction_menu(self)
79
+ end
80
+
81
+ # @!visibility private
82
+ def set_menu(menu)
83
+ QtWidgets::QMenu._ioc_qaction_set_menu(self, menu)
84
+ end
85
+
86
+ # @!visibility private
87
+ def set_text(text)
88
+ _set_text(T.to_qstr(text))
89
+ end
90
+
68
91
  # @!visibility private
69
92
  def set_shortcut(shortcut)
70
93
  _set_shortcut(T.to_qkeysequence(shortcut))
@@ -17,7 +17,7 @@ module RubyQt6
17
17
 
18
18
  # @!visibility private
19
19
  def self.new(device)
20
- return device._ioc_painter_new if device.respond_to?(:_ioc_painter_new)
20
+ return device._ioc_qpainter_new if device.respond_to?(:_ioc_qpainter_new)
21
21
  allocate.tap { |o| o.__send__(:initialize, device) }
22
22
  end
23
23
 
@@ -32,7 +32,7 @@ module RubyQt6
32
32
 
33
33
  # @!visibility private
34
34
  def begin(device)
35
- return device._ioc_painter_begin(self) if device.respond_to?(:_ioc_painter_begin)
35
+ return device._ioc_qpainter_begin(self) if device.respond_to?(:_ioc_qpainter_begin)
36
36
  _begin(device)
37
37
  end
38
38
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyQt6
4
4
  module QtGui
5
- QTGUI_RUBYGEM_VERSION = "2.0.0"
5
+ QTGUI_RUBYGEM_VERSION = "2.0.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-qt6-qtgui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Doe