ruby-qt6-qtcore 1.0.1 → 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/.rubocop.yml +1 -0
- data/Rakefile +4 -0
- data/ext/qt6/qtcore/{bando-rb.cpp → bando-core-rb.cpp} +4 -2
- data/ext/qt6/qtcore/bando-core-rb.hpp +5 -0
- data/ext/qt6/qtcore/bando-qobject-rb.cpp +3 -3
- data/ext/qt6/qtcore/bando-qobject-rb.hpp +4 -3
- data/ext/qt6/qtcore/extconf.rb +4 -12
- data/ext/qt6/qtcore/qabstractitemmodel-rb.cpp +31 -31
- data/ext/qt6/qtcore/qabstractitemmodel-rb.hpp +4 -3
- data/ext/qt6/qtcore/qanystringview-rb.cpp +3 -3
- data/ext/qt6/qtcore/qanystringview-rb.hpp +4 -3
- data/ext/qt6/qtcore/qbasictimer-rb.cpp +3 -3
- data/ext/qt6/qtcore/qbasictimer-rb.hpp +4 -3
- data/ext/qt6/qtcore/qbytearray-rb.cpp +30 -3
- data/ext/qt6/qtcore/qbytearray-rb.hpp +4 -3
- data/ext/qt6/qtcore/qchar-rb.cpp +3 -3
- data/ext/qt6/qtcore/qchar-rb.hpp +4 -3
- data/ext/qt6/qtcore/qcoreapplication-rb.cpp +14 -14
- data/ext/qt6/qtcore/qcoreapplication-rb.hpp +4 -3
- data/ext/qt6/qtcore/qcoreevent-rb.cpp +6 -7
- data/ext/qt6/qtcore/qcoreevent-rb.hpp +4 -3
- data/ext/qt6/qtcore/qdatetime-rb.cpp +5 -5
- data/ext/qt6/qtcore/qdatetime-rb.hpp +4 -3
- data/ext/qt6/qtcore/qdir-rb.cpp +3 -3
- data/ext/qt6/qtcore/qdir-rb.hpp +4 -3
- data/ext/qt6/qtcore/qeventloop-rb.cpp +33 -0
- data/ext/qt6/qtcore/qeventloop-rb.hpp +5 -0
- data/ext/qt6/qtcore/qfile-rb.cpp +3 -3
- data/ext/qt6/qtcore/qfile-rb.hpp +4 -3
- data/ext/qt6/qtcore/qfiledevice-rb.cpp +3 -3
- data/ext/qt6/qtcore/qfiledevice-rb.hpp +4 -3
- data/ext/qt6/qtcore/qfileinfo-rb.cpp +3 -3
- data/ext/qt6/qtcore/qfileinfo-rb.hpp +4 -3
- data/ext/qt6/qtcore/qiodevice-rb.cpp +10 -10
- data/ext/qt6/qtcore/qiodevice-rb.hpp +4 -3
- data/ext/qt6/qtcore/qiodevicebase-rb.cpp +3 -3
- data/ext/qt6/qtcore/qiodevicebase-rb.hpp +4 -3
- data/ext/qt6/qtcore/qitemselection-rb.cpp +4 -4
- data/ext/qt6/qtcore/qitemselection-rb.hpp +4 -3
- data/ext/qt6/qtcore/qitemselectionmodel-rb.cpp +9 -9
- data/ext/qt6/qtcore/qitemselectionmodel-rb.hpp +4 -3
- data/ext/qt6/qtcore/qlibraryinfo-rb.cpp +3 -3
- data/ext/qt6/qtcore/qlibraryinfo-rb.hpp +4 -3
- data/ext/qt6/qtcore/qline-rb.cpp +4 -4
- data/ext/qt6/qtcore/qline-rb.hpp +4 -3
- data/ext/qt6/qtcore/qlocale-rb.cpp +3 -3
- data/ext/qt6/qtcore/qlocale-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmargins-rb.cpp +4 -4
- data/ext/qt6/qtcore/qmargins-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetaclassinfo-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmetaclassinfo-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetamethod-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmetamethod-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetaobject-rb.cpp +4 -4
- data/ext/qt6/qtcore/qmetaobject-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetaobjectbuilder-rb.cpp +6 -6
- data/ext/qt6/qtcore/qmetaobjectbuilder-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmetatype-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmetatype-rb.hpp +4 -3
- data/ext/qt6/qtcore/qmimetype-rb.cpp +28 -0
- data/ext/qt6/qtcore/qmimetype-rb.hpp +5 -0
- data/ext/qt6/qtcore/qmodelindex-rb.cpp +3 -3
- data/ext/qt6/qtcore/qmodelindex-rb.hpp +4 -3
- data/ext/qt6/qtcore/qobject-rb.cpp +8 -8
- data/ext/qt6/qtcore/qobject-rb.hpp +4 -3
- data/ext/qt6/qtcore/qpoint-rb.cpp +4 -4
- data/ext/qt6/qtcore/qpoint-rb.hpp +4 -3
- 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/qrect-rb.cpp +8 -4
- data/ext/qt6/qtcore/qrect-rb.hpp +4 -3
- data/ext/qt6/qtcore/qregularexpression-rb.cpp +16 -4
- data/ext/qt6/qtcore/qregularexpression-rb.hpp +4 -3
- data/ext/qt6/qtcore/qresource-rb.cpp +3 -3
- data/ext/qt6/qtcore/qresource-rb.hpp +4 -3
- data/ext/qt6/qtcore/qsettings-rb.cpp +3 -3
- data/ext/qt6/qtcore/qsettings-rb.hpp +4 -3
- data/ext/qt6/qtcore/qsignalmapper-rb.cpp +7 -7
- data/ext/qt6/qtcore/qsignalmapper-rb.hpp +4 -3
- data/ext/qt6/qtcore/qsize-rb.cpp +4 -4
- data/ext/qt6/qtcore/qsize-rb.hpp +4 -3
- data/ext/qt6/qtcore/qstandardpaths-rb.cpp +61 -0
- data/ext/qt6/qtcore/qstandardpaths-rb.hpp +5 -0
- data/ext/qt6/qtcore/qstring-rb.cpp +5 -3
- data/ext/qt6/qtcore/qstring-rb.hpp +4 -3
- data/ext/qt6/qtcore/qstringlist-rb.cpp +5 -41
- data/ext/qt6/qtcore/qstringlist-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-af-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-af-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-gl-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-gl-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-mr-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-mr-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-enum-sz-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-enum-sz-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-flags-al-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-flags-al-rb.hpp +4 -3
- data/ext/qt6/qtcore/qt-flags-mz-rb.cpp +2 -2
- data/ext/qt6/qtcore/qt-flags-mz-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtcore-rb.cpp +26 -8
- data/ext/qt6/qtcore/qtcore-rb.hpp +1 -1
- data/ext/qt6/qtcore/qtcoreversion-rb.cpp +2 -2
- data/ext/qt6/qtcore/qtcoreversion-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtextstream-rb.cpp +3 -3
- data/ext/qt6/qtcore/qtextstream-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtimer-rb.cpp +4 -6
- data/ext/qt6/qtcore/qtimer-rb.hpp +4 -3
- data/ext/qt6/qtcore/qtranslator-rb.cpp +3 -3
- data/ext/qt6/qtcore/qtranslator-rb.hpp +4 -3
- data/ext/qt6/qtcore/qurl-rb.cpp +10 -6
- data/ext/qt6/qtcore/qurl-rb.hpp +4 -3
- data/ext/qt6/qtcore/qurlquery-rb.cpp +33 -0
- data/ext/qt6/qtcore/qurlquery-rb.hpp +5 -0
- data/ext/qt6/qtcore/quuid-rb.cpp +3 -3
- data/ext/qt6/qtcore/quuid-rb.hpp +4 -3
- data/ext/qt6/qtcore/qvariant-rb.cpp +6 -3
- data/ext/qt6/qtcore/qvariant-rb.hpp +4 -3
- data/ext/qt6/qtcore/qvariantlist-rb.cpp +16 -0
- data/ext/qt6/qtcore/qvariantlist-rb.hpp +5 -0
- data/ext/qt6/qtcore/qvariantmap-rb.cpp +16 -0
- data/ext/qt6/qtcore/qvariantmap-rb.hpp +5 -0
- data/ext/qt6/qtcore/t-qtcore-rb.cpp +14 -6
- data/ext/qt6/qtcore/t-qtcore-rb.hpp +4 -3
- data/lib/qt6/ducktyping.rb +10 -3
- data/lib/qt6/qtcore/private/metamethod.rb +1 -1
- data/lib/qt6/qtcore/private/metaobject.rb +5 -4
- data/lib/qt6/qtcore/qabstractitemmodel.rb +2 -2
- data/lib/qt6/qtcore/qanystringview.rb +0 -6
- data/lib/qt6/qtcore/qbytearray.rb +13 -0
- data/lib/qt6/qtcore/qcoreapplication.rb +31 -3
- data/lib/qt6/qtcore/qdate.rb +1 -1
- data/lib/qt6/qtcore/qdatetime.rb +2 -2
- data/lib/qt6/qtcore/qeventloop.rb +17 -0
- data/lib/qt6/qtcore/qitemselection.rb +6 -1
- data/lib/qt6/qtcore/qlocale.rb +1 -1
- data/lib/qt6/qtcore/qmimetype.rb +9 -0
- data/lib/qt6/qtcore/qobject.rb +13 -2
- data/lib/qt6/qtcore/qprocess.rb +50 -0
- data/lib/qt6/qtcore/qprocessenvironment.rb +11 -0
- data/lib/qt6/qtcore/qregularexpression.rb +1 -1
- data/lib/qt6/qtcore/qregularexpressionmatchiterator.rb +9 -0
- data/lib/qt6/qtcore/qstandardpaths.rb +15 -0
- data/lib/qt6/qtcore/qstring.rb +7 -6
- data/lib/qt6/qtcore/qstringlist.rb +45 -2
- data/lib/qt6/qtcore/qtime.rb +1 -1
- data/lib/qt6/qtcore/qtimer.rb +1 -1
- data/lib/qt6/qtcore/qurl.rb +25 -0
- data/lib/qt6/qtcore/qurlquery.rb +41 -0
- data/lib/qt6/qtcore/quuid.rb +1 -1
- data/lib/qt6/qtcore/qvariant.rb +5 -1
- data/lib/qt6/qtcore/qvariantlist.rb +60 -0
- data/lib/qt6/qtcore/qvariantmap.rb +47 -0
- data/lib/qt6/qtcore/version.rb +1 -1
- data/lib/qt6/qtcore.rb +10 -0
- data/lib/qt6/refinements/kernel.rb +22 -5
- data/lib/qt6/refinements/object.rb +15 -0
- data/lib/qt6/refinements/symbol.rb +8 -0
- metadata +33 -6
- data/ext/qt6/qtcore/bando-rb.hpp +0 -4
|
@@ -4,10 +4,10 @@ module RubyQt6
|
|
|
4
4
|
module QtCore
|
|
5
5
|
# @see https://doc.qt.io/qt-6/qabstractitemmodel.html
|
|
6
6
|
class QAbstractItemModel < RubyQt6::QtCore::QObject
|
|
7
|
-
# @!parse class LayoutChangeHint; end
|
|
8
7
|
# @!parse class CheckIndexOption; end
|
|
8
|
+
# @!parse class LayoutChangeHint; end
|
|
9
|
+
rubyqt6_declare_enum_under QAbstractItemModel, QAbstractItemModel::CheckIndexOption, alias: false
|
|
9
10
|
rubyqt6_declare_enum_under QAbstractItemModel, QAbstractItemModel::LayoutChangeHint
|
|
10
|
-
rubyqt6_declare_enum_under QAbstractItemModel, QAbstractItemModel::CheckIndexOption
|
|
11
11
|
|
|
12
12
|
# @!parse
|
|
13
13
|
q_object do
|
|
@@ -7,12 +7,6 @@ module RubyQt6
|
|
|
7
7
|
# @!visibility private
|
|
8
8
|
alias_method :_initialize, :initialize
|
|
9
9
|
|
|
10
|
-
# @!visibility private
|
|
11
|
-
def self.new(str)
|
|
12
|
-
return str if str.is_a?(self)
|
|
13
|
-
allocate.tap { |o| o.__send__(:initialize, str) }
|
|
14
|
-
end
|
|
15
|
-
|
|
16
10
|
# @param str [String, QString]
|
|
17
11
|
# @return [QAnyStringView]
|
|
18
12
|
def initialize(str)
|
|
@@ -4,6 +4,8 @@ module RubyQt6
|
|
|
4
4
|
module QtCore
|
|
5
5
|
# @see https://doc.qt.io/qt-6/qbytearray.html
|
|
6
6
|
class QByteArray
|
|
7
|
+
include Comparable
|
|
8
|
+
|
|
7
9
|
# @!visibility private
|
|
8
10
|
alias_method :_initialize, :initialize
|
|
9
11
|
|
|
@@ -13,10 +15,21 @@ module RubyQt6
|
|
|
13
15
|
_initialize(str)
|
|
14
16
|
end
|
|
15
17
|
|
|
18
|
+
# @!visibility private
|
|
19
|
+
def <=>(other)
|
|
20
|
+
return nil unless other.is_a?(self.class)
|
|
21
|
+
self.class._operator_compare(self, other)
|
|
22
|
+
end
|
|
23
|
+
|
|
16
24
|
# @!visibility private
|
|
17
25
|
def to_s
|
|
18
26
|
to_std_string
|
|
19
27
|
end
|
|
28
|
+
|
|
29
|
+
# @!visibility private
|
|
30
|
+
def inspect
|
|
31
|
+
T.inspect_struct(self, str: to_s)
|
|
32
|
+
end
|
|
20
33
|
end
|
|
21
34
|
end
|
|
22
35
|
end
|
|
@@ -16,13 +16,32 @@ module RubyQt6
|
|
|
16
16
|
slot "quit()"
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# @!visibility private
|
|
20
|
+
def self.set_application_name(name)
|
|
21
|
+
_set_application_name(T.to_qstr(name))
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @!visibility private
|
|
25
|
+
def self.set_application_version(version)
|
|
26
|
+
_set_application_version(T.to_qstr(version))
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @!visibility private
|
|
30
|
+
def self.set_organization_domain(org_domain)
|
|
31
|
+
_set_organization_domain(T.to_qstr(org_domain))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# @!visibility private
|
|
35
|
+
def self.set_organization_name(org_name)
|
|
36
|
+
_set_organization_name(T.to_qstr(org_name))
|
|
37
|
+
end
|
|
38
|
+
|
|
19
39
|
# @!visibility private
|
|
20
40
|
alias_method :_initialize, :initialize
|
|
21
41
|
|
|
22
|
-
# @param argv [Array<String>]
|
|
23
42
|
# @return [QCoreApplication]
|
|
24
|
-
def initialize
|
|
25
|
-
argv =
|
|
43
|
+
def initialize
|
|
44
|
+
argv = _initialize_qApp_argv
|
|
26
45
|
_initialize(argv.size, argv.data)
|
|
27
46
|
_initialize_qApp
|
|
28
47
|
end
|
|
@@ -36,6 +55,15 @@ module RubyQt6
|
|
|
36
55
|
|
|
37
56
|
private
|
|
38
57
|
|
|
58
|
+
# The data referred to by argc and argv must stay valid for the
|
|
59
|
+
# entire lifetime of the QCoreApplication object. In addition,
|
|
60
|
+
# argc must be greater than zero and argv must contain at least
|
|
61
|
+
# one valid character string.
|
|
62
|
+
def _initialize_qApp_argv
|
|
63
|
+
argv = [$PROGRAM_NAME] + ARGV
|
|
64
|
+
$qApp_argv = ::Rice4RubyQt6::Buffer≺char∗≻.new(argv.map(&:bytes))
|
|
65
|
+
end
|
|
66
|
+
|
|
39
67
|
def _initialize_qApp
|
|
40
68
|
$qApp = self
|
|
41
69
|
end
|
data/lib/qt6/qtcore/qdate.rb
CHANGED
data/lib/qt6/qtcore/qdatetime.rb
CHANGED
|
@@ -7,7 +7,7 @@ module RubyQt6
|
|
|
7
7
|
include Comparable
|
|
8
8
|
|
|
9
9
|
# @!parse class TransitionResolution; end
|
|
10
|
-
rubyqt6_declare_enum_under QDateTime, QDateTime::TransitionResolution
|
|
10
|
+
rubyqt6_declare_enum_under QDateTime, QDateTime::TransitionResolution, alias: false
|
|
11
11
|
|
|
12
12
|
# @!visibility private
|
|
13
13
|
alias_method :_initialize, :initialize
|
|
@@ -41,7 +41,7 @@ module RubyQt6
|
|
|
41
41
|
|
|
42
42
|
# @!visibility private
|
|
43
43
|
def <=>(other)
|
|
44
|
-
return nil unless other.is_a?(
|
|
44
|
+
return nil unless other.is_a?(self.class)
|
|
45
45
|
self.class._operator_compare(self, other)
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -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
|
|
@@ -5,7 +5,12 @@ module RubyQt6
|
|
|
5
5
|
# @see https://doc.qt.io/qt-6/qitemselection.html
|
|
6
6
|
class QItemSelection
|
|
7
7
|
# @!parse
|
|
8
|
-
QtCore::QVariant.register(
|
|
8
|
+
QtCore::QVariant.register(
|
|
9
|
+
_qvariant_register_metatype,
|
|
10
|
+
method(:_qvariant_from_value),
|
|
11
|
+
method(:_qvariant_to_value),
|
|
12
|
+
from: self
|
|
13
|
+
)
|
|
9
14
|
end
|
|
10
15
|
end
|
|
11
16
|
end
|
data/lib/qt6/qtcore/qlocale.rb
CHANGED
|
@@ -26,7 +26,7 @@ module RubyQt6
|
|
|
26
26
|
rubyqt6_declare_enum_under QLocale, QLocale::FormatType
|
|
27
27
|
rubyqt6_declare_enum_under QLocale, QLocale::NumberOption
|
|
28
28
|
rubyqt6_declare_enum_under QLocale, QLocale::FloatingPointPrecisionOption
|
|
29
|
-
rubyqt6_declare_enum_under QLocale, QLocale::TagSeparator
|
|
29
|
+
rubyqt6_declare_enum_under QLocale, QLocale::TagSeparator, alias: false
|
|
30
30
|
rubyqt6_declare_enum_under QLocale, QLocale::CurrencySymbolFormat
|
|
31
31
|
rubyqt6_declare_enum_under QLocale, QLocale::DataSizeFormat
|
|
32
32
|
rubyqt6_declare_enum_under QLocale, QLocale::LanguageCodeType
|
data/lib/qt6/qtcore/qobject.rb
CHANGED
|
@@ -8,7 +8,8 @@ module RubyQt6
|
|
|
8
8
|
def self.q_object(&blk)
|
|
9
9
|
if !name.start_with?("RubyQt6::")
|
|
10
10
|
if !superclass.name.start_with?("RubyQt6::Bando::")
|
|
11
|
-
raise "Invalid superclass: macro `q_object`
|
|
11
|
+
raise "Invalid superclass: macro `q_object` " \
|
|
12
|
+
"only available for subclass of RubyQt6::Bando::<...>"
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
|
|
@@ -22,7 +23,7 @@ module RubyQt6
|
|
|
22
23
|
QtCore::Private::Signal.new(self, meth)
|
|
23
24
|
end
|
|
24
25
|
elsif meth.slot? && mo.ruby?
|
|
25
|
-
define_method(meth.qsignature_name) do |*args|
|
|
26
|
+
define_method("_rubyqt6_slot_" + meth.qsignature_name) do |*args|
|
|
26
27
|
r = __send__(meth.name, *args.map(&:value))
|
|
27
28
|
next if meth.return_type.nil?
|
|
28
29
|
|
|
@@ -68,6 +69,11 @@ module RubyQt6
|
|
|
68
69
|
_children.map { |child| T.bando_qobject_cast(child) }
|
|
69
70
|
end
|
|
70
71
|
|
|
72
|
+
# @!visibility private
|
|
73
|
+
def delete_now
|
|
74
|
+
self.class._delete_now(self)
|
|
75
|
+
end
|
|
76
|
+
|
|
71
77
|
# @!visibility private
|
|
72
78
|
def find_child(name, options = nil)
|
|
73
79
|
options ||= QtCore::Qt::FindChildrenRecursively
|
|
@@ -87,6 +93,11 @@ module RubyQt6
|
|
|
87
93
|
T.bando_qobject_cast(_parent)
|
|
88
94
|
end
|
|
89
95
|
|
|
96
|
+
# @!visibility private
|
|
97
|
+
def set_object_name(name)
|
|
98
|
+
_set_object_name(T.to_qstr(name))
|
|
99
|
+
end
|
|
100
|
+
|
|
90
101
|
# @!visibility private
|
|
91
102
|
def tr(source_text, disambiguation = "", n = -1)
|
|
92
103
|
context = self.class.name
|
|
@@ -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 ||= QtCore::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
|
|
@@ -26,7 +26,7 @@ module RubyQt6
|
|
|
26
26
|
# @param options [QRegularExpression::PatternOptions]
|
|
27
27
|
# @return [QRegularExpression]
|
|
28
28
|
def initialize(pattern = "", options = nil)
|
|
29
|
-
options ||= QRegularExpression::
|
|
29
|
+
options ||= QtCore::QRegularExpression::NoPatternOption
|
|
30
30
|
_initialize(T.to_qstr(pattern), T.to_qflags(options))
|
|
31
31
|
end
|
|
32
32
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
# @see https://doc.qt.io/qt-6/qstandardpaths.html
|
|
6
|
+
class QStandardPaths
|
|
7
|
+
# @!parse class LocateOption ; end
|
|
8
|
+
# @!parse class LocateOptions ; end
|
|
9
|
+
# @!parse class StandardLocation; end
|
|
10
|
+
rubyqt6_declare_enum_under QStandardPaths, QStandardPaths::LocateOption
|
|
11
|
+
rubyqt6_declare_enum_under QStandardPaths, QStandardPaths::StandardLocation
|
|
12
|
+
rubyqt6_declare_qflags QStandardPaths::LocateOptions, QStandardPaths::LocateOption
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/qt6/qtcore/qstring.rb
CHANGED
|
@@ -9,12 +9,6 @@ module RubyQt6
|
|
|
9
9
|
# @!visibility private
|
|
10
10
|
alias_method :_initialize, :initialize
|
|
11
11
|
|
|
12
|
-
# @!visibility private
|
|
13
|
-
def self.new(str)
|
|
14
|
-
return str if str.is_a?(self)
|
|
15
|
-
allocate.tap { |o| o.__send__(:initialize, str) }
|
|
16
|
-
end
|
|
17
|
-
|
|
18
12
|
# @param str [String]
|
|
19
13
|
# @return [QString]
|
|
20
14
|
def initialize(str)
|
|
@@ -27,6 +21,13 @@ module RubyQt6
|
|
|
27
21
|
_contains(*args)
|
|
28
22
|
end
|
|
29
23
|
|
|
24
|
+
# @!visibility private
|
|
25
|
+
def index_of(*args)
|
|
26
|
+
T.args_nth_to_qstr(args, 0)
|
|
27
|
+
_index_of(*args).tap { |r| return nil if r == -1 }
|
|
28
|
+
end
|
|
29
|
+
alias_method :index, :index_of
|
|
30
|
+
|
|
30
31
|
# @!visibility private
|
|
31
32
|
def split(*args)
|
|
32
33
|
T.args_nth_to_qstr(args, 0)
|
|
@@ -5,8 +5,51 @@ module RubyQt6
|
|
|
5
5
|
# @see https://doc.qt.io/qt-6/qstringlist.html
|
|
6
6
|
class QStringList
|
|
7
7
|
# @!visibility private
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
alias_method :_count, :count
|
|
9
|
+
alias_method :_include?, :include?
|
|
10
|
+
alias_method :_index, :index
|
|
11
|
+
alias_method :_insert, :insert
|
|
12
|
+
alias_method :_push, :push
|
|
13
|
+
alias_method :_delete, :delete
|
|
14
|
+
alias_method "_[]=", :[]=
|
|
15
|
+
|
|
16
|
+
# @!visibility private
|
|
17
|
+
def count(*args)
|
|
18
|
+
case args.size
|
|
19
|
+
when 1 then _count(T.to_qstr(args[0]))
|
|
20
|
+
else _count(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @!visibility private
|
|
25
|
+
def include?(element)
|
|
26
|
+
_include?(T.to_qstr(element))
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @!visibility private
|
|
30
|
+
def index(element)
|
|
31
|
+
_index(T.to_qstr(element))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# @!visibility private
|
|
35
|
+
def insert(index, element)
|
|
36
|
+
_insert(index, T.to_qstr(element))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @!visibility private
|
|
40
|
+
def push(element)
|
|
41
|
+
_push(T.to_qstr(element))
|
|
42
|
+
end
|
|
43
|
+
alias_method :<<, :push
|
|
44
|
+
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def delete(element)
|
|
47
|
+
_delete(T.to_qstr(element))
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# @!visibility private
|
|
51
|
+
def []=(index, element)
|
|
52
|
+
__send__("_[]=", index, T.to_qstr(element))
|
|
10
53
|
end
|
|
11
54
|
|
|
12
55
|
# @!visibility private
|
data/lib/qt6/qtcore/qtime.rb
CHANGED
data/lib/qt6/qtcore/qtimer.rb
CHANGED
|
@@ -17,7 +17,7 @@ module RubyQt6
|
|
|
17
17
|
|
|
18
18
|
# @!visibility private
|
|
19
19
|
def self.single_shot(nsec, receiver, member)
|
|
20
|
-
metamethod = QtCore::Private::MetaObject.find_receiver_metamethod!(receiver, member)
|
|
20
|
+
metamethod = QtCore::Private::MetaObject.find_receiver_metamethod!(receiver, member, nil)
|
|
21
21
|
_single_shot(nsec, receiver, metamethod.qsignature)
|
|
22
22
|
end
|
|
23
23
|
|
data/lib/qt6/qtcore/qurl.rb
CHANGED
|
@@ -23,9 +23,28 @@ module RubyQt6
|
|
|
23
23
|
rubyqt6_declare_qflags QUrl::FormattingOptions, QUrl::UrlFormattingOption
|
|
24
24
|
rubyqt6_declare_qflags QUrl::UserInputResolutionOptions, QUrl::UserInputResolutionOption
|
|
25
25
|
|
|
26
|
+
# @!parse
|
|
27
|
+
QtCore::QVariant.register(
|
|
28
|
+
_qvariant_register_metatype,
|
|
29
|
+
method(:_qvariant_from_value),
|
|
30
|
+
method(:_qvariant_to_value),
|
|
31
|
+
from: self
|
|
32
|
+
)
|
|
33
|
+
|
|
26
34
|
# @!visibility private
|
|
27
35
|
alias_method :_initialize, :initialize
|
|
28
36
|
|
|
37
|
+
# @!visibility private
|
|
38
|
+
def self.from_local_file(local_file)
|
|
39
|
+
_from_local_file(T.to_qstr(local_file))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @!visibility private
|
|
43
|
+
def self.from_user_input(user_input, working_directory = "", options = nil)
|
|
44
|
+
options ||= QtCore::QUrl::DefaultResolution
|
|
45
|
+
_from_user_input(T.to_qstr(user_input), T.to_qstr(working_directory), T.to_qflags(options))
|
|
46
|
+
end
|
|
47
|
+
|
|
29
48
|
# @return [QUrl]
|
|
30
49
|
#
|
|
31
50
|
# @overload initialize
|
|
@@ -41,6 +60,12 @@ module RubyQt6
|
|
|
41
60
|
_initialize(*args)
|
|
42
61
|
end
|
|
43
62
|
|
|
63
|
+
# @!visibility private
|
|
64
|
+
def to_string(options = nil)
|
|
65
|
+
options ||= QtCore::QUrl::ComponentFormattingOption::PrettyDecoded
|
|
66
|
+
_to_string(options.to_i)
|
|
67
|
+
end
|
|
68
|
+
|
|
44
69
|
# @!visibility private
|
|
45
70
|
def to_s
|
|
46
71
|
to_string.to_s
|
|
@@ -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/quuid.rb
CHANGED
data/lib/qt6/qtcore/qvariant.rb
CHANGED
|
@@ -6,6 +6,7 @@ module RubyQt6
|
|
|
6
6
|
class QVariant
|
|
7
7
|
# @!visibility private
|
|
8
8
|
def self.new(object, qmetatype = nil)
|
|
9
|
+
return object if object.is_a?(self)
|
|
9
10
|
from_object(object, qmetatype)
|
|
10
11
|
end
|
|
11
12
|
|
|
@@ -16,9 +17,11 @@ module RubyQt6
|
|
|
16
17
|
|
|
17
18
|
# @!visibility private
|
|
18
19
|
def inspect
|
|
19
|
-
T.inspect_struct(self, type: type_name)
|
|
20
|
+
T.inspect_struct(self, type: type_name, value:)
|
|
20
21
|
end
|
|
21
22
|
|
|
23
|
+
private
|
|
24
|
+
|
|
22
25
|
# @!visibility private
|
|
23
26
|
def self.to_qobject(qvariant)
|
|
24
27
|
T.bando_qobject_cast(_to_qobject(qvariant))
|
|
@@ -30,6 +33,7 @@ module RubyQt6
|
|
|
30
33
|
register(QtCore::QMetaType::Type::Int, method(:from_int), method(:to_int), from: Integer)
|
|
31
34
|
register(QtCore::QMetaType::Type::Double, method(:from_double), method(:to_double), from: Float)
|
|
32
35
|
register(QtCore::QMetaType::Type::QString, method(:from_qstring), method(:to_qstring), from: [String, QtCore::QString])
|
|
36
|
+
register(QtCore::QMetaType::Type::QByteArray, method(:from_qbytearray), method(:to_qbytearray), from: QtCore::QByteArray)
|
|
33
37
|
register(QtCore::QMetaType::Type::QDateTime, method(:from_qdatetime), method(:to_qdatetime), from: QtCore::QDateTime)
|
|
34
38
|
register(QtCore::QMetaType::Type::QDate, method(:from_qdate), method(:to_qdate), from: QtCore::QDate)
|
|
35
39
|
register(QtCore::QMetaType::Type::QTime, method(:from_qtime), method(:to_qtime), from: QtCore::QTime)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
class QVariantList
|
|
6
|
+
# @!visibility private
|
|
7
|
+
alias_method :_count, :count
|
|
8
|
+
alias_method :_include?, :include?
|
|
9
|
+
alias_method :_index, :index
|
|
10
|
+
alias_method :_insert, :insert
|
|
11
|
+
alias_method :_push, :push
|
|
12
|
+
alias_method :_delete, :delete
|
|
13
|
+
alias_method "_[]=", :[]=
|
|
14
|
+
|
|
15
|
+
# @!visibility private
|
|
16
|
+
def count(*args)
|
|
17
|
+
case args.size
|
|
18
|
+
when 1 then _count(QtCore::QVariant.new(args[0]))
|
|
19
|
+
else _count(*args)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @!visibility private
|
|
24
|
+
def include?(element)
|
|
25
|
+
_include?(QtCore::QVariant.new(element))
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @!visibility private
|
|
29
|
+
def index(element)
|
|
30
|
+
_index(QtCore::QVariant.new(element))
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @!visibility private
|
|
34
|
+
def insert(index, element)
|
|
35
|
+
_insert(index, QtCore::QVariant.new(element))
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @!visibility private
|
|
39
|
+
def push(element)
|
|
40
|
+
_push(QtCore::QVariant.new(element))
|
|
41
|
+
end
|
|
42
|
+
alias_method :<<, :push
|
|
43
|
+
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def delete(element)
|
|
46
|
+
_delete(QtCore::QVariant.new(element))
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# @!visibility private
|
|
50
|
+
def []=(index, element)
|
|
51
|
+
__send__("_[]=", index, QtCore::QVariant.new(element))
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# @!visibility private
|
|
55
|
+
def inspect
|
|
56
|
+
T.inspect_struct(self, ary: to_a.map(&:value))
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyQt6
|
|
4
|
+
module QtCore
|
|
5
|
+
class QVariantMap
|
|
6
|
+
# @!visibility private
|
|
7
|
+
alias_method :_has_key?, :has_key?
|
|
8
|
+
alias_method :_has_value?, :has_value?
|
|
9
|
+
alias_method :_insert, :insert
|
|
10
|
+
alias_method :_delete, :delete
|
|
11
|
+
alias_method "_[]", :[]
|
|
12
|
+
|
|
13
|
+
# @!visibility private
|
|
14
|
+
def has_key?(key)
|
|
15
|
+
_has_key?(T.to_qstr(key))
|
|
16
|
+
end
|
|
17
|
+
alias_method :key?, :has_key?
|
|
18
|
+
|
|
19
|
+
# @!visibility private
|
|
20
|
+
def has_value?(value)
|
|
21
|
+
_has_value?(QtCore::QVariant.new(value))
|
|
22
|
+
end
|
|
23
|
+
alias_method :value?, :has_value?
|
|
24
|
+
|
|
25
|
+
# @!visibility private
|
|
26
|
+
def insert(key, value)
|
|
27
|
+
_insert(T.to_qstr(key), QtCore::QVariant.new(value))
|
|
28
|
+
end
|
|
29
|
+
alias_method :[]=, :insert
|
|
30
|
+
|
|
31
|
+
# @!visibility private
|
|
32
|
+
def delete(key)
|
|
33
|
+
_delete(T.to_qstr(key))
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def [](key)
|
|
38
|
+
__send__("[]", T.to_qstr(key))
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @!visibility private
|
|
42
|
+
def inspect
|
|
43
|
+
T.inspect_struct(self, hash: to_h.transform_keys(&:to_s).transform_values(&:value))
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|