-
Notifications
You must be signed in to change notification settings - Fork 0
/
problemview.h
executable file
·110 lines (90 loc) · 2.36 KB
/
problemview.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
* 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 PROBLEMVIEW_H
#define PROBLEMVIEW_H
#include <QWidget>
#include "general.h"
class MainWidget;
class QLabel;
class QComboBox;
class QPushButton;
class QListWidget;
class QHBoxLayout;
class QVBoxLayout;
class QGridLayout;
class QLineEdit;
class ProblemView : public QWidget
{
Q_OBJECT
private:
MainWidget *mw;
QComboBox *searchMode;
QLabel *searchConstr;
QLineEdit *searchTerm;
QPushButton *searchReq;
QHBoxLayout *searchDownLayout;
QVBoxLayout *searchLeftLayout;
QHBoxLayout *searchLayout;
QLabel *contestLabel;
QComboBox *contestList;
QPushButton *refreshButton;
QHBoxLayout *contestLayout;
QWidget *contestWidget;
QListWidget *lw;
QVBoxLayout *probsLayout;
QWidget *probs;
QVBoxLayout *leftLayout;
QLabel *nameLabel;
QLabel *name;
QLabel *descLabel;
QLabel *desc;
QLabel *descFileLabel;
QLabel *descFile;
QPushButton *descFileDownload;
QLabel *numTestsLabel;
QLabel *numTests;
QLabel *timeLimitLabel;
QLabel *timeLimit;
QLabel *memLimitLabel;
QLabel *memLimit;
QLabel *scorePlanLabel;
QLabel *scorePlan;
QLabel *completeJudgeLabel;
QLabel *completeJudge;
QLabel *pubsubLabel;
QLabel *pubsub;
QLabel *othsubLabel;
QLabel *othsub;
QGridLayout *probGrid;
QVBoxLayout *infoLayout;
QWidget *info;
QPushButton *getInfo;
QVBoxLayout *getLayout;
QList<QString> data;
QHBoxLayout *totalLayout;
QString savePath;
void updateList();
void setInfo(const Problem &prob);
public:
explicit ProblemView(MainWidget *MW, QWidget *parent = Q_NULLPTR);
void init();
void onSwitch();
signals:
public slots:
void requestDone(StatCode stat, const QByteArray &BA);
void infoDone(StatCode stat, const QByteArray &BA);
void descDone(StatCode stat, const QByteArray &BA);
void refreshListDone(StatCode stat, const QByteArray &BA);
private slots:
void handleSearchMode(int id);
void handleGetInfo();
void requestInfo();
void request();
void refreshList();
void downloadDescription();
};
#endif // PROBLEMVIEW_H