pax_global_header 0000666 0000000 0000000 00000000064 15226157704 0014523 g ustar 00root root 0000000 0000000 52 comment=ecc995429dd439f49c3c40fccc603df2e49addef
dtkcore-6.7.46/ 0000775 0000000 0000000 00000000000 15226157704 0013262 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/.clang-format 0000664 0000000 0000000 00000016450 15226157704 0015643 0 ustar 00root root 0000000 0000000 ---
# è¯è¨€: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto
Language: Cpp
# BasedOnStyle: LLVM
# 访问说明符(publicã€�privateç‰)çš„å��ç§»
AccessModifierOffset: -4
# 开括�(开圆括��开尖括��开方括�)�的对�: Align, DontAlign, AlwaysBreak(总是在开括���行)
AlignAfterOpenBracket: Align
# 连ç»èµ‹å€¼æ—¶ï¼Œå¯¹é½�所有ç‰å�·
AlignConsecutiveAssignments: None
# 连ç»å£°æ˜Žæ—¶ï¼Œå¯¹é½�所有声明的å�˜é‡�å��
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
# 左对é½�逃脱æ�¢è¡Œ(使用å��æ–œæ� æ�¢è¡Œ)çš„å��æ–œæ�
#AlignEscapedNewlinesLeft: true
# 水平对�二元和三元表达�的�作数
AlignOperands: true
# 对é½�连ç»çš„å°¾éš�的注释
AlignTrailingComments: true
# �许函数声明的所有�数在放在下一行
AllowAllParametersOfDeclarationOnNextLine: true
# å…�许çŸçš„å�—放在å�Œä¸€è¡Œ
AllowShortBlocksOnASingleLine: Empty
# å…�许çŸçš„caseæ ‡ç¾æ”¾åœ¨å�Œä¸€è¡Œ
AllowShortCaseLabelsOnASingleLine: false
# å…�许çŸçš„函数放在å�Œä¸€è¡Œ: None, InlineOnly(定义在类ä¸), Empty(空函数), Inline(定义在类ä¸ï¼Œç©ºå‡½æ•°), All
AllowShortFunctionsOnASingleLine: Inline
# å…�许çŸçš„ifè¯å�¥ä¿�æŒ�在å�Œä¸€è¡Œ
AllowShortIfStatementsOnASingleLine: false
# å…�许çŸçš„循环ä¿�æŒ�在å�Œä¸€è¡Œ
AllowShortLoopsOnASingleLine: false
# 总是在定义返回类型��行(deprecated)
AlwaysBreakAfterDefinitionReturnType: None
# 总是在返回类型å�Žæ�¢è¡Œ: None, All, TopLevel(顶级函数,ä¸�包括在类ä¸çš„函数),
# AllDefinitions(所有的定义,�包括声明), TopLevelDefinitions(所有的顶级函数的定义)
AlwaysBreakAfterReturnType: None
# 总是在多行stringå—é�¢é‡�å‰�æ�¢è¡Œ
AlwaysBreakBeforeMultilineStrings: false
# 总是在template声明��行
AlwaysBreakTemplateDeclarations: Yes
# false表示函数实��么都在�一行,�么都�自一行
BinPackArguments: false
# false表示所有形��么都在�一行,�么都�自一行
BinPackParameters: false
# 大括��行,�有当BreakBeforeBraces设置为Custom时�有效
BraceWrapping:
# class定义��
AfterClass: true
# 控制è¯å�¥å�Žé�¢
AfterControlStatement: Never
# enum定义��
AfterEnum: false
# 函数定义��
AfterFunction: true
# 命�空间定义��
AfterNamespace: false
# ObjC定义��
AfterObjCDeclaration: false
# struct定义��
AfterStruct: true
# union定义��
AfterUnion: true
AfterExternBlock: false
# catch之�
BeforeCatch: false
# else之�
BeforeElse: false
# 缩进大括�
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# 在二元�算符��行: None(在�作符��行), NonAssignment(在�赋值的�作符��行), All(在�作符��行)
BreakBeforeBinaryOperators: None
# 在大括å�·å‰�æ�¢è¡Œ: Attach(始终将大括å�·é™„åŠ åˆ°å‘¨å›´çš„ä¸Šä¸‹æ–‡), Linux(除函数ã€�命å��空间和类定义,与Attach类似),
# Mozilla(除枚举�函数�记录定义,与Attach类似), Stroustrup(除函数定义�catch�else,与Attach类似),
# Allman(总是在大括å�·å‰�æ�¢è¡Œ), GNU(总是在大括å�·å‰�æ�¢è¡Œï¼Œå¹¶å¯¹äºŽæŽ§åˆ¶è¯å�¥çš„大括å�·å¢žåŠ é¢�外的缩进), WebKit(在函数å‰�æ�¢è¡Œ), Custom
# 注:这里认为è¯å�¥å�—也属于函数
BreakBeforeBraces: Custom
# 在三元�算符��行
BreakBeforeTernaryOperators: false
# åœ¨æž„é€ å‡½æ•°çš„åˆ�始化列表的逗å�·å‰�æ�¢è¡Œ
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon
# æ¯�行å—符的é™�制,0表示没有é™�制
ColumnLimit: 130
# æ��述具有特殊æ„�义的注释的æ£åˆ™è¡¨è¾¾å¼�,它ä¸�应该被分割为多行或以其它方å¼�改å�˜
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
# æž„é€ å‡½æ•°çš„åˆ�始化列表è¦�么都在å�Œä¸€è¡Œï¼Œè¦�么都å�„自一行
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# æž„é€ å‡½æ•°çš„åˆ�始化列表的缩进宽度
ConstructorInitializerIndentWidth: 4
# å»¶ç»çš„行的缩进宽度
ContinuationIndentWidth: 4
# 去除C++11的列表åˆ�始化的大括å�·{å�Žå’Œ}å‰�çš„ç©ºæ ¼
Cpp11BracedListStyle: true
# 继承最常用的指针和引用的对�方�
DerivePointerAlignment: false
# 关闿 ¼å¼�化
DisableFormat: false
# 自动检测函数的调用和定义是å�¦è¢«æ ¼å¼�为æ¯�行一个å�‚æ•°(Experimental)
ExperimentalAutoDetectBinPacking: false
# 需�被解读为foreach循环而�是函数调用的�
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# 对#include进行排åº�,匹é…�了æŸ�æ£åˆ™è¡¨è¾¾å¼�çš„#include拥有对应的优先级,匹é…�ä¸�到的则默认优先级为INT_MAX(优先级越å°�排åº�è¶Šé� å‰�),
# �以定义负数优先级从而���些#include永远在最��
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
# 缩进caseæ ‡ç¾
IndentCaseLabels: true
#IndentPPDirectives: AfterHash
# 缩进宽度
IndentWidth: 4
# 函数返回类型�行时,缩进函数声明或函数定义的函数�
IndentWrappedFunctionNames: false
# �留在�开始处的空行
KeepEmptyLinesAtTheStartOfBlocks: false
# 开始一个å�—çš„å®�çš„æ£åˆ™è¡¨è¾¾å¼�
MacroBlockBegin: ''
# 结æ�Ÿä¸€ä¸ªå�—çš„å®�çš„æ£åˆ™è¡¨è¾¾å¼�
MacroBlockEnd: ''
# 连ç»ç©ºè¡Œçš„æœ€å¤§æ•°é‡�
MaxEmptyLinesToKeep: 1
# 命å��空间的缩进: None, Inner(缩进嵌套的命å��空间ä¸çš„内容), All
NamespaceIndentation: Inner
# 使用ObjC�时缩进宽度
ObjCBlockIndentWidth: 4
# 在ObjCçš„@propertyå�Žæ·»åŠ ä¸€ä¸ªç©ºæ ¼
ObjCSpaceAfterProperty: false
# 在ObjCçš„protocol列表å‰�æ·»åŠ ä¸€ä¸ªç©ºæ ¼
ObjCSpaceBeforeProtocolList: true
# 在call(�对函数调用�行的penalty
PenaltyBreakBeforeFirstCallParameter: 19
# 在一个注释ä¸å¼•å…¥æ�¢è¡Œçš„penalty
PenaltyBreakComment: 300
# 第一次在<<��行的penalty
PenaltyBreakFirstLessLess: 120
# 在一个å—符串å—é�¢é‡�ä¸å¼•å…¥æ�¢è¡Œçš„penalty
PenaltyBreakString: 1000
# 对于æ¯�个在行å—符数é™�制之外的å—符的penalty
PenaltyExcessCharacter: 1000000
# 将函数的返回类型放到它自己的行的penalty
PenaltyReturnTypeOnItsOwnLine: 60
# 指针和引用的对�: Left, Right, Middle
PointerAlignment: Right
# �许�新排版注释
ReflowComments: true
# �许排�#include
SortIncludes: Never
# 在Cé£Žæ ¼ç±»åž‹è½¬æ�¢å�Žæ·»åŠ ç©ºæ ¼
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
# 在赋值è¿�算符之å‰�æ·»åŠ ç©ºæ ¼
SpaceBeforeAssignmentOperators: true
# 开圆括å�·ä¹‹å‰�æ·»åŠ ä¸€ä¸ªç©ºæ ¼: Never, ControlStatements, Always
SpaceBeforeParens: ControlStatements
# 在空的圆括å�·ä¸æ·»åŠ ç©ºæ ¼
SpaceInEmptyParentheses: false
# 在尾éš�的评论å‰�æ·»åŠ çš„ç©ºæ ¼æ•°(å�ªé€‚用于//)
SpacesBeforeTrailingComments: 2
# 在尖括å�·çš„<å�Žå’Œ>å‰�æ·»åŠ ç©ºæ ¼
SpacesInAngles: false
# 在容器(ObjCå’ŒJavaScript的数组和å—å…¸ç‰)å—é�¢é‡�䏿·»åŠ ç©ºæ ¼
SpacesInContainerLiterals: false
# 在Cé£Žæ ¼ç±»åž‹è½¬æ�¢çš„æ‹¬å�·ä¸æ·»åŠ ç©ºæ ¼
SpacesInCStyleCastParentheses: false
# 在圆括å�·çš„(å�Žå’Œ)å‰�æ·»åŠ ç©ºæ ¼
SpacesInParentheses: false
# 在方括å�·çš„[å�Žå’Œ]å‰�æ·»åŠ ç©ºæ ¼ï¼Œlamda表达å¼�和未指明大å°�的数组的声明ä¸�å�—å½±å“�
SpacesInSquareBrackets: false
# æ ‡å‡†: Cpp03, Cpp11, Auto
Standard: Auto
# tab宽度
TabWidth: 4
# 使用tabå—符: Never, ForIndentation, ForContinuationAndIndentation, Always
UseTab: Never
dtkcore-6.7.46/.clog.toml 0000664 0000000 0000000 00000000160 15226157704 0015156 0 ustar 00root root 0000000 0000000 [clog]
repository = "https://github.com/linuxdeepin/dtkcore"
from-latest-tag = true
changelog = "CHANGELOG.md"
dtkcore-6.7.46/.github/ 0000775 0000000 0000000 00000000000 15226157704 0014622 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 15226157704 0017005 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/.github/ISSUE_TEMPLATE/config.yml 0000664 0000000 0000000 00000002365 15226157704 0021003 0 ustar 00root root 0000000 0000000 blank_issues_enabled: false
contact_links:
- name: BUG Report | 缺陷报告
url: https://github.com/linuxdeepin/dtk/issues/new?assignees=&labels=&template=bug-report.yml
about: Please create bug reports to the issue board in our dtk repo.
- name: docs-update | 文档补充
url: https://github.com/linuxdeepin/dtk/issues/new?assignees=&labels=&template=docs-update.yml
about: Please create docs-update to the issue board in our dtk repo.
- name: unit-test-report | �元测试报告
url: https://github.com/linuxdeepin/dtk/issues/new?assignees=&labels=&template=unit-test-report.yml
about: Please create unit-test-report to the issue board in our dtk repo.
- name: Feature Request | 特性请求
url: https://github.com/linuxdeepin/developer-center/discussions/new?category=features-request-ideas-%E7%89%B9%E6%80%A7%E8%AF%B7%E6%B1%82-%E5%A4%B4%E8%84%91%E9%A3%8E%E6%9A%B4
about: Please create feature requests to the discussion board in our developer-center repo.
- name: General Discussion & Questions | 常规讨论与问ç”
url: https://github.com/linuxdeepin/developer-center/discussions/categories/q-a-%E9%97%AE%E7%AD%94%E6%9D%BF%E5%9D%97
about: Please use the discussion board in our developer-center repo.
dtkcore-6.7.46/.github/ISSUE_TEMPLATE/document.md 0000664 0000000 0000000 00000000524 15226157704 0021146 0 ustar 00root root 0000000 0000000 ---
name: Docs update
about: Document Normalization
title: 'Doc: [Document Type][file name]'
labels: 'Doc'
assignees: ''
---
## Target files (ç›®æ ‡æ–‡ä»¶)
## Planned completion time (计划完�时间)
## Document Type (文档类型)
[] New documents
[] Standardized documents
[] Internationalization of documents
[] Example documents
dtkcore-6.7.46/.github/workflows/ 0000775 0000000 0000000 00000000000 15226157704 0016657 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/.github/workflows/auto-release.yml 0000664 0000000 0000000 00000002566 15226157704 0022001 0 ustar 00root root 0000000 0000000 name: Auto Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 1.0.0)'
type: string
required: false
name:
description: 'The name of the person to release the version'
type: string
required: false
email:
description: 'The email of the person to release the version'
type: string
required: false
timezone:
description: 'The timezone in the debian changelog file'
required: false
type: string
default: 'Asia/Shanghai'
workflow_call:
inputs:
version:
description: 'Release version (e.g., 1.0.0)'
type: string
required: true
name:
description: 'The name of the person to release the version'
type: string
required: false
email:
description: 'The email of the person to release the version'
type: string
required: false
timezone:
description: 'The timezone in the debian changelog file'
required: false
type: string
default: 'Asia/Shanghai'
jobs:
auto_tag:
uses: linuxdeepin/.github/.github/workflows/auto-release.yml@master
secrets: inherit
with:
version: ${{ inputs.version }}
name: ${{ inputs.name }}
email: ${{ inputs.email }}
timezone: ${{ inputs.timezone }}
dtkcore-6.7.46/.github/workflows/backup-to-gitlab.yml 0000664 0000000 0000000 00000000537 15226157704 0022534 0 ustar 00root root 0000000 0000000 name: backup to gitlab
on: [push]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
backup-to-gitlabwh:
uses: linuxdeepin/.github/.github/workflows/backup-to-gitlabwh.yml@master
secrets: inherit
backup-to-gitee:
uses: linuxdeepin/.github/.github/workflows/backup-to-gitee.yml@master
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-auto-tag.yml 0000664 0000000 0000000 00000000517 15226157704 0022037 0 ustar 00root root 0000000 0000000 name: auto tag
on:
pull_request_target:
types: [opened, synchronize, closed]
paths:
- "debian/changelog"
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
auto_tag:
uses: linuxdeepin/.github/.github/workflows/auto-tag.yml@master
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-build-distribution.yml 0000664 0000000 0000000 00000000432 15226157704 0024126 0 ustar 00root root 0000000 0000000 name: Call build-distribution
on:
push:
paths-ignore:
- ".github/workflows/**"
pull_request_target:
paths-ignore:
- ".github/workflows/**"
jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/build-distribution.yml@master
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-chatOps.yml 0000664 0000000 0000000 00000000242 15226157704 0021712 0 ustar 00root root 0000000 0000000 name: chatOps
on:
issue_comment:
types: [created]
jobs:
chatopt:
uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-clacheck.yml 0000664 0000000 0000000 00000000525 15226157704 0022052 0 ustar 00root root 0000000 0000000 name: Call CLA check
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
clacheck:
uses: linuxdeepin/.github/.github/workflows/cla-check.yml@master
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-commitlint.yml 0000664 0000000 0000000 00000000364 15226157704 0022475 0 ustar 00root root 0000000 0000000 name: Call commitlint
on:
pull_request_target:
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/commitlint.yml@master
dtkcore-6.7.46/.github/workflows/call-deploy-dev-doc.yml 0000664 0000000 0000000 00000000740 15226157704 0023127 0 ustar 00root root 0000000 0000000 name: deploy docs
on:
push:
branches: ["master"]
workflow_dispatch:
inputs:
tag:
required: true
type: string
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploydocs:
uses: linuxdeepin/.github/.github/workflows/deploy-dev-doc.yml@master
with:
ref: ${{ inputs.tag }}
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-doc-check.yml 0000664 0000000 0000000 00000000467 15226157704 0022142 0 ustar 00root root 0000000 0000000 name: doxygen-check
on:
pull_request_target:
paths-ignore:
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/doc-check.yml@master
secrets: inherit
dtkcore-6.7.46/.github/workflows/call-license-check.yml 0000664 0000000 0000000 00000000552 15226157704 0023012 0 ustar 00root root 0000000 0000000 name: Call License and README Check
on:
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write
contents: read
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
license-check:
uses: linuxdeepin/.github/.github/workflows/license-check.yml@master
dtkcore-6.7.46/.github/workflows/cppcheck.yml 0000664 0000000 0000000 00000001265 15226157704 0021166 0 ustar 00root root 0000000 0000000 name: cppcheck
on:
pull_request_target:
paths-ignore:
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
cppchceck:
name: cppcheck
runs-on: ubuntu-latest
steps:
- run: export
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- uses: linuxdeepin/action-cppcheck@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
pull_request_id: ${{ github.event.pull_request.number }}
allow_approve: false
dtkcore-6.7.46/.github/workflows/dtkcore-archlinux-build.yml 0000664 0000000 0000000 00000005077 15226157704 0024136 0 ustar 00root root 0000000 0000000 name: Build dtkcore on Arch Linux
on:
push:
pull_request:
jobs:
container:
runs-on: ubuntu-latest
container: archlinux:latest
strategy:
matrix:
include:
- qt_version: 5
dtk5: "ON"
- qt_version: 6
dtk5: "OFF"
steps:
- name: Initialize pacman and system update
run: |
pacman-key --init
pacman --noconfirm --noprogressbar -Syu
- name: Install base build tools
run: |
pacman -S --noconfirm --noprogressbar base-devel git cmake ninja pkgconf
- name: Install dtkcore Qt5 system dependencies
if: matrix.qt_version == 5
run: |
pacman -S --noconfirm --noprogressbar \
qt5-base qt5-tools \
icu uchardet dbus \
gtest spdlog \
gsettings-qt \
dtkcommon dtklog
- name: Install dtkcore Qt6 system dependencies
if: matrix.qt_version == 6
run: |
pacman -S --noconfirm --noprogressbar \
qt6-base qt6-tools \
icu uchardet dbus \
gtest spdlog \
dtkcommon dtk6log
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure and build dtkcore
run: |
cmake -B build \
-GNinja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DDTK5=${{ matrix.dtk5 }}
cmake --build build -j$(nproc)
echo "✅ dtkcore Qt${{ matrix.qt_version }} built successfully!"
- name: Install dtkcore to staging directory
run: |
DESTDIR=/tmp/dtkcore-install cmake --install build
echo "Total: $(find /tmp/dtkcore-install -type f | wc -l) files"
- name: Create installation package
run: |
cd /tmp/dtkcore-install
pacman -S --noconfirm zip
zip -r /tmp/dtkcore-archlinux-qt${{ matrix.qt_version }}-$(date +%Y%m%d-%H%M%S).zip .
ls -la /tmp/dtkcore-archlinux-qt${{ matrix.qt_version }}-*.zip
- name: Upload dtkcore Arch Linux build artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: dtkcore-archlinux-qt${{ matrix.qt_version }}-build
path: "/tmp/dtkcore-archlinux-qt${{ matrix.qt_version }}-*.zip"
if-no-files-found: error
retention-days: 30
dtkcore-6.7.46/.github/workflows/dtkcore-deepin-build.yml 0000664 0000000 0000000 00000005274 15226157704 0023404 0 ustar 00root root 0000000 0000000 name: Build dtkcore on Deepin crimson
on:
push:
pull_request:
jobs:
container:
runs-on: ubuntu-latest
container: linuxdeepin/deepin:crimson
strategy:
matrix:
include:
- qt_version: 5
dtk_profile: nodtk6
- qt_version: 6
dtk_profile: nodtk5
steps:
- uses: actions/checkout@v4
- name: Setup apt sources and build tools
run: |
set -euxo pipefail
echo "deb [trusted=yes] http://mirrors.kernel.org/deepin/beige/ crimson main commercial community" > /etc/apt/sources.list
echo "deb-src [trusted=yes] http://mirrors.kernel.org/deepin/beige/ crimson main commercial community" >> /etc/apt/sources.list
rm -rf /etc/apt/sources.list.d
apt-get update
apt-get install -y devscripts equivs git
- name: Build and install dtkcommon from source
run: |
set -euxo pipefail
cd /tmp
git clone --depth=1 https://github.com/linuxdeepin/dtkcommon.git
cd dtkcommon
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
dpkg-buildpackage -uc -us -b
dpkg -i ../*.deb 2>/dev/null || apt-get install -f -y
echo "✅ dtkcommon installed"
- name: Build and install dtklog from source
run: |
set -euxo pipefail
cd /tmp
git clone --depth=1 https://github.com/linuxdeepin/dtklog.git
cd dtklog
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
dpkg-buildpackage -uc -us -b -P${{ matrix.dtk_profile }}
dpkg -i ../*.deb 2>/dev/null || apt-get install -f -y
echo "✅ dtklog installed"
- name: Install dtkcore build dependencies
run: |
set -euxo pipefail
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
- name: Build dtkcore deb packages
run: |
set -euxo pipefail
dpkg-buildpackage -uc -us -b -P${{ matrix.dtk_profile }}
echo "✅ dtkcore Qt${{ matrix.qt_version }} deb packages built successfully!"
ls -la ../
- name: Collect deb artifacts
run: |
mkdir -p dist
mv ../*.deb dist/
ls -la dist
- name: Upload dtkcore deb packages as artifacts
uses: actions/upload-artifact@v4
with:
name: dtkcore-deepin-deb-packages-qt${{ matrix.qt_version }}
path: dist/*.deb
if-no-files-found: error
retention-days: 30
dtkcore-6.7.46/.gitignore 0000664 0000000 0000000 00000000540 15226157704 0015251 0 ustar 00root root 0000000 0000000 # Compiled Object files
*.slo
*.lo
*.o
# Compiled Dynamic libraries
*.so
*.dylib
# Compiled Static libraries
*.lai
*.la
*.a
build*/
*.pro.user*
*.DS_Store
# executeable files
*.qm
src/DtkCores
bin/
.qmake*
Makefile
cmake/DtkCore*
.cache
*.pc
*.pri
dtkcore_config.h
*.user
#tools
.vscode
.idea
# Ignore Doxygen theme files
docs/doxygen-theme/
dtkcore-6.7.46/.gitlab-ci.yml 0000664 0000000 0000000 00000000227 15226157704 0015717 0 ustar 00root root 0000000 0000000 include:
- remote: 'https://gitlab.deepin.io/dev-tools/letmeci/raw/master/gitlab-ci/dde.yml'
variables:
CPPCHECK: "true"
CODESPELL: "true"
dtkcore-6.7.46/.obs/ 0000775 0000000 0000000 00000000000 15226157704 0014123 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/.obs/workflows.yml 0000664 0000000 0000000 00000002312 15226157704 0016701 0 ustar 00root root 0000000 0000000 test_build:
steps:
- link_package:
source_project: deepin:Develop:dde
source_package: %{SCM_REPOSITORY_NAME}
target_project: deepin:CI
- configure_repositories:
project: deepin:CI
repositories:
- name: deepin_develop
paths:
- target_project: deepin:CI
target_repository: deepin_develop
architectures:
- x86_64
- aarch64
- name: debian
paths:
- target_project: deepin:CI
target_repository: debian_sid
architectures:
- x86_64
- name: archlinux
paths:
- target_project: deepin:CI
target_repository: archlinux
architectures:
- x86_64
filters:
event: pull_request
tag_build:
steps:
- branch_package:
source_project: deepin:Develop:dde
source_package: %{SCM_REPOSITORY_NAME}
target_project: deepin:Unstable:dde
filters:
event: tag_push
commit_build:
steps:
- trigger_services:
project: deepin:Develop:dde
package: %{SCM_REPOSITORY_NAME}
filters:
event: push
dtkcore-6.7.46/.packit.yaml 0000664 0000000 0000000 00000000724 15226157704 0015502 0 ustar 00root root 0000000 0000000 # See the documentation for more information:
# https://packit.dev/docs/configuration/
specfile_path: rpm/dtkcore.spec
# add or remove files that should be synced
synced_files:
- rpm/dtkcore.spec
- .packit.yaml
upstream_package_name: dtkcore
# downstream (Fedora) RPM package name
downstream_package_name: dtkcore
actions:
fix-spec-file: |
bash -c "sed -i -r \"0,/Version:/ s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/dtkcore.spec"
dtkcore-6.7.46/.project.json 0000664 0000000 0000000 00000000242 15226157704 0015677 0 ustar 00root root 0000000 0000000 {
"Type": "homebrew",
"3rdparty": ["tools/qdbusxml2cpp"],
"ignore": ["src/translations","src/widgets/assets","doc",".tx"],
"license": ["GPLv3"]
}
dtkcore-6.7.46/.release.json 0000664 0000000 0000000 00000001045 15226157704 0015653 0 ustar 00root root 0000000 0000000 {
"commit": {
"quilt": false,
"pkgver": "echo $(git tag | sort -V | tail -n1)'+r'$(git log $(git describe --abbrev=0 --tags)..HEAD --oneline|wc -l)'+g'$(git rev-parse --short HEAD);",
"dist": "experimental"
},
"release": {
"quilt": true,
"pkgver": "git describe --abbrev=0 --tags %(ref)s",
"dist": "unstable"
},
"release-candidate": {
"quilt": true,
"dist": "unstable"
}
}
dtkcore-6.7.46/.reuse/ 0000775 0000000 0000000 00000000000 15226157704 0014463 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/.reuse/dep5 0000664 0000000 0000000 00000003161 15226157704 0015244 0 ustar 00root root 0000000 0000000 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dtkcore
Upstream-Contact: UnionTech Software Technology Co., Ltd. <>
Source: https://github.com/linuxdeepin/dtkcore
# Sample paragraph, commented out:
#
# Files: src/*
# Copyright: $YEAR $NAME <$CONTACT>
# License: ...
# ci
Files: .github/* *.yml *.yaml .obs/* .syncexclude
Copyright: None
License: CC0-1.0
# git
Files: .gitignore
Copyright: None
License: CC0-1.0
# config
Files: *.toml *.conf *.json .clang-format
Copyright: None
License: CC0-1.0
# qt
Files: *.pro *.pri *.qrc *.prf
Copyright: None
License: CC0-1.0
# cmake
Files: *.cmake *CMakeLists.txt *.pc.in, cmake/*.in misc/*.in VERSION VERSION.in
Copyright: None
License: CC0-1.0
# debian
Files: debian/*
Copyright: None
License: CC0-1.0
# Arch
Files: archlinux/*
Copyright: None
License: CC0-1.0
# rpm
Files: rpm/*
Copyright: None
License: CC0-1.0
# docs
Files: *.dox *.md src/util/README.dpinyin tools/qdbusxml2cpp/README
Copyright: UnionTech Software Technology Co., Ltd.
License: CC-BY-4.0
# doxygen src
Files: docs/src/*
Copyright: None
License: CC0-1.0
# interface
Files: include/DtkCore/D*
Copyright: None
License: CC0-1.0
# others
Files: src/util/resources/dpinyin.dict tests/data/LGPLv3.txt
Copyright: None
License: CC0-1.0
#doxygentheme
Files: docs/doxygentheme/*
Copyright: Copyright (c) 2021 - 2022 jothepro
License: MIT
#reference
Files: docs/references/*
Copyright: UnionTech Software Technology Co., Ltd.
License: CC-BY-4.0
Files: toolGenerate/**/*
Copyright: None
License: CC0-1.0
Files: src/log/dconfig_org_deepin_dtk_preference.hpp
Copyright: None
License: CC0-1.0
dtkcore-6.7.46/.syncexclude 0000664 0000000 0000000 00000000412 15226157704 0015606 0 ustar 00root root 0000000 0000000 # Paths that will be exclude from synchronize workflow
# Please use relative path which use project directory as root
# Notice that
# * .git
# * debian
# * archlinux
# * .obs
# * .github
# are always ignored
linglong.yaml
conanfile.py
VERSION
CHANGELOG.md
dtkcore-6.7.46/CHANGELOG.md 0000664 0000000 0000000 00000045515 15226157704 0015105 0 ustar 00root root 0000000 0000000 # Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [6.7.46] - 2026-07-16
### Fixed
- Preserve float literal type in JSON config values
## [6.7.45] - 2026-07-09
### Fixed
- Fix serial comparison logic in DConfigCache setValue
## [6.7.44] - 2026-06-17
## [6.7.43] - 2026-06-04
### Added
- Add version guard for entryList method
- Add thread safety for pinyin dictionary initialization
- Support full Unicode with UTF-8 byte escaping
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
- Chore: New release 6.7.37
- Chore: New release 6.7.38
- Update license info loading and search paths
- Chore: New release 6.7.39
- Chore: New release 6.7.40
- Move inline function to library codebase
- Chore: New release 6.7.41
- Chore: New release 6.7.42
- Replace private access hacks with accessor pattern
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
- Memory leak when overwriting cached DBus property values
### Removed
- Remove fallback to file mode in DConfig
## [6.7.42] - 2026-05-20
### Added
- Add version guard for entryList method
- Add thread safety for pinyin dictionary initialization
- Support full Unicode with UTF-8 byte escaping
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
- Chore: New release 6.7.37
- Chore: New release 6.7.38
- Update license info loading and search paths
- Chore: New release 6.7.39
- Chore: New release 6.7.40
- Move inline function to library codebase
- Chore: New release 6.7.41
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
- Memory leak when overwriting cached DBus property values
### Removed
- Remove fallback to file mode in DConfig
## [6.7.41] - 2026-05-08
### Added
- Add version guard for entryList method
- Add thread safety for pinyin dictionary initialization
- Support full Unicode with UTF-8 byte escaping
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
- Chore: New release 6.7.37
- Chore: New release 6.7.38
- Update license info loading and search paths
- Chore: New release 6.7.39
- Chore: New release 6.7.40
- Move inline function to library codebase
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
### Removed
- Remove fallback to file mode in DConfig
## [6.7.40] - 2026-04-23
### Added
- Add version guard for entryList method
- Add thread safety for pinyin dictionary initialization
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
- Chore: New release 6.7.37
- Chore: New release 6.7.38
- Update license info loading and search paths
- Chore: New release 6.7.39
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
### Removed
- Remove fallback to file mode in DConfig
## [6.7.39] - 2026-04-09
### Added
- Add version guard for entryList method
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
- Chore: New release 6.7.37
- Chore: New release 6.7.38
- Update license info loading and search paths
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
### Removed
- Remove fallback to file mode in DConfig
## [6.7.38] - 2026-03-31
### Added
- Add version guard for entryList method
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
- Chore: New release 6.7.37
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
### Removed
- Remove fallback to file mode in DConfig
## [6.7.37] - 2026-03-25
### Added
- Add version guard for entryList method
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
- Chore: New release 6.7.36
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
- Replace QScopedPointer with raw pointer for DSGConfigManager
### Removed
- Remove fallback to file mode in DConfig
## [6.7.36] - 2026-03-12
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
- Chore: New release 6.7.35
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
### Removed
- Remove fallback to file mode in DConfig
## [6.7.35] - 2026-03-05
### Changed
- Chore: New release 6.7.33
- Chore: New release 6.7.34
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
### Removed
- Remove fallback to file mode in DConfig
## [6.7.34] - 2026-02-27
### Changed
- Chore: New release 6.7.33
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
- Avoid duplicate logging under systemd with journal
## [6.7.33] - 2026-02-05
### Fixed
- Validate subpath format in dconfig
- 修� DSysInfo 在 AArch64 架构下的线程安全问题
- Restore dconfig_meta_files macro for DTK5 compatibility
## [6.7.32] - 2026-01-22
### Added
- Add unit tests for dconfig2cpp generated class
- Add version macros and property definitions to dconfig2cpp
### Changed
- Replace with the new interface dconfig isInitializeSucceeded
### Fixed
- Correct condition check for fallback config in LogManager
- Refactor DConfig wrapper class generation for thread safety and lifecycle management
- Fix: dconfig2cpp: ensure isInitializeSucceeded() is true only after all
### Removed
- Delete workflow call-synchronize-to-dtk6
- Remove dtk5/6 version differentiation in build rules
## [6.7.31] - 2026-01-06
### Added
- Add DTK6 documentation package and improve build profiles
### Changed
- Unify DTK5 and DTK6
### Fixed
- Correct pinyin tone number placement and test issues
- Fix build with Qt 6.9
## [5.7.30] - 2025-12-11
### Added
- Add isReadOnly method to DConfig
### Changed
- Generate dtkcore_config.h out of source tree
### Fixed
- Fix DCI file engine compatibility issues in Qt6
- Correct dtkcore_config.h installation path
## [5.7.28] - 2025-12-04
## [5.7.27] - 2025-11-27
### Added
- Add reproducible build configuration
## [5.7.26] - 2025-11-06
### Changed
- Chore: New release 5.7.25
- Improve numeric type detection in dconfig2cpp (#516)
### Fixed
- ä¿®å¤�æŸ�些机型CPUåž‹å�·ä¸åŒ…å�«å†’å�·æ—¶æŽ§åˆ¶ä¸å¿ƒæ— 法读å�–显示CPUä¿¡æ�¯çš„问题
## [5.7.25] - 2025-10-30
## [5.7.24] - 2025-10-16
### Added
- Support Qt 6.10
### Fixed
- Replace rmdir with rename for directory operations
- Prevent thread-safety issue in D-Bus config manager
- Sync with qt5platform-plugins
## [5.7.23] - 2025-09-25
### Added
- Add fallback type conversion in demarshall function
### Changed
- Feat: DPinyin::firstLetters support set ToneStyle
- å¢žåŠ æœ�务器教育版和国防版
### Fixed
- Fix trash validation for symlinks
- Fix heap-use-after-free issue
- Fix dconfig static variable release issue
## [5.7.22] - 2025-09-04
### Fixed
- Resolve non-reproducible DBUS code generation issue
## [5.7.21] - 2025-08-14
### Added
- Add deprecation ignore support for DTK
## [5.7.20] - 2025-07-31
### Changed
- Improve D-Bus resource management with RAII
### Fixed
- Use QCoreApplication for application name
- Resolve compilation warnings and Qt6 compatibility issues
## [5.7.19] - 2025-07-03
### Added
- Add security hardening flags to build configuration
### Changed
- Replace QtDBus with libdbus-1 in dsgapplication
## [5.7.18] - 2025-06-27
### Fixed
- Improve logging rules environment variable handling
- Copy cachePrefix in DConfigFile copy constructor
- Make version parameter optional in release workflow
## [5.7.17] - 2025-06-18
### Added
- Feat(ci): add auto release
- Add license for VERSION.in
### Changed
- Support VERSION file
- Update .syncexclude
### Fixed
- .deepin@main -> .deepin@master
## 5.7.14 (2025-04-12)
### Bug Fixes
* resolve compilation failure on Qt 6.9
## 2.0.14 (2019-05-23)
#### Bug Fixes
* **DSettings:** crash when calling getOption() if option doesn't exist ([90ac734b](https://github.com/linuxdeepin/dtkcore/commit/90ac734b872203ea698808a7197aa7a9c7e2b5bd))
## 2.0.12 (2019-04-18)
## 2.0.11 (2019-04-17)
#### Bug Fixes
* Cross-builds incorrectly, built packages contain paths from build architecture ([8d32577a](https://github.com/linuxdeepin/dtkcore/commit/8d32577a89e54b5c9c834caae83d98e50f59df77))
* https://github.com/linuxdeepin/dtkcore/issues/10 ([3f99873a](https://github.com/linuxdeepin/dtkcore/commit/3f99873a786f6830688ecd0d8d2e2bf8dfb63ce0))
## 2.0.10 (2019-03-27)
#### Bug Fixes
* crash at application ([d852a218](https://github.com/linuxdeepin/dtkcore/commit/d852a21811f9f86e04274fc9f732d7c7a210ef3f))
#### Features
* add DNotifySender ([89bbcd7c](https://github.com/linuxdeepin/dtkcore/commit/89bbcd7c3821985bb2bca51247394fd4a65b25bf))
## 2.0.9.17 (2019-02-26)
## 2.0.9.16 (2019-02-26)
#### Bug Fixes
* deepin-os-release support cpu model and other info query ([cbeb47c9](https://github.com/linuxdeepin/dtkcore/commit/cbeb47c97e31d2b5dd3c198c60ee74332fecb293))
## 2.0.9.15 (2019-01-25)
#### Bug Fixes
* failed build the deepin-os-release on Qt 5.7.1 ([8bae8654](https://github.com/linuxdeepin/dtkcore/commit/8bae8654bdb20a7f773130d22b9db139460ba575))
* use main project c/cxx/ld flags on build deepin-os-release ([86dbd507](https://github.com/linuxdeepin/dtkcore/commit/86dbd507c1b3b101c1816f091782430ec1ce20ce))
## 2.0.9.14 (2019-01-02)
## 2.0.9.13 (2018-12-28)
## 2.0.9.12 (2018-12-24)
#### Bug Fixes
* **DPathBuf:** missing default constructor ([74374cb4](https://github.com/linuxdeepin/dtkcore/commit/74374cb4cf0245ab1fe73f62fe0d13566f945db3))
#### Features
* support connan build ([ba2d213f](https://github.com/linuxdeepin/dtkcore/commit/ba2d213fd6c7e36e118288305e5892c339250623))
## 2.0.9.11 (2018-12-14)
## 2.0.9.10 (2018-12-05)
#### Bug Fixes
* include unistd.h instead of sys/unistd.h ([39c50a13](https://github.com/linuxdeepin/dtkcore/commit/39c50a1398c34123e3806a3060a4c64e7f45ed68))
* url encoding ([4a6b7b61](https://github.com/linuxdeepin/dtkcore/commit/4a6b7b61bb3ad9ab417eda69249b5e9aced0aa97))
## 2.0.9.9 (2018-11-19)
#### Features
* add DRecentManager class. ([a2defafd](https://github.com/linuxdeepin/dtkcore/commit/a2defafdcf57078461221c665e322287a43d24a8))
#### Bug Fixes
* compatibility with Qt 5.6 ([0ec7f3ce](https://github.com/linuxdeepin/dtkcore/commit/0ec7f3ce389b323ecb2b103801c1cd1d55f100fa))
* **drecentmanager:**
* xbel file does not exist. ([c57ffe71](https://github.com/linuxdeepin/dtkcore/commit/c57ffe714f26b1a8a8859e2ffbeeed3d75ee11a1))
* uniform url format. ([413a8988](https://github.com/linuxdeepin/dtkcore/commit/413a8988116708ab8bcf9efbb9bc8f52e048efa5))
* url encoded. ([e234a8cc](https://github.com/linuxdeepin/dtkcore/commit/e234a8cc5ad9d2c14a16950838115c4f2f27c605))
* **recent:** chinese doc ([fb256461](https://github.com/linuxdeepin/dtkcore/commit/fb256461d1bdb0862b1a3a129978fc3932a6bcab))
## 2.0.9.8 (2018-11-09)
#### Bug Fixes
* can't get correct disk size in some case ([20a12b62](https://github.com/linuxdeepin/dtkcore/commit/20a12b622ea7b01f0616c15a8af85e31fc2d36cb))
## 2.0.9.5 (2018-10-26)
#### Features
* update version number for expermimental ([02b5d5c1](https://github.com/linuxdeepin/dtkcore/commit/02b5d5c1e01a05f57651b774b02cae31ef9a549f))
## 2.0.9 (2018-07-20)
#### Bug Fixes
* remove qt symbols ([57ec78ba](https://github.com/linuxdeepin/dtkcore/commit/57ec78ba685a53692b0260d3d558d8b0915fc3e4))
* non array type value is wrong on parse josn file ([9f138664](https://github.com/linuxdeepin/dtkcore/commit/9f13866439d8d650893434594da023e7d331d866))
### 2.0.8.1 (2018-05-14)
#### Bug Fixes
* update symbols ([f6c53cc4](https://github.com/linuxdeepin/dtkcore/commit/f6c53cc493c1bcf55dca54dbf500e2e484af73c9))
* add LIBDTKCORESHARED_EXPORT for windows ([6fb1096f](https://github.com/linuxdeepin/dtkcore/commit/6fb1096f6d0784937cf84f0e4ae1f5f7587085e5))
* **changelog:** update email format ([cb09a0ca](https://github.com/linuxdeepin/dtkcore/commit/cb09a0cadcf2fa0ba271b1d98d3b96a993eb892b))
## 2.0.8 (2018-05-02)
#### Features
* add symbols ([048de455](https://github.com/linuxdeepin/dtkcore/commit/048de4551bdd770aca5e9c12798362f913061654))
## 2.0.7 (2018-03-01)
#### Bug Fixes
* cmake link depends ([cdfcff9e](https://github.com/linuxdeepin/dtkcore/commit/cdfcff9e2f3e92bc6dbb45644d2714d6c4dbdda0))
* better static lib support ([99886406](https://github.com/linuxdeepin/dtkcore/commit/99886406a0cae849fad23286fdf64bb399e37da0))
* read settings value failed ([cf1c7698](https://github.com/linuxdeepin/dtkcore/commit/cf1c769893773794dff5a67c235c5d1f3234541a))
* set default should not use ([146529f6](https://github.com/linuxdeepin/dtkcore/commit/146529f6887e798606f2bf763ab8a760969bff26))
* fix dtk-settings install path ([1893cff3](https://github.com/linuxdeepin/dtkcore/commit/1893cff301dacb546a246a4f824dab68eac51351))
* develop package no install the "version.pri" file ([5667b562](https://github.com/linuxdeepin/dtkcore/commit/5667b562630565fca5abed690f3d3478dd3c7603))
* awk script failed ([524a3fa6](https://github.com/linuxdeepin/dtkcore/commit/524a3fa6021ee54db416503520aea65ef0e2c3a0))
* set default build version for debian changelog ([ec6e2a83](https://github.com/linuxdeepin/dtkcore/commit/ec6e2a8376c7aca7162b4fbb782b998c9a6ab630))
* set its value only if VERSION is empty ([1836000c](https://github.com/linuxdeepin/dtkcore/commit/1836000c49eb149a6495322c4cbb1474d5d48204))
#### Features
* add hide support for group ([e7e4fb66](https://github.com/linuxdeepin/dtkcore/commit/e7e4fb669276fbce61c6378e74ae82573e7c0313))
* add get option interface ([d8682485](https://github.com/linuxdeepin/dtkcore/commit/d8682485a6737da83fb28f22335f1da1afb8956c))
* add group interface for DSettingsGroup ([c876180f](https://github.com/linuxdeepin/dtkcore/commit/c876180f535e3027dce63628f31379ef874367ed))
* support generate cmake with qt function ([524b0559](https://github.com/linuxdeepin/dtkcore/commit/524b055929b7be84375a45f9d10cbc3a0ecac6de))
* config pkg config with dtk_module ([137b9138](https://github.com/linuxdeepin/dtkcore/commit/137b91388d9b9db24c8136dd4e2c6e690a5712c5))
* support qt module ([17ca0de9](https://github.com/linuxdeepin/dtkcore/commit/17ca0de9156a320cea32208dcff2f8cdf7d6a237))
* add the "version.pri" file ([07aab9fd](https://github.com/linuxdeepin/dtkcore/commit/07aab9fd6478c83c7bae1062f64b4bd20b21869c))
* remove build version from install path ([3bf0bfb5](https://github.com/linuxdeepin/dtkcore/commit/3bf0bfb5f49c3e83d4c36cc33f219150bf3731d8))
* make version parser easier ([6d3b4ead](https://github.com/linuxdeepin/dtkcore/commit/6d3b4ead7080158d1d8977bf7cf99ae842e574ec))
* set verion when build ([9083dbd3](https://github.com/linuxdeepin/dtkcore/commit/9083dbd3e29bf9d06b1032901ba13848fa964f4c))
* add .qmake.conf file ([2890f643](https://github.com/linuxdeepin/dtkcore/commit/2890f643a57c3532ab623410f7c6c6dbfdd6788d))
* add DtkCore and dtkcore_config.h headers ([308a0cc4](https://github.com/linuxdeepin/dtkcore/commit/308a0cc41101499c04308b4ef3bb2fff4ab8d783))
* **DSettings:** support set default value ([5fe9bfd0](https://github.com/linuxdeepin/dtkcore/commit/5fe9bfd0a5e20cef7393639712302825b803db29))
## 2.0.6 (2018-01-15)
## 2.0.5.3 (2017-12-27)
#### Bug Fixes
* Adapt lintian ([27df15df](https://github.com/linuxdeepin/dtkcore/commit/27df15df32788002491a24f06f098a5f849a4988))
* break forever loop for syncing backend data ([f70e500e](https://github.com/linuxdeepin/dtkcore/commit/f70e500ec2fd5c751e40833bdc4df586614bcff2))
#### Features
* **util:** add dpinyin ([128d7d67](https://github.com/linuxdeepin/dtkcore/commit/128d7d678e921bc580dd732b14a454973397899c))
## 2.0.5.2 (2017-11-28)
#### Bug Fixes
* make macosx build success ([af04bbe1](https://github.com/linuxdeepin/dtkcore/commit/af04bbe193a4b4251908f830d927ebdc8f4459e7))
* windows build failed ([66c4c812](https://github.com/linuxdeepin/dtkcore/commit/66c4c812eb29634710642f4e9d6b3d69cc692cb2))
#### Features
* add macro D_DECL_DEPRECATED ([89e49868](https://github.com/linuxdeepin/dtkcore/commit/89e49868f113ef01c03bcf5b6846eec95c428382))
## 2.0.5 (2017-11-06)
#### Bug Fixes
* build failed on used dbasefilewatcher.h project ([34fbe4b3](34fbe4b3))
* add miss libgsettings-qt-dev ([f61c1b54](f61c1b54))
* not select python version ([7e7e8832](7e7e8832))
#### Features
* support gsettingsbackend, remove dsettings-key ([26a29800](26a29800))
* create gsettingsbackend ([b94b97b1](b94b97b1))
dtkcore-6.7.46/CMakeLists.txt 0000664 0000000 0000000 00000001672 15226157704 0016030 0 ustar 00root root 0000000 0000000 cmake_minimum_required (VERSION 3.13)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" FILE_VERSION)
string(STRIP "${FILE_VERSION}" FILE_VERSION)
project (DtkCore
VERSION ${FILE_VERSION}
DESCRIPTION "DTK Core module"
HOMEPAGE_URL "https://github.com/linuxdeepin/dtkcore"
LANGUAGES CXX C
)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /usr)
endif ()
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
option(DTK5 "Build DTK5." ON)
if(DTK5)
set(DTK_VERSION_MAJOR "5")
set(DTK_NAME_SUFFIX "") # Empty name suffix for DTK5 products.
else()
set(DTK_VERSION_MAJOR "6")
set(DTK_NAME_SUFFIX "6")
endif()
set(DTK_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(DTK_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(DTK_VERSION "${DTK_VERSION_MAJOR}.${DTK_VERSION_MINOR}.${DTK_VERSION_PATCH}")
# Officially, DTK5 uses QT5, DTK6 uses QT6
set(QT_VERSION_MAJOR ${DTK_VERSION_MAJOR})
include(dtkcore.cmake)
dtkcore-6.7.46/LICENSE 0000664 0000000 0000000 00000122162 15226157704 0014273 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License� refers to version 3 of the GNU General Public License.
“Copyright� also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program� refers to any copyrightable work licensed under this License. Each licensee is addressed as “you�. “Licensees� and “recipients� may be individuals or organizations.
To “modify� a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version� of the earlier work or a work “based on� the earlier work.
A “covered work� means either the unmodified Program or a work based on the Program.
To “propagate� a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey� a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices� to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code� for a work means the preferred form of the work for making modifications to it. “Object code� means any non-source form of a work.
A “Standard Interface� means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries� of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component�, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source� for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices�.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate� if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product� is either (1) a “consumer product�, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used� refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information� for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions� are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions� within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction� is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor� is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version�.
A contributor's “essential patent claims� are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control� includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license� is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant� such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying� means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory� if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version� applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright� line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box�.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer� for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see .
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .
dtkcore-6.7.46/LICENSES/ 0000775 0000000 0000000 00000000000 15226157704 0014467 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/LICENSES/BSD-3-Clause.txt 0000664 0000000 0000000 00000002664 15226157704 0017222 0 ustar 00root root 0000000 0000000 Copyright (c) .
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dtkcore-6.7.46/LICENSES/CC-BY-4.0.txt 0000664 0000000 0000000 00000041177 15226157704 0016336 0 ustar 00root root 0000000 0000000 Creative Commons Attribution 4.0 International
Creative Commons Corporation (“Creative Commons�) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is� basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 – Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 – Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. Downstream recipients.
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
Section 3 – License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
Section 4 – Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 – Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 – Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 – Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 – Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.� Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons� or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.
dtkcore-6.7.46/LICENSES/CC0-1.0.txt 0000664 0000000 0000000 00000015610 15226157704 0016074 0 ustar 00root root 0000000 0000000 Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
dtkcore-6.7.46/LICENSES/LGPL-2.1-or-later.txt 0000664 0000000 0000000 00000062462 15226157704 0020021 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts as the
successor of the GNU Library Public License, version 2, hence the version
number 2.1.]
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public Licenses are intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users.
This license, the Lesser General Public License, applies to some specially
designated software packages--typically libraries--of the Free Software Foundation
and other authors who decide to use it. You can use it too, but we suggest
you first think carefully about whether this license or the ordinary General
Public License is the better strategy to use in any particular case, based
on the explanations below.
When we speak of free software, we are referring to freedom of use, not price.
Our General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish); that you receive source code or can get it if you want it; that you
can change the software and use pieces of it in new free programs; and that
you are informed that you can do these things.
To protect your rights, we need to make restrictions that forbid distributors
to deny you these rights or to ask you to surrender these rights. These restrictions
translate to certain responsibilities for you if you distribute copies of
the library or if you modify it.
For example, if you distribute copies of the library, whether gratis or for
a fee, you must give the recipients all the rights that we gave you. You must
make sure that they, too, receive or can get the source code. If you link
other code with the library, you must provide complete object files to the
recipients, so that they can relink them with the library after making changes
to the library and recompiling it. And you must show them these terms so they
know their rights.
We protect your rights with a two-step method: (1) we copyright the library,
and (2) we offer you this license, which gives you legal permission to copy,
distribute and/or modify the library.
To protect each distributor, we want to make it very clear that there is no
warranty for the free library. Also, if the library is modified by someone
else and passed on, the recipients should know that what they have is not
the original version, so that the original author's reputation will not be
affected by problems that might be introduced by others.
Finally, software patents pose a constant threat to the existence of any free
program. We wish to make sure that a company cannot effectively restrict the
users of a free program by obtaining a restrictive license from a patent holder.
Therefore, we insist that any patent license obtained for a version of the
library must be consistent with the full freedom of use specified in this
license.
Most GNU software, including some libraries, is covered by the ordinary GNU
General Public License. This license, the GNU Lesser General Public License,
applies to certain designated libraries, and is quite different from the ordinary
General Public License. We use this license for certain libraries in order
to permit linking those libraries into non-free programs.
When a program is linked with a library, whether statically or using a shared
library, the combination of the two is legally speaking a combined work, a
derivative of the original library. The ordinary General Public License therefore
permits such linking only if the entire combination fits its criteria of freedom.
The Lesser General Public License permits more lax criteria for linking other
code with the library.
We call this license the "Lesser" General Public License because it does Less
to protect the user's freedom than the ordinary General Public License. It
also provides other free software developers Less of an advantage over competing
non-free programs. These disadvantages are the reason we use the ordinary
General Public License for many libraries. However, the Lesser license provides
advantages in certain special circumstances.
For example, on rare occasions, there may be a special need to encourage the
widest possible use of a certain library, so that it becomes a de-facto standard.
To achieve this, non-free programs must be allowed to use the library. A more
frequent case is that a free library does the same job as widely used non-free
libraries. In this case, there is little to gain by limiting the free library
to free software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free programs
enables a greater number of people to use a large body of free software. For
example, permission to use the GNU C Library in non-free programs enables
many more people to use the whole GNU operating system, as well as its variant,
the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users'
freedom, it does ensure that the user of a program that is linked with the
Library has the freedom and the wherewithal to run that program using a modified
version of the Library.
The precise terms and conditions for copying, distribution and modification
follow. Pay close attention to the difference between a "work based on the
library" and a "work that uses the library". The former contains code derived
from the library, whereas the latter must be combined with the library in
order to run.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other program
which contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Lesser General
Public License (also called "this License"). Each licensee is addressed as
"you".
A "library" means a collection of software functions and/or data prepared
so as to be conveniently linked with application programs (which use some
of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has
been distributed under these terms. A "work based on the Library" means either
the Library or any derivative work under copyright law: that is to say, a
work containing the Library or a portion of it, either verbatim or with modifications
and/or translated straightforwardly into another language. (Hereinafter, translation
is included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making modifications
to it. For a library, complete source code means all the source code for all
modules it contains, plus any associated interface definition files, plus
the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running a program
using the Library is not restricted, and output from such a program is covered
only if its contents constitute a work based on the Library (independent of
the use of the Library in a tool for writing it). Whether that is true depends
on what the Library does and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and disclaimer
of warranty; keep intact all the notices that refer to this License and to
the absence of any warranty; and distribute a copy of this License along with
the Library.
You may charge a fee for the physical act of transferring a copy, and you
may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it,
thus forming a work based on the Library, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all
of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices stating that
you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no charge to all
third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a table of
data to be supplied by an application program that uses the facility, other
than as an argument passed when the facility is invoked, then you must make
a good faith effort to ensure that, in the event an application does not supply
such function or table, the facility still operates, and performs whatever
part of its purpose remains meaningful.
(For example, a function in a library to compute square roots has a purpose
that is entirely well-defined independent of the application. Therefore, Subsection
2d requires that any application-supplied function or table used by this function
must be optional: if the application does not supply it, the square root function
must still compute square roots.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Library, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole
which is a work based on the Library, the distribution of the whole must be
on the terms of this License, whose permissions for other licensees extend
to the entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise
the right to control the distribution of derivative or collective works based
on the Library.
In addition, mere aggregation of another work not based on the Library with
the Library (or with a work based on the Library) on a volume of a storage
or distribution medium does not bring the other work under the scope of this
License.
3. You may opt to apply the terms of the ordinary GNU General Public License
instead of this License to a given copy of the Library. To do this, you must
alter all the notices that refer to this License, so that they refer to the
ordinary GNU General Public License, version 2, instead of to this License.
(If a newer version than version 2 of the ordinary GNU General Public License
has appeared, then you can specify that version instead if you wish.) Do not
make any other change in these notices.
Once this change is made in a given copy, it is irreversible for that copy,
so the ordinary GNU General Public License applies to all subsequent copies
and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library
into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of
it, under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you accompany it with the complete corresponding
machine-readable source code, which must be distributed under the terms of
Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated
place, then offering equivalent access to copy the source code from the same
place satisfies the requirement to distribute the source code, even though
third parties are not compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the Library, but
is designed to work with the Library by being compiled or linked with it,
is called a "work that uses the Library". Such a work, in isolation, is not
a derivative work of the Library, and therefore falls outside the scope of
this License.
However, linking a "work that uses the Library" with the Library creates an
executable that is a derivative of the Library (because it contains portions
of the Library), rather than a "work that uses the library". The executable
is therefore covered by this License. Section 6 states terms for distribution
of such executables.
When a "work that uses the Library" uses material from a header file that
is part of the Library, the object code for the work may be a derivative work
of the Library even though the source code is not. Whether this is true is
especially significant if the work can be linked without the Library, or if
the work is itself a library. The threshold for this to be true is not precisely
defined by law.
If such an object file uses only numerical parameters, data structure layouts
and accessors, and small macros and small inline functions (ten lines or less
in length), then the use of the object file is unrestricted, regardless of
whether it is legally a derivative work. (Executables containing this object
code plus portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute
the object code for the work under the terms of Section 6. Any executables
containing that work also fall under Section 6, whether or not they are linked
directly with the Library itself.
6. As an exception to the Sections above, you may also combine or link a "work
that uses the Library" with the Library to produce a work containing portions
of the Library, and distribute that work under terms of your choice, provided
that the terms permit modification of the work for the customer's own use
and reverse engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the Library
is used in it and that the Library and its use are covered by this License.
You must supply a copy of this License. If the work during execution displays
copyright notices, you must include the copyright notice for the Library among
them, as well as a reference directing the user to the copy of this License.
Also, you must do one of these things:
a) Accompany the work with the complete corresponding machine-readable source
code for the Library including whatever changes were used in the work (which
must be distributed under Sections 1 and 2 above); and, if the work is an
executable linked with the Library, with the complete machine-readable "work
that uses the Library", as object code and/or source code, so that the user
can modify the Library and then relink to produce a modified executable containing
the modified Library. (It is understood that the user who changes the contents
of definitions files in the Library will not necessarily be able to recompile
the application to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the Library. A
suitable mechanism is one that (1) uses at run time a copy of the library
already present on the user's computer system, rather than copying library
functions into the executable, and (2) will operate properly with a modified
version of the library, if the user installs one, as long as the modified
version is interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least three years,
to give the same user the materials specified in Subsection 6a, above, for
a charge no more than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy from a designated
place, offer equivalent access to copy the above specified materials from
the same place.
e) Verify that the user has already received a copy of these materials or
that you have already sent this user a copy.
For an executable, the required form of the "work that uses the Library" must
include any data and utility programs needed for reproducing the executable
from it. However, as a special exception, the materials to be distributed
need not include anything that is normally distributed (in either source or
binary form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component itself
accompanies the executable.
It may happen that this requirement contradicts the license restrictions of
other proprietary libraries that do not normally accompany the operating system.
Such a contradiction means you cannot use both them and the Library together
in an executable that you distribute.
7. You may place library facilities that are a work based on the Library side-by-side
in a single library together with other library facilities not covered by
this License, and distribute such a combined library, provided that the separate
distribution of the work based on the Library and of the other library facilities
is otherwise permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work based on the
Library, uncombined with any other library facilities. This must be distributed
under the terms of the Sections above.
b) Give prominent notice with the combined library of the fact that part of
it is a work based on the Library, and explaining where to find the accompanying
uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the Library
except as expressly provided under this License. Any attempt otherwise to
copy, modify, sublicense, link with, or distribute the Library is void, and
will automatically terminate your rights under this License. However, parties
who have received copies, or rights, from you under this License will not
have their licenses terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute the
Library or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the Library
(or any work based on the Library), you indicate your acceptance of this License
to do so, and all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the Library),
the recipient automatically receives a license from the original licensor
to copy, distribute, link with or modify the Library subject to these terms
and conditions. You may not impose any further restrictions on the recipients'
exercise of the rights granted herein. You are not responsible for enforcing
compliance by third parties with this License.
11. If, as a consequence of a court judgment or allegation of patent infringement
or for any other reason (not limited to patent issues), conditions are imposed
on you (whether by court order, agreement or otherwise) that contradict the
conditions of this License, they do not excuse you from the conditions of
this License. If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations, then as
a consequence you may not distribute the Library at all. For example, if a
patent license would not permit royalty-free redistribution of the Library
by all those who receive copies directly or indirectly through you, then the
only way you could satisfy both it and this License would be to refrain entirely
from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents
or other property right claims or to contest validity of any such claims;
this section has the sole purpose of protecting the integrity of the free
software distribution system which is implemented by public license practices.
Many people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose
that choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain
countries either by patents or by copyrighted interfaces, the original copyright
holder who places the Library under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is
permitted only in or among countries not thus excluded. In such case, this
License incorporates the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of
the Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to address
new problems or concerns.
Each version is given a distinguishing version number. If the Library specifies
a version number of this License which applies to it and "any later version",
you have the option of following the terms and conditions either of that version
or of any later version published by the Free Software Foundation. If the
Library does not specify a license version number, you may choose any version
ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free programs
whose distribution conditions are incompatible with these, write to the author
to ask for permission. For software which is copyrighted by the Free Software
Foundation, write to the Free Software Foundation; we sometimes make exceptions
for this. Our decision will be guided by the two goals of preserving the free
status of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest possible
use to the public, we recommend making it free software that everyone can
redistribute and change. You can do so by permitting redistribution under
these terms (or, alternatively, under the terms of the ordinary General Public
License).
To apply these terms, attach the following notices to the library. It is safest
to attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the "copyright"
line and a pointer to where the full notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your school,
if any, to sign a "copyright disclaimer" for the library, if necessary. Here
is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in
the library `Frob' (a library for tweaking knobs) written
by James Random Hacker.
< signature of Ty Coon > , 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
dtkcore-6.7.46/LICENSES/LGPL-3.0-or-later.txt 0000664 0000000 0000000 00000122162 15226157704 0020013 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License� refers to version 3 of the GNU General Public License.
“Copyright� also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program� refers to any copyrightable work licensed under this License. Each licensee is addressed as “you�. “Licensees� and “recipients� may be individuals or organizations.
To “modify� a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version� of the earlier work or a work “based on� the earlier work.
A “covered work� means either the unmodified Program or a work based on the Program.
To “propagate� a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey� a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices� to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code� for a work means the preferred form of the work for making modifications to it. “Object code� means any non-source form of a work.
A “Standard Interface� means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries� of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component�, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source� for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices�.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate� if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product� is either (1) a “consumer product�, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used� refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information� for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions� are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions� within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction� is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor� is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version�.
A contributor's “essential patent claims� are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control� includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license� is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant� such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying� means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory� if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version� applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright� line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box�.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer� for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see .
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .
dtkcore-6.7.46/README.md 0000664 0000000 0000000 00000003215 15226157704 0014542 0 ustar 00root root 0000000 0000000 ## Deepin Tool Kit Core
Deepin Tool Kit (DtkCore) is the base development tool of all C++/Qt Developer work on Deepin.
You should read the Deepin Application Specification firstly.
䏿–‡è¯´æ˜Žï¼š[README.zh_CN.md](./README.zh_CN.md)
## Document
䏿–‡æ–‡æ¡£ï¼š[dtkcore文档](https://linuxdeepin.github.io/dtkcore/index.html)
## Dependencies
### Build dependencies
* Qt >= 5.10
## Compile option
| **Compile option** | **meaning** | **Default state** |
|--------------------|-------------|---------------|
| BUILD_DOCS | Compile document | ON |
| BUILD_TESTING | Compile test | Default is ON in debug mode |
| BUILD_EXAMPLES | Compile example | ON |
| BUILD_WITH_SYSTEMD | Support Systemd function | OFF |
| BUILD_THEME | Add themes to the document | OFF |
## Installation
### Build from source code
1. Make sure you have installed all dependencies.
2. Build:
```bash
mkdir build
cd build
cmake ..
make
```
3. Install:
```bash
sudo make install
```
## Getting help
Any usage issues can ask for help via
* [Telegram group](https://t.me/deepin)
* [Matrix](https://matrix.to/#/#deepin-community:matrix.org)
* [IRC (libera.chat)](https://web.libera.chat/#deepin-community)
* [Forum](https://bbs.deepin.org)
* [WiKi](https://wiki.deepin.org/)
## Getting involved
We encourage you to report issues and contribute changes
* [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en).
## License
deepin-tool-kit is licensed under [LGPL-3.0-or-later](LICENSE).
dtkcore-6.7.46/README.zh_CN.md 0000664 0000000 0000000 00000003025 15226157704 0015541 0 ustar 00root root 0000000 0000000 ## Deepin Tool Kit Core
Deepin Tool Kit Core(DtkCore) 是所有C++/Qt开�人员在Deepin上工作的基础开�工具.
您应该首先阅读 Deepin应用程�规范.
## 文档
䏿–‡æ–‡æ¡£ï¼š[dtkcore文档](https://linuxdeepin.github.io/dtkcore/index.html)
## �赖
### 编译�赖
* Qt >= 5.10
## 编译选项
| **编译选项** | **�义** | **默认状�** |
|--------------------|-------------|---------------|
| BUILD_DOCS | 编译文档 | ON |
| BUILD_TESTING | 编译测试 | Debug模�下默认为ON |
| BUILD_EXAMPLES | 编译示例 | ON |
| BUILD_WITH_SYSTEMD | 支�Systmed功能 | OFF |
| BUILD_THEME | ä¸ºæ–‡æ¡£æ·»åŠ ä¸»é¢˜ | OFF |
## 安装
### 从æº�代ç �构建
1. 确�已�安装了所有的编译�赖.
2. 构建:
```bash
mkdir build
cd build
cmake ..
make
```
3. 安装:
```bash
sudo make install
```
## 帮助
任何使用问题都�以通过以下方�寻求帮助:
* [Telegram 群组](https://t.me/deepin)
* [Matrix](https://matrix.to/#/#deepin-community:matrix.org)
* [IRC (libera.chat)](https://web.libera.chat/#deepin-community)
* [Forum](https://bbs.deepin.org)
* [WiKi](https://wiki.deepin.org/)
## �与贡献
我们鼓励您报告问题并作出更改
* [å¼€å�‘者代ç �贡献指å�—](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers)
## �议
DTK工具包�循�议 [LGPL-3.0-or-later](LICENSE).
dtkcore-6.7.46/VERSION 0000664 0000000 0000000 00000000007 15226157704 0014327 0 ustar 00root root 0000000 0000000 6.7.46
dtkcore-6.7.46/VERSION.in 0000664 0000000 0000000 00000000012 15226157704 0014730 0 ustar 00root root 0000000 0000000 @version@
dtkcore-6.7.46/archlinux/ 0000775 0000000 0000000 00000000000 15226157704 0015257 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/archlinux/PKGBUILD 0000664 0000000 0000000 00000002022 15226157704 0016377 0 ustar 00root root 0000000 0000000 # Maintainer: justforlxz
pkgname=dtkcore-git
pkgver=6.7.46
pkgrel=1
sourcename=dtkcore
sourcetars=("$sourcename"_"$pkgver".tar.xz)
sourcedir="$sourcename"
pkgdesc='DTK core modules'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dtkcore"
license=('LGPL3')
depends=('deepin-desktop-base-git' 'gsettings-qt' 'dtkcommon-git' 'lshw' 'uchardet' 'icu' 'libsystemd' 'spdlog')
makedepends=('git' 'qt5-tools' 'ninja' 'cmake' 'doxygen')
conflicts=('dtkcore')
provides=('dtkcore')
groups=('deepin-git')
source=("${sourcetars[@]}")
sha512sums=('SKIP')
build() {
cd $sourcedir
cmake \
-GNinja \
-DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules \
-DBUILD_DOCS=ON \
-DBUILD_WITH_SYSTEMD=ON \
-DBUILD_EXAMPLES=OFF \
-DQCH_INSTALL_DESTINATION=share/doc/qt \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata \
-DDTK5=ON
ninja
}
package() {
cd $sourcedir
DESTDIR="$pkgdir" ninja install
}
dtkcore-6.7.46/cmake/ 0000775 0000000 0000000 00000000000 15226157704 0014342 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/cmake/DtkCMake/ 0000775 0000000 0000000 00000000000 15226157704 0015765 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/cmake/DtkCMake/DtkCMakeConfig.cmake 0000664 0000000 0000000 00000005047 15226157704 0021546 0 ustar 00root root 0000000 0000000 function(addDefinitions macro)
string(TOUPPER ${macro} macro)
add_definitions(-D${macro})
endfunction()
add_definitions(-DQ_HOST_NAME=\"${CMAKE_HOST_SYSTEM_PROCESSOR}\")
addDefinitions(Q_HOST_${CMAKE_HOST_SYSTEM_PROCESSOR})
find_package(DtkCore REQUIRED)
set(DEEPIN_OS_RELEASE_TOOL_PATH ${DtkCore_TOOL_DIRS})
set(DEEPIN_OS_RELEASE_TOOL ${DEEPIN_OS_RELEASE_TOOL_PATH}/deepin-os-release)
if(NOT EXISTS "${DEEPIN_OS_RELEASE_TOOL}")
message(FATAL_ERROR "\"${DEEPIN_OS_RELEASE_TOOL}\" is not exists. Install \"dtkcore-bin\" first")
endif()
function(formatString string)
string(REGEX REPLACE "\\s+" "_" string ${string})
endfunction()
macro(execDeepinOsRelease args output)
exec_program(${DEEPIN_OS_RELEASE_TOOL} ARGS ${args} OUTPUT_VARIABLE ${output} RETURN_VALUE exitCode)
if(NOT ${exitCode} EQUAL 0)
message(FATAL_ERROR "exec deepin-os-release failed, with args: ${args}, error message: ${output}")
endif()
endmacro()
execDeepinOsRelease(--deepin-type DEEPIN_OS_TYPE)
execDeepinOsRelease(--deepin-version DEEPIN_OS_VERSION)
execDeepinOsRelease(--product-type CMAKE_PLATFORM_ID)
execDeepinOsRelease(--product-version CMAKE_PLATFORM_VERSION)
if("${CMAKE_PLATFORM_ID}" STREQUAL "")
message(WARNING "No value of the \"--product-type\" in the process \"${DEEPIN_OS_RELEASE_TOOL}\"")
else()
formatString(CMAKE_PLATFORM_ID)
message("OS: ${CMAKE_PLATFORM_ID}, Version: ${CMAKE_PLATFORM_VERSION}")
if(NOT "${CMAKE_PLATFORM_ID}" STREQUAL "")
addDefinitions(Q_OS_${CMAKE_PLATFORM_ID})
string(TOUPPER ${CMAKE_PLATFORM_ID} CMAKE_PLATFORM_ID)
set(OS_${CMAKE_PLATFORM_ID} TRUE)
endif()
formatString(CMAKE_PLATFORM_VERSION)
add_definitions(-DQ_OS_VERSION=\"${CMAKE_PLATFORM_VERSION}\")
#uos base with deepin
if("${CMAKE_PLATFORM_ID}" STREQUAL "UOS")
addDefinitions(Q_OS_DEEPIN)
set(OS_DEEPIN TRUE)
endif()
endif()
if("${DEEPIN_OS_TYPE}" STREQUAL "")
message(WARNING "No value of the \"--deepin-type\" in the process \"${DEEPIN_OS_RELEASE_TOOL}\"")
else()
formatString(DEEPIN_OS_TYPE)
message("Deepin OS Type: ${DEEPIN_OS_TYPE}")
message("Deepin OS Version: ${DEEPIN_OS_VERSION}")
if(NOT "${DEEPIN_OS_TYPE}" STREQUAL "")
addDefinitions(Q_OS_DEEPIN_${DEEPIN_OS_TYPE})
addDefinitions(DEEPIN_DDE)
string(TOUPPER ${DEEPIN_OS_TYPE} DEEPIN_OS_TYPE)
set(OS_DEEPIN_${DEEPIN_OS_TYPE} TRUE)
set(DEEPIN_DDE TRUE)
endif()
formatString(DEEPIN_OS_VERSION)
add_definitions(-DQ_OS_DEEPIN_VERSION=\"${DEEPIN_OS_VERSION}\")
endif()
dtkcore-6.7.46/cmake/DtkCMake/DtkCMakeConfig.cmake.in 0000664 0000000 0000000 00000005070 15226157704 0022147 0 ustar 00root root 0000000 0000000 function(addDefinitions macro)
string(TOUPPER ${macro} macro)
add_definitions(-D${macro})
endfunction()
add_definitions(-DQ_HOST_NAME=\"${CMAKE_HOST_SYSTEM_PROCESSOR}\")
addDefinitions(Q_HOST_${CMAKE_HOST_SYSTEM_PROCESSOR})
find_package(Dtk@DTK_NAME_SUFFIX@Core REQUIRED)
set(DEEPIN_OS_RELEASE_TOOL_PATH ${DtkCore_TOOL_DIRS})
set(DEEPIN_OS_RELEASE_TOOL ${DEEPIN_OS_RELEASE_TOOL_PATH}/deepin-os-release)
if(NOT EXISTS "${DEEPIN_OS_RELEASE_TOOL}")
message(FATAL_ERROR "\"${DEEPIN_OS_RELEASE_TOOL}\" is not exists. Install \"dtkcore-bin\" first")
endif()
function(formatString string)
string(REGEX REPLACE "\\s+" "_" string ${string})
endfunction()
macro(execDeepinOsRelease args output)
exec_program(${DEEPIN_OS_RELEASE_TOOL} ARGS ${args} OUTPUT_VARIABLE ${output} RETURN_VALUE exitCode)
if(NOT ${exitCode} EQUAL 0)
message(FATAL_ERROR "exec deepin-os-release failed, with args: ${args}, error message: ${output}")
endif()
endmacro()
execDeepinOsRelease(--deepin-type DEEPIN_OS_TYPE)
execDeepinOsRelease(--deepin-version DEEPIN_OS_VERSION)
execDeepinOsRelease(--product-type CMAKE_PLATFORM_ID)
execDeepinOsRelease(--product-version CMAKE_PLATFORM_VERSION)
if("${CMAKE_PLATFORM_ID}" STREQUAL "")
message(WARNING "No value of the \"--product-type\" in the process \"${DEEPIN_OS_RELEASE_TOOL}\"")
else()
formatString(CMAKE_PLATFORM_ID)
message("OS: ${CMAKE_PLATFORM_ID}, Version: ${CMAKE_PLATFORM_VERSION}")
if(NOT "${CMAKE_PLATFORM_ID}" STREQUAL "")
addDefinitions(Q_OS_${CMAKE_PLATFORM_ID})
string(TOUPPER ${CMAKE_PLATFORM_ID} CMAKE_PLATFORM_ID)
set(OS_${CMAKE_PLATFORM_ID} TRUE)
endif()
formatString(CMAKE_PLATFORM_VERSION)
add_definitions(-DQ_OS_VERSION=\"${CMAKE_PLATFORM_VERSION}\")
#uos base with deepin
if("${CMAKE_PLATFORM_ID}" STREQUAL "UOS")
addDefinitions(Q_OS_DEEPIN)
set(OS_DEEPIN TRUE)
endif()
endif()
if("${DEEPIN_OS_TYPE}" STREQUAL "")
message(WARNING "No value of the \"--deepin-type\" in the process \"${DEEPIN_OS_RELEASE_TOOL}\"")
else()
formatString(DEEPIN_OS_TYPE)
message("Deepin OS Type: ${DEEPIN_OS_TYPE}")
message("Deepin OS Version: ${DEEPIN_OS_VERSION}")
if(NOT "${DEEPIN_OS_TYPE}" STREQUAL "")
addDefinitions(Q_OS_DEEPIN_${DEEPIN_OS_TYPE})
addDefinitions(DEEPIN_DDE)
string(TOUPPER ${DEEPIN_OS_TYPE} DEEPIN_OS_TYPE)
set(OS_DEEPIN_${DEEPIN_OS_TYPE} TRUE)
set(DEEPIN_DDE TRUE)
endif()
formatString(DEEPIN_OS_VERSION)
add_definitions(-DQ_OS_DEEPIN_VERSION=\"${DEEPIN_OS_VERSION}\")
endif()
dtkcore-6.7.46/cmake/DtkDConfig/ 0000775 0000000 0000000 00000000000 15226157704 0016316 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/cmake/DtkDConfig/DtkDConfigConfig.cmake 0000664 0000000 0000000 00000007322 15226157704 0022426 0 ustar 00root root 0000000 0000000 # SPDX-FileCopyrightText: 2022 - 2023 Uniontech Software Technology Co.,Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
# This cmake file is used to deploy files that dconfig's meta and override configure.
include(CMakeParseArguments)
# get subpath according `FILE` and `BASE`.
# e.g: FILE = /a/b/c/d/foo.json, BASE = /a/b, then return SUBPATH = /c/d/
function(get_subpath FILE BASE SUBPATH)
get_filename_component(BASE_FILE_PATH ${BASE} REALPATH)
get_filename_component(FILE_PATH ${FILE} REALPATH)
string(REPLACE ${BASE_FILE_PATH} "" SUBPATH_FILE_NAME ${FILE_PATH})
get_filename_component(SUBPATH_PATH ${SUBPATH_FILE_NAME} DIRECTORY)
set(${SUBPATH} ${SUBPATH_PATH} PARENT_SCOPE)
endfunction()
if(NOT DEFINED DSG_DATA_DIR)
set(DSG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/dsg)
endif()
add_definitions(-DDSG_DATA_DIR=\"${DSG_DATA_DIR}\")
# deploy some `meta` 's configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app.
# COMMONID - working for common.
#
# e.g:
# dtk_add_config_meta_files(APPID dconfigexample BASE ./configs FILES ./configs/example.json ./configs/a/example.json)
#
function(dtk_add_config_meta_files)
set(oneValueArgs BASE APPID COMMONID)
set(multiValueArgs FILES)
cmake_parse_arguments(METAITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(_current_FILE ${METAITEM_FILES})
set(SUBPATH "")
if (DEFINED METAITEM_BASE)
GET_SUBPATH(${_current_FILE} ${METAITEM_BASE} SUBPATH)
endif()
if (DEFINED METAITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/${METAITEM_APPID}/${SUBPATH})
elseif (DEFINED METAITEM_COMMONID)
install(FILES ${_current_FILE} DESTINATION ${DSG_DATA_DIR}/configs/${SUBPATH})
else()
message(FATAL_ERROR "Please set APPID or COMMONID for the meta item." ${_current_FILE})
endif()
endforeach()
endfunction()
# deploy some `meta` 's override configure.
#
# configuration for the `meta_name` 's override configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app, if it's empty, working for all app.
# META_NAME - override for the meta configure.
#
# e.g :
#dtk_add_config_override_files(APPID dconfigexample BASE ./configs META_NAME example FILES ./configs/dconf-example.override.json ./configs/a/dconf-example.override.a.json)
#
function(dtk_add_config_override_files)
set(options)
set(oneValueArgs BASE APPID META_NAME)
set(multiValueArgs FILES)
cmake_parse_arguments(OVERRIDEITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (NOT DEFINED OVERRIDEITEM_META_NAME)
message(FATAL_ERROR "Please set meta_name for the override configuration." ${FILES})
endif()
foreach(_current_FILE ${OVERRIDEITEM_FILES})
set(SUBPATH "")
if (DEFINED OVERRIDEITEM_BASE)
GET_SUBPATH(${_current_FILE} ${OVERRIDEITEM_BASE} SUBPATH)
endif()
if (DEFINED OVERRIDEITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_APPID}/${OVERRIDEITEM_META_NAME}/${SUBPATH})
else()
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_META_NAME}/${SUBPATH})
endif()
endforeach()
endfunction()
# deprecated since dtk6
function(dconfig_meta_files)
dtk_add_config_meta_files(${ARGV})
endfunction()
function(dconfig_override_files)
dtk_add_config_override_files(${ARGV})
endfunction()
dtkcore-6.7.46/cmake/DtkDConfig/DtkDConfigConfig.cmake.in 0000664 0000000 0000000 00000007051 15226157704 0023032 0 ustar 00root root 0000000 0000000 # SPDX-FileCopyrightText: 2022 - 2023 Uniontech Software Technology Co.,Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
# This cmake file is used to deploy files that dconfig's meta and override configure.
include(CMakeParseArguments)
# get subpath according `FILE` and `BASE`.
# e.g: FILE = /a/b/c/d/foo.json, BASE = /a/b, then return SUBPATH = /c/d/
function(get_subpath FILE BASE SUBPATH)
get_filename_component(BASE_FILE_PATH ${BASE} REALPATH)
get_filename_component(FILE_PATH ${FILE} REALPATH)
string(REPLACE ${BASE_FILE_PATH} "" SUBPATH_FILE_NAME ${FILE_PATH})
get_filename_component(SUBPATH_PATH ${SUBPATH_FILE_NAME} DIRECTORY)
set(${SUBPATH} ${SUBPATH_PATH} PARENT_SCOPE)
endfunction()
if(NOT DEFINED DSG_DATA_DIR)
set(DSG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/dsg)
endif()
add_definitions(-DDSG_DATA_DIR=\"${DSG_DATA_DIR}\")
# deploy some `meta` 's configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app.
# COMMONID - working for common.
#
# e.g:
# dtk_add_config_meta_files(APPID dconfigexample BASE ./configs FILES ./configs/example.json ./configs/a/example.json)
#
function(dtk_add_config_meta_files)
set(oneValueArgs BASE APPID COMMONID)
set(multiValueArgs FILES)
cmake_parse_arguments(METAITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(_current_FILE ${METAITEM_FILES})
set(SUBPATH "")
if (DEFINED METAITEM_BASE)
GET_SUBPATH(${_current_FILE} ${METAITEM_BASE} SUBPATH)
endif()
if (DEFINED METAITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/${METAITEM_APPID}/${SUBPATH})
elseif (DEFINED METAITEM_COMMONID)
install(FILES ${_current_FILE} DESTINATION ${DSG_DATA_DIR}/configs/${SUBPATH})
else()
message(FATAL_ERROR "Please set APPID or COMMONID for the meta item." ${_current_FILE})
endif()
endforeach()
endfunction()
# deploy some `meta` 's override configure.
#
# configuration for the `meta_name` 's override configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app, if it's empty, working for all app.
# META_NAME - override for the meta configure.
#
# e.g :
#dtk_add_config_override_files(APPID dconfigexample BASE ./configs META_NAME example FILES ./configs/dconf-example.override.json ./configs/a/dconf-example.override.a.json)
#
function(dtk_add_config_override_files)
set(options)
set(oneValueArgs BASE APPID META_NAME)
set(multiValueArgs FILES)
cmake_parse_arguments(OVERRIDEITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (NOT DEFINED OVERRIDEITEM_META_NAME)
message(FATAL_ERROR "Please set meta_name for the override configuration." ${FILES})
endif()
foreach(_current_FILE ${OVERRIDEITEM_FILES})
set(SUBPATH "")
if (DEFINED OVERRIDEITEM_BASE)
GET_SUBPATH(${_current_FILE} ${OVERRIDEITEM_BASE} SUBPATH)
endif()
if (DEFINED OVERRIDEITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_APPID}/${OVERRIDEITEM_META_NAME}/${SUBPATH})
else()
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_META_NAME}/${SUBPATH})
endif()
endforeach()
endfunction()
@DCONFIG_DEPRECATED_FUNCS@
dtkcore-6.7.46/cmake/DtkTools/ 0000775 0000000 0000000 00000000000 15226157704 0016105 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/cmake/DtkTools/DtkDBusMacros.cmake 0000664 0000000 0000000 00000005322 15226157704 0021556 0 ustar 00root root 0000000 0000000 # Copyright 2005-2011 Kitware, Inc.
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
include(MacroAddFileDependencies)
include(CMakeParseArguments)
function(dtk_add_dbus_interface _sources _interface _relativename)
get_filename_component(_infile ${_interface} ABSOLUTE)
get_filename_component(_basepath ${_relativename} DIRECTORY)
get_filename_component(_basename ${_relativename} NAME)
set(_header "${CMAKE_CURRENT_BINARY_DIR}/${_relativename}.h")
set(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_relativename}.cpp")
if(${QT_VERSION_MAJOR} EQUAL "5")
if(_basepath)
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_basename}.moc")
else()
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
endif()
else()
if(_basepath)
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/moc_${_basename}.cpp")
else()
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/moc_${_basename}.cpp")
endif()
endif()
get_source_file_property(_nonamespace ${_interface} NO_NAMESPACE)
if(_nonamespace)
set(_params -N -m)
else()
set(_params -m)
endif()
get_source_file_property(_skipincludeannotations ${_interface} SKIP_INCLUDE_ANNOTATIONS)
if(_skipincludeannotations)
set(_params ${_params} -S)
endif()
get_source_file_property(_classname ${_interface} CLASSNAME)
if(_classname)
set(_params ${_params} -c ${_classname})
endif()
get_source_file_property(_include ${_interface} INCLUDE)
if(_include)
set(_params ${_params} -i ${_include})
endif()
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${DTK_XML2CPP} ${_params} -p ${_relativename} ${_infile}
DEPENDS ${_infile} ${DTK_XML2CPP}
VERBATIM
)
set_source_files_properties("${_impl}" "${_header}" PROPERTIES
SKIP_AUTOMOC TRUE
SKIP_AUTOUIC TRUE
)
qt_generate_moc("${_header}" "${_moc}")
list(APPEND ${_sources} "${_impl}" "${_header}")
set_property(SOURCE "${_impl}" APPEND PROPERTY OBJECT_DEPENDS "${_moc}")
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()
function(dtk_add_dbus_interfaces _sources)
foreach(_current_FILE ${ARGN})
get_filename_component(_infile ${_current_FILE} ABSOLUTE)
get_filename_component(_basename ${_current_FILE} NAME)
# get the part before the ".xml" suffix
string(TOLOWER ${_basename} _basename)
string(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
dtk_add_dbus_interface(${_sources} ${_infile} ${_basename}interface)
endforeach()
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()
dtkcore-6.7.46/cmake/DtkTools/DtkDConfigMacros.cmake 0000664 0000000 0000000 00000002701 15226157704 0022230 0 ustar 00root root 0000000 0000000 # SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
# SPDX-License-Identifier: LGPL-3.0-or-later
include(MacroAddFileDependencies)
include(CMakeParseArguments)
# Define the helper function
function(dtk_add_config_to_cpp OUTPUT_VAR JSON_FILE)
if(NOT EXISTS ${JSON_FILE})
message(FATAL_ERROR "JSON file ${JSON_FILE} does not exist.")
endif()
cmake_parse_arguments(
"arg"
""
"OUTPUT_FILE_NAME;CLASS_NAME"
""
${ARGN}
)
# Generate the output header file name
get_filename_component(FILE_NAME_WLE ${JSON_FILE} NAME_WLE)
if(DEFINED arg_OUTPUT_FILE_NAME)
set(OUTPUT_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${arg_OUTPUT_FILE_NAME}")
else()
set(OUTPUT_HEADER "${CMAKE_CURRENT_BINARY_DIR}/dconfig_${FILE_NAME_WLE}.hpp")
endif()
# Check if CLASS_NAME is set
if(DEFINED arg_CLASS_NAME)
set(CLASS_NAME_ARG -c ${arg_CLASS_NAME})
else()
set(CLASS_NAME_ARG "")
endif()
# Add a custom command to run dconfig2cpp
add_custom_command(
OUTPUT ${OUTPUT_HEADER}
COMMAND ${DTK_DCONFIG2CPP} -o ${OUTPUT_HEADER} ${CLASS_NAME_ARG} ${JSON_FILE}
DEPENDS ${JSON_FILE} ${DTK_XML2CPP}
COMMENT "Generating ${OUTPUT_HEADER} from ${JSON_FILE}"
VERBATIM
)
# Add the generated header to the specified output variable
set(${OUTPUT_VAR} ${${OUTPUT_VAR}} ${OUTPUT_HEADER} PARENT_SCOPE)
endfunction()
dtkcore-6.7.46/cmake/DtkTools/DtkSettingsToolsMacros.cmake 0000664 0000000 0000000 00000005357 15226157704 0023552 0 ustar 00root root 0000000 0000000 #=============================================================================
# Copyright 2019 Deepin Technology Co., Ltd.
# Copyright 2019 Gary Wang
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of authors nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
function(DTK_CREATE_I18N_FROM_JSON _generated_file_list _input_json_file _output_cpp_file_name)
set (generated_file_list) # 0(failed) or 1(succeeded) files in the list.
get_filename_component(_input_json_abs_path ${_input_json_file} ABSOLUTE)
get_filename_component(_input_json_abs_dir ${_input_json_abs_path} DIRECTORY)
set (_output_cpp_abs_path ${_input_json_abs_dir}/${_output_cpp_file_name})
if (DTK_SETTINGS_TOOLS_FOUND)
add_custom_command(OUTPUT ${_output_cpp_abs_path}
COMMAND ${DTK_SETTINGS_TOOLS_EXECUTABLE}
ARGS ${_input_json_abs_path} -o ${_output_cpp_abs_path}
DEPENDS ${_input_json_abs_path} VERBATIM)
list(APPEND generated_file_list ${_output_cpp_abs_path})
else ()
message (WARNING "The dtk-settings tools could not be found at ${DTK_SETTINGS_TOOLS_EXECUTABLE}")
message (WARNING "Package distributor may create a separated package for tools like `libdtkcore-bin`.")
endif ()
set(${_generated_file_list} ${generated_file_list} PARENT_SCOPE)
endfunction()
dtkcore-6.7.46/cmake/DtkTools/DtkToolsConfig.cmake.in 0000664 0000000 0000000 00000001250 15226157704 0022403 0 ustar 00root root 0000000 0000000 include(CMakeFindDependencyMacro)
find_dependency(Dtk@DTK_NAME_SUFFIX@Core REQUIRED)
set (DTK_SETTINGS_TOOLS_EXECUTABLE ${DtkCore_TOOL_DIRS}/dtk-settings)
if (EXISTS ${DTK_SETTINGS_TOOLS_EXECUTABLE})
set(DTK_SETTINGS_TOOLS_FOUND TRUE)
endif ()
include("${CMAKE_CURRENT_LIST_DIR}/Dtk@DTK_NAME_SUFFIX@SettingsToolsMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/Dtk@DTK_NAME_SUFFIX@ToolsTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/DtkDBusMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/DtkDConfigMacros.cmake")
get_target_property(DTK_XML2CPP Dtk@DTK_NAME_SUFFIX@::Xml2Cpp LOCATION)
get_target_property(DTK_DCONFIG2CPP Dtk@DTK_NAME_SUFFIX@::DConfig2Cpp LOCATION)
dtkcore-6.7.46/conanfile.py 0000664 0000000 0000000 00000006617 15226157704 0015604 0 ustar 00root root 0000000 0000000 # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from conans import ConanFile, tools
class DtkcoreConan(ConanFile):
name = 'dtkcore'
version = '2.0.9'
license = 'GPL'
author = 'Iceyer me@iceyer.net'
url = 'https://github.com/linuxdeepin/dtkcore'
description = 'cross platform ui library'
topics = ('qt', 'dtk')
settings = 'os', 'compiler', 'build_type', 'arch'
options = {'shared': [True, False]}
default_options = 'shared=False'
generators = 'qmake'
exports_sources = '*'
requires = 'jom_installer/1.1.2@bincrafters/stable', 'qt/5.6.3@iceyer/stable'
def extend_include_path(self):
return '%s/include/libdtk-%s/DCore' % (self.package_folder, self.version)
# def source(self):
# self.run('git clone https://github.com/linuxdeepin/dtkcore.git source')
# self.run('cd source && git checkout 2.0.9.9')
def build(self):
outdir = self.build_folder
# includedir = outdir + '/include'
mkspecsdir = outdir + '/mkspecs'
# libdir = outdir + '/lib'
env_vars = tools.vcvars_dict(self.settings)
env_vars['_CL_'] = '/utf-8'
with tools.environment_append(env_vars):
command = 'qmake -r'
command += ' VERSION=%s' % self.version
# command += ' CONFIG-=debug_and_release'
# command += ' CONFIG-=debug_and_release_target'
command += ' CONFIG+=release'
command += ' PREFIX=%s' % outdir
command += ' MKSPECS_INSTALL_DIR=%s' % mkspecsdir
command += ' DTK_STATIC_LIB=YES'
command += ' DTK_STATIC_TRANSLATION=YES'
command += ' DTK_NO_MULTIMEDIA=YES'
command += ' %s' % self.source_folder
self.run(command)
self.run('jom clean')
self.run('jom')
self.run('jom install')
def package(self):
self.deploy()
outdir = self.build_folder
self.copy('*', dst='include', src=outdir+'/include')
self.copy('*.lib', dst='lib', src=outdir+'/lib')
self.copy('*', dst='mkspecs', src=outdir+'/mkspecs')
def package_info(self):
self.cpp_info.libs = ['dtkcore']
self.cpp_info.includedirs.append(self.extend_include_path())
self.env_info.QMAKEPATH = self.cpp_info.rootpath
self.env_info.QMAKEFEATURES = self.cpp_info.rootpath + '/mkspecs/features'
def deploy(self):
try:
content = []
module_pri = self.build_folder + '/mkspecs/modules/qt_lib_dtkcore.pri'
s = open(module_pri)
for line in s.readlines():
if line.startswith('QT.dtkcore.tools'):
line = 'QT.dtkcore.tools = %s\n' % (
self.package_folder + '/bin')
elif line.startswith('QT.dtkcore.libs'):
line = 'QT.dtkcore.libs = %s\n' % (
self.package_folder + '/lib')
elif line.startswith('QT.dtkcore.includes'):
line = 'QT.dtkcore.includes = %s\n' % (
self.extend_include_path())
content.append(line)
s.close()
# print('create module file', content)
s = open(module_pri, 'w')
s.writelines(content)
except FileNotFoundError:
print('skip update qt module file')
dtkcore-6.7.46/debian/ 0000775 0000000 0000000 00000000000 15226157704 0014504 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/debian/changelog 0000664 0000000 0000000 00000041271 15226157704 0016363 0 ustar 00root root 0000000 0000000 dtkcore (6.7.46) unstable; urgency=medium
* Release 6.7.46
-- yeshanshan Thu, 16 Jul 2026 20:52:24 +0800
dtkcore (6.7.45) unstable; urgency=medium
* Release 6.7.45
-- yeshanshan Thu, 09 Jul 2026 19:54:27 +0800
dtkcore (6.7.44) unstable; urgency=medium
* Release 6.7.44
-- yeshanshan Wed, 17 Jun 2026 11:17:16 +0800
dtkcore (6.7.43) unstable; urgency=medium
* Release 6.7.43
-- yeshanshan Thu, 04 Jun 2026 19:43:39 +0800
dtkcore (6.7.42) unstable; urgency=medium
* Release 6.7.42
-- yeshanshan Wed, 20 May 2026 14:24:51 +0800
dtkcore (6.7.41) unstable; urgency=medium
* Release 6.7.41
-- yeshanshan Fri, 08 May 2026 13:54:27 +0800
dtkcore (6.7.40) unstable; urgency=medium
* Release 6.7.40
-- yeshanshan Thu, 23 Apr 2026 21:35:52 +0800
dtkcore (6.7.39) unstable; urgency=medium
* Release 6.7.39
-- mhduiy Thu, 09 Apr 2026 21:22:16 +0800
dtkcore (6.7.38) unstable; urgency=medium
* Release 6.7.38
-- yeshanshan Tue, 31 Mar 2026 11:07:23 +0800
dtkcore (6.7.37) unstable; urgency=medium
* Release 6.7.37
-- mhduiy Wed, 25 Mar 2026 17:04:44 +0800
dtkcore (6.7.36) unstable; urgency=medium
* Release 6.7.36
-- yeshanshan Thu, 12 Mar 2026 20:20:47 +0800
dtkcore (6.7.35) unstable; urgency=medium
* Release 6.7.35
-- yeshanshan Thu, 05 Mar 2026 19:31:08 +0800
dtkcore (6.7.34) unstable; urgency=medium
* Release 6.7.34
-- mhduiy Fri, 27 Feb 2026 14:58:49 +0800
dtkcore (6.7.33) unstable; urgency=medium
* Release 6.7.33
-- yeshanshan Thu, 05 Feb 2026 17:27:03 +0800
dtkcore (6.7.32) unstable; urgency=medium
* Release 6.7.32
-- yeshanshan Thu, 22 Jan 2026 16:53:52 +0800
dtkcore (6.7.31) unstable; urgency=medium
* Release 6.7.31
-- yeshanshan Tue, 06 Jan 2026 13:16:35 +0800
dtkcore (5.7.30) unstable; urgency=medium
* Release 5.7.30
-- yeshanshan Thu, 11 Dec 2025 20:58:19 +0800
dtkcore (5.7.28) unstable; urgency=medium
* Release 5.7.28
-- mhduiy Thu, 04 Dec 2025 19:52:58 +0800
dtkcore (5.7.27) unstable; urgency=medium
* Release 5.7.27
-- mhduiy Thu, 27 Nov 2025 19:39:07 +0800
dtkcore (5.7.26) unstable; urgency=medium
* Release 5.7.26
-- yeshanshan Thu, 06 Nov 2025 17:02:30 +0800
dtkcore (5.7.25) unstable; urgency=medium
* Release 5.7.25
-- yeshanshan Thu, 30 Oct 2025 21:47:32 +0800
dtkcore (5.7.24) unstable; urgency=medium
* Release 5.7.24
-- yeshanshan Thu, 16 Oct 2025 19:45:57 +0800
dtkcore (5.7.23) unstable; urgency=medium
* Release 5.7.23
-- yeshanshan Thu, 25 Sep 2025 16:49:58 +0800
dtkcore (5.7.22) unstable; urgency=medium
* Release 5.7.22
-- yeshanshan Thu, 04 Sep 2025 19:27:28 +0800
dtkcore (5.7.21) unstable; urgency=medium
* Release 5.7.21
-- yeshanshan Thu, 14 Aug 2025 19:47:41 +0800
dtkcore (5.7.20) unstable; urgency=medium
* Release 5.7.20
-- yeshanshan Thu, 31 Jul 2025 20:00:27 +0800
dtkcore (5.7.19) unstable; urgency=medium
* Release 5.7.19
-- yeshanshan Thu, 03 Jul 2025 21:11:07 +0800
dtkcore (5.7.18) unstable; urgency=medium
* Release 5.7.18
-- yeshanshan Fri, 27 Jun 2025 17:07:16 +0800
dtkcore (5.7.17) unstable; urgency=medium
* Release 5.7.17
-- asterwyx Wed, 18 Jun 2025 18:01:08 +0800
dtkcore (5.7.16) unstable; urgency=medium
* fix: add missing UosMilitary edition type cases
-- YeShanShan Mon, 19 May 2025 17:21:50 +0800
dtkcore (5.7.15) unstable; urgency=medium
* fix: correct bitwise operation in dconfig status tracking
* chore: update REUSE license file patterns
* fix: add QPointer check for parent object safety
-- YeShanShan Thu, 08 May 2025 17:53:02 +0800
dtkcore (5.7.14) unstable; urgency=medium
* fix: resolve compilation failure on Qt 6.9
-- JiDe Zhang Sat, 12 Apr 2025 17:19:00 +0800
dtkcore (5.7.13) unstable; urgency=medium
* fix: add copyright for dconfig_org_deepin_dtk_preference.hpp
* feat: supports create generic config by dconfig2cpp
* fix: build failed on Qt6
-- YeShanShan Thu, 20 Mar 2025 17:05:39 +0800
dtkcore (5.7.12) unstable; urgency=medium
* feat: dconfig2cpp always add bindableFoo functions on Qt6
* feat: Add files generated by qdbusXML2cpp and DCONG2cpp
-- YeShanShan Thu, 06 Mar 2025 17:29:21 +0800
dtkcore (5.7.11) unstable; urgency=medium
* feat: dconfig2cpp generated codes supports qml
* feat: export ProductType for QML
* feat: async get dconfig value for DLog
* feat: support auto generate the Qt code from a dconfig's json
-- YeShanShan Thu, 27 Feb 2025 20:47:22 +0800
dtkcore (5.7.10) unstable; urgency=medium
* Release 5.7.10
-- YeShanShan Thu, 13 Feb 2025 17:18:04 +0800
dtkcore (5.7.9) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Thu, 23 Jan 2025 09:07:08 +0000
dtkcore (5.7.8) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Tue, 14 Jan 2025 11:17:31 +0000
dtkcore (5.7.7) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Thu, 09 Jan 2025 09:28:38 +0000
dtkcore (5.7.6) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Thu, 02 Jan 2025 05:43:52 +0000
dtkcore (5.7.5) unstable; urgency=medium
* fix: pidfd leak
-- Deepin Packages Builder Thu, 12 Dec 2024 03:03:54 +0000
dtkcore (5.7.4) unstable; urgency=medium
* fix: hasVtable is incorrect when destructing
-- Deepin Packages Builder Tue, 03 Dec 2024 02:00:45 +0000
dtkcore (5.7.3) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Wed, 20 Nov 2024 02:19:06 +0000
dtkcore (5.7.2) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Wed, 13 Nov 2024 01:53:26 +0000
dtkcore (5.7.1) unstable; urgency=medium
* feat: å¢žåŠ æ™ºèƒ½ç»ˆç«¯è®¾å¤‡ç±»åž‹ (#434)
Thanks to Whale107
* fix: remove unnecessary link libraries
* fix: DDBusInterface signal loss
* fix(util): error appid from `getAppIdFromAbsolutePath`
-- Deepin Packages Builder Wed, 16 Oct 2024 03:30:45 +0000
dtkcore (5.6.34) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Tue, 20 Aug 2024 05:03:51 +0000
dtkcore (5.6.32) unstable; urgency=medium
* refactor: log files move to dtklog(Issue: #182)
-- Deepin Packages Builder Mon, 08 Jul 2024 02:29:21 +0000
dtkcore (5.6.31) unstable; urgency=medium
* chore: use '&&' and '||' instead of 'and' and 'or'
-- Deepin Packages Builder Thu, 27 Jun 2024 09:11:34 +0000
dtkcore (5.6.30) unstable; urgency=medium
* feat: å…�许基于dtkå¼€å�‘的应用动æ€�控制其日志输出ç‰çº§(Task: 307567)(Influence: å…�许基于dtkå¼€å�‘的应用动æ€�控制其日志输出ç‰çº§)
* fix: lshw查询内å˜å¤§å°�æ—¶è¿”å›žå¤šå…ƒç´ æ•°ç»„,ä¿®æ£è§£æž�过程(Bug: 228681)(Influence: DSysInfo::memoryInstalledSizeè§£æž�过程)
* fix: 从文件ä¸è¯»å�–deepinTypeå’ŒproductTypeå€¼æ—¶å› ä¸ºæ�ƒé™�问题会失败(Influence: æ£å¸¸æ˜¾ç¤ºç‰ˆæœ¬å’Œè¯´æ˜Ž)
* feat: å¢žåŠ registerLoggingRulesWatcher接å�£(Task: 303379)
* fix: 修�计算 build 版本�错误的问题(Influence: 构建版本�(BUILD_VERSION ))
* feat: DeepinTypeç±»åž‹å¢žåŠ å†›ç”¨ç‰ˆ(Task: 316703)(Influence: DeepinType类型)
* fix: ä¿®å¤�æ—¥å¿—æ ¼å¼�时间戳显示异常问题(Bug: 236239)(Influence: 使用DLogManagerçš„åº”ç”¨æ—¥å¿—è¾“å‡ºæ ¼å¼�)
* chore: loggingrules config move to preference
* refactor: remove LoggingRules interface
* fix: crashed when access DSGApplication::id early
* chore: fallback to dsgconfig value
* fix(build): build faild on Qt 6.7.1
-- Deepin Packages Builder Thu, 30 May 2024 02:46:32 +0000
dtkcore (5.6.29) unstable; urgency=medium
* chore: remove warning for dbusxml2cpp in qt6
-- Deepin Packages Builder Mon, 13 May 2024 03:02:53 +0000
dtkcore (5.6.28) unstable; urgency=medium
* fix: fix undefined reference errors on spdlog 1.14.0
Thanks to hillwoodroc
-- Deepin Packages Builder Mon, 29 Apr 2024 08:23:39 +0000
dtkcore (5.6.27) unstable; urgency=medium
* fix: lossing value when save DConfig
* fix(qdbusxml2cpp): support qt 6.7
-- Deepin Packages Builder Fri, 19 Apr 2024 08:55:35 +0000
dtkcore (5.6.26) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder Tue, 26 Mar 2024 05:47:35 +0000
dtkcore (5.6.25) unstable; urgency=medium
* chore: fix docs typo
* feat: support to set appId for DConfig
* fix: DConfig add check for name(Issue: #1211374)
-- Deepin Packages Builder Mon, 11 Mar 2024 01:16:26 +0000
dtkcore (5.6.22) unstable; urgency=medium
* Release 5.6.22
-- Deepin Packages Builder Wed, 10 Jan 2024 02:30:59 +0000
dtkcore (5.6.21) unstable; urgency=medium
* fix: app blocked when AM is unavailable
* chore: remove decltype(auto) for dutil
* chore: fix relative path invalid link
* feat: allow skip including headers of annotations(Issue: #147)
-- Deepin Packages Builder Tue, 09 Jan 2024 01:45:43 +0000
dtkcore (5.6.20) unstable; urgency=medium
* feat: add utils function
* chore: Implement DSGApplication::getId
* feat(dstandardpaths): add XDG_STATE_HOME
* chore: keep order when deduplication
* fix: log files limit not work
* chore: add dtk dbus generate function
-- Deepin Packages Builder Tue, 28 Nov 2023 05:40:53 +0000
dtkcore (5.6.19) unstable; urgency=medium
* fix: Type error for qdbusxml2cpp
* fix: correct Dtk6SettingsToolsMacros.cmake path
* chore: add flag UserPublic(Issue: https://github.com/linuxdeepin/developer-center/issues/5928)
-- Deepin Packages Builder Mon, 23 Oct 2023 07:33:19 +0000
dtkcore (5.6.18) unstable; urgency=medium
* fix: Can't clear cache when reset for DConfig in FileBackend
* feat: Add isDefaultValue for DConfig(Issue: #3)
* fix: Compiling failed in lower libspdlog-dev
* fix: missing parameter passing for synchronization
* fix(build): skip failed unit test
* chore(tools): show help if argc < 2
* fix: Compiling failed in libspdlog-dev before 1.4.0
Thanks to Shiroko
* fix: cmake failure when env is null
* chore: correct typos in DtkSettingsToolsMacros.cmake
Thanks to Felix Yan
* chore: dpinyin tweak(Issue: #109)
-- Deepin Packages Builder Wed, 18 Oct 2023 06:01:45 +0000
dtkcore (5.6.17) unstable; urgency=medium
* Release 5.6.17
-- Deepin Packages Builder Fri, 08 Sep 2023 15:12:36 +0800
dtkcore (5.6.16) unstable; urgency=medium
* fix: FileAppender log level not set
* chore: ut linked dtkcore instead of source code
* chore: tweak CMakeLists
* chore: support Qt 6.4 build
* chore: qch docs tweak
* chore: add DtkBuildHelper depends
* chore: console with color at tty
* fix: missing dependency qttools5-dev
* feat: add synchronization workflow
-- Deepin Packages Builder Tue, 22 Aug 2023 06:13:45 +0000
dtkcore (5.6.15) unstable; urgency=medium
* chore: dlog example tweak
-- Yixue Wang Fri, 11 Aug 2023 13:42:20 +0800
dtkcore (5.6.14) unstable; urgency=medium
* chore: function need to be marked as override
* chore: ignore doxygen-theme folder
Thanks to Skye-rs
* chore: change OUTPUT_DIR variable in cmake
* chore: remove unused pro files
* refactor!: deprecate some interfaces in dtk6
* fix: updateProp cannot convert to property type
* fix: typo in xdg
* chore: reduce compilation warnings
Thanks to SPUER(Issue: #96)
* chore(dcapmanager): RuntimeTime -> RuntimeDir
* chore: Sync by https://github.com/linuxdeepin/.github/commit/559e91167d4919644f37bbcf123eb0651c1528ea(Influence: none)
* chore: make test-recoverage.sh runable again
* chore: add ut for DDbusSender
* feat: add systembus send support
* fix: internalPropSet nerver emit propertyChanged
* chore: should include QVector headers
* chore: dsysinfo tweak
* chore: add some unit test
-- Deepin Packages Builder Thu, 27 Jul 2023 06:56:33 +0000
dtkcore (5.6.13) unstable; urgency=medium
* feat: DConfig add check for no existed item when override
* fix(cmake): wrong use of option and wrong macro
* fix: calling delay in DDBusSender(Issue: https://github.com/linuxdeepin/developer-center/issues/4415)
* feat: DConfig add check for subpath(Issue: #54)
* feat: DConfig exports metadir's implementation(Issue: #10)
* fix(dccinterface): fix cannot get the right type
* fix: DConfig's `subpathIsValid` produces error
* fix(ut): failed ut
* fix(build): build faild on Qt6
* fix: fix build failed due to gcc compiler bug
* fix: ut_dfilewater failed on Qt6
* fix: DTextEncoding ut failed in Qt6.
* fix: fix DTextEncoding warnings.
* feat: support dtk6core build
* feat: add DThreadUtils class
* fix: move Qt CorePrivate to target private link
* fix: qdbusxml2cpp-fix not in path
* chore: remove ddbusinterface property cache
* chore: remove libdtkcommon depends
-- Deepin Packages Builder Sun, 25 Jun 2023 14:40:49 +0800
dtkcore (5.6.12) unstable; urgency=medium
* Release 5.6.12
* add DLicenseInfo
* cached memoryInstalledSize
* FIX developer-center#4348
-- Deepin Packages Builder Mon, 15 May 2023 11:18:15 +0800
dtkcore (5.6.11) unstable; urgency=medium
* Release 5.6.11
* add color to ConsoleAppender
* remove build warning
-- Deepin Packages Builder Mon, 08 May 2023 11:48:45 +0800
dtkcore (5.6.10) unstable; urgency=medium
* Release 5.6.10
* support XDG_SESSION_DESKTOP set to DDE
-- Deepin Packages Builder Mon, 17 Apr 2023 17:08:28 +0800
dtkcore (5.6.9) unstable; urgency=medium
* Release 5.6.9
-- Deepin Packages Builder Mon, 03 Apr 2023 09:48:07 +0800
dtkcore (5.6.8) unstable; urgency=medium
* Release 5.6.8
-- Deepin Packages Builder Wed, 22 Feb 2023 14:09:56 +0800
dtkcore (5.6.6) unstable; urgency=medium
* Release 5.6.6
-- Deepin Packages Builder Tue, 21 Feb 2023 12:25:24 +0800
dtkcore (5.6.5) unstable; urgency=medium
* Release 5.6.5
-- Deepin Packages Builder Thu, 02 Feb 2023 14:25:36 +0800
dtkcore (5.6.4) unstable; urgency=medium
* Release 5.6.4
-- Deepin Packages Builder Fri, 06 Jan 2023 16:30:40 +0800
dtkcore (5.6.3) unstable; urgency=medium
* Release 5.6.3
-- Deepin Packages Builder Mon, 12 Dec 2022 14:40:31 +0800
dtkcore (5.6.2.2) unstable; urgency=medium
* release 5.6.2.2
-- Deepin Packages Builder Thu, 17 Nov 2022 17:41:10 +0800
dtkcore (5.6.2.1) unstable; urgency=medium
* snipe release 5.6.2.1
-- Deepin Packages Builder Mon, 31 Oct 2022 16:53:16 +0800
dtkcore (5.6.2) unstable; urgency=medium
* snipe release 5.6.2
-- Deepin Packages Builder Wed, 21 Sep 2022 13:57:29 +0800
dtkcore (5.6.0) unstable; urgency=medium
* snipe release 5.6.0
-- Deepin Packages Builder Mon, 11 Jul 2022 17:47:56 +0800
dtkcore (5.0.3) unstable; urgency=medium
* Release 5.0.3
-- Deepin Packages Builder Tue, 21 Sep 2019 13:31:03 +0800
dtkcore (5.0.0) unstable; urgency=medium
* Release 5.0.0
-- Deepin Packages Builder Tue, 03 Sep 2019 08:47:03 +0800
dtkcore (2.0.8) unstable; urgency=medium
* Release 2.0.8
-- Deepin Packages Builder Wed, 02 May 2018 10:52:03 +0800
dtkcore (0.3.3-1) unstable; urgency=medium
* Initial release
-- Deepin Packages Builder Mon, 10 Oct 2016 16:58:07 +0800
dtkcore-6.7.46/debian/control 0000664 0000000 0000000 00000006206 15226157704 0016113 0 ustar 00root root 0000000 0000000 Source: dtkcore
Section: libdevel
Priority: optional
Maintainer: Shanshan Ye
Build-Depends: debhelper-compat ( =12),
cmake,
pkg-config,
libgtest-dev,
libdtkcommon-dev,
libicu-dev,
libuchardet-dev,
libdbus-1-dev,
qttools5-dev-tools ,
qttools5-dev ,
libgsettings-qt-dev ,
libdtklog-dev(>> 6.7.33) ,
qtbase5-private-dev ,
qt6-base-dev-tools ,
qt6-base-dev ,
qt6-base-private-dev ,
libdtk6log-dev(>> 6.7.33) ,
qt6-tools-dev ,
doxygen
Standards-Version: 3.9.8
Package: libdtk6core
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, lshw
Multi-Arch: same
Build-Profiles:
Description: Development ToolKit Core Library (DTK6 with Qt6)
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the shared libraries for DTK6 applications.
Package: libdtk6core-bin
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
libdtk6core( =${binary:Version})
Build-Profiles:
Description: Development ToolKit Core Utilities (DTK6 with Qt6)
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the utilities of DTK6 Core.
Package: libdtk6core-dev
Architecture: any
Depends: libdtk6core( =${binary:Version}),
libdtkcommon-dev(>=5.6.16), libdtk6log-dev
Build-Profiles:
Description: Development ToolKit Core Devel Library (DTK6 with Qt6)
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the header files and development library symbolic links of DTK6 Core.
Package: libdtk6core-doc
Architecture: any
Build-Profiles:
Description: Development ToolKit Core Documentation
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the doc files of DtkCore.
Package: libdtkcore5
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, lshw
Multi-Arch: same
Build-Profiles:
Description: Development ToolKit Core Library (DTK5 with Qt5)
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the shared libraries for DTK5 applications.
Package: libdtkcore5-bin
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
libdtkcore5( =${binary:Version})
Build-Profiles:
Description: Development ToolKit Core Utilities (DTK5 with Qt5)
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the utilities of DTK5 Core.
Package: libdtkcore-dev
Architecture: any
Depends: libdtkcore5( =${binary:Version}),
libdtkcommon-dev(>=5.6.16), libdtklog-dev
Build-Profiles:
Description: Development ToolKit Core Devel Library (DTK5 with Qt5)
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the header files and development library symbolic links of DTK5 Core.
Package: libdtkcore-doc
Architecture: any
Build-Profiles:
Description: Development ToolKit Core Documentation
DTK Core is the base library of deepin Qt/C++ applications.
.
This package contains the doc files of DtkCore.
dtkcore-6.7.46/debian/copyright 0000664 0000000 0000000 00000001760 15226157704 0016443 0 ustar 00root root 0000000 0000000 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dtkcore
Source: https://github.com/linuxdeepin/dtkcore
Files: *
Copyright: 2017 Deepin Technology Co., Ltd.
License: LGPL-3+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see
.
On Debian systems, the complete text of the GNU Lesser General
Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3".
dtkcore-6.7.46/debian/libdtk6core-bin.install 0000664 0000000 0000000 00000000035 15226157704 0021050 0 ustar 00root root 0000000 0000000 usr/libexec/dtk6/DCore/bin/*
dtkcore-6.7.46/debian/libdtk6core-dev.install 0000664 0000000 0000000 00000000164 15226157704 0021061 0 ustar 00root root 0000000 0000000 usr/lib/*/libdtk6core.so
usr/include/dtk6/*
usr/lib/*/pkgconfig/dtk6core.pc
usr/lib/*/cmake/Dtk6*/*
usr/lib/*/qt6/*
dtkcore-6.7.46/debian/libdtk6core-doc.install 0000664 0000000 0000000 00000000036 15226157704 0021046 0 ustar 00root root 0000000 0000000 usr/share/qt6/doc/dtkcore.qch
dtkcore-6.7.46/debian/libdtk6core.install 0000664 0000000 0000000 00000000033 15226157704 0020300 0 ustar 00root root 0000000 0000000 usr/lib/*/libdtk6core.so.*
dtkcore-6.7.46/debian/libdtkcore-dev.install 0000664 0000000 0000000 00000000307 15226157704 0020772 0 ustar 00root root 0000000 0000000 usr/lib/*/libdtkcore.so
usr/include/dtk5/*
usr/lib/*/pkgconfig/dtkcore.pc
usr/lib/*/cmake/DtkCMake/*
usr/lib/*/cmake/DtkTools/*
usr/lib/*/cmake/DtkDConfig/*
usr/lib/*/cmake/DtkCore/*
usr/lib/*/qt5/*
dtkcore-6.7.46/debian/libdtkcore-doc.install 0000664 0000000 0000000 00000000036 15226157704 0020760 0 ustar 00root root 0000000 0000000 usr/share/qt5/doc/dtkcore.qch
dtkcore-6.7.46/debian/libdtkcore5-bin.install 0000664 0000000 0000000 00000000035 15226157704 0021047 0 ustar 00root root 0000000 0000000 usr/libexec/dtk5/DCore/bin/*
dtkcore-6.7.46/debian/libdtkcore5.install 0000664 0000000 0000000 00000000032 15226157704 0020276 0 ustar 00root root 0000000 0000000 usr/lib/*/libdtkcore.so.*
dtkcore-6.7.46/debian/rules 0000775 0000000 0000000 00000005253 15226157704 0015571 0 ustar 00root root 0000000 0000000 #!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export DEB_CXXFLAGS_MAINT_APPEND = -Ofast
# 安全编译�数
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall
export DEB_CXXFLAGS_MAINT_APPEND = -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E
# reproducible编译�数
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# Calculate build version:
# 5.6.8 -> 0; 5.6.8.7 -> 7; 5.6.8+u001 -> 1; 5.6.8.7+u001 -> 7; 5.6.8.0+u001 -> 0
BUILD_VER := $(shell echo $(DEB_VERSION_UPSTREAM) | awk -F'[+_~-]' '{print $$1}' | awk -F'.' '{print $$4}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
ifeq ($(BUILD_VER), 0)
ifeq ($(shell expr $(shell echo "$(DEB_VERSION_UPSTREAM)" | awk -F. '{print NF-1}') '<' 3), 1)
BUILD_VER=$(shell echo $(DEB_VERSION_UPSTREAM) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
endif
endif
BUILD_DOCS := $(if $(filter nodoc,$(DEB_BUILD_PROFILES)),OFF,ON)
BUILD_DTK5 := $(if $(filter nodtk5,$(DEB_BUILD_PROFILES)),OFF,ON)
BUILD_DTK6 := $(if $(filter nodtk6,$(DEB_BUILD_PROFILES)),OFF,ON)
%:
dh $@
override_dh_auto_configure:
ifeq ($(BUILD_DTK5),ON)
mkdir -p build5
QT_SELECT=qt5 dh_auto_configure --builddirectory=build5 -- $(DEB_CMAKE_EXTRA_FLAGS) -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_DOCS=$(BUILD_DOCS) -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata -DDTK5=ON
endif
ifeq ($(BUILD_DTK6),ON)
mkdir -p build6
dh_auto_configure --builddirectory=build6 -- $(DEB_CMAKE_EXTRA_FLAGS) -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_DOCS=$(BUILD_DOCS) -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata -DDTK5=OFF
endif
override_dh_auto_build:
ifeq ($(BUILD_DTK5),ON)
QT_SELECT=qt5 dh_auto_build --builddirectory=build5
endif
ifeq ($(BUILD_DTK6),ON)
dh_auto_build --builddirectory=build6
endif
override_dh_auto_install:
ifeq ($(BUILD_DTK5),ON)
QT_SELECT=qt5 dh_auto_install --builddirectory=build5
endif
ifeq ($(BUILD_DTK6),ON)
dh_auto_install --builddirectory=build6
endif
override_dh_link:
ifeq ($(BUILD_DTK5),ON)
dh_link usr/lib/$(DEB_HOST_MULTIARCH)/libdtkcore.so.5 usr/lib/$(DEB_HOST_MULTIARCH)/libdtkcore.so -p libdtkcore-dev
endif
ifeq ($(BUILD_DTK6),ON)
dh_link usr/lib/$(DEB_HOST_MULTIARCH)/libdtk6core.so.6 usr/lib/$(DEB_HOST_MULTIARCH)/libdtk6core.so -p libdtk6core-dev
endif
override_dh_auto_test:
ifeq ($(BUILD_DTK5),ON)
QT_SELECT=qt5 dh_auto_test --builddirectory=build5
endif
ifeq ($(BUILD_DTK6),ON)
dh_auto_test --builddirectory=build6
endif
dtkcore-6.7.46/debian/source/ 0000775 0000000 0000000 00000000000 15226157704 0016004 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/debian/source/format 0000664 0000000 0000000 00000000015 15226157704 0017213 0 ustar 00root root 0000000 0000000 3.0 (native)
dtkcore-6.7.46/docs/ 0000775 0000000 0000000 00000000000 15226157704 0014212 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/CMakeLists.txt 0000664 0000000 0000000 00000007234 15226157704 0016760 0 ustar 00root root 0000000 0000000 cmake_minimum_required (VERSION 3.10)
find_package (Doxygen REQUIRED)
set (QCH_INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/qt${QT_VERSION_MAJOR}/doc CACHE STRING "QCH install location")
set (DOXYGEN_GENERATE_HTML YES CACHE STRING "Doxygen HTML output")
set (DOXYGEN_GENERATE_XML YES CACHE STRING "Doxygen XML output")
set (DOXYGEN_GENERATE_QHP YES CACHE STRING "Doxygen QHP output")
set (DOXYGEN_FILE_PATTERNS *.cpp *.h *.zh_CN.md *.zh_CN.dox CACHE STRING "Doxygen File Patterns")
set (DOXYGEN_PROJECT_NUMBER ${DTK_VERSION} CACHE STRING "") # Should be the same as this project is using.
set (DOXYGEN_EXTRACT_STATIC YES)
set (DOXYGEN_OUTPUT_LANGUAGE "Chinese")
if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Help)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ToolsTools)
endif()
get_target_property(_qhelpgenerator_location Qt${QT_VERSION_MAJOR}::qhelpgenerator IMPORTED_LOCATION)
if("${_qhelpgenerator_location}" STREQUAL "")
set(_qhelpgenerator_location "qhelpgenerator")
endif()
set (DOXYGEN_QHG_LOCATION ${_qhelpgenerator_location} CACHE STRING "Doxygen QHG path")
set (DOXYGEN_QHP_NAMESPACE "org.deepin.dtk.core")
set (DOXYGEN_QCH_FILE "dtkcore.qch")
set (DOXYGEN_QHP_VIRTUAL_FOLDER "dtkcore")
set (DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/docs/)
set (DOXYGEN_HTML_EXTRA_STYLESHEET "" CACHE STRING "Doxygen custom stylesheet for HTML output")
set (DOXYGEN_TAGFILES "qtcore.tags=qthelp://org.qt-project.qtcore/qtcore/" CACHE STRING "Doxygen tag files")
set (DOXYGEN_IMAGE_PATH ${PROJECT_SOURCE_DIR}/docs/src)
set (DOXYGEN_SOURCE_BROWSE "YES")
set (BUILD_THEME OFF CACHE BOOL "Build doxgen theme")
if(BUILD_THEME)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/doxygen-theme")
message(STATUS "doxygen-theme exists")
else()
execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
TIMEOUT 60
)
execute_process(COMMAND bash themesetting.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/doxygen-theme/
)
endif()
set (DOXYGEN_HTML_EXTRA_STYLESHEET "docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome.css"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-sidebar-only.css"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css"
)
set (DOXYGEN_HTML_EXTRA_FILES "docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-paragraph-link.js"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-interactive-toc.js"
)
set (DOXYGEN_GENERATE_TREEVIEW "YES")
set (DOXYGEN_DISABLE_INDEX "NO")
set (DOXYGEN_FULL_SIDEBAR "NO")
set (DOXYGEN_HTML_HEADER "docs/doxygen-theme/doxygen-awesome-css/header.html")
set (DOXYGEN_HTML_FOOTER "docs/doxygen-theme/doxygen-awesome-css/footer.html")
endif()
set (DOXYGEN_MACRO_EXPANSION "YES")
set (DOXYGEN_PREDEFINED
"DCORE_BEGIN_NAMESPACE=namespace Dtk { namespace Core {"
"DCORE_END_NAMESPACE=}}"
"DCORE_USE_NAMESPACE=using namespace Dtk::Core;"
"Q_OS_LINUX=1"
)
set (DOXYGEN_EXPAND_ONLY_PREDEF "YES")
doxygen_add_docs (doxygen
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/docs
ALL
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation via Doxygen"
)
install (FILES ${PROJECT_BINARY_DIR}/docs/html/dtkcore.qch DESTINATION ${QCH_INSTALL_DESTINATION})
dtkcore-6.7.46/docs/MainPage.zh_CN.md 0000664 0000000 0000000 00000003565 15226157704 0017226 0 ustar 00root root 0000000 0000000 \mainpage dtkcore
@brief dtk
# dtkcore
## 简介
dtkcore 是一个基于Qtçš„C++库,它æ��供了一些常用的工具类,以å�Šä¸€äº›åŸºç¡€çš„æ¨¡å�—,如日志ã€�æ�’ä»¶ã€�网络ã€�线程ã€�æ•°æ�®åº“ã€�文件ã€�图形ã€�音频ã€�视频ã€�系统信æ�¯ç‰
## 使用
现在的dtkcore>=5.6版本使用CMakeæ�¥ç®¡ç�†å�„个模å�—,所以使用dtkcore时,需è¦�先安装CMake(CMake>=3.10),ç„¶å�Žéœ€è¦�åœ¨ä½ çš„CMake项目ä¸å¼•å…¥dtkcoreçš„CMake模å�—,如下:
```cmake
find_package(Dtk6Core REQUIRED)
target_link_libraries(
Dtk6::Core
)
```
```qmake
QT += dtkcore
```
```bash
pkg-config --cflags --libs dtk6core
# pkgconfig find Dtk6Core in qmake
# CONFIG += link_pkgconfig
# PKGCONFIG += dtk6core
# pkgconfig find Dtk6Core in cmake
# find_package(PkgConfig REQUIRED)
# pkg_check_modules(Dtk6Core REQUIRED IMPORTED_TARGET dtk6core)
# target_link_libraries( PkgConfig::Dtk6Core )
```
以上示例仅为最å°�示例,并ä¸�能å�•独作为CMake项目使用,需è¦�ä½ è‡ªå·±æ·»åŠ å…¶ä»–çš„CMake模å�—,如Qtçš„CMake模å�—,以å�Šä½ 自己的CMake模å�—.
@note 注�:dtkcore的QMake模�会自动引入Qt5的QMake模�,所以�需��次引入Qt5的QMake模�,但是在使用CMake的时候必须手动引入Qtcore的CMake模�
## 文档
阅读文档建议从模�页�开始,模�页��供了dtkcore的�个模�的简介,以��个模�的使用示例。
@subpage DLog
dtkcore的文档使用doxygen管ç�†,ç”±deepin_doc_doc_go_sigæ��供维护支æŒ�, å¦‚æžœä½ ä¹Ÿæƒ³åŠ å…¥sig,请访问[deepin_doc_doc_go_sig](https://matrix.to/#/#deepin_doc_doc_go:matrix.org)
## 许�
dtkcore使用LGPLv3许å�¯è¯�ï¼Œä½ å�¯åœ¨æ¤è®¸å�¯è¯�下自由使用dtkcore
dtkcore的文档使用[CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)许å�¯è¯�ï¼Œä½ å�¯åœ¨æ¤è®¸å�¯è¯�下自由使用dtkcore的文档,但是转å�‘或者引用时必须注明出处。
dtkcore-6.7.46/docs/Specification.md 0000664 0000000 0000000 00000004641 15226157704 0017321 0 ustar 00root root 0000000 0000000 # Deepin Application Specification {#Specification}
Every application should keep the rule in this document.
## 1. Application Information
Application should set the property Organization-name and Application-name.
Organization/Application name can contains alphabet, number and other visible ASCII code, BUT space MUST NOT appear in the name. And we do not approve
of no-ASCII code character in the Organization/Application name
Application can stay Organization-name empty, but it should always set an Application-name.
## 2. Standard Path
The log, configure and runtime cache of Application should store in specific path.
**If Organization-name is empty, "{Organization-name}/" would not appear in path.**
### 2.1 User Application Standard Path
As an application run for user session, the Standard path should be:
````bash
XGD_LOG_HOME_DEEPIN:
Where deepin-user-specific log should be written.
XGD_USER_HOME/.log
DAPP_CONFIG_HOME:
Where application-specific configurations should be written.
XDG_CONFIG_HOME/{Organization-name}/{Application-name}
DAPP_LOG_HOME:
Where application-specific log should be written.
XGD_LOG_HOME_DEEPIN/{Organization-name}/{Application-name}
DAPP_CACHE_HOME:
Where application-specific cache files should be written.
XGD_CACHE_HOME/{Organization-name}/{Application-name}
DAPP_DATA_HOME:
Where application-specific data files should be written.
$XDG_DATA_HOME/{Organization-name}/{Application-name}
````
Simple example:
The dde-dock is offcial application of deepin and the standard path will be:
````bash
DAPP_CONFIG_HOME: $HOME/.config/deepin/dde-dock
DAPP_LOG_HOME: $HOME/.log/deepin/dde-dock
DAPP_CACHE_HOME: $HOME/.cache/deepin/dde-dock
DAPP_DATA_HOME: $HOME/.local/share/deepin/dde-dock
````
### 2.2 System Application Standard Path
Application run as system daemon, or with user with no home directory should place it's file in this standard path:
````bash
DAPP_CONFIG_SYS:
/etc/{Organization-name}/{Application-name}
DAPP_LOG_SYS:
/var/log/{Organization-name}/{Application-name}
DAPP_DATA_SYS:
/usr/share/{Organization-name}/{Application-name}
DAPP_CACHE_SYS:
/var/cache/{Organization-name}/{Application-name}
````
Refs:
[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.8.html)
[XDG Base Directory support](https://wiki.archlinux.org/index.php/XDG_Base_Directory_support)
dtkcore-6.7.46/docs/dci/ 0000775 0000000 0000000 00000000000 15226157704 0014751 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/dci/ddcifile.zh_CN.dox 0000664 0000000 0000000 00000011763 15226157704 0020240 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/dci/ddcifile.h
@ingroup dci
@class Dtk::Core::DDciFile ddcifile.h
@brief ddcifile.h 是关于dci文件相关�作的一个类,实现了 DCI 文件的逻辑。其�是对数�的打包
dci文件的结构路径如下:

@enum Dtk::Core::DDciFile::FileType
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::UnknowFile
@brief 未知文件
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::File
@brief 文件
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::Directory
@brief 目录
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::Symlink
@brief 软链接
@fn bool Dtk::Core::DDciFile::isValid()
@brief 判æ–读å�–çš„dci文件是å�¦æœ‰æ•ˆ
@details 当指定的dci文件未æˆ�åŠŸåŠ è½½æ—¶,æ¤å‡½æ•°ä¼šè¿”回false,ä¸€èˆ¬ä¼šå‡ºçŽ°åœ¨æ–‡ä»¶æ ¼å¼�错误(ä¸�是一个dciæ ¼å¼�的文件),或者是dci文件数æ�®è¢«ç¯¡æ”¹è€Œæ— 法识别的情况
@note æœ¬ç±»ä¸æ‰€æœ‰æ¶‰å�Šæ–‡ä»¶æ“�作的函数å�‡ä¼šé¦–å…ˆæ‰§è¡Œæ¤æ–¹æ³•,æ•…å¦‚æ— å¿…è¦�,æ— éœ€æ‰‹åŠ¨ç¡®ä¿�文件是å�¦æœ‰æ•ˆ
@fn QString Dtk::Core::DDciFile::lastErrorString()
@brief 获å�–上一个报错信æ�¯,为人类å�¯è¯»å—符串,å�¯ä»¥é€šè¿‡æ¤æŠ¥é”™ä¿¡æ�¯æ�¥èŽ·å�–错误内容,ä¸€èˆ¬æƒ…å†µä¸‹æ˜¯å› ä¸ºæ–‡ä»¶ä¸�å˜åœ¨æˆ–者文件å��过长(>62个å—符)导致。
@fn bool Dtk::Core::DDciFile::writeToFile(const QString &fileName)
@brief 写入文件,在å�šå®Œå¯¹äºŽdci文件的æ“�作之å�Žè°ƒç”¨æ¤æŽ¥å�£,为ä¿�å˜çš„作用
@param[in] fileName 文件�
@fn bool Dtk::Core::DDciFile::writeToDevice(QIODevice *device)
@brief 写入到设备,设备指的是qtä¸çš„io设备,å�¯ä»¥åœ¨qtæ–‡æ¡£ä¸æ‰¾åˆ°ç›¸å…³ä¿¡æ�¯
@param[in] device IO设备
@sa [QIODevice](https://doc.qt.io/qt-6/qiodevice.html)
@fn QByteArray Dtk::Core::DDciFile::toData()
@brief 返回dci文件的原始数�,以QByteArray形�返回
@retval 如果返回为空å—符串则说明读å�–失败
@sa DDciFile::writeFile
@fn static constexpr int Dtk::Core::DDciFile::metadataSizeV1()
@brief MAGIC_SIZE + VERSION_SIZE + FILE_COUNT_SIZE: 4+1+3 = 8
@fn QStringList Dtk::Core::DDciFile::list(const QString &dir, bool onlyFileName = false)
@brief 列出文件列表
@param[in] dir 文件夹地�
@param[in] onlyFileName 是��显示文件� 默认为false
@fn int Dtk::Core::DDciFile::childrenCount(const QString &dir)
@brief å�文件计数
@fn bool Dtk::Core::DDciFile::exists(const QString &filePath)
@brief åˆ¤æ–æ–‡ä»¶æ˜¯å�¦å˜åœ¨
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@fn FileType Dtk::Core::DDciFile::type(const QString &filePath)
@brief åˆ¤æ–æ–‡ä»¶ç±»åž‹
@sa DDciFile::FileType
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@fn QByteArray Dtk::Core::DDciFile::dataRef(const QString &filePath)
@brief 获�dci内部文件的数�,以一�引用(软连接)的方�获�,�会产生数�的的�制
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@retval 如果返回为空å—符串,åˆ™è¯´æ˜Žæ¤æ–‡ä»¶ä¸�å˜åœ¨æˆ–è€…æ— æ•ˆ
@fn QString Dtk::Core::DDciFile::name(const QString &filePath)
@brief 获�dci内文件的文件�
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@retval 如果返回为空å—符串,åˆ™è¯´æ˜Žæ¤æ–‡ä»¶ä¸�å˜åœ¨æˆ–è€…æ— æ•ˆ
@fn QString Dtk::Core::DDciFile::symlinkTarget(const QString &filePath, bool originData = false)
@brief 获å�–è½¯é“¾ç›®æ ‡
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@param[in] originData
@retval 如果返回为空å—符串,åˆ™è¯´æ˜Žæ¤æ–‡ä»¶ä¸�å˜åœ¨æˆ–è€…æ— æ•ˆ
@note é“¾æŽ¥çš„ç›®æ ‡å�ªèƒ½æ˜¯â€œä¸�å˜åœ¨çš„路径â€�ã€�“文件â€�ã€�“链接â€�,ä¸�å�¯æ˜¯ç›®å½•
@fn bool Dtk::Core::DDciFile::mkdir(const QString &filePath)
@brief 创建目录(注æ„�:æ¤ç›®å½•指的是在dci文件内部的目录,而ä¸�æ˜¯æŒ‡çš„æ˜¯ä¼ ç»Ÿç›®å½•)
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@return �作是��功
@fn bool Dtk::Core::DDciFile::writeFile(const QString &filePath, const QByteArray &data, bool override = false)
@brief 写入文件
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@param[in] data 数�内容
@param[in] override 当文件已ç»�å˜åœ¨æ—¶,是å�¦è¦†ç›–æ¤æ–‡ä»¶,默认状æ€�下ä¸�执行覆盖,会在lasterrorä¸è®°å½•"The target file is existed"错误信æ�¯ã€‚
å¦‚æžœä¼ å…¥ä¸ºtrue,则会执行覆盖æ“�作,** æ¤æ“�作ä¸�å�¯é€† **。
@return �作是��功
@sa QByteArray DDciFile::toData()
@fn bool Dtk::Core::DDciFile::remove(const QString &filePath)
@brief 移除文件
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@return �作是��功
@fn bool Dtk::Core::DDciFile::rename(const QString &filePath, const QString &newFilePath, bool override = false)
@brief �命�文件
@param[in] filePath DCIå›¾æ ‡ç»“æž„è·¯å¾„
@param[in] newFilePath 新文件的路径
@param[in] override 当文件已ç»�å˜åœ¨æ—¶,是å�¦è¦†ç›–æ¤æ–‡ä»¶,默认状æ€�下ä¸�执行覆盖,会在lasterrorä¸è®°å½•"The target file is existed"错误信æ�¯ã€‚
å¦‚æžœä¼ å…¥ä¸ºtrue,则会执行覆盖æ“�作,** æ¤æ“�作ä¸�å�¯é€† **。
@return �作是��功
@fn bool Dtk::Core::DDciFile::link(const QString &source, const QString &to)
@brief 链接文件
@param[in] source 文件�
@param[in] to é“¾æŽ¥ç›®æ ‡
@return �作是��功
*/
dtkcore-6.7.46/docs/dci/index.zh_CN.md 0000664 0000000 0000000 00000022734 15226157704 0017412 0 ustar 00root root 0000000 0000000 @page dci dci--dciå›¾æ ‡å·¥å…·ç±»
# DTk dci:dci工具类
关于dtkcore�供的dci工具�:[DCI](group__dci.html#files)
下é�¢å†…容是关于dci文件的简介,还有一部分使用以å�Šå·¥å…·å°†ä¼šåœ¨ä»¥å�Žçš„æ–‡æ¡£ä¸æ��ä¾›
## 关于dciå›¾æ ‡ç®€ä»‹
`DCI` å›¾æ ‡æ˜¯ä¸€ç§�æ•´å�ˆæ€§å›¾æ ‡æ ¼å¼�,应用å�¯ä»¥ä½¿ç”¨è¯¥å›¾æ ‡å®Œæˆ�多ç§�状æ€�的自动å�˜åŒ–。例如, `ListView` 控件ä¸é«˜äº®çš„ `Item` å›¾æ ‡è‡ªåŠ¨å��白,`Menu` ä¸å›¾æ ‡è·Ÿéš�当å‰� `Item` å�˜åŒ–ç‰ç‰ã€‚
`dtkcore` 䏿��供了一个 `DDciFile` 的类,实现 `DCI` 文件的逻辑。其å�ªæ˜¯å¯¹æ•°æ�®çš„æ‰“包,ä¸�é™�于图片数æ�®ï¼Œå�¯ä»¥æ˜¯ä»»ä½•文本和二进制数æ�®ã€‚ `dtkcore` ä¸è¿˜æ��供了用于在文管ä¸è§£æž�文件的文件引擎,专门用于通过 `QFile` å’Œ `QDir` 处ç�† `dci` 文件。
dtkgui 䏿��供了一个 `DDciIcon` 类,实现了对 `DCI` å›¾æ ‡çš„é€»è¾‘ã€‚åŒºåˆ«äºŽ `DDciFile` ,它是 `DDciFile` 的上层å°�装,å�³ä½¿ç”¨ DDciFile å�¯ä»¥å°†æ–‡ä»¶è¿›è¡Œæ‰“包归档的功能,å°�装了一ç§�å›¾æ ‡æ ¼å¼�。 `DDciIcon` 䏿��供的接å�£ï¼Œéƒ½æ˜¯é’ˆå¯¹å›¾æ ‡çš„ï¼Œå¹¶æ— `DDciFile` 的数æ�®å¤„ç�†æ“�作,多个 `DDciIcon` 进行数æ�®æ‹·è´�和交æ�¢æ—¶ï¼Œå�¯ä»¥è¿›è¡Œæ•°æ�®å…±äº«ã€‚ `DDciIcon` å�¯ä»¥é€šè¿‡è°ƒç”¨ pixmap 函数返回需è¦�显示的图片数æ�®ï¼Œä¹Ÿå�¯ä»¥é€šè¿‡è°ƒç”¨ paint å‡½æ•°ç›´æŽ¥å°†å†…å®¹ç»˜åˆ¶åˆ°ç›®æ ‡å†…éƒ¨ã€‚è§£æž� Dci å›¾æ ‡çš„è¿‡ç¨‹ï¼Œè¿™é‡Œè®²è§£ä¸€ä¸‹ï¼Œè¯¦ç»†è¿‡ç¨‹å�¯ä»¥æŸ¥çœ‹ä»£ç �ç�†è§£ï¼š
首先需è¦�创建一个 DDciFile æ�¥è§£æž� (*.dci) æ–‡ä»¶ï¼Œæ— è®ºæ˜¯æœ¬åœ°æ–‡æœ¬è¿˜æ˜¯äºŒè¿›åˆ¶æ•°æ�®ï¼Œéƒ½å�¯ä»¥é€šè¿‡ `DDciFile` æ�¥è§£æž�内部内容。
æ ¹æ�® `DDciIcon` ä¸è§„å®šå¥½çš„è·¯å¾„æ ¼å¼�,æ�¥è§£æž�å‡ºå›¾æ ‡ä¸æ‹Ÿå®šçš„å�„ç§�ä¿¡æ�¯ï¼Œä¸€èˆ¬æƒ…况下的 `DDciIcon` çš„è·¯å¾„æ ¼å¼�æ˜¯è¿™æ ·çš„ï¼š

最上层时 `/` ä½œä¸ºæ ¹ç›®å½•ï¼ˆ `DCI` 文件都必须使用 `/` ä½œä¸ºæ ¹ç›®å½•ï¼‰ã€‚
第一层å�目录( 16ã€�32ã€�512 ï¼‰ä½œä¸ºå›¾æ ‡çš„å¤§å°�ã€‚ä¸€èˆ¬æƒ…å†µä¸‹æ˜¯å›¾æ ‡åœ¨ @1(1å€�缩放比) 时的大å°�(在目å‰�的使用设计师使用的 dci å›¾æ ‡æ�’ä»¶çš„ï¼‰ã€‚ä¾‹å¦‚ä¸Šè¿°å›¾æ ‡ï¼Œä¼ å…¥çš„å¤§å°�在 0-16时选择 16ï¼Œä¼ å…¥å¤§å°�在 16-32 时选择 32,... 以æ¤ç±»æŽ¨ã€‚
第二层目录( `normal.light` ï¼‰ä½œä¸ºè¯¥å±‚å›¾æ ‡çš„çŠ¶æ€�和主题,其ä¸çжæ€�分为 `Normal` , `Disabled` , `Hovered` å’Œ `Pressed` å››ç§�,主题分为 `light` å’Œ `dark` 两ç§�。四ç§�状æ€�和两ç§�主题å�¯äº§ç”Ÿ 8 ç§�组å�ˆï¼Œä¹Ÿå°±æ˜¯è¯´ï¼Œæ¯�ç§�大å°�çš„å›¾æ ‡æœ€å¤šæœ‰å…«ç§�ä¸�å�Œçжæ€�和主题的å�å›¾æ ‡è¿›è¡Œåˆ‡æ�¢ã€‚需è¦�注æ„�的是:状æ€�和主题å˜åœ¨ç¼ºçœ�模å¼�: `normal` å’Œ `light` ã€‚å¦‚æžœä¼ å…¥çš„çŠ¶æ€�和主题在所属大å°�çš„å�å›¾æ ‡ä¸‹æœªæ‰¾åˆ°ï¼Œåˆ™é€‰æ‹©ç¼ºçœ�模å¼�的状æ€�å’Œä¸»é¢˜ã€‚ä¹Ÿå°±æ˜¯è¯´ï¼Œå½“å›¾æ ‡çš„ `Normal` å’Œ `light` 状æ€�æœªæ‰¾åˆ°ä»»ä½•å›¾æ ‡æ—¶ï¼Œè¯¥å›¾æ ‡æ˜¯æ— æ•ˆçš„ã€‚ä¸€èˆ¬æƒ…å†µä¸‹ï¼Œå¦‚æžœå›¾æ ‡ä¸�会在ä¸�å�Œçжæ€�和主题下å�‘ç”Ÿè¿‡å¤§çš„æ ·å¼�修改,å�ªä¿®æ”¹å†…部颜色填充时,å�¯ä»¥ä¸�æ·»åŠ ç‰¹æ®ŠçŠ¶æ€�çš„å›¾æ ‡ï¼Œé€šè¿‡ä¿®æ”¹è°ƒè‰²ç‰ˆè§£å†³ã€‚ï¼ˆå�Žé�¢æ��å�Šï¼‰
第三层目录(1ã€�2)作为缩放比系数,å�¯ä»¥å˜æ”¾å¤šä¸ªç¼©æ”¾æ¯”系数æ�¥é€‚é…�系统的缩放比。例如上述示例:缩放比系数在1å’Œ2之间时,选择 2,大于 2 时,选择 2 ,默认情况下选择 1。目å‰�æ��ä¾›çš„å›¾æ ‡ä¸ï¼Œä¸ºäº†ä¿�è¯�å°½é‡�å‡�å°‘å›¾æ ‡æ–‡ä»¶çš„å¤§å°�,仅ä¿�å˜ç¼©æ”¾æ¯”为 3 的文件。在软件层é�¢è¿›è¡Œç¼©æ”¾ã€‚
第四层(1.png)æ��è¿°å›¾æ ‡å›¾ç‰‡æ–‡ä»¶ï¼ˆå›¾å±‚ï¼‰æ‰€æ�ºå¸¦çš„ä¿¡æ�¯ã€‚这些信æ�¯ä¸ï¼ŒåŒ…å�«ï¼šå›¾å±‚优先级ã€�外边框数值ã€�调色æ�¿æ ¼å¼�ã€�颜色调整数值ã€�å›¾å±‚æ ¼å¼�。å�¯ä»¥é€šè¿‡ä¸‹è¿°æ–‡ä»¶è¡¨
```
├── 1.7p.3.png.alpha8
├── 2.3.webp
└── 3.7p.3_0_0_-10_0_0_0_0.png.alpha8
│ │ │ │ │ │ ┕�┳�┙┕�┳�┙
│ │ │ │ │ │ rgba format
│ │ │ │ │ │
│ │ │ │ │ └─ lightness (亮度)
│ │ │ │ └─ saturation (饱和度)
│ │ │ └─ hue (色调)
│ │ └─ palette (高亮色3)
│ └─ padding (填充间隔)
└─ prior (图层)
.[padding]..
```
下�进行一一介�:
* **图层优先级**(`prior`):优先级代表图层的绘制顺�,从 1-n 进行绘制,最底层的图层会被上层图层覆盖。
* **外边框数值**(`padding`)ï¼šå¤–è¾¹æ¡†åœ¨æœ‰é˜´å½±æ•ˆæžœçš„å›¾æ ‡ä¸å……分利用。 `padding` 代表图层外围ä¸�被控件大å°�覆盖的区域。

类似控件的布局方å¼�,这里å�¯ä»¥ä¹‹çœ‹ `padding` 部分, `padding` 定义四周所有数æ�®ï¼Œä¸¾ä¸ªä¾‹å�,如果å�å›¾æ ‡çš„å¤§å°�是 32 (第一层目录的数值),一å€�缩放比下,如果该图层的 `padding` 大å°�æ—¶ 5,那么该图层的真实图片大å°�是:[32 + 5 × 2, 32 + 5 × 2] = [42, 42]。但最终, `padding` 区域的大å°�å¹¶ä¸�è®¡ç®—åœ¨æ•´ä¸ªå›¾æ ‡å¤§å°�内(仅针对 QML,dtkwidget ä¸�支æŒ�)。为了区别其他数æ�®ï¼Œ `padding` 的数值å�Žé�¢ä½¿ç”¨ `'p'` 进行结尾。例如上述示例:`'7p'` 。
* **调色æ�¿æ ¼å¼�** :当å˜åœ¨è°ƒè‰²æ�¿æ—¶ï¼Œå°±è¡¨ç¤ºè¯¥å›¾æ ‡çš„颜色是通过调色æ�¿çš„颜色进行动æ€�å�˜åŒ–的,外部修改调色æ�¿é¢œè‰²å�Žï¼Œé¢„览效果会éš�之å�‘生å�˜åŒ–ã€‚å› æ¤è¯¥å›¾æ ‡æœ‰ä¸¤ç§�特性:1. å�¯ä»¥è½¬æ�¢æˆ� alpha8 æ ¼å¼�; 2. å�¯ä»¥ä¸�需è¦�其他状æ€�,通过调色æ�¿å�˜åŒ–å�³å�¯ã€‚å½“æ— è°ƒè‰²æ�¿æ—¶ï¼Œè¯¥éƒ¨åˆ†çš„æ•°å€¼ä¸ºç©ºã€‚调色æ�¿æ ¼å¼�分为5ç§�ï¼šæ— æ•ˆï¼ˆ-1)ã€�å‰�景色(0)ã€�背景色(1)ã€�高亮å‰�景色(2)ã€�高亮色(3)。
* **颜色调整数值** :颜色调整å�ªé’ˆå¯¹æœ‰è°ƒè‰²æ�¿çš„图层(调色æ�¿æ ¼å¼�部分数æ�®ä¸�为空)时。一旦å˜åœ¨ï¼Œå¿…é¡»è¦�将其所有的数æ�®å†™å…¥ï¼Œä¾‹å¦‚上述示例。颜色调整数值使用 '_' 进行分割。
�个部分表示:hu�saturation�lightness�red�green�blue�alpha。
* **å›¾å±‚æ ¼å¼�** ï¼šå›¾å±‚æ ¼å¼�å�¯ä»¥ä½¿ç”¨ï¼š"png"ã€�"jpg"ã€�"webp"。如果图层å˜åœ¨è°ƒè‰²æ�¿æ ¼å¼�,就æ„�味ç�€å�¯ä»¥ä¼˜åŒ–其大å°�,转化为 alpha8 æ ¼å¼�,使用".alpha8" 作为å�Žç¼€ï¼Œè¿›è¡Œæ ‡è¯†ï¼Œåœ¨è½¯ä»¶æ¸²æŸ“时进行进行å¤�原。
`DCI` å›¾æ ‡çš„ç»†èŠ‚ä»‹ç»�在 åº”ç”¨å›¾æ ‡ï¼Œä¸Šé�¢ä¸»è¦�介ç»� `DCI` å›¾æ ‡çš„æ•´ä¸ªç»“æž„å’Œåœ¨ `QML` ä¸çš„使用方å¼�。其主è¦�是设计实现了一ç§�ç‰¹æ®Šæ ¼å¼�的文件(.dci),该ç§�æ ¼å¼�通过路径,å��称和文件数æ�®ï¼Œæ‰“包到å�Œä¸€ä¸ªæ–‡ä»¶å†…,使ä¸�å�Œçжæ€�ã€�大å°�ã€�ä¸»é¢˜çš„å¤šä¸ªå›¾æ ‡å›¾ç‰‡ï¼Œæ•´å�ˆåˆ°å�Œä¸€ä¸ªæ–‡ä»¶å†…,在程åº�内部自动匹é…�当å‰�状æ€�,选择å�ˆé€‚çš„å›¾æ ‡å›¾ç‰‡ã€‚å› æ¤ï¼Œæ€»çš„æ�¥è¯´ï¼Œ `DCI` å›¾æ ‡æ˜¯å¯¹å¤šä¸ªå›¾æ ‡å›¾ç‰‡çš„æ‰“åŒ…å½’æ¡£ã€‚
本文将介ç»� `DCI` å›¾æ ‡åœ¨ `dtkwidget` å’Œ `dtkdeclarative` ä¸çš„使用,对于一些 `DCI` å›¾æ ‡ç›¸å…³çš„é«˜çº§çŸ¥è¯†ï¼ˆä½¿ç”¨æ–¹æ— éœ€è¿‡åº¦å…³å¿ƒï¼‰ï¼Œå¦‚ “DDciIconPaletteâ€�ã€�“缩放比的适é…�â€�以å�Šâ€œå›¾ç‰‡çš„æ ¼å¼�â€�ç‰ç‰ã€‚
**请注æ„�:** 当使用 `DciIcon` 时,如果您认为控件在æŸ�ç§�状æ€�下需è¦�è¿›è¡Œå›¾æ ‡å�˜è‰²æˆ–æ›´æ�¢å›¾æ ‡è€Œæœªå‡ºçŽ°æ—¶ï¼Œå�¯èƒ½æ˜¯ç”±äºŽ**设计æ��ä¾›çš„å›¾æ ‡æœªæŒ‡å®šå�˜è‰²æ‰€éœ€è¦�的调色æ�¿å¯¹è±¡ï¼ˆå�¯ä»¥ç�†è§£ä¸ºå›¾æ ‡å‡ºé”™ï¼‰** 或 **设计认为该ç§�场景下ä¸�需è¦�å�˜è‰²(å�³å›ºå®šæ ·å¼�å›¾æ ‡)**,请å�Šæ—¶ä¸Žè®¾è®¡æ²Ÿé€šã€‚
### 1. å›¾æ ‡çŠ¶æ€�
大部分控件å�¯ä»¥åˆ†ä¸º `Normal` ã€� `Hovered` ã€� `Pressed` å’Œ `Disabled` å››ç§�状æ€�。这四ç§�状æ€�是æ¯�ç§�控件的基础状æ€�ã€‚å› æ¤å°†ä½¿ç”¨è¿™å‡ ç§�状æ€�ä½œä¸ºå›¾æ ‡çš„çŠ¶æ€�分类。
#### ç”ç–‘
1. 为什么没有 `Checked` å’Œ `Inactive` ç±»ä¼¼è¿™æ ·çš„çŠ¶æ€�?
`Checked` 状æ€�属于å¤�å�ˆçжæ€�,并ä¸�属于基础状æ€�。 `Checked` 状æ€�下,å�¯ä»¥æœ‰ `Hovered` ã€� `Pressed` ã€� `Normal` ç‰ç‰çжæ€�,相å�Œåœ°ï¼Œ `Unchecked` 状æ€�也会å˜åœ¨ä¸€æ ·çš„æƒ…å†µã€‚å› æ¤ï¼Œ `Checked` 状æ€�å¹¶ä¸�适å�ˆä½œä¸º `DCI` å›¾æ ‡çš„çŠ¶æ€�。对于需è¦�时,å�¯é€šè¿‡æŽ§ä»¶çš„ `checked` 状æ€�属性,切æ�¢ä¸‹ä¸�å�Œçš„å›¾æ ‡å�³å�¯ã€‚
`Inactive` 状æ€�作为窗å�£çš„状æ€�,在 `DTK` 应用都会通过é™�低é€�明度的方å¼�实现,而ä¸�æ˜¯ä½œä¸ºå›¾æ ‡çŠ¶æ€�。
2. 为什么需�这些状�?
å˜åœ¨è¿™äº›çжæ€�çš„åŽŸå› æ˜¯ï¼Œä¸ºäº†è®©åº”ç”¨å’Œå¼€å�‘è€…æ›´åŠ æ— æ„ŸçŸ¥çš„ä½¿ç”¨å›¾æ ‡ï¼Œè€Œæ— éœ€å…³å¿ƒä¸�å�Œçжæ€�ä¸‹è¿›è¡Œå›¾æ ‡åˆ‡æ�¢çš„æ“�作。方便设计师一次æ��供多ç§�状æ€�çš„å›¾æ ‡åˆ°ä¸€ä¸ªå›¾æ ‡æ–‡ä»¶ä¸ï¼Œè¿›è¡ŒåŽ‹ç¼©æ•´å�ˆã€‚防æ¢å‡ºçŽ°å›¾æ ‡èµ„æº�较多,å� 用较大系统内å˜ï¼Œå�Œæ—¶èƒ½å¤Ÿå¸®åŠ©è®¾è®¡å¸ˆåœ¨æŽ§ä»¶çš„ä¸�å�Œçжæ€�下,ä¸�ä»…ä»…å�ªå±€é™�äºŽä¿®æ”¹å›¾æ ‡é¢œè‰²è¿™ä¸€ç§�功能,也å�¯ä»¥é€šè¿‡ä¸�å�Œçš„å›¾æ ‡ä»£æ›¿ï¼Œæ›´é€‚å�ˆå¤šæ ·åŒ–çš„æ ·å¼�设计。
3. å›¾æ ‡ä¸�显示å�¯èƒ½æ˜¯ä»€ä¹ˆåŽŸå› ï¼Ÿ
很å�¯èƒ½æ˜¯ webp æ ¼å¼�的支æŒ�问题, æŸ¥çœ‹ä¸€ä¸‹ç³»ç»Ÿä¸æ˜¯å�¦å®‰è£… `qt5-image-formats-plugins` ï¼Œè¿™ä¸ªåŒ…ä¸æœ‰å¯¹ webp æ ¼å¼�å›¾ç‰‡æ ¼å¼�的支æŒ�。
### 2. å›¾æ ‡å¤§å°�和缩放比
åº”ç”¨æ‰€å…³å¿ƒçš„å›¾æ ‡å¤§å°�是å�¦æ£å¸¸ï¼Œæ˜¯å�¦èƒ½å¤Ÿé€‚é…�高缩放比模å¼�ç‰ç‰ã€‚ `DCI` å›¾æ ‡ä¸éƒ½å�šåˆ°äº†è¿™äº›ï¼Œé»˜è®¤æƒ…况下,设计师所æ��ä¾›çš„å›¾æ ‡å¤§å°�能够满足应用开å�‘的需求,应用å�ªéœ€è¦�主动调用接å�£æŒ‡å®šå›¾æ ‡å¤§å°�å�³å�¯ï¼Œä¾‹å¦‚ `dtkwidget`,ä¸ `DIconButton` å�¯ä»¥ä½¿ç”¨ `setIconSize` 指定; `QML` ä¸å�¯ä»¥æŒ‡å®š `DciIcon` 控件的 `sourceSize` 或者 `Button` 控件的 `icon.size` ç‰ç‰ã€‚而对于高缩放比的适é…�, `DTK` å·²ç»�全部完æˆ�æ— éœ€åº”ç”¨å…³å¿ƒã€‚
@defgroup dci
@brief dtkdciå›¾æ ‡å·¥å…·ç±», æ��供对于dci文件的æ“�作方法
@details 详细内容å�¯è§� [DCIå›¾æ ‡ç®€ä»‹](md_docs_dci_index_zh_CN.html#autotoc_md0)
dtkcore-6.7.46/docs/filesystem/ 0000775 0000000 0000000 00000000000 15226157704 0016376 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/filesystem/dbasefilewatcher.zh_CN.dox 0000664 0000000 0000000 00000005564 15226157704 0023420 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dbasefilewatcher.h
@class Dtk::Core::DBaseFileWatcher
@brief DBaseFileWatcher 类�供了一系列接��供监视文件和目录的�动。
@note 建议使用 DFileWatcher 类,该类是 DBaseFileWatcher çš„å�类,æ��供了更多的功能。或者使用DFileWatcherManager类,该类æ��供了对文件和目录的监视功能。
@warning 该类是一个虚类,�应该被直接使用,而应该使用 DFileWatcher 类或者 DFileWatcherManager 类。
@fn QUrl Dtk::Core::DBaseFileWatcher::fileUrl()
@brief 返回文件的统一资�定�符
@sa [QUrl](https://doc.qt.io/qt-5/qurl.html)
@fn bool Dtk::Core::DBaseFileWatcher::startWatcher()
@brief 开始监视文件�动
@return true �功 false 失败
@sa DBaseFileWatcher::stopWatcher
@fn bool Dtk::Core::DBaseFileWatcher::stopWatcher()
@brief å�œæ¢ç›‘视文件å�˜åЍ
@return true �功 false 失败
@sa DBaseFileWatcher::startWatcher()
@fn bool Dtk::Core::DBaseFileWatcher::restartWatcher()
@brief ��监视文件�动
@return true �功 false 失败
@sa DBaseFileWatcher::startWatcher()
@fn virtual void Dtk::Core::DBaseFileWatcher::setEnabledSubfileWatcher(const QUrl &subfileUrl, bool enabled = true)
@brief 设置是�对`subfileUrl`目录�用文件监视
@param[in] subfileUrl 设置所针对的 Url
@param[in] enabled 是��用文件�动监视
@fn static bool Dtk::Core::DBaseFileWatcher::ghostSignal(const QUrl &targetUrl, SignalType1 signal, const QUrl &arg1)
@brief å�‘é€�一个信å�·è¡¨ç¤ºç›®æ ‡ç›®å½•`targetUrl`得到了一个`signal`ä¿¡å�·ï¼ŒåŒ…å�«å�‚æ•°`arg1`
使用方�如下:
@code
DBaseFileWatcher::ghostSignal(QUrl("bookmark:///"), &DBaseFileWatcher::fileDeleted, QUrl("bookmark:///bookmarkFile1"));
@endcode
@return �功��返回 true,�则返回 false
@fn static bool Dtk::Core::DBaseFileWatcher::ghostSignal(const QUrl &targetUrl, DBaseFileWatcher::SignalType2 signal, const QUrl &arg1, const QUrl &arg2)
@brief å�‘é€�一个信å�·è¡¨ç¤ºç›®æ ‡ç›®å½•`targetUrl`得到了一个`signal`ä¿¡å�·ï¼ŒåŒ…å�«å�‚æ•°`arg1`å’Œ`arg2`
@details 示例用法:
@code
DBaseFileWatcher::ghostSignal(QUrl("bookmark:///"), &DBaseFileWatcher::fileMoved, QUrl("bookmark:///bookmarkFile1"), QUrl("bookmark:///NewNameFile1"));
@endcode
@var Dtk::Core::DBaseFileWatcher::fileDeleted(const QUrl &url)
@brief æ–‡ä»¶è¢«åˆ é™¤çš„ä¿¡å�·
@var Dtk::Core::DBaseFileWatcher::fileMoved(const QUrl &fromUrl, const QUrl &toUrl)
@brief 文件被移动的信�
@var Dtk::Core::DBaseFileWatcher::fileAttributeChanged(const QUrl &url)
@brief 文件属性被改�的信�
@var Dtk::Core::DBaseFileWatcher::subfileCreated(const QUrl &url)
@brief å�文件被创建的信å�·
@var Dtk::Core::DBaseFileWatcher::fileClosed(const QUrl &url)
@brief 文件被关é—的信å�·
@var Dtk::Core::DBaseFileWatcher::fileModified(const QUrl &url)
@brief 文件被修改的信�
*/
dtkcore-6.7.46/docs/filesystem/dcapfile.zh_CN.dox 0000664 0000000 0000000 00000023767 15226157704 0021700 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dcapfile.h
@class Dtk::Core::DCapFile
@brief 对于文件�作的安全�装, �供了带有安全管控的文件读�, 相关�洞�[CWE_22](https://cwe.mitre.org/data/definitions/22.html)
@fn explicit Dtk::Core::DCapFile(QObject *parent = nullptr)
@brief é»˜è®¤æž„é€ å‡½æ•°, 创建一个文件默认文件对象
@fn Dtk::Core::DCapFile::DCapFile(const QString &name, QObject *parent)
@brief é‡�è½½çš„æž„é€ å‡½æ•°, 接å�—ä¼ å…¥ä¸€ä¸ªæ–‡ä»¶å��, 并创建一个文件对象
@note è°ƒç”¨æ¤æž„é€ å‡½æ•°ç›¸å½“äºŽè°ƒç”¨é»˜è®¤æž„é€ å‡½æ•°+`DCapFile::setFileName()`
@fn void Dtk::Core::DCapFile::setFileName(const QString &name)
@brief ä¼ å…¥éœ€è¦�æ“�作的文件å��
@fn bool Dtk::Core::DCapFile::exists() const
@brief 文件是å�¦å˜åœ¨
@note æ¤å¤„çš„å˜åœ¨æŒ‡å½“å‰�ç”±setFileName() æŒ‡å®šçš„æ–‡ä»¶æˆ–è€…æ˜¯åœ¨æž„é€ æ—¶æŒ‡å®šçš„æ–‡ä»¶æ˜¯å�¦å�¯è¯»å�¯å†™
@note 需è¦�åœ¨æž„é€ æ—¶æˆ–è€…æ‰‹åŠ¨æŒ‡å®šäº†æ–‡ä»¶å��æ‰�å�¯ä»¥ä½¿ç”¨æ¤å‡½æ•°, å�¦åˆ™è¯·è°ƒç”¨å…¶é‡�载的函数
@fn static bool Dtk::Core::DCapFile::exists(const QString &fileName)
@brief 文件是å�¦å˜åœ¨
@param[in] fileName 文件�
@note æ¤å¤„çš„å˜åœ¨æŒ‡çš„æ˜¯æ¤å‡½æ•°çš„ä¼ å…¥çš„æ–‡ä»¶å��指å�‘的文件是å�¦å�¯è¯»å�¯å†™
@fn QString Dtk::Core::DCapFile::readLink() const
@brief 读å�–软连接, 如果软连接指å�‘的文件ä¸�å…�许读写, 则返回空å—符串
@note æ¤æ–¹æ³•在Qt版本>=5.13å�Ž**废弃**
@return 返回软连接指�的文件或者目录的�对路径
@note 需è¦�åœ¨æž„é€ æ—¶æˆ–è€…æ‰‹åŠ¨æŒ‡å®šäº†æ–‡ä»¶å��æ‰�å�¯ä»¥ä½¿ç”¨æ¤å‡½æ•°, å�¦åˆ™è¯·è°ƒç”¨å…¶é‡�载的函数
@sa [readLink](https://doc.qt.io/qt-5/qfile-obsolete.html#readLink-1)
@fn QString Dtk::Core::DCapFile::symLinkTarget() const
@brief 这是一个�载函数
返回符å�·é“¾æŽ¥, 或Windows上的快æ�·æ–¹å¼�指å�‘的文件或目录的ç»�对路径, 如果该对象ä¸�是符å�·é“¾æŽ¥, 则返回一个空å—符串。
@fn bool Dtk::Core::DCapFile::remove()
@brief 如果文件å˜åœ¨åˆ™åˆ 除文件
@note æ¤å¤„çš„å˜åœ¨æŒ‡å½“å‰�ç”±setFileName() æŒ‡å®šçš„æ–‡ä»¶æˆ–è€…æ˜¯åœ¨æž„é€ æ—¶æŒ‡å®šçš„æ–‡ä»¶æ˜¯å�¦å�¯è¯»å�¯å†™
@note 需è¦�åœ¨æž„é€ æ—¶æˆ–è€…æ‰‹åŠ¨æŒ‡å®šäº†æ–‡ä»¶å��æ‰�å�¯ä»¥ä½¿ç”¨æ¤å‡½æ•°, å�¦åˆ™è¯·è°ƒç”¨å…¶é‡�载的函数
@note 文件需è¦�åœ¨åˆ é™¤å‰�被关é—
@fn static bool Dtk::Core::DCapFile::remove(const QString &fileName)
@brief 如果文件å˜åœ¨åˆ™åˆ 除文件
@param[in] fileName 文件�
@note æ¤å¤„çš„å˜åœ¨æŒ‡çš„æ˜¯æ¤å‡½æ•°çš„ä¼ å…¥çš„æ–‡ä»¶å��指å�‘的文件是å�¦å�¯è¯»å�¯å†™
@note 文件需è¦�åœ¨åˆ é™¤å‰�被关é—
@sa DCapFile::remove()
@fn bool Dtk::Core::DCapFile::moveToTrash()
@brief 如果文件å˜åœ¨åˆ™å°†æ–‡ä»¶ç§»åŠ¨è‡³é»˜è®¤å›žæ”¶ç«™(垃圾桶)
@note æ¤å¤„çš„å˜åœ¨æŒ‡å½“å‰�ç”±setFileName() æŒ‡å®šçš„æ–‡ä»¶æˆ–è€…æ˜¯åœ¨æž„é€ æ—¶æŒ‡å®šçš„æ–‡ä»¶æ˜¯å�¦å�¯è¯»å�¯å†™
@note 需è¦�åœ¨æž„é€ æ—¶æˆ–è€…æ‰‹åŠ¨æŒ‡å®šäº†æ–‡ä»¶å��æ‰�å�¯ä»¥ä½¿ç”¨æ¤å‡½æ•°, å�¦åˆ™è¯·è°ƒç”¨å…¶é‡�载的函数
@note æ¤æ–¹æ³•仅在Qt版本>=5.15.0å�Žå�¯ç”¨
@fn bool Dtk::Core::DCapFile::moveToTrash(const QString &fileName, QString *pathInTrash)
@brief å¦‚æžœä¼ å…¥æ–‡ä»¶å��对应文件å˜åœ¨åˆ™å°†æ–‡ä»¶ç§»åŠ¨è‡³æŒ‡å®šå›žæ”¶ç«™(垃圾桶)
@note æ¤å¤„çš„å˜åœ¨æŒ‡çš„æ˜¯æ¤å‡½æ•°çš„ä¼ å…¥çš„æ–‡ä»¶å��指å�‘的文件是å�¦å�¯è¯»å�¯å†™
@note æ¤æ–¹æ³•仅在Qt版本>=5.15.0å�Žå�¯ç”¨
@param[in] fileName 文件�
@param[in] pathInTrash 回收站路径
@fn bool Dtk::Core::DCapFile::rename(const QString &newName)
@brief 如果文件å��å˜åœ¨åˆ™é‡�命å��文件
@param[in] newName 新文件�
@note 需è¦�åœ¨æž„é€ æ—¶æˆ–è€…æ‰‹åŠ¨æŒ‡å®šäº†æ–‡ä»¶å��æ‰�å�¯ä»¥ä½¿ç”¨æ¤å‡½æ•°, å�¦åˆ™è¯·è°ƒç”¨å…¶é‡�载的函数
@fn static bool Dtk::Core::DCapFile::rename(const QString &oldName, const QString &newName)
@brief 如果文件å��å˜åœ¨åˆ™é‡�命å��文件
@param[in] oldName 旧文件�
@param[in] newName 新文件�
@fn bool Dtk::Core::DCapFile::link(const QString &newName)
@brief 创建一个�为newName的链接
@details 该链接指å�‘当å‰�ç”±`setFileName()`æŒ‡å®šçš„æ–‡ä»¶æˆ–è€…æ˜¯åœ¨æž„é€ æ—¶æŒ‡å®šçš„æ–‡ä»¶ã€‚é“¾æŽ¥æ˜¯ä»€ä¹ˆå�–决于底层文件系统(æ— è®ºæ˜¯Windows上的快æ�·æ–¹å¼�还是Unix上的符å�·é“¾æŽ¥)。如果æˆ�功, 则返回ture;å�¦åˆ™è¿”回false
@note 如果是windows系统的newName�数必须有`.lnk`�法�缀��用
@param[in] newName 新文件�
@fn static bool Dtk::Core::DCapFile::link(const QString &oldname, const QString &newName)
@brief 该函数是é‡�è½½`DCapFile::link()`区别是需è¦�æ‰‹åŠ¨ä¼ å…¥åŽŸå§‹æ–‡ä»¶å��
@sa DCapFile::link(const QString &newName)
@fn bool Dtk::Core::DCapFile::copy(const QString &newName)
@brief `setFileName()`æŒ‡å®šçš„æ–‡ä»¶æˆ–è€…æ˜¯åœ¨æž„é€ æ—¶æŒ‡å®šçš„æ–‡ä»¶å¤�制一份, å��为newName
如果�功, 则返回ture;�则返回false
@note ç¡®ä¿�文件在å¤�制之å‰�是关é—çš„
@note 如果�制的文件是一个符�链接(symlink), 它所指的文件被�制, 而�是链接本身。除了��
会被�制外, 其他的文件元数�都�会被�制。
@note 如果一个å��称为 newName 的文件已ç»�å˜åœ¨, `copy()`将会返回true但是并ä¸�会覆盖它
@fn static bool Dtk::Core::DCapFile::copy(const QString &fileName, const QString &newName)
@brief 该函数是é‡�è½½`DCapFile::copy(const QString &newName)`区别是需è¦�æ‰‹åŠ¨ä¼ å…¥åŽŸå§‹æ–‡ä»¶å��
@sa DCapFile::copy(const QString &newName)
@fn bool Dtk::Core::DCapFile::open(OpenMode flags)
@brief 使用OpenMode模�打开文件, 如果�功返回true;�则返回false
@details 模�如下:
NotOpen = 0x0000,
ReadOnly = 0x0001,
WriteOnly = 0x0002,
ReadWrite = ReadOnly | WriteOnly,
Append = 0x0004,
Truncate = 0x0008,
Text = 0x0010,
Unbuffered = 0x0020,
NewOnly = 0x0040,
ExistingOnly = 0x0080
@note 在å�ªå†™æˆ–读写模å¼�下, 如果相关文件ä¸�å˜åœ¨, 该函数将在打开文件之å‰�å°�试创建一个新文件
@fn bool Dtk::Core::DCapFile::resize(qint64 sz)
@brief 设置文件大å°�sz(以å—节为å�•ä½�)。如果调整大å°�æˆ�功, 则返回true;å�¦åˆ™ä¸ºfalse。如果sz大于当å‰�文件, 则新å—节将设置为 0;如果sz较å°�, 则文件将被简å�•地截æ–
@note 如果文件ä¸�å˜åœ¨, æ¤å‡½æ•°å�¯èƒ½ä¼šæ— 效
@fn static bool Dtk::Core::DCapFile::resize(const QString &filename, qint64 sz)
@brief 该函数是�载`DCapFile::resize(qint64 sz)`区别是手动指定文件�
@sa DCapFile::resize(qint64 sz)
*/
/*!
@class Dtk::Core::DCapFile
@brief 对于文件夹�作的�装
@fn Dtk::Core::DCapDir::DCapDir(const DCapDir &)
@brief æ‹·è´�æž„é€ å‡½æ•° æž„é€ ä¸€ä¸ªDCapDir对象, 该对象是目录目录的DCapDir对象的副本
@fn Dtk::Core::DCapDir::DCapDir(const QString &path = QString())
@brief æž„é€ æŒ‡å�‘给定目录路径的DCapDir。如果 path 为空, 则使用程åº�的工作目录`.`
@fn Dtk::Core::DCapDir::DCapDir(const QString &path,
const QString &nameFilter, SortFlags sort = SortFlags(Name | IgnoreCase),
Filters filter = AllEntries)
@brief æž„é€ å…·æœ‰è·¯å¾„è·¯å¾„çš„DCapDir对象
@details 该 DCapDir 使用nameFilter按å��ç§°ç›é€‰å…¶æ�¡ç›®, 并使用ç›é€‰å™¨ 按属性ç›é€‰å…¶æ�¡ç›®ã€‚它还使用排åº�对å��称进行排åº�。
默认å��ç§°ç›é€‰å™¨æ˜¯ä¸€ä¸ªç©ºå—符串, 它ä¸�排除任何内容;默认ç›é€‰å™¨æ˜¯â€œæ‰€æœ‰æ�¡ç›®â€�, 这也æ„�味ç�€ä¸�排除任何内容。默认排åº�为“å��ç§°|忽略大å°�写, å�³æŒ‰å��称排åº�, ä¸�区分大å°�写。
如果path为空å—符串, DCapDir 将使用 “.â€�(当å‰�目录)
如果nameFilter为空å—符串, DCapDir 将使用å��ç§°ç›é€‰å™¨â€œ*â€�(所有文件)
@note 路径ä¸�需è¦�å˜åœ¨
@fn void Dtk::Core::DCapDir::setPath(const QString &path)
@brief 将目录的路径设置为path。该路径被清除了多余的"."�"... "和多个分隔符。没有检查这个路径的
目录是å�¦çœŸçš„å˜åœ¨ï¼›
路径å�¯ä»¥æ˜¯ç»�对路径也å�¯ä»¥æ˜¯ç›¸å¯¹è·¯å¾„, ç»�对路径以目录分隔符"/"开始(在Windows下å�¯ä»¥é€‰æ‹©åœ¨å‰�é�¢åŠ ä¸€ä¸ªé©±åŠ¨å™¨å�·, 例如: C:\)
相对路径以目录å��开始, 并指定一个相对于当å‰�目录的路径。一个ç»�对路径的例å�是å—符串"/etc/apt", 一个相对路径例å�是 "src/1/"
@fn bool Dtk::Core::DCapDir::cd(const QString &dirName)
@brief 将DCapDir的目录更改为dirName。
如果新目录å˜åœ¨, 则返回true;å�¦åˆ™è¿”回false
请注æ„�, 如果新目录ä¸�å˜åœ¨, 则ä¸�执行逻辑`cd()`æ“�作
@fn QStringList Dtk::Core::DCapDir::entryList(Filters filters = NoFilter, SortFlags sort = NoSort) const
@brief è¿”å›žç›®å½•ä¸æ‰€æœ‰æ–‡ä»¶å’Œç›®å½•çš„å��称列表
@details 这些å��ç§°æ ¹æ�®ä»¥å‰�使用`setNameFilters()` å’Œ`setFilter()`
设置的å��称和属性ç›é€‰å™¨æŽ’åº�, å¹¶æ ¹æ�®ä½¿ç”¨`setSorting() è®¾ç½®çš„æ ‡å¿—è¿›è¡ŒæŽ’åº�。
�以使用过滤器和排��数覆盖属性过滤器和排�规范。
如果目录ä¸�å�¯è¯»ã€�ä¸�å˜åœ¨æˆ–与规范ä¸�匹é…�, 则返回空列表。
@fn QString Dtk::Core::DCapDir::entryList(const QStringList &nameFilters, Filters filters = NoFilter,
SortFlags sort = NoSort)
@brief é‡�载函数, è¿”å›žç›®å½•ä¸æ‰€æœ‰æ–‡ä»¶å’Œç›®å½•çš„å��称列表
@sa entryList(Filters filters = NoFilter, SortFlags sort = NoSort)
@fn bool Dtk::Core::DCapDir::mkdir(const QString &dirName) const
@brief 创建文件夹
@fn bool Dtk::Core::DCapDir::rmdir(const QString &dirName) const
@brief 移除文件夹
@fn bool Dtk::Core::DCapDir::mkpath(const QString &dirPath)
@brief 创建目录
@fn bool Dtk::Core::DCapDir::rmpath(const QString &dirPath)
@brief 移除目录
@fn bool Dtk::Core::DCapDir::exists() const
@brief 文件夹是å�¦å˜åœ¨(如果找到å�Œå��文件, æ¤å‡½æ•°å°†è¿”回 false)
@fn bool Dtk::Core::DCapDir::exists(const QString &name) const
@brief 指定文件夹是å�¦å˜åœ¨(如果找到å�Œå��文件, æ¤å‡½æ•°å°†è¿”回 false)
@fn bool Dtk::Core::DCapDir::remove(const QString &fileName)
@brief 移除文件夹
@fn bool Dtk::Core::DCapDir::rename(const QString &oldName, const QString &newName)
@brief �命�文件夹
@param[in] oldName 旧文件夹�
@param[in] newName 新文件夹�
*/
dtkcore-6.7.46/docs/filesystem/dfilesystemwatcher.zh_CN.dox 0000664 0000000 0000000 00000011115 15226157704 0024017 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dfilesystemwatcher.h
@class DFileSystemWatcher
@brief 监�文件系统�化的类
@details
DFileSystemWatcher监视文件系统对文件的更改和目录,通过观察指定的path列表。
调用addPath()æ�¥ç›‘视特定的文件或目录。多个pathå�¯ä»¥ä½¿ç”¨addPaths()å‡½æ•°æ·»åŠ ã€‚çŽ°æœ‰pathå�¯ä»¥ä½¿ç”¨removePath()å’ŒremovePaths()å‡½æ•°åˆ é™¤ã€‚
DFileSystemWatcheræ£€æŸ¥æ·»åŠ åˆ°å…¶ä¸çš„æ¯�个pathã€‚å…·æœ‰ä»¥ä¸‹ç‰¹æ€§çš„æ–‡ä»¶æ·»åŠ åˆ°DFileSystemWatcherå�¯ä»¥ä½¿ç”¨å‡½æ•°Files()和使用函数directories()创建的目录。
fileChanged()ä¿¡å�·åœ¨æ–‡ä»¶è¢«ä¿®æ”¹æ—¶å�‘出,é‡�命å��或从ç£�盘ä¸åˆ 除。类似地,directoryChanged()在目录或其内容被修改或移除。
请注æ„�,DFileSystemWatcherå�ªå�œæ¢ç›‘视一次文件,它们被é‡�命å��或从ç£�盘和目录ä¸åˆ 除一次,它们已从ç£�盘ä¸ç§»é™¤ã€‚
@note 在è¿�行ä¸�支æŒ�inotifyçš„Linuxå†…æ ¸çš„ç³»ç»Ÿä¸Šï¼ŒåŒ…å�«è¢«ç›‘视路径的文件系统ä¸�能被å�¸è½½ã€‚
默认情况下,Windows CE�支�目录监控,这�决于安装的文件系统驱动程�。
监视文件和目录的行为修改�作会消耗系统资�。这�味�有一个�制进程�以使用的文件和目录的数��时监控。
@fn DFileSystemWatcher::DFileSystemWatcher(QObject *parent)
@brief æž„é€ å‡½æ•°ï¼Œæž„é€ ä¸€ä¸ªæ–°çš„æ–‡ä»¶ç³»ç»Ÿç›‘è§†å™¨å¯¹è±¡ã€‚
@fn DFileSystemWatcher::DFileSystemWatcher(const QStringList &paths, QObject *parent = Q_NULLPTR)
@brief æž„é€ å‡½æ•°ï¼Œæž„é€ ä¸€ä¸ªæ–°çš„æ–‡ä»¶ç³»ç»Ÿç›‘è§†å™¨å¯¹è±¡ï¼Œç›‘æŽ§æŒ‡å®šè·¯å¾„åˆ—è¡¨ã€‚
@param paths �监�的路径列表
@fn bool DFileSystemWatcher::addPath(const QString &file)
@brief æ·»åŠ è¦�监å�¬çš„路径
@details 如果pathå˜åœ¨ï¼Œåˆ™å°†pathæ·»åŠ åˆ°æ–‡ä»¶ç³»ç»Ÿç›‘è§†å™¨ã€‚å¦‚æžœpathä¸�å˜åœ¨æˆ–å·²ç»�å˜åœ¨ï¼Œåˆ™ä¸�æ·»åŠ å®ƒç”±æ–‡ä»¶ç³»ç»Ÿç›‘è§†ç¨‹åº�监视。
如果path指定了一个目录,则调用directoryChanged()ä¿¡å�·å°†åœ¨path被修改或从ç£�盘ä¸åˆ 除时å�‘出。å�¦åˆ™ï¼Œå½“path被修改ã€�é‡�命å��æˆ–åˆ é™¤ã€‚ï¼Œå°±ä¼šè§¦å�‘fileChanged()ä¿¡å�·
如果监视�功,则返回true。
ç›‘è§†æ•…éšœçš„åŽŸå› é€šå¸¸ä¸Žç³»ç»Ÿæœ‰å…³ï¼Œä½†æ˜¯å�¯èƒ½åŒ…括资æº�ä¸�å˜åœ¨ã€�访问失败或总监视数é‡�é™�制,如果平å�°æœ‰ä¸€ä¸ªã€‚
@note �能有一个系统�赖的数��制�以�时监控的文件和目录。
如果达到了这个�制,path将�会被监控,返回false。
@param[in] file �监�的路径
@sa DFileSystemWatcher::addPaths()
@sa DFileSystemWatcher::removePath()
@fn QStringList DFileSystemWatcher::addPaths(const QStringList &files)
@brief æ·»åŠ è¦�监å�¬çš„路径列表
@details å°†pathä¸çš„æ¯�个pathæ·»åŠ åˆ°æ–‡ä»¶ç³»ç»Ÿç›‘è§†ç¨‹åº�。path如果ä¸�å˜åœ¨ï¼Œæˆ–者已ç»�å˜åœ¨ï¼Œåˆ™ä¸�æ·»åŠ ç”±æ–‡ä»¶ç³»ç»Ÿç›‘è§†ç¨‹åº�监视。
如果path指定了一个目录,则调用directoryChanged()ä¿¡å�·å°†åœ¨path被修改或从ç£�盘ä¸åˆ 除时触å�‘。å�¦åˆ™ï¼Œå½“path被修改ã€�é‡�命å��æˆ–åˆ é™¤ã€‚ï¼Œå°±ä¼šè§¦å�‘fileChanged()ä¿¡å�·
è¿”å›žå€¼æ˜¯ä¸€ä¸ªæ— æ³•è¢«ç›‘è§†çš„è·¯å¾„åˆ—è¡¨ã€‚
ç›‘è§†æ•…éšœçš„åŽŸå› é€šå¸¸ä¸Žç³»ç»Ÿæœ‰å…³ï¼Œä½†æ˜¯å�¯èƒ½åŒ…括资æº�ä¸�å˜åœ¨ã€�访问失败或总监视数é‡�é™�制,如果平å�°æœ‰ä¸€ä¸ªã€‚
@note �能有一个系统�赖的数��制�以�时监控的文件和目录。
如果达到了这个é™�制,多余的pathå°±ä¸�ä¼šè¾¾åˆ°ï¼Œå®ƒä»¬å°†è¢«æ·»åŠ åˆ°è¿”å›žçš„QStringListä¸ã€‚
@param[in] files �监�的路径列表
@sa DFileSystemWatcher::addPath()
@sa DFileSystemWatcher::removePaths()
@fn bool DFileSystemWatcher::removePath(const QString &file)
@brief 移除监�的路径
@details 从文件系统监视程åº�ä¸åˆ 除指定的path。
如果监视æˆ�åŠŸåˆ é™¤ï¼Œåˆ™è¿”å›žtrue。
ç›‘è§†åˆ é™¤å¤±è´¥çš„åŽŸå› é€šå¸¸ä¸Žç³»ç»Ÿæœ‰å…³ï¼Œä½†å�¯èƒ½æ˜¯å› 为pathå·²ç»�è¢«åˆ é™¤äº†ã€‚
@sa DFileSystemWatcher::removePaths()
@sa DFileSystemWatcher::addPath()
@fn QStringList DFileSystemWatcher::removePaths(const QStringList &files)
@brief 移除监�的路径列表
@details 从文件系统监视程åº�ä¸åˆ 除指定的path。
è¿”å›žå€¼æ˜¯ä¸€ä¸ªæ— æ³•è¢«ç›‘è§†çš„è·¯å¾„åˆ—è¡¨ã€‚
ç›‘è§†åˆ é™¤å¤±è´¥çš„åŽŸå› é€šå¸¸ä¸Žç³»ç»Ÿæœ‰å…³ï¼Œä½†å�¯èƒ½æ˜¯å› 为pathå·²ç»�è¢«åˆ é™¤äº†ã€‚
@sa DFileSystemWatcher::removePath()
@sa DFileSystemWatcher::addPaths()
@fn QStringList DFileSystemWatcher::directories() const
@brief 获�监�的目录列表
@sa DFileSystemWatcher::files()
@fn QStringList DFileSystemWatcher::files() const
@brief 获�监�的文件列表
@sa DFileSystemWatcher::directories()
*/
dtkcore-6.7.46/docs/filesystem/dfilewarcher.zh_CN.dox 0000664 0000000 0000000 00000003262 15226157704 0022554 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dfilewatcher.h
@class DFileWatcher
@brief DFileWatcher 类�供了对 DBaseFileWatcher 接�的实现,�供监视文件和目录的�动
@fn DFileWatcher::DFileWatcher(const QString &filepath, QObject *parent = 0)
@brief æž„é€ å‡½æ•°
@param filepath �监视的文件或目录的路径
@param parent 父对象
@fn void DFileWatcher::onFileDeleted(const QString &path, const QString &name)
@brief å½“æ–‡ä»¶è¢«åˆ é™¤æ—¶è§¦å�‘的信å�·
@param[in] path 文件所在的目录路径
@param[in] name 文件�
@fn void DFileWatcher::onFileAttributeChanged(const QString &path, const QString &name)
@brief 当文件属性�生�化时触�的信�
@param[in] path 文件所在的目录路径
@param[in] name 文件�
@fn void DFileWatcher::onFileMoved(const QString &fromPath, const QString &fromName, const QString &toPath, const QString &toName)
@brief 当文件被移动时触�的信�
@param[in] fromPath 文件原�所在的目录路径
@param[in] fromName 文件原�的文件�
@param[in] toPath 文件现在所在的目录路径
@param[in] toName 文件现在的文件�
@fn void DFileWatcher::onFileModified(const QString &path, const QString &name)
@brief 当文件被修改时触�的信�
@param[in] path 文件所在的目录路径
@param[in] name 文件�
@fn void DFileWatcher::onFileCreated(const QString &path, const QString &name)
@brief 当文件被创建时触�的信�
@param[in] path 文件所在的目录路径
@param[in] name 文件�
@fn void DFileWatcher::onFileClosed(const QString &path, const QString &name)
@brief å½“æ–‡ä»¶è¢«å…³é—æ—¶è§¦å�‘的信å�·
@param[in] path 文件所在的目录路径
*/
dtkcore-6.7.46/docs/filesystem/dfilewatchermanager.zh_CN.dox 0000664 0000000 0000000 00000006701 15226157704 0024112 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dfilewatchermanager.h
@class DFileWatcherManager
@brief DFileWatcherManager 类�以帮助管�一系列 DFileWatcher 文件监视器,并在文件�动时��信�通知.
@details
示例代ç �:
```cpp
#include "dfilewatchermanager"
#include
#include
#include
#include
DCORE_USE_NAMESPACE
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
DFileWatcherManager manager;
QTemporaryFile tmpfile1; // 创建临时文件1
tmpfile1.open();
QFile file1( tmpfile1.fileName());
QTemporaryFile tmpfile2; // 创建临时文件2
tmpfile2.open();
QFile file2( tmpfile2.fileName());
manager.add(tmpfile1.fileName());// 监控临时文件1
manager.add(tmpfile2.fileName());// 监控临时文件2
QObject::connect(&manager, &Dtk::Core::DFileWatcherManager::fileModified, &app, [=](const QString value) {
qDebug() << "文件�生�动:" << value;
}); // 文件�生�动时打�文件路径
QObject::connect(&manager, &Dtk::Core::DFileWatcherManager::fileDeleted, &app, [=](const QString value) {
qDebug() << "æ–‡ä»¶è¢«åˆ é™¤:" << value;
});
file1.open(QIODevice::WriteOnly|QIODevice::Text);// 修改临时文件1
file1.write("test");
file1.close();
file2.open(QIODevice::WriteOnly|QIODevice::Text);// 修改临时文件2
file2.write("test");
file2.close();
qDebug() << manager.watchedFiles();// 打�所有被监控的文件路径
qDebug() << "---------------------------";
app.processEvents();// 处�事件
manager.removeAll();// 移除所有的监控
qDebug() << manager.watchedFiles();// 打�所有被监控的文件路径
return app.exec();
}
```
上é�¢ä»£ç �演示了如何使用 DFileWatcherManager ç±»æ�¥ç›‘控文件å�˜åŠ¨å’Œæ¸…é™¤æ–‡ä»¶å�˜åŠ¨çš„ç›‘æŽ§.
具体å�¯ä»¥å�‚ç…§æº�ç �ä¸çš„example文件夹ä¸çš„æ–‡ä»¶å�˜åŠ¨ç›‘æŽ§ä¾‹å�.
@fn DFileWatcher* DFileWatcherManager::add(const QString &filePath)
@brief 为路径`filePath`创建 DFileWatcher å¹¶å°†å…¶æ·»åŠ åˆ° DFileWatcherManager ä¸.
@return è¢«åˆ›å»ºå¹¶æ·»åŠ åˆ° DFileWatcherManager çš„ DFileWatcher
@fn void DFileWatcherManager::remove(const QString &filePath)
@brief 从 DFileWatcherManager ä¸ç§»é™¤è·¯å¾„`filePath`对应的 DFileWatcher.
@fn void DFileWatcherManager::removeAll()
@brief 从 DFileWatcherManager ä¸ç§»é™¤æ‰€æœ‰çš„ DFileWatcher.
@fn void DFileWatcherManager::watchedFiles()
@brief 获å�– DFileWatcherManager 䏿‰€æœ‰çš„ DFileWatcher.
@var void DFileWatcherManager::fileDeleted(const QString &filePath)
@brief 当路径`filePath`å¯¹åº”çš„æ–‡ä»¶è¢«åˆ é™¤æ—¶å�‘é€�æ¤ä¿¡å�·.
@var void DFileWatcherManager::fileAttributeChanged(const QString &filePath)
@brief 当路径`filePath`对应的文件属性å�‘生å�˜åŒ–æ—¶å�‘é€�æ¤ä¿¡å�·.
@var void DFileWatcherManager::fileMoved(const QString &fromFilePath, const QString &toFilePath)
@brief 当路径`fromFilePath`对应的文件被移动到路径`toFilePath`æ—¶å�‘é€�æ¤ä¿¡å�·.
@var void DFileWatcherManager::fileClosed(const QString &filePath)
@brief 当路径`filePath`å¯¹åº”çš„æ–‡ä»¶è¢«å…³é—æ—¶å�‘é€�æ¤ä¿¡å�·.
@var void DFileWatcherManager::fileModified(const QString &filePath)
@brief 当路径`filePath`对应的文件被修改时å�‘é€�æ¤ä¿¡å�·.
@var void DFileWatcherManager::subfileCreated(const QString &filePath)
@brief 当路径`filePath`å¯¹åº”çš„æ–‡ä»¶å¤¹ä¸æœ‰æ–°çš„å�文件被创建时å�‘é€�æ¤ä¿¡å�·.
*/
dtkcore-6.7.46/docs/filesystem/dstandardpaths.zh_CN.dox 0000664 0000000 0000000 00000005121 15226157704 0023115 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dstandardpaths.h
@class DStandardPaths
@brief DStandardPaths ç±»æ��è¿°äº†ä¸€äº›æ ‡å‡†çš„æ–‡ä»¶è·¯å¾„ï¼ŒåŒ…æ‹¬XDG文件路径,locateç‰
@fn static QString DStandardPaths::writableLocation(QStandardPaths::StandardLocation type)
@brief DStandardPathsæ��供兼容Snap/Dtkæ ‡å‡†çš„è·¯å¾„æ¨¡å¼�。DStandardPaths实现了Qtçš„QStandardPaths主è¦�接å�£ã€‚æ¤å¤„返回å�¯å†™è·¯å¾„
@fn static QStringList DStandardPaths::standardLocations (QStandardPaths::StandardLocation type)
@brief DStandardPathsæ��供兼容Snap/Dtkæ ‡å‡†çš„è·¯å¾„æ¨¡å¼�。DStandardPaths实现了Qtçš„QStandardPaths主è¦�接å�£ã€‚æ¤å¤„返回所有Standardpath
@fn static QString DStandardPaths::locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options = QStandardPaths::LocateFile)
@brief 在 type çš„æ ‡å‡†ä½�置查找å��为 fileName çš„æ–‡ä»¶æˆ–ç›®å½•ã€‚é€‰é¡¹æ ‡å¿—å…�许您指定是å�¦æŸ¥æ‰¾æ–‡ä»¶æˆ–ç›®å½•ã€‚é»˜è®¤æƒ…å†µä¸‹ï¼Œæ¤æ ‡å¿—设置为 LocateFile。返回找到的第一个文件或目录的ç»�对路径,å�¦åˆ™è¿”回空å—符串。
@fn static QStringList DStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options = QStandardPaths::LocateFile)
@brief åœ¨ç±»åž‹çš„æ ‡å‡†ä½�ç½®ä¸æŒ‰å��ç§° fileName æŸ¥æ‰¾æ‰€æœ‰æ–‡ä»¶æˆ–ç›®å½•ã€‚é€‰é¡¹æ ‡å¿—å…�许您指定是å�¦æŸ¥æ‰¾æ–‡ä»¶æˆ–ç›®å½•ã€‚é»˜è®¤æƒ…å†µä¸‹ï¼Œæ¤æ ‡å¿—设置为 LocateFile。返回找到的所有文件的列表。
@fn static QString DStandardPaths::findExecutable(const QString &executableName, const QStringList &paths = QStringList())
@brief �QStandardPaths::findExecutable, 查找�执行文件
@fn static void DStandardPaths::setMode(DStandardPaths::Mode mode)
@brief �QStandardPaths::setTestModeEnabled, 设置是�是测试模�
@fn static QString DStandardPaths::homePath()
@brief 返回家目录
@fn static QString DStandardPaths::homePath(const uint uid)
@brief 用uid返回家目录
@fn static QString DStandardPaths::path(DStandardPaths::XDG type)
@brief 返回对应的xdg目录
@fn static QString DStandardPaths::path(DStandardPaths::DSG type)
@brief 返回对应Dsg目录
@fn static QStringList DStandardPaths::paths(DStandardPaths::DSG type)
@brief 返回所有DSG下所有目录
@fn static QString DStandardPaths::filePath(DStandardPaths::XDG type, QString fileName)
@brief 用xdg和文件�称拼接,返回文件�对路径
@fn static QString DStandardPaths::filePath(DStandardPaths::DSG type, QString fileName)
@brief 用dsg和文件�称拼接,返回文件�对路径
*/
dtkcore-6.7.46/docs/filesystem/dtrashmanager.zh_CN.dox 0000664 0000000 0000000 00000001054 15226157704 0022732 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dtrashmanager.h
@class DTrashManager
@brief dtk垃圾管�器�供管�文件回收站的功能。
@details �常简�的一个类
@fn ststic DTrashManager *DTrashManager::instance()
@brief 获�DTrashManager的实例
@fn bool DTrashManager::trashIsEmpty() const
@brief 判æ–回收站是å�¦ä¸ºç©º
@fn bool DTrashManager::cleanTrash()
@brief 清空回收站
@fn bool DTrashManager::moveToTrash(const QString &filePath, bool followSymlink = false)
@brief 将文件移动到回收站
*/
dtkcore-6.7.46/docs/filesystem/index.zh_CN.md 0000664 0000000 0000000 00000000300 15226157704 0021020 0 ustar 00root root 0000000 0000000 @page dfilesystem dfilesystem--dtk文件系统�作的�装
# Dlog:dtk日志组件
TODOï¼šæ·»åŠ filesystem组件使用说明
@defgroup dfilesystem
@brief dtk文件系统�作的�装
dtkcore-6.7.46/docs/global/ 0000775 0000000 0000000 00000000000 15226157704 0015452 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/global/dconfig.zh_CN.dox 0000664 0000000 0000000 00000034510 15226157704 0020602 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/global/dconfig.h
@ingroup dglobal
@class Dtk::Core::DConfigBackend dconfig.h
@brief �置�端的抽象接�。
@details 所有DConfig使用的é…�ç½®å�Žç«¯éƒ½ç»§æ‰¿æ¤ç±»,用户å�¯ä»¥ç»§æ‰¿æ¤ç±»å®žçŽ°è‡ªå·±çš„é…�ç½®å�Žç«¯ã€‚
@sa FileBackend
@sa DBusBackend
@sa QSettingBackend
@fn Dtk::Core::DConfigBackend::~DConfigBackend()
@brief DConfigBackend�构函数
@sa FileBackend::~FileBackend()
@sa DBusBackend::~DBusBackend()
@sa QSettingBackend::~QSettingBackend()
@fn bool Dtk::Core::DConfigBackend::isValid() const = 0
@brief åˆ¤æ–æ¤å�Žç«¯æ˜¯å�¦å�¯ç”¨
@sa DConfig::isValid()
@sa FileBackend::isValid()
@sa DBusBackend::isValid()
@sa QSettingBackend::isValid()
@fn bool Dtk::Core::DConfigBackend::load(const QString &) = 0
@brief �始化�端
@details appId 管�的�置信�key值,默认为应用程��称。
@sa FileBackend::load()
@sa DBusBackend::load()
@sa QSettingBackend::load()
@fn QStringList Dtk::Core::DConfigBackend::keyList() = 0
@brief 获得所有�用的�置项�称
@sa DConfig::keyList()
@sa FileBackend::keyList()
@sa DBusBackend::keyList()
@sa QSettingBackend::keyList()
@fn QVariant Dtk::Core::DConfigBackend::value(const QString &key, const QVariant &fallback = QVariant()) const = 0
@brief æ ¹æ�®é…�置项å��称获得对应值
@param[in] key �置项�称
@param[in] fallback 没有获�到�置项值��供的默认值
@sa DConfig::value()
@sa FileBackend::value()
@sa DBusBackend::value()
@sa QSettingBackend::value()
@fn void Dtk::Core::DConfigBackend::setValue(const QString &key, const QVariant &value) = 0
@brief æ ¹æ�®é…�置项å��称设置其值
@param[in] key �置项�称
@param[in] value 需�更新的值
@sa DConfig::setValue()
@sa FileBackend::setValue()
@sa DBusBackend::setValue()
@sa QSettingBackend::setValue()
@fn void Dtk::Core::DConfigBackend::reset(const QString &key)
@brief 设置其é…�置项对应的默认值,æ¤å€¼ä¸ºç»�过override机制覆盖å�Žçš„值,ä¸�一定为æ¤é…�置文件ä¸metaä¸å®šä¹‰çš„值。
@param[in] key �置项�称
@sa DConfig::reset()
@sa FileBackend::reset()
@sa DBusBackend::reset()
@sa QSettingBackend::reset()
@fn bool Dtk::Core::DConfigBackend::isReadOnly(const QString &key)
@brief 检测指定�置项是�为�读
@param[in] key �置项�称
@return 如果�置项为�读返回true,�则返回false
@sa DConfig::isReadOnly()
@sa FileBackend::isReadOnly()
@sa DBusBackend::isReadOnly()
@fn QString Dtk::Core::DConfigBackend::name() const = 0
@brief å�Žç«¯é…�ç½®çš„å”¯ä¸€æ ‡è¯†
@sa FileBackend::name()
@sa DBusBackend::name()
@sa QSettingBackend::name()
@fn bool Dtk::Core::DConfigBackend::isDefaultValue(const QString &key)
@brief 检测指定�置项�称对应的值是�为默认值。
@param[in] key �置项�称
@sa DConfig::isDefaultValue()
@sa FileBackend::isDefaultValue()
@sa DBusBackend::isDefaultValue()
@sa QSettingBackend::isDefaultValue()
@class Dtk::Core::QSettingBackend dconfig.h
@brief QSetting�端,继承自DConfigBackend抽象接�,并实现了虚函数。
@sa DConfigBackend
@fn QSettingBackend Dtk::Core::QSettingBackend::QSettingBackend(DConfigPrivate* o)
@brief QSettingBackendæž„é€ å‡½æ•°
@class Dtk::Core::DConfigPrivate dconfig.h
@brief DConfig的�有实现
@fn DConfigPrivate Dtk::Core::DConfigPrivate::DConfigPrivate()
@brief DConfigPrivateæž„é€ å‡½æ•°
@fn bool Dtk::Core::DConfigPrivate::invalid()
@brief åˆ¤æ–æ¤å�Žç«¯æ˜¯å�¦å�¯ç”¨
@fn DConfigBackend* Dtk::Core::DConfigPrivate::getOrCreateBackend()
@brief 创建一个�置�端
@details 默认使用的é…�ç½®å�Žç«¯ä¼šä¼˜å…ˆæ ¹æ�®çŽ¯å¢ƒå�˜é‡�æ�¥é€‰æ‹©é…�ç½®ä¸å¿ƒçš„D-Bus接å�£è¿˜æ˜¯æ–‡ä»¶é…�ç½®å�Žç«¯æŽ¥å�£ã€‚若没有é…�ç½®æ¤çŽ¯å¢ƒå�˜é‡�,åˆ™æ ¹æ�®æ˜¯å�¦æœ‰é…�ç½®ä¸å¿ƒæ��ä¾›D-Busæœ�务æ�¥é€‰æ‹©é…�ç½®ä¸å¿ƒæœ�务还是文件é…�ç½®å�Žç«¯æŽ¥å�£ã€‚
@fn DConfigBackend* Dtk::Core::DConfigPrivate::createBackendByEnv()
@brief 创建一个�置�端
@details å°�è¯•æ ¹æ�®çŽ¯å¢ƒå�˜é‡�æ�¥é€‰æ‹©é…�ç½®ä¸å¿ƒçš„D-Bus接å�£è¿˜æ˜¯æ–‡ä»¶é…�ç½®å�Žç«¯æŽ¥å�£ã€‚
@var QString Dtk::Core::DConfigPrivate::appId
@brief �置文件所属的应用Id,为空时默认为本应用Id。
@var QString Dtk::Core::DConfigPrivate::name
@brief �置文件�
@var QString Dtk::Core::DConfigPrivate::subpath
@brief é…�置文件对应的å�目录
@var QScopedPointer Dtk::Core::DConfigPrivate::backend
@brief é…�ç½®ç–ç•¥å�Žç«¯
@class Dtk::Core::DConfig dconfig.h
@brief é…�ç½®ç–ç•¥æ��供的接å�£ç±»
@details
## 概述
æ¤æŽ¥å�£è§„范定义了开å�‘库所æ��供的关于é…�置文件读写的相关接å�£ï¼Œå¦‚果应用程åº�所使用的开å�‘库实现了æ¤è§„范,则程åº�应当优先使用开å�‘库æ��供的接å�£ã€‚
项目目录结构如下:
```bash
├── CMakeLists.txt
├── config
│ └── example.json
└── main.cpp
```
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(dconfig-example VERSION 1.0.0 LANGUAGES CXX) # 指定项目å��ç§°, 版本, è¯è¨€ cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++æ ‡å‡†
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++æ ‡å‡†è¦�求,至少为11以上
set(CMAKE_AUTOMOC ON) # 支�qt moc
set(CMAKE_AUTORCC ON) # support qt resource file # 支�qt资�文件
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支� clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本�于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包�当�目录
endif()
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5组件Core
find_package(Dtk REQUIRED COMPONENTS Core) # 寻找Dtk组件Core
add_executable(${PROJECT_NAME} # 生��执行文件
main.cpp
)
target_link_libraries(${PROJECT_NAME} PRIVATE # æ·»åŠ éœ€è¦�链接的共享库
Qt5::Core
dtkcore
)
# dtk_add_config_meta_files函数,部署一些"meta"的�置。
# 函数定义在dtkcore的cmake目录下
# APPID 应用的ID
# FILES 需�部署的文件。
dtk_add_config_meta_files(
APPID ${PROJECT_NAME}
FILES ./config/example.json
)
```
## example.json
```json
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"canExit": {
"value": true,
"serial": 0,
"flags": ["global"],
"name": "I am name",
"name[zh_CN]": "我是å��å—",
"description": "I am description",
"permissions": "readwrite",
"visibility": "private"
},
"key1": {
"value": "125",
"serial": 0,
"flags": ["nooverride"],
"name": "I am name",
"name[zh_CN]": "我是å��å—",
"description": "I am description",
"permissions": "readwrite",
"visibility": "public"
},
"number": {
"value": 1,
"serial": 0,
"flags": ["global"],
"name": "array value type",
"permissions": "readwrite",
"visibility": "public"
},
"array": {
"value": ["value1", "value2"],
"serial": 0,
"flags": ["global"],
"name": "array",
"permissions": "readwrite",
"visibility": "public"
},
"map": {
"value": {"key1": "value1", "key2": "value2"},
"serial": 0,
"flags": ["global"],
"name": "map",
"permissions": "readwrite",
"visibility": "public"
}
}
}
```
## main.cpp
```cpp
#include
#include
#include
DCORE_USE_NAMESPACE
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// æž„é€ DConfig,元数æ�®æ–‡ä»¶å��example,与元数æ�®å®‰è£…目录的/usr/share/dsg/configs/APPIDå��(å�¯æ‰§è¡Œæ–‡ä»¶å��)对应目录/example.json,
DConfig config("example");
// åˆ¤æ–æ˜¯å�¦æœ‰æ•ˆ
if (!config.isValid()) {
qWarning() << QString("DConfigæ— æ•ˆ, name:[%1].").
arg(config.name());
return 0;
}
// 获�所有�置项的key
qDebug() << "所有的所有�置项的key:" << config.keyList();
// 获å�–指定é…�置项的值,é…�置项å�¯ä»¥æ˜¯å—符串,数组,map容器,布尔值,整型,详è§�example.json
qDebug() << "canExit对应的值:" << config.value("canExit").toBool();
QVariantMap map;
for (int i = 0; i < 1; i++) {
QVariantMap nestItem;
for (int j = 0; j < 1; j++) {
nestItem[QString::number(j)] = QString::number(j);
}
map[QString::number(i)] = nestItem;
}
QScopedPointer heapConfig;
heapConfig.reset(new DConfig("example"));
if (!heapConfig->isValid()) {
qWarning() << QString("DConfigæ— æ•ˆ, name:[%1].").
arg(heapConfig->name());
return 0;
}
// 监�值改�的信�
const bool &oldValue = heapConfig->value("canExit").toBool();
QObject::connect(heapConfig.get(), &DConfig::valueChanged, [oldValue,&heapConfig](const QString &key){
qDebug() << "canExit原�的值:" << oldValue << ", canExit新的值:" << heapConfig->value(key).toBool();
});
// �置canExit的值
heapConfig->setValue("canExit", !oldValue);
return a.exec();
}
```
## 从æº�ç �构建
```bash
mkdir build && cd build
# 修改路径å‰�缀为/usr,GNUæ ‡å‡†çš„é»˜è®¤å€¼ä¸º/usr/local
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```
结果如下图

@fn DConfig Dtk::Core::DConfig(const QString &name, const QString &subpath, QObject *parent)
@brief æž„é€ é…�ç½®ç–ç•¥æ��供的对象
@param[in] name �置文件�
@param[in] subpath é…�置文件对应的å�目录
@param[in] parent 父对象
@fn DConfig Dtk::Core::DConfig(DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent)
@brief 使用自定义的é…�ç½®ç–ç•¥å�Žç«¯æž„é€ å¯¹è±¡
@param[in] backend 调用者继承于DConfigBackendçš„é…�ç½®ç–ç•¥å�Žç«¯
@param[in] name �置文件�
@param[in] subpath é…�置文件对应的å�目录
@param[in] parent 父对象
@fn static DConfig* Dtk::Core::DConfig::create(const QString &appId, const QString &name, const QString &subpath, QObject *parent)
@brief æž„é€ é…�ç½®ç–ç•¥æ��供的对象,指定é…�置所属的应用Id,管ç�†æŸ�一特定应用的é…�置。
@param[in] appId �置文件所属的应用Id,为空时默认为本应用Id
@param[in] name �置文件�
@param[in] subpath é…�置文件对应的å�目录
@param[in] parent 父对象
@return æž„é€ çš„é…�ç½®ç–略对象,由调用者释放
@fn static DConfig* Dtk::Core::DConfig::create(DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent)
@brief æž„é€ é…�ç½®ç–ç•¥æ��供的对象,指定é…�置所属的应用Id。
@param[in] backend 调用者继承于DConfigBackendçš„é…�ç½®ç–ç•¥å�Žç«¯
@param[in] appId �置文件所属的应用Id,为空时默认为本应用Id
@param[in] name �置文件�
@param[in] subpath é…�置文件对应的å�目录
@param[in] parent 父对象
@return æž„é€ çš„é…�ç½®ç–略对象,由调用者释放
@fn static DConfig* Dtk::Core::DConfig::createGeneric(const QString &name, const QString &subpath, QObject *parent)
@brief æž„é€ é…�ç½®ç–ç•¥æ��供的对象,用æ�¥ç®¡ç�†ä¸Žåº”ç”¨æ— å…³çš„é…�置。
@param[in] name �置文件�
@param[in] subpath é…�置文件对应的å�目录
@param[in] parent 父对象
@return æž„é€ çš„é…�ç½®ç–略对象,由调用者释放
@note 如果我们管�针对�一特定应用的�置,应该使用 Dtk::Core::DConfig::create(),或 Dtk::Core::DConfig(),�指定所属应用的appId。
@fn static DConfig* Dtk::Core::DConfig::createGeneric(DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent)
@sa Dtk::Core::DConfig::createGeneric()
@fn DConfig Dtk::Core::DConfig(DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent)
@brief 使用自定义的é…�ç½®ç–ç•¥å�Žç«¯æž„é€ å¯¹è±¡
@param[in] backend 调用者继承于DConfigBackendçš„é…�ç½®ç–ç•¥å�Žç«¯
@param[in] appId �置文件所属的应用Id,为空时默认为本应用Id
@param[in] name �置文件�
@param[in] subpath é…�置文件对应的å�目录
@param[in] parent 父对象
@note 调用者å�ªæž„é€ backend,ç”±DConfig释放。
@fn static void DConfig::setAppId(const QString &appId)
@brief 显示指定应用Id,�采用DSGApplication::id()作为应用Id
@param[in] appId �置文件所属的应用Id
@note 需è¦�在QCoreApplicationæž„é€ å‰�设置。
@fn static void DConfig::globalThread()
@brief 一个æœ�务于 DConfig 的公用线程,一般用于 dconfig2cpp 生æˆ�的代ç �,æ¤çº¿ç¨‹åœ¨æž„é€ æ—¶ä¼šè‡ªåŠ¨è°ƒç”¨ QThread::start 以满足 dconfig2cpp 的需求。
@return æ¤çº¿ç¨‹é»˜è®¤ä¸º running 状æ€�
@note 请���构它,它会在应用程�退出时释放
@fn QString Dtk::Core::DConfig::backendName()
@brief é…�ç½®ç–ç•¥å�Žç«¯å��ç§°
@return é…�ç½®ç–ç•¥å�Žç«¯å��ç§°
@note 调用者�能用DConfig访问DConfigBackend对象,所以�返回DConfigBackend对象。
@fn QStringList Dtk::Core::DConfig::keyList()
@brief 获得所有�用的�置项�称
@return �置项�称集�
@fn bool Dtk::Core::DConfig::isValid()
@brief åˆ¤æ–æ¤å�Žç«¯æ˜¯å�¦å�¯ç”¨
@fn bool Dtk::Core::DConfig::isDefaultValue(const QString &key)
@brief 检测指定�置项�称对应的值是�为默认值。
@param[in] key �置项�称
@fn QVariant Dtk::Core::DConfig::value(const QString &key, const QVariant &fallback)
@brief æ ¹æ�®é…�置项å��称获得对应值
@param[in] key �置项�称
@param[in] fallback 没有获�到�置项值��供的默认值
@fn void Dtk::Core::DConfig::setValue(const QString &key, const QVariant &value);
@brief æ ¹æ�®é…�置项å��称设置其值
@param[in] key �置项�称
@param[in] value 需�更新的值
@fn void Dtk::Core::DConfig::reset(const QString &key)
@brief 设置其é…�置项对应的默认值,æ¤å€¼ä¸ºç»�过override机制覆盖å�Žçš„值,ä¸�一定为æ¤é…�置文件ä¸metaä¸å®šä¹‰çš„值
@param[in] key �置项�称
@fn bool Dtk::Core::DConfig::isReadOnly(const QString &key)
@brief 检测指定�置项是�为�读
@param[in] key �置项�称
@return 如果�置项为�读返回true,�则返回false
@fn QString Dtk::Core::DConfig::name()
@brief 返回�置文件�称
@fn QString Dtk::Core::DConfig::subpath()
@brief 返回é…�置文件对应的å�目录
*/
dtkcore-6.7.46/docs/global/dconfigfile.zh_CN.dox 0000664 0000000 0000000 00000041066 15226157704 0021446 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/global/dconfigfile.h
@ingroup dglobal
@class Dtk::Core::DConfigFile dconfigfile.h
@brief 规范�置文件读写的相关接�的�置文件实现
@details
## 概述
规范�置文件读写的相关接�的�置文件实现
项目目录结构如下:
```bash
├── CMakeLists.txt
├── config
│ └── example.json
└── main.cpp
```
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(dconfigfile-example VERSION 1.0.0 LANGUAGES CXX) # 指定项目å��ç§°, 版本, è¯è¨€ cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++æ ‡å‡†
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++æ ‡å‡†è¦�求,至少为11以上
set(CMAKE_AUTOMOC ON) # 支�qt moc
set(CMAKE_AUTORCC ON) # 支�qt资�文件
set(CMAKE_AUTOUIC ON) # 支�qt ui文件(�必须)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支� clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本�于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包�当�目录
endif()
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5组件Core
find_package(Dtk REQUIRED COMPONENTS Core) # 寻找Dtk组件Core
add_executable(${PROJECT_NAME} # 生��执行文件
main.cpp
)
target_link_libraries(${PROJECT_NAME} PRIVATE # æ·»åŠ éœ€è¦�链接的共享库
Qt5::Core
dtkcore
)
# dtk_add_config_meta_files函数,部署一些"meta"的�置。
# 函数定义在dtkcore的cmake目录下
# APPID 应用的ID
# FILES 需�部署的文件。
dtk_add_config_meta_files(
APPID ${PROJECT_NAME}
FILES ./config/example.json
)
```
## example.json
```json
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"canExit": {
"value": true,
"serial": 0,
"flags": ["global"],
"name": "I am name",
"name[zh_CN]": "我是å��å—",
"description": "I am description",
"permissions": "readwrite",
"visibility": "private"
},
"key1": {
"value": "125",
"serial": 0,
"flags": ["nooverride"],
"name": "I am name",
"name[zh_CN]": "我是å��å—",
"description": "I am description",
"permissions": "readwrite",
"visibility": "public"
},
"number": {
"value": 1,
"serial": 0,
"flags": ["global"],
"name": "array value type",
"permissions": "readwrite",
"visibility": "public"
},
"array": {
"value": ["value1", "value2"],
"serial": 0,
"flags": ["global"],
"name": "array",
"permissions": "readwrite",
"visibility": "public"
},
"map": {
"value": {"key1": "value1", "key2": "value2"},
"serial": 0,
"flags": ["nooverride"],
"name": "map",
"permissions": "readwrite",
"visibility": "public"
},
"publicConfig": {
"value": true,
"serial": 0,
"flags": ["user-public"],
"name": "public configure",
"name[zh_CN]": "我是公开的�置",
"description": "I am public configure",
"permissions": "readwrite",
"visibility": "private"
}
}
}
```
## main.cpp
```cpp
#include
#include
#include
#include
DCORE_USE_NAMESPACE
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// æž„é€ DConfigFile,元数æ�®æ–‡ä»¶å��example,与元数æ�®å®‰è£…目录的/usr/share/dsg/configs/APPIDå��(å�¯æ‰§è¡Œæ–‡ä»¶å��)对应目录/example.json,
DConfigFile configFile("dconfigfile-example","example");
// 解��置文件
configFile.load();
// 创建用户缓å˜
QScopedPointer userCache(configFile.createUserCache(getuid()));
// 解��置文件
userCache->load();
// åˆ¤æ–æ˜¯å�¦æœ‰æ•ˆ
if (!configFile.isValid()) {
qWarning() << QString("DConfigæ— æ•ˆ.");
return 0;
}
// meta 返回原型对象, keyList获�所有�置项的key
qDebug() << "所有的所有�置项的key:" << configFile.meta()->keyList();
// 获å�–指定é…�置项的值,é…�置项å�¯ä»¥æ˜¯å—符串,数组,map容器,布尔值,整型,详è§�example.json
qDebug() << "canExit对应的值:" << configFile.value("canExit").toBool();
// é…�置项的å�¯è§�性,其余é…�ç½®é¡¹æ ‡è®°ã€�é…�置项的æ�ƒé™�å�¯æŸ¥çœ‹æ–‡æ¡£
qDebug() << "�置项的��性" << configFile.meta()->visibility("canExit");
QVariantMap map;
map.insert("k1","v1");
map.insert("k2","v2");
// 设置map的值
configFile.setValue("map", map, "dconfigfile-example", userCache.get());
configFile.save();
// root用户è¿�行,save的数æ�®ä¼šä¿�å˜åˆ°/root/.config/dsg/configs-fake-global/dconfigfile-example/example.json
// mapæ•°æ�®å¯¹åº”çš„flagsæ ‡è®°ä¸ºNoOverride,é…�置项å…�许被覆盖,如果flags为global泽忽略用户身份,详è§�文档。
userCache->save();
return a.exec();
}
```
## 从æº�ç �构建
```bash
mkdir build && cd build
# 修改路径å‰�缀为/usr,GNUæ ‡å‡†çš„é»˜è®¤å€¼ä¸º/usr/local
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
sudo make install
sudo ./dconfigfile-example
```
结果如下图


@enum Dtk::Core::DConfigFile::Flag
@brief �置项�称
@var Dtk::Core::DConfigFile::Flag Dtk::Core::DConfigFile::NoOverride
@brief å˜åœ¨æ¤æ ‡è®°æ—¶ï¼Œå°†è¡¨æ˜Žåˆ™æ¤é…�置项ä¸�å�¯è¢«è¦†ç›–(详è§�下述 override 机制)。å��之,ä¸�å˜åœ¨æ¤æ ‡è®°æ—¶è¡¨æ˜Žæ¤é…�置项å…�许被覆盖,对于æ¤ç±»é…�置项,如若其有界é�¢è®¾ç½®å…¥å�£ï¼Œåˆ™å½“æ¤é¡¹ä¸�å�¯å†™æ—¶ï¼Œåº”当éš�è—�或ç¦�用界é�¢çš„设置入å�£.
@var Dtk::Core::DConfigFile::Flag Dtk::Core::DConfigFile::Global
@brief 当读写æ¤ç±»é…�ç½®æ—¶ï¼Œå°†å¿½ç•¥ç”¨æˆ·èº«ä»½ï¼Œæ— è®ºç¨‹åº�使用哪个用户身份执行,读æ“�作都将获å�–到å�Œæ ·çš„æ•°æ�®ï¼Œå†™æ“�作将对所有用户都生效。但是,如果对应的é…�ç½®å˜å‚¨ç›®å½•ä¸�å˜åœ¨æˆ–æ— æ�ƒé™�å†™å…¥ï¼Œåˆ™å¿½ç•¥æ¤æ ‡å¿—
@var Dtk::Core::DConfigFile::Flag Dtk::Core::DConfigFile::UserPublic
@brief 该类�置项�许被其他用户访问
@enum Dtk::Core::DConfigFile::Permissions
@brief �置项的��
@var Dtk::Core::DConfigFile::Permissions Dtk::Core::DConfigFile::ReadOnly
@brief 将�置项覆盖为�读
@var Dtk::Core::DConfigFile::Permissions Dtk::Core::DConfigFile::ReadWrite
@brief 将�置项覆盖为�读�写
@enum Dtk::Core::DConfigFile::Visibility
@brief �置项的��性
@var Dtk::Core::DConfigFile::Visibility Dtk::Core::DConfigFile::Private
@brief ä»…é™�程åº�内部使用,对外ä¸�å�¯è§�。æ¤ç±»é…�置项完全由程åº�自己读写,å�¯éš�æ„�å¢žåˆ æ”¹å†™å…¶å�«ä¹‰ï¼Œæ— 需å�šå…¼å®¹æ€§è€ƒè™‘
@var Dtk::Core::DConfigFile::Visibility Dtk::Core::DConfigFile::Public
@brief 外部程åº�å�¯ä½¿ç”¨ã€‚ æ¤ç±»é…�置项一旦å�‘布,在兼容性版本的å�‡çº§ä¸ï¼Œè¦�ä¿�éšœæ¤é…�置项å�‘下兼容,简而言之,å�ªå…�许在程åº�/库的大版本å�‡çº§æ—¶æ‰�å…�è®¸åˆ é™¤æˆ–ä¿®æ”¹æ¤ç±»é…�置项,当é…�置项的 permissionsã€�visibilityã€�flags ä»»æ„�一个属性被修改则认为æ¤é…�置项被修改,除æ¤ä¹‹å¤–修改 valueã€�nameã€�description 属性时则ä¸�需è¦�考虑兼容性。
@struct Dtk::Core::DConfigFile::Version
@brief 版本信�
@details
æ¤æ–‡ä»¶çš„å†…å®¹æ ¼å¼�的版本。版本å�·ä½¿ç”¨ä¸¤ä½�æ•°å—æ��述,
首ä½�æ•°å—ä¸�å�Œçš„æ��述文件相互之间ä¸�兼容,第二ä½�æ•°å—ä¸�å�Œçš„æ��述文件需满足å�‘下兼容。
读å�–æ¤æ��述文件的程åº�è¦�æ ¹æ�®ç‰ˆæœ¬è¿›è¡Œå†…容分æž�,当é�‡åˆ°ä¸�兼容的版本时,需è¦�ç«‹å�³ç»ˆæ¢è§£æž�ï¼Œå¿½ç•¥æ¤æ–‡ä»¶ï¼Œ
并在程åº�日志ä¸å†™å…¥è¦å‘Šä¿¡æ�¯ï¼Œå¦‚ “1.0â€� å’Œ “2.0â€� 版本之间ä¸�兼容,
如果解æž�程åº�最高å�ªæ”¯æŒ� 1.0 版本,则é�‡åˆ° 2.0 版本的æ��述文件时应该终æ¢è§£æž�,
但是如果é�‡åˆ° 1.1 版本,则å�¯ä»¥ç»§ç»æ‰§è¡Œã€‚
å†™å…¥æ¤æ��述文件时,é�‡åˆ°ä¸�兼容的版本时,需è¦�先清空当å‰�内容å†�写入,æ¯�次写入皆需更新æ¤å—段。
@fn static constexpr DConfigFile::Version Dtk::Core::DConfigFile::supportedVersion()
@brief 支�的版本
@return
@fn Dtk::Core::DConfigFile::DConfigFile(const QString &appId, const QString &name, const QString &subpath = QString())
@brief DConfigFileæž„é€ å‡½æ•°,æž„é€ é…�置文件管ç�†å¯¹è±¡ã€‚
@param[in] appId 应用程åº�å”¯ä¸€æ ‡è¯†
@param[in] name �置文件�
@param[in] subpath å�目录
@fn Dtk::Core::DConfigFile::DConfigFile(const DConfigFile &other);
@brief DConfigFileæž„é€ å‡½æ•°,æž„é€ é…�置文件管ç�†å¯¹è±¡ã€‚
@param[in] appId 应用程åº�å”¯ä¸€æ ‡è¯†
@param[in] name �置文件�
@param[in] subpath å�目录
@fn bool Dtk::Core::DConfigFile::load(const QString &localPrefix = QString())
@brief 解��置文件
@param[in] localPrefix 为目录�缀
@return
@fn bool Dtk::Core::DConfigFile::load(QIODevice *meta, const QList &overrides)
@brief 解��置文件�
@param[in] meta 为原型�
@param[in] overrides 为覆盖机制查找的文件�
@return
@fn bool Dtk::Core::DConfigFile::save(const QString &localPrefix = QString(), QJsonDocument::JsonFormat format = QJsonDocument::Indented, bool sync = false) const
@brief ä¿�å˜ç¼“å˜çš„值到ç£�盘ä¸
@param[in] format ä¿�å˜æ ¼å¼�
@param[in] sync 是�立�刷新
@return
@fn bool Dtk::Core::DConfigFile::isValid() const
@brief 检测�置文件是�有效
@return
@fn QVariant Dtk::Core::DConfigFile::value(const QString &key, DConfigCache *userCache = nullptr) const
@brief DConfigFile::value
@param[in] key �置项�称
@param[in] userCache 用户缓å˜,当key为全局项时, \a userCache ä¸�会被使用
@return
@fn QVariant Dtk::Core::DConfigFile::cacheValue(DConfigCache *userCache, const QString &key) const
@brief DConfigFile::cacheValue 获å�–指定用户缓å˜çš„é…�ç½®é¡¹å€¼ï¼Œè‹¥æ— æ¤é…�置项的用户缓å˜å€¼ï¼Œè¿”å›žæ— æ•ˆå€¼
@param[in] key �置项�称
@param[in] userCache 用户缓å˜,当key为全局é…�置项时, \a userCache ä¸�会被使用
@return
@fn bool Dtk::Core::DConfigFile::setValue(const QString &key, const QVariant &value, const QString &callerAppid, DConfigCache *userCache = nullptr)
@brief 设置缓å˜ä¸çš„值
@param[in] key �置项�称
@param[in] value 需�设置的值
@param[in] uid 设置时的用户id
@param[in] appid 设置时的应用id
@return 为true时表示�新设置了新值,false表示没有设置
@fn DConfigCache* Dtk::Core::DConfigFile::createUserCache(const uint uid)
@brief 创建用户缓å˜
@fn DConfigCache* Dtk::Core::DConfigFile::globalCache() const
@brief 返回全局缓å˜
@return
@fn DConfigMeta* Dtk::Core::DConfigFile::meta()
@brief 返回原型对象
@return
*/
/*!
@class Dtk::Core::DConfigMeta dconfigfile.h
@brief �供�置文件的原型和覆盖机制的访问接�
@fn virtual DConfigFile::Version Dtk::Core::DConfigMeta::version() const = 0
@brief 返回�置版本信�
@return
@fn virtual void Dtk::Core::DConfigMeta::setVersion(quint16 major, quint16 minor) = 0
@brief 设置�置版本信�
@param[in] major 主�本�
@param[in] minor 次版本�
@fn virtual bool Dtk::Core::DConfigMeta::load(const QString &localPrefix = QString()) = 0
@brief 解��置文件
@param[in] localPrefix 为目录�缀
@return
@fn virtual bool Dtk::Core::DConfigMeta::load(QIODevice *meta, const QList &overrides) = 0
@brief 解��置文件�
@param[in] meta 为原型�
@param[in] overrides 为覆盖机制查找的文件�
@return
@fn virtual QStringList Dtk::Core::DConfigMeta::keyList() const = 0
@brief 返回�置内容的所有�置项
@return
@fn virtual DConfigFile::Flags Dtk::Core::DConfigMeta::flags(const QString &key) const = 0
@brief 返回指定�置项的特性
@param[in] key é…�置项å��ç§°, NoOverride为æ¤é…�置项ä¸�å�¯è¢«è¦†ç›–, Global为忽略用户身份
@return
@fn virtual DConfigFile::Permissions Dtk::Core::DConfigMeta::permissions(const QString &key) const = 0
@brief 返回指定�置项的��
@param[in] key �置项�称
@return
@fn virtual DConfigFile::Visibility Dtk::Core::DConfigMeta::visibility(const QString &key) const = 0
@brief 返回指定�置项的��性
@param[in] key �置项�称
@return
@fn virtual int Dtk::Core::DConfigMeta::serial(const QString &key) const = 0
@brief 返回�置项的�调递增值
@param[in] key �置项�称
@return -1ä¸ºæ— æ•ˆå€¼,表明没有é…�ç½®æ¤é¡¹
@fn virtual QString Dtk::Core::DConfigMeta::displayName(const QString &key, const QLocale &locale) = 0
@brief 返回指定�置项的显示�
@param[in] key �置项�称
@param[in] locale 为è¯è¨€ç‰ˆæœ¬
@return
@fn virtual QString Dtk::Core::DConfigMeta::description(const QString &key, const QLocale &locale) = 0
@brief 返回指定�置项的�述信�
@param[in] key �置项�称
@param[in] locale 为è¯è¨€ç‰ˆæœ¬
@return
@fn virtual QString Dtk::Core::DConfigMeta::metaPath(const QString &localPrefix = QString(), bool *useAppId = nullptr) const = 0
@brief 返回�述文件的路径
@param[in] localPrefix 目录的所有需�查找的覆盖机制目录
@param[in] useAppId 是��使用通用目录
@return
@fn virtual QStringList Dtk::Core::DConfigMeta::allOverrideDirs(const bool useAppId, const QString &prefix = QString()) const = 0
@brief 获得�缀为 `prefix` 目录的所有需�查找的覆盖机制目录
@param[in] useAppId 是��使用通用目录
@param[in] prefix 目录的应用或公共库的所有覆盖机制目录
@return
@fn virtual QVariant DConfigMeta::value(const QString &key) const = 0
@brief meta�始值�过覆盖机制覆盖�的原始值
@param[in] key �置项�称
@return
@fn static QStringList genericMetaDirs(const QString &localPrefix = QString())
@brief 获å�–åº”ç”¨æ— å…³é…�ç½®å˜å‚¨çš„目录
@param[in] localPrefix �置的目录�缀
@return è¿”å›žåº”ç”¨æ— å…³é…�ç½®å˜å‚¨çš„目录列表
@fn static QStringList applicationMetaDirs(const QString &localPrefix, const QString &appId)
@brief 获å�–应用é…�ç½®å˜å‚¨çš„目录
@param[in] localPrefix �置的目录�缀
@param[in] appId åº”ç”¨å”¯ä¸€æ ‡è¯†
@return 返回å˜å‚¨åº”用é…�置的目录列表
*/
/*!
@class Dtk::Core::DConfigCache dconfigfile.h
@brief æ��ä¾›é…�置文件的用户和全局è¿�行缓å˜è®¿é—®æŽ¥å�£
@fn virtual bool Dtk::Core::DConfigCache::load(const QString &localPrefix = QString()) = 0
@brief è§£æž�缓å˜é…�置文件
@return
@fn virtual bool Dtk::Core::DConfigCache::load(const QString &localPrefix = QString()) = 0
@brief è§£æž�缓å˜é…�置文件
@return
@fn virtual bool Dtk::Core::DConfigCache::save(const QString &localPrefix = QString(), QJsonDocument::JsonFormat format = QJsonDocument::Indented, bool sync = false) = 0
@brief ä¿�å˜ç¼“å˜çš„值到ç£�盘ä¸
@param[in] localPrefix 为目录�缀
@param[in] format ä¿�å˜æ ¼å¼�
@param[in] sync 是�立�刷新
@return
@fn virtual bool Dtk::Core::DConfigCache::isGlobal() const = 0
@brief 是å�¦æ˜¯å…¨å±€ç¼“å˜
@return
@fn virtual void Dtk::Core::DConfigCache::remove(const QString &key) = 0
@brief åˆ é™¤ç¼“å˜ä¸çš„é…�置项
@param[in] key �置项�称
@return
@fn virtual QStringList Dtk::Core::DConfigCache::keyList() const = 0
@brief 返回�置内容的所有�置项
@return
@fn virtual bool Dtk::Core::DConfigCache::setValue(const QString &key, const QVariant &value, const int serial, const uint uid, const QString &callerAppid) = 0
@brief 设置缓å˜ä¸çš„值
@param[in] key �置项�称
@param[in] value 需�设置的值
@param[in] uid 设置时的用户id
@param[in] callerAppid 设置时的应用id
@return 为true时表示�新设置了新值,false表示没有设置。
@fn virtual QVariant Dtk::Core::DConfigCache::value(const QString &key) const = 0
@brief 获å�–缓å˜ä¸çš„值
@param[in] key �置项�称
@return
@fn virtual int Dtk::Core::DConfigCache::serial(const QString &key) const = 0
@brief 返回�置项的�调递增值
@param[in] key �置项�称
@return -1ä¸ºæ— æ•ˆå€¼,表明没有é…�ç½®æ¤é¡¹
@fn virtual uint Dtk::Core::DConfigCache::uid() const = 0
@brief ç”¨æˆ·æ ‡è¯†,ä¸ºå…¨å±€ç¼“å˜æ—¶,uid为é�žç”¨æˆ·æ ‡è¯†çš„特定值
@return
@fn virtual void setCachePathPrefix(const QString &prefix) = 0
@brief 指定缓å˜ä½�ç½®å‰�缀,缓å˜è®¿é—®æ‰€éœ€çš„æ�ƒé™�å�ŠåŒºåˆ†ä¸�å�Œç¼“å˜çš„ä½�置由调用者考虑,其默认值å�‚考é…�ç½®ç–略规范
@param[in] prefix 缓å˜ä½�置的å‰�ç¼€
*/
dtkcore-6.7.46/docs/global/ddesktopentry.zh_CN.dox 0000664 0000000 0000000 00000041063 15226157704 0022071 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/global/ddesktopentry.h
@ingroup dglobal
@class Dtk::Core::DDesktopEntry ddesktopentry.h
@brief 处�desktop文件的接�
@details
## 概述
DDesktopEntry�供了处�XDG desktop读写的方法的接�,这个Class类似于QSettings。
有关该规范本身的更多详细信�,请�阅:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
项目目录结构在�一目录下
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(example1 VERSION 1.0.0 LANGUAGES CXX) # 指定项目å��ç§°, 版本, è¯è¨€ cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++æ ‡å‡†
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++æ ‡å‡†è¦�求,至少为11以上
set(target example1) # æŒ‡å®šç›®æ ‡å��ç§°
set(CMAKE_AUTOMOC ON) # support qt moc # 支�qt moc
set(CMAKE_AUTORCC ON) # support qt resource file # 支�qt资�文件
set(CMAKE_AUTOUIC ON) # support qt ui file # 支�qt ui文件(�必须)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # support clangd # 支� clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本�于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包�当�目录
endif()
find_package(Qt5 COMPONENTS Core REQUIRED) # 寻找Qt5组件Core
find_package(Dtk COMPONENTS Core REQUIRED) # 寻找Dtk组件Core
add_executable(${target} # 生��执行文件
main.cpp
)
target_link_libraries(${target} PRIVATE # æ·»åŠ éœ€è¦�链接的共享库
Qt5::Core
dtkcore
)
```
## main.cpp
```cpp
#include
#include
#include
#include
DCORE_USE_NAMESPACE // 使用Dtk Core命�空间
const QString fileContent = { QStringLiteral(R"desktop(# A. Example Desktop Entry File
[Desktop Entry]
Version=1.0
Type=Application
Name=Foo Viewer
Name[zh_CN]=�查看器
Comment=The best viewer for Foo objects available!
# Next line have an extra " character
Comment[zh_CN]=最棒的 "� 查看器�
TryExec=fooview
Exec=fooview %F
Icon=fooview
MimeType=image/x-foo;
Actions=Gallery;Create;
[Desktop Action Gallery]
Exec=fooview --gallery
Name=Browse Gallery
[Desktop Action Create]
Exec=fooview --create-new
Name=Create a new Foo!
Icon=fooview-new
)desktop") };
int main(int argc, char *argv[])
{
QFile file("example1.desktop");
// �试打开文件
if(!file.open(QIODevice::WriteOnly | QIODevice::Text)){
qDebug()<<"文件打开失败";
}
const QString fileName = file.fileName();
QTextStream ts(&file);
ts << fileContent;
file.close();
QFile::exists(fileName);
// 打开一个fileName为example1.desktop的文件
QScopedPointer desktopFile(new DDesktopEntry(fileName));
// 获å�–desktop䏿‰€æœ‰ç»„并返回列表,对应"Desktop Entry"ã€�"Desktop Action Gallery"ã€�"Desktop Action Create"三组
QStringList allGroups = desktopFile->allGroups();
qDebug() << QString("Desktop 文件共有%1组").arg(allGroups.count());
// 调用allGroupså‡½æ•°ï¼Œä¼ å…¥true,ä¿�æŒ�读å�–desktop文件时的顺åº�ä¸�å�˜ï¼ŒèŽ·å�–第0组
qDebug() << QString("Desktop 文件第0组为: %1").arg(desktopFile->allGroups(true)[0]);
// 获�key=Name,localeKey=zh_CN的值,�Name[zh_CN]=�查看器
qDebug() << QString("Name[zh_CN]=%1") \
.arg(desktopFile->localizedValue("Name", "zh_CN"));
// 获�key为Nam,,localeKey为empty的值,empty表示没有localeKey,�Name=Foo Viewer
qDebug() << QString("Name=%1") \
.arg(desktopFile->localizedValue("Name", "empty"));
// 获�Desktop Entry组下的所有key,�"Actions", "Comment", "Comment[zh_CN]", "Exec", "Icon", "MimeType", "Name", "Name[zh_CN]", "TryExec", "Type", "Version"
qDebug() << QString("Desktop Entry组下的所有key: ") \
<< desktopFile->keys("Desktop Entry");
// 设置 key 为 Name的值为"Bar Viewer",默认组是"Desktop Entry"
desktopFile->setRawValue("Bar Viewer", "Name");
// 设置 key 为 Name,localeKey为zh_CN的值为霸查看器,默认组是"Desktop Entry"
desktopFile->setLocalizedValue("霸查看器", "zh_CN", "Name");
// 检查 section 䏿˜¯å�¦åŒ… key 为 Semicolon 的值,包å�« key 返回true; å�¦åˆ™è¿”回false,默认组是Desktop Entry
qDebug() << QString("Desktop Entry组是�包key是Semicolon: ") \
<< desktopFile->contains("Semicolon", "Desktop Entry");
// 设置key为Semicolon的值为";grp\\;2;grp3;",默认组是"Desktop Entry"
desktopFile->setRawValue(";grp\\;2;grp3;", "Semicolon");
// 返回给定 section ä¸ä¸Žç»™å®š key å…³è�”çš„å—符串的列表。如果destkopä¸�包å�«ä¸ºè¯¥é”®çš„项,则函数返回一个空å—符串列表。 默认组是Desktop Entry
qDebug() << QString("Desktop Entry组ä¸Semicolon对应值的å—符串列表: ") \
<< desktopFile->stringListValue("Semicolon");
// å†�次检查 section 䏿˜¯å�¦åŒ… key 为 Semicolon çš„å€¼ï¼Œæ¤æ—¶ä¸ºtrue
qDebug() << QString("Desktop Entry组是�包key是Semicolon: ") \
<< desktopFile->contains("Semicolon", "Desktop Entry");
// åˆ é™¤desktopä¸ section ä¸ key 对应的值,默认组是"Desktop Entry"
desktopFile->removeEntry("Semicolon", "Desktop Entry");
// å†�次检查 section 䏿˜¯å�¦åŒ… key 为 Semicolon çš„å€¼ï¼Œæ¤æ—¶ä¸ºfalse
qDebug() << QString("Desktop Entry组是�包key是Semicolon: ") \
<< desktopFile->contains("Semicolon", "Desktop Entry");
// 将数�回写到desktop文件。 true表示写�功; �则返回false
if (desktopFile->save())
{
qDebug() << "文件ä¿�å˜æˆ�功";
} else {
qDebug() << "文件ä¿�å˜å¤±è´¥";
}
return 0;
}
```
结果如下图

@enum Dtk::Core::DDesktopEntry::EntryType
@brief 桌�入�文件的类型
@var Dtk::Core::DDesktopEntry::Unknown
@brief 未知的桌é�¢æ–‡ä»¶ç±»åž‹ã€‚å�¯èƒ½æ˜¯æ— 效的
@var Dtk::Core::DDesktopEntry::Application
@brief 该文件�述应用程�
@var Dtk::Core::DDesktopEntry::Link
@brief 该文件�述URL
@var Dtk::Core::DDesktopEntry::Directory
@brief 该文件�述目录设置
@var Dtk::Core::DDesktopEntry::ServiceType
@brief KDEç‰¹å®šç±»åž‹ã€‚è§„èŒƒä¸æ��到过, 所以这里也列出了
@var Dtk::Core::DDesktopEntry::Service
@brief KDEç‰¹å®šç±»åž‹ã€‚è§„èŒƒä¸æ��到过, 所以这里也列出了
@var Dtk::Core::DDesktopEntry::FSDevice
@brief KDEç‰¹å®šç±»åž‹ã€‚è§„èŒƒä¸æ��到过, 所以这里也列出了
@enum Dtk::Core::DDesktopEntry::ValueType
@brief 值的类型
@var Dtk::Core::DDesktopEntry::Unparsed
@brief 未解�的值
@var Dtk::Core::DDesktopEntry::String
@brief å—符串
@var Dtk::Core::DDesktopEntry::Strings
@brief å—符串数组
@var Dtk::Core::DDesktopEntry::Boolean
@brief 布尔值
@var Dtk::Core::DDesktopEntry::Numeric
@brief æ•°å—
@var Dtk::Core::DDesktopEntry::NotExisted
@brief ä¸�å˜åœ¨
@enum Dtk::Core::DDesktopEntry::Status
@brief desktop文件的解�状�
@var Dtk::Core::DDesktopEntry::NoError
@brief 没有错误�生
@var Dtk::Core::DDesktopEntry::AccessError
@brief �生访问错误(例如, 试图写入�读文件)
@var Dtk::Core::DDesktopEntry::FormatError
@brief å�‘ç”Ÿæ ¼å¼�错误(例如, åŠ è½½æ ¼å¼�错误的desktop文件)
@fn Dtk::Core::DDesktopEntry::DDesktopEntry(const QString &filePath) noexcept
@brief DDesktopEntryæž„é€ å‡½æ•°
@fn bool Dtk::Core::DDesktopEntry::save() const
@brief 将数�回写到desktop文件。
@return true表示写�功; �则返回false
@fn Status Dtk::Core::DDesktopEntry::status() const
@brief Get data parse status
@return 返回一个状æ€�ç �, 表示DDesktopEntryé�‡åˆ°çš„第一个错误, 如果没有错误å�‘生, 则返回QSettings::NoError。请注æ„�, DDesktopEntry会延迟执行æŸ�些æ“�作。
@fn QStringList Dtk::Core::DDesktopEntry::keys(const QString §ion = "Desktop Entry") const
@brief æ ¹æ�® `section` 返回全部键值
@return 返回所有的键值
@fn QStringList Dtk::Core::DDesktopEntry::allGroups(bool sorted = false) const
@brief 获å�–desktop䏿‰€æœ‰ç»„的列表。如果 `sorted` 设置为true, 则返回结果将ä¿�æŒ�读å�–desktop文件时的顺åº�ä¸�å�˜ã€‚
@return 返回所有的组.
@fn bool Dtk::Core::DDesktopEntry::contains(const QString &key, const QString §ion = "Desktop Entry") const
@brief 检查desktop文件是�有给定的 `section` 包�给定的 `key`
@return 如果desktop在 `section` 包� `key` 返回true; �则返回false。
@fn QString Dtk::Core::DDesktopEntry::name() const
@brief 返回“Desktop Entryâ€�部分下的“Nameâ€�键的本地化å—符串值。这ç‰ä»·äºŽè°ƒç”¨localizedValue("Name")。
@return 返回“Desktop Entryâ€�部分下的“Nameâ€�键的本地化å—符串值。
@sa localizedValue(), genericName(), ddeDisplayName()
@fn QString Dtk::Core::DDesktopEntry::genericName() const
@brief 返回"Desktop Entry"部分下的"GenericName"键的本地化å—符串值。它ç‰ä»·äºŽè°ƒç”¨localizedValue("GenericName")。如果是“GenericNameâ€�ä¸�å˜åœ¨ã€‚则ä¸�会回退到“Nameâ€�。
@return 返回"Desktop Entry"部分下的"GenericName"键的本地化å—符串值。
@sa localizedValue(), name(), ddeDisplayName()
@fn QString Dtk::Core::DDesktopEntry::ddeDisplayName() const
@brief 为DDE应用程�专门显示�称
@details 这将检查“X-Deepin-Vendorâ€�,并将返回本地化的å—符串值“GenericNameâ€�
"X-Deepin-Vendor"是"deepin",å�¦åˆ™å®ƒå°†è¿”回"Name"的本地化å—符串值。
@return 返回专门用于DDE应用程�的显示�称
@sa localizedValue(), name(), genericName()
@fn QString Dtk::Core::DDesktopEntry::comment() const
@brief 返回“Desktop Entryâ€�部分下的“Commentâ€�键的本地化å—符串值。这ç‰ä»·äºŽè°ƒç”¨localizedValue("Comment")。
@return 返回“Desktop Entryâ€�部分下的“Commentâ€�键的本地化å—符串值。
@sa localizedValue()
@fn QString Dtk::Core::DDesktopEntry::rawValue(const QString &key, const QString §ion = "Desktop Entry", const QString &defaultValue = QString()) const
@brief 返回 `section` ä¸ä¸Žç»™å®š `key` å…³è�”的原始å—符串值。如果desktopä¸�包å�«å…·æœ‰è¯¥é”®çš„项, åˆ™å‡½æ•°è¿”å›žä¸€ä¸ªæž„é€ å¥½çš„ `defaultValue`。
@return 返回 `section` ä¸ä¸Žç»™å®š `key` 相关è�”的原始å—符串值。
@sa stringValue() localizedValue() stringListValue()
@fn QString Dtk::Core::DDesktopEntry::stringValue(const QString &key, const QString §ion = "Desktop Entry", const QString &defaultValue = QString()) const
@brief 返回 `section` 与给定 `key` å…³è�”的未转义å—符串值。如果desktopä¸�包å�«é”®å€¼ä¸º0的项, åˆ™å‡½æ•°è¿”å›žä¸€ä¸ªæž„é€ å¥½çš„ `defaultValue`。
@return 返回 `section` ä¸ä¸Žç»™å®š `key` 相关è�”的未转义å—符串值。
@sa rawValue() localizedValue() stringListValue()
@fn QString Dtk::Core::DDesktopEntry::localizedValue(const QString &key, const QString &localeKey = "default", const QString §ion = "Desktop Entry", const QString& defaultValue = QString()) const
@brief 返回与 `section` ä¸ç»™å®šçš„ `key` å’Œ `localeKey` 相关è�”的本地化å—符串值。
@details
如果找�到给定的 `localeKey` ,它将回退到"C",如果�然找�到,将回退 `key` 没有`localeKey`部分。。
如果destkopä¸�包å�« `key` 值为0的项,åˆ™å‡½æ•°è¿”å›žä¸€ä¸ªæž„é€ å¥½çš„ `defaultValue`。
@return 返回 `section` ä¸ä¸Žç»™å®šçš„ `key` å’Œ `localeKey` å…³è�”的本地化å—符串值。
@sa rawValue() stringValue() stringListValue()
@fn QString Dtk::Core::DDesktopEntry::localizedValue(const QString &key, const QLocale &locale, const QString §ion = "Desktop Entry", const QString& defaultValue = QString()) const
@brief 返回与给定的 `key` å’Œ `section` ä¸çš„区域设置相关è�”的本地化å—符串值。
@details
如果找�到给定的 `localeKey` ,它将回退到"C",如果�然找�到,将回退 `key` 没有`localeKey`部分。
如果destkopä¸�包å�« `key` 值为0的项,åˆ™å‡½æ•°è¿”å›žä¸€ä¸ªæž„é€ å¥½çš„ `defaultValue`。
@return 返回 `section`ä¸ ä¸Žç»™å®šçš„ `key` å’Œ `locale` 设置相关è�”的本地化å—符串值。
@sa rawValue() stringValue() stringListValue()
@fn QStringList Dtk::Core::DDesktopEntry::stringListValue(const QString &key, const QString §ion = "Desktop Entry") const
@brief 返回给定 `section` ä¸ä¸Žç»™å®š `key` å…³è�”çš„å—符串的列表。如果destkopä¸�包å�«ä¸ºè¯¥é”®çš„项,则函数返回一个空å—符串列表。
@return 返回给定 `section` ä¸ä¸Žç»™å®š `key` å…³è�”çš„å—符串的列表。
@sa rawValue() stringValue() localizedValue()
@fn bool Dtk::Core::DDesktopEntry::setRawValue(const QString &value, const QString &key, const QString& section = "Desktop Entry")
@brief 设置给定 `section` ä¸ä¸Žç»™å®š `key` å…³è�”的原始å—符串值。
@fn bool Dtk::Core::DDesktopEntry::setStringValue(const QString &value, const QString &key, const QString& section = "Desktop Entry")
@brief 设置给定 `section` ä¸ä¸Žç»™å®š `key` å…³è�”çš„å—符串
@fn bool Dtk::Core::DDesktopEntry::setLocalizedValue(const QString &value, const QString& localeKey, const QString &key, const QString& section = "Desktop Entry")
@brief 设置给定的 `key` å’Œ `section` ä¸çš„区域设置相关è�”的本地化å—符串值。
@fn bool Dtk::Core::DDesktopEntry::removeEntry(const QString &key, const QString §ion = "Desktop Entry");
@brief åˆ é™¤desktopä¸ `section` 与 `key` 对应的值
@fn static QString& Dtk::Core::DDesktopEntry::escape(QString &str)
@brief 支�转义�列`\s`�`\n`�`\t`�`\r`和`\\`表示值
@details stringå’Œlocalestring类型的值支æŒ�转义åº�列`\s`ã€�`\n`ã€�`\t`ã€�`\r`å’Œ`\\`,分别表示ASCIIç©ºæ ¼ã€�æ�¢è¡Œç¬¦ã€�制表符ã€�回车和å��æ–œæ� 。
@fn static QString& Dtk::Core::DDesktopEntry::escapeExec(QString &str)
@brief 必须将å�‚数括在å�Œå¼•å�·ä¹‹é—´ï¼Œå¹¶å¯¹å�Œå¼•å�·å—符进行转义。
@details
| 原å—符 | 转义å�Ž |
|------|---------|
| \` | "`" |
| $ | "$" |
| \ | "\" |
在它å‰�é�¢åŠ ä¸Šä¸€ä¸ªé¢�外的å��æ–œæ� å—ç¬¦ã€‚å®žçŽ°å¿…é¡»åœ¨æ‰©å±•å—æ®µä»£ç �之å‰�和之å‰�撤销引用,å°†å�‚æ•°ä¼ é€’ç»™å�¯æ‰§è¡Œç¨‹åº�。
@note 类型为string的值的通用转义规则规定,å��æ–œæ� å—符也å�¯ä»¥è½¬ä¹‰ä¸º("\\")和这个转义规则应用在引用规则之å‰�。
å› æ¤,è¦�明确地表示在desktop文件ä¸,引å�·å�‚æ•°ä¸çš„æ–‡å—å��æ–œæ� å—符
è¦�求使用四个连ç»çš„å��æ–œæ� å—符("\\\\")。å�Œæ ·ï¼Œåœ¨æ¡Œé�¢å…¥å�£æ–‡ä»¶ä¸å¼•用å�‚æ•°ä¸çš„美元符å�·è¡¨ç¤ºä¸º("\\$")。
@fn static QString& Dtk::Core::DDesktopEntry::unescape(QString &str, bool unescapeSemicolons = false)
@brief 对于类型为stringå’Œlocalestring的值,支æŒ�转义åº�列`\s`ã€�`\n`ã€�`\t`ã€�`\r`å’Œ`\\`,分别表示ASCIIç©ºæ ¼ã€�æ�¢è¡Œç¬¦ã€�制表符ã€�回车符和å��æ–œæ� 。
@details 有些键�以有多个值。这�情况下,`key` 的值被指定为�数形�:
例如,å—符串。多个值应该用分å�·åˆ†éš”,`key` 的值å�¯ä»¥é€‰æ‹©ä»¥åˆ†å�·ç»“尾。空å—符串必须以分å�·ç»“尾。
这些值ä¸çš„分å�·éœ€è¦�使用`\;`转义。
有关该规范本身的更多详细信�,请�阅:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#value-types
@fn static QString& Dtk::Core::DDesktopEntry::unescapeExec(QString &str)
@brief 必须将å�‚数括在å�Œå¼•å�·ä¹‹é—´,并对å�Œå¼•å�·å—符进行转义,
@details
| 原å—符 | 转义å�Ž |
|------|---------|
| \` | "`" |
| $ | "$" |
| \ | "\" |
在它å‰�é�¢åŠ ä¸Šä¸€ä¸ªé¢�外的å��æ–œæ� å—ç¬¦ã€‚å®žçŽ°å¿…é¡»åœ¨æ‰©å±•å—æ®µä»£ç �之å‰�和之å‰�撤销引用,å°†å�‚æ•°ä¼ é€’ç»™å�¯æ‰§è¡Œç¨‹åº�。
ä¿�ç•™å—符:
| 功能 | å—符 |
|---------------------|---------|
| space | " " |
| tab | |
| newline | |
| double quote | |
| single quote | "'" |
| backslash character | "\" |
| greater-than sign | ">" |
| less-than sign | "<" |
| tilde | "~" |
| vertical bar | \| |
| ampersand | "&" |
| semicolon | ";" |
| dollar sign | "$" |
| asterisk | "*" |
| question mark | "?" |
| hash mark | "#" |
| parenthesis | "(" 和 ")" |
| backtick character | "`" |
@note 类型为string的值的通用转义规则规定
å��æ–œæ� å—符也å�¯ä»¥è½¬ä¹‰ä¸º("\\"),而且转义规则在引å�·è§„则之å‰�应用。
å› æ¤,è¦�在desktop文件的引å�·å�‚æ•°ä¸æ˜Žç¡®è¡¨ç¤ºå—é�¢ä¸Šçš„å��æ–œæ� å—符,需è¦�使用四个连ç»çš„å��æ–œæ� å—符(“\\\\â€�)。
å�Œæ ·,在desktop文件ä¸,引å�·å�‚æ•°ä¸çš„美元符å�·å�¯ä»¥æ˜Žç¡®åœ°è¡¨ç¤ºä¸º("\\$")。
@fn bool Dtk::Core::DDesktopEntry::setStatus(const Status &status)
@brief 设置desktop文件解�状�
*/
dtkcore-6.7.46/docs/global/dlicenseinfo.zh_CN.dox 0000664 0000000 0000000 00000003267 15226157704 0021640 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dglobal
@file include/global/dlicenseinfo.h
@class Dtk::Core::DLicenseInfo::DComponentInfo
@brief dcomponentinfo 是一组用于查询组件所用开��议信�的类
@fn Dtk::Core::DLicenseInfo::DComponentInfo::DComponentInfo(DObject *parent)
@brief 组件信æ�¯ç±»çš„æž„é€ å‡½æ•°
@param[in] parent 组件信�类的父对象
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::name()
@brief 获�组件的�称
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::version()
@brief 获�组件的版本�
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::copyRight()
@brief 获�组件的授�信�
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::licenseName()
@brief 获�组件的所用开�许��议�称
@class Dtk::Core::DLicenseInfo
@brief dlicenseinfo是一组用于查询应用所用开�许��议相关信�的类
@fn Dtk::Core::DLicenseInfo::DLicenseInfo(DObject *parent)
@brief å¼€æº�许å�¯å��议信æ�¯ç±»çš„æž„é€ å‡½æ•°
@param[in] parent 开�许��议信�类的父对象
@fn bool Dtk::Core::DLicenseInfo::loadContent(const QByteArray &content)
@brief 通过内容contentåŠ è½½å��è®®
@return 0 åŠ è½½å¤±è´¥
@return 1 åŠ è½½æˆ�功
@fn bool Dtk::Core::DLicenseInfo::loadFile(const QString &file)
@brief 通过文件fileåŠ è½½å��è®®
@return 0 åŠ è½½å¤±è´¥
@return 1 åŠ è½½æˆ�功
@fn void Dtk::Core::DLicenseInfo::setLicenseSearchPath(const QString &path)
@brief 设置�议内容路径path
@fn QByteArray Dtk::Core::DLicenseInfo::licenseContent(const QString &licenseName)
@brief 获��议�为licenseName的内容
@fn DLicenseInfo::DComponentInfos Dtk::Core::DLicenseInfo::componentInfos()
@brief 获�组件的相关信�
*/
dtkcore-6.7.46/docs/global/dsysinfo.zh_CN.dox 0000664 0000000 0000000 00000027361 15226157704 0021035 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dglobal
@file include/global/dsysinfo.h
@class Dtk::Core::DSysInfo
@brief dsysinfo 是一组用于查询系统信�的��类
@details
## 概述
dsysinfo是一组用于查询系统信�的��类
项目目录结构如下:
```bash
├── CMakeLists.txt
└── main.cpp
```
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.13) # cmake版本�求
set (VERSION "1.0.0" CACHE STRING "define project version") # 定义项目版本
set(BIN_NAME test) # 定义项目�称
project(test) # 定义项目�称
file(GLOB_RECURSE SRCS "*.h" "*.cpp") # 定义项目�文件
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5
find_package(DtkCore REQUIRED) # 寻找DtkCore
add_executable(test
main.cpp # �文件
)
target_link_libraries(test PRIVATE
${DtkCore_LIBRARIES} # 链接DtkCore
Qt5::Core # 链接Qt5
)
```
## main.cpp
```cpp
#include // 引入DSysInfo
#include // 引入qdebug.h
DCORE_USE_NAMESPACE // 使用dtkcore命�空间
int main(int argc, char **argv) {
qDebug() << DSysInfo::deepinType(); // 打�deepin类型
qDebug() << DSysInfo::ProductType(); // 打�产�类型
return 0;
}
```
@enum Dtk::Core::DSysInfo::ProductType
@brief 产�信�
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Deepin
@brief 深度�作系统
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::ArchLinux
@brief ArchLinux
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::CentOS
@brief CentOS
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Debian
@brief Debian
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Fedora
@brief Fedora
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::LinuxMint
@brief LinuxMint
@var Dtj::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Manjaro
@brief Manjaro
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::openSUSE
@brief openSUSE
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::SailfishOS
@brief SailfishOS
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Ubuntu
@brief Ubuntu
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Uos
@brief UOS
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Gentoo
@brief Gentoo
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::NixOS
@brief NixOS
@enum Dtk::Core::DSysInfo::DeepinType
@brief 深度�作系统版本
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::UnknownDeepin
@brief 未知版本
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinDesktop
@brief 桌�版
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinProfessional
@brief deepin专业版, 现为uos专业版
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinServer
@brief deepin�务器版本, 现为uos�务器版
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinPersonal
@brief deepin个人版, 现为uoså®¶åºç‰ˆ
@enum Dtk::Core::DSysInfo::LogoType
@brief 系统的logo类型
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Normal
@brief æ£å¸¸
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Light
@brief 亮色
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Symbolic
@brief 符�
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Transparent
@brief 水�
@enum Dtk::Core::DSysInfo::OrgType
@brief 组织类型
@var Dtk::Core::DSysInfo::OrgType Dtk::Core::DSysInfo::Distribution
@brief 当�版本
@var Dtk::Core::DSysInfo::OrgType Dtk::Core::DSysInfo::Distributor
@brief 当��行版
@var Dtk::Core::DSysInfo::OrgType Dtk::Core::DSysInfo::Manufacturer
@brief 当å‰�å�‘è¡Œç‰ˆæˆ–è®¾å¤‡çš„åˆ¶é€ å•†
@enum Dtk::Core::DSysInfo::UosType
@brief UOS版本类型
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosTypeUnknown
@brief 未知版本
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosDesktop
@brief UOS桌�版
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosServer
@brief UOS�务器版
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosDevice
@brief UOS设备版
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosTypeCount
@brief 记录枚举数�
@enum Dtk::Core::DSysInfo::UosEdition
@brief 详细uos版本
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEditionUnknown
@brief 未知版本
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosProfessional
@brief UOS专业版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosHome
@brief UOSå®¶åºç‰ˆ
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosCommunity
@brief 社区版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosMilitary
@brief *
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEnterprise
@brief UOS�业版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEnterpriseC
@brief UOS行业版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEuler
@brief UOS�务器欧拉版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosMilitaryS
@brief *
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosDeviceEdition
@brief UOS专用设备版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEducation
@brief UOS教育版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEditionCount
@brief 记录枚举数�
@enum Dtk::Core::DSysInfo::UosArch
@brief UOS使用的架构
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosArchUnknown
@brief 未知架构
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosAMD64
@brief x86_64
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosARM64
@brief arm64
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosMIPS64
@brief mips64
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosSW64
@brief sw_64
@fn static bool Dtk::Core::DSysInfo::isDeepin() //FIXME: 显示错乱 æ— æ³•ä¿®å¤�
@brief 是�为 deepin 或 uos 系统
@return 0 �是 deepin 或 uos 系统
@return 1 是 deepin 或 uos 系统
@fn static bool Dtk::Core::DSysInfo::isDDE()
@brief 是�使用 dde 桌�环境
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static DeepinType Dtk::Core::DSysInfo::deepinType()
@brief deepin 系统类型
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::deepinTypeDisplayName (const QLocale &locale=QLocale::system())
@brief 显示的 deepin �行版类型�称
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::deepinVersion()
@brief deepin 版本
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::deepinCopyright()
@brief deepin 开�许��议
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static UosEdition Dtk::Core::DSysInfo::uosEditionType()
@brief DSysInfo::osEditionType 版本类型 显示版本类型 专业版/个人版/社区版..
@note æ ¹æ�® osBuild.B && osBuild.D
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static UosArch Dtk::Core::DSysInfo::uosArch()
@brief DSysInfo::osArch 架构信�
@details(使用一个å—节的二进制ä½�, 从低ä½�到高ä½�) ã€�0x8 sw64】ã€�0x4 mips64】ã€�0x2 arm64】ã€�0x1 amd64】
@note æ¤å¤„架构是从 OsBuild 获å�–的系统版本的 Arch ä¿¡æ�¯, å¹¶ä¸�是指硬件的 Arch ä¿¡æ�¯
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString uosProductTypeName(const QLocale &locale=QLocale::system())
@brief DSysInfo::osProductTypeName 版本�称
@details ProductType[xx] 项对应的值, 如果找ä¸�到对应è¯è¨€çš„默认使用 ProductType 的值(Desktop/Server/Device) locale 当å‰�系统è¯è¨€
@fn static QString Dtk::Core::DSysInfo::uosSystemName(const QLocale &locale=QLocale::system())
@brief SystemName[xx] 项对应的值
@details 如果找ä¸�到对应è¯è¨€çš„默认使用 SystemName 的值 Uniontech OS locale 当å‰�系统è¯è¨€
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::function uosEditionName(const QLocale &locale=QLocale::system())
@brief 版本�称 EditionName[xx] 项对应的值
@details 如果找ä¸�到对应è¯è¨€çš„默认使用 EditionName 的值(Professional/Home/Community...) locale 当å‰�系统è¯è¨€
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::spVersion()
@brief 阶段版本�称
@details å°�版本å�· A-BC-D ä¸ BCã€� A.B.C ä¸çš„ B 返回 SP1-SPxx, 如果æ£å¼�版返回空 X.Y.Z模å¼�下暂ä¸�支æŒ�返回æ¤ç‰ˆæœ¬å�·
@note minVersion.BC == 00 æ£å¼�版本, minVersion.BC | minVersion.B == 01-99 SP1….SP99
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::udpateVersion()
@brief 更新版本å��ç§° å°�版本å�· A-BC-D ä¸ Dã€�A.B.C 模å¼�ä¸çš„ C 返回 update1… update9, 如果æ£å¼�版返回空 X.Y.Z 模å¼�下暂ä¸�支æŒ�返回æ¤ç‰ˆæœ¬å�·
@note minVersion.D == 0;æ£å¼�版本 minVersion.D | minVersion.C == 1-9;update1… update9, updateA...updateZ
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::majorVersion()
@brief 主版本� 主版本� �20】�23】�25】�26】�29】�30】
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::minorVersion()
@brief �版本� �ABCD】 ·[0-9]{4} �A.B.C】 或者�X.Y.Z】
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::buildVersion()
@brief �版本� 系统镜�批次�, 按时间顺�(��回退)从100-999递增
@note æ¤æ–¹æ³•仅在 linux å¹³å�°ä¸‹å�¯ç”¨
@fn static QString Dtk::Core::DSysInfo::distributionInfoPath ()
@brief 返回 distribution 文件地� 一般在`/usr/share/deepin/`目录下
@fn static QString Dtk::Core::DSysInfo::distributionInfoSectionName(OrgType type)
@brief 返回 distribution.info æ–‡ä»¶ä¸ SectionName å—æ®µçš„值
@fn static Dtk::Core::DSysInfo::distributionOrgName(OrgType type=Distribution, const QLocale &locale=QLocale::system())
@brief 返回组织�称
@details 使用类型为Distribution�获�当�deepin distribution本身的�称
@fn static QPairDtk::Core::DSysInfo::distributionOrgWebsite(OrgType type=Distribution)
@brief �行版组织的网站�称和网�。使用 type 作为 Distribution 获�当� deepin �行版本身的�称。
@fn static QString Dtk::Core::DSysInfo::distributionOrgLogo(OrgType orgType=Distribution, LogoType type=Normal, const QString &fallback=QString())
@brief 获得的组织logo路径, 如果ä¸�å˜åœ¨, 则返回给定的其他路径
@details 使用 type 作为 Distribution 获�当� deepin �行版本身的logo。
@fn static QString Dtk::Core::DSysInfo::operatingSystemName()
@brief �作系统�
@fn static ProductType Dtk::Core::DSysInfo::productType()
@brief 产�类型
@fn static QString Dtk::Core::DSysInfo::productVersion()
@brief 产�版本
@fn static bool Dtk::Core::DSysInfo::isCommunityEdition()
@brief 检查当�版本是�是社区版 开�者�以使用这�方��检查我们是�需��用或�用社区版或�业版的功能。
@details 目�的规则:
专业版��务器版�个人版(DeepinType)将被视为�业版。
Uos(ProductType)将被视为�业版。
@fn static QString Dtk::Core::DSysInfo::computerName()
@brief 电脑�
@fn static QString Dtk::Core::DSysInfo::cpuModelName()
@brief cpu模��
@fn static qint64 Dtk::Core::DSysInfo::memoryInstalledSize()
@brief 内å˜å®‰è£…大å°�
@fn static qint64 Dtk::Core::DSysInfo::memoryTotalSize()
@brief 实际内å˜å¤§å°�
@fn static qint64 Dtk::Core::DSysInfo::systemDiskSize()
@brief 系统�盘大�
@fn static QDateTime Dtk::Core::DSysInfo::bootTime ()
@brief 系统�动时间点
@fn static QDateTime Dtk::Core::DSysInfo::shutdownTime ()
@brief 上一次æ£å¸¸å…³æœºæ—¶é—´ç‚¹(é‡�å�¯ä¹Ÿä¼šè¢«è®°å½•在内)
@fn static qint64 Dtk::Core::DSysInfo::uptime()
@brief 系统�动到现在时长
@note ��`cat /proc/uptime`命令
@fn static Arch Dtk::Core::DSysInfo::arch
@brief cpu架构信�
@note æ¤å¤„架构是从gcc编译器获å�–çš„
*/
dtkcore-6.7.46/docs/global/index.zh_CN.md 0000664 0000000 0000000 00000002561 15226157704 0020107 0 ustar 00root root 0000000 0000000 @page global global--dtk全局工具组件
# DTk global:dtk全局工具类
## dsysinfo:dtk系统信�工具类
[dsysinfo.h 详细文档](dsysinfo_8h.html)
这里放一个最å°�化使用dsysinfo的例å�:
cmake:
```cmake
cmake_minimum_required(VERSION 3.13) # cmake版本�求
set (VERSION "1.0.0" CACHE STRING "define project version") # 定义项目版本
set(BIN_NAME test) # 定义项目�称
project(test) # 定义项目�称
file(GLOB_RECURSE SRCS "*.h" "*.cpp") # 定义项目�文件
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5
find_package(DtkCore REQUIRED) # 寻找DtkCore
add_executable(test
main.cpp # �文件
)
target_link_libraries(test PRIVATE
${DtkCore_LIBRARIES} # 链接DtkCore
Qt5::Core # 链接Qt5
)
```
cpp:
```cpp
#include // 引入DSysInfo
#include // 引入qdebug.h
DCORE_USE_NAMESPACE // 使用dtkcore命�空间
int main(int argc, char **argv) {
qDebug() << DSysInfo::deepinType(); // 打�deepin类型
qDebug() << DSysInfo::ProductType(); // 打�产�类型
return 0;
}
```
其余的组件使用方法类似,这里就�一一列举了
@defgroup dglobal
@brief dtk设置全局工具组件
@details
dtk全局工具组件,�供了设置全局工具的功能。
包�以下功能:
* dsysinfo:dtk系统信�工具类
* dconfig:dtk�置文件工具类
dtkcore-6.7.46/docs/log/ 0000775 0000000 0000000 00000000000 15226157704 0014773 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/log/AbstractAppender.zh_CN.dox 0000664 0000000 0000000 00000010121 15226157704 0021724 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/AbstractAppender.h
AbstractAppender类是所有�以与Logger一起使用的日志appender的基础接�类。
@class Dtk::Core::AbstractAppender
@brief AbstractAppender为应用消�的线程安全�互斥�护的日志�供了一个通用的实现
@details AbstractAppender为应用消�的线程安全�互斥�护的日志�供了一个通用的实现,例如ConsoleAppender�FileAppender或其他的东西。
AbstractAppender是抽象的,ä¸�能被实例化,ä½†æ˜¯ä½ å�¯ä»¥ä½¿ç”¨å®ƒçš„任何一个å�ç±»,æˆ–è€…æ ¹æ�®ä½ 的选择创建一个自定义的日志appender。
Appenders是逻辑设备,旨在通过调用`Logger::registerAppender()`é™„åŠ åˆ°Logger对象。在æ¯�个æ�¥è‡ªåº”用程åº�的日志记录调用ä¸,Logger对象都会ä¾�次调用所有在它身上注册的appenderçš„`write()`函数。
ä½ å�¯ä»¥å�类化AbstractAppenderæ�¥å®žçŽ°ä½ å–œæ¬¢çš„ä»»ä½•ç±»åž‹çš„æ—¥å¿—ç›®æ ‡ã€‚å®ƒå�¯ä»¥æ˜¯å¤–部日志å�系统(例如,*nixä¸çš„syslog)ã€�XML文件ã€�SQLæ•°æ�®åº“æ�¡ç›®ã€�D-Bus消æ�¯æˆ–ä»»ä½•ä½ èƒ½æƒ³åˆ°çš„å…¶ä»–ä¸œè¥¿ã€‚
对于简å�•çš„é�žç»“构化的纯文本日志(例如,到一个纯文本文件或到控制å�°è¾“出),请å�类化AbstractStringAppender而ä¸�是AbstractAppender,è¿™å°†ç»™ä½ ä¸€ä¸ªæ›´æ–¹ä¾¿çš„æ–¹æ³•æ�¥æŽ§åˆ¶æ—¥å¿—è¾“å‡ºçš„æ ¼å¼�。
@fn AbstractAppender Dtk::Core::AbstractAppender::AbstractAppender()
@brief AbstractAppenderæž„é€ å‡½æ•°
@fn AbstractAppender Dtk::Core::AbstractAppender::~AbstractAppender()
@brief AbstractAppender�构函数
@fn Logger::LogLevel Dtk::Core::AbstractAppender::detailsLevel()
@brief 返回appender的当�日志级别
@details 返回appender的当�日志级别.日志级别低于当�`detailsLevel()`的日志记录将被appender默认忽略,
并且�会被��到其append()函数。
它æ��供了é¢�外的日志ç�µæ´»æ€§ï¼Œå…�è®¸ä½ ä¸ºä¸�å�Œç±»åž‹çš„æ—¥å¿—设置ä¸�å�Œçš„记录ç‰çº§
@note 该函数是线程安全的
@sa setDetailsLevel()
@sa Logger::LogLevel
@return 日志记录ç‰çº§
@fn void Dtk::Core::AbstractAppender::setDetailsLevel(Logger::LogLevel level)
@brief 设置当�appender的记录级别,默认记录级别为Logger::Debug
@note 该函数是线程安全的
@sa setDetailsLevel()
@sa Logger::LogLevel
@fn void Dtk::Core::AbstractAppender::setDetailsLevel(const QString &level)
@brief 设置当�appender的记录级别,这个函数是为了简化输入而�供的,它的行为与��函数类似。
@sa AbstractAppender::setDetailsLevel(Logger::LogLevel level)
@sa setDetailsLevel()
@sa Logger::LogLevel
@fn void Dtk::Core::AbstractAppender::write(const QDateTime &time, Logger::LogLevel level, const char *file, int line, const char *func, const QString &category, const QString &msg)
@brief �试写入日志,这是由Logger对象调用的函数,用于�appender写入日志信�
@param[in] time 时间戳
@param[in] level 日志记录ç‰çº§
@param[in] file ç›®æ ‡æ–‡ä»¶å��
@param[in] line �输出的行数
@param[in] func 输出的函数�称
@param[in] category 日志类别
@param[in] msg 输出信�
@note 该函数是线程安全的
@sa Logger::write()
@sa detailsLevel()
@fn void Dtk::Core::AbstractAppender::AbstractAppender::append(const QDateTime &timeStamp, Logger::LogLevel level, const char *file, int line,
const char *function, const QString &category, const QString &message) = 0
@brief 将日志记录写到logger实例ä¸
@details æ¯�次当用户试图使用`write()`函数å�‘这个AbstractAppender实例写入消æ�¯æ—¶,都会调用这个函数。`write()`函数作为代ç�†å·¥ä½œ,å�ªè¾“出日志级别大于或ç‰äºŽå½“å‰�`logLevel()`的消æ�¯
@note å½“ä½ å®žçŽ°ä¸€ä¸ªè‡ªå®šä¹‰çš„appenderæ—¶,需è¦�é‡�载这个函数。
@note 该函数ä¸�需è¦�是线程安全的,å› ä¸ºå®ƒä¸�会被Logger对象直接调用。`write()`函数作为代ç�†,ä¿�护该函数ä¸�被并å�‘调用。
@param[in] timeStamp 时间戳
@param[in] level 日志记录ç‰çº§
@param[in] file ç›®æ ‡æ–‡ä»¶å��
@param[in] line �输出的行数
@param[in] function 输出的函数�称
@param[in] category 日志类别
@param[in] message 输出信�
*/
dtkcore-6.7.46/docs/log/AbstractStringAppender.zh_CN.dox 0000664 0000000 0000000 00000013066 15226157704 0023126 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/AbstractStringAppender.h
@class Dtk::Core::AbstractStringAppender
@brief AbstractStringAppender类为处ç�†çº¯æ–‡æœ¬æ ¼å¼�çš„Appenderæ��供了一个方便的基础日志
@details AbstractStringAppender是AbstractAppender类的简�扩展,
它æ��供了一ç§�方便的方å¼�æ�¥åˆ›å»ºè‡ªå®šä¹‰æ—¥å¿—应用程åº�, 该程åº�ä½¿ç”¨çº¯æ–‡æœ¬æ ¼å¼�的日志.
它有`formattedString()`ä¿�护类型(ä¸�å�¯ç›´æŽ¥è¢«è°ƒç”¨)函数, å�¯ä»¥æ ¹æ�®`setFormat()`è®¾ç½®çš„æ ¼å¼�æ�¥æ ¼å¼�化日志å�‚数。
@note 这个类ä¸�能直接实例化, å› ä¸ºå®ƒåŒ…å�«ä»ŽAbstractAppender类继承的纯虚函数。
@brief å…³äºŽè‡ªå®šä¹‰æ—¥å¿—è¾“å‡ºæ ¼å¼�的更详细æ��è¿°, 请å�‚è§�setFormat()函数的文档
@sa AbstractStringAppender::setFormat()
@fn AbstractStringAppender Dtk::Core::AbstractStringAppender::AbstractStringAppender()
@brief 构建一个新的å—符串appender对象
@fn QString Dtk::Core::AbstractStringAppender::format()
@brief 返回当å‰�使用的formatå—符串
@details é»˜è®¤è®°å½•æ ¼å¼�为:`"%{time}{yyyy-MM-ddTHH:mm:ss.zzz} [%{type:-7}] <%{function}> %{message}\n"`
ä½ å�¯ä»¥ä½¿ç”¨setFormat()函数æ�¥è®¾ç½®ä¸�å�Œçš„æ—¥å¿—è®°å½•æ ¼å¼�。
@sa AbstractStringAppender::setFormat()
@return 返回当å‰�使用的formatå—符串
@fn void Dtk::Core::AbstractStringAppender::setFormat(const QString &format)
@brief è®¾ç½®æ—¥å¿—æ ¼å¼�, 以便用这个appenderå�‘æ—¥å¿—ç›®æ ‡å†™å…¥å—符串。
@details
å¯¹äºŽé‚£äº›ä½¿ç”¨è¿‡æ ‡å‡†sprintf函数的开å�‘者æ�¥è¯´, å—ç¬¦ä¸²æ ¼å¼�é�žå¸¸å¸¸è§�。
æ—¥å¿—è¾“å‡ºæ ¼å¼�是一个简å�•çš„QString, å¸¦æœ‰ç‰¹æ®Šçš„æ ‡è®°(以%符å�·å¼€å§‹), 在写日志记录时将被替æ�¢æˆ�它的内部å�«ä¹‰ã€‚
æŽ§åˆ¶æ ‡è®°ä»¥ç™¾åˆ†å�·(%)开始, å�Žé�¢æ˜¯{}括å�·å†…的命令(该命令æ��述了将被放入日志记录而ä¸�æ˜¯æ ‡è®°çš„å†…å®¹)。
å�¯é€‰çš„å—æ®µå®½åº¦å�‚æ•°å�¯ä»¥åœ¨å‘½ä»¤å�Žç›´æŽ¥æŒ‡å®šï¼ˆé€šè¿‡æ‹¬å�·å†…的冒å�·ï¼‰, 有些命令需è¦�一个é¢�å¤–çš„æ ¼å¼�化å�‚æ•°(在第二个{}括å�·å†…)
å—æ®µå®½åº¦å�‚数的工作原ç�†ä¸Ž`QString::arg()`fieldWidthå�‚æ•°å‡ ä¹Žç›¸å�Œ(并在内部使用它),
例如, "%{type:-7}"将被替�为消�的左边填充的调试级别("Debug")或其他东西。更详细的�述请�考Qt文档。
@details 支æŒ�çš„æ ‡è®°ï¼š
| **æ ‡è®°** | **å�«ä¹‰** | **备注** |
|:-----------:|:-----------------------------------------------------:|:-------------------------------------------------------------------:|
| %{time} | æ—¶é—´æˆ³ã€‚ä½ å�¯ä»¥ä½¿ç”¨æ ‡è®°å�Žçš„第二个{}括å�·æ�¥æŒ‡å®šä½ çš„è‡ªå®šä¹‰æ—¶é—´æˆ³æ ¼å¼�ã€‚é»˜è®¤æ ¼å¼�:"HH:mm:ss.zzz" | "%{time}{dd-MM-yyyy, HH:mm}"å�¯èƒ½è¢«æ›¿æ�¢ä¸º "20-9-2022, 21:24", è¿™å�–决于当å‰�的日期和时间。 |
| %{type} | 日志级别。å�¯èƒ½çš„æ—¥å¿—级别在Logger::LogLevelæžšä¸¾ä¸æ˜¾ç¤ºã€‚ | |
| %{Type} | 大写的日志级别 | |
| %{typeOne} | ä¸€ä¸ªå—æ¯�的日志级别 | |
| %{TypeOne} | ä¸€ä¸ªå¤§å†™å—æ¯�的日志级别 | |
| %{File} | 记录日志的文件的完整�文件�(�路径), 使用 `__FILE__`预处�程�� | |
| %{file} | 简çŸçš„æ–‡ä»¶å��(去除路径å�Žçš„æ–‡ä»¶å��) | |
| %{line} | æº�文件ä¸çš„行数。使用`__LINE__`预处ç�†ç¨‹åº�å®�。 | |
| %{Function} | 调用`LOG_*`�的函数的�称。使用Qt�供的`Q_FUNC_INFO`�。 | |
| %{function} | 类似于%{Function}, 但使用 stripFunctionName 剥离了函数�。 | |
| %{message} | 日志内容 | |
| %{category} | 日志类别 | |
| %{appname} | 应用程��称(由`QCoreApplication::applicationName()`函数返回) | |
| %{pid} | 应用程�的pid(由`QCoreApplication::applicationPid()`函数返回) | |
| %{threadid} | 线程ID | |
| %% | 转译为å�•`%`æ ‡è®° | |
@fn static QString Dtk::Core::AbstractStringAppender::stripFunctionName(const char *name)
@brief 剥离长函数ç¾å��(ç”±Q_FUNC_INFOå®�æ·»åŠ )
@details å—符串处ç�†æŽ‰äº†å‡½æ•°çš„返回类型ã€�å�‚数和模æ�¿å�‚æ•°, 这对于æ��高日志输出的å�¯è¯»æ€§æ˜¯é�žå¸¸æœ‰ç”¨çš„
@param[in] name 函数�称
@return 剥离的函数�称
*/
dtkcore-6.7.46/docs/log/ConsoleAppender.zh_CN.dox 0000664 0000000 0000000 00000002357 15226157704 0021577 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/ConsoleAppender.h
@class Dtk::Core::ConsoleAppender
@brief ConsoleAppender是简�的控制�appender,将日志记录写入`std::cerr`输出�
@details ConsoleAppender使用`[%{type:-7}] <%{function}> %{message}\n`ä½œä¸ºé»˜è®¤è¾“å‡ºæ ¼å¼�。它类似于AbstractStringAppender,但ä¸�显示时间
ä½ å�¯ä»¥é€šè¿‡ä½¿ç”¨`QT_MESSAGE_PATTERN`环境å�˜é‡�æ�¥ä¿®æ”¹ConsoleAppenderçš„è¾“å‡ºæ ¼å¼�,而ä¸�ç”¨ä¿®æ”¹ä½ çš„ä»£ç �。
å�˜é‡�ã€‚å¦‚æžœä½ éœ€è¦�ä½ çš„åº”ç”¨ç¨‹åº�忽略这个环境å�˜é‡�,ä½ å�¯ä»¥è°ƒç”¨`ConsoleAppender::ignoreEnvironmentPattern(true)`
@fn ConsoleAppender Dtk::Core::ConsoleAppender::ConsoleAppender()
@brief æž„é€ å‡½æ•°,è®¾ç½®é»˜è®¤çš„æ—¥å¿—æ ¼å¼�为`[%{type:-7}] <%{function}> %{message}\n`
@fn virtual QString Dtk::Core::ConsoleAppender::format()
@brief 返回当å‰�é»˜è®¤è¾“å‡ºæ ¼å¼�,å�¯ä»¥è°ƒç”¨çˆ¶ç±»çš„`setFormat()`æ�¥æ›´æ”¹æ—¥å¿—è¾“å‡ºæ ¼å¼�
@sa AbstractStringAppender::setFormat()
@fn void Dtk::Core::ConsoleAppender::ignoreEnvironmentPattern(bool ignore)
@brief 设置应用程åº�忽略环境å�˜é‡�æ�¥ä¿®æ”¹ConsoleAppenderçš„è¾“å‡ºæ ¼å¼�,ä½¿ç”¨é»˜è®¤è¾“å‡ºæ ¼å¼�
@sa [QT_MESSAGE_PATTERN](https://doc.qt.io/qt-5/debug.html#warning-and-debugging-messages)
*/
dtkcore-6.7.46/docs/log/FileAppender.zh_CN.dox 0000664 0000000 0000000 00000001633 15226157704 0021050 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/FileAppender.h
@class Dtk::Core::FileAppender
@brief 简å�•的文件appender,将日志记录写到纯文本文件ä¸
@fn FileAppender Dtk::Core::FileAppender::FileAppender(const QString &fileName = QString())
@brief æž„é€ å‡½æ•°ï¼ŒæŒ‡å®šæ—¥å¿—è®°å½•æ–‡ä»¶çš„æ–‡ä»¶å��。
@fn QString Dtk::Core::FileAppender::fileName() const
@brief 返回由setFileName()设置的å��称,或返回FileAppenderæž„é€ å‡½æ•°ä¼ å…¥çš„fileName
@sa FileAppender::setFileName()
@fn void Dtk::Core::FileAppender::setFileName(const QString &s)
@brief 设置文件的�称。该�称�以没有路径,�以是相对路径,也�以是�对路径
@sa FileAppender::fileName()
@fn qint64 Dtk::Core::FileAppender::size()
@brief 返回日志文件大�
@fn bool FileAppender::openFile()
@brief 打开日志记录文件
@fn void FileAppender::closeFile()
@brief 关闿—¥å¿—记录文件
*/
dtkcore-6.7.46/docs/log/Logger.zh_CN.dox 0000664 0000000 0000000 00000022673 15226157704 0017740 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/Logger.h
@class Dtk::Core::Logger Logger.h
@brief é�žå¸¸ç®€å�•但相当强大的组件,å�¯ç”¨äºŽè®°å½•ä½ çš„åº”ç”¨ç¨‹åº�活动。
@enum Dtk::Core::Logger::LogLevel
@brief 日志ç‰çº§
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Trace
追踪级别,å�¯ç”¨äºŽå¤§éƒ¨åˆ†ä¸�需è¦�的记录,用于内部代ç �追踪
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Debug
调试级别,用于软件的调试。
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Info
信�级别,�用于信�记录,这�能�仅对开�者有�义
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Warning
è¦å‘Š,å�¯ä»¥ç”¨æ�¥è®°å½•ä½ çš„åº”ç”¨ç¨‹åº�检测到的一些é�žè‡´å‘½çš„è¦å‘Š
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Error
错误,å�¯èƒ½æ˜¯ä¸€ä¸ªè¾ƒå¤§é—®é¢˜,å¯¼è‡´ä½ çš„ç¨‹åº�工作出错,但ä¸�至于崩溃
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Fatal
致命错误,用于ä¸�å�¯æ�¢å¤�的错误,在写入日志记录å�Žç«‹å�³å´©æºƒåº”用程åº�(终æ¢)
@fn Logger Dtk::Core::Logger::Logger()
@brief 构建Logger的实例。
@note å¦‚æžœä½ å�ªä½¿ç”¨ä¸€ä¸ªå…¨å±€çš„logger实例,ä¸�需è¦�æ‰‹åŠ¨ä½¿ç”¨è¿™ä¸ªæž„é€ å‡½æ•°,å�¯ä»¥è€ƒè™‘使用loggerå®�æ�¥ä»£æ›¿è®¿é—®è®°å½•器实例
@fn Logger Dtk::Core::Logger::Logger(const QString &defaultCategory)
@brief 构建Logger的实例并设置Logger的默认类别
@note å¦‚æžœä½ å�ªä½¿ç”¨ä¸€ä¸ªå…¨å±€çš„logger实例,ä¸�需è¦�æ‰‹åŠ¨ä½¿ç”¨è¿™ä¸ªæž„é€ å‡½æ•°,
�以考虑使用logger��访问logger实例并调用setDefaultCategory方法
@sa Logger::Logger()
@sa Logger::setDefaultCategory()
@fn Logger Dtk::Core::Logger::~Logger()
@brief �构函数
@note ä½ å�¯èƒ½ä¸�需è¦�ç›´æŽ¥ä½¿ç”¨è¿™ä¸ªå‡½æ•°ã€‚è®°å½•å™¨çš„å…¨å±€å®žä¾‹å°†åœ¨ä½ çš„QCoreApplication执行结æ�Ÿå�Žè‡ªåЍ销æ¯�
@fn static Logger* Dtk::Core::Logger::globalInstance()
@brief 返回Logger的全局对象
@note åœ¨å¤§å¤šæ•°æƒ…å†µä¸‹ï¼Œä½ ä¸�应该直接使用这个函数。å�¯ä»¥è€ƒè™‘使用 [logger](@ref logger) å®�æ�¥ä»£æ›¿
@return Logger指针
@fn static QString Dtk::Core::Logger::levelToString(Logger::LogLevel level)
@brief å°†LogLevel枚举值转æ�¢ä¸ºå…¶å—符串表示
@sa Logger::LogLevel
@fn static LogLevel Dtk::Core::Logger::levelFromString(const QString &str)
@brief å°†LogLevelå—符串表示转æ�¢ä¸ºæžšä¸¾å€¼
@note å—符串的比较是ä¸�分大å°�写的。如果æ��供的日志级别å—符串ä¸�å�ˆæ³•,则返回`Logger::Debug`的枚举值
@sa Logger::LogLevel
@sa Logger::levelToString()
@fn void Dtk::Core::Logger::registerAppender(AbstractAppender *appender)
@brief 注册appender�写入日志记录
在写入日志的调用ä¸(使用其ä¸ä¸€ä¸ªå®�或`write()`函数),Loggeré��历appender列表,å¹¶å�‘æ¯�个appender写入日志记录。请查阅AbstractAppender文档以了解appenders的概念。
如果没有appenderè¢«æ·»åŠ åˆ°Loggerä¸,它就会退回到记录到`std::cerr`æµ�ä¸ã€‚
@param[in] appender è¦�在Logger䏿³¨å†Œçš„Appender
@note Logger对appender拥有所有æ�ƒ,它将在应用程åº�é€€å‡ºæ—¶åˆ é™¤å®ƒã€‚å› æ¤,appenderå¿…é¡»åœ¨å †ä¸Šåˆ›å»º,以防æ¢appender被é‡�å¤�销æ¯�。
@sa Logger::registerCategoryAppender()
@sa Dtk::Core::AbstractAppender
@fn void Dtk::Core::Logger::registerCategoryAppender(const QString &category, AbstractAppender *appender)
@brief 注册appender,将日志记录写到特定的类别ä¸
@details 调用这个方法,ä½ å�¯ä»¥å°†ä¸€äº›appender与命å��的类别è�”系起æ�¥ã€‚
在调用特定类别的日志写入时(直接调用带有类别å�‚æ•°çš„`write()`,写入默认类别,或使用特殊的`dCDebug()`ã€�`dCWarning()`ç‰å®�),
Loggerå�ªå°†æ—¥å¿—ä¿¡æ�¯å†™å…¥æ³¨å†Œçš„类别appender列表ä¸ã€‚
ä½ å�¯ä»¥è°ƒç”¨`logToGlobalInstance()`将所有类别的日志信æ�¯ä¼ 递给全局的Logger实例Appender(使用`registerAppender()`注册)。
如果没有特定å��称的类别应用程åº�被注册到记录器上,它就会退回到记录到`std::cerr` STLæµ�ä¸,这两ç§�方法都有简å�•çš„è¦å‘Šä¿¡æ�¯ã€‚
@param[in] category 类别�称
@param[in] appender è¦�在Logger䏿³¨å†Œçš„Appender
@note Logger对appender拥有所有æ�ƒ,它将在应用程åº�é€€å‡ºæ—¶åˆ é™¤å®ƒã€‚æ ¹æ�®è¿™ä¸€ç‚¹,appenderå¿…é¡»åœ¨å †ä¸Šåˆ›å»º,以防æ¢appender被é‡�å¤�销æ¯�。
@sa Logger::registerAppender()
@sa Logger::logToGlobalInstance()
@sa Logger::setDefaultCategory()
@fn void Dtk::Core::Logger::logToGlobalInstance(const QString &category, bool logToGlobal = false)
@brief 将一些日志类别与全局日志实例应用者�系起�。
如果logToGlobal设置为 "true",所有到指定类别的Logger的日志消�也将被写入全局日志实例appenders(使用`registerAppender()`注册)
默认情况下,所有到特定类别的消�都�写到特定的类别应用者
(使用 `registerCategoryAppender()` 注册)
@param[in] category 类别�称
@param[in] logToGlobal 是�将日志写入全局日志appenders
@sa Logger::registerAppender()
@sa Logger::globalInstance()
@sa Logger::registerCategoryAppender()
@fn void Dtk::Core::Logger::setDefaultCategory(const QString &category);
QString defaultCategory()
@brief 设置默认的日志类别
所有到这个类别应用的日志信�也将被写入一般的日志实例应用(使用[registerAppender](@ref registerAppender)方法注册),�之亦然
特别是,任何对dDebug()�的调用都将被视为类别日志
æ‰€ä»¥ä½ ä¸�需è¦�用dCDebug()å®�æ�¥æŒ‡å®šç±»åˆ«å��ç§°
è¦�å�–æ¶ˆé»˜è®¤çš„ç±»åˆ«ï¼Œä¼ é€’ä¸€ä¸ªç©ºå—符串作为å�‚æ•°
@param[in] category 类别�称
@note "category "æ ¼å¼�æ ‡è®°å°†è¢«è®¾ç½®ä¸ºæ‰€æœ‰è¿™äº›æ¶ˆæ�¯çš„类别å��ç§°
@sa Dtk::Core::AbstractStringAppender::setFormat()
@sa Logger::defaultCategory()
@sa Logger::registerCategoryAppender()
@sa Logger::logToGlobalInstance()
@fn QString Dtk::Core::Logger::defaultCategory()
@brief 返回默认的日志类别�称
@sa Logger::setDefaultCategory()
@fn void Dtk::Core::Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
@brief 写入日志记录。
将带有所�供�数的日志记录写给所有注册的应用
@param[in] time 时间戳
@param[in] level 日志记录ç‰çº§
@param[in] file ç›®æ ‡æ–‡ä»¶å��
@param[in] line �输出的行数
@param[in] func 输出的函数�称
@param[in] category 日志类别
@param[in] msg 输出信�
@note 使用`Logger::Fatal`日志级别记录日志记录将导致调用STL `abort()`函数,
è¿™å°†ä¸æ–ä½ çš„è½¯ä»¶çš„è¿�行并Core dump
@sa Logger::LogLevel
@sa Dtk::Core::AbstractAppender
@fn void Dtk::Core::Logger::write(LogLevel level, const char *file, int line,
const char *func, const char *category, const QString &msg)
@brief 这是为方便而æ��供的é‡�载函数。它的行为与å�Œå��函数类似,æ¤å‡½æ•°æ— éœ€ä¼ å…¥timeå�‚æ•°
@note 这个函数使用了`QDateTime::currentDateTime()`用获得的当�时间戳
@sa Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
@param[in] level 日志记录ç‰çº§
@param[in] file ç›®æ ‡æ–‡ä»¶å��
@param[in] line �输出的行数
@param[in] func 输出的函数�称
@param[in] category 日志类别
@param[in] msg 输出信�
@fn QDebug Dtk::Core::Logger::write(LogLevel level, const char *file,
int line,const char *func, const char *category)
@brief 这是为方便而æ��供的é‡�载函数。它的行为与å�Œå��函数类似,æ¤å‡½æ•°æ— éœ€ä¼ å…¥messageå�‚æ•°
@details 这个函数�接�任何日志信�作为�数。它返回的是�以使用�函数写入的`QDebug`对象
ä¾‹å¦‚ï¼Œä½ å�¯èƒ½æƒ³å†™ï¼š
@code
dDebug() << "This is the size" << size << "of the element" << elementName;
@endcode
而�是写为:
@code
dDebug(QString(QLatin1String("This is the size %1x%2 of the element %3")).arg(size.x()).arg(size.y()).arg(elementName));
@endcode
è¿™æ ·ä¼šæ›´ä¼˜é›…ä¸€äº›
请考虑阅读Qtå�‚考文档,了解QDebugç±»çš„ä½¿ç”¨è¯æ³•
@note 这个�载肯定是最好用的一个�载,但是代价是它会比其他的�载更为慢
@sa Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
@param[in] level 日志记录ç‰çº§
@param[in] file ç›®æ ‡æ–‡ä»¶å��
@param[in] line �输出的行数
@param[in] func 输出的函数�称
@param[in] category 日志类别
@fn void Dtk::Core::Logger:: writeAssert(const char *file, int line,
const char *func, const char *condition)
@brief 写入æ–言
@details 这个函数使用write()函数æ�¥å†™æ–言记录
æ–言记录总是使用`Logger::Fatal`日志级别æ�¥å†™,这将导致程åº�çš„ä¸æ¢å’Œæ ¸å¿ƒè½¬å‚¨(core dump)的生æˆ�(如果支æŒ�)
写入appenders的信æ�¯ä¸Žä¼ å…¥å�‚数相å�Œ,å‰�缀为 `ASSERT:`
@param[in] file ç›®æ ‡æ–‡ä»¶å��
@param[in] line �输出的行数
@param[in] func 输出的函数�称
@note ä¸�建议直接调用这个函数,ä½ å�¯ä»¥ç›´æŽ¥è°ƒç”¨`LOG_ASSERT`å®�,它将为这个函数æ��供所有需è¦�的信æ�¯
@sa Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
*/
dtkcore-6.7.46/docs/log/RollingFileAppender.zh_CN.dox 0000664 0000000 0000000 00000006306 15226157704 0022401 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/RollingFileAppender.h
@class Dtk::Core::RollingFileAppender
@brief RollingFileAppender类扩展了FileAppender,使日志文件在按照用户指定的频率进行滚动
@details
该类是基于`Log4Qt.DailyRollingFileAppender`类[Log4Qt](http://log4qt.sourceforge.net/)
并具有相å�Œçš„æ—¥æœŸæ¨¡å¼�æ ¼å¼�
例如,如果fileName设置为`/foo/bar`,DatePattern设置为�日滚动('.yyy-MM-dd'.log'),在2022-05-28的�夜。
日志文件`/foo/bar.log`将被å¤�制到`/foo/bar.2022-05-28.log`,2022-05-29的日志将在`/foo/bar`ä¸ç»§ç»,直到第二天滚动
logFilesLimitå�‚æ•°ç”¨äºŽåœ¨æ»šåŠ¨æœŸé—´è‡ªåŠ¨åˆ é™¤ç›®å½•ä¸æœ€æ—§çš„æ—¥å¿—文件。
(所以在任何时候,目录ä¸éƒ½ä¸�会有超过logFilesLimit的最新日志文件å˜åœ¨)
@enum Dtk::Core::RollingFileAppender::DatePattern
@brief 日志频率
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::MinutelyRollover
@brief æ¯�分钟的日期模å¼�å—符串是`.yyyy-MM-dd-hh-mm`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::HourlyRollover
@brief æ¯�å°�时的日期模å¼�å—符串是 `.yyyy-MM-dd-hh`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::HalfDailyRollover
@brief æ¯�å�Šå¤©çš„æ—¥æœŸæ¨¡å¼�å—符串是`.yyyy-MM-dd-a`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::DailyRollover
@brief æ¯�天的日期模å¼�å—符串是`.yyyy-MM-dd`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::WeeklyRollover
@brief æ¯�周的日期模å¼�å—符串是`.'yyyy-ww`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::MonthlyRollover
@brief æ¯�月的日期模å¼�å—符串是`.yyyy-MM`
@fn RollingFileAppender Dtk::Core::RollingFileAppender::RollingFileAppender()
@brief æž„é€ å‡½æ•°,默认é™�制日志文件个数是0,默认日志文件大å°�是1024*1024*20=20m
@fn DatePattern Dtk::Core::RollingFileAppender::datePattern()
@brief 返回当�的滚动更新频率
@sa RollingFileAppender::DatePattern
@fn void Dtk::Core::RollingFileAppender::setDatePattern(DatePattern datePattern)
@brief 设置日志滚动频率
@sa RollingFileAppender::DatePattern
@fn void Dtk::Core::RollingFileAppender::setDatePattern(const QString &datePattern)
@brief æ¤é‡�载是为了方便使用,å�¯ä»¥ä¼ 入一个滚动频率å—符串
@sa RollingFileAppender::DatePattern
@sa RollingFileAppender::setDatePattern(DatePattern datePattern)
@fn QString Dtk::Core::RollingFileAppender::datePatternString()
@brief 以å—符串形å¼�,返回当å‰�滚动频率
@fn void Dtk::Core::RollingFileAppender::setLogFilesLimit(int limit)
@brief 设置日志文件数�上�,最旧的文件会被滚动覆盖
@fn int Dtk::Core::RollingFileAppender::logFilesLimit()
@brief 返回设置的日志文件数�上�
@sa RollingFileAppender::setLogFilesLimit()
@fn int Dtk::Core::RollingFileAppender::setLogSizeLimit(int qint64)
@brief 设置日志文件�个文件大�上�
@fn qint64 Dtk::Core::RollingFileAppender::logSizeLimit()
@brief 返回设置的日志文件�个文件大�上�
@sa RollingFileAppender::setLogSizeLimit(int qint64)
*/
dtkcore-6.7.46/docs/log/dlogmanager.zh_CN.dox 0000664 0000000 0000000 00000004637 15226157704 0021001 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@ingroup dlog
@file include/log/LogManager.h
@class Dtk::Core::DLogManager
@brief DLogManager是dtk日志管�类,�供对日志的基础设置
@details 使用æ¤ç±»å�¯ä»¥å¾ˆæ–¹ä¾¿çš„为自己的dtk程åº�åŠ ä¸Šæ—¥å¿—,一般情况下应用如果需è¦�写入日志å�ªéœ€è¦�调用æ¤ç±»
调用相应的注册方法设置å˜å‚¨è·¯å¾„相关信æ�¯å�³å�¯
@fn static void Dtk::Core::DLogManager::registerConsoleAppender()
@brief 注册默认的控制�记录器
@fn static void Dtk::Core::DLogManager::registerFileAppender()
@brief 注册默认的文件记录器,默认的文件记录器类型为RollingFileAppender.
@note 输出日志默认文件�置为`~/.cache//.log`如果获� $HOME 环境��失败将�写日志.
如果在创建程�的时候没有指定这两个name,如果未设置organizationName,则是 `~/.cache//.log`
如果applicationName没有设置, 会fallback到进程二进制文件�
@sa DLogManager::setlogFilePath()
@fn static void Dtk::Core::DLogManager::registerJournaldAppender()
@brief 注册默认的journald记录器
@note æ¤æ–¹æ³•å�ªåœ¨linux下有效
@detials 默认输出文件ä½�置为`/var/log/journal/.journal`,å‰�æ��是æ¤ç›®å½•å˜åœ¨ä¸”有写æ�ƒé™�,
如果目录ä¸�å˜åœ¨ï¼Œsystemdå°†ä¸�会自动创建æ¤ç›®å½•,并将日志写入到`/run/log/journal/.journal`ä¸ï¼Œæ¤ç›®å½•ä¸�支æŒ�æŒ�久化å˜å‚¨ï¼Œ
将在下次���丢失。
@note 查看日志�用`journalctl`命令,查看详细信��用`journalctl -o verbose`命令,也�以使用deepin 日志查看器查看
@fn static QString Dtk::Core::DLogManager::getlogFilePath()
@brief 获å�–当å‰�的日志å˜å‚¨è·¯å¾„,包括文件å��
@fn static void Dtk::Core::DLogManager::setlogFilePath(const QString &logFilePath)
@brief 设置log文件路径。如果文件å˜åœ¨ä¸”ä¸�是log文件类型(比如文件夹)ä¼šå¯¼è‡´è®¾ç½®æ— æ•ˆå¹¶è¾“å‡ºä¸€æ�¡è¦å‘Šã€‚
@note 注æ„�,æ¤æ–‡ä»¶è·¯å¾„为包括具体文件å��çš„ç»�对路径。需è¦�æ¤æ–‡ä»¶ä¸�å˜åœ¨æˆ–者å˜åœ¨ä¸”为有效类型(xxx.log),ä¸€èˆ¬æƒ…å†µä¸‹æ— éœ€æ‰‹åŠ¨æŒ‡å®šè·¯å¾„ã€‚
@fn static void Dtk::Core::DLogManager::setLogFormat(const QString &format)
@brief è®¾ç½®æ—¥å¿—çš„æ ¼å¼�,å¦‚æžœæ²¡æœ‰è®¾ç½®æ ¼å¼�
@details é»˜è®¤çš„æ ¼å¼�为:`"%{time}{yyyy-MM-dd, HH:mm:ss.zzz} [%{type:-7}] [%{file:-20} %{function:-35} %{line}] %{message}\n"`
@sa Dtk::Core::AbstractStringAppender::format()
*/
dtkcore-6.7.46/docs/log/index.zh_CN.md 0000664 0000000 0000000 00000011042 15226157704 0017422 0 ustar 00root root 0000000 0000000 @page DLog dlog--DTK日志组件
# Dlog:DTK日志组件
## 简介
DTK日志组件,æ��供了日志的输出ã€�日志级别的设置ã€�日志文件的设置ç‰åŠŸèƒ½ã€‚ä¸ºäº†ç®€åŒ–æ—¥å¿—çš„ä½¿ç”¨ï¼Œæˆ‘ä»¬æ��供了两ç§�使用方å¼�,一ç§�是使用å®�,å�¦ä¸€ç§�是使用类。
但是更为建议使用å®�的方å¼�è¿›è¡Œä½¿ç”¨ã€‚å› ä¸ºä½¿ç”¨å®�å�¯ä»¥è¾“出更多的信æ�¯ï¼Œæ¯”如文件å��ã€�函数å��ã€�行å�·ç‰ã€‚
## 使用
### �
DTK日志组件æ��供了一系列的å®�,用于输出日志。这些å®�的定义在dloggerdefs.hä¸
如果需è¦�使用å®�,则需è¦�åœ¨ä½ çš„ä»£ç �ä¸åŒ…å�«`DLog`文件。
@note DTK更推è��使用CPPæ ‡å‡†å¼•å…¥å¤´æ–‡ä»¶çš„æ–¹å¼�,å�³ä½¿ç”¨`#include `的方å¼�引入头文件,而ä¸�是使用`#include "xxxxx.h"`的方å¼�引入头文件。
示例代ç �如下:
```cpp
#include
#include
DCORE_USE_NAMESPACE
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
#ifdef Q_OS_LINUX
DLogManager::registerJournalAppender();
#endif
DLogManager::registerConsoleAppender();
dDebug() << "this is a debug message";
return app.exec();
}
```
上述代ç �ä¸ï¼Œæˆ‘们使用了dDebug()å®�,用于输出一æ�¡debug级别的日志。在输出日志时,我们å�¯ä»¥ä½¿ç”¨`<<`è¿�算符,将多个å�˜é‡�输出到日志ä¸ã€‚
注æ„�,registerJournalAppender()仅在Linuxå¹³å�°ä¸‹æœ‰æ•ˆï¼Œå› 为journal仅在Linuxå¹³å�°ä¸‹æœ‰æ•ˆã€‚而registerConsoleAppender()则是在所有平å�°ä¸‹éƒ½æœ‰æ•ˆã€‚
### ç±»
使用类的方�需�先创建一个logger对象,然�使用logger对象的方法�输出日志,具体请��logger文档
## 注�事项
### 日志级别
DTK使用的日志级别与Qt的日志级别一致,分别为:Traceã€�Debugã€�Infoã€�Warningã€�Errorã€�Fatal。其ä¸Trace是最低级别,Fatal是最高级别。
与之��的是journal的日志级别和DTK的日志级别�一致,journal的日志级别分别为:emergency�alert�critical�error�warning�notice�info�debug。
è¿™æ˜¯å› ä¸ºjournal的日志级别是从syslogä¸ç»§æ‰¿è¿‡æ�¥çš„,而syslog的日志级别是从BSDçš„syslogä¸ç»§æ‰¿è¿‡æ�¥çš„。而DTK的日志级别是从Qt的日志级别ä¸ç»§æ‰¿è¿‡æ�¥çš„。
下表是DTK日志级别和journal日志级别的对应关系
| DTK值 | �� | �义 | syslog值 | syslog�� |
|---------|----|-------------------------------------|-------------|----------|
| dTrace | 0 | 追踪级别,å�¯ç”¨äºŽå¤§éƒ¨åˆ†ä¸�需è¦�的记录,用于内部代ç �追踪 | æ— | |
| dDebug | 1 | 调试级别,用于软件的调试。 | LOG_DEBUG | 7 |
| dInfo | 2 | 信�级别,�用于信�记录,这�能�仅对开�者有�义 | LOG_INFO | 6 |
| dWarning | 3 | è¦å‘Š,å�¯ä»¥ç”¨æ�¥è®°å½•ä½ çš„åº”ç”¨ç¨‹åº�检测到的一些é�žè‡´å‘½çš„è¦å‘Š | LOG_WARNING | 4 |
| dError | 4 | 错误,å�¯èƒ½æ˜¯ä¸€ä¸ªè¾ƒå¤§é—®é¢˜,å¯¼è‡´ä½ çš„ç¨‹åº�工作出错,但ä¸�至于崩溃 | LOG_ERR | 3 |
| dFatal | 5 | 致命错误,用于ä¸�å�¯æ�¢å¤�的错误,在写入日志记录å�Žç«‹å�³å´©æºƒåº”用程åº�(终æ¢) | LOG_EMERG | 0 |
| | | | LOG_ALERT | 1 |
| | | | LOG_CRIT | 2 |
| | | | LOG_NOTICE | 6 |
### 日志文件
å¦‚æžœä½ é€‰æ‹©ä½¿ç”¨journalä½œä¸ºæ—¥å¿—è¾“å‡ºï¼Œé‚£ä¹ˆä½ éœ€è¦�在系统ä¸å®‰è£…systemd(一般的linuxå�‘行版都会自带systemd)。并且需è¦�ç¡®ä¿�`/var/log/journal/`
目录的å˜åœ¨ï¼Œå�¦åˆ™journal会将日志写入到`/run/log/journal/`目录ä¸ã€‚
å¦‚æžœä½ é€‰æ‹©ä½¿ç”¨æŽ§åˆ¶å�°ä½œä¸ºæ—¥å¿—输出,那么ä¸�会生æˆ�日志文件。
å¦‚æžœä½ é€‰æ‹©ä½¿ç”¨æ–‡ä»¶ä½œä¸ºæ—¥å¿—è¾“å‡ºï¼Œé‚£ä¹ˆä½ éœ€è¦�ç¡®ä¿�ä½ çš„æ—¥å¿—æ–‡ä»¶æ‰€åœ¨çš„ç›®å½•å˜åœ¨ï¼Œå�¦åˆ™ä¼šå¯¼è‡´æ—¥å¿—æ–‡ä»¶æ— æ³•åˆ›å»ºã€‚
### æ—¥å¿—æ ¼å¼�
å¦‚æžœä½ é€‰æ‹©ä½¿ç”¨journal作为日志输出,且使用å®�的方å¼�è¿›è¡Œæ—¥å¿—è¾“å‡ºï¼Œé‚£ä¹ˆæ—¥å¿—çš„æ ¼å¼�为:
`[æ—¶é—´] [进程ID] [线程ID] [日志级别] [文件å��:行å�·] [函数å��] [日志内容]`ï¼Œä½ ä»…éœ€è¦�关注日志内容å�³å�¯ã€‚其他的信æ�¯éƒ½æ˜¯journalè‡ªåŠ¨æ·»åŠ çš„ã€‚
@defgroup dlog
@brief DTK日志组件
@details
DTK日志组件,æ��供了日志的输出ã€�日志级别的设置ã€�日志文件的设置ç‰åŠŸèƒ½ã€‚
对于DTK日志组件,我们�供了两�使用方�,一�是使用�,�一�是使用类。
但是更为建议使用�的方�进行使用
dtkcore-6.7.46/docs/settings/ 0000775 0000000 0000000 00000000000 15226157704 0016052 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/settings/backend/ 0000775 0000000 0000000 00000000000 15226157704 0017441 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/settings/backend/dsettingsdconfigbackend.zh_CN.dox 0000664 0000000 0000000 00000002132 15226157704 0026021 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/settings/backend/dsettingsdconfigbackend.h
@ingroup dsettings
@class Dtk::Core::DSettingsDConfigBackend dsettingsdconfigbackend.h
@brief é…�ç½®å˜å‚¨åˆ°DConfig
@fn Dtk::Core::DSettingsDConfigBackend::DSettingsDConfigBackend(const QString &name, const QString &subpath = QString(), QObject *parent = nullptr)
@brief DSettingsDConfigBackendæž„é€ å‡½æ•°,使用DConfig为é…�置文件å��,ä¿�å˜æ•°æ�®åˆ°é…�置文件。
@param[in] name �置文件�
@param[in] subpath é…�置文件å��çš„å�目录
@param[in] parent 父对象
@fn virtual QStringList Dtk::Core::DSettingsDConfigBackend::keys() const
@brief 返回Dconfig的全部键值
@return
@fn virtual QVariant Dtk::Core::DSettingsDConfigBackend::getOption(const QString &key) const
@brief 从DConfig获�键值
@param[in] key
@return
@fn virtual void QVariant Dtk::Core::DSettingsDConfigBackend::doSetOption(const QString &key, const QVariant &value)
@brief 给DConfig设置键值
@param[in] key
@param[in] value
@fn virtual void Dtk::Core::DSettingsDConfigBackend::doSync()
@brief 触å�‘DSettings将选项值ä¿�å˜åˆ°DConfig
*/ dtkcore-6.7.46/docs/settings/backend/gsettingsbackend.zh_CN.dox 0000664 0000000 0000000 00000001744 15226157704 0024502 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/settings/backend/gsettingsbackend.h
@ingroup dsettings
@class Dtk::Core::GSettingsBackend gsettingsbackend.h
@brief DSettingsçš„å˜å‚¨å�Žç«¯ä½¿ç”¨gsettings
@details ä½ å�¯ä»¥ä»Žlibdtkcore-bin䏿‰¾åˆ°æ¤å·¥å…·, 使用/usr/lib/x86_64-linux-gnu/libdtk-/DCore/bin/dtk-settings -h 获å�–帮助
@fn Dtk::Core::GSettingsBackend::GSettingsBackend(DSettings *settings, QObject *parent = nullptr)
@brief GSettingsBackendæž„é€ å‡½æ•°
@fn virtual QStringList Dtk::Core::GSettingsBackend::keys() const
@brief gsettings的全部键值
@return 返回gsettings的全部键值
@fn virtual QVariant Dtk::Core::GSettingsBackend::getOption(const QString &key) const
@brief æ ¹æ�®`key`获å�–值
@return 返回键对应的值
@fn virtual void Dtk::Core::GSettingsBackend::doSetOption(const QString &key, const QVariant &value)
@brief 设置`key`对应的值
@fn virtual void Dtk::Core::GSettingsBackend::doSync()
@brief 触å�‘DSettings将选项å�Œæ¥åˆ°å˜å‚¨
*/ dtkcore-6.7.46/docs/settings/backend/qsettingbackend.zh_CN.dox 0000664 0000000 0000000 00000002034 15226157704 0024322 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/settings/backend/qsettingbackend.h
@ingroup dsettings
@class Dtk::Core::QSettingBackend qsettingbackend.h
@brief å˜å‚¨DSettings到QSettings
@fn Dtk::Core::QSettingBackend::QSettingBackend(const QString &filepath, QObject *parent = 0)
@brief QSettingBackendæž„é€ å‡½æ•°,使用QSettings::NativeFormat将数æ�®ä¿�å˜åˆ°æŒ‡å®šè·¯å¾„。
@param[in] filepath å˜å‚¨æ•°æ�®çš„路径
@param[in] parent 父对象
@fn virtual QStringList Dtk::Core::QSettingBackend::keys() const
@brief QSettings的全部键值
@return 返回QSettings的全部键值
@fn virtual QVariant Dtk::Core::QSettingBackend::getOption(const QString &key) const
@brief æ ¹æ�®`key`获å�–值
@param[in] key �置项�称
@return 返回键对应的值
@fn virtual void Dtk::Core::QSettingBackend::doSetOption(const QString &key, const QVariant &value)
@brief 设置`key`对应的值
@param[in] key �置项�称
@param[in] value 需�设置的值
@fn virtual void Dtk::Core::QSettingBackend::doSync()
@brief 触å�‘DSettings选项值ä¿�å˜åˆ°QSettings
*/ dtkcore-6.7.46/docs/settings/dsettings.zh_CN.dox 0000664 0000000 0000000 00000017036 15226157704 0021601 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/settings/dsettings.h
@ingroup dsettings
@class Dtk::Core::DSettingsBackend dsettings.h
@brief DSettingsBackend是一个é…�ç½®å˜å‚¨ç±»çš„æŽ¥å�£
@details 简å�•的例å�:
@code
{
"groups": [{
"key": "base",
"name": "Basic settings",
"groups": [{
"key": "open_action",
"name": "Open Action",
"options": [{
"key": "alway_open_on_new",
"type": "checkbox",
"text": "Always Open On New Windows",
"default": true
},
{
"key": "open_file_action",
"name": "Open File:",
"type": "combobox",
"default": ""
}
]
},
{
"key": "new_tab_windows",
"name": "New Tab & Window",
"options": [{
"key": "new_window_path",
"name": "New Window Open:",
"type": "combobox",
"default": ""
},
{
"key": "new_tab_path",
"name": "New Tab Open:",
"type": "combobox",
"default": ""
}
]
}
]
}]
}
@endcode
读�/设置其值的示例如下:
@code
// åˆ�始化一个å˜å‚¨å�Žç«¯
QTemporaryFile tmpFile;
tmpFile.open();
auto backend = new Dtk::Core::QSettingBackend(tmpFile.fileName());
// 从jsonä¸åˆ�始化é…�ç½®
auto settings = Dtk::Core::DSettings::fromJsonFile(":/resources/data/dfm-settings.json");
settings->setBackend(backend);
// 读��置
auto opt = settings->option("base.new_tab_windows.new_window_path");
qDebug() << opt->value();
// 修改�置
opt->setValue("Test")
qDebug() << opt->value();
@endcode
@sa Dtk::Core::DSettingsOption
@sa Dtk::Core::DSettingsGroup
@sa Dtk::Core::DSettingsBackend
@sa Dtk::Widget::DSettingsWidgetFactory
@sa Dtk::Widget::DSettingsDialog
@fn Dtk::Core::DSettingsBackend::DSettingsBackend(QObject *parent = Q_NULLPTR)
@brief DSettingsBackendæž„é€ å‡½æ•°
@fn virtual QStringList DSettingsBackend::keys() const = 0;
@brief 返回全部键值
@fn virtual QVariant DSettingsBackend::getOption(const QString &key) const = 0;
@brief 获� `key` 对应的值
@fn virtual void DSettingsBackend::doSync() = 0;
@brief 开始进行å�Œæ¥
@fn virtual void DSettingsBackend::doSetOption(const QString &key, const QVariant &value) = 0;
@brief 设置`key`对应的值,并使用å˜å‚¨å�Žç«¯è¿›è¡Œå˜å‚¨ã€‚
@fn void DSettingsBackend::optionChanged(const QString &key, const QVariant &value);
@brief DSettingsOption的值�生�化时�出的信�。
@details `key` �生改�的 option 键,`value`对应键的值。
@fn void DSettingsBackend::sync();
@brief �有信�,请勿使用。
@fn void DSettingsBackend::setOption(const QString &key, const QVariant &value);
@brief �有信�,请勿使用。
@class Dtk::Core::DSettings dsettings.h
@brief DSettings是设计上为Dtk的应用程åº�æ��供统一的é…�ç½®å˜å‚¨ä»¥å�Šç•Œé�¢ç”Ÿæˆ�工具的基础库。
@details DSetting使用json作为应用�置程�的�述文件。简��说,应用查询的�置分为组/键值二个基础层级,
å¯¹äºŽä¸€ä¸ªæ ‡å‡†çš„Dtké…�置控件,一般å�ªåŒ…å�«ç»„/å�组/键值三个层级,对于超过三个层级的键值,å�¯ä»¥é€šè¿‡
DSettingsçš„API接å�£è¿›è¡Œè¯»å�–和写入,但是ä¸�èƒ½åœ¨æ ‡å‡†çš„DSettingsDialogs上显示出æ�¥ã€‚
一个简�的�置文件如下:
@code
{
"groups": [{
"key": "base",
"name": "Basic settings",
"groups": [{
"key": "open_action",
"name": "Open Action",
"options": [{
"key": "alway_open_on_new",
"type": "checkbox",
"text": "Always Open On New Windows",
"default": true
},
{
"key": "open_file_action",
"name": "Open File:",
"type": "combobox",
"default": ""
}
]
},
{
"key": "new_tab_windows",
"name": "New Tab & Window",
"options": [{
"key": "new_window_path",
"name": "New Window Open:",
"type": "combobox",
"default": ""
},
{
"key": "new_tab_path",
"name": "New Tab Open:",
"type": "combobox",
"default": ""
}
]
}
]
}]
}
@endcode
该组ä¸åŒ…å�«ä¸€ä¸ªbaseçš„root组,两个å�组: open_action/new_tab_windows,æ¯�个å�组有包å�«è‹¥å¹²é€‰é¡¹ã€‚
对于"New Window Open:"这个�置,其完整的访问id为base.new_tab_windows.new_window_path。
读�/设置其值的示例如下:
@code
// åˆ�始化一个å˜å‚¨å�Žç«¯
QTemporaryFile tmpFile;
tmpFile.open();
auto backend = new Dtk::Core::QSettingBackend(tmpFile.fileName());
// 从jsonä¸åˆ�始化é…�ç½®
auto settings = Dtk::Core::DSettings::fromJsonFile(":/resources/data/dfm-settings.json");
settings->setBackend(backend);
// 读��置
auto opt = settings->option("base.new_tab_windows.new_window_path");
qDebug() << opt->value();
// 修改�置
opt->setValue("Test")
qDebug() << opt->value();
@endcode
@sa Dtk::Core::DSettingsOption
@sa Dtk::Core::DSettingsGroup
@sa Dtk::Core::DSettingsBackend
@sa Dtk::Widget::DSettingsWidgetFactory
@sa Dtk::Widget::DSettingsDialog
@fn Dtk::Core::DSettings::DSettings(QObject *parent = Q_NULLPTR)
@brief DSettingsæž„é€ å‡½æ•°
@fn void Dtk::Core::DSettings::setBackend(DSettingsBackend *backend = nullptr)
@brief 设置å˜å‚¨å�Žç«¯
@fn static QPointer Dtk::Core::DSettings::fromJson(const QByteArray &json)
@brief 从 json ä¸èŽ·å�– DSettings,返回的数æ�®ä½¿ç”¨ä¹‹å�Žéœ€è¦�自己手动释放。
@fn static QPointer Dtk::Core::DSettings::fromJsonFile(const QString &filepath)
@brief 从 json 文件ä¸èŽ·å�– DSetting。
@fn QJsonObject Dtk::Core::DSettings::meta() const
@brief 返回JSON对象
@fn QStringList Dtk::Core::DSettings::keys() const
@brief 返回全部键值
@fn QList > Dtk::Core::DSettings::options() const
@brief 返回全部 `key` 的值
@fn QPointer Dtk::Core::DSettings::option(const QString &key) const
@brief 获� `key` 对应的值
@fn QVariant Dtk::Core::DSettings::value(const QString &key) const
@brief 获� `key` 对应的值
@fn QStringList Dtk::Core::DSettings::groupKeys() const
@brief 返回å�组全部键值
@fn QList > Dtk::Core::DSettings::groups() const
@brief 返回å�组全部 `key` 的值
@fn QPointer Dtk::Core::DSettings::group(const QString &key) const
@brief DSettings::group将递归找到å�组
@return
@fn QVariant Dtk::Core::DSettings::getOption(const QString &key) const
@brief 获� `key` 对应的值
@fn void Dtk::Core::DSettings::sync()
@brief 开始进行å�Œæ¥
@fn void Dtk::Core::DSettings::setOption(const QString &key, const QVariant &value)
@brief 设置键值
@fn void Dtk::Core::DSettings::reset()
@brief �置键值
*/
dtkcore-6.7.46/docs/settings/dsettingsgroup.zh_CN.dox 0000664 0000000 0000000 00000005011 15226157704 0022644 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/settings/dsettingsgroup.h
@ingroup dsettings
@class Dtk::Core::DSettingsGroup dsettingsgroup.h
@brief 一组DSettings选项的集å�ˆ,也å�¯ä»¥åŒ…å�«å�组。
@fn Dtk::Core::DSettingsGroup::DSettingsGroup(QObject *parent = Q_NULLPTR)
@brief DSettingsGroupæž„é€ å‡½æ•°
@fn QPointer Dtk::Core::DSettingsGroup::parentGroup() const
@brief 获�当�组的父组
@return
@fn void Dtk::Core::DSettingsGroup::setParentGroup(QPointer< DSettingsGroup > parentGroup)
@brief 设置当�组的父组为 `parentGroup`
@fn QString Dtk::Core::DSettingsGroup::key() const
@brief 返回这个组的键,会包�全部的父组的键
@return 返回这个组的键,会包�全部的父组的键
@fn QString Dtk::Core::DSettingsGroup::name() const
@brief 返回这个组�称,它�能被翻译。
@return 返回这个组�称
@fn bool Dtk::Core::DSettingsGroup::isHidden() const
@brief 检查这个选项组是�会在界�上显示
@return true 表示则这个选项组会显示出�
@fn QPointer Dtk::Core::DSettingsGroup::childGroup(const QString &groupKey) const
@brief 返回给定键在选项组ä¸å¯¹åº”çš„å�组。`groupKey`å�组的键
@return 返回å�组的指针
@fn QPointer Dtk::Core::DSettingsGroup::option(const QString &key) const
@brief æ ¹æ�®é”®å€¼èŽ·å�–选项。`key`选项的完整键
@return 返回对应键值选项指针
@fn QList > Dtk::Core::DSettingsGroup::childGroups() const
@brief 列出组下é�¢æ‰€æœ‰çš„直接å�组。
@return 返回所有å�组指针列表
@fn QList > Dtk::Core::DSettingsGroup::childOptions() const
@brief 列出组下�所有的直接选项。
@return 返回所有å�选项指针列表
@fn QList > Dtk::Core::DSettingsGroup::options() const
@brief 列出组下�所有的选项。
@return 返回所有选项指针列表
@fn QPointer Dtk::Core::DSettingsGroup::fromJson(const QString &prefixKey, const QJsonObject &group)
@brief 将json对象转化为DSettingsGroup。`prefixKey` 组键值�缀 `group` 待��列化的json对象
@return 返回解�json�的组指针
@sa QPointer Dtk::Core::DSettingsOption
@fn void Dtk::Core::DSettingsGroup::parseJson(const QString &prefixKey, const QJsonObject &group)
@brief 将json对象转化为DSettingsGroup。`prefixKey` 组键值�缀 `group` 待��列化的json对象
@sa QPointer Dtk::Core::DSettingsGroup::fromJson(const QString &prefixKey, const QJsonObject &json)
*/
dtkcore-6.7.46/docs/settings/dsettingsoption.zh_CN.dox 0000664 0000000 0000000 00000006600 15226157704 0023025 0 ustar 00root root 0000000 0000000 /*!
@~chinese
@file include/settings/dsettingsoption.h
@ingroup dsettings
@class Dtk::Core::DSettingsOption dsettingsoption.h
@brief DSettingsOption是DSettings的基本å�•å…ƒ,ç”¨äºŽå˜æ”¾ä¸€å¯¹é”®-值数æ�®ã€‚
@fn Dtk::Core::DSettingsOption::DSettingsOption(QObject *parent = Q_NULLPTR)
@brief DSettingsOptionæž„é€ å‡½æ•°
@fn QPointer Dtk::Core::DSettingsOption::parentGroup() const
@brief 当�选项的直接上级组
@return 返回当�选项的直接上级组
@fn void Dtk::Core::DSettingsOption::setParentGroup(QPointer parentGroup)
@brief 修改当�选项的上级组
@param[in] parentGroup 上级组
@fn QString Dtk::Core::DSettingsOption::key() const
@brief 当�选项的键值
@return 返回当�选项的键值
@fn QString Dtk::Core::DSettingsOption::name() const
@brief 当�选项的�称
@return 返回当�选项的�称
@fn bool Dtk::Core::DSettingsOption::canReset() const
@brief 选项是��以�置,如果�以�置,在调用reset方法�,选项的值会���始值。
@return 如果�以�置则为true
@fn QVariant Dtk::Core::DSettingsOption::defaultValue() const
@brief 选项的默认值
@return 返回选项的默认值
@fn QVariant Dtk::Core::DSettingsOption::value() const
@brief 选项的当�值
@return 返回选项的当�值
@fn QVariant Dtk::Core::DSettingsOption::data(const QString &dataType) const
@param[in] dataType 数�类型
@brief 选项的附件data,用于未选项设置一些�外的辅助属性。
@return 数�类型对应的数�.
@sa QObject::property
@sa Dtk::Core::DSettingsOption::setData
@fn QString Dtk::Core::DSettingsOption::viewType() const
@brief 选项的控件类型
@return 返回选项的控件类型
@sa Dtk::Widget::DSettingsWidgetFactory
@fn bool Dtk::Core::DSettingsOption::isHidden() const
@brief 检查选项是�会在界�上显示
@return 如果显示则返回true,�则返回false。
@fn static QPointer Dtk::Core::DSettingsOption::fromJson(const QString &prefixKey, const QJsonObject &json)
@brief 从json对象ä¸å��åº�列化出一个选项对象
@param[in] prefixKey 选项的�缀
@param[in] json 待��列化的json对象
@return 返回解�完��的 `option` 数�
@fn void Dtk::Core::DSettingsOption::setValue(QVariant value)
@brief 设置选项的当�值.
@param[in] value 选项的当�值
@fn void Dtk::Core::DSettingsOption::setData(const QString &dataType, QVariant value)
@brief ä¸ºé€‰é¡¹æ·»åŠ è‡ªå®šä¹‰å±žæ€§
@param[in] dataType 选项的扎属性数�id,对�个选项必须唯一
@param[in] value 选项id对应的值
@sa Dtk::Core::DSettingsOption::data
@fn void Dtk::Core::DSettingsOption::parseJson(const QString &prefixKey, const QJsonObject &option)
@brief 从json对象ä¸å��åº�列化,并设置自身的值。
@param[in] prefixKey 选项的�缀
@param[in] option 待��列化的json对象
@sa QPointer Dtk::Core::DSettingsOption::fromJson(const QString &prefixKey, const QJsonObject &json)
@fn void Dtk::Core::DSettingsOption::valueChanged(QVariant value)
@brief 选项的数��化时�出改信�
@param[in] value �生改�的数�
@fn void Dtk::Core::DSettingsOption::dataChanged(const QString &dataType, QVariant value);
@brief 选项的附件的�外数��化时�出改信�,�以看作这个值的属性�生�化。
@param[in] dataType 改�的数�类型
@param[in] value �生改�的数�
*/ dtkcore-6.7.46/docs/settings/index.zh_CN.md 0000664 0000000 0000000 00000010224 15226157704 0020502 0 ustar 00root root 0000000 0000000 @page dsettings dsettings--dtk设置工具组件
# DSettings
## DSettings:dtk设置组件
[dsettings.h 详细文档](dsettings_8h.html)
项目目录结构如下:
```bash
├── CMakeLists.txt
├── data
│ └── settings.json
├── data.qrc
└── main.cpp
```
CMakeLists.txt:
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(dsetting-example VERSION 1.0.0 LANGUAGES CXX)# 指定项目å��ç§°, 版本, è¯è¨€ cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++æ ‡å‡†
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++æ ‡å‡†è¦�求,至少为11以上
set(CMAKE_AUTORCC ON) # support qt resource file # 支�qt资�文件
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支� clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本�于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包�当�目录
endif()
find_package(DtkCore REQUIRED) # 寻找Dtk组件Core
add_executable(${PROJECT_NAME} # 生��执行文件
main.cpp
data.qrc
)
target_link_libraries(${PROJECT_NAME} PRIVATE # æ·»åŠ éœ€è¦�链接的共享库
Dtk::Core
)
```
settings.json:
```json
{
"groups": [{
"key": "base",
"name": "Basic settings",
"groups": [{
"key": "open_action",
"name": "Open Action",
"options": [{
"key": "alway_open_on_new",
"type": "checkbox",
"text": "Always Open On New Windows",
"default": true
},
{
"key": "open_file_action",
"name": "Open File:",
"type": "combobox",
"default": ""
}
]
},
{
"key": "new_tab_windows",
"name": "New Tab & Window",
"options": [{
"key": "new_window_path",
"name": "New Window Open:",
"type": "combobox",
"default": ""
},
{
"key": "new_tab_path",
"name": "New Tab Open:",
"type": "combobox",
"default": ""
}
]
}
]
}]
}
```
data.qrc
```xml
data/settings.json
```
main.cpp
```cpp
#include
#include
#include
#include
#include
#include
#include
DCORE_USE_NAMESPACE
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// åˆ�始化一个å˜å‚¨å�Žç«¯
QTemporaryFile tmpFile;
tmpFile.open();
QPointer backend = new QSettingBackend(tmpFile.fileName());
// 从jsonä¸åˆ�始化é…�ç½®
QPointer settings = DSettings::fromJsonFile(":/data/settings.json");
settings->setBackend(backend);
// 读��置
// 该组ä¸åŒ…å�«ä¸€ä¸ªbaseçš„root组,两个å�组: open_action/new_tab_windows,æ¯�个å�组有包å�«è‹¥å¹²é€‰é¡¹ã€‚
// 对于"New Window Open:"这个�置,其完整的访问id为base.new_tab_windows.new_window_path。
QPointer opt = settings->option("base.new_tab_windows.new_window_path");
qDebug() << opt->value();
// 修改�置
opt->setValue("Test");
qDebug() << opt->value();
// 获�所有keys
QStringList keys = settings->keys();
qDebug() << keys;
// base.open_action对应的组
QPointer group = settings->group("base.open_action");
qDebug() << group->key();
return a.exec();
}
```
编译�行:
```bash
cmake -Bbuild
cmake --build build
./build/dsetting-example
```
�行结果如下图:

@defgroup dsettings
@brief dtk设置组件
dtkcore-6.7.46/docs/src/ 0000775 0000000 0000000 00000000000 15226157704 0015001 5 ustar 00root root 0000000 0000000 dtkcore-6.7.46/docs/src/dciicon-tree.png 0000664 0000000 0000000 00000162661 15226157704 0020070 0 ustar 00root root 0000000 0000000 ‰PNG
IHDR » ~Ûè pHYs Ä Ä•+ IDATxœì}wœÝ¶•îyûÜé£QiÔâ"Ùª–e[î݉�ÞœMÛ}»É&qzsz}Ù’¼Í&›MOìljKÜâ*7[¶Õ{ïšÞn¿—|ÜÆ€ Þ2â÷[—$p ‚çÃ9 �µ*Ä•�!52ÿ´Î…ÊIh‰�²©‚利PìmÃ
Õf"Õâºñ2czãSVÎ’a.Xט©Mê ÅÎÂQÞþÅ–^ek»ƒ2Øá°¿¨ <†‰E;YŠ€f*‹�œãÒǘÐ^·Ê¥+£
•³½õb«Á¬2�*vö̵ãÅ“#Ö’ ªq(V±W‰÷N±¥çhMÛ]¥Z<.‚ì‹!dSiWÄÁUJàèµ…äP«iƒ~kbD<°JÌ÷Œ”ó�‰…VwsíÕšÆ
6ûX�Â4ì°n7l+ïhÉ®–JChŽÈÆ\ÄÉw‰ø‡d\Æ]\¾MÕ6?q4·Xe7J°¸#8…úQ3³ÚjßP•*±*uò¬U’„ò�þ›h«Tb|Õø§–~§[Oû 7…`•ªá"T)dÄ‚cšD„:»’Y3ž-±Ÿb<æ°*°««qVps(Ï*›¹ öCR–”"„tD«LÄÐ|Ÿgþæ¯
>`Uä„T•þîPò{uH\3géÂõ¬@ôÅ!®qpµvìg›D Iqnr
âl¾u
;¬ 2ÞhJd—jž!˜—!žôNP‰öª‚e&GºhÈ”É)¹© å{ÌœîÕyûsº/ÁYq·ÙŽ0¤[Ø`›HÄær+î&œ„€\e'ÙxýEpó�¨ *VîJ(ª¬ž·nè°Í¾ü?!I’rmMªaƒì¸¶×¤`( ›P/[äeJÁ��_H¾UY3•î�K¯UèQsÁoAÕgR„W¡
zÊ©ª«!ª
ð¢V
Egt&�.^@fý?ŒÙXùÀ$Ÿ‡!ªÄ%¢ª w•ᲕÕ𓵃ê–êqôjóËjdÈÈgaT1Ó^Ô4ÂÞKáWM„£r Ð\DaôÒœY]ŸÓÂ`dº Å=ÿ ¬�9CIjÞ?ж¯À4‚×$âñ}pÙ] å‡Rìëd„È¢9m2(æ'×îïȬ8[±6<7�Ž‚N¨sˆ ‘U3ÉâŸ{àËÅÀNÇÿ5ÅyX˜&V`L„ˆ3j–¥²eMÄX9ì=«
cB™Y³Y@w¶¨[B£}u©µÑ-DC-O<÷�õƫ؉5§Ú0|À)ÞMÿÀJ„½ë¼Ê\mo¦kL% Ø-«œÆ �E~"M‹gb»¾ØT+P)w[¬Fì2/DÙq�Õ÷énSÕ:¹sç �±g,ó
[L*ê)�‰•!2À¡ Ҏȹ,E#ÄÙg1îØqj\Ñïqí™)JyqΙöÀE��Dª½›!b«æÂ\hdÀÓ#¹ù€O £tO;Û0™®Û(¨Q:M„5I•´r¶ÁÝè“�þÇì" Ž¡'IÜ%syj…t%3� ¼jU¤Ï€¹µøÆú¥”Œ1&„OEWð•„¢”?½£‰UÚë9뢱å2SÙˆ�¯D@ã6êg‹pM-xr[pÝ%aѨ͂Už˜bD||ÀhÝí)áõ*Îb`Á
„,À8{¬ ñ²>ž¸mŒ¡«ùŒòY3Á.S>/Å©‹*@
nßRùƦ«E\Y„JÐÄxŽ|š�Š—xFò¸H1#ÁŸà ¿›„?Ïr©·Ab]S„€Z2+6X£ŸÇ‰`A•30ªØˆ�0vÃù‹$ðÙËšhq·P��žT€ø�‹| ™?`#¦SŒÙ´Ù‹å!î••ô€ò�&(Ð6r±Í&`¨P€�¡ßŠ*Eœ4…rä9,†™¬YµÒ¶Ýà1˜Ãó5Áòîð>xênPÍ!hn˜´ìÜ·\pÎ�[ö>üÌË?ÖŽ/£á¶åç¿}^÷åMщ™Lü/Oéèé׈‚xgøù€)ÂÅ'”Y•=1å_…Vuâ.�Í?F0ãš"£`ËÍ4ƒMqä.X‚ëŽ *ulEÓáB”É®ùfšIá¾uµ;¯Ý’!„XƒBs§]rÓ¥Ÿ;zzËðèiCÚÆ† ·_ùdzì©�?ì>¢‚O%Ž>pj¢I ÞÅŸ:DV ¼¡Î“‰×<óöXèF©|Í]b`„s÷‘iÉ/>�«F qúcÔ¨«*ëøž½‚n§ˆ2-ŠU»\ÁE ¬¦Ÿ„#§^ý僌%n»âëÚÜТsnI¦Fïö®t&NÓ�ÿI†.QíÄ‹�îÛÂ,àXNhRMž'ÀØ ”�YM•ŽéKK:"@ÿH±gaU…IÌQ,ŽcJòäp±©ùZ‹Ùc# ¶‘9†
8r®•@m‡R¢Ú¤§ÏµnÌdj¶à¿*í ÷ÚUÃ=”`«í.dÜ7¬fù �—@7è¡-³a¸665L