File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
crates/cxx-qt-lib/src/gui Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ mod ffi {
1919 type QPoint = crate :: QPoint ;
2020 include ! ( "cxx-qt-lib/qrect.h" ) ;
2121 type QRect = crate :: QRect ;
22+ include ! ( "cxx-qt-lib/qstring.h" ) ;
23+ type QString = crate :: QString ;
2224
2325 include ! ( "cxx-qt-lib/qpolygon.h" ) ;
2426 type QPolygon = super :: QPolygon ;
@@ -81,6 +83,10 @@ mod ffi {
8183 #[ doc( hidden) ]
8284 #[ rust_name = "qpolygon_eq" ]
8385 fn operatorEq ( a : & QPolygon , b : & QPolygon ) -> bool ;
86+
87+ #[ doc( hidden) ]
88+ #[ rust_name = "qpolygon_to_qstring" ]
89+ fn toQString ( value : & QPolygon ) -> QString ;
8490 }
8591}
8692
@@ -131,6 +137,12 @@ impl PartialEq for QPolygon {
131137 }
132138}
133139
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+
134146impl Eq for QPolygon { }
135147
136148// Safety:
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ mod ffi {
2020 type QRectF = crate :: QRectF ;
2121 include ! ( "cxx-qt-lib/qpolygon.h" ) ;
2222 type QPolygon = crate :: QPolygon ;
23+ include ! ( "cxx-qt-lib/qstring.h" ) ;
24+ type QString = crate :: QString ;
2325
2426 include ! ( "cxx-qt-lib/qpolygonf.h" ) ;
2527 type QPolygonF = super :: QPolygonF ;
@@ -79,6 +81,10 @@ mod ffi {
7981 #[ doc( hidden) ]
8082 #[ rust_name = "qpolygonf_eq" ]
8183 fn operatorEq ( a : & QPolygonF , b : & QPolygonF ) -> bool ;
84+
85+ #[ doc( hidden) ]
86+ #[ rust_name = "qpolygonf_to_qstring" ]
87+ fn toQString ( value : & QPolygonF ) -> QString ;
8288 }
8389}
8490
@@ -120,6 +126,12 @@ impl PartialEq for QPolygonF {
120126 }
121127}
122128
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+
123135impl Eq for QPolygonF { }
124136
125137// Safety:
You can’t perform that action at this time.
0 commit comments