Skip to content

Commit 9307711

Browse files
committed
init
0 parents  commit 9307711

File tree

142 files changed

+11938
-0
lines changed

Some content is hidden

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

142 files changed

+11938
-0
lines changed

Diff for: .clang-format

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
AccessModifierOffset: -4
3+
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveMacros: true
6+
AlignConsecutiveAssignments: true
7+
AlignConsecutiveDeclarations: true
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
12+
AllowAllParametersOfDeclarationOnNextLine: true
13+
AllowShortBlocksOnASingleLine: false
14+
AllowShortCaseLabelsOnASingleLine: true
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AllowShortLambdasOnASingleLine: false
18+
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakTemplateDeclarations: true
21+
22+
BreakBeforeBraces: Custom
23+
BraceWrapping:
24+
AfterEnum: true
25+
AfterNamespace: true
26+
SplitEmptyFunction: false
27+
SplitEmptyRecord: false
28+
BinPackArguments: false
29+
BinPackParameters: true
30+
CompactNamespaces: false
31+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
32+
Cpp11BracedListStyle: false
33+
IndentCaseLabels: false
34+
IndentPPDirectives: AfterHash
35+
IndentWidth: 4
36+
IndentWrappedFunctionNames: false
37+
KeepEmptyLinesAtTheStartOfBlocks: false
38+
Language: Cpp
39+
PointerAlignment: Left
40+
SortIncludes: false
41+
SpaceAfterCStyleCast: false
42+
SpaceAfterLogicalNot: true
43+
SpaceAfterTemplateKeyword: false
44+
SpaceBeforeAssignmentOperators: true
45+
SpaceBeforeCpp11BracedList: true
46+
SpaceBeforeCtorInitializerColon: false
47+
SpaceBeforeInheritanceColon: true
48+
SpaceBeforeRangeBasedForLoopColon: true
49+
SpaceInEmptyParentheses: false
50+
SpacesInAngles: false
51+
SpacesInCStyleCastParentheses: false
52+
SpacesInContainerLiterals: false
53+
SpacesInParentheses: false
54+
SpacesInSquareBrackets: false
55+
Standard: Cpp11
56+
TabWidth: 4
57+
UseTab: Never
58+
ColumnLimit: 100

Diff for: .gitignore

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# This file is used to ignore files which are generated
2+
# ----------------------------------------------------------------------------
3+
4+
*~
5+
*.autosave
6+
*.a
7+
*.core
8+
*.moc
9+
*.o
10+
*.obj
11+
*.orig
12+
*.rej
13+
*.so
14+
*.so.*
15+
*_pch.h.cpp
16+
*_resource.rc
17+
*.qm
18+
.#*
19+
*.*#
20+
core
21+
!core/
22+
tags
23+
.DS_Store
24+
.directory
25+
*.debug
26+
Makefile*
27+
*.prl
28+
*.app
29+
moc_*.cpp
30+
ui_*.h
31+
qrc_*.cpp
32+
Thumbs.db
33+
*.res
34+
*.rc
35+
/.qmake.cache
36+
/.qmake.stash
37+
38+
# qtcreator generated files
39+
*.pro.user*
40+
41+
# xemacs temporary files
42+
*.flc
43+
44+
# Vim temporary files
45+
.*.swp
46+
47+
# Visual Studio generated files
48+
*.ib_pdb_index
49+
*.idb
50+
*.ilk
51+
*.pdb
52+
*.sln
53+
*.suo
54+
*.vcproj
55+
*vcproj.*.*.user
56+
*.ncb
57+
*.sdf
58+
*.opensdf
59+
*.vcxproj
60+
*vcxproj.*
61+
62+
# MinGW generated files
63+
*.Debug
64+
*.Release
65+
66+
# Python byte code
67+
*.pyc
68+
69+
# Binaries
70+
# --------
71+
*.dll
72+
*.exe
73+
74+
# cm
75+
build
76+
.cache
77+
CMakeLists.txt.*

Diff for: .gitmodules

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[submodule "third_party/fmt"]
2+
path = third_party/fmt
3+
url = https://github.com/fmtlib/fmt.git
4+
[submodule "third_party/json"]
5+
path = third_party/json
6+
url = https://github.com/nlohmann/json.git
7+
[submodule "third_party/random"]
8+
path = third_party/random
9+
url = https://github.com/effolkronium/random.git
10+
[submodule "third_party/expected"]
11+
path = third_party/expected
12+
url = https://github.com/TartanLlama/expected.git
13+
[submodule "third_party/asio"]
14+
path = third_party/asio
15+
url = https://github.com/chriskohlhoff/asio.git
16+
[submodule "third_party/material-color-utilities"]
17+
path = third_party/material-color
18+
url = https://github.com/material-foundation/material-color-utilities

