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 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
#![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) } }