1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
/// C++ type: <span style='color: green;'>```QGraphicsProxyWidget```</span>
///
/// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a> class provides a proxy layer for embedding a <a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a> in a <a href="http://doc.qt.io/qt-5/qgraphicsscene.html">QGraphicsScene</a>.</p>
/// <p><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a> embeds <a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a>-based widgets, for example, a <a href="http://doc.qt.io/qt-5/qpushbutton.html">QPushButton</a>, <a href="http://doc.qt.io/qt-5/qfontcombobox.html">QFontComboBox</a>, or even <a href="http://doc.qt.io/qt-5/qfiledialog.html">QFileDialog</a>, into <a href="http://doc.qt.io/qt-5/qgraphicsscene.html">QGraphicsScene</a>. It forwards events between the two objects and translates between <a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a>'s integer-based geometry and <a href="http://doc.qt.io/qt-5/graphicsview.html#qgraphicswidget">QGraphicsWidget</a>'s qreal-based geometry. <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a> supports all core features of <a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a>, including tab focus, keyboard input, Drag &amp; Drop, and popups. You can also embed complex widgets, e.g., widgets with subwidgets.</p>
/// <p>Example:</p>
/// <pre class="cpp">
///   <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span><span class="operator">*</span>argv)
///   {
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
///
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qtabwidget.html">QTabWidget</a></span> <span class="operator">*</span>tabWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="http://doc.qt.io/qt-5/qtabwidget.html">QTabWidget</a></span>;
///
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qgraphicsscene.html">QGraphicsScene</a></span> scene;
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#QGraphicsProxyWidget">QGraphicsProxyWidget</a></span> <span class="operator">*</span>proxy <span class="operator">=</span> scene<span class="operator">.</span>addWidget(tabWidget);
///
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qgraphicsview.html">QGraphicsView</a></span> view(<span class="operator">&amp;</span>scene);
/// &#32;     view<span class="operator">.</span>show();
///
/// &#32;     <span class="keyword">return</span> app<span class="operator">.</span>exec();
///   }
///
/// </pre>
/// <p><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a> takes care of automatically embedding popup children of embedded widgets through creating a child proxy for each popup. This means that when an embedded <a href="http://doc.qt.io/qt-5/qcombobox.html">QComboBox</a> shows its popup list, a new <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a> is created automatically, embedding the popup, and positioning it correctly. This only works if the popup is child of the embedded widget (for example <a href="http://doc.qt.io/qt-5/qtoolbutton.html#setMenu">QToolButton::setMenu</a>() requires the <a href="http://doc.qt.io/qt-5/qmenu.html">QMenu</a> instance to be child of the <a href="http://doc.qt.io/qt-5/qtoolbutton.html">QToolButton</a>).</p>
/// <a name="embedding-a-widget-with-qgraphicsproxywidget"></a></div>
#[repr(C)]
pub struct GraphicsProxyWidget(u8);

impl GraphicsProxyWidget {
  /// C++ method: <span style='color: green;'>```QGraphicsProxyWidget* QGraphicsProxyWidget::createProxyForChildWidget(QWidget* child)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#createProxyForChildWidget">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a proxy widget for the given <i>child</i> of the widget contained in this proxy.</p>
  /// <p>This function makes it possible to acquire proxies for non top-level widgets. For instance, you can embed a dialog, and then transform only one of its widgets.</p>
  /// <p>If the widget is already embedded, return the existing proxy widget.</p>
  /// <p>This function was introduced in  Qt 4.5.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#newProxyWidget">newProxyWidget</a>() and <a href="http://doc.qt.io/qt-5/qgraphicsscene.html#addWidget">QGraphicsScene::addWidget</a>().</p></div>
  pub unsafe fn create_proxy_for_child_widget(&mut self,
                                              child: *mut ::widget::Widget)
                                              -> *mut ::graphics_proxy_widget::GraphicsProxyWidget {
    ::ffi::qt_widgets_c_QGraphicsProxyWidget_createProxyForChildWidget(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget, child)
  }

  /// C++ method: <span style='color: green;'>```virtual const QMetaObject* QGraphicsProxyWidget::metaObject() const```</span>
  ///
  ///
  pub fn meta_object(&self) -> *const ::qt_core::meta_object::MetaObject {
    unsafe {
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_metaObject(self as *const ::graphics_proxy_widget::GraphicsProxyWidget)
    }
  }

