jce-manager/main/LoginTab/loginhandler.h

57 lines
1.2 KiB
C
Raw Normal View History

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>
#include <QLabel>
2014-09-08 15:54:52 +00:00
#include <QMessageBox>
#include <QPixmap>
#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
class loginHandler : public QObject
2014-09-08 15:54:52 +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);
~loginHandler()
{
delete jceLog;
}
bool login(QString username,QString password);
void logout();
2014-09-08 15:54:52 +00:00
bool makeConnection();
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);
int makeExamsScheduleRequest(int year, int semester);
2014-09-08 15:54:52 +00:00
private slots:
void readyAfterConnectionLost();
2014-09-08 15:54:52 +00:00
private:
void popMessage(QString message, bool addInfo = true);
bool logggedInFlag;
jceLogin * jceLog;
user * userPtr;
2014-09-08 15:54:52 +00:00
2014-10-12 19:19:43 +00:00
jceStatusBar *statusBar;
QPushButton *loginButtonPtr;
2014-09-08 15:54:52 +00:00
};
#endif // LOGINHANDLER_H