ruby-qt6-qtwidgets 2.1.0 → 6.0.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.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/ext/qt6/qtwidgets/qabstractbutton-rb.cpp +2 -1
  3. data/ext/qt6/qtwidgets/qabstractitemdelegate-rb.cpp +2 -1
  4. data/ext/qt6/qtwidgets/qabstractitemview-rb.cpp +2 -1
  5. data/ext/qt6/qtwidgets/qabstractscrollarea-rb.cpp +2 -1
  6. data/ext/qt6/qtwidgets/qabstractslider-rb.cpp +2 -1
  7. data/ext/qt6/qtwidgets/qabstractspinbox-rb.cpp +2 -1
  8. data/ext/qt6/qtwidgets/qapplication-rb.cpp +15 -3
  9. data/ext/qt6/qtwidgets/qboxlayout-rb.cpp +6 -3
  10. data/ext/qt6/qtwidgets/qcalendarwidget-rb.cpp +2 -1
  11. data/ext/qt6/qtwidgets/qcheckbox-rb.cpp +2 -1
  12. data/ext/qt6/qtwidgets/qcolordialog-rb.cpp +2 -1
  13. data/ext/qt6/qtwidgets/qcolumnview-rb.cpp +2 -1
  14. data/ext/qt6/qtwidgets/qcombobox-rb.cpp +2 -1
  15. data/ext/qt6/qtwidgets/qcommandlinkbutton-rb.cpp +2 -1
  16. data/ext/qt6/qtwidgets/qdatetimeedit-rb.cpp +6 -3
  17. data/ext/qt6/qtwidgets/qdial-rb.cpp +2 -1
  18. data/ext/qt6/qtwidgets/qdialog-rb.cpp +2 -1
  19. data/ext/qt6/qtwidgets/qdialogbuttonbox-rb.cpp +2 -1
  20. data/ext/qt6/qtwidgets/qdockwidget-rb.cpp +2 -1
  21. data/ext/qt6/qtwidgets/qerrormessage-rb.cpp +2 -1
  22. data/ext/qt6/qtwidgets/qfiledialog-rb.cpp +2 -1
  23. data/ext/qt6/qtwidgets/qfileiconprovider-rb.cpp +1 -1
  24. data/ext/qt6/qtwidgets/qfocusframe-rb.cpp +2 -1
  25. data/ext/qt6/qtwidgets/qfontcombobox-rb.cpp +2 -1
  26. data/ext/qt6/qtwidgets/qfontdialog-rb.cpp +2 -1
  27. data/ext/qt6/qtwidgets/qformlayout-rb.cpp +3 -2
  28. data/ext/qt6/qtwidgets/qframe-rb.cpp +2 -1
  29. data/ext/qt6/qtwidgets/qgraphicsitem-rb.cpp +11 -11
  30. data/ext/qt6/qtwidgets/qgraphicsobject-rb.cpp +2 -1
  31. data/ext/qt6/qtwidgets/qgraphicsscene-rb.cpp +2 -1
  32. data/ext/qt6/qtwidgets/qgraphicstextitem-rb.cpp +2 -1
  33. data/ext/qt6/qtwidgets/qgraphicsview-rb.cpp +2 -1
  34. data/ext/qt6/qtwidgets/qgraphicswidget-rb.cpp +2 -1
  35. data/ext/qt6/qtwidgets/qgridlayout-rb.cpp +2 -1
  36. data/ext/qt6/qtwidgets/qgroupbox-rb.cpp +2 -1
  37. data/ext/qt6/qtwidgets/qheaderview-rb.cpp +2 -1
  38. data/ext/qt6/qtwidgets/qinputdialog-rb.cpp +2 -1
  39. data/ext/qt6/qtwidgets/qitemdelegate-rb.cpp +2 -1
  40. data/ext/qt6/qtwidgets/qkeysequenceedit-rb.cpp +2 -1
  41. data/ext/qt6/qtwidgets/qlabel-rb.cpp +2 -1
  42. data/ext/qt6/qtwidgets/qlayout-rb.cpp +2 -1
  43. data/ext/qt6/qtwidgets/qlayoutitem-rb.cpp +3 -3
  44. data/ext/qt6/qtwidgets/qlcdnumber-rb.cpp +2 -1
  45. data/ext/qt6/qtwidgets/qlineedit-rb.cpp +3 -2
  46. data/ext/qt6/qtwidgets/qlistview-rb.cpp +2 -1
  47. data/ext/qt6/qtwidgets/qlistwidget-rb.cpp +3 -2
  48. data/ext/qt6/qtwidgets/qmainwindow-rb.cpp +2 -1
  49. data/ext/qt6/qtwidgets/qmdiarea-rb.cpp +2 -1
  50. data/ext/qt6/qtwidgets/qmdisubwindow-rb.cpp +2 -1
  51. data/ext/qt6/qtwidgets/qmenu-rb.cpp +2 -1
  52. data/ext/qt6/qtwidgets/qmenubar-rb.cpp +2 -1
  53. data/ext/qt6/qtwidgets/qmessagebox-rb.cpp +2 -1
  54. data/ext/qt6/qtwidgets/qplaintextedit-rb.cpp +2 -1
  55. data/ext/qt6/qtwidgets/qprogressbar-rb.cpp +2 -1
  56. data/ext/qt6/qtwidgets/qprogressdialog-rb.cpp +2 -1
  57. data/ext/qt6/qtwidgets/qpushbutton-rb.cpp +2 -1
  58. data/ext/qt6/qtwidgets/qradiobutton-rb.cpp +2 -1
  59. data/ext/qt6/qtwidgets/qrubberband-rb.cpp +2 -1
  60. data/ext/qt6/qtwidgets/qscrollarea-rb.cpp +2 -1
  61. data/ext/qt6/qtwidgets/qscrollbar-rb.cpp +2 -1
  62. data/ext/qt6/qtwidgets/qsizegrip-rb.cpp +2 -1
  63. data/ext/qt6/qtwidgets/qsizepolicy-rb.cpp +1 -1
  64. data/ext/qt6/qtwidgets/qslider-rb.cpp +2 -1
  65. data/ext/qt6/qtwidgets/qspinbox-rb.cpp +4 -2
  66. data/ext/qt6/qtwidgets/qsplashscreen-rb.cpp +2 -1
  67. data/ext/qt6/qtwidgets/qsplitter-rb.cpp +4 -2
  68. data/ext/qt6/qtwidgets/qstackedlayout-rb.cpp +2 -1
  69. data/ext/qt6/qtwidgets/qstackedwidget-rb.cpp +2 -1
  70. data/ext/qt6/qtwidgets/qstatusbar-rb.cpp +2 -1
  71. data/ext/qt6/qtwidgets/qstyle-rb.cpp +2 -1
  72. data/ext/qt6/qtwidgets/qstyleditemdelegate-rb.cpp +2 -1
  73. data/ext/qt6/qtwidgets/qstylefactory-rb.cpp +1 -1
  74. data/ext/qt6/qtwidgets/qstyleoption-rb.cpp +25 -25
  75. data/ext/qt6/qtwidgets/qsystemtrayicon-rb.cpp +2 -1
  76. data/ext/qt6/qtwidgets/qtabbar-rb.cpp +2 -1
  77. data/ext/qt6/qtwidgets/qtableview-rb.cpp +2 -1
  78. data/ext/qt6/qtwidgets/qtablewidget-rb.cpp +4 -3
  79. data/ext/qt6/qtwidgets/qtabwidget-rb.cpp +2 -1
  80. data/ext/qt6/qtwidgets/qtextbrowser-rb.cpp +2 -1
  81. data/ext/qt6/qtwidgets/qtextedit-rb.cpp +3 -2
  82. data/ext/qt6/qtwidgets/qtoolbar-rb.cpp +2 -1
  83. data/ext/qt6/qtwidgets/qtoolbox-rb.cpp +2 -1
  84. data/ext/qt6/qtwidgets/qtoolbutton-rb.cpp +2 -1
  85. data/ext/qt6/qtwidgets/qtooltip-rb.cpp +1 -1
  86. data/ext/qt6/qtwidgets/qtreeview-rb.cpp +2 -1
  87. data/ext/qt6/qtwidgets/qtreewidget-rb.cpp +6 -2
  88. data/ext/qt6/qtwidgets/qtwidgets-rb.cpp +2 -0
  89. data/ext/qt6/qtwidgets/qtwidgetspreludes-rb.cpp +11 -0
  90. data/ext/qt6/qtwidgets/qtwidgetspreludes-rb.hpp +5 -0
  91. data/ext/qt6/qtwidgets/qundoview-rb.cpp +2 -1
  92. data/ext/qt6/qtwidgets/qwidget-rb.cpp +3 -2
  93. data/ext/qt6/qtwidgets/qwizard-rb.cpp +4 -2
  94. data/ext/qt6/qtwidgets/t-qtwidgets-rb.cpp +0 -3
  95. data/lib/qt6/qtwidgets/qapplication.rb +4 -8
  96. data/lib/qt6/qtwidgets/qcombobox.rb +2 -1
  97. data/lib/qt6/qtwidgets/qlcdnumber.rb +3 -2
  98. data/lib/qt6/qtwidgets/qlineedit.rb +5 -0
  99. data/lib/qt6/qtwidgets/qmessagebox.rb +1 -1
  100. data/lib/qt6/qtwidgets/qpushbutton.rb +16 -2
  101. data/lib/qt6/qtwidgets/qsplashscreen.rb +1 -0
  102. data/lib/qt6/qtwidgets/qtreewidgetitem.rb +8 -0
  103. data/lib/qt6/qtwidgets/qwidget.rb +7 -1
  104. data/lib/qt6/qtwidgets/version.rb +1 -1
  105. metadata +9 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2798cbaa420178ff970504eb206f194e8377770a604701ed52ccff4b65abb7fb
