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
/// C++ type: <span style='color: green;'>```QWhatsThisClickedEvent```</span>
///
/// <a href="http://doc.qt.io/qt-5/qwhatsthisclickedevent.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qwhatsthisclickedevent.html">QWhatsThisClickedEvent</a> class provides an event that can be used to handle hyperlinks in a "What's This?" text.</p></div>
#[repr(C)]
pub struct WhatsThisClickedEvent(u8);

impl WhatsThisClickedEvent {
  /// C++ method: <span style='color: green;'>```QString QWhatsThisClickedEvent::href() const```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qwhatsthisclickedevent.html#href">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the URL that was clicked by the user in the "What's This?" text.</p></div>
  pub fn href(&self) -> ::qt_core::string::String {
    {
      let mut object: ::qt_core::string::String =
        unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
      unsafe {
        ::ffi::qt_gui_c_QWhatsThisClickedEvent_href_to_output(self as *const ::whats_this_clicked_event::WhatsThisClickedEvent, &mut object);
      }
      object
    }
  }

  /// C++ method: <span style='color: green;'>```[constructor] void QWhatsThisClickedEvent::QWhatsThisClickedEvent(const QString& href)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qwhatsthisclickedevent.html#QWhatsThisClickedEvent">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs an event containing a URL specified by <i>href</i> when a link is clicked in a "What's This?" message.</p>
  /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qwhatsthisclickedevent.html#href">href</a>().</p></div>
  pub fn new(href: &::qt_core::string::String)
             -> ::cpp_utils::CppBox<::whats_this_clicked_event::WhatsThisClickedEvent> {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QWhatsThisClickedEvent_new(href as *const ::qt_core::string::String) };
    unsafe { ::cpp_utils::CppBox::new(ffi_result) }
  }
}

impl ::cpp_utils::CppDeletable for ::whats_this_clicked_event::WhatsThisClickedEvent {
  fn deleter() -> ::cpp_utils::Deleter<Self> {
    ::ffi::qt_gui_c_QWhatsThisClickedEvent_delete
  }
}

impl ::cpp_utils::StaticCast<::qt_core::event::Event> for ::whats_this_clicked_event::WhatsThisClickedEvent {
  fn static_cast_mut(&mut self) -> &mut ::qt_core::event::Event {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QWhatsThisClickedEvent_G_static_cast_QEvent_ptr(self as *mut ::whats_this_clicked_event::WhatsThisClickedEvent) };
    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_QWhatsThisClickedEvent_G_static_cast_QEvent_ptr(self as *const ::whats_this_clicked_event::WhatsThisClickedEvent as *mut ::whats_this_clicked_event::WhatsThisClickedEvent) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::whats_this_clicked_event::WhatsThisClickedEvent> for ::qt_core::event::Event {
  unsafe fn static_cast_mut(&mut self) -> &mut ::whats_this_clicked_event::WhatsThisClickedEvent {
    let ffi_result = ::ffi::qt_gui_c_QWhatsThisClickedEvent_G_static_cast_QWhatsThisClickedEvent_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) -> &::whats_this_clicked_event::WhatsThisClickedEvent {
    let ffi_result = ::ffi::qt_gui_c_QWhatsThisClickedEvent_G_static_cast_QWhatsThisClickedEvent_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 ::whats_this_clicked_event::WhatsThisClickedEvent {
  type Target = ::qt_core::event::Event;
  fn deref(&self) -> &::qt_core::event::Event {
    let ffi_result = unsafe { ::ffi::qt_gui_c_QWhatsThisClickedEvent_G_static_cast_QEvent_ptr(self as *const ::whats_this_clicked_event::WhatsThisClickedEvent as *mut ::whats_this_clicked_event::WhatsThisClickedEvent) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

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