ruby-qt6-qtcore 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/qtcore/qeventloop-rb.cpp +33 -0
- data/ext/qt6/qtcore/qeventloop-rb.hpp +5 -0
- data/ext/qt6/qtcore/qlocale-rb.cpp +0 -16
- data/ext/qt6/qtcore/qobject-rb.cpp +1 -0
- data/ext/qt6/qtcore/qprocess-rb.cpp +123 -0
- data/ext/qt6/qtcore/qprocess-rb.hpp +5 -0
- data/ext/qt6/qtcore/qprocessenvironment-rb.cpp +32 -0
- data/ext/qt6/qtcore/qprocessenvironment-rb.hpp +5 -0
- data/ext/qt6/qtcore/qregularexpression-rb.cpp +1 -7
- data/ext/qt6/qtcore/qtcore-rb.cpp +8 -0
- data/ext/qt6/qtcore/qtimer-rb.cpp +0 -2
- data/ext/qt6/qtcore/qurlquery-rb.cpp +33 -0
- data/ext/qt6/qtcore/qurlquery-rb.hpp +5 -0
- data/ext/qt6/qtcore/t-qtcore-rb.cpp +4 -0
- data/lib/qt6/bando/dsl.rb +2 -2
- data/lib/qt6/configuration.rb +4 -9
- data/lib/qt6/ducktyping.rb +14 -14
- data/lib/qt6/qtcore/private/metaobject.rb +2 -2
- data/lib/qt6/qtcore/private/signalmanager.rb +4 -4
- data/lib/qt6/qtcore/qdate.rb +1 -1
- data/lib/qt6/qtcore/qdatetime.rb +1 -1
- data/lib/qt6/qtcore/qdir.rb +5 -0
- data/lib/qt6/qtcore/qeventloop.rb +17 -0
- data/lib/qt6/qtcore/qfile.rb +5 -0
- data/lib/qt6/qtcore/qfileinfo.rb +5 -0
- data/lib/qt6/qtcore/qiodevice.rb +2 -2
- data/lib/qt6/qtcore/qitemselection.rb +1 -1
- data/lib/qt6/qtcore/qline.rb +1 -1
- data/lib/qt6/qtcore/qlinef.rb +1 -1
- data/lib/qt6/qtcore/qmargins.rb +1 -1
- data/lib/qt6/qtcore/qmarginsf.rb +1 -1
- data/lib/qt6/qtcore/qobject.rb +5 -5
- data/lib/qt6/qtcore/qpoint.rb +1 -1
- data/lib/qt6/qtcore/qpointf.rb +1 -1
- data/lib/qt6/qtcore/qprocess.rb +50 -0
- data/lib/qt6/qtcore/qprocessenvironment.rb +11 -0
- data/lib/qt6/qtcore/qrect.rb +1 -1
- data/lib/qt6/qtcore/qrectf.rb +1 -1
- data/lib/qt6/qtcore/qregularexpression.rb +17 -1
- data/lib/qt6/qtcore/qsettings.rb +4 -4
- data/lib/qt6/qtcore/qsize.rb +1 -1
- data/lib/qt6/qtcore/qsizef.rb +1 -1
- data/lib/qt6/qtcore/qstring.rb +8 -0
- data/lib/qt6/qtcore/qt/qvariant.rb +2 -2
- data/lib/qt6/qtcore/qtime.rb +1 -1
- data/lib/qt6/qtcore/qurl.rb +3 -3
- data/lib/qt6/qtcore/qurlquery.rb +41 -0
- data/lib/qt6/qtcore/qvariant.rb +18 -18
- data/lib/qt6/qtcore/qvariantlist.rb +7 -7
- data/lib/qt6/qtcore/qvariantmap.rb +2 -2
- data/lib/qt6/qtcore/version.rb +1 -1
- data/lib/qt6/qtcore.rb +6 -0
- data/lib/qt6/refinements/kernel.rb +2 -2
- metadata +15 -3
data/lib/qt6/qtcore/qdatetime.rb
CHANGED
data/lib/qt6/qtcore/qdir.rb
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
# @see https://doc.qt.io/qt-6/qeventloop.html
|
|
6
|
+
class QEventLoop < RubyQt6::QtCore::QObject
|
|
7
|
+
# @!parse class ProcessEventsFlag ; end
|
|
8
|
+
# @!parse class ProcessEventsFlags; end
|
|
9
|
+
rubyqt6_declare_enum_under QEventLoop, QEventLoop::ProcessEventsFlag
|
|
10
|
+
rubyqt6_declare_qflags QEventLoop::ProcessEventsFlags, QEventLoop::ProcessEventsFlag
|
|
11
|
+
|
|
12
|
+
# @!parse
|
|
13
|
+
q_object do
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/qt6/qtcore/qfile.rb
CHANGED
data/lib/qt6/qtcore/qfileinfo.rb
CHANGED
data/lib/qt6/qtcore/qiodevice.rb
CHANGED
|
@@ -5,8 +5,8 @@ module RubyQt6
|
|
|
5
5
|
# @see https://doc.qt.io/qt-6/qiodevice.html
|
|
6
6
|
class QIODevice < RubyQt6::QtCore::QObject
|
|
7
7
|
# Inherits QIODeviceBase
|
|
8
|
-
OpenModeFlag =
|
|
9
|
-
OpenMode =
|
|
8
|
+
OpenModeFlag = QIODeviceBase::OpenModeFlag
|
|
9
|
+
OpenMode = QIODeviceBase::OpenMode
|
|
10
10
|
|
|
11
11
|
# @!parse
|
|
12
12
|
[
|
data/lib/qt6/qtcore/qline.rb
CHANGED
data/lib/qt6/qtcore/qlinef.rb
CHANGED
data/lib/qt6/qtcore/qmargins.rb
CHANGED
|
@@ -25,7 +25,7 @@ module RubyQt6
|
|
|
25
25
|
|
|
26
26
|
# @!visibility private
|
|
27
27
|
def ==(other)
|
|
28
|
-
return false unless other.is_a?(
|
|
28
|
+
return false unless other.is_a?(QMargins) || other.is_a?(QMarginsF)
|
|
29
29
|
self.class._operator_equal(self, other)
|
|
30
30
|
end
|
|
31
31
|
|
data/lib/qt6/qtcore/qmarginsf.rb
CHANGED
|
@@ -25,7 +25,7 @@ module RubyQt6
|
|
|
25
25
|
|
|
26
26
|
# @!visibility private
|
|
27
27
|
def ==(other)
|
|
28
|
-
return false unless other.is_a?(
|
|
28
|
+
return false unless other.is_a?(QMargins) || other.is_a?(QMarginsF)
|
|
29
29
|
self.class._operator_equal(self, other)
|
|
30
30
|
end
|
|
31
31
|
|
data/lib/qt6/qtcore/qobject.rb
CHANGED
|
@@ -27,8 +27,8 @@ module RubyQt6
|
|
|
27
27
|
r = __send__(meth.name, *args.map(&:value))
|
|
28
28
|
next if meth.return_type.nil?
|
|
29
29
|
|
|
30
|
-
qmetatype =
|
|
31
|
-
|
|
30
|
+
qmetatype = QMetaType.from_name(meth.return_type)
|
|
31
|
+
QVariant.new(r, qmetatype)
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -76,14 +76,14 @@ module RubyQt6
|
|
|
76
76
|
|
|
77
77
|
# @!visibility private
|
|
78
78
|
def find_child(name, options = nil)
|
|
79
|
-
options ||=
|
|
79
|
+
options ||= Qt::FindChildrenRecursively
|
|
80
80
|
child = _find_child(T.to_qanystringview(name), T.to_qflags(options))
|
|
81
81
|
T.bando_qobject_cast(child)
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
# @!visibility private
|
|
85
85
|
def find_children(name, options = nil)
|
|
86
|
-
options ||=
|
|
86
|
+
options ||= Qt::FindChildrenRecursively
|
|
87
87
|
children = _find_children(T.to_qanystringview(name), T.to_qflags(options))
|
|
88
88
|
children.map { |child| T.bando_qobject_cast(child) }
|
|
89
89
|
end
|
|
@@ -101,7 +101,7 @@ module RubyQt6
|
|
|
101
101
|
# @!visibility private
|
|
102
102
|
def tr(source_text, disambiguation = "", n = -1)
|
|
103
103
|
context = self.class.name
|
|
104
|
-
|
|
104
|
+
QCoreApplication.translate(context, source_text, disambiguation, n)
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
private
|
data/lib/qt6/qtcore/qpoint.rb
CHANGED
|
@@ -23,7 +23,7 @@ module RubyQt6
|
|
|
23
23
|
|
|
24
24
|
# @!visibility private
|
|
25
25
|
def ==(other)
|
|
26
|
-
return false unless other.is_a?(
|
|
26
|
+
return false unless other.is_a?(QPoint) || other.is_a?(QPointF)
|
|
27
27
|
self.class._operator_equal(self, other)
|
|
28
28
|
end
|
|
29
29
|
|
data/lib/qt6/qtcore/qpointf.rb
CHANGED
|
@@ -23,7 +23,7 @@ module RubyQt6
|
|
|
23
23
|
|
|
24
24
|
# @!visibility private
|
|
25
25
|
def ==(other)
|
|
26
|
-
return false unless other.is_a?(
|
|
26
|
+
return false unless other.is_a?(QPoint) || other.is_a?(QPointF)
|
|
27
27
|
self.class._operator_equal(self, other)
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
# @see https://doc.qt.io/qt-6/qprocess.html
|
|
6
|
+
class QProcess < RubyQt6::QtCore::QIODevice
|
|
7
|
+
# @!parse class ExitStatus ; end
|
|
8
|
+
# @!parse class InputChannelMode ; end
|
|
9
|
+
# @!parse class ProcessChannel ; end
|
|
10
|
+
# @!parse class ProcessChannelMode; end
|
|
11
|
+
# @!parse class ProcessError ; end
|
|
12
|
+
# @!parse class ProcessState ; end
|
|
13
|
+
rubyqt6_declare_enum_under QProcess, QProcess::ExitStatus
|
|
14
|
+
rubyqt6_declare_enum_under QProcess, QProcess::InputChannelMode
|
|
15
|
+
rubyqt6_declare_enum_under QProcess, QProcess::ProcessChannel
|
|
16
|
+
rubyqt6_declare_enum_under QProcess, QProcess::ProcessChannelMode
|
|
17
|
+
rubyqt6_declare_enum_under QProcess, QProcess::ProcessError
|
|
18
|
+
rubyqt6_declare_enum_under QProcess, QProcess::ProcessState
|
|
19
|
+
|
|
20
|
+
# @!parse
|
|
21
|
+
q_object do
|
|
22
|
+
signal "errorOccurred(QProcess::ProcessError)"
|
|
23
|
+
signal "finished(int,QProcess::ExitStatus)"
|
|
24
|
+
signal "finished(int)"
|
|
25
|
+
signal "readyReadStandardError()"
|
|
26
|
+
signal "readyReadStandardOutput()"
|
|
27
|
+
signal "started()"
|
|
28
|
+
signal "stateChanged(QProcess::ProcessState)"
|
|
29
|
+
slot "kill()"
|
|
30
|
+
slot "terminate()"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @!visibility private
|
|
34
|
+
def self.execute(program, arguments = nil)
|
|
35
|
+
arguments ||= QStringList.new
|
|
36
|
+
_execute(T.to_qstr(program), arguments)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @!visibility private
|
|
40
|
+
alias_method :_initialize, :initialize
|
|
41
|
+
|
|
42
|
+
# @param parent [QObject]
|
|
43
|
+
# @return [QProcess]
|
|
44
|
+
def initialize(parent = nil)
|
|
45
|
+
_initialize(parent)
|
|
46
|
+
_take_ownership_from_ruby(self)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
# @see https://doc.qt.io/qt-6/qprocessenvironment.html
|
|
6
|
+
class QProcessEnvironment
|
|
7
|
+
# @!parse class Initialization; end
|
|
8
|
+
rubyqt6_declare_enum_under QProcessEnvironment, QProcessEnvironment::Initialization
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
data/lib/qt6/qtcore/qrect.rb
CHANGED
data/lib/qt6/qtcore/qrectf.rb
CHANGED
|
@@ -19,6 +19,22 @@ module RubyQt6
|
|
|
19
19
|
rubyqt6_declare_qflags QRegularExpression::MatchOptions, QRegularExpression::MatchOption
|
|
20
20
|
rubyqt6_declare_qflags QRegularExpression::WildcardConversionOptions, QRegularExpression::WildcardConversionOption
|
|
21
21
|
|
|
22
|
+
# @!visibility private
|
|
23
|
+
def self.from_wildcard(pattern, cs = nil, options = nil)
|
|
24
|
+
options ||= QRegularExpression::DefaultWildcardConversion
|
|
25
|
+
pattern = wildcard_to_regular_expression(T.to_qstr(pattern), options)
|
|
26
|
+
|
|
27
|
+
cs ||= Qt::CaseInsensitive
|
|
28
|
+
options = (cs == Qt::CaseSensitive) ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption
|
|
29
|
+
new(pattern, options)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @!visibility private
|
|
33
|
+
def self.wildcard_to_regular_expression(pattern, options = nil)
|
|
34
|
+
options ||= QRegularExpression::DefaultWildcardConversion
|
|
35
|
+
_wildcard_to_regular_expression(T.to_qstr(pattern), T.to_qflags(options))
|
|
36
|
+
end
|
|
37
|
+
|
|
22
38
|
# @!visibility private
|
|
23
39
|
alias_method :_initialize, :initialize
|
|
24
40
|
|
|
@@ -26,7 +42,7 @@ module RubyQt6
|
|
|
26
42
|
# @param options [QRegularExpression::PatternOptions]
|
|
27
43
|
# @return [QRegularExpression]
|
|
28
44
|
def initialize(pattern = "", options = nil)
|
|
29
|
-
options ||=
|
|
45
|
+
options ||= QRegularExpression::NoPatternOption
|
|
30
46
|
_initialize(T.to_qstr(pattern), T.to_qflags(options))
|
|
31
47
|
end
|
|
32
48
|
end
|
data/lib/qt6/qtcore/qsettings.rb
CHANGED
|
@@ -22,8 +22,8 @@ module RubyQt6
|
|
|
22
22
|
# @param application [QString]
|
|
23
23
|
# @return [QSettings]
|
|
24
24
|
def initialize(organization, application)
|
|
25
|
-
format =
|
|
26
|
-
scope =
|
|
25
|
+
format = QSettings.default_format
|
|
26
|
+
scope = QSettings::Scope::UserScope
|
|
27
27
|
_initialize(format, scope, T.to_qstr(organization), T.to_qstr(application))
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -54,7 +54,7 @@ module RubyQt6
|
|
|
54
54
|
|
|
55
55
|
# @!visibility private
|
|
56
56
|
def set_value(key, value)
|
|
57
|
-
qvariant =
|
|
57
|
+
qvariant = QVariant.new(value)
|
|
58
58
|
_set_value(T.to_qanystringview(key), qvariant)
|
|
59
59
|
end
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ module RubyQt6
|
|
|
64
64
|
return default unless qvariant.valid?
|
|
65
65
|
|
|
66
66
|
case default
|
|
67
|
-
when
|
|
67
|
+
when QStringList then QVariant.to_qstringlist(qvariant)
|
|
68
68
|
else qvariant.value
|
|
69
69
|
end
|
|
70
70
|
end
|
data/lib/qt6/qtcore/qsize.rb
CHANGED
data/lib/qt6/qtcore/qsizef.rb
CHANGED
data/lib/qt6/qtcore/qstring.rb
CHANGED
|
@@ -50,6 +50,14 @@ module RubyQt6
|
|
|
50
50
|
to_str <=> other.to_str
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
# @!visibility private
|
|
54
|
+
alias_method :eql?, :==
|
|
55
|
+
|
|
56
|
+
# @!visibility private
|
|
57
|
+
def hash
|
|
58
|
+
to_str.hash
|
|
59
|
+
end
|
|
60
|
+
|
|
53
61
|
# @!visibility private
|
|
54
62
|
def inspect
|
|
55
63
|
T.inspect_struct(self, str: to_s)
|
|
@@ -11,7 +11,7 @@ module RubyQt6
|
|
|
11
11
|
from_object_methods[id] = from_object_method
|
|
12
12
|
to_object_methods[id] = to_object_method
|
|
13
13
|
|
|
14
|
-
qmetatype =
|
|
14
|
+
qmetatype = QMetaType.new(id)
|
|
15
15
|
Array(from).each do |klass|
|
|
16
16
|
klass.define_singleton_method(:default_qmetatype) do
|
|
17
17
|
qmetatype
|
|
@@ -25,7 +25,7 @@ module RubyQt6
|
|
|
25
25
|
private_class_method :from_object_methods
|
|
26
26
|
|
|
27
27
|
def self.from_object(object, qmetatype)
|
|
28
|
-
qmetatype =
|
|
28
|
+
qmetatype = QMetaType.infer(object) if qmetatype.nil?
|
|
29
29
|
meth = from_object_methods[qmetatype.id]
|
|
30
30
|
meth ? meth.call(object) : raise("Unsupported qmetatype `#{qmetatype.name}`")
|
|
31
31
|
end
|
data/lib/qt6/qtcore/qtime.rb
CHANGED
data/lib/qt6/qtcore/qurl.rb
CHANGED
|
@@ -24,7 +24,7 @@ module RubyQt6
|
|
|
24
24
|
rubyqt6_declare_qflags QUrl::UserInputResolutionOptions, QUrl::UserInputResolutionOption
|
|
25
25
|
|
|
26
26
|
# @!parse
|
|
27
|
-
|
|
27
|
+
QVariant.register(
|
|
28
28
|
_qvariant_register_metatype,
|
|
29
29
|
method(:_qvariant_from_value),
|
|
30
30
|
method(:_qvariant_to_value),
|
|
@@ -41,7 +41,7 @@ module RubyQt6
|
|
|
41
41
|
|
|
42
42
|
# @!visibility private
|
|
43
43
|
def self.from_user_input(user_input, working_directory = "", options = nil)
|
|
44
|
-
options ||=
|
|
44
|
+
options ||= QUrl::DefaultResolution
|
|
45
45
|
_from_user_input(T.to_qstr(user_input), T.to_qstr(working_directory), T.to_qflags(options))
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -62,7 +62,7 @@ module RubyQt6
|
|
|
62
62
|
|
|
63
63
|
# @!visibility private
|
|
64
64
|
def to_string(options = nil)
|
|
65
|
-
options ||=
|
|
65
|
+
options ||= QUrl::PrettyDecoded
|
|
66
66
|
_to_string(options.to_i)
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
# @see https://doc.qt.io/qt-6/qurlquery.html
|
|
6
|
+
class QUrlQuery
|
|
7
|
+
# @!visibility private
|
|
8
|
+
alias_method :_initialize, :initialize
|
|
9
|
+
|
|
10
|
+
# @return [QUrlQuery]
|
|
11
|
+
def initialize
|
|
12
|
+
_initialize
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @!visibility private
|
|
16
|
+
def add_query_item(key, value)
|
|
17
|
+
_add_query_item(T.to_qstr(key), T.to_qstr(value))
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @!visibility private
|
|
21
|
+
def has_query_item(key)
|
|
22
|
+
_has_query_item(T.to_qstr(key))
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# @!visibility private
|
|
26
|
+
def remove_all_query_items(key)
|
|
27
|
+
_remove_all_query_items(T.to_qstr(key))
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# @!visibility private
|
|
31
|
+
def remove_query_item(key)
|
|
32
|
+
_remove_query_item(T.to_qstr(key))
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def set_query(query)
|
|
37
|
+
_set_query(T.to_qstr(query))
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
data/lib/qt6/qtcore/qvariant.rb
CHANGED
|
@@ -29,24 +29,24 @@ module RubyQt6
|
|
|
29
29
|
private_class_method :to_qobject
|
|
30
30
|
|
|
31
31
|
# @!parse
|
|
32
|
-
register(
|
|
33
|
-
register(
|
|
34
|
-
register(
|
|
35
|
-
register(
|
|
36
|
-
register(
|
|
37
|
-
register(
|
|
38
|
-
register(
|
|
39
|
-
register(
|
|
40
|
-
register(
|
|
41
|
-
register(
|
|
42
|
-
register(
|
|
43
|
-
register(
|
|
44
|
-
register(
|
|
45
|
-
register(
|
|
46
|
-
register(
|
|
47
|
-
register(
|
|
48
|
-
register(
|
|
49
|
-
register(
|
|
32
|
+
register(QMetaType::Type::Bool, method(:from_bool), method(:to_bool), from: [TrueClass, FalseClass])
|
|
33
|
+
register(QMetaType::Type::Int, method(:from_int), method(:to_int), from: Integer)
|
|
34
|
+
register(QMetaType::Type::Double, method(:from_double), method(:to_double), from: Float)
|
|
35
|
+
register(QMetaType::Type::QString, method(:from_qstring), method(:to_qstring), from: [String, QString])
|
|
36
|
+
register(QMetaType::Type::QByteArray, method(:from_qbytearray), method(:to_qbytearray), from: QByteArray)
|
|
37
|
+
register(QMetaType::Type::QDateTime, method(:from_qdatetime), method(:to_qdatetime), from: QDateTime)
|
|
38
|
+
register(QMetaType::Type::QDate, method(:from_qdate), method(:to_qdate), from: QDate)
|
|
39
|
+
register(QMetaType::Type::QTime, method(:from_qtime), method(:to_qtime), from: QTime)
|
|
40
|
+
register(QMetaType::Type::QLine, method(:from_qline), method(:to_qline), from: QLine)
|
|
41
|
+
register(QMetaType::Type::QLineF, method(:from_qlinef), method(:to_qlinef), from: QLineF)
|
|
42
|
+
register(QMetaType::Type::QPoint, method(:from_qpoint), method(:to_qpoint), from: QPoint)
|
|
43
|
+
register(QMetaType::Type::QPointF, method(:from_qpointf), method(:to_qpointf), from: QPointF)
|
|
44
|
+
register(QMetaType::Type::QRect, method(:from_qrect), method(:to_qrect), from: QRect)
|
|
45
|
+
register(QMetaType::Type::QRectF, method(:from_qrectf), method(:to_qrectf), from: QRectF)
|
|
46
|
+
register(QMetaType::Type::QSize, method(:from_qsize), method(:to_qsize), from: QSize)
|
|
47
|
+
register(QMetaType::Type::QSizeF, method(:from_qsizef), method(:to_qsizef), from: QSizeF)
|
|
48
|
+
register(QMetaType::Type::QStringList, method(:from_qstringlist), method(:to_qstringlist), from: QStringList)
|
|
49
|
+
register(QMetaType::Type::QObjectStar, method(:from_qobject), method(:to_qobject), from: QObject)
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
end
|
|
@@ -15,40 +15,40 @@ module RubyQt6
|
|
|
15
15
|
# @!visibility private
|
|
16
16
|
def count(*args)
|
|
17
17
|
case args.size
|
|
18
|
-
when 1 then _count(
|
|
18
|
+
when 1 then _count(QVariant.new(args[0]))
|
|
19
19
|
else _count(*args)
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# @!visibility private
|
|
24
24
|
def include?(element)
|
|
25
|
-
_include?(
|
|
25
|
+
_include?(QVariant.new(element))
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# @!visibility private
|
|
29
29
|
def index(element)
|
|
30
|
-
_index(
|
|
30
|
+
_index(QVariant.new(element))
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# @!visibility private
|
|
34
34
|
def insert(index, element)
|
|
35
|
-
_insert(index,
|
|
35
|
+
_insert(index, QVariant.new(element))
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
# @!visibility private
|
|
39
39
|
def push(element)
|
|
40
|
-
_push(
|
|
40
|
+
_push(QVariant.new(element))
|
|
41
41
|
end
|
|
42
42
|
alias_method :<<, :push
|
|
43
43
|
|
|
44
44
|
# @!visibility private
|
|
45
45
|
def delete(element)
|
|
46
|
-
_delete(
|
|
46
|
+
_delete(QVariant.new(element))
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
# @!visibility private
|
|
50
50
|
def []=(index, element)
|
|
51
|
-
__send__("_[]=", index,
|
|
51
|
+
__send__("_[]=", index, QVariant.new(element))
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
# @!visibility private
|
|
@@ -18,13 +18,13 @@ module RubyQt6
|
|
|
18
18
|
|
|
19
19
|
# @!visibility private
|
|
20
20
|
def has_value?(value)
|
|
21
|
-
_has_value?(
|
|
21
|
+
_has_value?(QVariant.new(value))
|
|
22
22
|
end
|
|
23
23
|
alias_method :value?, :has_value?
|
|
24
24
|
|
|
25
25
|
# @!visibility private
|
|
26
26
|
def insert(key, value)
|
|
27
|
-
_insert(T.to_qstr(key),
|
|
27
|
+
_insert(T.to_qstr(key), QVariant.new(value))
|
|
28
28
|
end
|
|
29
29
|
alias_method :[]=, :insert
|
|
30
30
|
|
data/lib/qt6/qtcore/version.rb
CHANGED
data/lib/qt6/qtcore.rb
CHANGED
|
@@ -55,6 +55,7 @@ require_relative "qtcore/qmarginsf"
|
|
|
55
55
|
require_relative "qtcore/qmodelindex"
|
|
56
56
|
require_relative "qtcore/qpoint"
|
|
57
57
|
require_relative "qtcore/qpointf"
|
|
58
|
+
require_relative "qtcore/qprocessenvironment"
|
|
58
59
|
require_relative "qtcore/qrect"
|
|
59
60
|
require_relative "qtcore/qrectf"
|
|
60
61
|
require_relative "qtcore/qregularexpression"
|
|
@@ -66,6 +67,7 @@ require_relative "qtcore/qsizef"
|
|
|
66
67
|
require_relative "qtcore/qstandardpaths"
|
|
67
68
|
require_relative "qtcore/qtextstream"
|
|
68
69
|
require_relative "qtcore/qurl"
|
|
70
|
+
require_relative "qtcore/qurlquery"
|
|
69
71
|
require_relative "qtcore/quuid"
|
|
70
72
|
require_relative "qtcore/qvariant"
|
|
71
73
|
|
|
@@ -74,9 +76,11 @@ require_relative "qtcore/qabstractitemmodel"
|
|
|
74
76
|
require_relative "qtcore/qabstractlistmodel"
|
|
75
77
|
require_relative "qtcore/qabstracttablemodel"
|
|
76
78
|
require_relative "qtcore/qcoreapplication"
|
|
79
|
+
require_relative "qtcore/qeventloop"
|
|
77
80
|
require_relative "qtcore/qiodevice"
|
|
78
81
|
require_relative "qtcore/qfiledevice"
|
|
79
82
|
require_relative "qtcore/qfile"
|
|
83
|
+
require_relative "qtcore/qprocess"
|
|
80
84
|
require_relative "qtcore/qitemselectionmodel"
|
|
81
85
|
require_relative "qtcore/qsettings"
|
|
82
86
|
require_relative "qtcore/qsignalmapper"
|
|
@@ -90,3 +94,5 @@ require_relative "qtcore/qvariantmap"
|
|
|
90
94
|
|
|
91
95
|
require_relative "bando/dsl"
|
|
92
96
|
require_relative "bando/qobject"
|
|
97
|
+
|
|
98
|
+
RubyQt6.initialize!(RubyQt6::QtCore)
|
|
@@ -20,8 +20,8 @@ module Kernel
|
|
|
20
20
|
qmetatype_id = enum._qvariant_register_metatype
|
|
21
21
|
RubyQt6::QtCore::QVariant.register(
|
|
22
22
|
qmetatype_id,
|
|
23
|
-
->(value) {
|
|
24
|
-
->(qvariant) { enum.from_int(
|
|
23
|
+
->(value) { QVariant.from_int(value.to_int).tap { |qvariant| qvariant.convert(QMetaType.new(qmetatype_id)) } },
|
|
24
|
+
->(qvariant) { enum.from_int(QVariant.to_int(qvariant)) },
|
|
25
25
|
from: enum
|
|
26
26
|
)
|
|
27
27
|
end
|