Skip to content

Commit ee353ee

Browse files
bacali95Nicky Gerritsen
authored and
Nicky Gerritsen
committed
Reindent all the code using spaces instead of tabs
1 parent eafec45 commit ee353ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2554
-2552
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
DOMjura.pro.user
22
DOMjura.pro.user.*
33
.idea
4-
CMakeLists.txt
4+
CMakeLists.txt
5+
moc_*
6+
*.o

aboutdialog.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ namespace DJ {
55
namespace View {
66

77
AboutDialog::AboutDialog(QWidget *parent) :
8-
QDialog(parent),
9-
ui(new Ui::AboutDialog) {
10-
ui->setupUi(this);
8+
QDialog(parent),
9+
ui(new Ui::AboutDialog) {
10+
ui->setupUi(this);
1111
}
1212

1313
AboutDialog::~AboutDialog() {
14-
delete ui;
14+
delete ui;
1515
}
1616

1717
} // namespace View

aboutdialog.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ namespace DJ {
1111
namespace View {
1212

1313
namespace Ui {
14-
class AboutDialog;
14+
class AboutDialog;
1515
}
1616

1717
/** The about dialog. This uses a Qt Designer form.
1818
*/
1919
class AboutDialog : public QDialog
2020
{
21-
Q_OBJECT
21+
Q_OBJECT
2222

2323
public:
24-
/** Construts an about dialog.
25-
* \param parent The parent of this dialog.
26-
*/
27-
explicit AboutDialog(QWidget *parent = 0);
24+
/** Construts an about dialog.
25+
* \param parent The parent of this dialog.
26+
*/
27+
explicit AboutDialog(QWidget *parent = nullptr);
2828

29-
/** Destructs an about dialog.
30-
*/
31-
~AboutDialog();
29+
/** Destructs an about dialog.
30+
*/
31+
~AboutDialog();
3232

3333
private:
34-
Ui::AboutDialog *ui;
34+
Ui::AboutDialog *ui;
3535
};
3636

3737

contest.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace DJ {
66
namespace Model {
77
Contest::Contest(QJsonObject contest, QObject *parent) : QObject(parent) {
88
this->id = contest.value("id").toString();
9-
this->name = contest.value("name").toString("Unknown");
9+
this->name = contest.value("name").toString("Unknown");
1010
this->penaltyMinutes = contest.value("penalty_time").toInt();
1111

1212
this->start_time = QDateTime::fromString(contest.value("start_time").toString(), Qt::DateFormat::ISODate);
@@ -30,7 +30,7 @@ QString Contest::getId() {
3030
}
3131

3232
void Contest::setName(QString name) {
33-
this->name = name;
33+
this->name = name;
3434
}
3535

3636
QDateTime Contest::getStart() {
@@ -46,22 +46,22 @@ QDateTime Contest::getEnd() {
4646
}
4747

4848
QString Contest::getName() {
49-
return this->name;
49+
return this->name;
5050
}
5151

5252
int Contest::getPenaltyMinutes() {
53-
return this->penaltyMinutes;
53+
return this->penaltyMinutes;
5454
}
5555

5656
QString Contest::toString() {
57-
QString s;
57+
QString s;
5858
s += " id = " + this->id + "\n";
5959
s += " start = " + this->start_time.toString("yyyy-MM-dd hh:mm:ss") + "\n";
6060
s += " freeze = " + this->freeze_time.toString("yyyy-MM-dd hh:mm:ss") + "\n";
6161
s += " end = " + this->end_time.toString("yyyy-MM-dd hh:mm:ss") + "\n";
62-
s += " penalty = " + QString::number(this->penaltyMinutes) + "\n";
63-
s += " name = " + this->name + "\n";
64-
return s;
62+
s += " penalty = " + QString::number(this->penaltyMinutes) + "\n";
63+
s += " name = " + this->name + "\n";
64+
return s;
6565
}
6666
}
6767
}

contest.h

+41-41
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,56 @@ namespace Model {
1414
/** A contest (from the API).
1515
*/
1616
class Contest : public QObject {
17-
Q_OBJECT
17+
Q_OBJECT
1818
public:
19-
/** Constructs a new contest.
20-
* \param contest The contest as returned from the DOMjudge API
21-
* \param parent The parent of this object.
22-
*/
23-
explicit Contest(QJsonObject contest, QObject *parent = 0);
24-
/** Destructs this contest.
25-
*/
26-
~Contest();
19+
/** Constructs a new contest.
20+
* \param contest The contest as returned from the DOMjudge API
21+
* \param parent The parent of this object.
22+
*/
23+
explicit Contest(QJsonObject contest, QObject *parent = 0);
24+
/** Destructs this contest.
25+
*/
26+
~Contest();
2727

28-
/** Sets the name for this contest.
29-
* \param name The name to set.
30-
*/
31-
void setName(QString name);
28+
/** Sets the name for this contest.
29+
* \param name The name to set.
30+
*/
31+
void setName(QString name);
3232

33-
/** Returns the start time of the contest.
34-
* \return The start time of the contest.
35-
*/
36-
QDateTime getStart();
37-
/** Returns the freeze time of the contest.
38-
* \return The freeze time of the contest.
39-
*/
40-
QDateTime getFreeze();
41-
/** Returns the end time of the contest.
42-
* \return The end time of the contest.
43-
*/
33+
/** Returns the start time of the contest.
34+
* \return The start time of the contest.
35+
*/
36+
QDateTime getStart();
37+
/** Returns the freeze time of the contest.
38+
* \return The freeze time of the contest.
39+
*/
40+
QDateTime getFreeze();
41+
/** Returns the end time of the contest.
42+
* \return The end time of the contest.
43+
*/
4444
QDateTime getEnd();
45-
/** Returns the ID of this contest.
46-
* \return The ID of this contest.
47-
*/
45+
/** Returns the ID of this contest.
46+
* \return The ID of this contest.
47+
*/
4848
QString getId();
49-
/** Returns the name of this contest.
50-
* \return The name of this contest.
51-
*/
52-
QString getName();
53-
/** Returns the penalty time in minutes.
54-
* \return The penalty time in minutes.
55-
*/
56-
int getPenaltyMinutes();
49+
/** Returns the name of this contest.
50+
* \return The name of this contest.
51+
*/
52+
QString getName();
53+
/** Returns the penalty time in minutes.
54+
* \return The penalty time in minutes.
55+
*/
56+
int getPenaltyMinutes();
5757

58-
/** Returns a string representing this contest.
59-
* \return A string representation of this contest.
60-
* Useful for debug printing.
61-
*/
62-
QString toString();
58+
/** Returns a string representing this contest.
59+
* \return A string representation of this contest.
60+
* Useful for debug printing.
61+
*/
62+
QString toString();
6363

6464
private:
6565
QString id;
66-
QString name;
66+
QString name;
6767
QDateTime start_time, end_time, freeze_time;
6868
int penaltyMinutes;
6969
};

defines.h

+19-19
Original file line numberDiff line numberDiff line change
@@ -120,42 +120,42 @@ namespace DJ {
120120
/** State of a problem.
121121
*/
122122
enum ProblemState {
123-
NOTSUBMITTED, /**< Problem is not submitted. */
124-
SOLVED, /**< Problem is solved. */
125-
FAILED, /**< Problem is submitted, but not solved. */
126-
PENDING_SOLVED, /**< Problem is solved, but after the freeze time. */
127-
PENDING_FAILED /**< Problem is submitted after the freeze time and not solved. */
123+
NOTSUBMITTED, /**< Problem is not submitted. */
124+
SOLVED, /**< Problem is solved. */
125+
FAILED, /**< Problem is submitted, but not solved. */
126+
PENDING_SOLVED, /**< Problem is solved, but after the freeze time. */
127+
PENDING_FAILED /**< Problem is submitted after the freeze time and not solved. */
128128
};
129129

130130
/** What medal this team earned.
131131
*/
132132
enum Medal {
133-
NO_MEDAL, /**< This team earned no medal at al. */
134-
GOLD_MEDAL, /**< This team earned a gold medal. */
135-
SILVER_MEDAL, /**< This team earned a silver medal. */
136-
BRONZE_MEDAL /**< This team earned a bronze medal. */
133+
NO_MEDAL, /**< This team earned no medal at al. */
134+
GOLD_MEDAL, /**< This team earned a gold medal. */
135+
SILVER_MEDAL, /**< This team earned a silver medal. */
136+
BRONZE_MEDAL /**< This team earned a bronze medal. */
137137
};
138138

139139
/** Struct for keeping track of info for a problem.
140140
* This struct is used in the standings controller.
141141
*/
142142
struct ResultProblem {
143-
ProblemState state; /**< State for this problem. */
144-
int numTries; /**< Number of tries for this problem. */
145-
int time; /**< Time of the last try. */
146-
QString problemId; /**< ID for this problem. */
143+
ProblemState state; /**< State for this problem. */
144+
int numTries; /**< Number of tries for this problem. */
145+
int time; /**< Time of the last try. */
146+
QString problemId; /**< ID for this problem. */
147147
};
148148

149149
/** Struct for keeping track of info for a team.
150150
* This struct is used in the standings controller.
151151
*/
152152
struct ResultTeam {
153-
QString name; /**< Name of this team. */
154-
QString id; /**< ID for this team. */
155-
int rank; /**< Current rank of this team. */
156-
int solved; /**< How many problems this team solved. */
157-
int time; /**< The total time for this team. */
158-
QList<ResultProblem> problems; /**< The list of problems for this team. */
153+
QString name; /**< Name of this team. */
154+
QString id; /**< ID for this team. */
155+
int rank; /**< Current rank of this team. */
156+
int solved; /**< How many problems this team solved. */
157+
int time; /**< The total time for this team. */
158+
QList<ResultProblem> problems; /**< The list of problems for this team. */
159159
};
160160
}
161161

0 commit comments

Comments
 (0)