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_TO(m_rightsModelIfPtr, m_rightsProviderIfPtr, true);
41  I_ASSIGN_TO(m_userLoginIfPtr, m_rightsProviderIfPtr, true);
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  CUserGuiComp();
47 
48  // reimplemented (iauth::IPasswordChanger)
49  virtual bool TryChangePassword(iauth::CUser& user) const;
50 
51 protected:
52  void UpdateButtonsState();
53 
54  // reimplemented (iqtgui::CGuiComponentBase)
55  virtual void OnGuiShown();
56 
57  // reimplemented (icomp::CComponentBase)
58  virtual void OnComponentCreated();
59  virtual void OnComponentDestroyed();
60 
61  // reimplemented (imod::CMultiModelDispatcherBase)
62  virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet);
63 
64 protected Q_SLOTS:
65  virtual void on_PushChangePassword_clicked();
66  virtual void on_PushOpenUserManager_clicked();
67 
68 private:
69  I_REF(iauth::IRightsProvider, m_rightsProviderIfPtr);
70  I_REF(imod::IModel, m_rightsModelIfPtr);
71  I_REF(iauth::ILogin, m_userLoginIfPtr);
72 
73  I_ATTR(QByteArray, m_usersManagerRightIdAttrPtr);
74  I_ATTR(QByteArray, m_changePasswordRightIdAttrPtr);
75 
76  mutable class CUserManagerDialog* m_userManagerDialogPtr;
77  mutable class CChangePasswordDialog* m_passwordDialogPtr;
78 };
79 
80 } // namespace iqtauth
81 
82 
83 #endif // !_qqtauth_CUserGuiComp_included
84 
85 
virtual void on_PushOpenUserManager_clicked()
virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet)
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()
ilog::TLoggerCompWrap< iqtgui::TDesignerGuiObserverCompBase< Ui::CUserGuiComp, iauth::IUsersManager > > BaseClass
Definition: CUserGuiComp.h:35
Provide management of users.
Definition: IUsersManager.h:22

© 2007-2017 Witold Gantzke and Kirill Lepskiy