4
- data.tar.gz: 6fb0c3b7ef901fa1b7c1cb6819e191fea56c066e319a4e09814b057de18e923a
3
+ metadata.gz: 7eb4734d50ce890676fb68a4d2eb761f82eeacc19e21e784d82040b1edc78295
4
+ data.tar.gz: 6a0749d1547ae73d607a920025257fd2159b8ede94757a1d35815dc9781ba309
5
5
  SHA512:
6
- metadata.gz: b9a5d8e59e33a5c01558b64748b9f865e20f1303759c7286335e68f95a3a6312880df9b7ba595409f7f82525af2a76bb44bc5d80207d38992888682651590677
7
- data.tar.gz: 984c1b7b468191aeab6ac1507bcfb0887872fbdd36dd5114261ae2735618487b6e90b1ca9daf05cfb08a550284796cac4385c1b7f34dc25db1232b888a395cda
6
+ metadata.gz: caba031f2b4eaede80d1d2077a5665f6dea2d8774652bc71062802192580c8d5d49781f8bed6a1a8c059339e4ec55a31bd95ccfd303a5c94375ebbee7205b28d
7
+ data.tar.gz: 5ae12f75f2c160ab61d51ce5147b28d58e7ea125b496f1312a127031e821ec24c44b96a88e1465cedbdaaf52def64a53fab2dbc749746dbafcfee14c5d90deb5
@@ -11,8 +11,9 @@ void Init_qabstractbutton(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQAbstractButton =
13
13
  // RubyQt6::QtWidgets::QAbstractButton
14
- define_class_under<QAbstractButton, QWidget>(rb_mQt6QtWidgets, "QAbstractButton")
14
+ define_qlass_under<QAbstractButton, QWidget>(rb_mQt6QtWidgets, "QAbstractButton")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QAbstractButton * { return qobject_cast<QAbstractButton *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAbstractButton::staticMetaObject; })
17
18
  // Public Functions
18
19
  .define_method("auto_exclusive", &QAbstractButton::autoExclusive)
@@ -10,8 +10,9 @@ void Init_qabstractitemdelegate(Module rb_mQt6QtWidgets)
10
10
  {
11
11
  rb_cQAbstractItemDelegate =
12
12
  // RubyQt6::QtWidgets::QAbstractItemDelegate
13
- define_class_under<QAbstractItemDelegate, QObject>(rb_mQt6QtWidgets, "QAbstractItemDelegate")
13
+ define_qlass_under<QAbstractItemDelegate, QObject>(rb_mQt6QtWidgets, "QAbstractItemDelegate")
14
14
  // RubyQt6-Defined Functions
15
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QAbstractItemDelegate * { return qobject_cast<QAbstractItemDelegate *>(object); })
15
16
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAbstractItemDelegate::staticMetaObject; });
16
17
  // Signals
