-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoreboard.h
executable file
·87 lines (67 loc) · 1.68 KB
/
scoreboard.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
83
84
85
86
87
/*
* This file is part of community judge client project developed by Shervin Kh.
* Copyright (C) 2014 Shervin Kh.
* License: GPLv3 Or Later
* Full license could be found in License file shipped with program or at http://www.gnu.org/licenses/
*/
#ifndef SCOREBOARD_H
#define SCOREBOARD_H
#include <QWidget>
#include "general.h"
class MainWidget;
class QLabel;
class QSpinBox;
class QPushButton;
class QTableWidget;
class QHBoxLayout;
class QVBoxLayout;
class QGridLayout;
class QComboBox;
class Scoreboard : public QWidget
{
Q_OBJECT
private:
MainWidget *mw;
QPushButton *refreshButton;
QLabel *scoreboardLabel;
QComboBox *scoreboard;
QLabel *factorLabel;
QComboBox *factorCB;
QLabel *pageLabel;
QSpinBox *pageSB;
QPushButton *requestButton;
QHBoxLayout *upLayout;
QLabel *minLabel;
QLabel *minValue;
QLabel *avgLabel;
QLabel *avgValue;
QLabel *maxLabel;
QLabel *maxValue;
QGridLayout *stat;
QTableWidget *tw;
QVBoxLayout *totalLayout;
QList<DataTable> listData;
QList<DataTable> data;
int scoreboardType;
qreal minVal;
qreal avgVal;
qreal maxVal;
QHBoxLayout *scoreLayout;
QVBoxLayout *statLayout;
bool available;
bool colorData;
void updateTable();
void updateScoreboardList();
public:
explicit Scoreboard(MainWidget *MW, QWidget *parent = Q_NULLPTR);
void init();
void onSwitch();
private slots:
void request();
void requestList();
void handleScoreboardChange(int row);
public slots:
void handleRequest(StatCode stat, const QByteArray &BA);
void handleListRequest(StatCode stat, const QByteArray &BA);
};
#endif // SCOREBOARD_H