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
/// C++ type: <span style='color: green;'>```QStyleOptionMenuItem::CheckType```</span>
///
/// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#CheckType-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum is used to indicate whether or not a check mark should be drawn for the item, or even if it should be drawn at all.</p>
///
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#checkType-var">checkType</a>, <a href="http://doc.qt.io/qt-5/qaction.html#checkable-prop">QAction::checkable</a>, <a href="http://doc.qt.io/qt-5/qaction.html#checked-prop">QAction::checked</a>, and <a href="http://doc.qt.io/qt-5/qactiongroup.html#exclusive-prop">QActionGroup::exclusive</a>.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum CheckType {
  /// The item is not checkable. (C++ enum variant: <span style='color: green;'>```NotCheckable = 0```</span>)
  NotCheckable = 0,
  /// The item is an exclusive check item (like a radio button). (C++ enum variant: <span style='color: green;'>```Exclusive = 1```</span>)
  Exclusive = 1,
  /// The item is a non-exclusive check item (like a check box). (C++ enum variant: <span style='color: green;'>```NonExclusive = 2```</span>)
  NonExclusive = 2,
}

/// C++ type: <span style='color: green;'>```QStyleOptionMenuItem::MenuItemType```</span>
///
/// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#MenuItemType-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum indicates the type of menu item that the structure describes.</p>
///
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#menuItemType-var">menuItemType</a>.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum MenuItemType {
  /// A normal menu item. (C++ enum variant: <span style='color: green;'>```Normal = 0```</span>)
  Normal = 0,
  /// A menu item that is the default action as specified with <a href="http://doc.qt.io/qt-5/qmenu.html#defaultAction">QMenu::defaultAction</a>(). (C++ enum variant: <span style='color: green;'>```DefaultItem = 1```</span>)
  DefaultItem = 1,
  /// A menu separator. (C++ enum variant: <span style='color: green;'>```Separator = 2```</span>)
  Separator = 2,
  /// Indicates the menu item points to a sub-menu. (C++ enum variant: <span style='color: green;'>```SubMenu = 3```</span>)
  SubMenu = 3,
  /// A popup menu scroller (currently only used on <a href="http://doc.qt.io/qt-5/internationalization.html#macos">macOS</a>). (C++ enum variant: <span style='color: green;'>```Scroller = 4```</span>)
  Scroller = 4,
  /// A tear-off handle for the menu. (C++ enum variant: <span style='color: green;'>```TearOff = 5```</span>)
  TearOff = 5,
  /// The margin of the menu. (C++ enum variant: <span style='color: green;'>```Margin = 6```</span>)
  Margin = 6,
  /// The empty area of the menu. (C++ enum variant: <span style='color: green;'>```EmptyArea = 7```</span>)
  EmptyArea = 7,
}

/// C++ type: <span style='color: green;'>```QStyleOptionMenuItem```</span>
///
/// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html">QStyleOptionMenuItem</a> class is used to describe the parameter necessary for drawing a menu item.</p>
/// <p><a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html">QStyleOptionMenuItem</a> contains all the information that <a href="http://doc.qt.io/qt-5/qstyle.html">QStyle</a> functions need to draw the menu items from <a href="http://doc.qt.io/qt-5/qmenu.html">QMenu</a>. It is also used for drawing other menu-related widgets.</p>
/// <p>For performance reasons, the access to the member variables is direct (i.e., using the <code>.</code> or <code>-&gt;</code> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.</p>
/// <p>For an example demonstrating how style options can be used, see the <a href="http://doc.qt.io/qt-5/qtwidgets-widgets-styles-example.html">Styles</a> example.</p></div>
#[repr(C)]
pub struct StyleOptionMenuItem(u8);

impl StyleOptionMenuItem {
  /// C++ method: <span style='color: green;'>```QStyleOptionMenuItem::CheckType QStyleOptionMenuItem::checkType() const```</span>
  ///
  ///
  pub fn check_type(&self) -> ::style_option_menu_item::CheckType {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_checkType(self as *const ::style_option_menu_item::StyleOptionMenuItem)
    }
  }

  /// C++ method: <span style='color: green;'>```bool QStyleOptionMenuItem::checked() const```</span>
  ///
  ///
  pub fn checked(&self) -> bool {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_checked(self as *const ::style_option_menu_item::StyleOptionMenuItem)
    }
  }

  /// C++ method: <span style='color: green;'>```const QFont& QStyleOptionMenuItem::font() const```</span>
  ///
  ///
  pub fn font<'l0>(&'l0 self) -> &'l0 ::qt_gui::font::Font {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_font(self as *const ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```QFont& QStyleOptionMenuItem::font_mut()```</span>
  ///
  ///
  pub fn font_mut<'l0>(&'l0 mut self) -> &'l0 mut ::qt_gui::font::Font {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_font_mut(self as *mut ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```const QIcon& QStyleOptionMenuItem::icon() const```</span>
  ///
  ///
  pub fn icon<'l0>(&'l0 self) -> &'l0 ::qt_gui::icon::Icon {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_icon(self as *const ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```QIcon& QStyleOptionMenuItem::icon_mut()```</span>
  ///
  ///
  pub fn icon_mut<'l0>(&'l0 mut self) -> &'l0 mut ::qt_gui::icon::Icon {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_icon_mut(self as *mut ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```int QStyleOptionMenuItem::maxIconWidth() const```</span>
  ///
  ///
  pub fn max_icon_width(&self) -> ::libc::c_int {
    unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_maxIconWidth(self as *const ::style_option_menu_item::StyleOptionMenuItem) }
  }

  /// C++ method: <span style='color: green;'>```bool QStyleOptionMenuItem::menuHasCheckableItems() const```</span>
  ///
  ///
  pub fn menu_has_checkable_items(&self) -> bool {
    unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_menuHasCheckableItems(self as *const ::style_option_menu_item::StyleOptionMenuItem) }
  }

  /// C++ method: <span style='color: green;'>```QStyleOptionMenuItem::MenuItemType QStyleOptionMenuItem::menuItemType() const```</span>
  ///
  ///
  pub fn menu_item_type(&self) -> ::style_option_menu_item::MenuItemType {
    unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_menuItemType(self as *const ::style_option_menu_item::StyleOptionMenuItem) }
  }

  /// C++ method: <span style='color: green;'>```const QRect& QStyleOptionMenuItem::menuRect() const```</span>
  ///
  ///
  pub fn menu_rect<'l0>(&'l0 self) -> &'l0 ::qt_core::rect::Rect {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_menuRect(self as *const ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```QRect& QStyleOptionMenuItem::menuRect_mut()```</span>
  ///
  ///
  pub fn menu_rect_mut<'l0>(&'l0 mut self) -> &'l0 mut ::qt_core::rect::Rect {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_menuRect_mut(self as *mut ::style_option_menu_item::StyleOptionMenuItem) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```QStyleOptionMenuItem::QStyleOptionMenuItem```</span>
  ///
  /// This is an overloaded function. Available variants:
  ///
  ///
  ///
  /// ## Variant 1
  ///
  /// Rust arguments: ```fn new(()) -> ::cpp_utils::CppBox<::style_option_menu_item::StyleOptionMenuItem>```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QStyleOptionMenuItem::QStyleOptionMenuItem()```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#QStyleOptionMenuItem">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html">QStyleOptionMenuItem</a>, initializing the members variables to their default values.</p></div>
  ///
  /// ## Variant 2
  ///
  /// Rust arguments: ```fn new(&::style_option_menu_item::StyleOptionMenuItem) -> ::cpp_utils::CppBox<::style_option_menu_item::StyleOptionMenuItem>```<br>
  /// C++ method: <span style='color: green;'>```[constructor] void QStyleOptionMenuItem::QStyleOptionMenuItem(const QStyleOptionMenuItem& other)```</span>
  ///
  /// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#QStyleOptionMenuItem-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a copy of the <i>other</i> style option.</p></div>
  pub fn new<Args>(args: Args) -> ::cpp_utils::CppBox<::style_option_menu_item::StyleOptionMenuItem>
    where Args: overloading::StyleOptionMenuItemNewArgs
  {
    args.exec()
  }
  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_checkType(QStyleOptionMenuItem::CheckType value)```</span>
  ///
  ///
  pub fn set_check_type(&mut self, value: ::style_option_menu_item::CheckType) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_checkType(self as *mut ::style_option_menu_item::StyleOptionMenuItem, value)
    }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_checked(bool value)```</span>
  ///
  ///
  pub fn set_checked(&mut self, value: bool) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_checked(self as *mut ::style_option_menu_item::StyleOptionMenuItem,
                                                           value)
    }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_font(QFont value)```</span>
  ///
  ///
  pub fn set_font(&mut self, value: &::qt_gui::font::Font) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_font(self as *mut ::style_option_menu_item::StyleOptionMenuItem,
                                                        value as *const ::qt_gui::font::Font)
    }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_icon(QIcon value)```</span>
  ///
  ///
  pub fn set_icon(&mut self, value: &::qt_gui::icon::Icon) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_icon(self as *mut ::style_option_menu_item::StyleOptionMenuItem,
                                                        value as *const ::qt_gui::icon::Icon)
    }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_maxIconWidth(int value)```</span>
  ///
  ///
  pub fn set_max_icon_width(&mut self, value: ::libc::c_int) {
    unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_maxIconWidth(self as *mut ::style_option_menu_item::StyleOptionMenuItem, value) }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_menuHasCheckableItems(bool value)```</span>
  ///
  ///
  pub fn set_menu_has_checkable_items(&mut self, value: bool) {
    unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_menuHasCheckableItems(self as *mut ::style_option_menu_item::StyleOptionMenuItem, value) }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_menuItemType(QStyleOptionMenuItem::MenuItemType value)```</span>
  ///
  ///
  pub fn set_menu_item_type(&mut self, value: ::style_option_menu_item::MenuItemType) {
    unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_menuItemType(self as *mut ::style_option_menu_item::StyleOptionMenuItem, value) }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_menuRect(QRect value)```</span>
  ///
  ///
  pub fn set_menu_rect(&mut self, value: &::qt_core::rect::Rect) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_menuRect(self as *mut ::style_option_menu_item::StyleOptionMenuItem, value as *const ::qt_core::rect::Rect)
    }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_tabWidth(int value)```</span>
  ///
  ///
  pub fn set_tab_width(&mut self, value: ::libc::c_int) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_tabWidth(self as *mut ::style_option_menu_item::StyleOptionMenuItem, value)
    }
  }

  /// C++ method: <span style='color: green;'>```void QStyleOptionMenuItem::set_text(QString value)```</span>
  ///
  ///
  pub fn set_text(&mut self, value: &::qt_core::string::String) {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_set_text(self as *mut ::style_option_menu_item::StyleOptionMenuItem,
                                                        value as *const ::qt_core::string::String)
    }
  }

  /// C++ method: <span style='color: green;'>```int QStyleOptionMenuItem::tabWidth() const```</span>
  ///
  ///
  pub fn tab_width(&self) -> ::libc::c_int {
    unsafe {
      ::ffi::qt_widgets_c_QStyleOptionMenuItem_tabWidth(self as *const ::style_option_menu_item::StyleOptionMenuItem)
    }
  }

  /// C++ method: <span style='color: green;'>```const QString& QStyleOptionMenuItem::text() const```</span>
  ///
  ///
  pub fn text<'l0>(&'l0 self) -> &'l0 ::qt_core::string::String {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_text(self as *const ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }

  /// C++ method: <span style='color: green;'>```QString& QStyleOptionMenuItem::text_mut()```</span>
  ///
  ///
  pub fn text_mut<'l0>(&'l0 mut self) -> &'l0 mut ::qt_core::string::String {
    let ffi_result =
      unsafe {
        ::ffi::qt_widgets_c_QStyleOptionMenuItem_text_mut(self as *mut ::style_option_menu_item::StyleOptionMenuItem)
      };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::CppDeletable for ::style_option_menu_item::StyleOptionMenuItem {
  fn deleter() -> ::cpp_utils::Deleter<Self> {
    ::ffi::qt_widgets_c_QStyleOptionMenuItem_delete
  }
}

/// C++ type: <span style='color: green;'>```QStyleOptionMenuItem::StyleOptionType```</span>
///
/// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#StyleOptionType-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum is used to hold information about the type of the style option, and is defined for each <a href="http://doc.qt.io/qt-5/qstyleoption.html">QStyleOption</a> subclass.</p>
///
/// <p>The type is used internally by <a href="http://doc.qt.io/qt-5/qstyleoption.html">QStyleOption</a>, its subclasses, and <a href="http://doc.qt.io/qt-5/qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() to determine the type of style option. In general you do not need to worry about this unless you want to create your own <a href="http://doc.qt.io/qt-5/qstyleoption.html">QStyleOption</a> subclass and your own styles.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#StyleOptionVersion-enum">StyleOptionVersion</a>.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum StyleOptionType {
  /// This variant is added in Rust because enums with one variant and C representation are not supported.
  _Invalid = 0,
  /// The type of style option provided (<a href="http://doc.qt.io/qt-5/qstyleoption.html#OptionType-enum">SO_MenuItem</a> for this class). (C++ enum variant: <span style='color: green;'>```Type = 4```</span>)
  Type = 4,
}

/// C++ type: <span style='color: green;'>```QStyleOptionMenuItem::StyleOptionVersion```</span>
///
/// <a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#StyleOptionVersion-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum is used to hold information about the version of the style option, and is defined for each <a href="http://doc.qt.io/qt-5/qstyleoption.html">QStyleOption</a> subclass.</p>
///
/// <p>The version is used by <a href="http://doc.qt.io/qt-5/qstyleoption.html">QStyleOption</a> subclasses to implement extensions without breaking compatibility. If you use <a href="http://doc.qt.io/qt-5/qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>(), you normally do not need to check it.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qstyleoptionmenuitem.html#StyleOptionType-enum">StyleOptionType</a>.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum StyleOptionVersion {
  /// This variant is added in Rust because enums with one variant and C representation are not supported.
  _Invalid = 0,
  /// 1 (C++ enum variant: <span style='color: green;'>```Version = 1```</span>)
  Version = 1,
}

impl ::cpp_utils::StaticCast<::style_option::StyleOption> for ::style_option_menu_item::StyleOptionMenuItem {
  fn static_cast_mut(&mut self) -> &mut ::style_option::StyleOption {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_G_static_cast_QStyleOption_ptr(self as *mut ::style_option_menu_item::StyleOptionMenuItem) };
    unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
  }

  fn static_cast(&self) -> &::style_option::StyleOption {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_G_static_cast_QStyleOption_ptr(self as *const ::style_option_menu_item::StyleOptionMenuItem as *mut ::style_option_menu_item::StyleOptionMenuItem) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::cpp_utils::UnsafeStaticCast<::style_option_menu_item::StyleOptionMenuItem> for ::style_option::StyleOption {
  unsafe fn static_cast_mut(&mut self) -> &mut ::style_option_menu_item::StyleOptionMenuItem {
    let ffi_result = ::ffi::qt_widgets_c_QStyleOptionMenuItem_G_static_cast_QStyleOptionMenuItem_ptr(self as *mut ::style_option::StyleOption);
    ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
  }

  unsafe fn static_cast(&self) -> &::style_option_menu_item::StyleOptionMenuItem {
    let ffi_result = ::ffi::qt_widgets_c_QStyleOptionMenuItem_G_static_cast_QStyleOptionMenuItem_ptr(self as *const ::style_option::StyleOption as *mut ::style_option::StyleOption);
    ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::Deref for ::style_option_menu_item::StyleOptionMenuItem {
  type Target = ::style_option::StyleOption;
  fn deref(&self) -> &::style_option::StyleOption {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_G_static_cast_QStyleOption_ptr(self as *const ::style_option_menu_item::StyleOptionMenuItem as *mut ::style_option_menu_item::StyleOptionMenuItem) };
    unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
  }
}

impl ::std::ops::DerefMut for ::style_option_menu_item::StyleOptionMenuItem {
  fn deref_mut(&mut self) -> &mut ::style_option::StyleOption {
    let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_G_static_cast_QStyleOption_ptr(self as *mut ::style_option_menu_item::StyleOptionMenuItem) };
    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 [StyleOptionMenuItem::new](../struct.StyleOptionMenuItem.html#method.new) method.
  pub trait StyleOptionMenuItemNewArgs {
    fn exec(self) -> ::cpp_utils::CppBox<::style_option_menu_item::StyleOptionMenuItem>;
  }
  impl StyleOptionMenuItemNewArgs for () {
    fn exec(self) -> ::cpp_utils::CppBox<::style_option_menu_item::StyleOptionMenuItem> {

      let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_new_no_args() };
      unsafe { ::cpp_utils::CppBox::new(ffi_result) }
    }
  }
  impl<'a> StyleOptionMenuItemNewArgs for &'a ::style_option_menu_item::StyleOptionMenuItem {
    fn exec(self) -> ::cpp_utils::CppBox<::style_option_menu_item::StyleOptionMenuItem> {
      let other = self;
      let ffi_result = unsafe { ::ffi::qt_widgets_c_QStyleOptionMenuItem_new_other(other as *const ::style_option_menu_item::StyleOptionMenuItem) };
      unsafe { ::cpp_utils::CppBox::new(ffi_result) }
    }
  }
}