17
18
  // .define_method("close_editor", &QAbstractItemDelegate::closeEditor, Arg("editor"), Arg("hint") = static_cast<QAbstractItemDelegate::EndEditHint>(QAbstractItemDelegate::EndEditHint::NoHint))
@@ -11,8 +11,9 @@ void Init_qabstractitemview(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQAbstractItemView =
13
13
  // RubyQt6::QtWidgets::QAbstractItemView
14
- define_class_under<QAbstractItemView, QAbstractScrollArea>(rb_mQt6QtWidgets, "QAbstractItemView")
14
+ define_qlass_under<QAbstractItemView, QAbstractScrollArea>(rb_mQt6QtWidgets, "QAbstractItemView")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QAbstractItemView * { return qobject_cast<QAbstractItemView *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAbstractItemView::staticMetaObject; })
17
18
  // Public Functions
18
19
  .define_method("alternating_row_colors", &QAbstractItemView::alternatingRowColors)
@@ -12,8 +12,9 @@ void Init_qabstractscrollarea(Module rb_mQt6QtWidgets)
12
12
  {
13
13
  rb_cQAbstractScrollArea =
14
14
  // RubyQt6::QtWidgets::QAbstractScrollArea
15
- define_class_under<QAbstractScrollArea, QFrame>(rb_mQt6QtWidgets, "QAbstractScrollArea")
15
+ define_qlass_under<QAbstractScrollArea, QFrame>(rb_mQt6QtWidgets, "QAbstractScrollArea")
16
16
  // RubyQt6-Defined Functions
17
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QAbstractScrollArea * { return qobject_cast<QAbstractScrollArea *>(object); })
17
18
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAbstractScrollArea::staticMetaObject; })
18
19
  // Constructor
19
20
  .define_constructor(Constructor<QAbstractScrollArea, QWidget *>(), Arg("parent"))
@@ -10,8 +10,9 @@ void Init_qabstractslider(Module rb_mQt6QtWidgets)
10
10
  {
11
11
  rb_cQAbstractSlider =
12
12
  // RubyQt6::QtWidgets::QAbstractSlider
13
- define_class_under<QAbstractSlider, QWidget>(rb_mQt6QtWidgets, "QAbstractSlider")
13
+ define_qlass_under<QAbstractSlider, QWidget>(rb_mQt6QtWidgets, "QAbstractSlider")
14
14
  // RubyQt6-Defined Functions
15
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QAbstractSlider * { return qobject_cast<QAbstractSlider *>(object); })
15
16
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAbstractSlider::staticMetaObject; })
16
17
  // Public Functions
17
18
  .define_method("has_tracking", &QAbstractSlider::hasTracking)
@@ -11,9 +11,10 @@ void Init_qabstractspinbox(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQAbstractSpinBox =
13
13
  // RubyQt6::QtWidgets::QAbstractSpinBox
14
- define_class_under<QAbstractSpinBox, QWidget>(rb_mQt6QtWidgets, "QAbstractSpinBox")
14
+ define_qlass_under<QAbstractSpinBox, QWidget>(rb_mQt6QtWidgets, "QAbstractSpinBox")
15
15
  // RubyQt6-Defined Functions
16
16
  .define_method("set_alignment", [](QAbstractSpinBox *self, Qt::AlignmentFlag alignment) -> void { return self->setAlignment(alignment); }, Arg("alignment"))
17
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QAbstractSpinBox * { return qobject_cast<QAbstractSpinBox *>(object); })
17
18
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QAbstractSpinBox::staticMetaObject; })
18
19
  // Public Functions
19
20
  .define_method("alignment", &QAbstractSpinBox::alignment)
@@ -10,15 +10,27 @@ RICE4RUBYQT6_USE_NAMESPACE
10
10
 
11
11
  Class rb_cQApplication;
12
12
 
13
+ QApplication* QApplication_new(const QList<QByteArray>& strlist)
14
+ {
15
+ static int argc = strlist.size();
16
+ static char** argv = new char*[argc];
17
+ for (int i = 0; i < argc; ++i) {
18
+ const QByteArray &bytes = strlist[i];
19
+ argv[i] = strdup(bytes.constData());
20
+ }
21
+ return new QApplication(argc, argv);
22
+ }
23
+
24
+
13
25
  void Init_qapplication(Module rb_mQt6QtWidgets)
14
26
  {
15
27
  rb_cQApplication =
16
28
  // RubyQt6::QtWidgets::QApplication
17
- define_class_under<QApplication, QGuiApplication>(rb_mQt6QtWidgets, "QApplication")
29
+ define_qlass_under<QApplication, QGuiApplication>(rb_mQt6QtWidgets, "QApplication")
18
30
  // RubyQt6-Defined Functions
31
+ .define_singleton_function("_new", QApplication_new, Arg("argv"), Return().takeOwnership())
32
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QApplication * { return qobject_cast<QApplication *>(object); })
19
33
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QApplication::staticMetaObject; })
20
- // Constructor
21
- .define_constructor(Constructor<QApplication, int &, char **>(), Arg("argc"), ArgBuffer("argv"))
22
34
  // Public Functions
23
35
  .define_method("auto_sip_enabled", &QApplication::autoSipEnabled)
24
36
  .define_method("notify", &QApplication::notify, Arg("receiver"), Arg("event"))
@@ -14,8 +14,9 @@ void Init_qboxlayout(Module rb_mQt6QtWidgets)
14
14
  {
15
15
  rb_cQBoxLayout =
16
16
  // RubyQt6::QtWidgets::QBoxLayout
17
- define_class_under<QBoxLayout, QLayout>(rb_mQt6QtWidgets, "QBoxLayout")
17
+ define_qlass_under<QBoxLayout, QLayout>(rb_mQt6QtWidgets, "QBoxLayout")
18
18
  // RubyQt6-Defined Functions
19
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QBoxLayout * { return qobject_cast<QBoxLayout *>(object); })
19
20
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QBoxLayout::staticMetaObject; })
20
21
  // Constructor