  /// C++ method: <span style='color: green;'>```[constructor] void QGraphicsProxyWidget::QGraphicsProxyWidget()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#QGraphicsProxyWidget">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a new QGraphicsProxy widget. <i>parent</i> and <i>wFlags</i> are passed to <a href="http://doc.qt.io/qt-5/qgraphicsitem.html">QGraphicsItem</a>'s constructor.</p></div>
  pub fn new() -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_new_no_args() };
    unsafe { ::cpp_utils::CppBox::new(ffi_result) }
  }

  /// C++ method: <span style='color: green;'>```QGraphicsProxyWidget::QGraphicsProxyWidget```</span>
  ///
  /// This is an overloaded function. Available variants:
  ///
  ///
  ///
  /// ## Variant 1
  ///
  /// Rust arguments: ```fn new_unsafe(*mut ::graphics_item::GraphicsItem) -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget>```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QGraphicsProxyWidget::QGraphicsProxyWidget(QGraphicsItem* parent = ?)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#QGraphicsProxyWidget">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a new QGraphicsProxy widget. <i>parent</i> and <i>wFlags</i> are passed to <a href="http://doc.qt.io/qt-5/qgraphicsitem.html">QGraphicsItem</a>'s constructor.</p></div>
  ///
  /// ## Variant 2
  ///
  /// Rust arguments: ```fn new_unsafe((*mut ::graphics_item::GraphicsItem, ::qt_core::flags::Flags<::qt_core::qt::WindowType>)) -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget>```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QGraphicsProxyWidget::QGraphicsProxyWidget(QGraphicsItem* parent = ?, QFlags<Qt::WindowType> wFlags = ?)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#QGraphicsProxyWidget">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a new QGraphicsProxy widget. <i>parent</i> and <i>wFlags</i> are passed to <a href="http://doc.qt.io/qt-5/qgraphicsitem.html">QGraphicsItem</a>'s constructor.</p></div>
  pub unsafe fn new_unsafe<Args>(args: Args) -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget>
    where Args: overloading::GraphicsProxyWidgetNewUnsafeArgs
  {
    args.exec()
  }
  /// C++ method: <span style='color: green;'>```virtual void QGraphicsProxyWidget::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#paint">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Reimplemented from <a href="http://doc.qt.io/qt-5/qgraphicsitem.html#paint">QGraphicsItem::paint</a>().</p></div>
  pub unsafe fn paint(&mut self,
                      painter: *mut ::qt_gui::painter::Painter,
                      option: *const ::style_option_graphics_item::StyleOptionGraphicsItem,
                      widget: *mut ::widget::Widget) {
    ::ffi::qt_widgets_c_QGraphicsProxyWidget_paint(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget,
                                                   painter,
                                                   option,
                                                   widget)
  }

  /// C++ method: <span style='color: green;'>```virtual int QGraphicsProxyWidget::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)```</span>
  ///
  ///
  pub unsafe fn qt_metacall(&mut self,
                            arg1: ::qt_core::meta_object::Call,
                            arg2: ::libc::c_int,
                            arg3: *mut *mut ::libc::c_void)
                            -> ::libc::c_int {
    ::ffi::qt_widgets_c_QGraphicsProxyWidget_qt_metacall(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget,
                                                         arg1,
                                                         arg2,
                                                         arg3)
  }

  /// C++ method: <span style='color: green;'>```virtual void* QGraphicsProxyWidget::qt_metacast(const char* arg1)```</span>
  ///
  ///
  pub unsafe fn qt_metacast(&mut self, arg1: *const ::libc::c_char) -> *mut ::libc::c_void {
    ::ffi::qt_widgets_c_QGraphicsProxyWidget_qt_metacast(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget,
                                                         arg1)
  }

  /// C++ method: <span style='color: green;'>```virtual void QGraphicsProxyWidget::setGeometry(const QRectF& rect)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#setGeometry">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Reimplemented from <a href="http://doc.qt.io/qt-5/qgraphicslayoutitem.html#setGeometry">QGraphicsLayoutItem::setGeometry</a>().</p></div>
  pub fn set_geometry(&mut self, rect: &::qt_core::rect_f::RectF) {
    unsafe {
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_setGeometry(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget,
                                                           rect as *const ::qt_core::rect_f::RectF)
    }
  }

  /// C++ method: <span style='color: green;'>```void QGraphicsProxyWidget::setWidget(QWidget* widget)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#setWidget">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Embeds <i>widget</i> into this proxy widget. The embedded widget must reside exclusively either inside or outside of Graphics View. You cannot embed a widget as long as it is is visible elsewhere in the UI, at the same time.</p>
  /// <p><i>widget</i> must be a top-level widget whose parent is 0.</p>
  /// <p>When the widget is embedded, its state (e.g., visible, enabled, geometry, size hints) is copied into the proxy widget. If the embedded widget is explicitly hidden or disabled, the proxy widget will become explicitly hidden or disabled after embedding is complete. The class documentation has a full overview over the shared state.</p>
  /// <p><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a>'s window flags determine whether the widget, after embedding, will be given window decorations or not.</p>
  /// <p>After this function returns, <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html">QGraphicsProxyWidget</a> will keep its state synchronized with that of <i>widget</i> whenever possible.</p>
  /// <p>If a widget is already embedded by this proxy when this function is called, that widget will first be automatically unembedded. Passing 0 for the <i>widget</i> argument will only unembed the widget, and the ownership of the currently embedded widget will be passed on to the caller. Every child widget that are embedded will also be embedded and their proxy widget destroyed.</p>
  /// <p>Note that widgets with the <a href="http://doc.qt.io/qt-5/qt.html#WidgetAttribute-enum">Qt::WA_PaintOnScreen</a> widget attribute set and widgets that wrap an external application or controller cannot be embedded. Examples are QGLWidget and QAxWidget.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#widget">widget</a>().</p></div>
  pub unsafe fn set_widget(&mut self, widget: *mut ::widget::Widget) {
    ::ffi::qt_widgets_c_QGraphicsProxyWidget_setWidget(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget,
                                                       widget)
  }

  /// C++ method: <span style='color: green;'>```QRectF QGraphicsProxyWidget::subWidgetRect(const QWidget* widget) const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#subWidgetRect">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the rectangle for <i>widget</i>, which must be a descendant of <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#widget">widget</a>(), or <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#widget">widget</a>() itself, in this proxy item's local coordinates.</p>
  /// <p>If no widget is embedded, <i>widget</i> is 0, or <i>widget</i> is not a descendant of the embedded widget, this function returns an empty <a href="http://doc.qt.io/qt-5/qrectf.html">QRectF</a>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#widget">widget</a>().</p></div>
  pub unsafe fn sub_widget_rect(&self, widget: *const ::widget::Widget) -> ::qt_core::rect_f::RectF {
    {
      let mut object: ::qt_core::rect_f::RectF =
        ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_subWidgetRect_to_output(self as *const ::graphics_proxy_widget::GraphicsProxyWidget, widget, &mut object);
      object
    }
  }

  /// C++ method: <span style='color: green;'>```static QString QGraphicsProxyWidget::tr(const char* s, const char* c, int n)```</span>
  ///
  ///
  pub unsafe fn tr(s: *const ::libc::c_char, c: *const ::libc::c_char, n: ::libc::c_int) -> ::qt_core::string::String {
    {
      let mut object: ::qt_core::string::String =
        ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_tr_to_output(s, c, n, &mut object);
      object
    }
  }

  /// C++ method: <span style='color: green;'>```static QString QGraphicsProxyWidget::trUtf8(const char* s, const char* c, int n)```</span>
  ///
  ///
  pub unsafe fn tr_utf8(s: *const ::libc::c_char,
                        c: *const ::libc::c_char,
                        n: ::libc::c_int)
                        -> ::qt_core::string::String {
    {
      let mut object: ::qt_core::string::String =
        ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_trUtf8_to_output(s, c, n, &mut object);
      object
    }
  }

  /// C++ method: <span style='color: green;'>```virtual int QGraphicsProxyWidget::type() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#type">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Reimplemented from <a href="http://doc.qt.io/qt-5/qgraphicsitem.html#type">QGraphicsItem::type</a>().</p></div>
  pub fn type_(&self) -> ::libc::c_int {
    unsafe {
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_type(self as *const ::graphics_proxy_widget::GraphicsProxyWidget)
    }
  }

  /// C++ method: <span style='color: green;'>```QWidget* QGraphicsProxyWidget::widget() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#widget">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns a pointer to the embedded widget.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qgraphicsproxywidget.html#setWidget">setWidget</a>().</p></div>
  pub fn widget(&self) -> *mut ::widget::Widget {
    unsafe {
      ::ffi::qt_widgets_c_QGraphicsProxyWidget_widget(self as *const ::graphics_proxy_widget::GraphicsProxyWidget)
    }
  }
}

