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
/// C++ type: <span style='color: green;'>```QIconDragEvent```</span>
///
/// <a href="http://doc.qt.io/qt-5/qicondragevent.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qicondragevent.html">QIconDragEvent</a> class indicates that a main icon drag has begun.</p>
/// <p>Icon drag events are sent to widgets when the main icon of a window has been dragged away. On <a href="http://doc.qt.io/qt-5/internationalization.html#macos">macOS</a>, this happens when the proxy icon of a window is dragged off the title bar.</p>
/// <p>It is normal to begin using drag and drop in response to this event.</p></div>
#[repr(C)]
pub struct IconDragEvent(u8);

impl IconDragEvent {
  /// C++ method: <span style='color: green;'>```[constructor] void QIconDragEvent::QIconDragEvent()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qicondragevent.html#QIconDragEvent">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs an icon drag event object with the accept flag set to false.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qevent.html#accept">accept</a>().</p></div>
  pub fn new() -> ::cpp_utils::CppBox<::icon_drag_event::IconDragEvent> {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QIconDragEvent_new() };
    unsafe { ::cpp_utils::CppBox::new(ffi_result) }
  }
}

impl ::cpp_utils::CppDeletable for ::icon_drag_event::IconDragEvent {
  fn deleter() -> ::cpp_utils::Deleter<Self> {
    ::ffi::qt_gui_c_QIconDragEvent_delete
  }
}

impl ::cpp_utils::StaticCast<::qt_core::event::Event> for ::icon_drag_event::IconDragEvent {
  fn static_cast_mut(&mut self) -> &mut ::qt_core::event::Event {
    let ffi_result =
      unsafe { ::ffi::qt_gui_c_QIconDragEvent_G_static_cast_QEvent_ptr(self as *mut ::icon_drag_event::IconDragEvent) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::qt_core::event::Event {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QIconDragEvent_G_static_cast_QEvent_ptr(self as *const ::icon_drag_event::IconDragEvent as *mut ::icon_drag_event::IconDragEvent) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::icon_drag_event::IconDragEvent> for ::qt_core::event::Event {
  unsafe fn static_cast_mut(&mut self) -> &mut ::icon_drag_event::IconDragEvent {
    let ffi_result =
      ::ffi::qt_gui_c_QIconDragEvent_G_static_cast_QIconDragEvent_ptr(self as *mut ::qt_core::event::Event);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::icon_drag_event::IconDragEvent {
    let ffi_result = ::ffi::qt_gui_c_QIconDragEvent_G_static_cast_QIconDragEvent_ptr(self as *const ::qt_core::event::Event as *mut ::qt_core::event::Event);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::Deref for ::icon_drag_event::IconDragEvent {
  type Target = ::qt_core::event::Event;
  fn deref(&self) -> &::qt_core::event::Event {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QIconDragEvent_G_static_cast_QEvent_ptr(self as *const ::icon_drag_event::IconDragEvent as *mut ::icon_drag_event::IconDragEvent) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::DerefMut for ::icon_drag_event::IconDragEvent {
  fn deref_mut(&mut self) -> &mut ::qt_core::event::Event {
    let ffi_result =
      unsafe { ::ffi::qt_gui_c_QIconDragEvent_G_static_cast_QEvent_ptr(self as *mut ::icon_drag_event::IconDragEvent) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }
}