21
22
  .define_constructor(Constructor<QBoxLayout, QBoxLayout::Direction, QWidget *>(), Arg("direction"), Arg("parent"))
@@ -57,16 +58,18 @@ void Init_qboxlayout(Module rb_mQt6QtWidgets)
57
58
 
58
59
  rb_cQHBoxLayout =
59
60
  // RubyQt6::QtWidgets::QHBoxLayout
60
- define_class_under<QHBoxLayout, QBoxLayout>(rb_mQt6QtWidgets, "QHBoxLayout")
61
+ define_qlass_under<QHBoxLayout, QBoxLayout>(rb_mQt6QtWidgets, "QHBoxLayout")
61
62
  // RubyQt6-Defined Functions
63
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QHBoxLayout * { return qobject_cast<QHBoxLayout *>(object); })
62
64
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QHBoxLayout::staticMetaObject; })
63
65
  // Constructor
64
66
  .define_constructor(Constructor<QHBoxLayout>()).define_constructor(Constructor<QHBoxLayout, QWidget *>(), Arg("parent"));
65
67
 
66
68
  rb_cQVBoxLayout =
67
69
  // RubyQt6::QtWidgets::QVBoxLayout
68
- define_class_under<QVBoxLayout, QBoxLayout>(rb_mQt6QtWidgets, "QVBoxLayout")
70
+ define_qlass_under<QVBoxLayout, QBoxLayout>(rb_mQt6QtWidgets, "QVBoxLayout")
69
71
  // RubyQt6-Defined Functions
72
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QVBoxLayout * { return qobject_cast<QVBoxLayout *>(object); })
70
73
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QVBoxLayout::staticMetaObject; })
71
74
  // Constructor
72
75
  .define_constructor(Constructor<QVBoxLayout>()).define_constructor(Constructor<QVBoxLayout, QWidget *>(), Arg("parent"));
@@ -12,8 +12,9 @@ void Init_qcalendarwidget(Module rb_mQt6QtWidgets)
12
12
  {
13
13
  rb_cQCalendarWidget =
14
14
  // RubyQt6::QtWidgets::QCalendarWidget
15
- define_class_under<QCalendarWidget, QWidget>(rb_mQt6QtWidgets, "QCalendarWidget")
15
+ define_qlass_under<QCalendarWidget, QWidget>(rb_mQt6QtWidgets, "QCalendarWidget")
16
16
  // RubyQt6-Defined Functions
17
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QCalendarWidget * { return qobject_cast<QCalendarWidget *>(object); })
17
18
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QCalendarWidget::staticMetaObject; })
18
19
  // Constructor
19
20
  .define_constructor(Constructor<QCalendarWidget, QWidget *>(), Arg("parent"))
@@ -9,8 +9,9 @@ void Init_qcheckbox(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQCheckBox =
11
11
  // RubyQt6::QtWidgets::QCheckBox
12
- define_class_under<QCheckBox, QAbstractButton>(rb_mQt6QtWidgets, "QCheckBox")
12
+ define_qlass_under<QCheckBox, QAbstractButton>(rb_mQt6QtWidgets, "QCheckBox")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QCheckBox * { return qobject_cast<QCheckBox *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QCheckBox::staticMetaObject; })
15
16
  // Constructor
16
17
  .define_constructor(Constructor<QCheckBox, const QString &, QWidget *>(), Arg("text"), Arg("parent"))
@@ -11,8 +11,9 @@ void Init_qcolordialog(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQColorDialog =
13
13
  // RubyQt6::QtWidgets::QColorDialog
14
- define_class_under<QColorDialog, QDialog>(rb_mQt6QtWidgets, "QColorDialog")
14
+ define_qlass_under<QColorDialog, QDialog>(rb_mQt6QtWidgets, "QColorDialog")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QColorDialog * { return qobject_cast<QColorDialog *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QColorDialog::staticMetaObject; })
17
18
  // Constructor
18
19
  .define_constructor(Constructor<QColorDialog, const QColor &, QWidget *>(), Arg("initial"), Arg("parent"))
@@ -9,8 +9,9 @@ void Init_qcolumnview(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQColumnView =
11
11
  // RubyQt6::QtWidgets::QColumnView
12
- define_class_under<QColumnView, QAbstractItemView>(rb_mQt6QtWidgets, "QColumnView")
12
+ define_qlass_under<QColumnView, QAbstractItemView>(rb_mQt6QtWidgets, "QColumnView")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QColumnView * { return qobject_cast<QColumnView *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QColumnView::staticMetaObject; })
15
16
  // Constructor
16
17
  .define_constructor(Constructor<QColumnView, QWidget *>(), Arg("parent"))
@@ -14,8 +14,9 @@ void Init_qcombobox(Module rb_mQt6QtWidgets)
14
14
  {
15
15
  rb_cQComboBox =
16
16
  // RubyQt6::QtWidgets::QComboBox
17
- define_class_under<QComboBox, QWidget>(rb_mQt6QtWidgets, "QComboBox")
17
+ define_qlass_under<QComboBox, QWidget>(rb_mQt6QtWidgets, "QComboBox")
18
18
  // RubyQt6-Defined Functions
19
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QComboBox * { return qobject_cast<QComboBox *>(object); })
19
20
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QComboBox::staticMetaObject; })
20
21
  // Constructor
21
22
  .define_constructor(Constructor<QComboBox, QWidget *>(), Arg("parent"))
@@ -11,8 +11,9 @@ void Init_qcommandlinkbutton(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQCommandLinkButton =
13
13
  // RubyQt6::QtWidgets::QCommandLinkButton
14
- define_class_under<QCommandLinkButton, QPushButton>(rb_mQt6QtWidgets, "QCommandLinkButton")
14
+ define_qlass_under<QCommandLinkButton, QPushButton>(rb_mQt6QtWidgets, "QCommandLinkButton")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QCommandLinkButton * { return qobject_cast<QCommandLinkButton *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QCommandLinkButton::staticMetaObject; })
17
18
  // Constructor
