BigBlueBox
An Inventory Management System for a NYLT Course or other Boy Scout Programs
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
usersession.h
Go to the documentation of this file.
1 #ifndef USERSESSION_H
2 #define USERSESSION_H
3 
4 //*********************************************************************************
5 #include <QString>
6 #include <QDate>
7 //*********************************************************************************
8 
9 namespace bbb {
10 //*********************************************************************************
12 {
13 private:
14  UserSession();
15  ~UserSession();
17 
18  //***********************************************************
19  enum Roles
20  {
21  ROOT = 0, // can add users + ADMIN + USER
22  ADMIN = 1, // can change all item info + USER
23  USER = 2 // can change item quantities and checkout gear
24  };
25  //***********************************************************
26 
27  QString userName;
28  QString password;
29 
31  //QDate expDate;
32 
33 public:
34  static UserSession* getInstance();
35  static void logout();
36 
37  void setUsername(QString userName);
38  void setPassword(QString password);
39  bool validateSessionInfo();
40 
41 }; // end class
42 //*********************************************************************************
43 } // end namespace
44 #endif // USERSESSION_H
static UserSession * getInstance()
Definition: usersession.cpp:18
QString password
Definition: usersession.h:28
static UserSession * instance
Definition: usersession.h:16
UserSession()
Definition: usersession.cpp:7
Roles
Definition: usersession.h:19
QString userName
Definition: usersession.h:27
Definition: usersession.h:22
bool validateSessionInfo()
Definition: usersession.cpp:49
void setUsername(QString userName)
Definition: usersession.cpp:37
~UserSession()
Definition: usersession.cpp:12
Definition: usersession.h:23
Definition: usersession.h:21
Roles userRole
Definition: usersession.h:30
static void logout()
Definition: usersession.cpp:28
void setPassword(QString password)
Definition: usersession.cpp:43
Definition: usersession.h:11