impl ::cpp_utils::CppDeletable for ::graphics_proxy_widget::GraphicsProxyWidget {
  fn deleter() -> ::cpp_utils::Deleter<Self> {
    ::ffi::qt_widgets_c_QGraphicsProxyWidget_delete
  }
}

/// Types for accessing built-in Qt signals and slots present in this module
pub mod connection {
  use ::cpp_utils::StaticCast;
  /// Provides access to built-in Qt signals of `GraphicsProxyWidget`.
  pub struct Signals<'a>(&'a ::graphics_proxy_widget::GraphicsProxyWidget);
  /// Represents a built-in Qt signal `QGraphicsProxyWidget::layoutChanged`.
  ///
  /// An object of this type can be created from `GraphicsProxyWidget` with `object.signals().layout_changed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
  ///
  /// An object of this type contains a reference to the original `GraphicsProxyWidget` object.
  pub struct LayoutChanged<'a>(&'a ::graphics_proxy_widget::GraphicsProxyWidget);
  impl<'a> ::qt_core::connection::Receiver for LayoutChanged<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"2layoutChanged()\0"
    }
  }
  impl<'a> ::qt_core::connection::Signal for LayoutChanged<'a> {}
  /// Represents a built-in Qt signal `QGraphicsProxyWidget::geometryChanged`.
  ///
  /// An object of this type can be created from `GraphicsProxyWidget` with `object.signals().geometry_changed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
  ///
  /// An object of this type contains a reference to the original `GraphicsProxyWidget` object.
  pub struct GeometryChanged<'a>(&'a ::graphics_proxy_widget::GraphicsProxyWidget);
  impl<'a> ::qt_core::connection::Receiver for GeometryChanged<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"2geometryChanged()\0"
    }
  }
  impl<'a> ::qt_core::connection::Signal for GeometryChanged<'a> {}
  impl<'a> Signals<'a> {
    /// Returns an object representing a built-in Qt signal `QGraphicsProxyWidget::layoutChanged`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn layout_changed(&self) -> LayoutChanged {
      LayoutChanged(self.0)
    }
    /// Returns an object representing a built-in Qt signal `QGraphicsProxyWidget::geometryChanged`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn geometry_changed(&self) -> GeometryChanged {
      GeometryChanged(self.0)
    }
  }
  /// Provides access to built-in Qt slots of `GraphicsProxyWidget`.
  pub struct Slots<'a>(&'a ::graphics_proxy_widget::GraphicsProxyWidget);
  /// Represents a built-in Qt slot `QGraphicsProxyWidget::close`.
  ///
  /// An object of this type can be created from `GraphicsProxyWidget` with `object.slots().close()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
  ///
  /// An object of this type contains a reference to the original `GraphicsProxyWidget` object.
  pub struct Close<'a>(&'a ::graphics_proxy_widget::GraphicsProxyWidget);
  impl<'a> ::qt_core::connection::Receiver for Close<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1close()\0"
    }
  }
  /// Represents a built-in Qt slot `QGraphicsProxyWidget::newProxyWidget`.
  ///
  /// An object of this type can be created from `GraphicsProxyWidget` with `object.slots().new_proxy_widget()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
  ///
  /// An object of this type contains a reference to the original `GraphicsProxyWidget` object.
  pub struct NewProxyWidget<'a>(&'a ::graphics_proxy_widget::GraphicsProxyWidget);
  impl<'a> ::qt_core::connection::Receiver for NewProxyWidget<'a> {
    type Arguments = (*const ::widget::Widget,);
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1newProxyWidget(const QWidget*)\0"
    }
  }
  impl<'a> Slots<'a> {
    /// Returns an object representing a built-in Qt slot `QGraphicsProxyWidget::close`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn close(&self) -> Close {
      Close(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QGraphicsProxyWidget::newProxyWidget`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn new_proxy_widget(&self) -> NewProxyWidget {
      NewProxyWidget(self.0)
    }
  }
  impl ::graphics_proxy_widget::GraphicsProxyWidget {
    /// Provides access to built-in Qt signals of this type
    pub fn signals(&self) -> Signals {
      Signals(self)
    }
    /// Provides access to built-in Qt slots of this type
    pub fn slots(&self) -> Slots {
      Slots(self)
    }
  }

}

impl ::cpp_utils::DynamicCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_item::GraphicsItem {
  fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsItem(self as *mut ::graphics_item::GraphicsItem) };
    unsafe { ffi_result.as_mut() }
  }

  fn dynamic_cast(&self) -> ::std::option::Option<&::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsItem(self as *const ::graphics_item::GraphicsItem as *mut ::graphics_item::GraphicsItem) };
    unsafe { ffi_result.as_ref() }
  }
}

impl ::cpp_utils::DynamicCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_layout_item::GraphicsLayoutItem {
fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::graphics_proxy_widget::GraphicsProxyWidget> {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsLayoutItem(self as *mut ::graphics_layout_item::GraphicsLayoutItem) };
unsafe { ffi_result.as_mut() }}

fn dynamic_cast(&self) -> ::std::option::Option<&::graphics_proxy_widget::GraphicsProxyWidget> {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsLayoutItem(self as *const ::graphics_layout_item::GraphicsLayoutItem as *mut ::graphics_layout_item::GraphicsLayoutItem) };
unsafe { ffi_result.as_ref() }}

}

impl ::cpp_utils::DynamicCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_object::GraphicsObject {
  fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsObject(self as *mut ::graphics_object::GraphicsObject) };
    unsafe { ffi_result.as_mut() }
  }

  fn dynamic_cast(&self) -> ::std::option::Option<&::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsObject(self as *const ::graphics_object::GraphicsObject as *mut ::graphics_object::GraphicsObject) };
    unsafe { ffi_result.as_ref() }
  }
}

impl ::cpp_utils::DynamicCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_widget::GraphicsWidget {
  fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsWidget(self as *mut ::graphics_widget::GraphicsWidget) };
    unsafe { ffi_result.as_mut() }
  }

  fn dynamic_cast(&self) -> ::std::option::Option<&::graphics_proxy_widget::GraphicsProxyWidget> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_dynamic_cast_QGraphicsProxyWidget_ptr_QGraphicsWidget(self as *const ::graphics_widget::GraphicsWidget as *mut ::graphics_widget::GraphicsWidget) };
    unsafe { ffi_result.as_ref() }
  }
}

impl ::cpp_utils::StaticCast<::qt_core::object::Object> for ::graphics_proxy_widget::GraphicsProxyWidget {
  fn static_cast_mut(&mut self) -> &mut ::qt_core::object::Object {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QObject_ptr(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::qt_core::object::Object {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QObject_ptr(self as *const ::graphics_proxy_widget::GraphicsProxyWidget as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::StaticCast<::graphics_item::GraphicsItem> for ::graphics_proxy_widget::GraphicsProxyWidget {
  fn static_cast_mut(&mut self) -> &mut ::graphics_item::GraphicsItem {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsItem_ptr(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::graphics_item::GraphicsItem {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsItem_ptr(self as *const ::graphics_proxy_widget::GraphicsProxyWidget as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::StaticCast<::graphics_layout_item::GraphicsLayoutItem> for ::graphics_proxy_widget::GraphicsProxyWidget {
fn static_cast_mut(&mut self) -> &mut ::graphics_layout_item::GraphicsLayoutItem {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsLayoutItem_ptr(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")}

fn static_cast(&self) -> &::graphics_layout_item::GraphicsLayoutItem {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsLayoutItem_ptr(self as *const ::graphics_proxy_widget::GraphicsProxyWidget as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")}

}

impl ::cpp_utils::StaticCast<::graphics_object::GraphicsObject> for ::graphics_proxy_widget::GraphicsProxyWidget {
  fn static_cast_mut(&mut self) -> &mut ::graphics_object::GraphicsObject {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsObject_ptr(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::graphics_object::GraphicsObject {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsObject_ptr(self as *const ::graphics_proxy_widget::GraphicsProxyWidget as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::StaticCast<::graphics_widget::GraphicsWidget> for ::graphics_proxy_widget::GraphicsProxyWidget {
  fn static_cast_mut(&mut self) -> &mut ::graphics_widget::GraphicsWidget {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsWidget_ptr(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::graphics_widget::GraphicsWidget {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsWidget_ptr(self as *const ::graphics_proxy_widget::GraphicsProxyWidget as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_item::GraphicsItem {
  unsafe fn static_cast_mut(&mut self) -> &mut ::graphics_proxy_widget::GraphicsProxyWidget {
    let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsItem(self as *mut ::graphics_item::GraphicsItem);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::graphics_proxy_widget::GraphicsProxyWidget {
    let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsItem(self as *const ::graphics_item::GraphicsItem as *mut ::graphics_item::GraphicsItem);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_layout_item::GraphicsLayoutItem {
unsafe fn static_cast_mut(&mut self) -> &mut ::graphics_proxy_widget::GraphicsProxyWidget {
let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsLayoutItem(self as *mut ::graphics_layout_item::GraphicsLayoutItem);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")}

unsafe fn static_cast(&self) -> &::graphics_proxy_widget::GraphicsProxyWidget {
let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsLayoutItem(self as *const ::graphics_layout_item::GraphicsLayoutItem as *mut ::graphics_layout_item::GraphicsLayoutItem);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")}

}

impl ::cpp_utils::UnsafeStaticCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_object::GraphicsObject {
unsafe fn static_cast_mut(&mut self) -> &mut ::graphics_proxy_widget::GraphicsProxyWidget {
let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsObject(self as *mut ::graphics_object::GraphicsObject);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")}

unsafe fn static_cast(&self) -> &::graphics_proxy_widget::GraphicsProxyWidget {
let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsObject(self as *const ::graphics_object::GraphicsObject as *mut ::graphics_object::GraphicsObject);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")}

}

impl ::cpp_utils::UnsafeStaticCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::graphics_widget::GraphicsWidget {
unsafe fn static_cast_mut(&mut self) -> &mut ::graphics_proxy_widget::GraphicsProxyWidget {
let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsWidget(self as *mut ::graphics_widget::GraphicsWidget);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")}

unsafe fn static_cast(&self) -> &::graphics_proxy_widget::GraphicsProxyWidget {
let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QGraphicsWidget(self as *const ::graphics_widget::GraphicsWidget as *mut ::graphics_widget::GraphicsWidget);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")}

}

impl ::cpp_utils::UnsafeStaticCast<::graphics_proxy_widget::GraphicsProxyWidget> for ::qt_core::object::Object {
  unsafe fn static_cast_mut(&mut self) -> &mut ::graphics_proxy_widget::GraphicsProxyWidget {
    let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QObject(self as *mut ::qt_core::object::Object);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::graphics_proxy_widget::GraphicsProxyWidget {
    let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsProxyWidget_ptr_QObject(self as *const ::qt_core::object::Object as *mut ::qt_core::object::Object);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::Deref for ::graphics_proxy_widget::GraphicsProxyWidget {
  type Target = ::graphics_widget::GraphicsWidget;
  fn deref(&self) -> &::graphics_widget::GraphicsWidget {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsWidget_ptr(self as *const ::graphics_proxy_widget::GraphicsProxyWidget as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::DerefMut for ::graphics_proxy_widget::GraphicsProxyWidget {
  fn deref_mut(&mut self) -> &mut ::graphics_widget::GraphicsWidget {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QGraphicsProxyWidget_G_static_cast_QGraphicsWidget_ptr(self as *mut ::graphics_proxy_widget::GraphicsProxyWidget) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }
}

/// Types for emulating overloading for overloaded functions in this module
pub mod overloading {
  /// This trait represents a set of arguments accepted by [GraphicsProxyWidget::new_unsafe](../struct.GraphicsProxyWidget.html#method.new_unsafe) method.
  pub trait GraphicsProxyWidgetNewUnsafeArgs {
    unsafe fn exec(self) -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget>;
  }
  impl GraphicsProxyWidgetNewUnsafeArgs for *mut ::graphics_item::GraphicsItem {
    unsafe fn exec(self) -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget> {
      let parent = self;
      let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_new_parent(parent);
      ::cpp_utils::CppBox::new(ffi_result)
    }
  }
  impl GraphicsProxyWidgetNewUnsafeArgs
    for (*mut ::graphics_item::GraphicsItem, ::qt_core::flags::Flags<::qt_core::qt::WindowType>) {
    unsafe fn exec(self) -> ::cpp_utils::CppBox<::graphics_proxy_widget::GraphicsProxyWidget> {
      let parent = self.0;
      let w_flags = self.1;
      let ffi_result = ::ffi::qt_widgets_c_QGraphicsProxyWidget_new_parent_wFlags(parent,
                                                                                  w_flags.to_int() as ::libc::c_uint);
      ::cpp_utils::CppBox::new(ffi_result)
    }
  }
}