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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
/// C++ type: <span style='color: green;'>```QBrush```</span>
///
/// <a href="http://doc.qt.io/qt-5/qbrush.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qbrush.html">QBrush</a> class defines the fill pattern of shapes drawn by <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a>.</p>
/// <p>A brush has a style, a color, a gradient and a texture.</p>
/// <p>The brush <a href="http://doc.qt.io/qt-5/qbrush.html#style">style</a>() defines the fill pattern using the <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::BrushStyle</a> enum. The default brush style is <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::NoBrush</a> (depending on how you construct a brush). This style tells the painter to not fill shapes. The standard style for filling is <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::SolidPattern</a>. The style can be set when the brush is created using the appropriate constructor, and in addition the <a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>() function provides means for altering the style once the brush is constructed.</p>
/// <p class="centerAlign"><img src="http://doc.qt.io/qt-5/images/brush-styles.png" alt="Brush Styles"></img></p><p>The brush <a href="http://doc.qt.io/qt-5/qbrush.html#color">color</a>() defines the color of the fill pattern. The color can either be one of Qt's predefined colors, <a href="http://doc.qt.io/qt-5/qt.html#GlobalColor-enum">Qt::GlobalColor</a>, or any other custom <a href="http://doc.qt.io/qt-5/qcolor.html">QColor</a>. The currently set color can be retrieved and altered using the <a href="http://doc.qt.io/qt-5/qbrush.html#color">color</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() functions, respectively.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/qbrush.html#gradient">gradient</a>() defines the gradient fill used when the current style is either <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::LinearGradientPattern</a>, <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::RadialGradientPattern</a> or <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::ConicalGradientPattern</a>. Gradient brushes are created by giving a <a href="http://doc.qt.io/qt-5/qgradient.html">QGradient</a> as a constructor argument when creating the <a href="http://doc.qt.io/qt-5/qbrush.html">QBrush</a>. Qt provides three different gradients: <a href="http://doc.qt.io/qt-5/qlineargradient.html">QLinearGradient</a>, <a href="http://doc.qt.io/qt-5/qconicalgradient.html">QConicalGradient</a>, and <a href="http://doc.qt.io/qt-5/qradialgradient.html">QRadialGradient</a> - all of which inherit <a href="http://doc.qt.io/qt-5/qgradient.html">QGradient</a>.</p>
/// <pre class="cpp">
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qradialgradient.html">QRadialGradient</a></span> gradient(<span class="number">50</span><span class="operator">,</span> <span class="number">50</span><span class="operator">,</span> <span class="number">50</span><span class="operator">,</span> <span class="number">50</span><span class="operator">,</span> <span class="number">50</span>);
/// &#32;     gradient<span class="operator">.</span>setColorAt(<span class="number">0</span><span class="operator">,</span> <span class="type"><a href="http://doc.qt.io/qt-5/qcolor.html">QColor</a></span><span class="operator">::</span>fromRgbF(<span class="number">0</span><span class="operator">,</span> <span class="number">1</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">1</span>));
/// &#32;     gradient<span class="operator">.</span>setColorAt(<span class="number">1</span><span class="operator">,</span> <span class="type"><a href="http://doc.qt.io/qt-5/qcolor.html">QColor</a></span><span class="operator">::</span>fromRgbF(<span class="number">0</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">0</span>));
///
/// &#32;     <span class="type"><a href="http://doc.qt.io/qt-5/qbrush.html#QBrush">QBrush</a></span> brush(gradient);
///
/// </pre>
/// <p>The <a href="http://doc.qt.io/qt-5/qbrush.html#texture">texture</a>() defines the pixmap used when the current style is <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>. You can create a brush with a texture by providing the pixmap when the brush is created or by using <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>().</p>
/// <p>Note that applying <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>() makes <a href="http://doc.qt.io/qt-5/qbrush.html#style">style</a>() == <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>, regardless of previous style settings. Also, calling <a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() will not make a difference if the style is a gradient. The same is the case if the style is <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a> style unless the current texture is a <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a>.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/qbrush.html#isOpaque">isOpaque</a>() function returns <code>true</code> if the brush is fully opaque otherwise false. A brush is considered opaque if:</p>
/// <ul>
/// <li>The alpha component of the <a href="http://doc.qt.io/qt-5/qbrush.html#color">color</a>() is 255.</li>
/// <li>Its <a href="http://doc.qt.io/qt-5/qbrush.html#texture">texture</a>() does not have an alpha channel and is not a <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a>.</li>
/// <li>The colors in the <a href="http://doc.qt.io/qt-5/qbrush.html#gradient">gradient</a>() all have an alpha component that is 255.</li>
/// </ul>
/// <div class="table"><table class="generic" width="100%">
///  <tbody><tr valign="top" class="odd"><td><img src="http://doc.qt.io/qt-5/images/brush-outline.png" alt="Outlines"></img></td><td>To specify the style and color of lines and outlines, use the <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a>'s <a href="http://doc.qt.io/qt-5/qpen.html">pen</a> combined with <a href="http://doc.qt.io/qt-5/qt.html#PenStyle-enum">Qt::PenStyle</a> and <a href="http://doc.qt.io/qt-5/qt.html#GlobalColor-enum">Qt::GlobalColor</a>:<pre class="cpp">
///   <span class="type"><a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
///
///   painter<span class="operator">.</span>setBrush(<span class="type">Qt</span><span class="operator">::</span>cyan);
///   painter<span class="operator">.</span>setPen(<span class="type">Qt</span><span class="operator">::</span>darkCyan);
///   painter<span class="operator">.</span>drawRect(<span class="number">0</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">100</span><span class="operator">,</span><span class="number">100</span>);
///
///   painter<span class="operator">.</span>setBrush(<span class="type">Qt</span><span class="operator">::</span>NoBrush);
///   painter<span class="operator">.</span>setPen(<span class="type">Qt</span><span class="operator">::</span>darkGreen);
///   painter<span class="operator">.</span>drawRect(<span class="number">40</span><span class="operator">,</span> <span class="number">40</span><span class="operator">,</span> <span class="number">100</span><span class="operator">,</span> <span class="number">100</span>);
///
/// </pre>
/// <p>Note that, by default, <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a> renders the outline (using the currently set pen) when drawing shapes. Use <a href="http://doc.qt.io/qt-5/qt.html#PenStyle-enum"><code>painter.setPen(Qt::NoPen)</code></a> to disable this behavior.</p>
/// </td></tr>
/// </tbody></table></div>
/// <p>For more information about painting in general, see the <a href="http://doc.qt.io/qt-5/paintsystem.html">Paint System</a>.</p></div>
#[repr(C)]
pub struct Brush([u8; ::type_sizes::QT_GUI_BRUSH_BRUSH]);