Diff for: CMakeLists.txt

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(
4+
Qcm
5+
VERSION 0.1
6+
LANGUAGES CXX)
7+
set(CMAKE_CXX_STANDARD 20)
8+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
9+
# set(CMAKE_CXX_EXTENSIONS OFF)
10+
11+
find_package(Qt6 REQUIRED COMPONENTS Core Quick)
12+
qt_standard_project_setup()
13+
14+
set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml_modules")
15+
16+
list(APPEND QML_DIRS "${QT_QML_OUTPUT_DIRECTORY}")
17+
set(QML_IMPORT_PATH
18+
"${QML_DIRS}"
19+
CACHE STRING "Qt Creator extra qml import paths" FORCE)
20+
21+
# -Wconversion -Wsign-conversion
22+
add_compile_options(-Wall -Wextra -Wpedantic -Wno-unused-variable
23+
-Wno-unused-function)
24+
25+
26+
add_compile_options(
27+
$<$<CONFIG:Debug>:-ggdb>
28+
$<$<CONFIG:Debug>:-fno-omit-frame-pointer>
29+
# $<$<CONFIG:Debug>:-fsanitize=address>
30+
)
31+
32+
#add_link_options(
33+
# $<$<CONFIG:Debug>:-fsanitize=address>
34+
#)
35+
36+
37+
add_subdirectory(third_party)
38+
add_subdirectory(core)
39+
add_subdirectory(error)
40+
add_subdirectory(material_helper)
41+
add_subdirectory(json_helper)
42+
add_subdirectory(asio_helper)
43+
add_subdirectory(asio_qt)
44+
add_subdirectory(request)
45+
add_subdirectory(crypto)
46+
add_subdirectory(service/ncm)
47+
add_subdirectory(app)

Diff for: app/CMakeLists.txt

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
find_package(Qt6 REQUIRED COMPONENTS QuickControls2)
2+
3+
set(SOURCES
4+
include/Qcm/app.h
5+
include/Qcm/api.h
6+
include/Qcm/color.h
7+
include/Qcm/info.h
8+
include/Qcm/type.h
9+
include/Qcm/model.h
10+
include/Qcm/playlist.h
11+
include/Qcm/ncm_image.h
12+
include/Qcm/qr_image.h
13+
include/Qcm/model/album_detail.h
14+
include/Qcm/model/album_sublist.h
15+
include/Qcm/model/artist.h
16+
include/Qcm/model/artist_sublist.h
17+
include/Qcm/model/login.h
18+
include/Qcm/model/playlist_detail.h
19+
include/Qcm/model/song_url.h
20+
include/Qcm/model/user_account.h
21+
include/Qcm/model/user_playlist.h
22+
include/Qcm/model/qrcode_login.h
23+
include/Qcm/model/qrcode_unikey.h
24+
src/app.cpp
25+
src/api.cpp
26+
src/color.cpp
27+
src/model.cpp
28+
src/playlist.cpp
29+
src/ncm_image.cpp
30+
src/qr_image.cpp)
31+
set(QML_FILES
32+
main.qml
33+
qml/PaneBar.qml
34+
qml/PlayBar.qml
35+
qml/test.qml
36+
qml/Theme.qml
37+
qml/QA.qml
38+
qml/page/LoginPage.qml
39+
qml/page/AlbumDetailPage.qml
40+
qml/page/ArtistDetailPage.qml
41+
qml/page/PlaylistDetailPage.qml
42+
qml/page/MinePage.qml
43+
qml/page/TodayPage.qml
44+
qml/part/ArtistsPopup.qml
45+
qml/component/IconRowLayout.qml
46+
qml/component/SongDelegate.qml
47+
qml/component/RoundImage.qml
48+
qml/component/Leaflet.qml
49+
qml/component/MItemDelegate.qml
50+
qml/component/MPopup.qml
51+
qml/component/PageContainer.qml)
52+
set(RESOURCES assets/MaterialIconsRound-Regular.otf
53+
assets/MaterialIconsOutlined-Regular.otf)
54+
55+
set_source_files_properties(qml/Theme.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
56+
set_source_files_properties(qml/QA.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
57+
58+
add_library(app STATIC)
59+
qt_add_qml_module(
60+
app
61+
URI
62+
QcmApp
63+
RESOURCE_PREFIX
64+
/
65+
VERSION
66+
1.0
67+
QML_FILES
68+
${QML_FILES}
69+
SOURCES
70+
${SOURCES}
71+
RESOURCES
72+
${RESOURCES})
73+
74+
target_include_directories(
75+
app
76+
PUBLIC include
77+
PRIVATE src/ include/Qcm include/Qcm/model)
78+
target_link_libraries(
79+
app
80+
PUBLIC Qt6::Core
81+
Qt6::Quick
82+
Qt6::QuickControls2
83+
asio_qt
84+
sv_ncm
85+
request
86+
fmt::fmt
87+
qr_code
88+
material_helper
89+
appplugin)
90+
91+
qt_add_executable(${PROJECT_NAME} MANUAL_FINALIZATION main.cpp)
92+
qt_import_qml_plugins(${PROJECT_NAME})
93+
target_link_libraries(${PROJECT_NAME} PRIVATE app)
94+
95+
qt_finalize_target(${PROJECT_NAME})

Diff for: app/assets/MaterialIconsOutlined-Regular.otf

331 KB
Binary file not shown.

Diff for: app/assets/MaterialIconsRound-Regular.otf

391 KB
Binary file not shown.

0 commit comments

Comments
 (0)