2014-09-08 15:54:52 +00:00
|
|
|
#ifndef LOGINHANDLER_H
|
|
|
|
#define LOGINHANDLER_H
|
2014-09-11 03:24:52 +00:00
|
|
|
#include <QObject>
|
2014-09-08 15:54:52 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QTextEdit>
|
2014-09-22 02:04:38 +00:00
|
|
|
#include <QLabel>
|
2014-09-08 15:54:52 +00:00
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QPixmap>
|
2014-09-22 02:04:38 +00:00
|
|
|
#include <QPushButton>
|
2014-09-08 15:54:52 +00:00
|
|
|
|
2014-10-15 08:55:12 +00:00
|
|
|
#include "../../src/jceSettings/jcelogin.h"
|
|
|
|
#include "../../src/appDatabase/savedata.h"
|
|
|
|
#include "../../main/jceWidgets/jcestatusbar.h"
|
2014-09-08 15:54:52 +00:00
|
|
|
|
|
|
|
|
2014-09-22 02:04:38 +00:00
|
|
|
class loginHandler : public QObject
|
2014-09-08 15:54:52 +00:00
|
|
|
{
|
2014-09-22 02:04:38 +00:00
|
|
|
Q_OBJECT
|
2014-09-08 15:54:52 +00:00
|
|
|
public:
|
2014-10-12 19:19:43 +00:00
|
|
|
loginHandler(user *ptr, QPushButton *loginButtonPtr, jceStatusBar *progressbarPtr);
|
2014-09-22 02:04:38 +00:00
|
|
|
~loginHandler()
|
|
|
|
{
|
|
|
|
delete jceLog;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool login(QString username,QString password);
|
|
|
|
void logout();
|
|
|
|
|
2014-09-08 15:54:52 +00:00
|
|
|
bool makeConnection();
|
2014-09-22 02:04:38 +00:00
|
|
|
|
2014-09-08 15:54:52 +00:00
|
|
|
bool isLoggedInFlag();
|
|
|
|
void setLoginFlag(bool flag);
|
|
|
|
QString getCurrentPageContect();
|
|
|
|
|
|
|
|
int makeGradeRequest(int fromYear, int toYear, int fromSemester, int toSemester);
|
|
|
|
int makeCalendarRequest(int year,int semester);
|
2014-10-08 04:14:50 +00:00
|
|
|
int makeExamsScheduleRequest(int year, int semester);
|
2014-09-08 15:54:52 +00:00
|
|
|
|
2014-09-22 02:04:38 +00:00
|
|
|
private slots:
|
|
|
|
void readyAfterConnectionLost();
|
2014-09-08 15:54:52 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void popMessage(QString message, bool addInfo = true);
|
|
|
|
|
|
|
|
bool logggedInFlag;
|
2014-09-22 02:04:38 +00:00
|
|
|
jceLogin * jceLog;
|
|
|
|
user * userPtr;
|
2014-09-08 15:54:52 +00:00
|
|
|
|
2014-10-12 19:19:43 +00:00
|
|
|
jceStatusBar *statusBar;
|
|
|
|
|
2014-09-22 02:04:38 +00:00
|
|
|
QPushButton *loginButtonPtr;
|
2014-09-08 15:54:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOGINHANDLER_H
|