.. _api_UiLoader: UiLoader ======== Inherited: :ref:`Widget` .. _api_UiLoader_description: Description ----------- The UiLoader class is tasked with loading user interface (UI) data from a buffer (likely an XML or similar format), managing the UI document, applying styles to the UI elements, and maintaining a hierarchy of widgets. This class appears to be part of a larger UI framework that supports widget-based layouts. .. _api_UiLoader_public: Public Methods -------------- +--------------------------------------+-------------------------------------------------------------------+ | :ref:`UiDocument` * | :ref:`document` () const | +--------------------------------------+-------------------------------------------------------------------+ | void | :ref:`documentLoaded` () | +--------------------------------------+-------------------------------------------------------------------+ | :ref:`TString` | :ref:`documentStyle` () const | +--------------------------------------+-------------------------------------------------------------------+ | void | :ref:`fromBuffer` (const TString & buffer) | +--------------------------------------+-------------------------------------------------------------------+ | void | :ref:`setDocument` (UiDocument * document) | +--------------------------------------+-------------------------------------------------------------------+ | void | :ref:`setStyleSheet` (StyleSheet * style) | +--------------------------------------+-------------------------------------------------------------------+ | :ref:`StyleSheet` * | :ref:`styleSheet` () const | +--------------------------------------+-------------------------------------------------------------------+ .. _api_UiLoader_static: Static Methods -------------- None .. _api_UiLoader_methods: Methods Description ------------------- .. _api_UiLoader_d1fc497b: :ref:`UiDocument` * **UiLoader::document** () const Returns the UiDocument associated with this UiLoader, which contains the structure of the loaded UI. **See also** setDocument(). ---- .. _api_UiLoader_321460cb: void **UiLoader::documentLoaded** () Emmits signal when document is loaded. ---- .. _api_UiLoader_fba9c4d8: :ref:`TString` **UiLoader::documentStyle** () const Returns the raw document style (as a string), which was parsed from the UI document. ---- .. _api_UiLoader_ce864791: void **UiLoader::fromBuffer** (:ref:`TString` & *buffer*) This function loads the UI data from an XML *buffer* (likely containing UI element definitions and style information). ---- .. _api_UiLoader_bd8c4295: void **UiLoader::setDocument** (:ref:`UiDocument` * *document*) Sets the UI *document* to the provided *document* pointer and reloads the UI from the document's data buffer by calling fromBuffer(). **See also** document(). ---- .. _api_UiLoader_5b3786ed: void **UiLoader::setStyleSheet** (:ref:`StyleSheet` * *style*) Sets a *style* sheet to the hierarhy of widgets. **See also** styleSheet(). ---- .. _api_UiLoader_7cbae293: :ref:`StyleSheet` * **UiLoader::styleSheet** () const Returns the style sheet assigned to the hierarchy of widgets. This contains the visual styles (like colors, margins, fonts, etc.) that should be applied to the widgets. **See also** setStyleSheet().