-
Notifications
You must be signed in to change notification settings - Fork 17
/
loginwindow.h
82 lines (64 loc) · 2.13 KB
/
loginwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Copyright 2010 Kyle M Hall <[email protected]>
*
* This file is part of Libki.
*
* Libki is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Libki is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Libki. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H
#include <QMainWindow>
#include <QSettings>
#include <QtDebug>
#include <QtGui>
#include "networkclient.h"
#include "ui_loginwindow.h"
class LoginWindow : public QMainWindow, public Ui::LoginWindow {
Q_OBJECT
public:
LoginWindow(QWidget* parent = 0);
~LoginWindow();
void closeEvent(QCloseEvent* event);
signals:
void loginSucceeded(const QString& username, const QString& password,
const int& minutes, const int& hold_items_count);
void attemptLogin(const QString& username, const QString& password, const bool createGuest);
void displayingReservationMessage(QString reserved_for);
public slots:
void setAllowClose(bool);
void displayLoginWindow();
void attemptLogin();
void attemptGuestLogin();
void attemptLoginFailure(QString loginError);
void attemptLoginSuccess(QString username, QString password, int minutes,
int hold_items_count);
void handleReservationStatus(QString reserved_for);
void handleBanners();
void disableLogin();
void enableLogin();
void showServerAccessWarning(QString message);
void showInternetAccessWarning(QString message);
private slots:
void resetLoginScreen();
private:
QIcon libkiIcon;
QString reservedFor;
bool allowClose;
bool isHidden;
void setupActions();
void getSettings();
void showMe();
void setButtonsEnabled(bool);
};
#endif // LOGINWINDOW_H