File tree 2 files changed +24
-0
lines changed
crates/cxx-qt-lib/src/gui
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ mod ffi {
19
19
type QPoint = crate :: QPoint ;
20
20
include ! ( "cxx-qt-lib/qrect.h" ) ;
21
21
type QRect = crate :: QRect ;
22
+ include ! ( "cxx-qt-lib/qstring.h" ) ;
23
+ type QString = crate :: QString ;
22
24
23
25
include ! ( "cxx-qt-lib/qpolygon.h" ) ;
24
26
type QPolygon = super :: QPolygon ;
@@ -81,6 +83,10 @@ mod ffi {
81
83
#[ doc( hidden) ]
82
84
#[ rust_name = "qpolygon_eq" ]
83
85
fn operatorEq ( a : & QPolygon , b : & QPolygon ) -> bool ;
86
+
87
+ #[ doc( hidden) ]
88
+ #[ rust_name = "qpolygon_to_qstring" ]
89
+ fn toQString ( value : & QPolygon ) -> QString ;
84
90
}
85
91
}
86
92
@@ -131,6 +137,12 @@ impl PartialEq for QPolygon {
131
137
}
132
138
}
133
139
140
+ impl std:: fmt:: Display for QPolygon {
141
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
142
+ write ! ( f, "{}" , ffi:: qpolygon_to_qstring( self ) )
143
+ }
144
+ }
145
+
134
146
impl Eq for QPolygon { }
135
147
136
148
// Safety:
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ mod ffi {
20
20
type QRectF = crate :: QRectF ;
21
21
include ! ( "cxx-qt-lib/qpolygon.h" ) ;
22
22
type QPolygon = crate :: QPolygon ;
23
+ include ! ( "cxx-qt-lib/qstring.h" ) ;
24
+ type QString = crate :: QString ;
23
25
24
26
include ! ( "cxx-qt-lib/qpolygonf.h" ) ;
25
27
type QPolygonF = super :: QPolygonF ;
@@ -79,6 +81,10 @@ mod ffi {
79
81
#[ doc( hidden) ]
80
82
#[ rust_name = "qpolygonf_eq" ]
81
83
fn operatorEq ( a : & QPolygonF , b : & QPolygonF ) -> bool ;
84
+
85
+ #[ doc( hidden) ]
86
+ #[ rust_name = "qpolygonf_to_qstring" ]
87
+ fn toQString ( value : & QPolygonF ) -> QString ;
82
88
}
83
89
}
84
90
@@ -120,6 +126,12 @@ impl PartialEq for QPolygonF {
120
126
}
121
127
}
122
128
129
+ impl std:: fmt:: Display for QPolygonF {
130
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
131
+ write ! ( f, "{}" , ffi:: qpolygonf_to_qstring( self ) )
132
+ }
133
+ }
134
+
123
135
impl Eq for QPolygonF { }
124
136
125
137
// Safety:
You can’t perform that action at this time.
0 commit comments