-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoreplanmanager.h
executable file
·106 lines (82 loc) · 2.3 KB
/
scoreplanmanager.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
/*
* 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 SCOREPLANMANAGER_H
#define SCOREPLANMANAGER_H
#include <QWidget>
#include <QList>
#include "general.h"
class QLabel;
class QComboBox;
class QPushButton;
class QGridLayout;
class QHBoxLayout;
class QVBoxLayout;
class QSlider;
class QLineEdit;
class MainWidget;
class QCheckBox;
class QDoubleSpinBox;
class ScorePlanManager : public QWidget
{
Q_OBJECT
private:
static const int SLIDER_MAX;
static const int SPINBOX_MAX;
QLabel *scorePlanLabel;
QComboBox *scorePlans;
QPushButton *refreshButton;
QHBoxLayout *upLayout;
QList<QString> scores;
QLabel *nameLabel;
QLineEdit *nameLineEdit;
QCheckBox *deleteCheckBox;
QLabel *aPenaltyLabel;
QSlider *aPenaltySlider;
QDoubleSpinBox *aPenaltySpinBox;
QLabel *rPenaltyLabel;
QSlider *rPenaltySlider;
QDoubleSpinBox *rPenaltySpinBox;
QPushButton *previewButton;
QLabel *convergeToLabel;
QDoubleSpinBox *convergeToSpinBox;
QLabel *multiplierLabel;
QLineEdit *multiplierLineEdit;
QPushButton *submit;
QGridLayout *gLayout;
QHBoxLayout *hLayout;
QVBoxLayout *downLayout, *totalLayout;
QWidget *downWidget;
MainWidget *mw;
qint64 lastID;
Operation lastOp;
QString last;
QString newName;
QComboBox *replaceComboBox;
void setupComboBox();
void setupReplaceComboBox();
void clearDown();
public:
explicit ScorePlanManager(MainWidget *MW, QWidget *parent = Q_NULLPTR);
void init();
void onSwitch();
private slots:
void aPenaltySliderChanged(int val);
void aPenaltySpinBoxChanged(double val);
void rPenaltySliderChanged(int val);
void rPenaltySpinBoxChanged(double val);
void comboBoxChanged(int idx);
void submited();
void viewPreview();
void downloadList();
void deleteCheckChanged();
public slots:
void listDownloaded(StatCode stat, const QByteArray &BA);
void operationDone(StatCode stat, const QByteArray &);
void detailsReady(StatCode stat, const QByteArray &BA);
void connectionStateChanged();
};
#endif // SCOREPLANMANAGER_H