18
19
  .define_constructor(Constructor<QCommandLinkButton, const QString &, const QString &, QWidget *>(), Arg("text"), Arg("description"), Arg("parent"))
@@ -15,8 +15,9 @@ void Init_qdatetimeedit(Module rb_mQt6QtWidgets)
15
15
  {
16
16
  rb_cQDateTimeEdit =
17
17
  // RubyQt6::QtWidgets::QDateTimeEdit
18
- define_class_under<QDateTimeEdit, QAbstractSpinBox>(rb_mQt6QtWidgets, "QDateTimeEdit")
18
+ define_qlass_under<QDateTimeEdit, QAbstractSpinBox>(rb_mQt6QtWidgets, "QDateTimeEdit")
19
19
  // RubyQt6-Defined Functions
20
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDateTimeEdit * { return qobject_cast<QDateTimeEdit *>(object); })
20
21
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDateTimeEdit::staticMetaObject; })
21
22
  // Constructor
22
23
  .define_constructor(Constructor<QDateTimeEdit, const QDateTime &, QWidget *>(), Arg("datetime"), Arg("parent"))
@@ -96,8 +97,9 @@ void Init_qdatetimeedit(Module rb_mQt6QtWidgets)
96
97
 
97
98
  rb_cQDateEdit =
98
99
  // RubyQt6::QtWidgets::QDateEdit
99
- define_class_under<QDateEdit, QDateTimeEdit>(rb_mQt6QtWidgets, "QDateEdit")
100
+ define_qlass_under<QDateEdit, QDateTimeEdit>(rb_mQt6QtWidgets, "QDateEdit")
100
101
  // RubyQt6-Defined Functions
102
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDateEdit * { return qobject_cast<QDateEdit *>(object); })
101
103
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDateEdit::staticMetaObject; })
102
104
  // Constructor
103
105
  .define_constructor(Constructor<QDateEdit, QDate, QWidget *>(), Arg("date"), Arg("parent"));
@@ -106,8 +108,9 @@ void Init_qdatetimeedit(Module rb_mQt6QtWidgets)
106
108
 
107
109
  rb_cQTimeEdit =
108
110
  // RubyQt6::QtWidgets::QTimeEdit
109
- define_class_under<QTimeEdit, QDateTimeEdit>(rb_mQt6QtWidgets, "QTimeEdit")
111
+ define_qlass_under<QTimeEdit, QDateTimeEdit>(rb_mQt6QtWidgets, "QTimeEdit")
110
112
  // RubyQt6-Defined Functions
113
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QTimeEdit * { return qobject_cast<QTimeEdit *>(object); })
111
114
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QTimeEdit::staticMetaObject; })
112
115
  // Constructor
113
116
  .define_constructor(Constructor<QTimeEdit, QTime, QWidget *>(), Arg("time"), Arg("parent"));
@@ -9,8 +9,9 @@ void Init_qdial(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQDial =
11
11
  // RubyQt6::QtWidgets::QDial
12
- define_class_under<QDial, QAbstractSlider>(rb_mQt6QtWidgets, "QDial")
12
+ define_qlass_under<QDial, QAbstractSlider>(rb_mQt6QtWidgets, "QDial")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDial * { return qobject_cast<QDial *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDial::staticMetaObject; })
15
16
  // Constructor
16
17
  .define_constructor(Constructor<QDial, QWidget *>(), Arg("parent"))
@@ -10,8 +10,9 @@ void Init_qdialog(Module rb_mQt6QtWidgets)
10
10
  {
11
11
  rb_cQDialog =
12
12
  // RubyQt6::QtWidgets::QDialog
13
- define_class_under<QDialog, QWidget>(rb_mQt6QtWidgets, "QDialog")
13
+ define_qlass_under<QDialog, QWidget>(rb_mQt6QtWidgets, "QDialog")
14
14
  // RubyQt6-Defined Functions
15
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDialog * { return qobject_cast<QDialog *>(object); })
15
16
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDialog::staticMetaObject; })
16
17
  // Constructor
17
18
  .define_constructor(Constructor<QDialog, QWidget *>(), Arg("parent"))
@@ -14,8 +14,9 @@ void Init_qdialogbuttonbox(Module rb_mQt6QtWidgets)
14
14
  {
15
15
  rb_cQDialogButtonBox =
16
16
  // RubyQt6::QtWidgets::QDialogButtonBox
17
- define_class_under<QDialogButtonBox, QWidget>(rb_mQt6QtWidgets, "QDialogButtonBox")
17
+ define_qlass_under<QDialogButtonBox, QWidget>(rb_mQt6QtWidgets, "QDialogButtonBox")
18
18
  // RubyQt6-Defined Functions
19
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDialogButtonBox * { return qobject_cast<QDialogButtonBox *>(object); })
19
20
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDialogButtonBox::staticMetaObject; })
20
21
  // Constructor
21
22
  .define_constructor(Constructor<QDialogButtonBox, QDialogButtonBox::StandardButtons, Qt::Orientation, QWidget *>(), Arg("buttons"), Arg("orientation"), Arg("parent"))
@@ -11,8 +11,9 @@ void Init_qdockwidget(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQDockWidget =
13
13
  // RubyQt6::QtWidgets::QDockWidget
14
- define_class_under<QDockWidget, QWidget>(rb_mQt6QtWidgets, "QDockWidget")
14
+ define_qlass_under<QDockWidget, QWidget>(rb_mQt6QtWidgets, "QDockWidget")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDockWidget * { return qobject_cast<QDockWidget *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDockWidget::staticMetaObject; })
17
18
  // Constructor
18
19
  .define_constructor(Constructor<QDockWidget, const QString &, QWidget *>(), Arg("title"), Arg("parent"))
@@ -9,8 +9,9 @@ void Init_qerrormessage(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQErrorMessage =
11
11
  // RubyQt6::QtWidgets::QErrorMessage
12
- define_class_under<QErrorMessage, QDialog>(rb_mQt6QtWidgets, "QErrorMessage")
12
+ define_qlass_under<QErrorMessage, QDialog>(rb_mQt6QtWidgets, "QErrorMessage")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QErrorMessage * { return qobject_cast<QErrorMessage *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QErrorMessage::staticMetaObject; })
15
16
  // Constructor
