ruby-qt6-qtgui 2.0.0 → 2.1.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.
- checksums.yaml +4 -4
- data/ext/qt6/qtgui/qabstractfileiconprovider-rb.cpp +13 -0
- data/ext/qt6/qtgui/qabstractfileiconprovider-rb.hpp +5 -0
- data/ext/qt6/qtgui/qaction-rb.cpp +4 -1
- data/ext/qt6/qtgui/qtgui-rb.cpp +2 -0
- data/lib/qt6/qtgui/qaction.rb +25 -2
- data/lib/qt6/qtgui/qcolor.rb +2 -2
- data/lib/qt6/qtgui/qpainter.rb +2 -2
- data/lib/qt6/qtgui/qpixmap.rb +1 -1
- data/lib/qt6/qtgui/qstandarditem.rb +1 -1
- data/lib/qt6/qtgui/qtextcursor.rb +1 -1
- data/lib/qt6/qtgui/version.rb +1 -1
- data/lib/qt6/qtgui.rb +2 -0
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b14ba1e6a540e1ecd7751bba2280f5f17a5b8a7f402725d53a198db4cbf5cf02
|
|
4
|
+
data.tar.gz: 162861e6fc8920f36ef38e304ca0eb1f3921364568989b474199828220077745
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09a5257d4a633f1a97db2124f335678c7a8d91fc086004ec6935cc5411113dc6ee03a468fcfc20c6ba6409331f4b92f01e95d748cc6d5ad5af7d89198f16bbbd'
|
|
7
|
+
data.tar.gz: b2321f634b0404b4bcb0314af229f7bba7a6f2d8f073d0f28ef3c3506ac1df386fe198b8054993f0c01ef09e4de6bdb34932ebe47b728ef35ba70cc4173d2e06
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#include "qabstractfileiconprovider-rb.hpp"
|
|
2
|
+
#include <qabstractfileiconprovider.h>
|
|
3
|
+
|
|
4
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
5
|
+
|
|
6
|
+
Class rb_cQAbstractFileIconProvider;
|
|
7
|
+
|
|
8
|
+
void Init_qabstractfileiconprovider(Module rb_mQt6QtGui)
|
|
9
|
+
{
|
|
10
|
+
rb_cQAbstractFileIconProvider =
|
|
11
|
+
// RubyQt6::QtGui::QAbstractFileIconProvider
|
|
12
|
+
define_class_under<QAbstractFileIconProvider>(rb_mQt6QtGui, "QAbstractFileIconProvider");
|
|
13
|
+
}
|
|
@@ -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/ext/qt6/qtgui/qtgui-rb.cpp
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#include "qtgui-rb.hpp"
|
|
2
2
|
#include "qtguiversion-rb.hpp"
|
|
3
3
|
|
|
4
|
+
#include "qabstractfileiconprovider-rb.hpp"
|
|
4
5
|
#include "qbrush-rb.hpp"
|
|
5
6
|
#include "qcolor-rb.hpp"
|
|
6
7
|
#include "qcursor-rb.hpp"
|
|
@@ -61,6 +62,7 @@ extern "C" void Init_qtgui()
|
|
|
61
62
|
|
|
62
63
|
Init_qtguiversion(rb_mQt6QtGui);
|
|
63
64
|
|
|
65
|
+
Init_qabstractfileiconprovider(rb_mQt6QtGui);
|
|
64
66
|
Init_qbrush(rb_mQt6QtGui);
|
|
65
67
|
Init_qcolor(rb_mQt6QtGui);
|
|
66
68
|
Init_qcursor(rb_mQt6QtGui);
|
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
|
+
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()"
|
|
@@ -57,14 +65,29 @@ module RubyQt6
|
|
|
57
65
|
def initialize(*args)
|
|
58
66
|
parent = T.args_nth_delete_qobject(args, -1)
|
|
59
67
|
case args.size
|
|
60
|
-
when 0 then _initialize(
|
|
61
|
-
when 1 then _initialize(
|
|
68
|
+
when 0 then _initialize(QIcon.new, T.to_qstr(""), parent)
|
|
69
|
+
when 1 then _initialize(QIcon.new, T.to_qstr(args[-1]), parent)
|
|
62
70
|
when 2 then _initialize(args[-2], T.to_qstr(args[-1]), parent)
|
|
63
71
|
else raise ArgumentError, INITIALIZE_ARG_ERROR_MESSAGE
|
|
64
72
|
end
|
|
65
73
|
_take_ownership_from_ruby(self)
|
|
66
74
|
end
|
|
67
75
|
|
|
76
|
+
# @!visibility private
|
|
77
|
+
def menu
|
|
78
|
+
QMenu._ioc_qaction_menu(self)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# @!visibility private
|
|
82
|
+
def set_menu(menu)
|
|
83
|
+
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/qcolor.rb
CHANGED
|
@@ -10,7 +10,7 @@ module RubyQt6
|
|
|
10
10
|
rubyqt6_declare_enum_under QColor, QColor::Spec
|
|
11
11
|
|
|
12
12
|
# @!parse
|
|
13
|
-
|
|
13
|
+
QVariant.register(
|
|
14
14
|
_qvariant_register_metatype,
|
|
15
15
|
method(:_qvariant_from_value),
|
|
16
16
|
method(:_qvariant_to_value),
|
|
@@ -55,7 +55,7 @@ module RubyQt6
|
|
|
55
55
|
|
|
56
56
|
# @!visibility private
|
|
57
57
|
def inspect
|
|
58
|
-
rgb = name(
|
|
58
|
+
rgb = name(QColor::HexRgb).to_s
|
|
59
59
|
T.inspect_struct(self, rgb:)
|
|
60
60
|
end
|
|
61
61
|
end
|
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/qpixmap.rb
CHANGED
|
@@ -44,7 +44,7 @@ module RubyQt6
|
|
|
44
44
|
|
|
45
45
|
# @!visibility private
|
|
46
46
|
def insert_markdown(markdown, features = nil)
|
|
47
|
-
features ||=
|
|
47
|
+
features ||= QTextDocument::MarkdownDialectGitHub
|
|
48
48
|
_insert_markdown(T.to_qstr(markdown), T.to_qflags(features))
|
|
49
49
|
end
|
|
50
50
|
|
data/lib/qt6/qtgui/version.rb
CHANGED
data/lib/qt6/qtgui.rb
CHANGED
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.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Doe
|
|
@@ -15,28 +15,28 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 2.
|
|
18
|
+
version: 2.1.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 2.
|
|
25
|
+
version: 2.1.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: ruby-qt6-qtcore
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 2.
|
|
32
|
+
version: 2.1.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 2.
|
|
39
|
+
version: 2.1.0
|
|
40
40
|
description: Ruby Bindings for Qt GUI.
|
|
41
41
|
email:
|
|
42
42
|
- johndoe@example.com
|
|
@@ -51,6 +51,8 @@ files:
|
|
|
51
51
|
- README.md
|
|
52
52
|
- Rakefile
|
|
53
53
|
- ext/qt6/qtgui/extconf.rb
|
|
54
|
+
- ext/qt6/qtgui/qabstractfileiconprovider-rb.cpp
|
|
55
|
+
- ext/qt6/qtgui/qabstractfileiconprovider-rb.hpp
|
|
54
56
|
- ext/qt6/qtgui/qaction-rb.cpp
|
|
55
57
|
- ext/qt6/qtgui/qaction-rb.hpp
|
|
56
58
|
- ext/qt6/qtgui/qactiongroup-rb.cpp
|