Skip to content

Commit

Permalink
现在能导出统计信息了
Browse files Browse the repository at this point in the history
  • Loading branch information
iotang committed Jan 14, 2020
1 parent 06a1f28 commit c46c65a
Show file tree
Hide file tree
Showing 17 changed files with 345 additions and 910 deletions.
30 changes: 4 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@

# 构建

由于叛逃到 Manjaro,只给 `Qt Creator 4.11.0 based on Qt 5.14.0` 版本,所以 QT 版本必须是 `5.14` 或者以上才能编译出来。

## 如果 Github 太慢…

你也许可以到 ``码云(Gitee)`` 去下载。
Expand All @@ -82,29 +80,9 @@

#### Ubuntu

`sudo apt install build-essential libgl1-mesa-dev`

然后去 `http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.14/5.14.0/` 下载 `qt-opensource-linux-x64-5.14.0.run`

然后 `sudo chmod +x qt-opensource-linux-x64-5.14.0.run`

然后 `sudo ./qt-opensource-linux-x64-5.14.0.run`

#### Ubuntu 的另外一种简便的方法

```bash
sudo apt install qt5-default build-essential
```

然后把所有文件的 `swapItemsAt` 换成 `swap`

这是因为 apt 安装的 Qt 5 版本太低。

#### Arch


```bash
sudo pacman -S gcc make qt5-base qt5-doc
Ubuntu: sudo apt install qt5-default build-essential
Arch: sudo pacman -S gcc make qt5-base qt5-doc
```

### 下载源代码,在源代码目录中依次执行
Expand All @@ -120,8 +98,8 @@ make
当然如果你装有 Qt Creator,也可以用它编译 release 版本。

```bash
Ubuntu: sudo apt install qtcreator
Arch: sudo pacman -S qtcreator
Ubuntu: sudo apt install qtcreator
Arch: sudo pacman -S qtcreator
```

## macOS(!?!?!?)
Expand Down
2 changes: 1 addition & 1 deletion contest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void Contest::swapTask(int a, int b)
{
if (0 <= b && b < taskList.size())
{
taskList.swapItemsAt(a, b);
taskList.swap(a, b);
}
}

Expand Down
20 changes: 10 additions & 10 deletions contestant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ void Contestant::swapTask(int a, int b)
if (a < 0 || a >= checkJudged.size())return;
if (b < 0 || b >= checkJudged.size())return;

checkJudged.swapItemsAt(a, b);
compileState.swapItemsAt(a, b);
sourceFile.swapItemsAt(a, b);
compileMesaage.swapItemsAt(a, b);
inputFiles.swapItemsAt(a, b);
result.swapItemsAt(a, b);
message.swapItemsAt(a, b);
score.swapItemsAt(a, b);
timeUsed.swapItemsAt(a, b);
memoryUsed.swapItemsAt(a, b);
checkJudged.swap(a, b);
compileState.swap(a, b);
sourceFile.swap(a, b);
compileMesaage.swap(a, b);
inputFiles.swap(a, b);
result.swap(a, b);
message.swap(a, b);
score.swap(a, b);
timeUsed.swap(a, b);
memoryUsed.swap(a, b);
}

int Contestant::getTaskScore(int index) const
Expand Down
14 changes: 14 additions & 0 deletions forms/lemon.ui
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@
<addaction name="separator"/>
<addaction name="addTasksAction"/>
<addaction name="exportAction"/>
<addaction name="separator"/>
<addaction name="actionExportStatistics"/>
</widget>
<widget class="QMenu" name="toolsMenu">
<property name="title">
Expand Down Expand Up @@ -843,6 +845,18 @@
<string>How to make Communication Tasks...</string>
</property>
</action>
<action name="actionExportStatistics">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="../resource.qrc">
<normaloff>:/icon/document-export.svg</normaloff>:/icon/document-export.svg</iconset>
</property>
<property name="text">
<string>Export &amp;Statistics</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
Expand Down
13 changes: 0 additions & 13 deletions guide/guidedata/about.md

This file was deleted.

Loading

0 comments on commit c46c65a

Please sign in to comment.