16
17
  .define_constructor(Constructor<QErrorMessage, QWidget *>(), Arg("parent"))
@@ -15,8 +15,9 @@ void Init_qfiledialog(Module rb_mQt6QtWidgets)
15
15
  {
16
16
  rb_cQFileDialog =
17
17
  // RubyQt6::QtWidgets::QFileDialog
18
- define_class_under<QFileDialog, QDialog>(rb_mQt6QtWidgets, "QFileDialog")
18
+ define_qlass_under<QFileDialog, QDialog>(rb_mQt6QtWidgets, "QFileDialog")
19
19
  // RubyQt6-Defined Functions
20
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFileDialog * { return qobject_cast<QFileDialog *>(object); })
20
21
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QFileDialog::staticMetaObject; })
21
22
  // Constructor
22
23
  .define_constructor(Constructor<QFileDialog, QWidget *>(), Arg("parent"))
@@ -9,7 +9,7 @@ void Init_qfileiconprovider(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQFileIconProvider =
11
11
  // RubyQt6::QtWidgets::QFileIconProvider
12
- define_class_under<QFileIconProvider, QAbstractFileIconProvider>(rb_mQt6QtWidgets, "QFileIconProvider")
12
+ define_qlass_under<QFileIconProvider, QAbstractFileIconProvider>(rb_mQt6QtWidgets, "QFileIconProvider")
13
13
  // Constructor
14
14
  .define_constructor(Constructor<QFileIconProvider>())
15
15
  // Public Functions
@@ -9,8 +9,9 @@ void Init_qfocusframe(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQFocusFrame =
11
11
  // RubyQt6::QtWidgets::QFocusFrame
12
- define_class_under<QFocusFrame, QWidget>(rb_mQt6QtWidgets, "QFocusFrame")
12
+ define_qlass_under<QFocusFrame, QWidget>(rb_mQt6QtWidgets, "QFocusFrame")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFocusFrame * { return qobject_cast<QFocusFrame *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QFocusFrame::staticMetaObject; })
15
16
  // Constructor
16
17
  .define_constructor(Constructor<QFocusFrame, QWidget *>(), Arg("parent"))
@@ -11,8 +11,9 @@ void Init_qfontcombobox(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQFontComboBox =
13
13
  // RubyQt6::QtWidgets::QFontComboBox
14
- define_class_under<QFontComboBox, QComboBox>(rb_mQt6QtWidgets, "QFontComboBox")
14
+ define_qlass_under<QFontComboBox, QComboBox>(rb_mQt6QtWidgets, "QFontComboBox")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFontComboBox * { return qobject_cast<QFontComboBox *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QFontComboBox::staticMetaObject; })
17
18
  // Constructor
18
19
  .define_constructor(Constructor<QFontComboBox, QWidget *>(), Arg("parent"))
@@ -27,10 +27,11 @@ void Init_qfontdialog(Module rb_mQt6QtWidgets)
27
27
  {
28
28
  rb_cQFontDialog =
29
29
  // RubyQt6::QtWidgets::QFontDialog
30
- define_class_under<QFontDialog, QDialog>(rb_mQt6QtWidgets, "QFontDialog")
30
+ define_qlass_under<QFontDialog, QDialog>(rb_mQt6QtWidgets, "QFontDialog")
31
31
  // RubyQt6-Defined Functions
32
32
  .define_singleton_function("get_font", QFontDialog_get_font_2, Arg("ok"), Arg("parent") = static_cast<QWidget *>(nullptr))
33
33
  .define_singleton_function("get_font", QFontDialog_get_font_5, Arg("ok"), Arg("initial"), Arg("parent") = static_cast<QWidget *>(nullptr), Arg("title") = static_cast<const QString &>(QString()), Arg("options") = static_cast<QFontDialog::FontDialogOptions>(QFontDialog::FontDialogOptions()))
34
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFontDialog * { return qobject_cast<QFontDialog *>(object); })
34
35
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QFontDialog::staticMetaObject; })
35
36
  // Constructor
36
37
  .define_constructor(Constructor<QFontDialog, const QFont &, QWidget *>(), Arg("initial"), Arg("parent"))
@@ -13,8 +13,9 @@ void Init_qformlayout(Module rb_mQt6QtWidgets)
13
13
  {
14
14
  rb_cQFormLayout =
15
15
  // RubyQt6::QtWidgets::QFormLayout
16
- define_class_under<QFormLayout, QLayout>(rb_mQt6QtWidgets, "QFormLayout")
16
+ define_qlass_under<QFormLayout, QLayout>(rb_mQt6QtWidgets, "QFormLayout")
17
17
  // RubyQt6-Defined Functions
18
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFormLayout * { return qobject_cast<QFormLayout *>(object); })
18
19
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QFormLayout::staticMetaObject; })
19
20
  // Constructor
20
21
  .define_constructor(Constructor<QFormLayout, QWidget *>(), Arg("parent"))
@@ -96,7 +97,7 @@ void Init_qformlayout(Module rb_mQt6QtWidgets)
96
97
 
97
98
  rb_cQFormLayoutTakeRowResult =
98
99
  // RubyQt6::QtWidgets::QFormLayout::TakeRowResult
99
- define_class_under<QFormLayout::TakeRowResult>(rb_cQFormLayout, "TakeRowResult")
100
+ define_qlass_under<QFormLayout::TakeRowResult>(rb_cQFormLayout, "TakeRowResult")
100
101
  .define_attr("label_item", &QFormLayout::TakeRowResult::labelItem, AttrAccess::Read)
101
102
  .define_attr("field_item", &QFormLayout::TakeRowResult::fieldItem, AttrAccess::Read);
102
103
  }
@@ -10,8 +10,9 @@ void Init_qframe(Module rb_mQt6QtWidgets)
10
10
  {
11
11
  rb_cQFrame =
12
12
  // RubyQt6::QtWidgets::QFrame
13
- define_class_under<QFrame, QWidget>(rb_mQt6QtWidgets, "QFrame")
13
+ define_qlass_under<QFrame, QWidget>(rb_mQt6QtWidgets, "QFrame")
14
14
  // RubyQt6-Defined Functions
15
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFrame * { return qobject_cast<QFrame *>(object); })
15
16
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QFrame::staticMetaObject; })
16
17
  // Constructor
