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
/// C++ type: <span style='color: green;'>```QErrorMessage```</span>
///
/// <a href="http://doc.qt.io/qt-5/qerrormessage.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qerrormessage.html">QErrorMessage</a> class provides an error message display dialog.</p>
/// <p>An error message widget consists of a text label and a checkbox. The checkbox lets the user control whether the same error message will be displayed again in the future, typically displaying the text, "Show this message again" translated into the appropriate local language.</p>
/// <p>For production applications, the class can be used to display messages which the user only needs to see once. To use <a href="http://doc.qt.io/qt-5/qerrormessage.html">QErrorMessage</a> like this, you create the dialog in the usual way, and show it by calling the <a href="http://doc.qt.io/qt-5/qerrormessage.html#showMessage">showMessage</a>() slot or connecting signals to it.</p>
/// <p>The static <a href="http://doc.qt.io/qt-5/qerrormessage.html#qtHandler">qtHandler</a>() function installs a message handler using <a href="http://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>() and creates a <a href="http://doc.qt.io/qt-5/qerrormessage.html">QErrorMessage</a> that displays <a href="http://doc.qt.io/qt-5/qtglobal.html#qDebug">qDebug</a>(), <a href="http://doc.qt.io/qt-5/qtglobal.html#qWarning">qWarning</a>() and <a href="http://doc.qt.io/qt-5/qtglobal.html#qFatal">qFatal</a>() messages. This is most useful in environments where no console is available to display warnings and error messages.</p>
/// <p>In both cases <a href="http://doc.qt.io/qt-5/qerrormessage.html">QErrorMessage</a> will queue pending messages and display them in order, with each new message being shown as soon as the user has accepted the previous message. Once the user has specified that a message is not to be shown again it is automatically skipped, and the dialog will show the next appropriate message in the queue.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/qtwidgets-dialogs-standarddialogs-example.html">Standard Dialogs</a> example shows how to use <a href="http://doc.qt.io/qt-5/qerrormessage.html">QErrorMessage</a> as well as other built-in Qt dialogs.</p>
/// <p class="centerAlign"><img src="http://doc.qt.io/qt-5/images/qerrormessage.png" alt=""></img></p></div>
#[repr(C)]
pub struct ErrorMessage(u8);

impl ErrorMessage {
  /// C++ method: <span style='color: green;'>```virtual const QMetaObject* QErrorMessage::metaObject() const```</span>
  ///
  ///
  pub fn meta_object(&self) -> *const ::qt_core::meta_object::MetaObject {
    unsafe { ::ffi::qt_widgets_c_QErrorMessage_metaObject(self as *const ::error_message::ErrorMessage) }
  }

