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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 293e494bd4d1c313d860e06950b8dfa8f3c3ed9a58e217cfaa4c298b4115bca5
|
|
4
|
+
data.tar.gz: a180f07e7a2d747cdec91f05a8fb7cd93ae9278350eefe136cf7493fba573b09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5502974f45eda419800fda383eab988c7edbcfc162b6fda2e6e088ff40f3ca2052eb921451ea97850ef3e3e8f735e08fcdb808de95bf8440daefeef78fa842ee
|
|
7
|
+
data.tar.gz: aebf08d7f6b0daa102c258779886df73b1def1212db5e2dc4d8ca4886be9e302a9f231302dee408f2866fced10111a9116a0e5b3d9d8dee6209dab876801834a
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#include "qeventloop-rb.hpp"
|
|
2
|
+
#include <qeventloop.h>
|
|
3
|
+
#include <rice/qt6/qenum.hpp>
|
|
4
|
+
#include <rice/qt6/qflags.hpp>
|
|
5
|
+
|
|
6
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
7
|
+
|
|
8
|
+
Class rb_cQEventLoop;
|
|
9
|
+
|
|
10
|
+
void Init_qeventloop(Module rb_mQt6QtCore)
|
|
11
|
+
{
|
|
12
|
+
rb_cQEventLoop =
|
|
13
|
+
// RubyQt6::QtCore::QEventLoop
|
|
14
|
+
define_class_under<QEventLoop, QObject>(rb_mQt6QtCore, "QEventLoop")
|
|
15
|
+
// RubyQt6-Defined Functions
|
|
16
|
+
.define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QEventLoop::staticMetaObject; });
|
|
17
|
+
|
|
18
|
+
Data_Type<QEventLoop::ProcessEventsFlag> rb_cQEventLoopProcessEventsFlag =
|
|
19
|
+
// RubyQt6::QtCore::QEventLoop::ProcessEventsFlag
|
|
20
|
+
define_qenum_under<QEventLoop::ProcessEventsFlag>(rb_cQEventLoop, "ProcessEventsFlag");
|
|
21
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "AllEvents", QEventLoop::ProcessEventsFlag::AllEvents);
|
|
22
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "ExcludeUserInputEvents", QEventLoop::ProcessEventsFlag::ExcludeUserInputEvents);
|
|
23
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "ExcludeSocketNotifiers", QEventLoop::ProcessEventsFlag::ExcludeSocketNotifiers);
|
|
24
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "WaitForMoreEvents", QEventLoop::ProcessEventsFlag::WaitForMoreEvents);
|
|
25
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "X11ExcludeTimers", QEventLoop::ProcessEventsFlag::X11ExcludeTimers);
|
|
26
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "EventLoopExec", QEventLoop::ProcessEventsFlag::EventLoopExec);
|
|
27
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "DialogExec", QEventLoop::ProcessEventsFlag::DialogExec);
|
|
28
|
+
define_qenum_value_under(rb_cQEventLoopProcessEventsFlag, "ApplicationExec", QEventLoop::ProcessEventsFlag::ApplicationExec);
|
|
29
|
+
|
|
30
|
+
Data_Type<QFlags<QEventLoop::ProcessEventsFlag>> rb_cQEventLoopProcessEventsFlags =
|
|
31
|
+
// RubyQt6::QtCore::QEventLoop::ProcessEventsFlags
|
|
32
|
+
define_qflags_under<QEventLoop::ProcessEventsFlag>(rb_cQEventLoop, "ProcessEventsFlags");
|
|
33
|
+
}
|
|
@@ -40,7 +40,6 @@ void Init_qlocale(Module rb_mQt6QtCore)
|
|
|
40
40
|
.define_method("percent", &QLocale::percent)
|
|
41
41
|
.define_method("pm_text", &QLocale::pmText)
|
|
42
42
|
.define_method("positive_sign", &QLocale::positiveSign)
|
|
43
|
-
.define_method<QString (QLocale::*)(QStringView, QLocale::QuotationStyle) const>("quote_string", &QLocale::quoteString, Arg("str"), Arg("style") = static_cast<QLocale::QuotationStyle>(QLocale::QuotationStyle::StandardQuotation))
|
|
44
43
|
.define_method<QString (QLocale::*)(const QString &, QLocale::QuotationStyle) const>("quote_string", &QLocale::quoteString, Arg("str"), Arg("style") = static_cast<QLocale::QuotationStyle>(QLocale::QuotationStyle::StandardQuotation))
|
|
45
44
|
.define_method("script", &QLocale::script)
|
|
46
45
|
.define_method("set_number_options", &QLocale::setNumberOptions, Arg("options"))
|
|
@@ -65,34 +64,23 @@ void Init_qlocale(Module rb_mQt6QtCore)
|
|
|
65
64
|
.define_method<QDateTime (QLocale::*)(const QString &, QLocale::FormatType, int) const>("to_date_time", &QLocale::toDateTime, Arg("string"), Arg("format") = static_cast<QLocale::FormatType>(QLocale::FormatType::LongFormat), Arg("base_year") = static_cast<int>(QLocale::DefaultTwoDigitBaseYear))
|
|
66
65
|
.define_method<QDateTime (QLocale::*)(const QString &, const QString &, QCalendar, int) const>("to_date_time", &QLocale::toDateTime, Arg("string"), Arg("format"), Arg("cal"), Arg("base_year") = static_cast<int>(QLocale::DefaultTwoDigitBaseYear))
|
|
67
66
|
.define_method<QDateTime (QLocale::*)(const QString &, const QString &, int) const>("to_date_time", &QLocale::toDateTime, Arg("string"), Arg("format"), Arg("base_year") = static_cast<int>(QLocale::DefaultTwoDigitBaseYear))
|
|
68
|
-
.define_method<double (QLocale::*)(QStringView, bool *) const>("to_double", &QLocale::toDouble, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
69
67
|
.define_method<double (QLocale::*)(const QString &, bool *) const>("to_double", &QLocale::toDouble, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
70
|
-
.define_method<float (QLocale::*)(QStringView, bool *) const>("to_float", &QLocale::toFloat, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
71
68
|
.define_method<float (QLocale::*)(const QString &, bool *) const>("to_float", &QLocale::toFloat, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
72
|
-
.define_method<int (QLocale::*)(QStringView, bool *) const>("to_int", &QLocale::toInt, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
73
69
|
.define_method<int (QLocale::*)(const QString &, bool *) const>("to_int", &QLocale::toInt, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
74
|
-
.define_method<long (QLocale::*)(QStringView, bool *) const>("to_long", &QLocale::toLong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
75
70
|
.define_method<long (QLocale::*)(const QString &, bool *) const>("to_long", &QLocale::toLong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
76
|
-
.define_method<qlonglong (QLocale::*)(QStringView, bool *) const>("to_longlong", &QLocale::toLongLong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
77
71
|
.define_method<qlonglong (QLocale::*)(const QString &, bool *) const>("to_longlong", &QLocale::toLongLong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
78
72
|
.define_method("to_lower", &QLocale::toLower, Arg("str"))
|
|
79
|
-
.define_method<short (QLocale::*)(QStringView, bool *) const>("to_short", &QLocale::toShort, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
80
73
|
.define_method<short (QLocale::*)(const QString &, bool *) const>("to_short", &QLocale::toShort, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
81
74
|
.define_method<QString (QLocale::*)(uint) const>("to_string", &QLocale::toString, Arg("i"))
|
|
82
75
|
.define_method<QString (QLocale::*)(ulong) const>("to_string", &QLocale::toString, Arg("i"))
|
|
83
76
|
.define_method<QString (QLocale::*)(ushort) const>("to_string", &QLocale::toString, Arg("i"))
|
|
84
77
|
.define_method<QString (QLocale::*)(QDate, QLocale::FormatType) const>("to_string", &QLocale::toString, Arg("date"), Arg("format") = static_cast<QLocale::FormatType>(QLocale::FormatType::LongFormat))
|
|
85
78
|
.define_method<QString (QLocale::*)(QDate, QLocale::FormatType, QCalendar) const>("to_string", &QLocale::toString, Arg("date"), Arg("format"), Arg("cal"))
|
|
86
|
-
.define_method<QString (QLocale::*)(QDate, QStringView) const>("to_string", &QLocale::toString, Arg("date"), Arg("format"))
|
|
87
|
-
.define_method<QString (QLocale::*)(QDate, QStringView, QCalendar) const>("to_string", &QLocale::toString, Arg("date"), Arg("format"), Arg("cal"))
|
|
88
79
|
.define_method<QString (QLocale::*)(QDate, const QString &) const>("to_string", &QLocale::toString, Arg("date"), Arg("format"))
|
|
89
80
|
.define_method<QString (QLocale::*)(QTime, QLocale::FormatType) const>("to_string", &QLocale::toString, Arg("time"), Arg("format") = static_cast<QLocale::FormatType>(QLocale::FormatType::LongFormat))
|
|
90
|
-
.define_method<QString (QLocale::*)(QTime, QStringView) const>("to_string", &QLocale::toString, Arg("time"), Arg("format"))
|
|
91
81
|
.define_method<QString (QLocale::*)(QTime, const QString &) const>("to_string", &QLocale::toString, Arg("time"), Arg("format"))
|
|
92
82
|
.define_method<QString (QLocale::*)(const QDateTime &, QLocale::FormatType) const>("to_string", &QLocale::toString, Arg("date_time"), Arg("format") = static_cast<QLocale::FormatType>(QLocale::FormatType::LongFormat))
|
|
93
83
|
.define_method<QString (QLocale::*)(const QDateTime &, QLocale::FormatType, QCalendar) const>("to_string", &QLocale::toString, Arg("date_time"), Arg("format"), Arg("cal"))
|
|
94
|
-
.define_method<QString (QLocale::*)(const QDateTime &, QStringView) const>("to_string", &QLocale::toString, Arg("date_time"), Arg("format"))
|
|
95
|
-
.define_method<QString (QLocale::*)(const QDateTime &, QStringView, QCalendar) const>("to_string", &QLocale::toString, Arg("date_time"), Arg("format"), Arg("cal"))
|
|
96
84
|
.define_method<QString (QLocale::*)(const QDateTime &, const QString &) const>("to_string", &QLocale::toString, Arg("date_time"), Arg("format"))
|
|
97
85
|
.define_method<QString (QLocale::*)(double, char, int) const>("to_string", &QLocale::toString, Arg("f"), Arg("format") = static_cast<char>('g'), Arg("precision") = static_cast<int>(6))
|
|
98
86
|
.define_method<QString (QLocale::*)(float, char, int) const>("to_string", &QLocale::toString, Arg("f"), Arg("format") = static_cast<char>('g'), Arg("precision") = static_cast<int>(6))
|
|
@@ -103,13 +91,9 @@ void Init_qlocale(Module rb_mQt6QtCore)
|
|
|
103
91
|
.define_method<QString (QLocale::*)(short) const>("to_string", &QLocale::toString, Arg("i"))
|
|
104
92
|
.define_method<QTime (QLocale::*)(const QString &, QLocale::FormatType) const>("to_time", &QLocale::toTime, Arg("string"), Arg("format") = static_cast<QLocale::FormatType>(QLocale::FormatType::LongFormat))
|
|
105
93
|
.define_method<QTime (QLocale::*)(const QString &, const QString &) const>("to_time", &QLocale::toTime, Arg("string"), Arg("format"))
|
|
106
|
-
.define_method<uint (QLocale::*)(QStringView, bool *) const>("to_uint", &QLocale::toUInt, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
107
94
|
.define_method<uint (QLocale::*)(const QString &, bool *) const>("to_uint", &QLocale::toUInt, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
108
|
-
.define_method<ulong (QLocale::*)(QStringView, bool *) const>("to_ulong", &QLocale::toULong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
109
95
|
.define_method<ulong (QLocale::*)(const QString &, bool *) const>("to_ulong", &QLocale::toULong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
110
|
-
.define_method<qulonglong (QLocale::*)(QStringView, bool *) const>("to_ulonglong", &QLocale::toULongLong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
111
96
|
.define_method<qulonglong (QLocale::*)(const QString &, bool *) const>("to_ulonglong", &QLocale::toULongLong, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
112
|
-
.define_method<ushort (QLocale::*)(QStringView, bool *) const>("to_ushort", &QLocale::toUShort, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
113
97
|
.define_method<ushort (QLocale::*)(const QString &, bool *) const>("to_ushort", &QLocale::toUShort, Arg("s"), Arg("ok") = static_cast<bool *>(nullptr))
|
|
114
98
|
.define_method("to_upper", &QLocale::toUpper, Arg("str"))
|
|
115
99
|
.define_method("ui_languages", &QLocale::uiLanguages, Arg("separator") = static_cast<QLocale::TagSeparator>(QLocale::TagSeparator::Dash))
|
|
@@ -31,6 +31,7 @@ void Init_qobject(Module rb_mQt6QtCore)
|
|
|
31
31
|
// RubyQt6::QtCore::QObject
|
|
32
32
|
define_class_under<QObject>(rb_mQt6QtCore, "QObject")
|
|
33
33
|
// RubyQt6-Defined Functions
|
|
34
|
+
.define_method("_qobject_ptr", [](QObject *self) -> uintptr_t { return (uintptr_t)self; })
|
|
34
35
|
.define_singleton_function("_emit", QObject_emit, Arg("sender"), Arg("signal"), Arg("args"))
|
|
35
36
|
.define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QObject::staticMetaObject; })
|
|
36
37
|
.define_singleton_function("_delete_now", [](QObject *object) -> void { delete object; }, Arg("object").takeOwnership())
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#include "qprocess-rb.hpp"
|
|
2
|
+
#include <qprocess.h>
|
|
3
|
+
#include <rice/qt6/qenum.hpp>
|
|
4
|
+
|
|
5
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
6
|
+
|
|
7
|
+
Class rb_cQProcess;
|
|
8
|
+
|
|
9
|
+
void Init_qprocess(Module rb_mQt6QtCore)
|
|
10
|
+
{
|
|
11
|
+
rb_cQProcess =
|
|
12
|
+
// RubyQt6::QtCore::QProcess
|
|
13
|
+
define_class_under<QProcess, QIODevice>(rb_mQt6QtCore, "QProcess")
|
|
14
|
+
// RubyQt6-Defined Functions
|
|
15
|
+
.define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QProcess::staticMetaObject; })
|
|
16
|
+
// Constructor
|
|
17
|
+
.define_constructor(Constructor<QProcess, QObject *>(), Arg("parent"))
|
|
18
|
+
// Public Functions
|
|
19
|
+
.define_method("arguments", &QProcess::arguments)
|
|
20
|
+
.define_method("bytes_to_write", &QProcess::bytesToWrite)
|
|
21
|
+
.define_method("child_process_modifier", &QProcess::childProcessModifier)
|
|
22
|
+
.define_method("close", &QProcess::close)
|
|
23
|
+
.define_method("close_read_channel", &QProcess::closeReadChannel, Arg("channel"))
|
|
24
|
+
.define_method("close_write_channel", &QProcess::closeWriteChannel)
|
|
25
|
+
.define_method("environment", &QProcess::environment)
|
|
26
|
+
.define_method("error", &QProcess::error)
|
|
27
|
+
.define_method("exit_code", &QProcess::exitCode)
|
|
28
|
+
.define_method("exit_status", &QProcess::exitStatus)
|
|
29
|
+
.define_method("fail_child_process_modifier", &QProcess::failChildProcessModifier, Arg("description"), Arg("error") = static_cast<int>(0))
|
|
30
|
+
.define_method("input_channel_mode", &QProcess::inputChannelMode)
|
|
31
|
+
.define_method("sequential?", &QProcess::isSequential)
|
|
32
|
+
.define_method("open", &QProcess::open, Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
33
|
+
.define_method("process_channel_mode", &QProcess::processChannelMode)
|
|
34
|
+
.define_method("process_environment", &QProcess::processEnvironment)
|
|
35
|
+
.define_method("process_id", &QProcess::processId)
|
|
36
|
+
.define_method("program", &QProcess::program)
|
|
37
|
+
.define_method("read_all_standard_error", &QProcess::readAllStandardError)
|
|
38
|
+
.define_method("read_all_standard_output", &QProcess::readAllStandardOutput)
|
|
39
|
+
.define_method("read_channel", &QProcess::readChannel)
|
|
40
|
+
.define_method("set_arguments", &QProcess::setArguments, Arg("arguments"))
|
|
41
|
+
.define_method("set_child_process_modifier", &QProcess::setChildProcessModifier, Arg("modifier"))
|
|
42
|
+
.define_method("set_environment", &QProcess::setEnvironment, Arg("environment"))
|
|
43
|
+
.define_method("set_input_channel_mode", &QProcess::setInputChannelMode, Arg("mode"))
|
|
44
|
+
.define_method("set_process_channel_mode", &QProcess::setProcessChannelMode, Arg("mode"))
|
|
45
|
+
.define_method("set_process_environment", &QProcess::setProcessEnvironment, Arg("environment"))
|
|
46
|
+
.define_method("set_program", &QProcess::setProgram, Arg("program"))
|
|
47
|
+
.define_method("set_read_channel", &QProcess::setReadChannel, Arg("channel"))
|
|
48
|
+
.define_method("set_standard_error_file", &QProcess::setStandardErrorFile, Arg("file_name"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::Truncate))
|
|
49
|
+
.define_method("set_standard_input_file", &QProcess::setStandardInputFile, Arg("file_name"))
|
|
50
|
+
.define_method("set_standard_output_file", &QProcess::setStandardOutputFile, Arg("file_name"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::Truncate))
|
|
51
|
+
.define_method("set_standard_output_process", &QProcess::setStandardOutputProcess, Arg("destination"))
|
|
52
|
+
.define_method("set_working_directory", &QProcess::setWorkingDirectory, Arg("dir"))
|
|
53
|
+
.define_method<void (QProcess::*)(QIODeviceBase::OpenMode)>("start", &QProcess::start, Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
54
|
+
.define_method<void (QProcess::*)(const QString &, const QStringList &, QIODeviceBase::OpenMode)>("start", &QProcess::start, Arg("program"), Arg("arguments") = static_cast<const QStringList &>(QStringList {}), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
55
|
+
.define_method("start_command", &QProcess::startCommand, Arg("command"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
56
|
+
.define_method<bool (QProcess::*)(qint64 *)>("start_detached", &QProcess::startDetached, Arg("pid") = static_cast<qint64 *>(nullptr))
|
|
57
|
+
.define_method("state", &QProcess::state)
|
|
58
|
+
.define_method("wait_for_bytes_written", &QProcess::waitForBytesWritten, Arg("msecs") = static_cast<int>(30000))
|
|
59
|
+
.define_method("wait_for_finished", &QProcess::waitForFinished, Arg("msecs") = static_cast<int>(30000))
|
|
60
|
+
.define_method("wait_for_ready_read", &QProcess::waitForReadyRead, Arg("msecs") = static_cast<int>(30000))
|
|
61
|
+
.define_method("wait_for_started", &QProcess::waitForStarted, Arg("msecs") = static_cast<int>(30000))
|
|
62
|
+
.define_method("working_directory", &QProcess::workingDirectory)
|
|
63
|
+
// Public Slots
|
|
64
|
+
.define_method("kill", &QProcess::kill)
|
|
65
|
+
.define_method("terminate", &QProcess::terminate)
|
|
66
|
+
// Signals
|
|
67
|
+
// .define_method("error_occurred", &QProcess::errorOccurred, Arg("error"))
|
|
68
|
+
// .define_method("finished", &QProcess::finished, Arg("exit_code"), Arg("exit_status") = static_cast<QProcess::ExitStatus>(QProcess::NormalExit))
|
|
69
|
+
// .define_method("ready_read_standard_error", &QProcess::readyReadStandardError)
|
|
70
|
+
// .define_method("ready_read_standard_output", &QProcess::readyReadStandardOutput)
|
|
71
|
+
// .define_method("started", &QProcess::started)
|
|
72
|
+
// .define_method("state_changed", &QProcess::stateChanged, Arg("state"))
|
|
73
|
+
// Static Public Members
|
|
74
|
+
.define_singleton_function("_execute", &QProcess::execute, Arg("program"), Arg("arguments"))
|
|
75
|
+
.define_singleton_function("null_device", &QProcess::nullDevice)
|
|
76
|
+
.define_singleton_function("split_command", &QProcess::splitCommand, Arg("command"))
|
|
77
|
+
.define_singleton_function<bool (*)(const QString &, const QStringList &, const QString &, qint64 *)>("start_detached", &QProcess::startDetached, Arg("program"), Arg("arguments") = static_cast<const QStringList &>(QStringList {}), Arg("working_directory") = static_cast<const QString &>(QString()), Arg("pid") = static_cast<qint64 *>(nullptr))
|
|
78
|
+
.define_singleton_function("system_environment", &QProcess::systemEnvironment);
|
|
79
|
+
|
|
80
|
+
Data_Type<QProcess::ExitStatus> rb_cQProcessExitStatus =
|
|
81
|
+
// RubyQt6::QtCore::QProcess::ExitStatus
|
|
82
|
+
define_qenum_under<QProcess::ExitStatus>(rb_cQProcess, "ExitStatus");
|
|
83
|
+
define_qenum_value_under(rb_cQProcessExitStatus, "NormalExit", QProcess::ExitStatus::NormalExit);
|
|
84
|
+
define_qenum_value_under(rb_cQProcessExitStatus, "CrashExit", QProcess::ExitStatus::CrashExit);
|
|
85
|
+
|
|
86
|
+
Data_Type<QProcess::InputChannelMode> rb_cQProcessInputChannelMode =
|
|
87
|
+
// RubyQt6::QtCore::QProcess::InputChannelMode
|
|
88
|
+
define_qenum_under<QProcess::InputChannelMode>(rb_cQProcess, "InputChannelMode");
|
|
89
|
+
define_qenum_value_under(rb_cQProcessInputChannelMode, "ManagedInputChannel", QProcess::InputChannelMode::ManagedInputChannel);
|
|
90
|
+
define_qenum_value_under(rb_cQProcessInputChannelMode, "ForwardedInputChannel", QProcess::InputChannelMode::ForwardedInputChannel);
|
|
91
|
+
|
|
92
|
+
Data_Type<QProcess::ProcessChannel> rb_cQProcessProcessChannel =
|
|
93
|
+
// RubyQt6::QtCore::QProcess::ProcessChannel
|
|
94
|
+
define_qenum_under<QProcess::ProcessChannel>(rb_cQProcess, "ProcessChannel");
|
|
95
|
+
define_qenum_value_under(rb_cQProcessProcessChannel, "StandardOutput", QProcess::ProcessChannel::StandardOutput);
|
|
96
|
+
define_qenum_value_under(rb_cQProcessProcessChannel, "StandardError", QProcess::ProcessChannel::StandardError);
|
|
97
|
+
|
|
98
|
+
Data_Type<QProcess::ProcessChannelMode> rb_cQProcessProcessChannelMode =
|
|
99
|
+
// RubyQt6::QtCore::QProcess::ProcessChannelMode
|
|
100
|
+
define_qenum_under<QProcess::ProcessChannelMode>(rb_cQProcess, "ProcessChannelMode");
|
|
101
|
+
define_qenum_value_under(rb_cQProcessProcessChannelMode, "SeparateChannels", QProcess::ProcessChannelMode::SeparateChannels);
|
|
102
|
+
define_qenum_value_under(rb_cQProcessProcessChannelMode, "MergedChannels", QProcess::ProcessChannelMode::MergedChannels);
|
|
103
|
+
define_qenum_value_under(rb_cQProcessProcessChannelMode, "ForwardedChannels", QProcess::ProcessChannelMode::ForwardedChannels);
|
|
104
|
+
define_qenum_value_under(rb_cQProcessProcessChannelMode, "ForwardedOutputChannel", QProcess::ProcessChannelMode::ForwardedOutputChannel);
|
|
105
|
+
define_qenum_value_under(rb_cQProcessProcessChannelMode, "ForwardedErrorChannel", QProcess::ProcessChannelMode::ForwardedErrorChannel);
|
|
106
|
+
|
|
107
|
+
Data_Type<QProcess::ProcessError> rb_cQProcessProcessError =
|
|
108
|
+
// RubyQt6::QtCore::QProcess::ProcessError
|
|
109
|
+
define_qenum_under<QProcess::ProcessError>(rb_cQProcess, "ProcessError");
|
|
110
|
+
define_qenum_value_under(rb_cQProcessProcessError, "FailedToStart", QProcess::ProcessError::FailedToStart);
|
|
111
|
+
define_qenum_value_under(rb_cQProcessProcessError, "Crashed", QProcess::ProcessError::Crashed);
|
|
112
|
+
define_qenum_value_under(rb_cQProcessProcessError, "Timedout", QProcess::ProcessError::Timedout);
|
|
113
|
+
define_qenum_value_under(rb_cQProcessProcessError, "ReadError", QProcess::ProcessError::ReadError);
|
|
114
|
+
define_qenum_value_under(rb_cQProcessProcessError, "WriteError", QProcess::ProcessError::WriteError);
|
|
115
|
+
define_qenum_value_under(rb_cQProcessProcessError, "UnknownError", QProcess::ProcessError::UnknownError);
|
|
116
|
+
|
|
117
|
+
Data_Type<QProcess::ProcessState> rb_cQProcessProcessState =
|
|
118
|
+
// RubyQt6::QtCore::QProcess::ProcessState
|
|
119
|
+
define_qenum_under<QProcess::ProcessState>(rb_cQProcess, "ProcessState");
|
|
120
|
+
define_qenum_value_under(rb_cQProcessProcessState, "NotRunning", QProcess::ProcessState::NotRunning);
|
|
121
|
+
define_qenum_value_under(rb_cQProcessProcessState, "Starting", QProcess::ProcessState::Starting);
|
|
122
|
+
define_qenum_value_under(rb_cQProcessProcessState, "Running", QProcess::ProcessState::Running);
|
|
123
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#include "qprocess-rb.hpp"
|
|
2
|
+
#include <qprocess.h>
|
|
3
|
+
#include <rice/qt6/qenum.hpp>
|
|
4
|
+
|
|
5
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
6
|
+
|
|
7
|
+
Class rb_cQProcessEnvironment;
|
|
8
|
+
|
|
9
|
+
void Init_qprocessenvironment(Module rb_mQt6QtCore)
|
|
10
|
+
{
|
|
11
|
+
rb_cQProcessEnvironment =
|
|
12
|
+
// RubyQt6::QtCore::QProcessEnvironment
|
|
13
|
+
define_class_under<QProcessEnvironment>(rb_mQt6QtCore, "QProcessEnvironment")
|
|
14
|
+
// Public Functions
|
|
15
|
+
.define_method("clear", &QProcessEnvironment::clear)
|
|
16
|
+
.define_method("contains", &QProcessEnvironment::contains, Arg("name"))
|
|
17
|
+
.define_method("inherits_from_parent", &QProcessEnvironment::inheritsFromParent)
|
|
18
|
+
.define_method<void (QProcessEnvironment::*)(const QString &, const QString &)>("insert", &QProcessEnvironment::insert, Arg("name"), Arg("value"))
|
|
19
|
+
.define_method<void (QProcessEnvironment::*)(const QProcessEnvironment &)>("insert", &QProcessEnvironment::insert, Arg("e"))
|
|
20
|
+
.define_method("empty?", &QProcessEnvironment::isEmpty)
|
|
21
|
+
.define_method("keys", &QProcessEnvironment::keys)
|
|
22
|
+
.define_method("remove", &QProcessEnvironment::remove, Arg("name"))
|
|
23
|
+
.define_method("to_string_list", &QProcessEnvironment::toStringList)
|
|
24
|
+
.define_method("value", &QProcessEnvironment::value, Arg("name"), Arg("default_value") = static_cast<const QString &>(QString()))
|
|
25
|
+
// Static Public Members
|
|
26
|
+
.define_singleton_function("system_environment", &QProcessEnvironment::systemEnvironment);
|
|
27
|
+
|
|
28
|
+
Data_Type<QProcessEnvironment::Initialization> rb_cQProcessEnvironmentInitialization =
|
|
29
|
+
// RubyQt6::QtCore::QProcessEnvironment::Initialization
|
|
30
|
+
define_qenum_under<QProcessEnvironment::Initialization>(rb_cQProcessEnvironment, "Initialization");
|
|
31
|
+
define_qenum_value_under(rb_cQProcessEnvironmentInitialization, "InheritFromParent", QProcessEnvironment::Initialization::InheritFromParent);
|
|
32
|
+
}
|
|
@@ -32,13 +32,9 @@ void Init_qregularexpression(Module rb_mQt6QtCore)
|
|
|
32
32
|
.define_method("set_pattern", &QRegularExpression::setPattern, Arg("pattern"))
|
|
33
33
|
.define_method("set_pattern_options", &QRegularExpression::setPatternOptions, Arg("options"))
|
|
34
34
|
// Static Public Members
|
|
35
|
-
.define_singleton_function<QString (*)(QStringView)>("anchored_pattern", &QRegularExpression::anchoredPattern, Arg("expression"))
|
|
36
35
|
.define_singleton_function<QString (*)(const QString &)>("anchored_pattern", &QRegularExpression::anchoredPattern, Arg("expression"))
|
|
37
|
-
.define_singleton_function<QString (*)(QStringView)>("escape", &QRegularExpression::escape, Arg("str"))
|
|
38
36
|
.define_singleton_function<QString (*)(const QString &)>("escape", &QRegularExpression::escape, Arg("str"))
|
|
39
|
-
.define_singleton_function("
|
|
40
|
-
.define_singleton_function<QString (*)(QStringView, QRegularExpression::WildcardConversionOptions)>("wildcard_to_regular_expression", &QRegularExpression::wildcardToRegularExpression, Arg("str"), Arg("options") = static_cast<QRegularExpression::WildcardConversionOptions>(QRegularExpression::WildcardConversionOption::DefaultWildcardConversion))
|
|
41
|
-
.define_singleton_function<QString (*)(const QString &, QRegularExpression::WildcardConversionOptions)>("wildcard_to_regular_expression", &QRegularExpression::wildcardToRegularExpression, Arg("str"), Arg("options") = static_cast<QRegularExpression::WildcardConversionOptions>(QRegularExpression::WildcardConversionOption::DefaultWildcardConversion));
|
|
37
|
+
.define_singleton_function<QString (*)(const QString &, QRegularExpression::WildcardConversionOptions)>("_wildcard_to_regular_expression", &QRegularExpression::wildcardToRegularExpression, Arg("str"), Arg("options") = static_cast<QRegularExpression::WildcardConversionOptions>(QRegularExpression::WildcardConversionOption::DefaultWildcardConversion));
|
|
42
38
|
|
|
43
39
|
Data_Type<QRegularExpression::PatternOption> rb_cQRegularExpressionPatternOption =
|
|
44
40
|
// RubyQt6::QtCore::QRegularExpression::PatternOption
|
|
@@ -101,8 +97,6 @@ void Init_qregularexpression(Module rb_mQt6QtCore)
|
|
|
101
97
|
.define_method<qsizetype (QRegularExpressionMatch::*)(QAnyStringView) const>("captured_start", &QRegularExpressionMatch::capturedStart, Arg("name"))
|
|
102
98
|
.define_method<qsizetype (QRegularExpressionMatch::*)(int) const>("captured_start", &QRegularExpressionMatch::capturedStart, Arg("nth") = static_cast<int>(0))
|
|
103
99
|
.define_method("captured_texts", &QRegularExpressionMatch::capturedTexts)
|
|
104
|
-
.define_method<QStringView (QRegularExpressionMatch::*)(QAnyStringView) const>("captured_view", &QRegularExpressionMatch::capturedView, Arg("name"))
|
|
105
|
-
.define_method<QStringView (QRegularExpressionMatch::*)(int) const>("captured_view", &QRegularExpressionMatch::capturedView, Arg("nth") = static_cast<int>(0))
|
|
106
100
|
.define_method<bool (QRegularExpressionMatch::*)(QAnyStringView) const>("has_captured", &QRegularExpressionMatch::hasCaptured, Arg("name"))
|
|
107
101
|
.define_method<bool (QRegularExpressionMatch::*)(int) const>("has_captured", &QRegularExpressionMatch::hasCaptured, Arg("nth"))
|
|
108
102
|
.define_method("has_match", &QRegularExpressionMatch::hasMatch)
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
#include "qmimetype-rb.hpp"
|
|
32
32
|
#include "qmodelindex-rb.hpp"
|
|
33
33
|
#include "qpoint-rb.hpp"
|
|
34
|
+
#include "qprocessenvironment-rb.hpp"
|
|
34
35
|
#include "qrect-rb.hpp"
|
|
35
36
|
#include "qregularexpression-rb.hpp"
|
|
36
37
|
#include "qresource-rb.hpp"
|
|
@@ -38,15 +39,18 @@
|
|
|
38
39
|
#include "qstandardpaths-rb.hpp"
|
|
39
40
|
#include "qtextstream-rb.hpp"
|
|
40
41
|
#include "qurl-rb.hpp"
|
|
42
|
+
#include "qurlquery-rb.hpp"
|
|
41
43
|
#include "quuid-rb.hpp"
|
|
42
44
|
#include "qvariant-rb.hpp"
|
|
43
45
|
|
|
44
46
|
#include "qobject-rb.hpp"
|
|
45
47
|
#include "qabstractitemmodel-rb.hpp"
|
|
46
48
|
#include "qcoreapplication-rb.hpp"
|
|
49
|
+
#include "qeventloop-rb.hpp"
|
|
47
50
|
#include "qiodevice-rb.hpp"
|
|
48
51
|
#include "qfiledevice-rb.hpp"
|
|
49
52
|
#include "qfile-rb.hpp"
|
|
53
|
+
#include "qprocess-rb.hpp"
|
|
50
54
|
#include "qitemselectionmodel-rb.hpp"
|
|
51
55
|
#include "qsettings-rb.hpp"
|
|
52
56
|
#include "qsignalmapper-rb.hpp"
|
|
@@ -104,6 +108,7 @@ extern "C" void Init_qtcore()
|
|
|
104
108
|
Init_qmimetype(rb_mQt6QtCore);
|
|
105
109
|
Init_qmodelindex(rb_mQt6QtCore);
|
|
106
110
|
Init_qpoint(rb_mQt6QtCore);
|
|
111
|
+
Init_qprocessenvironment(rb_mQt6QtCore);
|
|
107
112
|
Init_qrect(rb_mQt6QtCore);
|
|
108
113
|
Init_qregularexpression(rb_mQt6QtCore);
|
|
109
114
|
Init_qresource(rb_mQt6QtCore);
|
|
@@ -111,15 +116,18 @@ extern "C" void Init_qtcore()
|
|
|
111
116
|
Init_qstandardpaths(rb_mQt6QtCore);
|
|
112
117
|
Init_qtextstream(rb_mQt6QtCore);
|
|
113
118
|
Init_qurl(rb_mQt6QtCore);
|
|
119
|
+
Init_qurlquery(rb_mQt6QtCore);
|
|
114
120
|
Init_quuid(rb_mQt6QtCore);
|
|
115
121
|
Init_qvariant(rb_mQt6QtCore);
|
|
116
122
|
|
|
117
123
|
Init_qobject(rb_mQt6QtCore);
|
|
118
124
|
Init_qabstractitemmodel(rb_mQt6QtCore);
|
|
119
125
|
Init_qcoreapplication(rb_mQt6QtCore);
|
|
126
|
+
Init_qeventloop(rb_mQt6QtCore);
|
|
120
127
|
Init_qiodevice(rb_mQt6QtCore);
|
|
121
128
|
Init_qfiledevice(rb_mQt6QtCore);
|
|
122
129
|
Init_qfile(rb_mQt6QtCore);
|
|
130
|
+
Init_qprocess(rb_mQt6QtCore);
|
|
123
131
|
Init_qitemselectionmodel(rb_mQt6QtCore);
|
|
124
132
|
Init_qsettings(rb_mQt6QtCore);
|
|
125
133
|
Init_qsignalmapper(rb_mQt6QtCore);
|
|
@@ -29,10 +29,8 @@ void Init_qtimer(Module rb_mQt6QtCore)
|
|
|
29
29
|
.define_method("remaining_time", &QTimer::remainingTime)
|
|
30
30
|
.define_method("remaining_time_as_duration", &QTimer::remainingTimeAsDuration)
|
|
31
31
|
.define_method<void (QTimer::*)(int)>("set_interval", &QTimer::setInterval, Arg("msec"))
|
|
32
|
-
.define_method<void (QTimer::*)(std::chrono::milliseconds)>("set_interval", &QTimer::setInterval, Arg("value"))
|
|
33
32
|
.define_method("set_single_shot", &QTimer::setSingleShot, Arg("single_shot"))
|
|
34
33
|
.define_method("set_timer_type", &QTimer::setTimerType, Arg("atype"))
|
|
35
|
-
.define_method<void (QTimer::*)(std::chrono::milliseconds)>("start", &QTimer::start, Arg("value"))
|
|
36
34
|
.define_method("timer_id", &QTimer::timerId)
|
|
37
35
|
.define_method("timer_type", &QTimer::timerType)
|
|
38
36
|
// Public Slots
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#include "qurlquery-rb.hpp"
|
|
2
|
+
#include <qurlquery.h>
|
|
3
|
+
|
|
4
|
+
RICE4RUBYQT6_USE_NAMESPACE
|
|
5
|
+
|
|
6
|
+
Class rb_cQUrlQuery;
|
|
7
|
+
|
|
8
|
+
void Init_qurlquery(Module rb_mQt6QtCore)
|
|
9
|
+
{
|
|
10
|
+
rb_cQUrlQuery =
|
|
11
|
+
// RubyQt6::QtCore::QUrlQuery
|
|
12
|
+
define_class_under<QUrlQuery>(rb_mQt6QtCore, "QUrlQuery")
|
|
13
|
+
// Constructor
|
|
14
|
+
.define_constructor(Constructor<QUrlQuery>())
|
|
15
|
+
// Public Functions
|
|
16
|
+
.define_method("_add_query_item", &QUrlQuery::addQueryItem, Arg("key"), Arg("value"))
|
|
17
|
+
.define_method("all_query_item_values", &QUrlQuery::allQueryItemValues, Arg("key"), Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
18
|
+
.define_method("clear", &QUrlQuery::clear)
|
|
19
|
+
.define_method("_has_query_item", &QUrlQuery::hasQueryItem, Arg("key"))
|
|
20
|
+
.define_method("detached?", &QUrlQuery::isDetached)
|
|
21
|
+
.define_method("empty?", &QUrlQuery::isEmpty)
|
|
22
|
+
.define_method("query", &QUrlQuery::query, Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
23
|
+
.define_method("query_item_value", &QUrlQuery::queryItemValue, Arg("key"), Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
24
|
+
.define_method("query_items", &QUrlQuery::queryItems, Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded))
|
|
25
|
+
.define_method("query_pair_delimiter", &QUrlQuery::queryPairDelimiter)
|
|
26
|
+
.define_method("query_value_delimiter", &QUrlQuery::queryValueDelimiter)
|
|
27
|
+
.define_method("_remove_all_query_items", &QUrlQuery::removeAllQueryItems, Arg("key"))
|
|
28
|
+
.define_method("_remove_query_item", &QUrlQuery::removeQueryItem, Arg("key"))
|
|
29
|
+
.define_method("_set_query", &QUrlQuery::setQuery, Arg("query"))
|
|
30
|
+
.define_method("set_query_delimiters", &QUrlQuery::setQueryDelimiters, Arg("value_delimiter"), Arg("pair_delimiter"))
|
|
31
|
+
.define_method("set_query_items", &QUrlQuery::setQueryItems, Arg("query"))
|
|
32
|
+
.define_method("to_string", &QUrlQuery::toString, Arg("encoding") = static_cast<QUrl::ComponentFormattingOptions>(QUrl::PrettyDecoded));
|
|
33
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <rice/qt6/qlist.hpp>
|
|
3
3
|
#include <rice/qt6/qmap.hpp>
|
|
4
4
|
|
|
5
|
+
#include <QFileInfo>
|
|
5
6
|
#include <QItemSelectionRange>
|
|
6
7
|
#include <QModelIndex>
|
|
7
8
|
#include <QString>
|
|
@@ -16,6 +17,9 @@ void Init_t_qtcore(Module rb_mQt6T)
|
|
|
16
17
|
// QList<QByteArray>
|
|
17
18
|
define_qlist_under<QByteArray>(rb_mQt6T);
|
|
18
19
|
|
|
20
|
+
// QList<QFileInfo>
|
|
21
|
+
define_qlist_under<QFileInfo>(rb_mQt6T);
|
|
22
|
+
|
|
19
23
|
// QList<QItemSelectionRange> -> QItemSelection
|
|
20
24
|
define_qlist_under<QItemSelectionRange>(rb_mQt6T);
|
|
21
25
|
|
data/lib/qt6/bando/dsl.rb
CHANGED
|
@@ -4,7 +4,7 @@ module RubyQt6
|
|
|
4
4
|
module Bando
|
|
5
5
|
# @!visibility private
|
|
6
6
|
def self.define_bando_qobject(qlass)
|
|
7
|
-
unless qlass <= QtCore::QObject
|
|
7
|
+
unless qlass <= RubyQt6::QtCore::QObject
|
|
8
8
|
raise "Invalid superclass: macro `define_bando_qobject` " \
|
|
9
9
|
"only available for subclass of RubyQt6::QtCore::QObject"
|
|
10
10
|
end
|
|
@@ -23,7 +23,7 @@ module RubyQt6
|
|
|
23
23
|
|
|
24
24
|
# @!visibility private
|
|
25
25
|
def self.define_bando_qwidget(qlass)
|
|
26
|
-
unless qlass <= QtWidgets::QWidget
|
|
26
|
+
unless qlass <= RubyQt6::QtWidgets::QWidget
|
|
27
27
|
raise "Invalid superclass: macro `define_bando_qwidget` " \
|
|
28
28
|
"only available for subclass of RubyQt6::QtWidgets::QWidget"
|
|
29
29
|
end
|
data/lib/qt6/configuration.rb
CHANGED
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module RubyQt6
|
|
4
4
|
# @!visibility private
|
|
5
|
-
def self.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
mod.
|
|
9
|
-
next if const.match?("VERSION")
|
|
10
|
-
Object.const_set(const, mod.const_get(const)) if const.start_with?("Q")
|
|
11
|
-
end
|
|
5
|
+
def self.initialize!(mod)
|
|
6
|
+
mod.constants.each do |const|
|
|
7
|
+
next if const.match?("VERSION")
|
|
8
|
+
Object.const_set(const, mod.const_get(const)) if const.start_with?("Q")
|
|
12
9
|
end
|
|
13
|
-
|
|
14
|
-
true
|
|
15
10
|
end
|
|
16
11
|
end
|
data/lib/qt6/ducktyping.rb
CHANGED
|
@@ -4,56 +4,56 @@ module RubyQt6
|
|
|
4
4
|
# @!visibility private
|
|
5
5
|
module T
|
|
6
6
|
def self.args_nth_delete_qobject(args, index)
|
|
7
|
-
return unless args[index].is_a?(
|
|
7
|
+
return unless args[index].is_a?(QObject)
|
|
8
8
|
args.delete_at(index)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def self.args_nth_delete_qwidget(args, index)
|
|
12
|
-
return unless args[index].is_a?(
|
|
12
|
+
return unless args[index].is_a?(QWidget)
|
|
13
13
|
args.delete_at(index)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.args_nth_delete_qgraphicsitem(args, index)
|
|
17
|
-
return unless args[index].is_a?(
|
|
17
|
+
return unless args[index].is_a?(QGraphicsItem)
|
|
18
18
|
args.delete_at(index)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def self.args_nth_to_qanystringview(args, index)
|
|
22
|
-
return unless args[index].is_a?(String) || args[index].is_a?(
|
|
23
|
-
args[index] =
|
|
22
|
+
return unless args[index].is_a?(String) || args[index].is_a?(QString)
|
|
23
|
+
args[index] = QAnyStringView.new(args[index])
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def self.args_nth_to_qstr(args, index)
|
|
27
27
|
return unless args[index].is_a?(String)
|
|
28
|
-
args[index] =
|
|
28
|
+
args[index] = QString.new(args[index])
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def self.to_qanystringview(str)
|
|
32
|
-
return str unless str.is_a?(String) || str.is_a?(
|
|
33
|
-
|
|
32
|
+
return str unless str.is_a?(String) || str.is_a?(QString)
|
|
33
|
+
QAnyStringView.new(str)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def self.to_qbytearray(str)
|
|
37
37
|
return str unless str.is_a?(String)
|
|
38
|
-
|
|
38
|
+
QByteArray.new(str)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def self.to_qstr(str)
|
|
42
42
|
return str unless str.is_a?(String)
|
|
43
|
-
|
|
43
|
+
QString.new(str)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def self.to_qkeysequence(key)
|
|
47
|
-
return key unless key.is_a?(String) || key.is_a?(
|
|
48
|
-
|
|
47
|
+
return key unless key.is_a?(String) || key.is_a?(QString) || key.is_a?(Integer) || key.is_a?(QKeySequence::StandardKey)
|
|
48
|
+
QKeySequence.new(key)
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def self.to_qvariantlist(array)
|
|
52
|
-
array.each_with_object(
|
|
52
|
+
array.each_with_object(QVariantList.new) { |e, memo| memo << QVariant.new(e) }
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def self.to_qvariantmap(hash)
|
|
56
|
-
hash.each_with_object(
|
|
56
|
+
hash.each_with_object(QVariantMap.new) { |(k, v), memo| memo[k.to_qstr] = QVariant.new(v) }
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def self.to_qflags(enum_or_flags)
|
|
@@ -56,7 +56,7 @@ module RubyQt6
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def super_class
|
|
59
|
-
return nil if @qlass ==
|
|
59
|
+
return nil if @qlass == QObject
|
|
60
60
|
@qlass.superclass._rubyqt6_metaobject
|
|
61
61
|
end
|
|
62
62
|
|
|
@@ -67,7 +67,7 @@ module RubyQt6
|
|
|
67
67
|
def to_qmetaobject
|
|
68
68
|
return @qlass._static_meta_object unless ruby?
|
|
69
69
|
|
|
70
|
-
builder =
|
|
70
|
+
builder = QMetaObjectBuilder.new
|
|
71
71
|
builder.set_class_name(@qlass.name)
|
|
72
72
|
builder.set_super_class(@qlass.superclass._qmetaobject)
|
|
73
73
|
@classinfo.each { |name, value| builder.add_class_info(name, value) }
|
|
@@ -6,12 +6,12 @@ module RubyQt6
|
|
|
6
6
|
class SignalManager
|
|
7
7
|
def self.connect(sender, signal, receiver, metamethod)
|
|
8
8
|
metamethod = QtCore::Private::MetaObject.find_receiver_metamethod!(receiver, metamethod, signal)
|
|
9
|
-
|
|
9
|
+
QObject._connect(sender, signal.qsignature, receiver, metamethod.qsignature)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def self.disconnect(sender, signal, receiver, metamethod)
|
|
13
13
|
metamethod = QtCore::Private::MetaObject.find_receiver_metamethod!(receiver, metamethod, signal)
|
|
14
|
-
|
|
14
|
+
QObject._disconnect(sender, signal.qsignature, receiver, metamethod.qsignature)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def self.emit(sender, signal, *args)
|
|
@@ -20,9 +20,9 @@ module RubyQt6
|
|
|
20
20
|
|
|
21
21
|
raise "Too many arguments" if qmetamethod.parameter_count < args.count
|
|
22
22
|
raise "Not enough arguments" if qmetamethod.parameter_count > args.count
|
|
23
|
-
args = args.map.with_index { |arg, i|
|
|
23
|
+
args = args.map.with_index { |arg, i| QVariant.new(arg, qmetamethod.parameter_meta_type(i)) }
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
QObject._emit(sender, qmetamethod, args)
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|