impl ::cpp_utils::new_uninitialized::NewUninitialized for Brush {
  unsafe fn new_uninitialized() -> Brush {
    Brush(::std::mem::uninitialized())
  }
}

impl Brush {
  /// C++ method: <span style='color: green;'>```QVariant QBrush::operator QVariant() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#operator-QVariant">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the brush as a <a href="http://doc.qt.io/qt-5/qvariant.html">QVariant</a></p></div>
  pub fn as_q_variant(&self) -> ::qt_core::variant::Variant {
    {
      let mut object: ::qt_core::variant::Variant =
        unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
      unsafe {
        ::ffi::qt_gui_c_QBrush_convert_to_QVariant_to_output(self as *const ::brush::Brush, &mut object);
      }
      object
    }
  }

  /// C++ method: <span style='color: green;'>```const QColor& QBrush::color() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#color">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the brush color.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>().</p></div>
  pub fn color<'l0>(&'l0 self) -> &'l0 ::color::Color {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QBrush_color(self as *const ::brush::Brush) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```const QGradient* QBrush::gradient() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#gradient">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the gradient describing this brush.</p></div>
  pub fn gradient(&self) -> *const ::gradient::Gradient {
    unsafe { ::ffi::qt_gui_c_QBrush_gradient(self as *const ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```bool QBrush::isDetached() const```</span>
  ///
  ///
  pub fn is_detached(&self) -> bool {
    unsafe { ::ffi::qt_gui_c_QBrush_isDetached(self as *const ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```bool QBrush::isOpaque() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#isOpaque">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns <code>true</code> if the brush is fully opaque otherwise false. A brush is considered opaque if:</p>
  /// <ul>
  /// <li>The alpha component of the <a href="http://doc.qt.io/qt-5/qbrush.html#color">color</a>() is 255.</li>
  /// <li>Its <a href="http://doc.qt.io/qt-5/qbrush.html#texture">texture</a>() does not have an alpha channel and is not a <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a>.</li>
  /// <li>The colors in the <a href="http://doc.qt.io/qt-5/qbrush.html#gradient">gradient</a>() all have an alpha component that is 255.</li>
  /// <li>It is an extended radial gradient.</li>
  /// </ul></div>
  pub fn is_opaque(&self) -> bool {
    unsafe { ::ffi::qt_gui_c_QBrush_isOpaque(self as *const ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```const QMatrix& QBrush::matrix() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#matrix">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the current transformation matrix for the brush.</p>
  /// <p>This function was introduced in  Qt 4.2.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setMatrix">setMatrix</a>().</p></div>
  pub fn matrix<'l0>(&'l0 self) -> &'l0 ::matrix::Matrix {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QBrush_matrix(self as *const ::brush::Brush) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```QBrush::QBrush```</span>
  ///
  /// This is an overloaded function. Available variants:
  ///
  ///
  ///
  /// ## Variant 1
  ///
  /// Rust arguments: ```fn new(()) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a default black brush with the style <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::NoBrush</a> (i.e. this brush will not fill shapes).</p></div>
  ///
  /// ## Variant 2
  ///
  /// Rust arguments: ```fn new(::qt_core::qt::BrushStyle) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(Qt::BrushStyle bs)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a black brush with the given <i>style</i>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>().</p></div>
  ///
  /// ## Variant 3
  ///
  /// Rust arguments: ```fn new(::qt_core::qt::GlobalColor) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(Qt::GlobalColor color)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-3">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with the given <i>color</i> and <i>style</i>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>().</p></div>
  ///
  /// ## Variant 4
  ///
  /// Rust arguments: ```fn new((::qt_core::qt::GlobalColor, ::qt_core::qt::BrushStyle)) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(Qt::GlobalColor color, Qt::BrushStyle bs = ?)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-3">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with the given <i>color</i> and <i>style</i>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>().</p></div>
  ///
  /// ## Variant 5
  ///
  /// Rust arguments: ```fn new((::qt_core::qt::GlobalColor, &::pixmap::Pixmap)) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(Qt::GlobalColor color, const QPixmap& pixmap)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-5">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with the given <i>color</i> and the custom pattern stored in <i>pixmap</i>.</p>
  /// <p>The style is set to <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>. The color will only have an effect for QBitmaps.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>().</p></div>
  ///
  /// ## Variant 6
  ///
  /// Rust arguments: ```fn new(&::brush::Brush) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QBrush& brush)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-8">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a copy of <i>other</i>.</p></div>
  ///
  /// ## Variant 7
  ///
  /// Rust arguments: ```fn new(&::color::Color) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QColor& color)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-2">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with the given <i>color</i> and <i>style</i>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>().</p></div>
  ///
  /// ## Variant 8
  ///
  /// Rust arguments: ```fn new((&::color::Color, ::qt_core::qt::BrushStyle)) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QColor& color, Qt::BrushStyle bs = ?)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-2">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with the given <i>color</i> and <i>style</i>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>().</p></div>
  ///
  /// ## Variant 9
  ///
  /// Rust arguments: ```fn new((&::color::Color, &::pixmap::Pixmap)) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QColor& color, const QPixmap& pixmap)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-4">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with the given <i>color</i> and the custom pattern stored in <i>pixmap</i>.</p>
  /// <p>The style is set to <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>. The color will only have an effect for QBitmaps.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setColor">setColor</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>().</p></div>
  ///
  /// ## Variant 10
  ///
  /// Rust arguments: ```fn new(&::gradient::Gradient) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QGradient& gradient)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-9">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush based on the given <i>gradient</i>.</p>
  /// <p>The brush style is set to the corresponding gradient style (either <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::LinearGradientPattern</a>, <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::RadialGradientPattern</a> or <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::ConicalGradientPattern</a>).</p></div>
  ///
  /// ## Variant 11
  ///
  /// Rust arguments: ```fn new(&::image::Image) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QImage& image)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-7">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with a black color and a texture set to the given <i>image</i>. The style is set to <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setTextureImage">setTextureImage</a>().</p></div>
  ///
  /// ## Variant 12
  ///
  /// Rust arguments: ```fn new(&::pixmap::Pixmap) -> ::brush::Brush```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QBrush::QBrush(const QPixmap& pixmap)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#QBrush-6">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a brush with a black color and a texture set to the given <i>pixmap</i>. The style is set to <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>().</p></div>
  pub fn new<Args>(args: Args) -> ::brush::Brush
    where Args: overloading::BrushNewArgs
  {
    args.exec()
  }
  /// C++ method: <span style='color: green;'>```QBrush& QBrush::operator=(const QBrush& brush)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#operator-eq">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Assigns the given <i>brush</i> to <i>this</i> brush and returns a reference to <i>this</i> brush.</p></div>
  pub fn op_assign<'l0, 'l1>(&'l0 mut self, brush: &'l1 ::brush::Brush) -> &'l0 mut ::brush::Brush {
    let ffi_result =
      unsafe { ::ffi::qt_gui_c_QBrush_operator_assign(self as *mut ::brush::Brush, brush as *const ::brush::Brush) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```bool QBrush::operator==(const QBrush& b) const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#operator-eq-eq">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns <code>true</code> if the brush is equal to the given <i>brush</i>; otherwise returns <code>false</code>.</p>
  /// <p>Two brushes are equal if they have equal styles, colors and transforms and equal pixmaps or gradients depending on the style.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#operator-not-eq">operator!=</a>().</p></div>
  pub fn op_eq(&self, b: &::brush::Brush) -> bool {
    unsafe { ::ffi::qt_gui_c_QBrush_operator_eq(self as *const ::brush::Brush, b as *const ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```bool QBrush::operator!=(const QBrush& b) const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#operator-not-eq">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns <code>true</code> if the brush is different from the given <i>brush</i>; otherwise returns <code>false</code>.</p>
  /// <p>Two brushes are different if they have different styles, colors or transforms or different pixmaps or gradients depending on the style.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#operator-eq-eq">operator==</a>().</p></div>
  pub fn op_neq(&self, b: &::brush::Brush) -> bool {
    unsafe { ::ffi::qt_gui_c_QBrush_operator_neq(self as *const ::brush::Brush, b as *const ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```QBrush::setColor```</span>
  ///
  /// This is an overloaded function. Available variants:
  ///
  ///
  ///
  /// ## Variant 1
  ///
  /// Rust arguments: ```fn set_color(&mut self, ::qt_core::qt::GlobalColor) -> ()```<br>
  /// C++ method: <span style='color: green;'>```void QBrush::setColor(Qt::GlobalColor color)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setColor-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This is an overloaded function.</p>
  /// <p>Sets the brush color to the given <i>color</i>.</p></div>
  ///
  /// ## Variant 2
  ///
  /// Rust arguments: ```fn set_color(&mut self, &::color::Color) -> ()```<br>
  /// C++ method: <span style='color: green;'>```void QBrush::setColor(const QColor& color)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setColor">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets the brush color to the given <i>color</i>.</p>
  /// <p>Note that calling setColor() will not make a difference if the style is a gradient. The same is the case if the style is <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a> style unless the current texture is a <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#color">color</a>().</p></div>
  pub fn set_color<'largs, Args>(&'largs mut self, args: Args) -> ()
    where Args: overloading::BrushSetColorArgs<'largs>
  {
    args.exec(self)
  }
  /// C++ method: <span style='color: green;'>```void QBrush::setMatrix(const QMatrix& mat)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setMatrix">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets <i>matrix</i> as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a> transformation matrix to produce the final result.</p>
  /// <p>This function was introduced in  Qt 4.2.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#matrix">matrix</a>().</p></div>
  pub fn set_matrix(&mut self, mat: &::matrix::Matrix) {
    unsafe { ::ffi::qt_gui_c_QBrush_setMatrix(self as *mut ::brush::Brush, mat as *const ::matrix::Matrix) }
  }

  /// C++ method: <span style='color: green;'>```void QBrush::setStyle(Qt::BrushStyle arg1)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets the brush style to <i>style</i>.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#style">style</a>().</p></div>
  pub fn set_style(&mut self, arg1: ::qt_core::qt::BrushStyle) {
    unsafe { ::ffi::qt_gui_c_QBrush_setStyle(self as *mut ::brush::Brush, arg1) }
  }

  /// C++ method: <span style='color: green;'>```void QBrush::setTexture(const QPixmap& pixmap)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets the brush pixmap to <i>pixmap</i>. The style is set to <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>.</p>
  /// <p>The current brush color will only have an effect for monochrome pixmaps, i.e. for <a href="http://doc.qt.io/qt-5/qpixmap.html#depth">QPixmap::depth</a>() == 1 (<a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmaps</a>).</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#texture">texture</a>().</p></div>
  pub fn set_texture(&mut self, pixmap: &::pixmap::Pixmap) {
    unsafe {
      ::ffi::qt_gui_c_QBrush_setTexture(self as *mut ::brush::Brush,
                                        pixmap as *const ::pixmap::Pixmap)
    }
  }

  /// C++ method: <span style='color: green;'>```void QBrush::setTextureImage(const QImage& image)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setTextureImage">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets the brush image to <i>image</i>. The style is set to <a href="http://doc.qt.io/qt-5/qt.html#BrushStyle-enum">Qt::TexturePattern</a>.</p>
  /// <p>Note the current brush color will <i>not</i> have any affect on monochrome images, as opposed to calling <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>() with a <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a>. If you want to change the color of monochrome image brushes, either convert the image to <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a> with <code>QBitmap::fromImage()</code> and set the resulting <a href="http://doc.qt.io/qt-5/qbitmap.html">QBitmap</a> as a texture, or change the entries in the color table for the image.</p>
  /// <p>This function was introduced in  Qt 4.2.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#textureImage">textureImage</a>() and <a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>().</p></div>
  pub fn set_texture_image(&mut self, image: &::image::Image) {
    unsafe { ::ffi::qt_gui_c_QBrush_setTextureImage(self as *mut ::brush::Brush, image as *const ::image::Image) }
  }

  /// C++ method: <span style='color: green;'>```void QBrush::setTransform(const QTransform& arg1)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#setTransform">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets <i>matrix</i> as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a> transformation matrix to produce the final result.</p>
  /// <p>This function was introduced in  Qt 4.3.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#transform">transform</a>().</p></div>
  pub fn set_transform(&mut self, arg1: &::transform::Transform) {
    unsafe {
      ::ffi::qt_gui_c_QBrush_setTransform(self as *mut ::brush::Brush,
                                          arg1 as *const ::transform::Transform)
    }
  }

  /// C++ method: <span style='color: green;'>```Qt::BrushStyle QBrush::style() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#style">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the brush style.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setStyle">setStyle</a>().</p></div>
  pub fn style(&self) -> ::qt_core::qt::BrushStyle {
    unsafe { ::ffi::qt_gui_c_QBrush_style(self as *const ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```void QBrush::swap(QBrush& other)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#swap">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Swaps brush <i>other</i> with this brush. This operation is very fast and never fails.</p>
  /// <p>This function was introduced in  Qt 4.8.</p></div>
  pub fn swap(&mut self, other: &mut ::brush::Brush) {
    unsafe { ::ffi::qt_gui_c_QBrush_swap(self as *mut ::brush::Brush, other as *mut ::brush::Brush) }
  }

  /// C++ method: <span style='color: green;'>```QPixmap QBrush::texture() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#texture">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setTexture">setTexture</a>().</p></div>
  pub fn texture(&self) -> ::cpp_utils::CppBox<::pixmap::Pixmap> {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QBrush_texture_as_ptr(self as *const ::brush::Brush) };
    unsafe { ::cpp_utils::CppBox::new(ffi_result) }
  }

  /// C++ method: <span style='color: green;'>```QImage QBrush::textureImage() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#textureImage">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the custom brush pattern, or a null image if no custom brush pattern has been set.</p>
  /// <p>If the texture was set as a <a href="http://doc.qt.io/qt-5/qpixmap.html">QPixmap</a> it will be converted to a <a href="http://doc.qt.io/qt-5/qimage.html">QImage</a>.</p>
  /// <p>This function was introduced in  Qt 4.2.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setTextureImage">setTextureImage</a>().</p></div>
  pub fn texture_image(&self) -> ::cpp_utils::CppBox<::image::Image> {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QBrush_textureImage_as_ptr(self as *const ::brush::Brush) };
    unsafe { ::cpp_utils::CppBox::new(ffi_result) }
  }

  /// C++ method: <span style='color: green;'>```QTransform QBrush::transform() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#transform">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the current transformation matrix for the brush.</p>
  /// <p>This function was introduced in  Qt 4.3.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qbrush.html#setTransform">setTransform</a>().</p></div>
  pub fn transform(&self) -> ::transform::Transform {
    {
      let mut object: ::transform::Transform =
        unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
      unsafe {
        ::ffi::qt_gui_c_QBrush_transform_to_output(self as *const ::brush::Brush, &mut object);
      }
      object
    }
  }
}

impl Drop for ::brush::Brush {
  /// C++ method: <span style='color: green;'>```[destructor] void QBrush::~QBrush()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qbrush.html#dtor.QBrush">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Destroys the brush.</p></div>
  fn drop(&mut self) {
    unsafe { ::ffi::qt_gui_c_QBrush_destructor(self as *mut ::brush::Brush) }
  }
}

/// C++ method: <span style='color: green;'>```operator<<```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn op_shl((&'l0 mut ::qt_core::data_stream::DataStream, &'l1 ::brush::Brush)) -> &'l0 mut ::qt_core::data_stream::DataStream```<br>
/// C++ method: <span style='color: green;'>```QDataStream& operator<<(QDataStream& arg1, const QBrush& arg2)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qbrush.html#operator-lt-lt">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Writes the given <i>brush</i> to the given <i>stream</i> and returns a reference to the <i>stream</i>.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/datastreamformat.html">Serializing Qt Data Types</a>.</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn op_shl((&::qt_core::debug::Debug, &::brush::Brush)) -> ::qt_core::debug::Debug```<br>
/// C++ method: <span style='color: green;'>```QDebug operator<<(QDebug arg1, const QBrush& arg2)```</span>
///
///
pub fn op_shl<Args>(args: Args) -> Args::ReturnType
  where Args: overloading::OpShlArgs
{
  args.exec()
}
/// C++ method: <span style='color: green;'>```QDataStream& operator>>(QDataStream& arg1, QBrush& arg2)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qbrush.html#operator-gt-gt">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Reads the given <i>brush</i> from the given <i>stream</i> and returns a reference to the <i>stream</i>.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/datastreamformat.html">Serializing Qt Data Types</a>.</p></div>
pub fn op_shr<'l0, 'l1>(arg1: &'l0 mut ::qt_core::data_stream::DataStream,
                        arg2: &'l1 mut ::brush::Brush)
                        -> &'l0 mut ::qt_core::data_stream::DataStream {
  let ffi_result = unsafe {
    ::ffi::qt_gui_c_QBrush_G_operator_shr(arg1 as *mut ::qt_core::data_stream::DataStream,
                                          arg2 as *mut ::brush::Brush)
  };
  unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}

/// C++ method: <span style='color: green;'>```void swap(QBrush& value1, QBrush& value2)```</span>
///
///
pub fn swap(value1: &mut ::brush::Brush, value2: &mut ::brush::Brush) {
  unsafe { ::ffi::qt_gui_c_QBrush_G_swap(value1 as *mut ::brush::Brush, value2 as *mut ::brush::Brush) }
}

/// Types for emulating overloading for overloaded functions in this module
pub mod overloading {
  /// This trait represents a set of arguments accepted by [Brush::new](../struct.Brush.html#method.new) method.
  pub trait BrushNewArgs {
    fn exec(self) -> ::brush::Brush;
  }
  impl<'a> BrushNewArgs for &'a ::brush::Brush {
    fn exec(self) -> ::brush::Brush {
      let brush = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QBrush(brush as *const ::brush::Brush, &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for &'a ::color::Color {
    fn exec(self) -> ::brush::Brush {
      let color = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QColor(color as *const ::color::Color, &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for (&'a ::color::Color, &'a ::pixmap::Pixmap) {
    fn exec(self) -> ::brush::Brush {
      let color = self.0;
      let pixmap = self.1;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QColor_QPixmap(color as *const ::color::Color,
                                                            pixmap as *const ::pixmap::Pixmap,
                                                            &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for (&'a ::color::Color, ::qt_core::qt::BrushStyle) {
    fn exec(self) -> ::brush::Brush {
      let color = self.0;
      let bs = self.1;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QColor_Qt_BrushStyle(color as *const ::color::Color, bs, &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for &'a ::gradient::Gradient {
    fn exec(self) -> ::brush::Brush {
      let gradient = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QGradient(gradient as *const ::gradient::Gradient, &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for &'a ::image::Image {
    fn exec(self) -> ::brush::Brush {
      let image = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QImage(image as *const ::image::Image, &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for &'a ::pixmap::Pixmap {
    fn exec(self) -> ::brush::Brush {
      let pixmap = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_QPixmap(pixmap as *const ::pixmap::Pixmap, &mut object);
        }
        object
      }
    }
  }
  impl BrushNewArgs for ::qt_core::qt::BrushStyle {
    fn exec(self) -> ::brush::Brush {
      let bs = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_Qt_BrushStyle(bs, &mut object);
        }
        object
      }
    }
  }
  impl BrushNewArgs for ::qt_core::qt::GlobalColor {
    fn exec(self) -> ::brush::Brush {
      let color = self;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_Qt_GlobalColor(color, &mut object);
        }
        object
      }
    }
  }
  impl<'a> BrushNewArgs for (::qt_core::qt::GlobalColor, &'a ::pixmap::Pixmap) {
    fn exec(self) -> ::brush::Brush {
      let color = self.0;
      let pixmap = self.1;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_Qt_GlobalColor_QPixmap(color,
                                                                    pixmap as *const ::pixmap::Pixmap,
                                                                    &mut object);
        }
        object
      }
    }
  }
  impl BrushNewArgs for (::qt_core::qt::GlobalColor, ::qt_core::qt::BrushStyle) {
    fn exec(self) -> ::brush::Brush {
      let color = self.0;
      let bs = self.1;
      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_Qt_GlobalColor_Qt_BrushStyle(color, bs, &mut object);
        }
        object
      }
    }
  }
  impl BrushNewArgs for () {
    fn exec(self) -> ::brush::Brush {

      {
        let mut object: ::brush::Brush =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_constructor_no_args(&mut object);
        }
        object
      }
    }
  }
  /// This trait represents a set of arguments accepted by [Brush::set_color](../struct.Brush.html#method.set_color) method.
  pub trait BrushSetColorArgs<'largs> {
    fn exec(self, original_self: &'largs mut ::brush::Brush) -> ();
  }
  impl<'largs> BrushSetColorArgs<'largs> for &'largs ::color::Color {
    fn exec(self, original_self: &'largs mut ::brush::Brush) -> () {
      let color = self;
      unsafe {
        ::ffi::qt_gui_c_QBrush_setColor_QColor(original_self as *mut ::brush::Brush,
                                               color as *const ::color::Color)
      }
    }
  }
  impl<'largs> BrushSetColorArgs<'largs> for ::qt_core::qt::GlobalColor {
    fn exec(self, original_self: &'largs mut ::brush::Brush) -> () {
      let color = self;
      unsafe { ::ffi::qt_gui_c_QBrush_setColor_Qt_GlobalColor(original_self as *mut ::brush::Brush, color) }
    }
  }
  /// This trait represents a set of arguments accepted by [op_shl](../fn.op_shl.html) method.
  pub trait OpShlArgs {
    type ReturnType;
    fn exec(self) -> Self::ReturnType;
  }
  impl<'a> OpShlArgs for (&'a mut ::qt_core::data_stream::DataStream, &'a ::brush::Brush) {
    type ReturnType = &'a mut ::qt_core::data_stream::DataStream;
    fn exec(self) -> &'a mut ::qt_core::data_stream::DataStream {
      let arg1 = self.0;
      let arg2 = self.1;
      let ffi_result = unsafe {
        ::ffi::qt_gui_c_QBrush_G_operator_shl(arg1 as *mut ::qt_core::data_stream::DataStream,
                                              arg2 as *const ::brush::Brush)
      };
      unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
    }
  }
  impl<'a> OpShlArgs for (&'a ::qt_core::debug::Debug, &'a ::brush::Brush) {
    type ReturnType = ::qt_core::debug::Debug;
    fn exec(self) -> ::qt_core::debug::Debug {
      let arg1 = self.0;
      let arg2 = self.1;
      {
        let mut object: ::qt_core::debug::Debug =
          unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
        unsafe {
          ::ffi::qt_gui_c_QBrush_G_operator_shl_to_output(arg1 as *const ::qt_core::debug::Debug,
                                                          arg2 as *const ::brush::Brush,
                                                          &mut object);
        }
        object
      }
    }
  }
}