  /// C++ method: <span style='color: green;'>```[constructor] void QErrorMessage::QErrorMessage()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qerrormessage.html#QErrorMessage">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs and installs an error handler window with the given <i>parent</i>.</p></div>
  pub fn new() -> ::cpp_utils::CppBox<::error_message::ErrorMessage> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_new_no_args() };
    unsafe { ::cpp_utils::CppBox::new(ffi_result) }
  }

  /// C++ method: <span style='color: green;'>```[constructor] void QErrorMessage::QErrorMessage(QWidget* parent = ?)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qerrormessage.html#QErrorMessage">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs and installs an error handler window with the given <i>parent</i>.</p></div>
  pub unsafe fn new_unsafe(parent: *mut ::widget::Widget) -> ::cpp_utils::CppBox<::error_message::ErrorMessage> {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_new_parent(parent);
    ::cpp_utils::CppBox::new(ffi_result)
  }

  /// C++ method: <span style='color: green;'>```static QErrorMessage* QErrorMessage::qtHandler()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qerrormessage.html#qtHandler">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns a pointer to a <a href="http://doc.qt.io/qt-5/qerrormessage.html">QErrorMessage</a> object that outputs the default Qt messages. This function creates such an object, if there isn't one already.</p></div>
  pub fn qt_handler() -> *mut ::error_message::ErrorMessage {
    unsafe { ::ffi::qt_widgets_c_QErrorMessage_qtHandler() }
  }

  /// C++ method: <span style='color: green;'>```virtual int QErrorMessage::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_QErrorMessage_qt_metacall(self as *mut ::error_message::ErrorMessage, arg1, arg2, arg3)
  }

  /// C++ method: <span style='color: green;'>```virtual void* QErrorMessage::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_QErrorMessage_qt_metacast(self as *mut ::error_message::ErrorMessage, arg1)
  }

  /// C++ method: <span style='color: green;'>```QErrorMessage::showMessage```</span>
  ///
  /// This is an overloaded function. Available variants:
  ///
  ///
  ///
  /// ## Variant 1
  ///
  /// Rust arguments: ```fn show_message(&mut self, &::qt_core::string::String) -> ()```<br>
  /// C++ method: <span style='color: green;'>```[slot] void QErrorMessage::showMessage(const QString& message)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qerrormessage.html#showMessage">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Shows the given message, <i>message</i>, and returns immediately. If the user has requested for the message not to be shown again, this function does nothing.</p>
  /// <p>Normally, the message is displayed immediately. However, if there are pending messages, it will be queued to be displayed later.</p></div>
  ///
  /// ## Variant 2
  ///
  /// Rust arguments: ```fn show_message(&mut self, (&::qt_core::string::String, &::qt_core::string::String)) -> ()```<br>
  /// C++ method: <span style='color: green;'>```[slot] void QErrorMessage::showMessage(const QString& message, const QString& type)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qerrormessage.html#showMessage-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This is an overloaded function.</p>
  /// <p>Shows the given message, <i>message</i>, and returns immediately. If the user has requested for messages of type, <i>type</i>, not to be shown again, this function does nothing.</p>
  /// <p>Normally, the message is displayed immediately. However, if there are pending messages, it will be queued to be displayed later.</p>
  /// <p>This function was introduced in  Qt 4.5.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qerrormessage.html#showMessage">showMessage</a>().</p></div>
  pub fn show_message<'largs, Args>(&'largs mut self, args: Args) -> ()
    where Args: overloading::ErrorMessageShowMessageArgs<'largs>
  {
    args.exec(self)
  }
  /// C++ method: <span style='color: green;'>```static QString QErrorMessage::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_QErrorMessage_tr_to_output(s, c, n, &mut object);
      object
    }
  }

  /// C++ method: <span style='color: green;'>```static QString QErrorMessage::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_QErrorMessage_trUtf8_to_output(s, c, n, &mut object);
      object
    }
  }
}

