#ifndef LOGINHANDLER_H #define LOGINHANDLER_H #include #include #include #include #include #include #include #include #include "./src/jceSettings/jcelogin.h" #include "./src/appDatabase/savedata.h" class loginHandler : public QObject { Q_OBJECT public: loginHandler(user *ptr, QStatusBar *statusBarPtr,QPushButton *loginButtonPtr); ~loginHandler() { delete iconButtomStatusLabel; delete jceLog; } bool login(QString username,QString password); void logout(); void setIconConnectionStatus(jceLogin::jceStatus statusDescription); bool makeConnection(); bool isLoggedInFlag(); void setLoginFlag(bool flag); QString getCurrentPageContect(); int makeGradeRequest(int fromYear, int toYear, int fromSemester, int toSemester); int makeCalendarRequest(int year,int semester); private slots: void readyAfterConnectionLost(); private: void popMessage(QString message, bool addInfo = true); bool logggedInFlag; jceLogin * jceLog; user * userPtr; QStatusBar *statusBar; QLabel *iconButtomStatusLabel; QPushButton *loginButtonPtr; }; #endif // LOGINHANDLER_H