diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fab7372..0000000 --- a/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# This file is used to ignore files which are generated -# ---------------------------------------------------------------------------- - -*~ -*.autosave -*.a -*.core -*.moc -*.o -*.obj -*.orig -*.rej -*.so -*.so.* -*_pch.h.cpp -*_resource.rc -*.qm -.#* -*.*# -core -!core/ -tags -.DS_Store -.directory -*.debug -Makefile* -*.prl -*.app -moc_*.cpp -ui_*.h -qrc_*.cpp -Thumbs.db -*.res -*.rc -/.qmake.cache -/.qmake.stash - -# qtcreator generated files -*.pro.user* - -# xemacs temporary files -*.flc - -# Vim temporary files -.*.swp - -# Visual Studio generated files -*.ib_pdb_index -*.idb -*.ilk -*.pdb -*.sln -*.suo -*.vcproj -*vcproj.*.*.user -*.ncb -*.sdf -*.opensdf -*.vcxproj -*vcxproj.* - -# MinGW generated files -*.Debug -*.Release - -# Python byte code -*.pyc - -# Binaries -# -------- -*.dll -*.exe - diff --git a/NETrepForNekoTeam.pro b/NETrepForNekoTeam.pro deleted file mode 100644 index b915c09..0000000 --- a/NETrepForNekoTeam.pro +++ /dev/null @@ -1,24 +0,0 @@ -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -CONFIG += c++17 - -# You can make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -FORMS += \ - mainwindow.ui - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target diff --git a/README.md b/README.md index 1a4baf5..29445c6 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ - +# NETrepForNekoTeam +## 文档汇总 diff --git a/main.cpp b/main.cpp deleted file mode 100644 index fd3e533..0000000 --- a/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "mainwindow.h" - -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - MainWindow w; - w.show(); - return a.exec(); -} diff --git a/mainwindow.cpp b/mainwindow.cpp deleted file mode 100644 index 41a26bd..0000000 --- a/mainwindow.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "mainwindow.h" -#include "ui_mainwindow.h" - -MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent) - , ui(new Ui::MainWindow) -{ - ui->setupUi(this); -} - -MainWindow::~MainWindow() -{ - delete ui; -} - diff --git a/mainwindow.h b/mainwindow.h deleted file mode 100644 index 4643e32..0000000 --- a/mainwindow.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include - -QT_BEGIN_NAMESPACE -namespace Ui { class MainWindow; } -QT_END_NAMESPACE - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - MainWindow(QWidget *parent = nullptr); - ~MainWindow(); - -private: - Ui::MainWindow *ui; -}; -#endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui deleted file mode 100644 index b232854..0000000 --- a/mainwindow.ui +++ /dev/null @@ -1,22 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 800 - 600 - - - - MainWindow - - - - - - - - diff --git "a/\344\273\243\347\240\201\350\247\204\350\214\203ver_0.1" "b/\344\273\243\347\240\201\350\247\204\350\214\203ver_0.1" new file mode 100644 index 0000000..ff9473f --- /dev/null +++ "b/\344\273\243\347\240\201\350\247\204\350\214\203ver_0.1" @@ -0,0 +1,133 @@ +/***************************************************************************************************************************************** + NekoTeam程序代码规范 +编写时间:2021-11-23 +版本:ver 0.1 +说明:本规范使用C++语言作为基准编写并参考了腾讯C++编码规范,若对应语言无对应特性,请自行处理。 +*****************************************************************************************************************************************/ + + +1 目的 + 为保证本项目具有较统一的编码风格,以保证项目代码的易维护性和编码安全性,方便成员间交流,并且帮助成员学习普适性的,受广泛开发者所接受的代码规范。 + + +2 适用范围 + 本规范适用于本项目下属所有代码,包括但不限于python,kotlin,java等。 +注:本文仅为基本的代码规范,并不涉及对某种具体程序写法的约束 + + +3 程序版式 +3. 1 规则:程序块需采用缩进风格编写,缩进大小为四个空格。 + 说明: + 若开发工具具备自动缩进功能,请将其配置缩进为四个空格。 + +3. 2 规则:缩进或者对齐只能使用空格键,不可使用制表键 (TAB键)。 + 说明: + 空格键指ASCII码 '\0',TAB键指ASCII码'\t',若将开发工具的TAB键设置为替换成四个空格,则可以使用TAB键。 +注:若混淆空格键和TAB键,在某些情形将产生意想不到的bug,如网页显示时。 + +3. 3 规则:相对独立的程序块之间、变量说明之后必须加空行。 + 说明: + 如以下情形使用空行分开: + 1) 函数之间应该用空行分开; + 2) 逻辑片段之间应该用空行分开; + 3) 每个类声明直接应该用空行分开。 + +3. 4 规则:较长的语句应分成多行书写(约大于80字符)。 + 说明: + 分隔的规律如下: + 1)长表达式在低优先级操作符处划分新行,操作符置于新行之首,划分出的新行应进行适当的缩进,通常相较上一行起始多一个TAP键(设置为四个空格)。 + 2)若函数或过程(如if, for, while)中的参数过长,需进行适当的划分。 + +3. 5 规则:不允许将多个语句写在一行中,一行中只有不多于一个逻辑行。 + 说明: + 一行代码只做一件事,但可将一个语句适当缩进为多行具有逻辑的结构,以便阅读。 + +3. 6 规则:if, for, while 等逻辑控制语句独自占一行,且后续必须加范围限定的中括号 { }。 + 说明: + 若无范围限定的中括号,应自行缩进以展现结构,建议每个中括号各独自占一行,前后无其他语句。 + +3. 7 规则:代码行之内应当留有适当的空格。 + 说明: + 采用这种方式的目的是使代码更加清晰,便于他人阅读和修改。 + 具体如下: + 1) 关键字之后要留空格。尤其是if、for、while等关键字应留有一个空格后再接左括号 '(',以突出关键字。 + 2) 函数名后不留空格,紧跟左括号 ')' 以与关键字取别。 + 3) 逗号 ','之后要留空格,如果分号 ';'不是一行的结束符号,也要留空格,如for (int i = 0; i < 10; ++i)。 + 4) 算术操作符,比较操作符,逻辑操作符,如加号 '+',等号 '=',等二元操作符前后应当加空格。 + 5) 一元操作符如 非 '!',自加 '++',等前后不加空格。 + 6) 如 '[]', '.', '->' 等操作符前后不加空格。 + 7) 上述未提到的操作符可根据经验自行判断缩进,但需保证代码结构清晰。 + + +4 注释 +4. 1 规则:源文件头部应添加注释,至少包含:生成日期,作者,模块目的/功能。 + 说明: + 例如:(c++下的)下面这段注释比较详细,可不按其格式,形成自己的注释风格,但以上所述信息必须包含其中。 +/************************************************************************ + FileName: Test.cpp + Author: Version: Data: + Description: // 模块描述 + Version: // 版本信息 + Function List: // 主要函数及功能 + 1. ---------------- + History: // 历史修改记录 +