impl ::cpp_utils::CppDeletable for ::error_message::ErrorMessage {
  fn deleter() -> ::cpp_utils::Deleter<Self> {
    ::ffi::qt_widgets_c_QErrorMessage_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 `ErrorMessage`.
  pub struct Signals<'a>(&'a ::error_message::ErrorMessage);
  /// Represents a built-in Qt signal `QErrorMessage::finished`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.signals().finished()` 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 `ErrorMessage` object.
  pub struct Finished<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Finished<'a> {
    type Arguments = (::libc::c_int,);
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"2finished(int)\0"
    }
  }
  impl<'a> ::qt_core::connection::Signal for Finished<'a> {}
  /// Represents a built-in Qt signal `QErrorMessage::rejected`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.signals().rejected()` 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 `ErrorMessage` object.
  pub struct Rejected<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Rejected<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"2rejected()\0"
    }
  }
  impl<'a> ::qt_core::connection::Signal for Rejected<'a> {}
  /// Represents a built-in Qt signal `QErrorMessage::accepted`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.signals().accepted()` 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 `ErrorMessage` object.
  pub struct Accepted<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Accepted<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"2accepted()\0"
    }
  }
  impl<'a> ::qt_core::connection::Signal for Accepted<'a> {}
  impl<'a> Signals<'a> {
    /// Returns an object representing a built-in Qt signal `QErrorMessage::finished`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn finished(&self) -> Finished {
      Finished(self.0)
    }
    /// Returns an object representing a built-in Qt signal `QErrorMessage::rejected`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn rejected(&self) -> Rejected {
      Rejected(self.0)
    }
    /// Returns an object representing a built-in Qt signal `QErrorMessage::accepted`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn accepted(&self) -> Accepted {
      Accepted(self.0)
    }
  }
  /// Provides access to built-in Qt slots of `ErrorMessage`.
  pub struct Slots<'a>(&'a ::error_message::ErrorMessage);
  /// Represents a built-in Qt slot `QErrorMessage::open`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().open()` 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 `ErrorMessage` object.
  pub struct Open<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Open<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1open()\0"
    }
  }
  /// Represents a built-in Qt slot `QErrorMessage::exec`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().exec()` 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 `ErrorMessage` object.
  pub struct Exec<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Exec<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1exec()\0"
    }
  }
  /// Represents a built-in Qt slot `QErrorMessage::showExtension`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().show_extension()` 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 `ErrorMessage` object.
  pub struct ShowExtension<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for ShowExtension<'a> {
    type Arguments = (bool,);
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1showExtension(bool)\0"
    }
  }
  /// Represents a built-in Qt slot `QErrorMessage::showMessage`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().show_message_qt_core_string_ref()` 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 `ErrorMessage` object.
  pub struct ShowMessageQtCoreStringRef<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for ShowMessageQtCoreStringRef<'a> {
    type Arguments = (&'static ::qt_core::string::String,);
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1showMessage(const QString&)\0"
    }
  }
  /// Represents a built-in Qt slot `QErrorMessage::showMessage`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().show_message_qt_core_string_ref_qt_core_string_ref()` 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 `ErrorMessage` object.
  pub struct ShowMessageQtCoreStringRefQtCoreStringRef<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for ShowMessageQtCoreStringRefQtCoreStringRef<'a> {
    type Arguments = (&'static ::qt_core::string::String, &'static ::qt_core::string::String);
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1showMessage(const QString&,const QString&)\0"
    }
  }
  /// Represents a built-in Qt slot `QErrorMessage::reject`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().reject()` 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 `ErrorMessage` object.
  pub struct Reject<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Reject<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1reject()\0"
    }
  }
  /// Represents a built-in Qt slot `QErrorMessage::accept`.
  ///
  /// An object of this type can be created from `ErrorMessage` with `object.slots().accept()` 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 `ErrorMessage` object.
  pub struct Accept<'a>(&'a ::error_message::ErrorMessage);
  impl<'a> ::qt_core::connection::Receiver for Accept<'a> {
    type Arguments = ();
    fn object(&self) -> &::qt_core::object::Object {
      self.0.static_cast()
    }
    fn receiver_id() -> &'static [u8] {
      b"1accept()\0"
    }
  }
  impl<'a> Slots<'a> {
    /// Returns an object representing a built-in Qt slot `QErrorMessage::open`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn open(&self) -> Open {
      Open(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QErrorMessage::exec`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn exec(&self) -> Exec {
      Exec(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QErrorMessage::showExtension`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn show_extension(&self) -> ShowExtension {
      ShowExtension(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QErrorMessage::showMessage`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn show_message_qt_core_string_ref(&self) -> ShowMessageQtCoreStringRef {
      ShowMessageQtCoreStringRef(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QErrorMessage::showMessage`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn show_message_qt_core_string_ref_qt_core_string_ref(&self) -> ShowMessageQtCoreStringRefQtCoreStringRef {
      ShowMessageQtCoreStringRefQtCoreStringRef(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QErrorMessage::reject`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn reject(&self) -> Reject {
      Reject(self.0)
    }
    /// Returns an object representing a built-in Qt slot `QErrorMessage::accept`.
    ///
    /// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
    pub fn accept(&self) -> Accept {
      Accept(self.0)
    }
  }
  impl ::error_message::ErrorMessage {
    /// 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<::error_message::ErrorMessage> for ::dialog::Dialog {
  fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::error_message::ErrorMessage> {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_dynamic_cast_QErrorMessage_ptr_QDialog(self as *mut ::dialog::Dialog)
      };
    unsafe { ffi_result.as_mut() }
  }

  fn dynamic_cast(&self) -> ::std::option::Option<&::error_message::ErrorMessage> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_G_dynamic_cast_QErrorMessage_ptr_QDialog(self as *const ::dialog::Dialog as *mut ::dialog::Dialog) };
    unsafe { ffi_result.as_ref() }
  }
}

impl ::cpp_utils::DynamicCast<::error_message::ErrorMessage> for ::widget::Widget {
  fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::error_message::ErrorMessage> {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_dynamic_cast_QErrorMessage_ptr_QWidget(self as *mut ::widget::Widget)
      };
    unsafe { ffi_result.as_mut() }
  }

  fn dynamic_cast(&self) -> ::std::option::Option<&::error_message::ErrorMessage> {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_G_dynamic_cast_QErrorMessage_ptr_QWidget(self as *const ::widget::Widget as *mut ::widget::Widget) };
    unsafe { ffi_result.as_ref() }
  }
}

impl ::cpp_utils::StaticCast<::qt_core::object::Object> for ::error_message::ErrorMessage {
  fn static_cast_mut(&mut self) -> &mut ::qt_core::object::Object {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QObject_ptr(self as *mut ::error_message::ErrorMessage)
      };
    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_QErrorMessage_G_static_cast_QObject_ptr(self as *const ::error_message::ErrorMessage as *mut ::error_message::ErrorMessage) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::StaticCast<::qt_gui::paint_device::PaintDevice> for ::error_message::ErrorMessage {
  fn static_cast_mut(&mut self) -> &mut ::qt_gui::paint_device::PaintDevice {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QPaintDevice_ptr(self as *mut ::error_message::ErrorMessage)
      };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::qt_gui::paint_device::PaintDevice {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QPaintDevice_ptr(self as *const ::error_message::ErrorMessage as *mut ::error_message::ErrorMessage) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::StaticCast<::dialog::Dialog> for ::error_message::ErrorMessage {
  fn static_cast_mut(&mut self) -> &mut ::dialog::Dialog {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QDialog_ptr(self as *mut ::error_message::ErrorMessage)
      };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::dialog::Dialog {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QDialog_ptr(self as *const ::error_message::ErrorMessage as *mut ::error_message::ErrorMessage) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::StaticCast<::widget::Widget> for ::error_message::ErrorMessage {
  fn static_cast_mut(&mut self) -> &mut ::widget::Widget {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QWidget_ptr(self as *mut ::error_message::ErrorMessage)
      };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::widget::Widget {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QWidget_ptr(self as *const ::error_message::ErrorMessage as *mut ::error_message::ErrorMessage) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::error_message::ErrorMessage> for ::dialog::Dialog {
  unsafe fn static_cast_mut(&mut self) -> &mut ::error_message::ErrorMessage {
    let ffi_result =
      ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_ptr_QDialog(self as *mut ::dialog::Dialog);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::error_message::ErrorMessage {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_ptr_QDialog(self as *const ::dialog::Dialog as *mut ::dialog::Dialog);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::error_message::ErrorMessage> for ::qt_core::object::Object {
  unsafe fn static_cast_mut(&mut self) -> &mut ::error_message::ErrorMessage {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_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) -> &::error_message::ErrorMessage {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_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 ::cpp_utils::UnsafeStaticCast<::error_message::ErrorMessage> for ::qt_gui::paint_device::PaintDevice {
  unsafe fn static_cast_mut(&mut self) -> &mut ::error_message::ErrorMessage {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_ptr_QPaintDevice(self as *mut ::qt_gui::paint_device::PaintDevice);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::error_message::ErrorMessage {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_ptr_QPaintDevice(self as *const ::qt_gui::paint_device::PaintDevice as *mut ::qt_gui::paint_device::PaintDevice);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::error_message::ErrorMessage> for ::widget::Widget {
  unsafe fn static_cast_mut(&mut self) -> &mut ::error_message::ErrorMessage {
    let ffi_result =
      ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_ptr_QWidget(self as *mut ::widget::Widget);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::error_message::ErrorMessage {
    let ffi_result = ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QErrorMessage_ptr_QWidget(self as *const ::widget::Widget as *mut ::widget::Widget);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::Deref for ::error_message::ErrorMessage {
  type Target = ::dialog::Dialog;
  fn deref(&self) -> &::dialog::Dialog {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QDialog_ptr(self as *const ::error_message::ErrorMessage as *mut ::error_message::ErrorMessage) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::DerefMut for ::error_message::ErrorMessage {
  fn deref_mut(&mut self) -> &mut ::dialog::Dialog {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_G_static_cast_QDialog_ptr(self as *mut ::error_message::ErrorMessage)
      };
    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 [ErrorMessage::show_message](../struct.ErrorMessage.html#method.show_message) method.
  pub trait ErrorMessageShowMessageArgs<'largs> {
    fn exec(self, original_self: &'largs mut ::error_message::ErrorMessage) -> ();
  }
  impl<'largs> ErrorMessageShowMessageArgs<'largs> for &'largs ::qt_core::string::String {
    fn exec(self, original_self: &'largs mut ::error_message::ErrorMessage) -> () {
      let message = self;
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_showMessage_message(original_self as *mut ::error_message::ErrorMessage,
                                                              message as *const ::qt_core::string::String)
      }
    }
  }
  impl<'largs> ErrorMessageShowMessageArgs<'largs>
    for (&'largs ::qt_core::string::String, &'largs ::qt_core::string::String) {
    fn exec(self, original_self: &'largs mut ::error_message::ErrorMessage) -> () {
      let message = self.0;
      let type_ = self.1;
      unsafe {
        ::ffi::qt_widgets_c_QErrorMessage_showMessage_message_type(original_self as *mut ::error_message::ErrorMessage, message as *const ::qt_core::string::String, type_ as *const ::qt_core::string::String)
      }
    }
  }
}