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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6ad75c4691d95ffe882847fd386ce429378fc87ac46e9dd9d150331091e7ea8
4
- data.tar.gz: 12456cf5461abc6ad9f3e8605679055f08a586114a4a5e7f8227faf19361d0da
3
+ metadata.gz: b14ba1e6a540e1ecd7751bba2280f5f17a5b8a7f402725d53a198db4cbf5cf02
4
+ data.tar.gz: 162861e6fc8920f36ef38e304ca0eb1f3921364568989b474199828220077745
5
5
  SHA512:
6
- metadata.gz: f2194d2e588a5f5fa5390433a26e8f02bc02d6b9d53b6e9780d111928213e6cb4ee5b7cabba6433a2ac43b3bc0666ef8cf0444776aabce25cc772fb388cbbba2
7
- data.tar.gz: 6b2a72030a2c8184ddc285d8346999715a4d250b62bdfdbab5cc8fcede8ec269b2a1250e0d166fc4ad5bd18ed8c2448be5c31d3bc1c21511e8b0a9406e528eb4
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
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qabstractfileiconprovider(Module rb_mQt6QtGui);
@@ -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)
@@ -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);
@@ -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(QtGui::QIcon.new, T.to_qstr(""), parent)
61
- when 1 then _initialize(QtGui::QIcon.new, T.to_qstr(args[-1]), parent)
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))
@@ -10,7 +10,7 @@ module RubyQt6
10
10
  rubyqt6_declare_enum_under QColor, QColor::Spec
11
11
 
12
12
  # @!parse
13
- QtCore::QVariant.register(
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(QtGui::QColor::NameFormat::HexRgb).to_s
58
+ rgb = name(QColor::HexRgb).to_s
59
59
  T.inspect_struct(self, rgb:)
60
60
  end
61
61
  end
@@ -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
 
@@ -27,7 +27,7 @@ module RubyQt6
27
27
 
28
28
  # @!visibility private
29
29
  def load(file_name, format = "", flags = nil)
30
- flags ||= QtCore::Qt::AutoColor
30
+ flags ||= Qt::AutoColor
31
31
  _load(T.to_qstr(file_name), format, T.to_qflags(flags))
32
32
  end
33
33
  end
@@ -8,7 +8,7 @@ module RubyQt6
8
8
  rubyqt6_declare_enum_under QStandardItem, QStandardItem::ItemType
9
9
 
10
10
  # @!parse
11
- QtCore::QVariant.register(
11
+ QVariant.register(
12
12
  _qvariant_register_metatype,
13
13
  method(:_qvariant_from_value),
14
14
  method(:_qvariant_to_value),
@@ -44,7 +44,7 @@ module RubyQt6
44
44
 
45
45
  # @!visibility private
46
46
  def insert_markdown(markdown, features = nil)
47
- features ||= QtGui::QTextDocument::MarkdownDialectGitHub
47
+ features ||= QTextDocument::MarkdownDialectGitHub
48
48
  _insert_markdown(T.to_qstr(markdown), T.to_qflags(features))
49
49
  end
50
50
 
@@ -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.1.0"
6
6
  end
7
7
  end
data/lib/qt6/qtgui.rb CHANGED
@@ -73,3 +73,5 @@ require_relative "qtgui/qdoublevalidator"
73
73
  require_relative "qtgui/qintvalidator"
74
74
  require_relative "qtgui/qregularexpressionvalidator"
75
75
  require_relative "qtgui/qwindow"
76
+
77
+ RubyQt6.initialize!(RubyQt6::QtGui)
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.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.0.0
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.0.0
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.0.0
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.0.0
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