Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CDiamarPanelTools Class Referencefinal

#include <CDiamarPanelTools.hpp>

Static Public Member Functions

static AbstractComponentGUIpanelViewLOM (uint16_t &idUnitSelectionOut, bool &hasSelectionOut, iv::types::unitId maxUnitId)
 
static AbstractComponentGUIpanelViewUnits (const std::function< void(iv::types::unitId)> &unitSelectionCallback, const std::optional< iv::types::unitId > &maxUnitId=std::nullopt)
 
static AbstractComponentGUIpanelViewGroups (const std::function< void(iv::types::groupId)> &groupSelectionCallback)
 
static AbstractComponentGUIpanelBlockedUsers (std::vector< std::pair< bool, std::weak_ptr< iv::diamar::UserProfile > > > &userProfilesRefs)
 
static AbstractComponentGUIpanelChangePassword (const std::weak_ptr< iv::diamar::UserProfile > &userProfilesRefs, bool requiresCurrentPassword, std::string *newPasswordInputRef)
 Panel para cambiar la contraseña de un perfil. Pide confirmación de contraseña.
 
static AbstractComponentGUIpanelChangeUsersRandomPassword (const std::vector< std::shared_ptr< iv::diamar::UserProfile > > &userProfilesRefs)
 
static AbstractComponentGUIpanelTypeAccess (const std::vector< std::shared_ptr< iv::diamar::UserProfile > > &userProfilesRefs, bool *hasPermissionOpt, bool canEditPassword, bool canEditSettings)
 Crea un panel listando los perfiles con la opción de iniciar sesión o de cambiar la contraseña. En caso de ser un usuario Root también tiene acceso a los paneles para cambiar los ajustes de los perfiles.
 
static std::optional< iv::diamar::eUserProfileTyperunDialogPermission (const std::vector< std::shared_ptr< iv::diamar::UserProfile > > &userProfiles, CDialog *dlgFather)
 
static AbstractComponentGUIleftImageDataPanel (const std::vector< std::tuple< std::string, std::string > > &parameters, const std::string &imagePath)
 
static AbstractComponentGUIpanelListChannels (const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsRef, IModelList *modelRef=nullptr, uint16_t minSizeY=400)
 
static AbstractComponentGUIpanelMultiLanguage (bool canBeEmpty, const std::string &errorMsg, const std::string &labelPrefix, iv::model::LocalizedText &languagesOut, uint64_t maxCharacters=30)
 

Static Private Member Functions

static void prvUpdateComponentAlarmColorState (iv::alarms::eAlarmState groupAlarmState, iv::alarms::eAlarmPriority groupAlarmPriority, AbstractComponentGUI *component)
 

Member Function Documentation

◆ leftImageDataPanel()

AbstractComponentGUI * CDiamarPanelTools::leftImageDataPanel ( const std::vector< std::tuple< std::string, std::string > > & parameters,
const std::string & imagePath )
static

This function returns a panel with an image at left and the list of key-value at right as to show values of a class or struct.

Parameters
parametersA vector with tuples of key value to show
imagePathThe path of the image to show at left
Returns
The mentioned panel

◆ panelBlockedUsers()

AbstractComponentGUI * CDiamarPanelTools::panelBlockedUsers ( std::vector< std::pair< bool, std::weak_ptr< iv::diamar::UserProfile > > > & userProfilesRefs)
static

Crea un panel que lista a los perfiles con un CheckButton para indicar si el usuario está o no bloqueado.

Parameters
userProfilesRefsVector con el perfil y un booleano para introducir si se bloquea o no.
Returns
Panel con listado de perfiles y opción de marcar como bloqueado o no.

◆ panelChangePassword()

AbstractComponentGUI * CDiamarPanelTools::panelChangePassword ( const std::weak_ptr< iv::diamar::UserProfile > & userProfilesRefs,
bool requiresCurrentPassword,
std::string * newPasswordInputRef )
static

Panel para cambiar la contraseña de un perfil. Pide confirmación de contraseña.

Parameters
userProfilesRefsPerfil al cual modificar la contraseña.
requiresCurrentPasswordSi requiere que introduzca la contraseña actual.
newPasswordInputRefReferencia donde escribirá la nueva contraseña.
Returns
AbstractComponentGUI con el panel que de cambio de contraseña.

◆ panelChangeUsersRandomPassword()

AbstractComponentGUI * CDiamarPanelTools::panelChangeUsersRandomPassword ( const std::vector< std::shared_ptr< iv::diamar::UserProfile > > & userProfilesRefs)
static

Crea el panel que lista a los perfiles con un botón que permite generar una nueva contraseña aleatoria. Requiere que el perfil activo sea el Root.

Parameters
userProfilesRefsVector con los perfiles a listar.
Returns
Panel con el listado de perfiles y la opción de generar una nueva contraseña.

◆ panelListChannels()

AbstractComponentGUI * CDiamarPanelTools::panelListChannels ( const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > & channelsRef,
IModelList * modelRef = nullptr,
uint16_t minSizeY = 400 )
static

◆ panelMultiLanguage()

AbstractComponentGUI * CDiamarPanelTools::panelMultiLanguage ( bool canBeEmpty,
const std::string & errorMsg,
const std::string & labelPrefix,
iv::model::LocalizedText & languagesOut,
uint64_t maxCharacters = 30 )
static

◆ panelTypeAccess()

AbstractComponentGUI * CDiamarPanelTools::panelTypeAccess ( const std::vector< std::shared_ptr< iv::diamar::UserProfile > > & userProfilesRefs,
bool * hasPermissionOpt,
bool canEditPassword,
bool canEditSettings )
static

Crea un panel listando los perfiles con la opción de iniciar sesión o de cambiar la contraseña. En caso de ser un usuario Root también tiene acceso a los paneles para cambiar los ajustes de los perfiles.

Parameters
userProfileManagerManager para controlar el perfil activo.
userProfilesRefsVector con los perfiles a mostrar.
configDiamarOptReferencia opcionar a CConfigDiamar.
hasPermissionOptSi se quiere obtener un permiso iniciando sesión a un perfil, se asigna el inicio correcto a esta referencia opcional.
canEditPasswordSi en el panel se debe permitir cambiar el password.
canEditSettingsSi en el panel se debe permitir cambiar los ajustes de los perfiles siendo perfil Root.
Returns
Panel con el listado de usuarios con la opción de logearse, cambiar la contraseña o modificar ajustes siendo Root.

◆ panelViewGroups()

AbstractComponentGUI * CDiamarPanelTools::panelViewGroups ( const std::function< void(iv::types::groupId)> & groupSelectionCallback)
static

◆ panelViewLOM()

AbstractComponentGUI * CDiamarPanelTools::panelViewLOM ( uint16_t & idUnitSelectionOut,
bool & hasSelectionOut,
iv::types::unitId maxUnitId )
static

◆ panelViewUnits()

AbstractComponentGUI * CDiamarPanelTools::panelViewUnits ( const std::function< void(iv::types::unitId)> & unitSelectionCallback,
const std::optional< iv::types::unitId > & maxUnitId = std::nullopt )
static

◆ prvUpdateComponentAlarmColorState()

void CDiamarPanelTools::prvUpdateComponentAlarmColorState ( iv::alarms::eAlarmState groupAlarmState,
iv::alarms::eAlarmPriority groupAlarmPriority,
AbstractComponentGUI * component )
staticprivate

◆ runDialogPermission()

std::optional< iv::diamar::eUserProfileType > CDiamarPanelTools::runDialogPermission ( const std::vector< std::shared_ptr< iv::diamar::UserProfile > > & userProfiles,
CDialog * dlgFather )
static

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