#![cfg_attr(feature = "ritual_rustdoc_nightly", feature(doc_cfg))]
//! Bindings for QtUiTools C++ library.
//!
//! Starting guide and examples are available at
//!       [https://github.com/rust-qt/examples](https://github.com/rust-qt/examples).
//!
//! This crate was generated for Qt 5.9.7, 5.11.3, 5.12.2, 5.13.0, 5.14.0.
//!         It should work with other Qt versions later than 5.9.7,
//!         but API specific to other versions will not be available.
//!
//! This crate was generated by `ritual`.
//!           See [README](https://github.com/rust-qt/ritual) for more information.
mod impl_ui_loader;
pub use qt_macros::ui_form;
mod __ffi {
//! Functions provided by the C++ wrapper library
include!(concat!(env!("OUT_DIR"), "/ffi.rs"));
}
pub use ::cpp_core;
pub use ::qt_core;
pub use ::qt_gui;
pub use ::qt_widgets;
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class enables standalone applications to dynamically create user interfaces at run-time using the information stored in UI files or specified in plugin paths.</p>
///
/// C++ class: <span style='color: green;'>```QUiLoader```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class enables standalone applications to dynamically create user interfaces at run-time using the information stored in UI files or specified in plugin paths.</p>
/// <p>In addition, you can customize or create your own user interface by deriving your own loader class.</p>
/// <p>If you have a custom component or an application that embeds <i>Qt Designer</i>, you can also use the <a href="http://doc.qt.io/qt-5/qformbuilder.html">QFormBuilder</a> class provided by the <a href="http://doc.qt.io/qt-5/qtdesigner-module.html">QtDesigner</a> module to create user interfaces from UI files.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class provides a collection of functions allowing you to create widgets based on the information stored in UI files (created with <i>Qt Designer</i>) or available in the specified plugin paths. The specified plugin paths can be retrieved using the <a href="http://doc.qt.io/qt-5/quiloader.html#pluginPaths">pluginPaths</a>() function. Similarly, the contents of a UI file can be retrieved using the <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>() function. For example:</p>
/// <pre class="cpp">
///
/// MyWidget<span class="operator">::</span>MyWidget(<span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>parent)
///   : <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span>(parent)
/// {
///   <span class="type"><a href="http://doc.qt.io/qt-5/quiloader.html#QUiLoader">QUiLoader</a></span> loader;
///   <span class="type"><a href="http://doc.qt.io/qt-5/qfile.html">QFile</a></span> file(<span class="string">":/forms/myform.ui"</span>);
///   file<span class="operator">.</span>open(<span class="type"><a href="http://doc.qt.io/qt-5/qfile.html">QFile</a></span><span class="operator">::</span>ReadOnly);
///   <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>myWidget <span class="operator">=</span> loader<span class="operator">.</span>load(<span class="operator">&</span>file<span class="operator">,</span> <span class="keyword">this</span>);
///   file<span class="operator">.</span>close();
///
///   <span class="type"><a href="http://doc.qt.io/qt-5/qvboxlayout.html">QVBoxLayout</a></span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="http://doc.qt.io/qt-5/qvboxlayout.html">QVBoxLayout</a></span>;
///   layout<span class="operator">-</span><span class="operator">></span>addWidget(myWidget);
///   setLayout(layout);
/// }
///
/// </pre>
/// <p>By including the user interface in the form's resources (<code>myform.qrc</code>), we ensure that it will be present at run-time:</p>
/// <pre class="cpp">
///
/// <!DOCTYPE RCC><RCC version="1.0">
/// <qresource prefix="/forms">
/// <file>myform.ui</file>
/// </qresource>
/// </RCC>
///
/// </pre>
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function returns a <a href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> with the class names of the widgets available in the specified plugin paths. To create these widgets, simply use the <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() function. For example:</p>
/// <pre class="cpp">
///
/// <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>loadCustomWidget(<span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>parent)
/// {
///   <span class="type"><a href="http://doc.qt.io/qt-5/quiloader.html#QUiLoader">QUiLoader</a></span> loader;
///   <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>myWidget;
///
///   <span class="type"><a href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a></span> availableWidgets <span class="operator">=</span> loader<span class="operator">.</span>availableWidgets();
///
///   <span class="keyword">if</span> (availableWidgets<span class="operator">.</span>contains(<span class="string">"AnalogClock"</span>))
///     myWidget <span class="operator">=</span> loader<span class="operator">.</span>createWidget(<span class="string">"AnalogClock"</span><span class="operator">,</span> parent);
///
///   <span class="keyword">return</span> myWidget;
/// }
///
/// </pre>
/// <p>To make a custom widget available to the loader, you can use the <a href="http://doc.qt.io/qt-5/quiloader.html#addPluginPath">addPluginPath</a>() function; to remove all available widgets, you can call the <a href="http://doc.qt.io/qt-5/quiloader.html#clearPluginPaths">clearPluginPaths</a>() function.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html#createAction">createAction</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">createActionGroup</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">createLayout</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() functions are used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it has to create an action, action group, layout, or widget respectively. For that reason, you can subclass the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class and reimplement these functions to intervene the process of constructing a user interface. For example, you might want to have a list of the actions created when loading a form or creating a custom widget.</p>
/// <p>For a complete example using the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class, see the <a href="http://doc.qt.io/qt-5/qtdesigner-calculatorbuilder-example.html">Calculator Builder Example</a>.</p></div>
#[repr(C)]
pub struct QUiLoader {
_unused: u8,
}
impl QUiLoader {
/// <p>Adds the given <i>path</i> to the list of paths in which the loader will search when locating plugins.</p>
///
/// Calls C++ function: <span style='color: green;'>```void QUiLoader::addPluginPath(const QString& path)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#addPluginPath">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Adds the given <i>path</i> to the list of paths in which the loader will search when locating plugins.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#pluginPaths">pluginPaths</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#clearPluginPaths">clearPluginPaths</a>().</p></div>
#[inline(always)]
pub unsafe fn add_plugin_path(
&self,
path: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_addPluginPath(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(path)
.as_raw_ptr(),
)
}
/// <p>Returns a list naming all available layouts that can be built using the <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">createLayout</a>() function</p>
///
/// Calls C++ function: <span style='color: green;'>```QStringList QUiLoader::availableLayouts() const```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#availableLayouts">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns a list naming all available layouts that can be built using the <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">createLayout</a>() function</p>
/// <p>This function was introduced in Qt 4.5.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">createLayout</a>().</p></div>
#[inline(always)]
pub unsafe fn available_layouts(&self) -> ::cpp_core::CppBox<::qt_core::QStringList> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_availableLayouts(
self as *const crate::QUiLoader,
)
};
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
/// <p>Returns a list naming all available widgets that can be built using the <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() function, i.e all the widgets specified within the given plugin paths.</p>
///
/// Calls C++ function: <span style='color: green;'>```QStringList QUiLoader::availableWidgets() const```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns a list naming all available widgets that can be built using the <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() function, i.e all the widgets specified within the given plugin paths.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#pluginPaths">pluginPaths</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>().</p></div>
#[inline(always)]
pub unsafe fn available_widgets(&self) -> ::cpp_core::CppBox<::qt_core::QStringList> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_availableWidgets(
self as *const crate::QUiLoader,
)
};
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
/// <p>Clears the list of paths in which the loader will search when locating plugins.</p>
///
/// Calls C++ function: <span style='color: green;'>```void QUiLoader::clearPluginPaths()```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#clearPluginPaths">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Clears the list of paths in which the loader will search when locating plugins.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#addPluginPath">addPluginPath</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#pluginPaths">pluginPaths</a>().</p></div>
#[inline(always)]
pub unsafe fn clear_plugin_paths(&self) {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_clearPluginPaths(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
)
}
/// <p>Creates a new action with the given <i>parent</i> and <i>name</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QAction* QUiLoader::createAction(QObject* parent = …, const QString& name = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createAction">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new action with the given <i>parent</i> and <i>name</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">createActionGroup</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_action_2a(
&self,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) -> ::qt_core::QPtr<::qt_widgets::QAction> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createAction(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(name)
.as_raw_ptr(),
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new action with the given <i>parent</i> and <i>name</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QAction* QUiLoader::createAction(QObject* parent = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createAction">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new action with the given <i>parent</i> and <i>name</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">createActionGroup</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_action_1a(
&self,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
) -> ::qt_core::QPtr<::qt_widgets::QAction> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createAction1(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new action with the given <i>parent</i> and <i>name</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QAction* QUiLoader::createAction()```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createAction">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new action with the given <i>parent</i> and <i>name</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">createActionGroup</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_action_0a(&self) -> ::qt_core::QPtr<::qt_widgets::QAction> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createAction2(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new action group with the given <i>parent</i> and <i>name</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QActionGroup* QUiLoader::createActionGroup(QObject* parent = …, const QString& name = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new action group with the given <i>parent</i> and <i>name</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createAction">createAction</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_action_group_2a(
&self,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) -> ::qt_core::QPtr<::qt_widgets::QActionGroup> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createActionGroup(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(name)
.as_raw_ptr(),
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new action group with the given <i>parent</i> and <i>name</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QActionGroup* QUiLoader::createActionGroup(QObject* parent = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new action group with the given <i>parent</i> and <i>name</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createAction">createAction</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_action_group_1a(
&self,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
) -> ::qt_core::QPtr<::qt_widgets::QActionGroup> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createActionGroup1(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new action group with the given <i>parent</i> and <i>name</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QActionGroup* QUiLoader::createActionGroup()```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new action group with the given <i>parent</i> and <i>name</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createAction">createAction</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_action_group_0a(&self) -> ::qt_core::QPtr<::qt_widgets::QActionGroup> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createActionGroup2(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new layout with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QLayout* QUiLoader::createLayout(const QString& className, QObject* parent = …, const QString& name = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new layout with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_layout_3a(
&self,
class_name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) -> ::qt_core::QPtr<::qt_widgets::QLayout> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createLayout(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(class_name)
.as_raw_ptr(),
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(name)
.as_raw_ptr(),
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new layout with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QLayout* QUiLoader::createLayout(const QString& className, QObject* parent = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new layout with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_layout_2a(
&self,
class_name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
) -> ::qt_core::QPtr<::qt_widgets::QLayout> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createLayout1(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(class_name)
.as_raw_ptr(),
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new layout with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QLayout* QUiLoader::createLayout(const QString& className)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new layout with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_layout_1a(
&self,
class_name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) -> ::qt_core::QPtr<::qt_widgets::QLayout> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createLayout2(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(class_name)
.as_raw_ptr(),
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new widget with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>. You can use this function to create any of the widgets returned by the <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QWidget* QUiLoader::createWidget(const QString& className, QWidget* parent = …, const QString& name = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new widget with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>. You can use this function to create any of the widgets returned by the <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_widget_3a(
&self,
class_name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_widgets::QWidget>>,
name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) -> ::qt_core::QPtr<::qt_widgets::QWidget> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createWidget(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(class_name)
.as_raw_ptr(),
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_widgets::QWidget>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_widgets::QWidget,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(name)
.as_raw_ptr(),
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new widget with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>. You can use this function to create any of the widgets returned by the <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QWidget* QUiLoader::createWidget(const QString& className, QWidget* parent = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new widget with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>. You can use this function to create any of the widgets returned by the <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_widget_2a(
&self,
class_name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_widgets::QWidget>>,
) -> ::qt_core::QPtr<::qt_widgets::QWidget> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createWidget1(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(class_name)
.as_raw_ptr(),
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_widgets::QWidget>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_widgets::QWidget,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Creates a new widget with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>. You can use this function to create any of the widgets returned by the <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual QWidget* QUiLoader::createWidget(const QString& className)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a new widget with the given <i>parent</i> and <i>name</i> using the class specified by <i>className</i>. You can use this function to create any of the widgets returned by the <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function.</p>
/// <p>The function is also used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it creates a widget. Hence, you can subclass <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> and reimplement this function to intervene process of constructing a user interface or widget. However, in your implementation, ensure that you call <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a>'s version first.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn create_widget_1a(
&self,
class_name: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>,
) -> ::qt_core::QPtr<::qt_widgets::QWidget> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_createWidget2(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(class_name)
.as_raw_ptr(),
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Returns a human-readable description of the last error occurred in <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p>
///
/// Calls C++ function: <span style='color: green;'>```QString QUiLoader::errorString() const```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#errorString">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns a human-readable description of the last error occurred in <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p>
/// <p>This function was introduced in Qt 5.0.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>().</p></div>
#[inline(always)]
pub unsafe fn error_string(&self) -> ::cpp_core::CppBox<::qt_core::QString> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_errorString(self as *const crate::QUiLoader)
};
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
/// <p>Returns true if dynamic retranslation on language change is enabled; returns false otherwise.</p>
///
/// Calls C++ function: <span style='color: green;'>```bool QUiLoader::isLanguageChangeEnabled() const```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#isLanguageChangeEnabled">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns true if dynamic retranslation on language change is enabled; returns false otherwise.</p>
/// <p>This function was introduced in Qt 4.5.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#setLanguageChangeEnabled">setLanguageChangeEnabled</a>().</p></div>
#[inline(always)]
pub unsafe fn is_language_change_enabled(&self) -> bool {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_isLanguageChangeEnabled(
self as *const crate::QUiLoader,
)
}
/// Calls C++ function: <span style='color: green;'>```bool QUiLoader::isTranslationEnabled() const```</span>.
#[inline(always)]
pub unsafe fn is_translation_enabled(&self) -> bool {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_isTranslationEnabled(
self as *const crate::QUiLoader,
)
}
/// <p>Loads a form from the given <i>device</i> and creates a new widget with the given <i>parentWidget</i> to hold its contents.</p>
///
/// Calls C++ function: <span style='color: green;'>```QWidget* QUiLoader::load(QIODevice* device, QWidget* parentWidget = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#load">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Loads a form from the given <i>device</i> and creates a new widget with the given <i>parentWidget</i> to hold its contents.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#errorString">errorString</a>().</p></div>
#[inline(always)]
pub unsafe fn load_2a(
&self,
device: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QIODevice>>,
parent_widget: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_widgets::QWidget>>,
) -> ::qt_core::QPtr<::qt_widgets::QWidget> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_load(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QIODevice>>::cast_into(device)
.as_raw_ptr() as *mut ::qt_core::QIODevice,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_widgets::QWidget>>::cast_into(
parent_widget,
)
.as_raw_ptr() as *mut ::qt_widgets::QWidget,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// <p>Loads a form from the given <i>device</i> and creates a new widget with the given <i>parentWidget</i> to hold its contents.</p>
///
/// Calls C++ function: <span style='color: green;'>```QWidget* QUiLoader::load(QIODevice* device)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#load">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Loads a form from the given <i>device</i> and creates a new widget with the given <i>parentWidget</i> to hold its contents.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#errorString">errorString</a>().</p></div>
#[inline(always)]
pub unsafe fn load_1a(
&self,
device: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QIODevice>>,
) -> ::qt_core::QPtr<::qt_widgets::QWidget> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_load1(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QIODevice>>::cast_into(device)
.as_raw_ptr() as *mut ::qt_core::QIODevice,
)
};
::qt_core::QPtr::from_raw(ffi_result)
}
/// Calls C++ function: <span style='color: green;'>```virtual const QMetaObject* QUiLoader::metaObject() const```</span>.
#[inline(always)]
pub unsafe fn meta_object(&self) -> ::cpp_core::Ptr<::qt_core::QMetaObject> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_metaObject(self as *const crate::QUiLoader)
};
::cpp_core::Ptr::from_raw(ffi_result as *mut ::qt_core::QMetaObject)
}
/// <p>Creates a form loader with the given <i>parent</i>.</p>
///
/// Calls C++ function: <span style='color: green;'>```[constructor] void QUiLoader::QUiLoader(QObject* parent = …)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#QUiLoader">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Creates a form loader with the given <i>parent</i>.</p></div>
#[inline(always)]
pub unsafe fn new_1a(
parent: impl ::cpp_core::CastInto<::cpp_core::Ptr<::qt_core::QObject>>,
) -> ::qt_core::QBox<crate::QUiLoader> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_QUiLoader(
::cpp_core::CastInto::<::cpp_core::Ptr<::qt_core::QObject>>::cast_into(parent)
.as_raw_ptr() as *mut ::qt_core::QObject,
)
};
::qt_core::QBox::from_raw(ffi_result)
}
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class enables standalone applications to dynamically create user interfaces at run-time using the information stored in UI files or specified in plugin paths.</p>
///
/// Calls C++ function: <span style='color: green;'>```[constructor] void QUiLoader::QUiLoader()```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class enables standalone applications to dynamically create user interfaces at run-time using the information stored in UI files or specified in plugin paths.</p>
/// <p>In addition, you can customize or create your own user interface by deriving your own loader class.</p>
/// <p>If you have a custom component or an application that embeds <i>Qt Designer</i>, you can also use the <a href="http://doc.qt.io/qt-5/qformbuilder.html">QFormBuilder</a> class provided by the <a href="http://doc.qt.io/qt-5/qtdesigner-module.html">QtDesigner</a> module to create user interfaces from UI files.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class provides a collection of functions allowing you to create widgets based on the information stored in UI files (created with <i>Qt Designer</i>) or available in the specified plugin paths. The specified plugin paths can be retrieved using the <a href="http://doc.qt.io/qt-5/quiloader.html#pluginPaths">pluginPaths</a>() function. Similarly, the contents of a UI file can be retrieved using the <a href="http://doc.qt.io/qt-5/quiloader.html#load">load</a>() function. For example:</p>
/// <pre class="cpp">
///
/// MyWidget<span class="operator">::</span>MyWidget(<span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>parent)
///   : <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span>(parent)
/// {
///   <span class="type"><a href="http://doc.qt.io/qt-5/quiloader.html#QUiLoader">QUiLoader</a></span> loader;
///   <span class="type"><a href="http://doc.qt.io/qt-5/qfile.html">QFile</a></span> file(<span class="string">":/forms/myform.ui"</span>);
///   file<span class="operator">.</span>open(<span class="type"><a href="http://doc.qt.io/qt-5/qfile.html">QFile</a></span><span class="operator">::</span>ReadOnly);
///   <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>myWidget <span class="operator">=</span> loader<span class="operator">.</span>load(<span class="operator">&</span>file<span class="operator">,</span> <span class="keyword">this</span>);
///   file<span class="operator">.</span>close();
///
///   <span class="type"><a href="http://doc.qt.io/qt-5/qvboxlayout.html">QVBoxLayout</a></span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="http://doc.qt.io/qt-5/qvboxlayout.html">QVBoxLayout</a></span>;
///   layout<span class="operator">-</span><span class="operator">></span>addWidget(myWidget);
///   setLayout(layout);
/// }
///
/// </pre>
/// <p>By including the user interface in the form's resources (<code>myform.qrc</code>), we ensure that it will be present at run-time:</p>
/// <pre class="cpp">
///
/// <!DOCTYPE RCC><RCC version="1.0">
/// <qresource prefix="/forms">
/// <file>myform.ui</file>
/// </qresource>
/// </RCC>
///
/// </pre>
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html#availableWidgets">availableWidgets</a>() function returns a <a href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> with the class names of the widgets available in the specified plugin paths. To create these widgets, simply use the <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() function. For example:</p>
/// <pre class="cpp">
///
/// <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>loadCustomWidget(<span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>parent)
/// {
///   <span class="type"><a href="http://doc.qt.io/qt-5/quiloader.html#QUiLoader">QUiLoader</a></span> loader;
///   <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>myWidget;
///
///   <span class="type"><a href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a></span> availableWidgets <span class="operator">=</span> loader<span class="operator">.</span>availableWidgets();
///
///   <span class="keyword">if</span> (availableWidgets<span class="operator">.</span>contains(<span class="string">"AnalogClock"</span>))
///     myWidget <span class="operator">=</span> loader<span class="operator">.</span>createWidget(<span class="string">"AnalogClock"</span><span class="operator">,</span> parent);
///
///   <span class="keyword">return</span> myWidget;
/// }
///
/// </pre>
/// <p>To make a custom widget available to the loader, you can use the <a href="http://doc.qt.io/qt-5/quiloader.html#addPluginPath">addPluginPath</a>() function; to remove all available widgets, you can call the <a href="http://doc.qt.io/qt-5/quiloader.html#clearPluginPaths">clearPluginPaths</a>() function.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/quiloader.html#createAction">createAction</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createActionGroup">createActionGroup</a>(), <a href="http://doc.qt.io/qt-5/quiloader.html#createLayout">createLayout</a>(), and <a href="http://doc.qt.io/qt-5/quiloader.html#createWidget">createWidget</a>() functions are used internally by the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class whenever it has to create an action, action group, layout, or widget respectively. For that reason, you can subclass the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class and reimplement these functions to intervene the process of constructing a user interface. For example, you might want to have a list of the actions created when loading a form or creating a custom widget.</p>
/// <p>For a complete example using the <a href="http://doc.qt.io/qt-5/quiloader.html">QUiLoader</a> class, see the <a href="http://doc.qt.io/qt-5/qtdesigner-calculatorbuilder-example.html">Calculator Builder Example</a>.</p></div>
#[inline(always)]
pub unsafe fn new_0a() -> ::qt_core::QBox<crate::QUiLoader> {
let ffi_result = { crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_QUiLoader1() };
::qt_core::QBox::from_raw(ffi_result)
}
/// <p>Returns a list naming the paths in which the loader will search when locating custom widget plugins.</p>
///
/// Calls C++ function: <span style='color: green;'>```QStringList QUiLoader::pluginPaths() const```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#pluginPaths">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns a list naming the paths in which the loader will search when locating custom widget plugins.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#addPluginPath">addPluginPath</a>() and <a href="http://doc.qt.io/qt-5/quiloader.html#clearPluginPaths">clearPluginPaths</a>().</p></div>
#[inline(always)]
pub unsafe fn plugin_paths(&self) -> ::cpp_core::CppBox<::qt_core::QStringList> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_pluginPaths(self as *const crate::QUiLoader)
};
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
/// Calls C++ function: <span style='color: green;'>```virtual int QUiLoader::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)```</span>.
#[inline(always)]
pub unsafe fn qt_metacall(
&self,
arg1: ::qt_core::q_meta_object::Call,
arg2: ::std::os::raw::c_int,
arg3: *mut *mut ::std::ffi::c_void,
) -> ::std::os::raw::c_int {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_qt_metacall(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
arg1,
arg2,
arg3,
)
}
/// Calls C++ function: <span style='color: green;'>```virtual void* QUiLoader::qt_metacast(const char* arg1)```</span>.
#[inline(always)]
pub unsafe fn qt_metacast(
&self,
arg1: *const ::std::os::raw::c_char,
) -> *mut ::std::ffi::c_void {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_qt_metacast(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
arg1,
)
}
/// <p>If <i>enabled</i> is true, user interfaces loaded by this loader will automatically retranslate themselves upon receiving a language change event. Otherwise, the user interfaces will not be retranslated.</p>
///
/// Calls C++ function: <span style='color: green;'>```void QUiLoader::setLanguageChangeEnabled(bool enabled)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#setLanguageChangeEnabled">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>If <i>enabled</i> is true, user interfaces loaded by this loader will automatically retranslate themselves upon receiving a language change event. Otherwise, the user interfaces will not be retranslated.</p>
/// <p>This function was introduced in Qt 4.5.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#isLanguageChangeEnabled">isLanguageChangeEnabled</a>().</p></div>
#[inline(always)]
pub unsafe fn set_language_change_enabled(&self, enabled: bool) {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_setLanguageChangeEnabled(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
enabled,
)
}
/// Calls C++ function: <span style='color: green;'>```void QUiLoader::setTranslationEnabled(bool enabled)```</span>.
#[inline(always)]
pub unsafe fn set_translation_enabled(&self, enabled: bool) {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_setTranslationEnabled(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
enabled,
)
}
/// <p>Sets the working directory of the loader to <i>dir</i>. The loader will look for other resources, such as icons and resource files, in paths relative to this directory.</p>
///
/// Calls C++ function: <span style='color: green;'>```void QUiLoader::setWorkingDirectory(const QDir& dir)```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#setWorkingDirectory">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets the working directory of the loader to <i>dir</i>. The loader will look for other resources, such as icons and resource files, in paths relative to this directory.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#workingDirectory">workingDirectory</a>().</p></div>
#[inline(always)]
pub unsafe fn set_working_directory(
&self,
dir: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QDir>>,
) {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_setWorkingDirectory(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QDir>>::cast_into(dir).as_raw_ptr(),
)
}
/// Returns a reference to the <span style='color: green;'>```staticMetaObject```</span> field.
#[inline(always)]
pub unsafe fn static_meta_object() -> ::cpp_core::Ref<::qt_core::QMetaObject> {
let ffi_result = { crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_staticMetaObject() };
::cpp_core::Ref::from_raw(ffi_result as *mut ::qt_core::QMetaObject)
.expect("attempted to construct a null Ref")
}
/// Calls C++ function: <span style='color: green;'>```static QString QUiLoader::tr(const char* s, const char* c, int n)```</span>.
#[inline(always)]
pub unsafe fn tr(
s: *const ::std::os::raw::c_char,
c: *const ::std::os::raw::c_char,
n: ::std::os::raw::c_int,
) -> ::cpp_core::CppBox<::qt_core::QString> {
let ffi_result = { crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_tr(s, c, n) };
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
/// Calls C++ function: <span style='color: green;'>```static QString QUiLoader::trUtf8(const char* s, const char* c, int n)```</span>.
#[inline(always)]
pub unsafe fn tr_utf8(
s: *const ::std::os::raw::c_char,
c: *const ::std::os::raw::c_char,
n: ::std::os::raw::c_int,
) -> ::cpp_core::CppBox<::qt_core::QString> {
let ffi_result = { crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_trUtf8(s, c, n) };
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
/// <p>Returns the working directory of the loader.</p>
///
/// Calls C++ function: <span style='color: green;'>```QDir QUiLoader::workingDirectory() const```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#workingDirectory">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the working directory of the loader.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/quiloader.html#setWorkingDirectory">setWorkingDirectory</a>().</p></div>
#[inline(always)]
pub unsafe fn working_directory(&self) -> ::cpp_core::CppBox<::qt_core::QDir> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_workingDirectory(
self as *const crate::QUiLoader,
)
};
::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox")
}
}
impl ::cpp_core::CppDeletable for crate::QUiLoader {
/// <p>Destroys the loader.</p>
///
/// Calls C++ function: <span style='color: green;'>```virtual [destructor] void QUiLoader::~QUiLoader()```</span>.
///
/// <a href="http://doc.qt.io/qt-5/quiloader.html#dtor.QUiLoader">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Destroys the loader.</p></div>
#[inline(always)]
unsafe fn delete(&self) {
crate::__ffi::ctr_qt_ui_tools_ffi_QUiLoader_dQUiLoader(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
)
}
}
impl ::cpp_core::StaticDowncast<crate::QUiLoader> for ::qt_core::QObject {
/// Calls C++ function: <span style='color: green;'>```QUiLoader* static_cast<QUiLoader*>(QObject* ptr)```</span>.
#[inline(always)]
unsafe fn static_downcast(
ptr: ::cpp_core::Ptr<::qt_core::QObject>,
) -> ::cpp_core::Ptr<crate::QUiLoader> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_static_cast_QUiLoader_ptr(
ptr.as_raw_ptr() as *mut ::qt_core::QObject
)
};
::cpp_core::Ptr::from_raw(ffi_result)
}
}
impl ::cpp_core::StaticUpcast<::qt_core::QObject> for crate::QUiLoader {
/// Calls C++ function: <span style='color: green;'>```QObject* static_cast<QObject*>(QUiLoader* ptr)```</span>.
#[inline(always)]
unsafe fn static_upcast(
ptr: ::cpp_core::Ptr<crate::QUiLoader>,
) -> ::cpp_core::Ptr<::qt_core::QObject> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_static_cast_QObject_ptr(
ptr.as_raw_ptr() as *mut crate::QUiLoader
)
};
::cpp_core::Ptr::from_raw(ffi_result)
}
}
impl ::std::ops::Deref for crate::QUiLoader {
type Target = ::qt_core::QObject;
/// Calls C++ function: <span style='color: green;'>```QObject* static_cast<QObject*>(QUiLoader* ptr)```</span>.
#[inline(always)]
fn deref(&self) -> &::qt_core::QObject {
let ffi_result = {
unsafe {
crate::__ffi::ctr_qt_ui_tools_ffi_static_cast_QObject_ptr(
self as *const crate::QUiLoader as *mut crate::QUiLoader,
)
}
};
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_core::DynamicCast<crate::QUiLoader> for ::qt_core::QObject {
/// Calls C++ function: <span style='color: green;'>```QUiLoader* dynamic_cast<QUiLoader*>(QObject* ptr)```</span>.
#[inline(always)]
unsafe fn dynamic_cast(
ptr: ::cpp_core::Ptr<::qt_core::QObject>,
) -> ::cpp_core::Ptr<crate::QUiLoader> {
let ffi_result = {
crate::__ffi::ctr_qt_ui_tools_ffi_dynamic_cast_QUiLoader_ptr(
ptr.as_raw_ptr() as *mut ::qt_core::QObject
)
};
::cpp_core::Ptr::from_raw(ffi_result)
}
}