CCIMXDesktop
 
Loading...
Searching...
No Matches
DesktopUserInfo Class Reference

Manages the retrieval and provision of user-specific information within the desktop environment. More...

#include <DesktopUserInfo.h>

Inheritance diagram for DesktopUserInfo:

Public Slots

void start_init ()
 Initiates the user information initialization process.
 
UserInfoget_info ()
 Retrieves a pointer to the UserInfo object.
 

Signals

void user_init_ok (const UserInfo &info)
 Signal emitted when the user information has been successfully initialized.
 

Public Member Functions

 DesktopUserInfo (DesktopDirentLocationManager *parent=nullptr)
 Constructs a DesktopUserInfo object.
 

Detailed Description

Manages the retrieval and provision of user-specific information within the desktop environment.

This class is responsible for initializing and holding a UserInfo object, which contains details about the current user. It interacts with a DesktopDirentLocationManager to potentially locate user-specific configuration files or directories from where the UserInfo can be loaded.

It provides a slot to trigger the initialization process and a signal to indicate when the user information has been successfully loaded.

Constructor & Destructor Documentation

◆ DesktopUserInfo()

DesktopUserInfo::DesktopUserInfo ( DesktopDirentLocationManager parent = nullptr)
explicit

Constructs a DesktopUserInfo object.

Parameters
parentA pointer to the DesktopDirentLocationManager instance that this DesktopUserInfo object might use to locate user data. This also serves as the QObject parent for memory management. Defaults to nullptr.

Member Function Documentation

◆ get_info

UserInfo * DesktopUserInfo::get_info ( )
inlineslot

Retrieves a pointer to the UserInfo object.

Warning
The UserInfo object might not be fully initialized if start_init() has not completed or failed. Callers should check for initialization status or rely on the user_init_ok signal for certainty.
Returns
A raw pointer to the internal UserInfo object. get info, might be not inited!

◆ start_init

void DesktopUserInfo::start_init ( )
slot

Initiates the user information initialization process.

  • This slot triggers a one-time scan of the target file (presumably a user info configuration file or similar) to load the UserInfo data. After successful initialization, the user_init_ok signal will be emitted. start init will scan the target file once

◆ user_init_ok

void DesktopUserInfo::user_init_ok ( const UserInfo info)
signal

Signal emitted when the user information has been successfully initialized.

Parameters
infoA constant reference to the initialized UserInfo object.

The documentation for this class was generated from the following files: