jce-manager/main/LoginTab/loginhandler.h

61 lines
1.4 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 <QStatusBar>
2014-10-04 00:54:27 +00:00
#include <QProgressBar>
#include <QPushButton>
2014-09-08 15:54:52 +00:00
#include "./src/jceSettings/jcelogin.h"
#include "./src/appDatabase/savedata.h"
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-04 00:54:27 +00:00
loginHandler(user *ptr, QStatusBar *statusBarPtr, QPushButton *loginButtonPtr, QProgressBar *progressbarPtr);
~loginHandler()
{
delete iconButtomStatusLabel;
delete jceLog;
}
bool login(QString username,QString password);
void logout();
void setIconConnectionStatus(jceLogin::jceStatus statusDescription);
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
QStatusBar *statusBar;
QLabel *iconButtomStatusLabel;
QPushButton *loginButtonPtr;
2014-10-04 00:54:27 +00:00
QProgressBar *progressBar;
2014-09-08 15:54:52 +00:00
};
#endif // LOGINHANDLER_H