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 +4 -4
- data/ext/qt6/qtgui/qaction-rb.cpp +4 -1
- data/lib/qt6/qtgui/qaction.rb +23 -0
- data/lib/qt6/qtgui/qpainter.rb +2 -2
- data/lib/qt6/qtgui/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 642252e4576ed1b2a88354cd0c6e3a93bcfb92a27e718220b81f3212bd863ccc
|
|
4
|
+
data.tar.gz: 91c2ba241d63e696b9ea0f1ab8e7e4f7aae0ad80480350b7847a4c6769ef049d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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("
|
|
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)
|
data/lib/qt6/qtgui/qaction.rb
CHANGED
|
@@ -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))
|
data/lib/qt6/qtgui/qpainter.rb
CHANGED
|
@@ -17,7 +17,7 @@ module RubyQt6
|
|
|
17
17
|
|
|
18
18
|
# @!visibility private
|
|
19
19
|
def self.new(device)
|
|
20
|
-
return device.
|
|
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.
|
|
35
|
+
return device._ioc_qpainter_begin(self) if device.respond_to?(:_ioc_qpainter_begin)
|
|
36
36
|
_begin(device)
|
|
37
37
|
end
|
|
38
38
|
|
data/lib/qt6/qtgui/version.rb
CHANGED