ruby-qt6-qtgui 1.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.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.rubocop.yml +10 -0
- data/LICENSE +185 -0
- data/README.md +3 -0
- data/Rakefile +19 -0
- data/ext/qt6/qtgui/extconf.rb +16 -0
- data/ext/qt6/qtgui/qaction-rb.cpp +108 -0
- data/ext/qt6/qtgui/qaction-rb.hpp +4 -0
- data/ext/qt6/qtgui/qactiongroup-rb.cpp +45 -0
- data/ext/qt6/qtgui/qactiongroup-rb.hpp +4 -0
- data/ext/qt6/qtgui/qbrush-rb.cpp +39 -0
- data/ext/qt6/qtgui/qbrush-rb.hpp +4 -0
- data/ext/qt6/qtgui/qclipboard-rb.cpp +49 -0
- data/ext/qt6/qtgui/qclipboard-rb.hpp +4 -0
- data/ext/qt6/qtgui/qcolor-rb.cpp +122 -0
- data/ext/qt6/qtgui/qcolor-rb.hpp +4 -0
- data/ext/qt6/qtgui/qcursor-rb.cpp +32 -0
- data/ext/qt6/qtgui/qcursor-rb.hpp +4 -0
- data/ext/qt6/qtgui/qevent-rb.cpp +399 -0
- data/ext/qt6/qtgui/qevent-rb.hpp +4 -0
- data/ext/qt6/qtgui/qfilesystemmodel-rb.cpp +96 -0
- data/ext/qt6/qtgui/qfilesystemmodel-rb.hpp +4 -0
- data/ext/qt6/qtgui/qfont-rb.cpp +193 -0
- data/ext/qt6/qtgui/qfont-rb.hpp +4 -0
- data/ext/qt6/qtgui/qfontdatabase-rb.cpp +101 -0
- data/ext/qt6/qtgui/qfontdatabase-rb.hpp +4 -0
- data/ext/qt6/qtgui/qfontinfo-rb.cpp +34 -0
- data/ext/qt6/qtgui/qfontinfo-rb.hpp +4 -0
- data/ext/qt6/qtgui/qfontmetrics-rb.cpp +90 -0
- data/ext/qt6/qtgui/qfontmetrics-rb.hpp +4 -0
- data/ext/qt6/qtgui/qguiapplication-rb.cpp +94 -0
- data/ext/qt6/qtgui/qguiapplication-rb.hpp +4 -0
- data/ext/qt6/qtgui/qicon-rb.cpp +223 -0
- data/ext/qt6/qtgui/qicon-rb.hpp +4 -0
- data/ext/qt6/qtgui/qimage-rb.cpp +181 -0
- data/ext/qt6/qtgui/qimage-rb.hpp +4 -0
- data/ext/qt6/qtgui/qimagewriter-rb.cpp +56 -0
- data/ext/qt6/qtgui/qimagewriter-rb.hpp +4 -0
- data/ext/qt6/qtgui/qkeysequence-rb.cpp +121 -0
- data/ext/qt6/qtgui/qkeysequence-rb.hpp +4 -0
- data/ext/qt6/qtgui/qmovie-rb.cpp +78 -0
- data/ext/qt6/qtgui/qmovie-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpagedpaintdevice-rb.cpp +31 -0
- data/ext/qt6/qtgui/qpagedpaintdevice-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpaintdevice-rb.cpp +33 -0
- data/ext/qt6/qtgui/qpaintdevice-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpainter-rb.cpp +285 -0
- data/ext/qt6/qtgui/qpainter-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpainterpath-rb.cpp +100 -0
- data/ext/qt6/qtgui/qpainterpath-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpainterpathstroker-rb.cpp +35 -0
- data/ext/qt6/qtgui/qpainterpathstroker-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpalette-rb.cpp +96 -0
- data/ext/qt6/qtgui/qpalette-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpen-rb.cpp +46 -0
- data/ext/qt6/qtgui/qpen-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpicture-rb.cpp +33 -0
- data/ext/qt6/qtgui/qpicture-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpixmap-rb.cpp +66 -0
- data/ext/qt6/qtgui/qpixmap-rb.hpp +4 -0
- data/ext/qt6/qtgui/qpolygon-rb.cpp +54 -0
- data/ext/qt6/qtgui/qpolygon-rb.hpp +4 -0
- data/ext/qt6/qtgui/qregion-rb.cpp +54 -0
- data/ext/qt6/qtgui/qregion-rb.hpp +4 -0
- data/ext/qt6/qtgui/qscreen-rb.cpp +61 -0
- data/ext/qt6/qtgui/qscreen-rb.hpp +4 -0
- data/ext/qt6/qtgui/qshortcut-rb.cpp +34 -0
- data/ext/qt6/qtgui/qshortcut-rb.hpp +4 -0
- data/ext/qt6/qtgui/qstandarditemmodel-rb.cpp +187 -0
- data/ext/qt6/qtgui/qstandarditemmodel-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtextcursor-rb.cpp +138 -0
- data/ext/qt6/qtgui/qtextcursor-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtextdocument-rb.cpp +178 -0
- data/ext/qt6/qtgui/qtextdocument-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtextformat-rb.cpp +551 -0
- data/ext/qt6/qtgui/qtextformat-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtextlist-rb.cpp +25 -0
- data/ext/qt6/qtgui/qtextlist-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtextobject-rb.cpp +44 -0
- data/ext/qt6/qtgui/qtextobject-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtextoption-rb.cpp +69 -0
- data/ext/qt6/qtgui/qtextoption-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtexttable-rb.cpp +53 -0
- data/ext/qt6/qtgui/qtexttable-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtgui-rb.cpp +105 -0
- data/ext/qt6/qtgui/qtgui-rb.hpp +3 -0
- data/ext/qt6/qtgui/qtguiversion-rb.cpp +9 -0
- data/ext/qt6/qtgui/qtguiversion-rb.hpp +4 -0
- data/ext/qt6/qtgui/qtransform-rb.cpp +79 -0
- data/ext/qt6/qtgui/qtransform-rb.hpp +4 -0
- data/ext/qt6/qtgui/qvalidator-rb.cpp +98 -0
- data/ext/qt6/qtgui/qvalidator-rb.hpp +4 -0
- data/ext/qt6/qtgui/qwindow-rb.cpp +179 -0
- data/ext/qt6/qtgui/qwindow-rb.hpp +4 -0
- data/ext/qt6/qtgui/t-qtgui-rb.cpp +20 -0
- data/ext/qt6/qtgui/t-qtgui-rb.hpp +4 -0
- data/lib/qt6/qtgui/qaction.rb +69 -0
- data/lib/qt6/qtgui/qactiongroup.rb +32 -0
- data/lib/qt6/qtgui/qbrush.rb +49 -0
- data/lib/qt6/qtgui/qclipboard.rb +19 -0
- data/lib/qt6/qtgui/qcolor.rb +49 -0
- data/lib/qt6/qtgui/qcursor.rb +21 -0
- data/lib/qt6/qtgui/qdoublevalidator.rb +57 -0
- data/lib/qt6/qtgui/qfilesystemmodel.rb +32 -0
- data/lib/qt6/qtgui/qfont.rb +70 -0
- data/lib/qt6/qtgui/qfontdatabase.rb +13 -0
- data/lib/qt6/qtgui/qfontinfo.rb +17 -0
- data/lib/qt6/qtgui/qfontmetrics.rb +19 -0
- data/lib/qt6/qtgui/qfontmetricsf.rb +22 -0
- data/lib/qt6/qtgui/qguiapplication.rb +36 -0
- data/lib/qt6/qtgui/qicon.rb +32 -0
- data/lib/qt6/qtgui/qimage.rb +31 -0
- data/lib/qt6/qtgui/qimagewriter.rb +30 -0
- data/lib/qt6/qtgui/qintvalidator.rb +50 -0
- data/lib/qt6/qtgui/qkeysequence.rb +45 -0
- data/lib/qt6/qtgui/qmovie.rb +39 -0
- data/lib/qt6/qtgui/qpagedpaintdevice.rb +11 -0
- data/lib/qt6/qtgui/qpaintdevice.rb +9 -0
- data/lib/qt6/qtgui/qpainter.rb +45 -0
- data/lib/qt6/qtgui/qpainterpath.rb +24 -0
- data/lib/qt6/qtgui/qpainterpathstroker.rb +21 -0
- data/lib/qt6/qtgui/qpalette.rb +30 -0
- data/lib/qt6/qtgui/qpen.rb +46 -0
- data/lib/qt6/qtgui/qpicture.rb +18 -0
- data/lib/qt6/qtgui/qpixmap.rb +29 -0
- data/lib/qt6/qtgui/qpolygon.rb +18 -0
- data/lib/qt6/qtgui/qpolygonf.rb +21 -0
- data/lib/qt6/qtgui/qregion.rb +41 -0
- data/lib/qt6/qtgui/qregularexpressionvalidator.rb +48 -0
- data/lib/qt6/qtgui/qscreen.rb +21 -0
- data/lib/qt6/qtgui/qshortcut.rb +25 -0
- data/lib/qt6/qtgui/qstandarditem.rb +43 -0
- data/lib/qt6/qtgui/qstandarditemmodel.rb +23 -0
- data/lib/qt6/qtgui/qtextblockformat.rb +21 -0
- data/lib/qt6/qtgui/qtextblockgroup.rb +12 -0
- data/lib/qt6/qtgui/qtextcharformat.rb +23 -0
- data/lib/qt6/qtgui/qtextcursor.rb +58 -0
- data/lib/qt6/qtgui/qtextdocument.rb +58 -0
- data/lib/qt6/qtgui/qtextformat.rb +32 -0
- data/lib/qt6/qtgui/qtextframe.rb +12 -0
- data/lib/qt6/qtgui/qtextframeformat.rb +21 -0
- data/lib/qt6/qtgui/qtextimageformat.rb +16 -0
- data/lib/qt6/qtgui/qtextlist.rb +12 -0
- data/lib/qt6/qtgui/qtextlistformat.rb +19 -0
- data/lib/qt6/qtgui/qtextobject.rb +12 -0
- data/lib/qt6/qtgui/qtextoption.rb +17 -0
- data/lib/qt6/qtgui/qtexttable.rb +12 -0
- data/lib/qt6/qtgui/qtexttablecell.rb +9 -0
- data/lib/qt6/qtgui/qtexttablecellformat.rb +16 -0
- data/lib/qt6/qtgui/qtexttableformat.rb +16 -0
- data/lib/qt6/qtgui/qtguiversion.rb +6 -0
- data/lib/qt6/qtgui/qtransform.rb +45 -0
- data/lib/qt6/qtgui/qvalidator.rb +16 -0
- data/lib/qt6/qtgui/qwindow.rb +79 -0
- data/lib/qt6/qtgui/version.rb +7 -0
- data/lib/qt6/qtgui.rb +66 -0
- metadata +227 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#include "qpainterpath-rb.hpp"
|
|
2
|
+
#include <qpainterpath.h>
|
|
3
|
+
#include <rice/qt6/qenum.hpp>
|
|
4
|
+
|
|
5
|
+
#include <QFont>
|
|
6
|
+
|
|
7
|
+
using namespace Rice;
|
|
8
|
+
|
|
9
|
+
Rice::Class rb_cQPainterPath;
|
|
10
|
+
Rice::Class rb_cQPainterPathElement;
|
|
11
|
+
|
|
12
|
+
void Init_qpainterpath(Rice::Module rb_mQt6QtGui)
|
|
13
|
+
{
|
|
14
|
+
rb_cQPainterPath =
|
|
15
|
+
// RubyQt6::QtGui::QPainterPath
|
|
16
|
+
define_class_under<QPainterPath>(rb_mQt6QtGui, "QPainterPath")
|
|
17
|
+
// Constructor
|
|
18
|
+
.define_constructor(Constructor<QPainterPath>())
|
|
19
|
+
.define_constructor(Constructor<QPainterPath, const QPointF &>(), Arg("start_point"))
|
|
20
|
+
// Public Functions
|
|
21
|
+
.define_method<void (QPainterPath::*)(const QPointF &, qreal, qreal)>("add_ellipse", &QPainterPath::addEllipse, Arg("center"), Arg("rx"), Arg("ry"))
|
|
22
|
+
.define_method<void (QPainterPath::*)(const QRectF &)>("add_ellipse", &QPainterPath::addEllipse, Arg("rect"))
|
|
23
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal)>("add_ellipse", &QPainterPath::addEllipse, Arg("x"), Arg("y"), Arg("w"), Arg("h"))
|
|
24
|
+
.define_method("add_path", &QPainterPath::addPath, Arg("path"))
|
|
25
|
+
.define_method("add_polygon", &QPainterPath::addPolygon, Arg("polygon"))
|
|
26
|
+
.define_method<void (QPainterPath::*)(const QRectF &)>("add_rect", &QPainterPath::addRect, Arg("rect"))
|
|
27
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal)>("add_rect", &QPainterPath::addRect, Arg("x"), Arg("y"), Arg("w"), Arg("h"))
|
|
28
|
+
.define_method("add_region", &QPainterPath::addRegion, Arg("region"))
|
|
29
|
+
.define_method<void (QPainterPath::*)(const QRectF &, qreal, qreal, Qt::SizeMode)>("add_rounded_rect", &QPainterPath::addRoundedRect, Arg("rect"), Arg("x_radius"), Arg("y_radius"), Arg("mode") = static_cast<Qt::SizeMode>(Qt::AbsoluteSize))
|
|
30
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal, qreal, qreal, Qt::SizeMode)>("add_rounded_rect", &QPainterPath::addRoundedRect, Arg("x"), Arg("y"), Arg("w"), Arg("h"), Arg("x_radius"), Arg("y_radius"), Arg("mode") = static_cast<Qt::SizeMode>(Qt::AbsoluteSize))
|
|
31
|
+
.define_method<void (QPainterPath::*)(const QPointF &, const QFont &, const QString &)>("add_text", &QPainterPath::addText, Arg("point"), Arg("f"), Arg("text"))
|
|
32
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, const QFont &, const QString &)>("add_text", &QPainterPath::addText, Arg("x"), Arg("y"), Arg("f"), Arg("text"))
|
|
33
|
+
.define_method("angle_at_percent", &QPainterPath::angleAtPercent, Arg("t"))
|
|
34
|
+
.define_method<void (QPainterPath::*)(const QRectF &, qreal)>("arc_move_to", &QPainterPath::arcMoveTo, Arg("rect"), Arg("angle"))
|
|
35
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal, qreal)>("arc_move_to", &QPainterPath::arcMoveTo, Arg("x"), Arg("y"), Arg("w"), Arg("h"), Arg("angle"))
|
|
36
|
+
.define_method<void (QPainterPath::*)(const QRectF &, qreal, qreal)>("arc_to", &QPainterPath::arcTo, Arg("rect"), Arg("start_angle"), Arg("arc_length"))
|
|
37
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal, qreal, qreal)>("arc_to", &QPainterPath::arcTo, Arg("x"), Arg("y"), Arg("w"), Arg("h"), Arg("start_angle"), Arg("arc_length"))
|
|
38
|
+
.define_method("bounding_rect", &QPainterPath::boundingRect)
|
|
39
|
+
.define_method("capacity", &QPainterPath::capacity)
|
|
40
|
+
.define_method("clear", &QPainterPath::clear)
|
|
41
|
+
.define_method("close_subpath", &QPainterPath::closeSubpath)
|
|
42
|
+
.define_method("connect_path", &QPainterPath::connectPath, Arg("path"))
|
|
43
|
+
.define_method<bool (QPainterPath::*)(const QPainterPath &) const>("contains", &QPainterPath::contains, Arg("p"))
|
|
44
|
+
.define_method<bool (QPainterPath::*)(const QPointF &) const>("contains", &QPainterPath::contains, Arg("pt"))
|
|
45
|
+
.define_method<bool (QPainterPath::*)(const QRectF &) const>("contains", &QPainterPath::contains, Arg("rect"))
|
|
46
|
+
.define_method("control_point_rect", &QPainterPath::controlPointRect)
|
|
47
|
+
.define_method<void (QPainterPath::*)(const QPointF &, const QPointF &, const QPointF &)>("cubic_to", &QPainterPath::cubicTo, Arg("ctrl_pt1"), Arg("ctrl_pt2"), Arg("end_pt"))
|
|
48
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal, qreal, qreal)>("cubic_to", &QPainterPath::cubicTo, Arg("ctrl_pt1x"), Arg("ctrl_pt1y"), Arg("ctrl_pt2x"), Arg("ctrl_pt2y"), Arg("end_ptx"), Arg("end_pty"))
|
|
49
|
+
.define_method("current_position", &QPainterPath::currentPosition)
|
|
50
|
+
.define_method("element_at", &QPainterPath::elementAt, Arg("i"))
|
|
51
|
+
.define_method("element_count", &QPainterPath::elementCount)
|
|
52
|
+
.define_method("fill_rule", &QPainterPath::fillRule)
|
|
53
|
+
.define_method("intersected", &QPainterPath::intersected, Arg("r"))
|
|
54
|
+
.define_method<bool (QPainterPath::*)(const QPainterPath &) const>("intersects", &QPainterPath::intersects, Arg("p"))
|
|
55
|
+
.define_method<bool (QPainterPath::*)(const QRectF &) const>("intersects", &QPainterPath::intersects, Arg("rect"))
|
|
56
|
+
.define_method("empty?", &QPainterPath::isEmpty)
|
|
57
|
+
.define_method("length", &QPainterPath::length)
|
|
58
|
+
.define_method<void (QPainterPath::*)(const QPointF &)>("line_to", &QPainterPath::lineTo, Arg("p"))
|
|
59
|
+
.define_method<void (QPainterPath::*)(qreal, qreal)>("line_to", &QPainterPath::lineTo, Arg("x"), Arg("y"))
|
|
60
|
+
.define_method<void (QPainterPath::*)(const QPointF &)>("move_to", &QPainterPath::moveTo, Arg("p"))
|
|
61
|
+
.define_method<void (QPainterPath::*)(qreal, qreal)>("move_to", &QPainterPath::moveTo, Arg("x"), Arg("y"))
|
|
62
|
+
.define_method("percent_at_length", &QPainterPath::percentAtLength, Arg("t"))
|
|
63
|
+
.define_method("point_at_percent", &QPainterPath::pointAtPercent, Arg("t"))
|
|
64
|
+
.define_method<void (QPainterPath::*)(const QPointF &, const QPointF &)>("quad_to", &QPainterPath::quadTo, Arg("ctrl_pt"), Arg("end_pt"))
|
|
65
|
+
.define_method<void (QPainterPath::*)(qreal, qreal, qreal, qreal)>("quad_to", &QPainterPath::quadTo, Arg("ctrl_ptx"), Arg("ctrl_pty"), Arg("end_ptx"), Arg("end_pty"))
|
|
66
|
+
.define_method("reserve", &QPainterPath::reserve, Arg("size"))
|
|
67
|
+
.define_method("set_element_position_at", &QPainterPath::setElementPositionAt, Arg("i"), Arg("x"), Arg("y"))
|
|
68
|
+
.define_method("set_fill_rule", &QPainterPath::setFillRule, Arg("fill_rule"))
|
|
69
|
+
.define_method("simplified", &QPainterPath::simplified)
|
|
70
|
+
.define_method("slope_at_percent", &QPainterPath::slopeAtPercent, Arg("t"))
|
|
71
|
+
.define_method("subtracted", &QPainterPath::subtracted, Arg("r"))
|
|
72
|
+
.define_method("to_fill_polygon", &QPainterPath::toFillPolygon, Arg("matrix") = static_cast<const QTransform &>(QTransform()))
|
|
73
|
+
.define_method("to_fill_polygons", &QPainterPath::toFillPolygons, Arg("matrix") = static_cast<const QTransform &>(QTransform()))
|
|
74
|
+
.define_method("to_reversed", &QPainterPath::toReversed)
|
|
75
|
+
.define_method("to_subpath_polygons", &QPainterPath::toSubpathPolygons, Arg("matrix") = static_cast<const QTransform &>(QTransform()))
|
|
76
|
+
.define_method<void (QPainterPath::*)(const QPointF &)>("translate", &QPainterPath::translate, Arg("offset"))
|
|
77
|
+
.define_method<void (QPainterPath::*)(qreal, qreal)>("translate", &QPainterPath::translate, Arg("dx"), Arg("dy"))
|
|
78
|
+
.define_method<QPainterPath (QPainterPath::*)(const QPointF &) const>("translated", &QPainterPath::translated, Arg("offset"))
|
|
79
|
+
.define_method<QPainterPath (QPainterPath::*)(qreal, qreal) const>("translated", &QPainterPath::translated, Arg("dx"), Arg("dy"))
|
|
80
|
+
.define_method("united", &QPainterPath::united, Arg("r"));
|
|
81
|
+
|
|
82
|
+
Data_Type<QPainterPath::ElementType> rb_cQPainterPathElementType =
|
|
83
|
+
// RubyQt6::QtGui::QPainterPath::ElementType
|
|
84
|
+
define_qenum_under<QPainterPath::ElementType>(rb_cQPainterPath, "ElementType");
|
|
85
|
+
define_qenum_value_under(rb_cQPainterPathElementType, "MoveToElement", QPainterPath::ElementType::MoveToElement);
|
|
86
|
+
define_qenum_value_under(rb_cQPainterPathElementType, "LineToElement", QPainterPath::ElementType::LineToElement);
|
|
87
|
+
define_qenum_value_under(rb_cQPainterPathElementType, "CurveToElement", QPainterPath::ElementType::CurveToElement);
|
|
88
|
+
define_qenum_value_under(rb_cQPainterPathElementType, "CurveToDataElement", QPainterPath::ElementType::CurveToDataElement);
|
|
89
|
+
|
|
90
|
+
rb_cQPainterPathElement =
|
|
91
|
+
// RubyQt6::QtGui::QPainterPath::Element
|
|
92
|
+
define_class_under<QPainterPath::Element>(rb_cQPainterPath, "Element")
|
|
93
|
+
.define_constructor(Constructor<QPainterPath::Element>())
|
|
94
|
+
.define_attr("x", &QPainterPath::Element::x)
|
|
95
|
+
.define_attr("y", &QPainterPath::Element::y)
|
|
96
|
+
// .define_attr("type", &QPainterPath::Element::type)
|
|
97
|
+
.define_method("curve_to?", &QPainterPath::Element::isCurveTo)
|
|
98
|
+
.define_method("line_to?", &QPainterPath::Element::isLineTo)
|
|
99
|
+
.define_method("move_to?", &QPainterPath::Element::isMoveTo);
|
|
100
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#include "qpainterpathstroker-rb.hpp"
|
|
2
|
+
#include <qpainterpath.h>
|
|
3
|
+
|
|
4
|
+
#include <QPen>
|
|
5
|
+
|
|
6
|
+
using namespace Rice;
|
|
7
|
+
|
|
8
|
+
Rice::Class rb_cQPainterPathStroker;
|
|
9
|
+
|
|
10
|
+
void Init_qpainterpathstroker(Rice::Module rb_mQt6QtGui)
|
|
11
|
+
{
|
|
12
|
+
rb_cQPainterPathStroker =
|
|
13
|
+
// RubyQt6::QtGui::QPainterPathStroker
|
|
14
|
+
define_class_under<QPainterPathStroker>(rb_mQt6QtGui, "QPainterPathStroker")
|
|
15
|
+
// Constructor
|
|
16
|
+
.define_constructor(Constructor<QPainterPathStroker>())
|
|
17
|
+
.define_constructor(Constructor<QPainterPathStroker, const QPen &>(), Arg("pen"))
|
|
18
|
+
// Public Functions
|
|
19
|
+
.define_method("cap_style", &QPainterPathStroker::capStyle)
|
|
20
|
+
.define_method("create_stroke", &QPainterPathStroker::createStroke, Arg("path"))
|
|
21
|
+
.define_method("curve_threshold", &QPainterPathStroker::curveThreshold)
|
|
22
|
+
.define_method("dash_offset", &QPainterPathStroker::dashOffset)
|
|
23
|
+
.define_method("dash_pattern", &QPainterPathStroker::dashPattern)
|
|
24
|
+
.define_method("join_style", &QPainterPathStroker::joinStyle)
|
|
25
|
+
.define_method("miter_limit", &QPainterPathStroker::miterLimit)
|
|
26
|
+
.define_method("set_cap_style", &QPainterPathStroker::setCapStyle, Arg("style"))
|
|
27
|
+
.define_method("set_curve_threshold", &QPainterPathStroker::setCurveThreshold, Arg("threshold"))
|
|
28
|
+
.define_method("set_dash_offset", &QPainterPathStroker::setDashOffset, Arg("offset"))
|
|
29
|
+
.define_method<void (QPainterPathStroker::*)(Qt::PenStyle)>("set_dash_pattern", &QPainterPathStroker::setDashPattern, Arg("style"))
|
|
30
|
+
.define_method<void (QPainterPathStroker::*)(const QList<qreal> &)>("set_dash_pattern", &QPainterPathStroker::setDashPattern, Arg("dash_pattern"))
|
|
31
|
+
.define_method("set_join_style", &QPainterPathStroker::setJoinStyle, Arg("style"))
|
|
32
|
+
.define_method("set_miter_limit", &QPainterPathStroker::setMiterLimit, Arg("length"))
|
|
33
|
+
.define_method("set_width", &QPainterPathStroker::setWidth, Arg("width"))
|
|
34
|
+
.define_method("width", &QPainterPathStroker::width);
|
|
35
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#include "qpalette-rb.hpp"
|
|
2
|
+
#include <qpalette.h>
|
|
3
|
+
#include <rice/qt6/qenum.hpp>
|
|
4
|
+
|
|
5
|
+
using namespace Rice;
|
|
6
|
+
|
|
7
|
+
Rice::Class rb_cQPalette;
|
|
8
|
+
|
|
9
|
+
void Init_qpalette(Rice::Module rb_mQt6QtGui)
|
|
10
|
+
{
|
|
11
|
+
rb_cQPalette =
|
|
12
|
+
// RubyQt6::QtGui::QPalette
|
|
13
|
+
define_class_under<QPalette>(rb_mQt6QtGui, "QPalette")
|
|
14
|
+
// Constructor
|
|
15
|
+
.define_constructor(Constructor<QPalette>())
|
|
16
|
+
.define_constructor(Constructor<QPalette, const QColor &>(), Arg("button"))
|
|
17
|
+
.define_constructor(Constructor<QPalette, const QColor &, const QColor &>(), Arg("button"), Arg("window"))
|
|
18
|
+
// Public Functions
|
|
19
|
+
.define_method("accent", &QPalette::accent)
|
|
20
|
+
.define_method("alternate_base", &QPalette::alternateBase)
|
|
21
|
+
.define_method("base", &QPalette::base)
|
|
22
|
+
.define_method("bright_text", &QPalette::brightText)
|
|
23
|
+
.define_method<const QBrush &(QPalette::*)(QPalette::ColorGroup, QPalette::ColorRole) const>("brush", &QPalette::brush, Arg("cg"), Arg("cr"))
|
|
24
|
+
.define_method<const QBrush &(QPalette::*)(QPalette::ColorRole) const>("brush", &QPalette::brush, Arg("cr"))
|
|
25
|
+
.define_method("button", &QPalette::button)
|
|
26
|
+
.define_method("button_text", &QPalette::buttonText)
|
|
27
|
+
.define_method("cache_key", &QPalette::cacheKey)
|
|
28
|
+
.define_method<const QColor &(QPalette::*)(QPalette::ColorGroup, QPalette::ColorRole) const>("color", &QPalette::color, Arg("cg"), Arg("cr"))
|
|
29
|
+
.define_method<const QColor &(QPalette::*)(QPalette::ColorRole) const>("color", &QPalette::color, Arg("cr"))
|
|
30
|
+
.define_method("current_color_group", &QPalette::currentColorGroup)
|
|
31
|
+
.define_method("dark", &QPalette::dark)
|
|
32
|
+
.define_method("highlight", &QPalette::highlight)
|
|
33
|
+
.define_method("highlighted_text", &QPalette::highlightedText)
|
|
34
|
+
.define_method("brush_set?", &QPalette::isBrushSet, Arg("cg"), Arg("cr"))
|
|
35
|
+
.define_method("copy_of?", &QPalette::isCopyOf, Arg("p"))
|
|
36
|
+
.define_method("equal?", &QPalette::isEqual, Arg("cr1"), Arg("cr2"))
|
|
37
|
+
.define_method("light", &QPalette::light)
|
|
38
|
+
.define_method("link", &QPalette::link)
|
|
39
|
+
.define_method("link_visited", &QPalette::linkVisited)
|
|
40
|
+
.define_method("mid", &QPalette::mid)
|
|
41
|
+
.define_method("midlight", &QPalette::midlight)
|
|
42
|
+
.define_method("placeholder_text", &QPalette::placeholderText)
|
|
43
|
+
.define_method("resolve", &QPalette::resolve, Arg("other"))
|
|
44
|
+
.define_method("resolve_mask", &QPalette::resolveMask)
|
|
45
|
+
.define_method<void (QPalette::*)(QPalette::ColorGroup, QPalette::ColorRole, const QBrush &)>("set_brush", &QPalette::setBrush, Arg("cg"), Arg("cr"), Arg("brush"))
|
|
46
|
+
.define_method<void (QPalette::*)(QPalette::ColorRole, const QBrush &)>("set_brush", &QPalette::setBrush, Arg("cr"), Arg("brush"))
|
|
47
|
+
.define_method<void (QPalette::*)(QPalette::ColorGroup, QPalette::ColorRole, const QColor &)>("set_color", &QPalette::setColor, Arg("cg"), Arg("cr"), Arg("color"))
|
|
48
|
+
.define_method<void (QPalette::*)(QPalette::ColorRole, const QColor &)>("set_color", &QPalette::setColor, Arg("cr"), Arg("color"))
|
|
49
|
+
.define_method<void (QPalette::*)(QPalette::ColorGroup, const QBrush &, const QBrush &, const QBrush &, const QBrush &, const QBrush &, const QBrush &, const QBrush &, const QBrush &, const QBrush &)>("set_color_group", &QPalette::setColorGroup, Arg("cr"), Arg("window_text"), Arg("button"), Arg("light"), Arg("dark"), Arg("mid"), Arg("text"), Arg("bright_text"), Arg("base"), Arg("window"))
|
|
50
|
+
.define_method("set_current_color_group", &QPalette::setCurrentColorGroup, Arg("cg"))
|
|
51
|
+
.define_method("set_resolve_mask", &QPalette::setResolveMask, Arg("mask"))
|
|
52
|
+
.define_method("shadow", &QPalette::shadow)
|
|
53
|
+
.define_method("text", &QPalette::text)
|
|
54
|
+
.define_method("tool_tip_base", &QPalette::toolTipBase)
|
|
55
|
+
.define_method("tool_tip_text", &QPalette::toolTipText)
|
|
56
|
+
.define_method("window", &QPalette::window)
|
|
57
|
+
.define_method("window_text", &QPalette::windowText);
|
|
58
|
+
|
|
59
|
+
Data_Type<QPalette::ColorGroup> rb_cQPaletteColorGroup =
|
|
60
|
+
// RubyQt6::QtGui::QPalette::ColorGroup
|
|
61
|
+
define_qenum_under<QPalette::ColorGroup>(rb_cQPalette, "ColorGroup");
|
|
62
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "Active", QPalette::ColorGroup::Active);
|
|
63
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "Disabled", QPalette::ColorGroup::Disabled);
|
|
64
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "Inactive", QPalette::ColorGroup::Inactive);
|
|
65
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "NColorGroups", QPalette::ColorGroup::NColorGroups);
|
|
66
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "Current", QPalette::ColorGroup::Current);
|
|
67
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "All", QPalette::ColorGroup::All);
|
|
68
|
+
define_qenum_value_under(rb_cQPaletteColorGroup, "Normal", QPalette::ColorGroup::Normal);
|
|
69
|
+
|
|
70
|
+
Data_Type<QPalette::ColorRole> rb_cQPaletteColorRole =
|
|
71
|
+
// RubyQt6::QtGui::QPalette::ColorRole
|
|
72
|
+
define_qenum_under<QPalette::ColorRole>(rb_cQPalette, "ColorRole");
|
|
73
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "WindowText", QPalette::ColorRole::WindowText);
|
|
74
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Button", QPalette::ColorRole::Button);
|
|
75
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Light", QPalette::ColorRole::Light);
|
|
76
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Midlight", QPalette::ColorRole::Midlight);
|
|
77
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Dark", QPalette::ColorRole::Dark);
|
|
78
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Mid", QPalette::ColorRole::Mid);
|
|
79
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Text", QPalette::ColorRole::Text);
|
|
80
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "BrightText", QPalette::ColorRole::BrightText);
|
|
81
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "ButtonText", QPalette::ColorRole::ButtonText);
|
|
82
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Base", QPalette::ColorRole::Base);
|
|
83
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Window", QPalette::ColorRole::Window);
|
|
84
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Shadow", QPalette::ColorRole::Shadow);
|
|
85
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Highlight", QPalette::ColorRole::Highlight);
|
|
86
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "HighlightedText", QPalette::ColorRole::HighlightedText);
|
|
87
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Link", QPalette::ColorRole::Link);
|
|
88
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "LinkVisited", QPalette::ColorRole::LinkVisited);
|
|
89
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "AlternateBase", QPalette::ColorRole::AlternateBase);
|
|
90
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "NoRole", QPalette::ColorRole::NoRole);
|
|
91
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "ToolTipBase", QPalette::ColorRole::ToolTipBase);
|
|
92
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "ToolTipText", QPalette::ColorRole::ToolTipText);
|
|
93
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "PlaceholderText", QPalette::ColorRole::PlaceholderText);
|
|
94
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "Accent", QPalette::ColorRole::Accent);
|
|
95
|
+
define_qenum_value_under(rb_cQPaletteColorRole, "NColorRoles", QPalette::ColorRole::NColorRoles);
|
|
96
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#include "qpen-rb.hpp"
|
|
2
|
+
#include <qpen.h>
|
|
3
|
+
|
|
4
|
+
using namespace Rice;
|
|
5
|
+
|
|
6
|
+
Rice::Class rb_cQPen;
|
|
7
|
+
|
|
8
|
+
void Init_qpen(Rice::Module rb_mQt6QtGui)
|
|
9
|
+
{
|
|
10
|
+
rb_cQPen =
|
|
11
|
+
// RubyQt6::QtGui::QPen
|
|
12
|
+
define_class_under<QPen>(rb_mQt6QtGui, "QPen")
|
|
13
|
+
// Constructor
|
|
14
|
+
.define_constructor(Constructor<QPen>())
|
|
15
|
+
.define_constructor(Constructor<QPen, Qt::PenStyle>(), Arg("style"))
|
|
16
|
+
.define_constructor(Constructor<QPen, const QColor &>(), Arg("color"))
|
|
17
|
+
.define_constructor(Constructor<QPen, const QBrush &, qreal>(), Arg("brush"), Arg("width"))
|
|
18
|
+
.define_constructor(Constructor<QPen, const QBrush &, qreal, Qt::PenStyle>(), Arg("brush"), Arg("width"), Arg("style"))
|
|
19
|
+
.define_constructor(Constructor<QPen, const QBrush &, qreal, Qt::PenStyle, Qt::PenCapStyle>(), Arg("brush"), Arg("width"), Arg("style"), Arg("cap"))
|
|
20
|
+
.define_constructor(Constructor<QPen, const QBrush &, qreal, Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle>(), Arg("brush"), Arg("width"), Arg("style"), Arg("cap"), Arg("join"))
|
|
21
|
+
// Public Functions
|
|
22
|
+
.define_method("brush", &QPen::brush)
|
|
23
|
+
.define_method("cap_style", &QPen::capStyle)
|
|
24
|
+
.define_method("color", &QPen::color)
|
|
25
|
+
.define_method("dash_offset", &QPen::dashOffset)
|
|
26
|
+
.define_method("dash_pattern", &QPen::dashPattern)
|
|
27
|
+
.define_method("cosmetic?", &QPen::isCosmetic)
|
|
28
|
+
.define_method("detached?", &QPen::isDetached)
|
|
29
|
+
.define_method("solid?", &QPen::isSolid)
|
|
30
|
+
.define_method("join_style", &QPen::joinStyle)
|
|
31
|
+
.define_method("miter_limit", &QPen::miterLimit)
|
|
32
|
+
.define_method("set_brush", &QPen::setBrush, Arg("brush"))
|
|
33
|
+
.define_method("set_cap_style", &QPen::setCapStyle, Arg("pcs"))
|
|
34
|
+
.define_method("set_color", &QPen::setColor, Arg("color"))
|
|
35
|
+
.define_method("set_cosmetic", &QPen::setCosmetic, Arg("cosmetic"))
|
|
36
|
+
.define_method("set_dash_offset", &QPen::setDashOffset, Arg("doffset"))
|
|
37
|
+
.define_method("set_dash_pattern", &QPen::setDashPattern, Arg("pattern"))
|
|
38
|
+
.define_method("set_join_style", &QPen::setJoinStyle, Arg("pcs"))
|
|
39
|
+
.define_method("set_miter_limit", &QPen::setMiterLimit, Arg("limit"))
|
|
40
|
+
.define_method("set_style", &QPen::setStyle, Arg("style"))
|
|
41
|
+
.define_method("set_width", &QPen::setWidth, Arg("width"))
|
|
42
|
+
.define_method("set_width_f", &QPen::setWidthF, Arg("width"))
|
|
43
|
+
.define_method("style", &QPen::style)
|
|
44
|
+
.define_method("width", &QPen::width)
|
|
45
|
+
.define_method("width_f", &QPen::widthF);
|
|
46
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#include "qpicture-rb.hpp"
|
|
2
|
+
#include <qpicture.h>
|
|
3
|
+
|
|
4
|
+
#include <QPaintEngine>
|
|
5
|
+
#include <QPainter>
|
|
6
|
+
|
|
7
|
+
using namespace Rice;
|
|
8
|
+
|
|
9
|
+
Rice::Class rb_cQPicture;
|
|
10
|
+
|
|
11
|
+
void Init_qpicture(Rice::Module rb_mQt6QtGui)
|
|
12
|
+
{
|
|
13
|
+
rb_cQPicture =
|
|
14
|
+
// RubyQt6::QtGui::QPicture
|
|
15
|
+
define_class_under<QPicture, QPaintDevice>(rb_mQt6QtGui, "QPicture")
|
|
16
|
+
// Constructor
|
|
17
|
+
.define_constructor(Constructor<QPicture>())
|
|
18
|
+
// Public Functions
|
|
19
|
+
.define_method("bounding_rect", &QPicture::boundingRect)
|
|
20
|
+
.define_method("data", &QPicture::data)
|
|
21
|
+
.define_method("detach", &QPicture::detach)
|
|
22
|
+
.define_method("dev_type", &QPicture::devType)
|
|
23
|
+
.define_method("detached?", &QPicture::isDetached)
|
|
24
|
+
.define_method("null?", &QPicture::isNull)
|
|
25
|
+
.define_method<bool (QPicture::*)(QIODevice *)>("load", &QPicture::load, Arg("dev"))
|
|
26
|
+
.define_method<bool (QPicture::*)(const QString &)>("load", &QPicture::load, Arg("file_name"))
|
|
27
|
+
.define_method("play", &QPicture::play, Arg("p"))
|
|
28
|
+
.define_method<bool (QPicture::*)(QIODevice *)>("save", &QPicture::save, Arg("dev"))
|
|
29
|
+
.define_method<bool (QPicture::*)(const QString &)>("save", &QPicture::save, Arg("file_name"))
|
|
30
|
+
.define_method("set_bounding_rect", &QPicture::setBoundingRect, Arg("r"))
|
|
31
|
+
.define_method("set_data", &QPicture::setData, Arg("data"), Arg("size"))
|
|
32
|
+
.define_method("size", &QPicture::size);
|
|
33
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#include "qpixmap-rb.hpp"
|
|
2
|
+
#include <qpixmap.h>
|
|
3
|
+
|
|
4
|
+
#include <QBitmap>
|
|
5
|
+
#include <QImageReader>
|
|
6
|
+
#include <QIODevice>
|
|
7
|
+
#include <QPaintEngine>
|
|
8
|
+
|
|
9
|
+
using namespace Rice;
|
|
10
|
+
|
|
11
|
+
Rice::Class rb_cQPixmap;
|
|
12
|
+
|
|
13
|
+
void Init_qpixmap(Rice::Module rb_mQt6QtGui)
|
|
14
|
+
{
|
|
15
|
+
rb_cQPixmap =
|
|
16
|
+
// RubyQt6::QtGui::QPixmap
|
|
17
|
+
define_class_under<QPixmap, QPaintDevice>(rb_mQt6QtGui, "QPixmap")
|
|
18
|
+
// Constructor
|
|
19
|
+
.define_constructor(Constructor<QPixmap>())
|
|
20
|
+
.define_constructor(Constructor<QPixmap, int, int>(), Arg("w"), Arg("h"))
|
|
21
|
+
.define_constructor(Constructor<QPixmap, const QSize &>(), Arg("size"))
|
|
22
|
+
.define_constructor(Constructor<QPixmap, const QString &>(), Arg("file_name"))
|
|
23
|
+
// Public Functions
|
|
24
|
+
.define_method("cache_key", &QPixmap::cacheKey)
|
|
25
|
+
.define_method("convert_from_image", &QPixmap::convertFromImage, Arg("img"), Arg("flags") = static_cast<Qt::ImageConversionFlags>(Qt::AutoColor))
|
|
26
|
+
.define_method<QPixmap (QPixmap::*)(const QRect &) const>("copy", &QPixmap::copy, Arg("rect") = static_cast<const QRect &>(QRect()))
|
|
27
|
+
.define_method<QPixmap (QPixmap::*)(int, int, int, int) const>("copy", &QPixmap::copy, Arg("x"), Arg("y"), Arg("width"), Arg("height"))
|
|
28
|
+
.define_method("create_heuristic_mask", &QPixmap::createHeuristicMask, Arg("clip_tight") = static_cast<bool>(true))
|
|
29
|
+
.define_method("create_mask_from_color", &QPixmap::createMaskFromColor, Arg("mask_color"), Arg("mode") = static_cast<Qt::MaskMode>(Qt::MaskInColor))
|
|
30
|
+
.define_method("depth", &QPixmap::depth)
|
|
31
|
+
.define_method("detach", &QPixmap::detach)
|
|
32
|
+
.define_method("dev_type", &QPixmap::devType)
|
|
33
|
+
.define_method("device_independent_size", &QPixmap::deviceIndependentSize)
|
|
34
|
+
.define_method("device_pixel_ratio", &QPixmap::devicePixelRatio)
|
|
35
|
+
.define_method("fill", &QPixmap::fill, Arg("fill_color") = static_cast<const QColor &>(Qt::white))
|
|
36
|
+
.define_method("has_alpha", &QPixmap::hasAlpha)
|
|
37
|
+
.define_method("has_alpha_channel", &QPixmap::hasAlphaChannel)
|
|
38
|
+
.define_method("height", &QPixmap::height)
|
|
39
|
+
.define_method("detached?", &QPixmap::isDetached)
|
|
40
|
+
.define_method("null?", &QPixmap::isNull)
|
|
41
|
+
.define_method("qbitmap?", &QPixmap::isQBitmap)
|
|
42
|
+
.define_method("load", &QPixmap::load, Arg("file_name"), Arg("format") = static_cast<const char *>(nullptr), Arg("flags") = static_cast<Qt::ImageConversionFlags>(Qt::AutoColor))
|
|
43
|
+
.define_method<bool (QPixmap::*)(const QByteArray &, const char *, Qt::ImageConversionFlags)>("load_from_data", &QPixmap::loadFromData, Arg("data"), Arg("format") = static_cast<const char *>(nullptr), Arg("flags") = static_cast<Qt::ImageConversionFlags>(Qt::AutoColor))
|
|
44
|
+
.define_method<bool (QPixmap::*)(const uchar *, ::uint, const char *, Qt::ImageConversionFlags)>("load_from_data", &QPixmap::loadFromData, Arg("buf"), Arg("len"), Arg("format") = static_cast<const char *>(nullptr), Arg("flags") = static_cast<Qt::ImageConversionFlags>(Qt::AutoColor))
|
|
45
|
+
.define_method("mask", &QPixmap::mask)
|
|
46
|
+
.define_method("rect", &QPixmap::rect)
|
|
47
|
+
.define_method<bool (QPixmap::*)(QIODevice *, const char *, int) const>("save", &QPixmap::save, Arg("device"), Arg("format") = static_cast<const char *>(nullptr), Arg("quality") = static_cast<int>(-1))
|
|
48
|
+
.define_method<bool (QPixmap::*)(const QString &, const char *, int) const>("save", &QPixmap::save, Arg("file_name"), Arg("format") = static_cast<const char *>(nullptr), Arg("quality") = static_cast<int>(-1))
|
|
49
|
+
.define_method<QPixmap (QPixmap::*)(const QSize &, Qt::AspectRatioMode, Qt::TransformationMode) const>("scaled", &QPixmap::scaled, Arg("s"), Arg("aspect_mode") = static_cast<Qt::AspectRatioMode>(Qt::IgnoreAspectRatio), Arg("mode") = static_cast<Qt::TransformationMode>(Qt::FastTransformation))
|
|
50
|
+
.define_method<QPixmap (QPixmap::*)(int, int, Qt::AspectRatioMode, Qt::TransformationMode) const>("scaled", &QPixmap::scaled, Arg("w"), Arg("h"), Arg("aspect_mode") = static_cast<Qt::AspectRatioMode>(Qt::IgnoreAspectRatio), Arg("mode") = static_cast<Qt::TransformationMode>(Qt::FastTransformation))
|
|
51
|
+
.define_method("scaled_to_height", &QPixmap::scaledToHeight, Arg("h"), Arg("mode") = static_cast<Qt::TransformationMode>(Qt::FastTransformation))
|
|
52
|
+
.define_method("scaled_to_width", &QPixmap::scaledToWidth, Arg("w"), Arg("mode") = static_cast<Qt::TransformationMode>(Qt::FastTransformation))
|
|
53
|
+
.define_method<void (QPixmap::*)(int, int, const QRect &, QRegion *)>("scroll", &QPixmap::scroll, Arg("dx"), Arg("dy"), Arg("rect"), Arg("exposed") = static_cast<QRegion *>(nullptr))
|
|
54
|
+
.define_method<void (QPixmap::*)(int, int, int, int, int, int, QRegion *)>("scroll", &QPixmap::scroll, Arg("dx"), Arg("dy"), Arg("x"), Arg("y"), Arg("width"), Arg("height"), Arg("exposed") = static_cast<QRegion *>(nullptr))
|
|
55
|
+
.define_method("set_device_pixel_ratio", &QPixmap::setDevicePixelRatio, Arg("scale_factor"))
|
|
56
|
+
.define_method("set_mask", &QPixmap::setMask, Arg("mask"))
|
|
57
|
+
.define_method("size", &QPixmap::size)
|
|
58
|
+
.define_method("to_image", &QPixmap::toImage)
|
|
59
|
+
.define_method("transformed", &QPixmap::transformed, Arg("transform"), Arg("mode") = static_cast<Qt::TransformationMode>(Qt::FastTransformation))
|
|
60
|
+
.define_method("width", &QPixmap::width)
|
|
61
|
+
// Static Public Members
|
|
62
|
+
.define_singleton_function("default_depth", &QPixmap::defaultDepth)
|
|
63
|
+
.define_singleton_function<QPixmap (*)(QImage &&, Qt::ImageConversionFlags)>("from_image", &QPixmap::fromImage, Arg("image"), Arg("flags") = static_cast<Qt::ImageConversionFlags>(Qt::AutoColor))
|
|
64
|
+
.define_singleton_function("from_image_reader", &QPixmap::fromImageReader, Arg("image_reader"), Arg("flags") = static_cast<Qt::ImageConversionFlags>(Qt::AutoColor))
|
|
65
|
+
.define_singleton_function("true_matrix", &QPixmap::trueMatrix, Arg("m"), Arg("w"), Arg("h"));
|
|
66
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#include "qpolygon-rb.hpp"
|
|
2
|
+
#include <qpolygon.h>
|
|
3
|
+
|
|
4
|
+
using namespace Rice;
|
|
5
|
+
|
|
6
|
+
Rice::Class rb_cQPolygon;
|
|
7
|
+
Rice::Class rb_cQPolygonF;
|
|
8
|
+
|
|
9
|
+
void Init_qpolygon(Rice::Module rb_mQt6QtGui)
|
|
10
|
+
{
|
|
11
|
+
rb_cQPolygon =
|
|
12
|
+
// RubyQt6::QtGui::QPolygon
|
|
13
|
+
define_class_under<QPolygon, QList<QPoint>>(rb_mQt6QtGui, "QPolygon")
|
|
14
|
+
// Constructor
|
|
15
|
+
.define_constructor(Constructor<QPolygon>())
|
|
16
|
+
// Public Functions
|
|
17
|
+
.define_method("bounding_rect", &QPolygon::boundingRect)
|
|
18
|
+
.define_method("contains_point", &QPolygon::containsPoint, Arg("pt"), Arg("fill_rule"))
|
|
19
|
+
.define_method("intersected", &QPolygon::intersected, Arg("r"))
|
|
20
|
+
.define_method("intersects", &QPolygon::intersects, Arg("r"))
|
|
21
|
+
.define_method<QPoint (QPolygon::*)(int) const>("point", &QPolygon::point, Arg("i"))
|
|
22
|
+
.define_method<void (QPolygon::*)(int, int, const QPolygon &, int)>("put_points", &QPolygon::putPoints, Arg("index"), Arg("n_points"), Arg("from"), Arg("from_index") = static_cast<int>(0))
|
|
23
|
+
// .define_method<void (QPolygon::*)(int, int, int, int)>("put_points", &QPolygon::putPoints, Arg("index"), Arg("n_points"), Arg("firstx"), Arg("firsty"))
|
|
24
|
+
.define_method<void (QPolygon::*)(int, const QPoint &)>("set_point", &QPolygon::setPoint, Arg("index"), Arg("p"))
|
|
25
|
+
.define_method<void (QPolygon::*)(int, int, int)>("set_point", &QPolygon::setPoint, Arg("index"), Arg("x"), Arg("y"))
|
|
26
|
+
// .define_method<void (QPolygon::*)(int, int, int)>("set_points", &QPolygon::setPoints, Arg("n_points"), Arg("firstx"), Arg("firsty"))
|
|
27
|
+
.define_method("subtracted", &QPolygon::subtracted, Arg("r"))
|
|
28
|
+
.define_method("to_polygon_f", &QPolygon::toPolygonF)
|
|
29
|
+
.define_method<void (QPolygon::*)(const QPoint &)>("translate", &QPolygon::translate, Arg("offset"))
|
|
30
|
+
.define_method<void (QPolygon::*)(int, int)>("translate", &QPolygon::translate, Arg("dx"), Arg("dy"))
|
|
31
|
+
.define_method<QPolygon (QPolygon::*)(const QPoint &) const>("translated", &QPolygon::translated, Arg("offset"))
|
|
32
|
+
.define_method<QPolygon (QPolygon::*)(int, int) const>("translated", &QPolygon::translated, Arg("dx"), Arg("dy"))
|
|
33
|
+
.define_method("united", &QPolygon::united, Arg("r"));
|
|
34
|
+
|
|
35
|
+
rb_cQPolygonF =
|
|
36
|
+
// RubyQt6::QtGui::QPolygonF
|
|
37
|
+
define_class_under<QPolygonF, QList<QPointF>>(rb_mQt6QtGui, "QPolygonF")
|
|
38
|
+
// Constructor
|
|
39
|
+
.define_constructor(Constructor<QPolygonF>())
|
|
40
|
+
.define_constructor(Constructor<QPolygonF, const QPolygon &>(), Arg("polygon"))
|
|
41
|
+
// Public Functions
|
|
42
|
+
.define_method("bounding_rect", &QPolygonF::boundingRect)
|
|
43
|
+
.define_method("contains_point", &QPolygonF::containsPoint, Arg("pt"), Arg("fill_rule"))
|
|
44
|
+
.define_method("intersected", &QPolygonF::intersected, Arg("r"))
|
|
45
|
+
.define_method("intersects", &QPolygonF::intersects, Arg("r"))
|
|
46
|
+
.define_method("closed?", &QPolygonF::isClosed)
|
|
47
|
+
.define_method("subtracted", &QPolygonF::subtracted, Arg("r"))
|
|
48
|
+
.define_method("to_polygon", &QPolygonF::toPolygon)
|
|
49
|
+
.define_method<void (QPolygonF::*)(const QPointF &)>("translate", &QPolygonF::translate, Arg("offset"))
|
|
50
|
+
.define_method<void (QPolygonF::*)(qreal, qreal)>("translate", &QPolygonF::translate, Arg("dx"), Arg("dy"))
|
|
51
|
+
.define_method<QPolygonF (QPolygonF::*)(const QPointF &) const>("translated", &QPolygonF::translated, Arg("offset"))
|
|
52
|
+
.define_method<QPolygonF (QPolygonF::*)(qreal, qreal) const>("translated", &QPolygonF::translated, Arg("dx"), Arg("dy"))
|
|
53
|
+
.define_method("united", &QPolygonF::united, Arg("r"));
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#include "qregion-rb.hpp"
|
|
2
|
+
#include <qregion.h>
|
|
3
|
+
#include <rice/qt6/qenum.hpp>
|
|
4
|
+
|
|
5
|
+
#include <QBitmap>
|
|
6
|
+
#include <QPolygon>
|
|
7
|
+
|
|
8
|
+
using namespace Rice;
|
|
9
|
+
|
|
10
|
+
Rice::Class rb_cQRegion;
|
|
11
|
+
|
|
12
|
+
void Init_qregion(Rice::Module rb_mQt6QtGui)
|
|
13
|
+
{
|
|
14
|
+
rb_cQRegion =
|
|
15
|
+
// RubyQt6::QtGui::QRegion
|
|
16
|
+
define_class_under<QRegion>(rb_mQt6QtGui, "QRegion")
|
|
17
|
+
// Constructor
|
|
18
|
+
.define_constructor(Constructor<QRegion>())
|
|
19
|
+
.define_constructor(Constructor<QRegion, int, int, int, int>(), Arg("x"), Arg("y"), Arg("w"), Arg("h"))
|
|
20
|
+
.define_constructor(Constructor<QRegion, int, int, int, int, QRegion::RegionType>(), Arg("x"), Arg("y"), Arg("w"), Arg("h"), Arg("t"))
|
|
21
|
+
.define_constructor(Constructor<QRegion, const QRect &>(), Arg("r"))
|
|
22
|
+
.define_constructor(Constructor<QRegion, const QRect &, QRegion::RegionType>(), Arg("r"), Arg("t"))
|
|
23
|
+
// Public Functions
|
|
24
|
+
.define_method("bounding_rect", &QRegion::boundingRect)
|
|
25
|
+
.define_method("cbegin", &QRegion::cbegin)
|
|
26
|
+
.define_method("cend", &QRegion::cend)
|
|
27
|
+
.define_method<bool (QRegion::*)(const QPoint &) const>("contains", &QRegion::contains, Arg("p"))
|
|
28
|
+
.define_method<bool (QRegion::*)(const QRect &) const>("contains", &QRegion::contains, Arg("r"))
|
|
29
|
+
.define_method("crbegin", &QRegion::crbegin)
|
|
30
|
+
.define_method("crend", &QRegion::crend)
|
|
31
|
+
.define_method<QRegion (QRegion::*)(const QRect &) const>("intersected", &QRegion::intersected, Arg("r"))
|
|
32
|
+
.define_method<QRegion (QRegion::*)(const QRegion &) const>("intersected", &QRegion::intersected, Arg("r"))
|
|
33
|
+
.define_method<bool (QRegion::*)(const QRect &) const>("intersects", &QRegion::intersects, Arg("r"))
|
|
34
|
+
.define_method<bool (QRegion::*)(const QRegion &) const>("intersects", &QRegion::intersects, Arg("r"))
|
|
35
|
+
.define_method("empty?", &QRegion::isEmpty)
|
|
36
|
+
.define_method("null?", &QRegion::isNull)
|
|
37
|
+
.define_method("rect_count", &QRegion::rectCount)
|
|
38
|
+
.define_method("rects", &QRegion::rects)
|
|
39
|
+
.define_method<void (QRegion::*)(const QRect *, int)>("set_rects", &QRegion::setRects, Arg("rect"), Arg("num"))
|
|
40
|
+
.define_method("subtracted", &QRegion::subtracted, Arg("r"))
|
|
41
|
+
.define_method<void (QRegion::*)(const QPoint &)>("translate", &QRegion::translate, Arg("p"))
|
|
42
|
+
.define_method<void (QRegion::*)(int, int)>("translate", &QRegion::translate, Arg("dx"), Arg("dy"))
|
|
43
|
+
.define_method<QRegion (QRegion::*)(const QPoint &) const>("translated", &QRegion::translated, Arg("p"))
|
|
44
|
+
.define_method<QRegion (QRegion::*)(int, int) const>("translated", &QRegion::translated, Arg("dx"), Arg("dy"))
|
|
45
|
+
.define_method<QRegion (QRegion::*)(const QRect &) const>("united", &QRegion::united, Arg("r"))
|
|
46
|
+
.define_method<QRegion (QRegion::*)(const QRegion &) const>("united", &QRegion::united, Arg("r"))
|
|
47
|
+
.define_method("xored", &QRegion::xored, Arg("r"));
|
|
48
|
+
|
|
49
|
+
Data_Type<QRegion::RegionType> rb_cQRegionRegionType =
|
|
50
|
+
// RubyQt6::QtGui::QRegion::RegionType
|
|
51
|
+
define_qenum_under<QRegion::RegionType>(rb_cQRegion, "RegionType");
|
|
52
|
+
define_qenum_value_under(rb_cQRegionRegionType, "Rectangle", QRegion::RegionType::Rectangle);
|
|
53
|
+
define_qenum_value_under(rb_cQRegionRegionType, "Ellipse", QRegion::RegionType::Ellipse);
|
|
54
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#include "qscreen-rb.hpp"
|
|
2
|
+
#include <qscreen.h>
|
|
3
|
+
|
|
4
|
+
#include <QPixmap>
|
|
5
|
+
|
|
6
|
+
using namespace Rice;
|
|
7
|
+
|
|
8
|
+
Rice::Class rb_cQScreen;
|
|
9
|
+
|
|
10
|
+
void Init_qscreen(Rice::Module rb_mQt6QtGui)
|
|
11
|
+
{
|
|
12
|
+
rb_cQScreen =
|
|
13
|
+
// RubyQt6::QtGui::QScreen
|
|
14
|
+
define_class_under<QScreen, QObject>(rb_mQt6QtGui, "QScreen")
|
|
15
|
+
// RubyQt6-Defined Functions
|
|
16
|
+
.define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QScreen::staticMetaObject; })
|
|
17
|
+
// Public Functions
|
|
18
|
+
.define_method("angle_between", &QScreen::angleBetween, Arg("a"), Arg("b"))
|
|
19
|
+
.define_method("available_geometry", &QScreen::availableGeometry)
|
|
20
|
+
.define_method("available_size", &QScreen::availableSize)
|
|
21
|
+
.define_method("available_virtual_geometry", &QScreen::availableVirtualGeometry)
|
|
22
|
+
.define_method("available_virtual_size", &QScreen::availableVirtualSize)
|
|
23
|
+
.define_method("depth", &QScreen::depth)
|
|
24
|
+
.define_method("device_pixel_ratio", &QScreen::devicePixelRatio)
|
|
25
|
+
.define_method("geometry", &QScreen::geometry)
|
|
26
|
+
.define_method("grab_window", &QScreen::grabWindow, Arg("window") = static_cast<WId>(0), Arg("x") = static_cast<int>(0), Arg("y") = static_cast<int>(0), Arg("w") = static_cast<int>(-1), Arg("h") = static_cast<int>(-1))
|
|
27
|
+
.define_method("landscape?", &QScreen::isLandscape, Arg("orientation"))
|
|
28
|
+
.define_method("portrait?", &QScreen::isPortrait, Arg("orientation"))
|
|
29
|
+
.define_method("logical_dots_per_inch", &QScreen::logicalDotsPerInch)
|
|
30
|
+
.define_method("logical_dots_per_inch_x", &QScreen::logicalDotsPerInchX)
|
|
31
|
+
.define_method("logical_dots_per_inch_y", &QScreen::logicalDotsPerInchY)
|
|
32
|
+
.define_method("manufacturer", &QScreen::manufacturer)
|
|
33
|
+
.define_method("map_between", &QScreen::mapBetween, Arg("a"), Arg("b"), Arg("rect"))
|
|
34
|
+
.define_method("model", &QScreen::model)
|
|
35
|
+
.define_method("name", &QScreen::name)
|
|
36
|
+
.define_method("native_orientation", &QScreen::nativeOrientation)
|
|
37
|
+
.define_method("orientation", &QScreen::orientation)
|
|
38
|
+
.define_method("physical_dots_per_inch", &QScreen::physicalDotsPerInch)
|
|
39
|
+
.define_method("physical_dots_per_inch_x", &QScreen::physicalDotsPerInchX)
|
|
40
|
+
.define_method("physical_dots_per_inch_y", &QScreen::physicalDotsPerInchY)
|
|
41
|
+
.define_method("physical_size", &QScreen::physicalSize)
|
|
42
|
+
.define_method("primary_orientation", &QScreen::primaryOrientation)
|
|
43
|
+
.define_method("refresh_rate", &QScreen::refreshRate)
|
|
44
|
+
.define_method("serial_number", &QScreen::serialNumber)
|
|
45
|
+
.define_method("size", &QScreen::size)
|
|
46
|
+
.define_method("transform_between", &QScreen::transformBetween, Arg("a"), Arg("b"), Arg("target"))
|
|
47
|
+
.define_method("virtual_geometry", &QScreen::virtualGeometry)
|
|
48
|
+
.define_method("virtual_sibling_at", &QScreen::virtualSiblingAt, Arg("point"))
|
|
49
|
+
.define_method("virtual_siblings", &QScreen::virtualSiblings)
|
|
50
|
+
.define_method("virtual_size", &QScreen::virtualSize)
|
|
51
|
+
// Signals
|
|
52
|
+
.define_method("available_geometry_changed", &QScreen::availableGeometryChanged, Arg("geometry"))
|
|
53
|
+
.define_method("geometry_changed", &QScreen::geometryChanged, Arg("geometry"))
|
|
54
|
+
.define_method("logical_dots_per_inch_changed", &QScreen::logicalDotsPerInchChanged, Arg("dpi"))
|
|
55
|
+
.define_method("orientation_changed", &QScreen::orientationChanged, Arg("orientation"))
|
|
56
|
+
.define_method("physical_dots_per_inch_changed", &QScreen::physicalDotsPerInchChanged, Arg("dpi"))
|
|
57
|
+
.define_method("physical_size_changed", &QScreen::physicalSizeChanged, Arg("size"))
|
|
58
|
+
.define_method("primary_orientation_changed", &QScreen::primaryOrientationChanged, Arg("orientation"))
|
|
59
|
+
.define_method("refresh_rate_changed", &QScreen::refreshRateChanged, Arg("refresh_rate"))
|
|
60
|
+
.define_method("virtual_geometry_changed", &QScreen::virtualGeometryChanged, Arg("rect"));
|
|
61
|
+
}
|