CUserGuiComp.h
Go to the documentation of this file.
1 #ifndef _qqtauth_CUserGuiComp_included
2 #define _qqtauth_CUserGuiComp_included
3 
4 
5 // ACF includes
7 #include "ilog/TLoggerCompWrap.h"
9 
10 // ACF-Solutions includes
11 #include "iauth/IRightsProvider.h"
12 #include "iauth/ILogin.h"
13 #include "iauth/IUsersManager.h"
14 #include "iauth/IPasswordChanger.h"
15 
16 #include "GeneratedFiles/iqtauth/ui_CUserGuiComp.h"
17 
18 
19 namespace iqtauth
20 {
21 
22 
24  public ilog::TLoggerCompWrap<
25  iqtgui::TDesignerGuiObserverCompBase<
26  Ui::CUserGuiComp, iauth::IUsersManager> >,
28  virtual public iauth::IPasswordChanger
29 {
30  Q_OBJECT
31 
32 public:
33  typedef ilog::TLoggerCompWrap<
35  Ui::CUserGuiComp, iauth::IUsersManager> > BaseClass;
36 
37  I_BEGIN_COMPONENT(CUserGuiComp);
38  I_REGISTER_INTERFACE(iauth::IPasswordChanger);
39  I_ASSIGN(m_rightsProviderIfPtr, "RightsProvider", "RightsProvider", false, "RightsProvider");
40  I_ASSIGN(m_rightsModelIfPtr, "RightsProvider", "RightsProvider", true, "RightsProvider");
41  I_ASSIGN(m_userLoginIfPtr, "RightsProvider", "RightsProvider", true, "RightsProvider");
42  I_ASSIGN(m_usersManagerRightIdAttrPtr, "UsersManagerRightId", "Right ID for user manager", false, "");
43  I_ASSIGN(m_changePasswordRightIdAttrPtr, "ChangePasswordRightsId", "Right ID for changing password", false, "");
44  I_END_COMPONENT;
45 
46  // reimplemented (iauth::IPasswordChanger)
47  virtual bool TryChangePassword(iauth::CUser& user) const;
48 
49 protected:
50  void UpdateButtonsState();
51 
52  // reimplemented (iqtgui::CGuiComponentBase)
53  virtual void OnGuiShown();
54 
55  // reimplemented (icomp::CComponentBase)
56  virtual void OnComponentCreated();
57  virtual void OnComponentDestroyed();
58 
59  // reimplemented (imod::CMultiModelDispatcherBase)
60  virtual void OnModelChanged(int modelId, int changeFlags, istd::IPolymorphic* updateParamsPtr);
61 
62 protected Q_SLOTS:
63  virtual void on_PushChangePassword_clicked();
64  virtual void on_PushOpenUserManager_clicked();
65 
66 private:
67  I_REF(iauth::IRightsProvider, m_rightsProviderIfPtr);
68  I_REF(imod::IModel, m_rightsModelIfPtr);
69  I_REF(iauth::ILogin, m_userLoginIfPtr);
70 
71  I_ATTR(QByteArray, m_usersManagerRightIdAttrPtr);
72  I_ATTR(QByteArray, m_changePasswordRightIdAttrPtr);
73 };
74 
75 } // namespace iqtauth
76 
77 
78 #endif // !_qqtauth_CUserGuiComp_included
79 
80 
virtual void on_PushOpenUserManager_clicked()
virtual bool TryChangePassword(iauth::CUser &user) const
Try change user password.
virtual void OnComponentCreated()
virtual void on_PushChangePassword_clicked()
virtual void OnComponentDestroyed()
virtual void OnGuiShown()
virtual void OnModelChanged(int modelId, int changeFlags, istd::IPolymorphic *updateParamsPtr)
ilog::TLoggerCompWrap< iqtgui::TDesignerGuiObserverCompBase< Ui::CUserGuiComp, iauth::IUsersManager > > BaseClass
Definition: CUserGuiComp.h:35
Provide management of users.
Definition: IUsersManager.h:23

© 2007-2011 Witold Gantzke and Kirill Lepskiy