17
18
  .define_constructor(Constructor<QFrame, QWidget *>(), Arg("parent"))
@@ -28,9 +28,9 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
28
28
  {
29
29
  rb_cQGraphicsItem =
30
30
  // RubyQt6::QtWidgets::QGraphicsItem
31
- define_class_under<QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsItem")
31
+ define_qlass_under<QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsItem")
32
32
  // RubyQt6-Defined Functions
33
- .define_singleton_function("_delete_now", [](QGraphicsItem *item) -> void { delete item; }, Arg("item").takeOwnership())
33
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QFrame * { return qobject_cast<QFrame *>(object); })
34
34
  .define_singleton_function("_take_ownership_from_ruby", [](QGraphicsItem *) -> void {}, Arg("item").takeOwnership())
35
35
  // Public Functions
36
36
  .define_method("accept_drops", &QGraphicsItem::acceptDrops)
@@ -290,7 +290,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
290
290
 
291
291
  rb_cQAbstractGraphicsShapeItem =
292
292
  // RubyQt6::QtWidgets::QAbstractGraphicsShapeItem
293
- define_class_under<QAbstractGraphicsShapeItem, QGraphicsItem>(rb_mQt6QtWidgets, "QAbstractGraphicsShapeItem")
293
+ define_qlass_under<QAbstractGraphicsShapeItem, QGraphicsItem>(rb_mQt6QtWidgets, "QAbstractGraphicsShapeItem")
294
294
  // Public Functions
295
295
  .define_method("brush", &QAbstractGraphicsShapeItem::brush)
296
296
  .define_method("pen", &QAbstractGraphicsShapeItem::pen)
@@ -299,7 +299,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
299
299
 
300
300
  rb_cQGraphicsEllipseItem =
301
301
  // RubyQt6::QtWidgets::QGraphicsEllipseItem
302
- define_class_under<QGraphicsEllipseItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsEllipseItem")
302
+ define_qlass_under<QGraphicsEllipseItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsEllipseItem")
303
303
  // Constructor
304
304
  .define_constructor(Constructor<QGraphicsEllipseItem, QGraphicsItem *>(), Arg("parent"))
305
305
  // Public Functions
@@ -313,7 +313,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
313
313
 
314
314
  rb_cQGraphicsPathItem =
315
315
  // RubyQt6::QtWidgets::QGraphicsPathItem
316
- define_class_under<QGraphicsPathItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsPathItem")
316
+ define_qlass_under<QGraphicsPathItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsPathItem")
317
317
  // Constructor
318
318
  .define_constructor(Constructor<QGraphicsPathItem, QGraphicsItem *>(), Arg("parent"))
319
319
  // Public Functions
@@ -322,7 +322,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
322
322
 
323
323
  rb_cQGraphicsPolygonItem =
324
324
  // RubyQt6::QtWidgets::QGraphicsPolygonItem
325
- define_class_under<QGraphicsPolygonItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsPolygonItem")
325
+ define_qlass_under<QGraphicsPolygonItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsPolygonItem")
326
326
  // Constructor
327
327
  .define_constructor(Constructor<QGraphicsPolygonItem, QGraphicsItem *>(), Arg("parent"))
328
328
  // Public Functions
@@ -333,7 +333,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
333
333
 
334
334
  rb_cQGraphicsRectItem =
335
335
  // RubyQt6::QtWidgets::QGraphicsRectItem
336
- define_class_under<QGraphicsRectItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsRectItem")
336
+ define_qlass_under<QGraphicsRectItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsRectItem")
337
337
  // Constructor
338
338
  .define_constructor(Constructor<QGraphicsRectItem, QGraphicsItem *>(), Arg("parent"))
339
339
  // Public Functions
@@ -343,7 +343,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
343
343
 
344
344
  rb_cQGraphicsSimpleTextItem =
345
345
  // RubyQt6::QtWidgets::QGraphicsSimpleTextItem
346
- define_class_under<QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsSimpleTextItem")
346
+ define_qlass_under<QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem>(rb_mQt6QtWidgets, "QGraphicsSimpleTextItem")
347
347
  // Constructor
348
348
  .define_constructor(Constructor<QGraphicsSimpleTextItem, QGraphicsItem *>(), Arg("parent"))
349
349
  // Public Functions
@@ -354,7 +354,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
354
354
 
355
355
  rb_cQGraphicsItemGroup =
356
356
  // RubyQt6::QtWidgets::QGraphicsItemGroup
357
- define_class_under<QGraphicsItemGroup, QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsItemGroup")
357
+ define_qlass_under<QGraphicsItemGroup, QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsItemGroup")
358
358
  // Constructor
359
359
  .define_constructor(Constructor<QGraphicsItemGroup, QGraphicsItem *>(), Arg("parent"))
360
360
  // Public Functions
@@ -363,7 +363,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
363
363
 
364
364
  rb_cQGraphicsLineItem =
365
365
  // RubyQt6::QtWidgets::QGraphicsLineItem
366
- define_class_under<QGraphicsLineItem, QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsLineItem")
366
+ define_qlass_under<QGraphicsLineItem, QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsLineItem")
367
367
  // Constructor
368
368
  .define_constructor(Constructor<QGraphicsLineItem, QGraphicsItem *>(), Arg("parent"))
369
369
  // Public Functions
@@ -375,7 +375,7 @@ void Init_qgraphicsitem(Module rb_mQt6QtWidgets)
375
375
 
376
376
  rb_cQGraphicsPixmapItem =
377
377
  // RubyQt6::QtWidgets::QGraphicsPixmapItem
378
- define_class_under<QGraphicsPixmapItem, QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsPixmapItem")
378
+ define_qlass_under<QGraphicsPixmapItem, QGraphicsItem>(rb_mQt6QtWidgets, "QGraphicsPixmapItem")
379
379
  // Constructor
380
380
  .define_constructor(Constructor<QGraphicsPixmapItem, QGraphicsItem *>(), Arg("parent"))
381
381
  // Public Functions
@@ -9,8 +9,9 @@ void Init_qgraphicsobject(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQGraphicsObject =
11
11
  // RubyQt6::QtWidgets::QGraphicsObject
12
- define_class_under<QGraphicsObject, QObject>(rb_mQt6QtWidgets, "QGraphicsObject")
12
+ define_qlass_under<QGraphicsObject, QObject>(rb_mQt6QtWidgets, "QGraphicsObject")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGraphicsObject * { return qobject_cast<QGraphicsObject *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGraphicsObject::staticMetaObject; })
15
16
  // Public Functions
16
17
  .define_method("grab_gesture", &QGraphicsObject::grabGesture, Arg("type"), Arg("flags") = static_cast<Qt::GestureFlags>(Qt::GestureFlags()))
@@ -19,8 +19,9 @@ void Init_qgraphicsscene(Module rb_mQt6QtWidgets)
19
19
  {
20
20
  rb_cQGraphicsScene =
21
21
  // RubyQt6::QtWidgets::QGraphicsScene
22
- define_class_under<QGraphicsScene, QObject>(rb_mQt6QtWidgets, "QGraphicsScene")
22
+ define_qlass_under<QGraphicsScene, QObject>(rb_mQt6QtWidgets, "QGraphicsScene")
23
23
  // RubyQt6-Defined Functions
24
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGraphicsScene * { return qobject_cast<QGraphicsScene *>(object); })
24
25
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGraphicsScene::staticMetaObject; })
25
26
  // Constructor
26
27
  .define_constructor(Constructor<QGraphicsScene, QObject *>(), Arg("parent"))
@@ -15,8 +15,9 @@ void Init_qgraphicstextitem(Module rb_mQt6QtWidgets)
15
15
  {
16
16
  rb_cQGraphicsTextItem =
17
17
  // RubyQt6::QtWidgets::QGraphicsTextItem
18
- define_class_under<QGraphicsTextItem, QGraphicsObject>(rb_mQt6QtWidgets, "QGraphicsTextItem")
18
+ define_qlass_under<QGraphicsTextItem, QGraphicsObject>(rb_mQt6QtWidgets, "QGraphicsTextItem")
19
19
  // RubyQt6-Defined Functions
20
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGraphicsTextItem * { return qobject_cast<QGraphicsTextItem *>(object); })
20
21
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGraphicsTextItem::staticMetaObject; })
21
22
  // Constructor
22
23
  .define_constructor(Constructor<QGraphicsTextItem, const QString &, QGraphicsItem *>(), Arg("text"), Arg("parent"))
@@ -13,9 +13,10 @@ void Init_qgraphicsview(Module rb_mQt6QtWidgets)
13
13
  {
14
14
  rb_cQGraphicsView =
15
15
  // RubyQt6::QtWidgets::QGraphicsView
16
- define_class_under<QGraphicsView, QAbstractScrollArea>(rb_mQt6QtWidgets, "QGraphicsView")
16
+ define_qlass_under<QGraphicsView, QAbstractScrollArea>(rb_mQt6QtWidgets, "QGraphicsView")
17
17
  // RubyQt6-Defined Functions
18
18
  .define_method("set_alignment", [](QGraphicsView *self, Qt::AlignmentFlag alignment) -> void { return self->setAlignment(alignment); }, Arg("alignment"))
19
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGraphicsView * { return qobject_cast<QGraphicsView *>(object); })
19
20
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGraphicsView::staticMetaObject; })
20
21
  // Constructor
21
22
  .define_constructor(Constructor<QGraphicsView, QWidget *>(), Arg("parent"))
@@ -14,8 +14,9 @@ void Init_qgraphicswidget(Module rb_mQt6QtWidgets)
14
14
  {
15
15
  rb_cQGraphicsWidget =
16
16
  // RubyQt6::QtWidgets::QGraphicsWidget
17
- define_class_under<QGraphicsWidget, QGraphicsObject>(rb_mQt6QtWidgets, "QGraphicsWidget")
17
+ define_qlass_under<QGraphicsWidget, QGraphicsObject>(rb_mQt6QtWidgets, "QGraphicsWidget")
18
18
  // RubyQt6-Defined Functions
19
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGraphicsWidget * { return qobject_cast<QGraphicsWidget *>(object); })
19
20
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGraphicsWidget::staticMetaObject; })
20
21
  // Constructor
21
22
  .define_constructor(Constructor<QGraphicsWidget, QGraphicsItem *>(), Arg("parent"))
@@ -11,8 +11,9 @@ void Init_qgridlayout(Module rb_mQt6QtWidgets)
11
11
  {
12
12
  rb_cQGridLayout =
13
13
  // RubyQt6::QtWidgets::QGridLayout
14
- define_class_under<QGridLayout, QLayout>(rb_mQt6QtWidgets, "QGridLayout")
14
+ define_qlass_under<QGridLayout, QLayout>(rb_mQt6QtWidgets, "QGridLayout")
15
15
  // RubyQt6-Defined Functions
16
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGridLayout * { return qobject_cast<QGridLayout *>(object); })
16
17
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGridLayout::staticMetaObject; })
17
18
  // Constructor
18
19
  .define_constructor(Constructor<QGridLayout, QWidget *>(), Arg("parent"))
@@ -9,9 +9,10 @@ void Init_qgroupbox(Module rb_mQt6QtWidgets)
9
9
  {
10
10
  rb_cQGroupBox =
11
11
  // RubyQt6::QtWidgets::QGroupBox
12
- define_class_under<QGroupBox, QWidget>(rb_mQt6QtWidgets, "QGroupBox")
12
+ define_qlass_under<QGroupBox, QWidget>(rb_mQt6QtWidgets, "QGroupBox")
13
13
  // RubyQt6-Defined Functions
14
14
  .define_method("set_alignment", [](QGroupBox *self, Qt::AlignmentFlag alignment) -> void { return self->setAlignment(alignment); }, Arg("alignment"))
15
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QGroupBox * { return qobject_cast<QGroupBox *>(object); })
15
16
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QGroupBox::staticMetaObject; })
16
17
  // Constructor
17
18
  .define_constructor(Constructor<QGroupBox, const QString &, QWidget *>(), Arg("title"), Arg("parent"))