Compare commits

...

516 Commits

Author SHA1 Message Date
github-actions[bot] b03849d6de chore: New release 5.7.25
Log:
2025-10-30 13:59:43 +00:00
zhangkun 187be9a947 feat: improve icon theme generation with scalable support
1. Add SCALABLE_SIZE constant for scalable icon directories
2. Change foundSize return type from uint to int to support scalable
detection
3. Modify writeScaledImage to accept baseSize parameter instead of
parsing from directory
4. Move directory parsing logic to writeImage function for better
organization
5. Add scalable directory detection in size parsing logic
6. Use QImageReader's scaledSize for better image scaling quality
7. Fix error handling to continue processing instead of exiting on first
error

Log: Improved icon theme generation with better scalable icon support

Influence:
1. Test with icon directories containing scalable icons
2. Verify different scale factors work correctly
3. Test error handling when encountering invalid image files
4. Verify image quality at various scales
5. Test with both fixed-size and scalable icon directories

feat: 改进图标主题生成,支持可缩放图标

1. 添加 SCALABLE_SIZE 常量用于可缩放图标目录
2. 将 foundSize 返回类型从 uint 改为 int 以支持可缩放检测
3. 修改 writeScaledImage 函数,接受 baseSize 参数而非从目录解析
4. 将目录解析逻辑移至 writeImage 函数以获得更好的代码组织
5. 在尺寸解析逻辑中添加可缩放目录检测
6. 使用 QImageReader 的 scaledSize 获得更好的图像缩放质量
7. 修复错误处理,在遇到错误时继续处理而非立即退出

Log: 改进图标主题生成,提供更好的可缩放图标支持

Influence:
1. 测试包含可缩放图标的目录
2. 验证不同缩放因子是否正确工作
3. 测试遇到无效图像文件时的错误处理
4. 验证各种缩放比例下的图像质量
5. 测试固定尺寸和可缩放图标目录
2025-10-23 08:41:20 +00:00
github-actions[bot] 16145642e1 chore: New release 5.7.24
Log:
2025-10-16 20:13:34 +08:00
zhangkun 39a50cca37 feat: improve icon size detection and duplicate handling
1. Added foundSize function to parse icon size from directory names
using multiple strategies
2. Implemented duplicate entry detection to skip existing icons in DCI
files
3. Added QFileInfo and QLogging includes for new functionality
4. Removed debug-specific code that was adding unnecessary prefixes
5. Improved size detection logic to handle both numeric and "NxN" format
directory names
6. Added fallback to parent directory when current directory name
doesn't contain size information

Log: Improved icon theme generation with better size detection and
duplicate prevention

Influence:
1. Test icon theme generation with various directory naming conventions
2. Verify that duplicate icons are properly skipped during generation
3. Test with directories containing numeric names vs "widthxheight"
format
4. Verify fallback to parent directory size detection works correctly
5. Check that existing icons in DCI files are not overwritten
6. Test with different directory structures and naming patterns

feat: 改进图标尺寸检测和重复项处理

1. 添加 foundSize 函数,使用多种策略从目录名解析图标尺寸
2. 实现重复条目检测,跳过 DCI 文件中已存在的图标
3. 添加 QFileInfo 和 QLogging 包含以支持新功能
4. 移除添加不必要前缀的调试专用代码
5. 改进尺寸检测逻辑,支持数字和"NxN"格式的目录名
6. 在当前目录名不包含尺寸信息时,添加回退到父目录的检测

Log: 改进图标主题生成,提供更好的尺寸检测和重复项预防

Influence:
1. 测试使用不同目录命名约定的图标主题生成
2. 验证在生成过程中重复图标是否被正确跳过
3. 测试包含数字名称与"宽x高"格式的目录
4. 验证回退到父目录尺寸检测是否正常工作
5. 检查 DCI 文件中现有图标是否不会被覆盖
6. 测试不同的目录结构和命名模式
2025-10-16 11:05:03 +00:00
yeshanshan 2767618f84 fix: fix Qt6 compilation error with libxdg
1. Restructured the conditional logic for libxdg usage to avoid Qt6
compilation errors
2. Moved the DTK_DISABLE_LIBXDG check to outer scope to properly handle
both Qt5 and Qt6
3. Added explicit Qt6 handling by disabling libxdg when not using Qt5
4. This resolves build failures in Qt6 environments where
Qt5XdgIconLoader is not available

The previous implementation only checked for Qt5XdgIconLoader when
using Qt5, but didn't properly handle Qt6 scenarios, causing compilation
errors when building with Qt6.

fix: 修复 Qt6 下 libxdg 编译错误

1. 重构了 libxdg 使用的条件逻辑以避免 Qt6 编译错误
2. 将 DTK_DISABLE_LIBXDG 检查移到外层作用域以正确处理 Qt5 和 Qt6
3. 添加了明确的 Qt6 处理逻辑,在非 Qt5 环境下禁用 libxdg
4. 解决了在 Qt6 环境中因 Qt5XdgIconLoader 不可用而导致的构建失败问题

之前的实现只在 Qt5 环境下检查 Qt5XdgIconLoader,但没有正确处理 Qt6 场
景,导致在使用 Qt6 构建时出现编译错误。
2025-10-16 17:39:56 +08:00
ComixHe 36c06be095 fix: correct lockfile path construction
Move process ID namespace handling from lockfile to socket_key variable to ensure consistent lock file paths.
Reorganize code structure for proper execution order.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-10-16 13:14:00 +08:00
ComixHe 80db4dd238 feat: support Qt 6.10
Also adjusting the logic for finding QtXDGIconLoader.
This library only be used in Qt 5.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-10-13 13:03:30 +08:00
github-actions[bot] 3d0713f7a2 chore: New release 5.7.23
Log:
2025-09-25 17:44:27 +08:00
Mingcong Bai af1259edbb fix(tests): fix build for Qt 6.9
Qt 6.9 renamed <private/qdesktopunixservices_p.h> to
<private/qgenericunixservices_p.h>, as well as some of the classes along
the same format (QGenericUnixServices => QDesktopUnixServices).

Add a condition test with QT_VERSION to fix build with Qt >= 6.9.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
2025-09-24 16:17:19 +08:00
Robertkill 3b5ba9bbda fix: 解决控制中心闪烁问题
初始化时立即读取并设置主题色,避免异步出现主题色闪烁问题

Log: 修复配置管理以使用标准 DConfig 接口

Influence:
1. 测试主题切换功能以确保正确的主题类型检测
2. 验证动画设置使用新的配置方法正常工作
3. 检查主题偏好是否正确保存和恢复
4. 测试配置值缺失或无效时的应用程序行为

PMS: BUG-334439
2025-09-18 13:26:13 +08:00
github-actions[bot] c8f2955bd0 chore: New release 5.7.22
Log:
2025-09-04 20:06:26 +08:00
zhangkun 96d0b45dd0 feat: add T11 font size and adjust T5 default
Added T11 font size with 8px default value to extend the font size
options
Modified T5 default size from 17px to 16px for better size progression
Updated font pixel size array to include the new T11 size
Added t11() accessor method and corresponding test case
cherry-pick from: 2c3b351b43

feat: 添加 T11 字体大小并调整 T5 默认值

添加了默认值为 8px 的 T11 字体大小以扩展字体大小选项
将 T5 默认大小从 17px 修改为 16px 以获得更好的大小递进
更新了字体像素大小数组以包含新的 T11 大小
添加了 t11() 访问器方法和相应的测试用例
cherry-pick from: 2c3b351b43

pms: BUG-310879
2025-09-01 11:27:52 +08:00
ComixHe 00109d07e3 fix: improve PID namespace detection in setSingleInstance
Replace stat-based PID namespace detection with QFileInfo approach
for better compatibility across different kernel versions and
containerized environments. Add robust parsing and fallback handling
for namespace format variations.

PMS: BUG-329663
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-08-19 10:14:09 +08:00
github-actions[bot] d2c2efc49a chore: New release 5.7.21
Log:
2025-08-14 20:28:21 +08:00
yeshanshan 9842a0644e fix: resolve compilation warnings and deprecation issues
1. Fixed deprecated enum usage by adding explicit deprecation comment
for IconAttibute
2. Added QT version checks for QMouseEvent::globalPos() vs
globalPosition() API changes
3. Marked unused parameters with Q_UNUSED to suppress warnings
4. Added version checks for DTK 6.0 API changes
5. Fixed test class visibility warnings by adding GTEST_API_ prefix
6. Improved warning messages to use modern qWarning() stream syntax
7. Added [[maybe_unused]] attribute for DEFINE_CONST_CHAR macro
8. Added version checks for QVariant type handling differences between
Qt5/Qt6
9. Fixed potential memory leak in DIconTheme::isXdgIcon() logic
10. Added proper type checks for QVariant conversions

Log: Fixed various compilation warnings and deprecated API usage

Influence:
1. Verify icon rendering still works correctly after enum changes
2. Test window movement functionality with both Qt5 and Qt6
3. Check palette handling in DGuiApplicationHelper
4. Verify test cases still pass with updated class visibility
5. Test QVariant conversions in DPlatformHandle properties

fix: 解决编译警告和废弃API问题

1. 为废弃的IconAttibute枚举添加明确的弃用注释
2. 为QMouseEvent::globalPos()和globalPosition()API变更添加QT版本检查
3. 使用Q_UNUSED标记未使用参数以消除警告
4. 添加DTK 6.0 API变更的版本检查
5. 通过添加GTEST_API_前缀修复测试类可见性警告
6. 改进警告消息使用现代qWarning()流式语法
7. 为DEFINE_CONST_CHAR宏添加[[maybe_unused]]属性
8. 添加Qt5/Qt6之间QVariant类型处理的版本检查
9. 修复DIconTheme::isXdgIcon()中潜在的内存泄漏问题
10. 为QVariant转换添加适当的类型检查

Log: 修复各种编译警告和废弃API使用问题

Influence:
1. 验证图标渲染在枚举变更后仍能正常工作
2. 测试Qt5和Qt6下的窗口移动功能
3. 检查DGuiApplicationHelper中的调色板处理
4. 验证更新类可见性后测试用例是否仍能通过
5. 测试DPlatformHandle属性中的QVariant转换
2025-08-14 11:39:10 +00:00
yeshanshan 9d3d659afe feat: add flags parameter to DDciIconPlayer play method
1. Added new overloaded play method that accepts
DDciIconImagePlayer::Flags parameter
2. Modified existing play method to call new method with default
IgnoreLastImageLoop flag
3. Updated documentation to reflect new method signature and behavior
4. Allows more control over icon playback behavior through flags
parameter

feat: 为 DDciIconPlayer 的 play 方法添加 flags 参数

1. 添加了新的重载 play 方法,接受 DDciIconImagePlayer::Flags 参数
2. 修改现有 play 方法以使用默认的 IgnoreLastImageLoop 标志调用新方法
3. 更新文档以反映新的方法签名和行为
4. 通过 flags 参数提供对图标播放行为的更多控制
2025-08-07 14:38:07 +08:00
github-actions[bot] eaf96e824d chore: New release 5.7.20
Log:
2025-07-31 20:29:47 +08:00
zhangkun 7c05bace4a feat: switch to QGuiApplication for SVG rendering
1. Changed from QCoreApplication to QGuiApplication to support SVG
rendering
2. Updated CMakeLists to link against QtGui instead of QtCore
3. This change is necessary because SVG rendering requires GUI
components
4. Note: CLI environment users must set QT_QPA_PLATFORM=offscreen

feat: 切换到 QGuiApplication 以支持 SVG 渲染

1. 从 QCoreApplication 切换到 QGuiApplication 以支持 SVG 渲染
2. 更新 CMakeLists 链接 QtGui 替代 QtCore
3. 此变更是必要的因为 SVG 渲染需要 GUI 组件
4. 注意:命令行环境用户需要设置 QT_QPA_PLATFORM=offscreen
2025-07-31 13:42:53 +08:00
yeshanshan a892ddc4e2 feat: add concurrent processing for DCI icon conversion
1. Added QtConcurrent support for parallel processing of icon files
2. Implemented error handling with custom DciProcessingError exception
3. Grouped icon files by name to avoid concurrent access to same DCI
file
4. Improved performance by processing icon groups in parallel
5. Added proper error propagation and atomic flag for early termination
6. Maintained existing functionality while adding concurrency
7. Each icon group is processed as a unit to ensure thread safety with
DCI files

feat: 为DCI图标转换添加并发处理

1. 添加QtConcurrent支持以实现图标文件的并行处理
2. 使用自定义DciProcessingError异常实现错误处理
3. 按名称分组图标文件以避免对同一DCI文件的并发访问
4. 通过并行处理图标组提高性能
5. 添加适当的错误传播和原子标志用于提前终止
6. 在添加并发性的同时保持现有功能
7. 每个图标组作为一个单元处理以确保DCI文件的线程安全
2025-07-24 20:49:35 +08:00
yeshanshan 65cf7b4161 refactor: move icon finder functionality to separate tool
1. Removed icon finding functionality from dci-icon-theme to make it a
pure TUI tool
2. Created new dci-iconfinder tool specifically for icon lookup
operations
3. Changed dci-icon-theme to use QCoreApplication instead of
QGuiApplication
4. Updated version handling to use DTK version macros
5. Removed GUI dependencies from dci-icon-theme
6. Added proper documentation for both tools

This change was necessary to separate concerns and allow dci-icon-theme
to be used in environments without GUI dependencies while maintaining
icon lookup capabilities in a dedicated tool.

refactor: 将图标查找功能移至独立工具

1. 从dci-icon-theme中移除图标查找功能,使其成为纯命令行工具
2. 创建新的dci-iconfinder工具专门处理图标查找操作
3. 将dci-icon-theme改为使用QCoreApplication而非QGuiApplication
4. 更新版本处理以使用DTK版本宏
5. 移除dci-icon-theme对GUI的依赖
6. 为两个工具添加了适当的文档

此变更是为了分离关注点,使dci-icon-theme可以在没有GUI依赖的环境中使用,
同时将图标查找功能保留在专用工具中。
2025-07-23 04:16:59 +00:00
ComixHe 6b7e941839 feat: add pid namespace isolation to setSingleInstance
Enhance setSingleInstance to support multiple PID namespaces for
containerized environments. This prevents applications in different
containers from interfering with each other's single instance detection.

The lockfile format becomes: {original_name}_{namespace_inode}.lock,
ensuring unique identification across different PID namespaces.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-07-22 14:19:01 +08:00
yeshanshan dc2eaeb61c docs: update REUSE license file for CHANGELOG
Added CHANGELOG.md to the list of files under CC-BY-4.0 license
in .reuse/dep5
This change ensures proper licensing attribution for the changelog file
The modification follows the project's REUSE compliance standards

docs: 更新 REUSE 许可文件以包含 CHANGELOG

在 .reuse/dep5 文件中将 CHANGELOG.md 添加到 CC-BY-4.0 许可证下的文件列表
此变更确保了对变更日志文件的正确许可归属
修改遵循项目的 REUSE 合规标准
2025-07-21 09:55:22 +08:00
github-actions[bot] 4dd22b538d chore: New release 5.7.19
Log:
2025-07-03 13:23:09 +00:00
yeshanshan 2ea4e762fe fix: enhance build security hardening
1. Added security hardening compiler flags in debian/rules including
stack protection and RELRO
2. Removed redundant linker flag from dtkgui.cmake that was already set
in debian/rules
3. Consolidated security-related build flags in debian/rules for better
maintainability
4. The changes improve binary security against common exploits while
maintaining compatibility

fix: 增强构建安全加固

1. 在debian/rules中添加了安全加固编译标志,包括栈保护和RELRO
2. 从dtkgui.cmake中移除了已在debian/rules中设置的冗余链接器标志
3. 将安全相关的构建标志整合到debian/rules中以提高可维护性
4. 这些改动提高了二进制文件对常见漏洞攻击的防护能力,同时保持兼容性
2025-07-03 13:03:14 +00:00
github-actions[bot] 18388f26f8 chore: New release 5.7.18
Log:
2025-06-27 09:19:06 +00:00
yeshanshan 9e54cbfad4 fix: make version parameter optional in release workflow
1. Changed version parameter from required to optional in GitHub
workflow
2. Fixed spec file formatting by aligning Version and Release fields
3. Added %{?dist} macro to Release field for proper RPM building

The changes make the release workflow more flexible by allowing version-
less releases while maintaining proper RPM spec file formatting and
distribution tagging. This helps with automated release processes and
ensures consistent package building across different distributions.

fix: 在发布工作流中使版本参数可选

1. 将 GitHub 工作流中的版本参数从必填改为可选
2. 修复 spec 文件格式,对齐 Version 和 Release 字段
3. 在 Release 字段添加 %{?dist} 宏以支持正确的 RPM 构建

这些变更使发布工作流更加灵活,允许无版本号的发布,同时保持 RPM spec 文件
的正确格式和分发标签。这有助于自动化发布流程并确保在不同发行版上一致的软
件包构建。
2025-06-27 16:43:59 +08:00
github-actions[bot] 6ff5c37579 chore(rpm): New release 5.7.17
Log:
2025-06-19 10:22:12 +08:00
asterwyx dd35e33644 chore: update .syncexclude
Exclude CHANGELOG.md.
2025-06-18 17:03:05 +08:00
Yixue Wang f834cb588d feat(ci): Add auto release workflow
Log: as title
2025-06-11 11:46:44 +08:00
Yixue Wang 9f500cbe94 feat: Support VERSION file
Use VERSION file to manage DTK version. VERSION file defines package
version. It also decides the initial value of cached variable
DTK_VERSION which controls the project version in cmake build system.
VERSION file is not synchronized to DTK6, as DTK6 has its own VERSION
file. One can still pass version to DTK_VERSION when running cmake
configure. This is helpful for developers.

Signed-off-by: Yixue Wang <wangyixue@deepin.org>
2025-06-11 11:46:44 +08:00
Wang Zichong 44bed9e070 fix: add missing prefix for QTranslator::load()
Log:
2025-06-06 18:12:53 +08:00
ComixHe 3f1cfd6800 fix: add missing header
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-06-06 10:10:42 +08:00
Wang Zichong 1f44c47e55 chore: use another QTranslator::load overload to tidy code
使用另一个 QTranslator::load 重载来使代码更简洁,并潜在的支持
QLocale::uiLanguages().

并且添加了一个额外的接口来方便其他项目更方便的调用.

Log:
2025-06-04 09:54:37 +00:00
Ye ShanShan 28c53f37e7 chore: bump version to 5.7.16
update changelog to 5.7.16
2025-05-19 09:26:17 +00:00
Ye ShanShan 75d176f234 chore: bump version to 5.7.15
update changelog to 5.7.15
2025-05-08 10:48:29 +00:00
Ye ShanShan 6d6a4a4380 fix: correct bitwise operation in preference handling
1. Fixed incorrect bitwise AND operation in OrgDeepinDTKPreference class
2. Changed `fetchAndAndOrdered(1 << (index - 0))` to
`fetchAndAndOrdered(~(1 << (index - 0)))`
3. This ensures proper bit clearing operation when updating property
status flags
4. The original code would incorrectly set bits instead of clearing them

fix: 修复偏好设置处理中的位操作错误

1. 修正了 OrgDeepinDTKPreference 类中错误的位与操作
2. 将 `fetchAndAndOrdered(1 << (index - 0))` 改为
`fetchAndAndOrdered(~(1 << (index - 0)))`
3. 确保在更新属性状态标志时正确的位清除操作
4. 原代码会错误地设置位而不是清除它们
2025-05-08 09:52:03 +00:00
Ye ShanShan ed252239b2 fix: prevent theme saving when DontSaveApplicationTheme is set
Added a condition to check DontSaveApplicationTheme attribute before
saving theme type to config
This prevents unwanted theme persistence when the application explicitly
requests not to save theme preferences
The change maintains backward compatibility while respecting the
application's preference flag

fix: 当设置DontSaveApplicationTheme时阻止主题保存

在将主题类型保存到配置前添加了检查DontSaveApplicationTheme属性的条件
这可以防止当应用程序明确要求不保存主题偏好时进行不必要的主题持久化
该改动在尊重应用程序偏好标志的同时保持了向后兼容性
2025-05-08 09:52:03 +00:00
Ye ShanShan aa13f2a82f refactor: improve thread safety in OrgDeepinDTKPreference
1. Changed parent initialization from direct assignment to nullptr in
constructor
2. Added QPointer to track parent object for thread safety
3. Implemented parent object verification before setting parent
relationship
4. Added safety checks for parent object changes during thread
operations
5. Updated build path in file header comment

refactor: 改进 OrgDeepinDTKPreference 的线程安全性

1. 将构造函数中的父对象初始化改为直接赋值为 nullptr
2. 添加 QPointer 用于线程安全的父对象跟踪
3. 在设置父子关系前实现父对象验证
4. 添加线程操作期间父对象变化的安全检查
5. 更新文件头注释中的构建路径
2025-05-07 03:45:13 +00:00
Ye ShanShan decbf724b3 fix: build failed in qt5
Changed Q_GLOBAL_STATIC to Q_GLOBAL_STATIC_WITH_ARGS for
OrgDeepinDTKPreference initialization
This modification provides better type safety and clearer syntax for the
complex initialization parameters
The change maintains the same functionality while following Qt's
recommended practices for static initialization

refactor: 更新 DConfig 初始化语法

将 Q_GLOBAL_STATIC 改为 Q_GLOBAL_STATIC_WITH_ARGS 用于
OrgDeepinDTKPreference 初始化
此修改为复杂的初始化参数提供了更好的类型安全性和更清晰的语法
该变更保持了相同的功能,同时遵循 Qt 推荐的静态初始化实践
2025-04-29 06:03:39 +00:00
JiDe Zhang 7c2b35ae42 feat: use dconfig2cpp for read/write the DConfig
The org.deepin.dtk.preference.json file is not in this project, so
we can't generated codes by cmake.
2025-04-25 10:03:22 +08:00
JiDe Zhang ec6fbaf651 fix: fix build on Qt 6.8
Maybe start from 6.8.1
2025-04-25 10:03:22 +08:00
Ye ShanShan d3b68df561 chore: bump version to 5.7.14
update changelog to 5.7.14
2025-04-17 13:56:22 +00:00
ComixHe 5eb6b4c403 build: compiling failed with Qt 6.9
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-17 06:25:31 +00:00
Ye ShanShan 75208f151f chore: bump version to 5.7.13
update changelog to 5.7.13
2025-03-20 18:07:30 +08:00
Ye ShanShan 5ce8bf3755 chore: bump version to 5.7.12
update changelog to 5.7.12
2025-03-06 17:40:25 +08:00
Ye ShanShan 0a0182faac fix: palette refresh delayed in qt6
QGuiApplication::paletteChanged is deprecated in qt6,
Delay to emit themeTypeChanged signal, palette doesn't refresh
after sending ThemeChangeEvent.

pms: BUG-303929
2025-03-06 15:49:13 +08:00
jingshenghao c52610f23c feat: Add files generated by qdbusXML2cpp and DCONG2cpp
Add files generated by qdbusXML2cpp and DCONG2cpp

Log: Add files generated by qdbusXML2cpp and DCONG2cpp
2025-03-04 20:04:38 +08:00
Ye ShanShan 6cc9f8ac48 chore: bump version to 5.7.11
update changelog to 5.7.11
2025-02-27 21:05:15 +08:00
Ye ShanShan 8110fd861e chore: bump version to 5.7.10
update changelog to 5.7.10
2025-02-13 11:01:28 +00:00
Ye ShanShan 3c16e777fe fix: icon is blurry
iconSize doesn't multiplied by devicePixelRatio in pixmap,
but it's doesn't need to be in qt5.

pms:BUG-302919
2025-02-13 02:33:28 +00:00
deepin-ci-robot c0812b7af6 chore: update changelog
Release 5.7.9.
2025-01-23 09:47:46 +00:00
deepin-ci-robot b0c91b8714 chore: update changelog
Release 5.7.8.
2025-01-14 20:02:14 +08:00
zhangkun dc5aa91b44 chore: update default window corner size
The default value is 12

pms: BUG-286881
2025-01-14 07:53:30 +00:00
YeShanShan 976aa9113c fix: missing window decoration for treeland
It's exist when using DPlatformHandle by stack variable.
We save window decoration state in DTreeLandPlatformWindowHelper, and refresh them when surface created.

pms: BUG-278281
2025-01-14 13:06:43 +08:00
deepin-ci-robot b566c12e40 chore: update changelog
Release 5.7.7.
2025-01-09 18:33:34 +08:00
Felix Yan 329bf5a247 chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute
Renaming enum would break ABI, but using doesn't modify ABI.

pms: BUG-368399
2025-01-09 16:17:49 +08:00
YeShanShan 7362e047b7 fix: accessing wild pointer in qt6
qobject_cast<QWindow*>(window) is returned nullptr if window is destroyed in qt6, and we can see it  on tst_QWindow::qobject_castOnDestruction() in tst_qwindow.cpp.
Object's address may be the same as before  in qt6,  memory may be optimized.

pms: BUG-299239
2025-01-09 14:29:21 +08:00
deepin-ci-robot 1ede364ac6 chore: update changelog
Release 5.7.6.
2025-01-02 06:40:54 +00:00
zhangkun e0873d04b3 fix: set font family invalid
FamilyResolved flag not set

pms: BUG-295665
2025-01-01 14:23:50 +08:00
Ye ShanShan acd947fa3e fix: iterator out of bounds for dciicon
Add check.

pms: TASK-368399
2024-12-27 10:54:13 +08:00
Ye ShanShan b152721ae8 refact: refacting DPlatformHandle to adapt treeland
Refact DPlatformHandle to update window settings.
Remove task dequeue in treeland interface when Personalization is inactive.
Add DTreeLandPlatformWindowHelper to manage windowContext.

pms: TASK-368399
2024-12-25 15:09:20 +08:00
Ye ShanShan 4bdfc69e31 Revert "refact: refacting DPlatformHandle to adap treeland"
This reverts commit e33a3945b2.
2024-12-25 15:09:20 +08:00
Ye ShanShan e33a3945b2 refact: refacting DPlatformHandle to adap treeland
Refacting DPlatformHandle to update window settings.
2024-12-24 16:39:11 +08:00
deepin-ci-robot 7871d7c448 chore: update changelog
Release 5.7.5.
2024-12-17 01:54:23 +00:00
YeShanShan df159744c6 fix: missing default windowRadius
as title.

pms: BUG-291123
2024-12-13 15:41:18 +08:00
ck 4ff3a644af fix: availableSizes not work on Qt6
Qt6 QIconEngine::availableSizes will not call
virtual_hook(QIconEngine::AvailableSizesHook
2024-12-12 09:57:50 +08:00
deepin-ci-robot 3a2792c869 chore: update changelog
Release 5.7.4.
2024-12-04 18:17:01 +08:00
ck 06dedd11df fix: nullptr check missing
add nullptr check

pms: Bug-289175
2024-12-04 09:12:38 +00:00
zhangkun 00584efe94 fix: window blur invalid
Set blur again when creating the surface

pms: BUG-278281
2024-12-03 13:22:50 +08:00
ck f5a7cc22cd fix: linglong app load qt translations failed
qt translations fallback to GenericDataLocation paths
2024-12-03 09:59:16 +08:00
Ye ShanShan 79440d4b47 fix: app crashed when window destroyed in quick
ghostVtable will be released whenever Window is destroyed by
delete or deleteLater function, we don't need to resetVtable,
and we shouldn't resetVtable when destructing m_window.

pms: BUG-368399
2024-12-02 17:44:20 +08:00
Ye ShanShan 726790ee06 fix: app crashed when window destroyed in quick
as title.

pms: BUG-368399
2024-11-30 10:23:24 +08:00
zhangkun cf97c88b76 feat: Limit maximum and minimum fonts
防止字体出现过大和过小的情况

pms: 368711
2024-11-29 15:46:18 +08:00
Ye ShanShan 76d00b0301 fix: blur is invalid for treeland
waylandWindow is empty when sometimes.
App crashed when window visibleChanged repeated.

pms: BUG-278281
2024-11-29 12:07:45 +08:00
Ye ShanShan fed4aae652 feat: support treeland platform for wmHelper
WindowManager's some interface may be deprecated, like MotifFunctions
and allWindowIdList.
and there is currently no abstraction of platform common
interfaces.

pms: BUG-287901
2024-11-27 10:42:32 +08:00
zhangkun e10215f3c1 fix: Possible null pointer dereference and Notitlebar input parameter error
as title

pms: Task-368711
2024-11-26 13:10:01 +08:00
zhangkun 16d4999f1b refactor: treeland platform theme interface
扩展Treeland的个性化接口

Log:
pms: Task-365811
2024-11-25 21:41:56 +08:00
zhangkun 1f0b9ed118 refactor: xcb platform theme interface
将DPlatformTheme中的接口抽象出来,不再写死dxcb,方便之后扩展其他平台的个性化接口

Log:
pms: Task-365811
2024-11-25 21:41:56 +08:00
kuchune b75b68a604 chore(CI): add debian check workflow
add debian check workflow

log: 增加debian检查工作流
2024-11-25 14:07:20 +08:00
deepin-ci-robot d07aca6786 chore: update changelog
Release 5.7.3.
2024-11-22 10:29:31 +08:00
wangfei 5ad7ed1ce8 fix: can't drag scrollbar in window under treeland
add the logic about moving window from platform plugin

Log: as title.
pms: BUG-284215
2024-11-22 09:33:48 +08:00
Yutao Meng de728b0bee fix: Supporting window blury effect under Treeland
pms:
BUG-278197
BUG-278281
BUG-284681
Log: Supporting window blury effect under Treeland
2024-11-21 12:17:38 +00:00
zhangkun d435f92784 fix: No judgment on the validity of the protocol
Determine whether the protocol is registered

Bug: https://pms.uniontech.com/bug-view-286859.html
2024-11-18 19:03:17 +08:00
deepin-ci-robot 43624a42e9 chore: update changelog
Release 5.7.2.
2024-11-15 13:47:25 +08:00
wangfei b975592ce1 chore: add the ActiveColorDark setting
get the active color according to system theme(light or dark).
There are two different active colors between light and dark theme.

Log:
2024-11-13 13:09:30 +08:00
wangfei f0a7d5d44d chore: highlight color is inconsistency
remove the operation that reduces lightness of active color in dark theme

Log:
2024-11-11 15:12:57 +08:00
ck a0398d03d5 chore: add IsWaylandPlatform attribute
only test platformName == wayland
2024-11-08 13:56:17 +08:00
Yutao Meng a407dc4032 fix: Print "load translate" debug log to channels
Avoid printing such logs to terminal

Bug: https://pms.uniontech.com/bug-view-284539.html
Log: Print "load translate" debug log to channels
2024-11-07 08:47:36 +00:00
zhangkun 255f171e9f fix: Under treeland, the dialog has not disabled titlebar
The same application only called the protocol once before

https://pms.uniontech.com/task-view-365811.html
2024-11-07 11:15:14 +08:00
zhangkun 525beab369 chore: Correct the name of TreelandProtocols package in cmake
As title

Log: https://pms.uniontech.com/task-view-365811.html
2024-11-04 09:44:26 +08:00
deepin-ci-robot 231c29ac65 chore: update changelog
Release 5.7.1.
2024-10-31 10:25:12 +08:00
ck 6038e6fcf8 chore: config dtk animations
set/unset `D_DTK_DISABLE_ANIMATIONS` according to the dconfig
2024-10-25 15:30:29 +08:00
zhangkun 316a3e741c feat: Add compile test
- Add compile test for treeland
- fix reuse

Log:
2024-10-24 15:15:35 +08:00
zhangkun 806457e8bc feat: Adapt to TreeLand's Titlebar protocol
Resolve the issues of DTK application crashing and dual title bar in treeland.

Log: Adapt to TreeLand's Titlebar protocol
Task: https://pms.uniontech.com/task-view-365811.html
2024-10-21 15:59:26 +08:00
Hillwood Yang b25353026b feat: Support Qt 6.8
Log: Fix build on Qt 6.8
2024-10-21 10:31:12 +08:00
Ye ShanShan 8cf037d44b fix: app crashed in x11
Missing check for Treeland.

TODO: CreatorWindowEventFile should distinguish between X11 and
Treeland.
2024-08-30 19:32:02 +08:00
Zhang Dingyuan af9a6fc359 chore: add dtkgui namespace
as title

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan 2dae5b2e82 chore: add extra cmake modules
as title

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan 7a49e9c164 chore: update license
update reuse

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan b2c91d0c2e chore: add build dep
as title

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan 4fb86c1204 chore: update license info
as title

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan afe212871f feat: add fixme note
I have no idea

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan 3a6a15b9f2 fix: remove treeland personalization protocols useless function
remove set_resizable and set_movable

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan c227e1adce fix: cannot move window on wayland
code from deepin platform plugin

Log:
2024-08-29 13:25:29 +08:00
Zhang Dingyuan 9c99626771 feat: support qt5 and qt6
as title

Log:
2024-08-29 13:25:29 +08:00
wangfei 6f375cfc0c feat: Add notitlebar function on wayland platform
add notitlebar function on wayland platform

Log: add notitlebar function on wayland platform
2024-08-29 13:25:29 +08:00
zhangkun 7ec030f0b9 Revert "feat: add close.dci"
This reverts commit 12b60a3c8a.

Issue: https://github.com/linuxdeepin/developer-center/issues/10482
2024-08-23 15:13:18 +08:00
deepin-ci-robot 1ab1d9234f chore: update changelog
Release 5.6.34.
2024-08-21 16:47:41 +08:00
xionglinlin 75ce762ed0 feat: add window startup effect Type
add EffectOut to EffectType

Issue: https://github.com/linuxdeepin/developer-center/issues/10322
2024-08-13 12:21:48 +00:00
覃本学 820e3030be feat: support to change window effects
(cherry picked from commit 4f4be15cb4)
(cherry picked from commit 762bd7b2ec)

Bug: https://pms.uniontech.com/bug-view-244347.html
     https://pms.uniontech.com/bug-view-243363.html
     https://pms.uniontech.com/bug-view-240437.html
2024-08-13 19:41:53 +08:00
ck 1ffd986e97 fix: wrong judgment conditions
assert player not nullptr
2024-07-26 13:54:06 +08:00
ck b10836217d chore: animation-dci supports custom icon
for test dci animation icon
2024-07-26 13:54:06 +08:00
Yixue Wang 12b60a3c8a feat: add close.dci
Add close.dci as builtin icon.
2024-07-26 11:01:28 +08:00
deepin-ci-robot b23ef7058a chore: update changelog
Release 5.6.32.
2024-07-10 11:08:41 +08:00
ck 8900594c9f chore: dci-icon-theme tool tweak
webp icon size should not be  fixed at 256x256
2024-07-01 15:24:57 +08:00
ck da12696b21 Revert "fix: jagged edges on ddciicon"
This reverts commit da27fb74b3.

Issue: https://github.com/linuxdeepin/developer-center/issues/9443
2024-07-01 15:24:57 +08:00
deepin-ci-robot 9c06164a2e chore: update changelog
Release 5.6.31.
2024-06-27 17:57:06 +08:00
zhangkun da27fb74b3 fix: jagged edges on ddciicon
Use smooth scaling before drawing to smaller QImage

Issue: https://github.com/linuxdeepin/developer-center/issues/8691
2024-06-20 10:14:03 +08:00
deepin-ci-robot 7fee7b54b1 chore: update changelog
Release 5.6.30.
2024-05-31 15:28:05 +08:00
deepin-ci-robot 46d504a819 chore: update changelog
Release 5.6.29.
2024-05-16 10:22:36 +08:00
ck 1c814a9217 fix: create icon engine faild on Qt6
- 不需要考虑 DontFallbackToQIconFromTheme 这里是直接 new QIconLoaderEngine
- qErrnoWarning ==> qWarning 不需要 lasterror

Issue: https://github.com/linuxdeepin/developer-center/issues/8436,https://github.com/linuxdeepin/developer-center/issues/8241
2024-05-13 11:04:07 +08:00
deepin-ci-robot 51c7e35161 chore: update changelog
Release 5.6.28.
2024-04-30 15:40:05 +08:00
ck aeaccd30ce feat: dci-icon-theme support multiple icon size
- add error log(callback)
- support multiple size
- update version to 0.0.5

e.g.
```
ls /usr/share/icons/vintage/apps
128  16  24  32  48  64  96

dci-icon-theme /usr/share/icons/vintage/apps -o /tmp/dcis/vintage -O 3=98

dci --tree /tmp/vintage/onboard.dci
/
├── 16
│   ├── normal.dark
│   │   └── 3
│   │       └── 1.webp -> /16/normal.light/3/1.webp
│   └── normal.light
│       └── 3
│           └── 1.webp
└── 24
    ├── normal.dark
    │   └── 3
    │       └── 1.webp -> /24/normal.light/3/1.webp
    └── normal.light
        └── 3
            └── 1.webp
...

```
2024-04-28 13:22:44 +08:00
Ye ShanShan 1b9c238bbc fix: missing initialization for baseFont of fontManager
We should update baseFont from qGuiApp not just when font changed.

Issue: https://github.com/linuxdeepin/developer-center/issues/8040
2024-04-23 09:36:48 +08:00
ck bffcdde9ea chore: add flag to disable noncache flag
- if flag is set always try create iconengine
- avoid too much logs
2024-04-23 09:32:58 +08:00
ck c42d36671e chore: insert to cache when icon is not null
check newIcon is Null
2024-04-23 09:32:58 +08:00
deepin-ci-robot f9607e01a4 chore: update changelog
Release 5.6.27.
2024-04-23 09:24:25 +08:00
Ye ShanShan 069289d500 fix: setWindowBlurAreaByWM only work once in qt6
`*(reinterpret_cast<const QVector<qint32>*>(&area)` is not equal
QVector<qint32> in qt6, it cause QVariant's equal function is
invalid. so we perform type conversion explicitly.
2024-04-09 17:52:43 +08:00
deepin-ci-robot 1aa57f8b4e chore: update changelog
Release 5.6.26.
2024-03-27 14:24:02 +08:00
Ye ShanShan 20f5fc1d3b feat: support to get specified palette
get the specified type of palette.
2024-03-26 11:46:50 +08:00
ck f08256da6e fix: PlaceholderText color tweak
原来 continue 只是不用 QColor()/黑色 覆盖
去掉 continue 才是使用 DPalette 中的 PlaceholderText 覆盖..

Issue: https://github.com/linuxdeepin/developer-center/issues/7554
2024-03-20 15:21:11 +08:00
YeShanShan 9d2673082e fix: wrong availableSizes for DIconProxyEngine
We should call proxy's `availableSizes` function.
  `availableSizes` always return empty list for icons, it causes
`QPainter::begin: Paint device returned engine == 0` when painting
to QImage.
2024-03-12 11:25:17 +08:00
deepin-ci-robot 4013869e09 chore: update changelog
Release 5.6.25.
2024-03-11 15:33:15 +08:00
wangfei 3b6cb2e9f2 fix: search icon can't change with theme change
add search icon in dark theme and light theme respectively

Issue: linuxdeepin/developer-center#6230
2024-03-01 09:58:37 +08:00
YeShanShan 8561847a13 fix: changed paletteType's config value
We only save config's value when caller update paletteType manually.
2024-03-01 09:54:05 +08:00
YeShanShan 754d5baff5 fix: app refresh slowly
ApplicationPaletteChange more times.
2024-02-01 11:51:55 +08:00
YeShanShan 0f079b0838 fix: font can't follow changes in qt6
`fontChanged` has been deprecated in qt6, and the signal can't
be emitted in `qdeepin` when font changed.
2024-02-01 09:36:36 +08:00
YeShanShan d5c1ae779b fix: icon doesn't update when iconTheme changed
Adding icon's themeName as a part of the cache key.
2024-01-23 18:10:26 +08:00
deepin-ci-robot 01af1cbc93 chore: update changelog
Release 5.6.22.
2024-01-12 14:21:04 +08:00
YeShanShan 2299e3137e chore: warning for connect
it reports `unique connections require a pointer to member
function of a QObject subclass` for UniqueConnection.
2024-01-10 10:07:36 +08:00
ComixHe 2d7435324c feat: enable xdgIconLoader under Qt6
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-01-09 15:51:56 +08:00
ck 7e3569496e fix: menu icon incorrect in dark mode
use texts/icons instead of actions/icons

Issue: https://github.com/linuxdeepin/developer-center/issues/6624
2024-01-09 15:51:26 +08:00
deepin-ci-robot 3ea215d46f chore: update changelog
Release 5.6.21.
2024-01-09 14:23:00 +08:00
ck 0dfac4ca6e chore: fix ut_dciiconengine failed on dark theme
add normal.dark, hover.dark, pressed.dark
2024-01-04 10:00:30 +08:00
ck df8a05e159 fix: DIconProxyEngine read not ensureEngine
read and write operations not match
Trying to construct an instance of an invalid type, type id:xxx
2024-01-04 10:00:30 +08:00
ck 9e0396c5e6 fix: debian build failed
invalid-profile-name-in-build-profiles-field nobin (in section for libdtkgui5-bin)
2024-01-04 09:46:19 +08:00
ck 8cabfe86aa fix: xdg icon loading failed with qt6
fallback to QIconLoaderEngine on DTK_DISABLE_LIBXDG

Issue: https://github.com/linuxdeepin/developer-center/issues/6459
2023-12-20 09:37:34 +08:00
ComixHe a66d7ccbf3 chore: update cmake version
Signed-off-by: ComixHe <heyuming@deepin.org>
2023-11-30 10:59:51 +08:00
deepin-ci-robot d471c7221a chore: update changelog
Release 5.6.20.
2023-11-28 17:55:04 +08:00
ck d35f8e10fd feat: move ddesktopservices to dtkgui
- move ddesktopservices from dtkwidget to dtkgui
- add docs for ddesktopservice
- showFileItemPropertie ==> showFileItemProperty
- use dbus to check SoundEffect.Enabled instead of Gsettings

Issue: linuxdeepin/dtk#134
2023-11-15 09:48:31 +08:00
Yixue Wang 71aaf6a024 fix: indirect inclusion of QSharedPointer
ddciicon.h does not explicitly include QSharedPointer, leading to
incomplete type. Include QSharedPointer explicitly.

Log: fix indirect inclusion of QSharedPointer
2023-10-27 10:53:28 +08:00
Yixue Wang dec5572b9b chore: add synchronization workflow
Add synchronization workflow to synchronize to DTK6.

Log: add synchronization workflow
2023-10-27 10:53:15 +08:00
deepin-ci-robot 0e8a4e0b91 chore: update changelog
Release 5.6.19.
2023-10-24 02:33:26 +08:00
deepin-ci-robot d6434448c1 chore: update changelog
Release 5.6.18.
2023-10-18 15:16:21 +08:00
YeShanShan 3b2949bbf3 fix: Wrong IconName for DIconEngine
The icon names of `IconEngine` and `DIconProxyEngine` are
inconsistent when there is no such icon.

Issue: https://github.com/linuxdeepin/developer-center/issues/5760
2023-10-09 09:09:18 +08:00
Yixue Wang 75633580dc fix: missing link when disable librsvg
When disable librsvg, we use QtSvg to implement dsvgrenderer. Link
to Qt(5/6)::Svg target.

Log: fix missing link when disable librsvg
2023-10-06 09:34:25 +08:00
chenhongtao 6bee9a679d fix: when iconName is absolute path
Log:
2023-09-25 11:09:58 +08:00
ck 4f8d3739b5 fix: svg with filter attribute rendering exception
Svg filters attribute are not supported by QSvgRenderer, and
it will not be. see https://bugreports.qt.io/browse/QTBUG-9081

XdgIconLoaderEngine(>3.6) use QSvgRenderer to render svg instead of
svg icon engines https://github.com/lxqt/libqtxdg/blob/master/src/xdgiconloader/xdgiconloader.cpp#L814

Archlinux DTK_DISABLE_LIBRSVG=ON by default https://github.com/linuxdeepin/dtkgui/pull/130

- turn off DTK_DISABLE_LIBRSVG option
- force get pixmap from icon engines
- fix DSvgRenderer::toImage return null image with empty elementId on DTK_DISABLE_LIBRSVG
2023-09-25 09:00:34 +08:00
ck eef2f42fea chore: find qhelpgenerator from property
depends qttools5-dev or qt6-tools-dev
add Build-Profiles to ignore package build
(dpkg-buildpackage --build-profiles=nodoc)
2023-09-22 11:36:32 +08:00
YeShanShan 1da5179b08 fix: Wrong value of DPalette::TextLively
TextLively is different between light and dark theme, otherwise
it can't see clearly in light theme.
2023-09-14 16:30:33 +08:00
wangyixue de4dc37e39 chore: update changelog
Release 5.6.17.
2023-09-08 16:40:52 +08:00
Fan PengCheng f9d2dcdeb9 fix: 修复应用异常退出后颜色主题未保存的问题
修改为设置后立即保存

Log: 修复应用异常退出后颜色主题未保存的问题
Influence: 应用的主题选项在退出重启后未恢复上一次的选择
Bug: https://pms.uniontech.com/bug-view-201203.html
Change-Id: I73b92fd781737e757827bbb6aca87887c2c16ce9
2023-09-01 11:06:12 +08:00
deepin-ci-robot 69e79f8e3a chore: update changelog
Release 5.6.16.
2023-08-22 15:17:45 +08:00
wangfei 09b956383e fix: dci icon cache key miss theme name
dci 图标缓存没有加上主题名导致可能在不同的主题时匹配到其他主题缓存的图标

Issue: https://github.com/linuxdeepin/developer-center/issues/4517
2023-08-21 14:49:36 +08:00
ck d3d7096c0d fix(build): ut failed on Qt6.4
Fix ut build
2023-08-21 14:15:33 +08:00
ck b211db014e chore: add DtkBuildHelper depends
dtkcommon-dev >= 5.6.16
2023-08-21 14:08:54 +08:00
YeShanShan 1bbeb9f475 fix: Compiling error in qt6.4
QThemeIconEntries changed from QList<QIconLoaderEngineEntry*>
to std::vector<std::unique_ptr<QIconLoaderEngineEntry>>
  QFont hasn't include QObject header file.
2023-08-17 16:38:30 +08:00
ck f08f6ea538 chore: ut build without source
- filedrag destroy server to emit serverDestroyed
- compare color sometime failed, convert to rgb first
- ut build without source(cmake -DEnableCov=ON)
2023-08-16 09:28:17 +08:00
wangyixue cd822bb2c8 chore: update changelog
Release 5.6.15.
2023-08-14 11:00:48 +08:00
houchengqiu c2b0782d00 refator: rewrite hasUserManual function
1.porting dbus interface(ManualExists) implementation to dtk

Log: rewrite hasUserManual function
2023-08-03 11:44:40 +08:00
houchengqiu 3f1960067b chore: Adaptation for Qt5.11
Adaptation for Qt5.11

Log: Adaptation for Qt5.11
2023-08-03 11:44:40 +08:00
ck 8f4319308b chore: add unit test
- make tests/test-recoverage.sh runable again
- DDciIconPalette
- DNativeSettings
- add a minimal qpa plugin for test
2023-08-02 16:23:10 +08:00
ck c2b8c1508b chore: do not show ui in ut
use QWidget::createWinId instead of QWidget::show
to create window handle(QWindow)
2023-08-02 16:23:10 +08:00
ck 07b454ccb7 chore: iconengine tweak and uint test
- forward declaration XdgIconLoaderEngine
- xdgiconloader headers position tweak
- XDG colorScheme color support alpha (css color is RGBA not ARGB)
- add ut_XdgIconProxyEngine ut_DIconProxyEngine
2023-07-31 13:29:16 +08:00
deepin-ci-robot 5f457d2225 chore: update changelog
Release 5.6.14.
2023-07-27 16:17:11 +08:00
ck afb7340011 feat: load app and qt Translation files
- interface: DGuiApplicationHelper::loadTranslator();
- auto load qt_xxx.qm && qtbase_xxx.qm && appName_xxx.qm
- add loadTranslator ut
2023-07-27 11:52:02 +08:00
ck 994133ca16 fix: dplatformtheme fetchPalette crash
nullptr check
2023-07-26 17:29:55 +08:00
wangyixue 9523642508 feat: add helper for high dpi pixmap
Add loadNxPixmap for high dpi pixmap.

Log: add loadNxPixmap
2023-07-26 14:29:30 +08:00
ck e7834e1763 fix: DFileDragClient::serverDestroyed nerver emit
emit serverDestroyed in ~DFileDragServer()
DDndClientSignalRelay::serverDestroyed emit DFileDragClient::serverDestroyed
add dfiledrag unit test
2023-07-25 08:56:50 +08:00
ck fa3ca10d03 fix(build): DIconTheme ut failed
DIconTheme::createIconEngine always create DIconProxyEngine
so DIconTheme::isBuiltinIcon && DIconTheme::isXdgIcon failed
add DIconProxyEngine::proxyKey() to get proxy iconengine's key
2023-07-21 16:13:51 +08:00
ck ba55aa6e7d feat: DIconTheme::findQIcon add fallback icon
support fallback icon
2023-07-18 11:00:28 +08:00
wangfei 1cb3939cf9 fix: build failed in qt6 due to proxyengine
adjust some about iconproxyengine to build qt6

Log: fix build failed in qt6 due to proxyengine
2023-07-13 13:05:41 +08:00
ck ff836690e5 chore: remove unused pro files
remove pro files
2023-07-12 09:43:34 +08:00
YeShanShan 95f8b5ffd3 refactor: Move dotsPerInch from normal function to slots
It exports to qt meta system for qml.
  and it doesn't break ABI compatibility depend on
https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B#Using_signals_instead_of_virtual_functions
2023-07-12 08:51:48 +08:00
wangfei 0b63795ee7 chore: add proxyiconengine
add proxyiconengine from qt5integration

Log: add proxyicnengine from qt5integration
2023-07-10 17:33:37 +08:00
deepin-admin-bot e17e250fe1 chore: Sync by 559e91167d
sync by github workflow

Log: none
Influence: none
2023-07-10 06:30:59 +00:00
SPUER 20c5c09315 chore: reduce compilation warnings
解决赋值返回警告

解决\l不能解析警告

解决\value不能解析警告

Issue: https://github.com/linuxdeepin/dtk/issues/96
2023-07-07 06:07:15 +00:00
wangfei 724af5ebf3 chore: add unit test about dciiconengine
add unit test about dciiconengine

Log: add unit test about dciiconengine
2023-07-07 09:54:54 +08:00
wangfei b810be77cb chore: adjust icontheme
dciiconEngine is added to createIconEngine interface.

Log: dciiconEngine is added to createIconEngine interface.
2023-07-07 09:54:30 +08:00
wangfei 98b9632f63 chore: add dciiconengine
add dciiconengine frome qt5integration

Log: add dciiconengine
2023-07-06 13:11:14 +08:00
ck d867a02cda refactor!: deprecate some interfaces in dtk6
- DGuiApplicationHelper -7
- DPalette -1
- DPlatformTheme -27 properties
2023-07-06 11:24:23 +08:00
wangfei 0d9e457d13 chore: add unit test about builtinengine
add unit test ut_builtinengine about builtinengine

Log: add unit test about builtinengine
2023-07-05 16:12:26 +08:00
WangFei 2c4cc71e0d
chore: adjust xdgiconproxyengine (#167)
add difference about xdgiconproxyengine from qt5integration

Log: add difference about xdgiconproxyengine from qt5integration

Co-authored-by: wangfei <wangfei@deepin.org>
2023-07-05 07:51:38 +00:00
WangFei 4350475fe1
chore: adjust builtiniconengine (#164)
add the difference about builtiniconengine from qt5integration

Log: add the difference about builtiniconengine from qt5integration

Co-authored-by: wangfei <wangfei@deepin.org>
2023-07-05 07:50:57 +00:00
WangFei 3cf033b048
chore: change OUTPUT_DIR variable in cmake (#163)
change OUTPUT_DIR to CMAKE_CURRENT_BINARY_DIR

Log: change OUTPUT_DIR to CMAKE_CURRENT_BINARY_DIR

Co-authored-by: wangfei <wangfei@deepin.org>
2023-07-04 03:36:24 +00:00
syn 536f1f9dff chore: ignore doxygen-theme folder
Log: 修复编译时加上BUILD_THEME宏后,自动拉取doxygen-theme导致git管理的项目产生污染

Task: https://github.com/linuxdeepin/dtk/issues/99
2023-07-03 17:21:36 +08:00
wangyixue 6588a86d71 chore: update changelog
Release 5.6.12.
2023-06-25 16:38:19 +08:00
ck 0ad02e6ce7 chore: update dconfig appid
1. dconfig meta file installed by libdtkdata.
2. appid switch to org.deepin.dtk.preference
2023-06-25 09:38:21 +08:00
ck 62b66a9f05 fix: ut failed
1. dciicon memery leak(ReaderData not delete)
2. DImageHandler memery leak
3. use png instead of svg (no need svg imageiohandler plugin)
2023-06-19 13:13:09 +08:00
ck dcede1f96d chore: Adapt Qt6 && Dtk6 compilation
Since xdgiconloader is not adapted to Qt6, libxdg is disabled by default when compiling Dtk6
Do not install dconfig file in dtkgui to avoid conficts with dtk6gui
C++ 17 by default
DVERSION ==> DTK_VERSION
cmake_minimum_required 3.13
tools install to CMAKE_INSTALL_LIBEXECDIR
2023-06-19 13:13:09 +08:00
ck b683e97cbc fix(build): suport build with Qt6 && Qt5
使用条件编译将选择不同版本 Qt 接口
2023-06-19 13:13:09 +08:00
heyuming 58095a743f fix: fix build failure due to metasystem change
在构建dtkwidget中遇到

Log: 修复因为元系统改变导致的编译失败
2023-06-07 18:32:28 +08:00
deepin-admin-bot 6c4bbde470 chore: Sync by 2e5e092ba3
sync by github workflow

Log: none
Influence: none
2023-05-10 02:24:13 +00:00
ck dd10f593b7 chore: bump version to 5.6.11
update changelog
2023-05-08 15:07:16 +08:00
YeShanShan 3196e5d7a0 fix: App blocked by hasUserManual in live system
Maunal dbus service isn't registed in live system firstly, we
should wakeup it instead of blocking UI.
  It may be cause app of `longlong` hasn't Manual when click menu
to show Maunal firstly.

Bug: https://pms.uniontech.com/bug-view-197713/.html
Log: 解决在live系统中,帮助手册dbus调用导致应用阻塞
2023-05-05 14:02:59 +08:00
rewine 6b366af60a fix: must set CMAKE_INSTALL_PREFIX before GNUInstallDirs
Log:
Never modify the value of CMAKE_INSTALL_PREFIX after including GNUInstallDirs,
Otherwise incorrect CMAKE_INSTALL_FULL_XXXX values will be computed
2023-05-05 03:51:14 +00:00
chenhongtao 8aee0513e7 fix: reuse lint
Log: fix reuse
2023-05-05 03:23:23 +00:00
zccrs d52cc4c111 chore: add a unit test for DDciIconPlayer
Test the non-animation image.
2023-04-26 13:26:13 +08:00
YeShanShan 6dc214c70a fix: ThemeType is inconsistent
We should emit Event to prompt QGuiApplication update QPalette.
if themeType is changed firstly.
2023-04-24 18:54:24 +08:00
YeShanShan 978be55303 fix: App crashed when `setPaletteType` called early
ASSERT: "The application ID is empty" if `setPaletteType` is
called before QGuiApplication contrusted.
  `q->themeType` will try to use `DConfig`, It's applicationName
is Empty.
2023-04-24 13:58:07 +08:00
YeShanShan 7abf16d31a fix: Inconsistent themeType when setThemeType
When we call setThemeType to DarkType, it will sync DConfig's
themeType, and reset it to UnknowType, and it cause ut failed.
2023-04-23 16:45:24 +08:00
ck 99d184978b fix: dconfig get appid error
在 setApplicationName 前调用 dconfig 会导致 appid 不匹配
导致无法正确读取修改配置.
没有 setApplicationName 时 applicationName 会 fallback
到二进制的名字( argv[0] )
将 docnfig 初始化改到第一次调用 themeType / paletteType 中

Issue: https://github.com/linuxdeepin/developer-center/issues/4117
2023-04-20 19:36:16 +08:00
ck 5327c027c3 chore: update to 5.6.10
Log: update changelog
2023-04-17 17:27:00 +08:00
deepin-admin-bot 4bcd6d8474 chore: Sync by 2dd22560f7
sync by github workflow

Log: none
Influence: none
2023-04-14 08:41:50 +00:00
deepin-admin-bot b153abe460 chore: Sync by c5d10d3aeb
sync by github workflow

Log: none
Influence: none
2023-04-14 08:32:14 +00:00
ck 19492cbfb7 feat: add DontSaveApplciationTheme Attribute
保存主题功能让非 widget 应用也能用上, 默认行为记住主题
如果不需要记住请构造 app 前 setAttibute(DontSaveApplicationTheme)
注意:因为可能无法正确获取 appid ,通过 dde-dconfig-editor
设置的主题可能无效,但是应用自行设置的主题可以记住

Log:
2023-04-14 08:47:36 +08:00
ck 6c06cf37cd chore: IsDeepinEnvironment support DDE
add DDE env support

Issue: https://github.com/linuxdeepin/dtkcore/issues/301
2023-04-11 08:47:34 +08:00
ck 99e450c1cd chore: update to 5.6.9
Log: update changelog
2023-04-03 10:28:08 +08:00
wangfei 42edd583a4 chore: adjust palette color values
modify six palette color values both light theme and dark theme, repectively.

Log: adjust palette color values
Issue: https://github.com/linuxdeepin/dtkgui/issues/142
2023-04-03 10:12:41 +08:00
ck a3677d4bbf chore: install meta file
1. move `dconfig_meta_files` to src/CMakeLists.txt
2. add to debian install files
2023-04-03 10:07:03 +08:00
yeshanshan 0faedd5009
fix: Changing search_indicator icon (#138)
Removing white space margin

Issue: https://github.com/linuxdeepin/dtkwidget/issues/325
Log: It takes efect all SearchEditor.
2023-04-03 02:06:34 +00:00
bluesky cd21667c52 feat: add config file
添加自定义UI的配置文件
2023-03-29 02:22:24 +00:00
tsic404 d30876386c chore(CI): add OBS workflows
add OBS workflows and modify PKGBUILD support OBS build

log:
2023-03-29 09:28:15 +08:00
ck 9e54cba93c feat: add DIconTheme::createIconEngine
DIconTheme::createIconEngine for qt5integration
1. try createBuiltinIconEngine first
2. try createXdgProxyIconEngine or fallback to fromTheme
3. add docs
Warning : do not call from qplatformTheme createIconEngine without
DontFallbackToQIconFromTheme flag

Log: add createIconEngine
2023-03-22 17:33:58 +08:00
ck 2e966e94bf fix: dci icon image scale calculation error
qreal pixmapScale = 48 / 256; // 0
qreal pixmapScale = qreal(48) / 256; // 0.1875

Log: dci image size calculation error
2023-03-10 14:41:18 +08:00
ck 6549a67eb3 chore: update readme and help message
update readme and usage

Log: none
Change-Id: Ibf40852aaa8aca2d21f51fdc37657fc79fd33966
2023-03-09 11:30:05 +08:00
wangyixue 419e11629b chore: update changelog
Bump version to 5.6.8.
2023-02-22 15:44:58 +08:00
Felix Yan 8a5e67652c chore: correct a typo in dci-icon-theme/main.cpp
Correct a typo in dci-icon-theme/main.cpp
2023-02-22 15:07:46 +08:00
wangyixue cca33d94c8 chore: update changelog
Release 5.6.6.

Log: update changelog
2023-02-21 11:58:30 +08:00
ck f893e02fdf chore: update archlinux build
1. add DTK_DISABLE_LIBRSVG build option to disable librsvg
2. archlinux DTK_DISABLE_LIBRSVG=ON by default
3. use QSvgRenderer instead of librsvg if option on

Log: archlinux build
2023-02-20 09:30:15 +08:00
wangyixue 5c948aa7ee fix: qch generate error
Correct markdown title level to fix qch generate error.

Log: fix qch generate error
2023-02-15 17:05:28 +08:00
chenhongtao ebde919132 chore: fix PKGBUILD
Dependiencies not plugin and hard link to library should not mark as
optdepends

Log: fix PKGBUILD
2023-02-14 12:55:15 +00:00
zccrs 66ab7451f2 feat: Support animation for DDciIcon
See also https://github.com/linuxdeepin/deepin-specifications/pull/1,
This implementation complies with the specification by DSG on animation
dci's icons.

New class: DDciIconImage DDciIconImagePlayer DDciIconPlayer
2023-02-14 13:17:17 +08:00
zccrs 7fa65a0792 fix: Don't change color if the HSL values no variation
If all the adjust parameters are 0, do not make any changes for the base
color. Because when trying to adjust the HSL value of an RGB spec color,
it will first convert the RGB spec to the HSL spec, and this conversion
will cause some precision loss, and cause the color has changed when
conversion back to the RGB spec.
2023-02-14 13:17:17 +08:00
ck e244d5d3fb chore: quality option must specify
1. must specify quality option
2. scaled counts depends on quality params
3. help message tweak
4. update version to 0.0.4

Log: scale quality
Change-Id: Ideecb18175a7d58cb2e94898246df01fe19147b4
2023-02-08 17:38:12 +08:00
ck c1286c6502 chore: dci-icon-theme tweak
1. update version to 0.0.3
2. fix initQuality not init if --quality not set

Log: none
Change-Id: I66f2d494f9e34194ffed17564334b3e29109737a
2023-02-08 09:25:37 +08:00
wangyixue 088bfea481 fix: lost dependency of Qt5Gui
Add dependency of Qt5Gui cause dtkgui depends it.

Log: add find_dependency(Qt5Gui)
2023-02-07 06:41:10 +00:00
renbin 3b8ab9c49b fix: Fix DImageHandler build warnings.
Fix DImageHandler build warnings, modified the code according to cppcheck.
Add CMAKE_CXX_FLAGS '-fopenmp'.

Log: Fix DImageHandler build warnings.
Issue: fix #110
Influence: CCMAKE_CXX_FLAGS environment variable
2023-02-07 01:26:00 +00:00
ck 451b85b4b2 fix(build): build failed when cmake < 3.16
do not use PkgConfig::libraw
cmake 3.16 changelog
If a full path to the found library can't be determined, but it's still
visible to the linker, pass it through as ``-l<name>``.  Previous versions
of CMake failed in this case.

Log: build
Change-Id: I48a03142a0f4778a531e5138ea7489a8f42ce5c5
2023-02-06 18:00:07 +08:00
ck 5de5c59984 feat: add quality option
quility of dci icon scaled image
the higher the quality, the larger the dci icon file size

Log: quality option
Change-Id: Ifdfa51091bb560ad76881366a9c5168daf6cc9ab
2023-02-06 16:56:42 +08:00
ck 7d070dd912 feat: add icon finder for dci-icon-theme
dci-icon-theme --find <icon name> or
dci-icon-theme --find <icon name> -t <icon theme name>

output:
"deb" [ "xxx-icon" ]: "/usr/share/dsg/icons/xxx-icon/deb.dci"

Log: none
Change-Id: Ide152e0ba1cba0fb0252ead7304c255a2c0695d4
2023-02-06 13:33:26 +08:00
ck 3135be671d fix: add edit-clear active icon
a74f91cc revert 70cea318...
rebase before push !!

Log: none
Change-Id: I938abc43cd6e44ddd4ea48e5aa76a516a4526cb0
2023-02-06 09:40:09 +08:00
ck 78cb5939ea chore: update changelog
update changelog
Log: update changelog
Influence: none

Change-Id: I67b88d621e4bda0dad68519f04e90e5e362ea6c9
2023-02-02 16:04:51 +08:00
ck f79aeb8aaa feat: add scrollBarPolicy interface
same as Qt::ScrollBarPolicy
0 show as needed auto hide, default
1 always off
2 always on

Task: https://pms.uniontech.com/task-view-240117.html
Log: scrollbar policy
Change-Id: Ia37f2a5661cb27de568bc3f7ece5a4a6a1fcae97
2023-02-02 13:41:08 +08:00
renbin e400ddd110 feat: Optional dependencies libfreeimage and libraw.
Change the build dependencies, libfreeimage and libraw are not
required by default, except for debian and linglong builds.
Set DTK_DISABLE_EX_IMAGE_FORMAT=ON to not support extended
image format.

Log: Optinal dependencies libfreeimage and libraw.
Influence: Add build package options
2023-02-02 02:33:30 +00:00
renbin 0d6cb64ca6 chore: Update linglong.yaml
The linglong org.deepin.base environment includes librsvg2 and
libraw libraries, which do not need to configure it in depends
field. Correct libfreeimage to freeimage.

Log: Update linglong.yaml
Influence: linglong build configuration file.
2023-02-02 02:33:30 +00:00
renbin 5ca5df6ccf feat: Support RAW image formats.
1. Dynamically load libraw.so to support RAW image fomats.
2. Improve some implementations, Update unit cases and docs.
3. Move image-handler from folder example to tool.

Log: Support RAW image formats.
Influence: Add build dependency libraw-dev.
2023-02-02 02:33:30 +00:00
xzl 7539108e26 docs: add doxygen theme
在打开build theme编译选项时会自动下载主题

Log:
2023-01-17 10:20:46 +08:00
wangyixue 34a1fe3f19 chore: change GTest::gtest for compatibility
Change GTest::gtest to GTest::GTest for backward compatibility.

Log: change GTest::gtest to GTest::GTest
2023-01-12 14:00:17 +08:00
ck 306baad983 chore: DDciIcon::fromTheme support absolutePath
return DDciIcon(fileName) if fileName is full path

Log: none
Influence: none
Change-Id: I6835074c48792877dfb06842402546d7d428fa6c
2023-01-11 15:52:50 +08:00
ck 6a8bbff79e chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: Ib5b8e6af0bde8751ab75d179af18021ea8b3d144
2023-01-10 10:29:46 +08:00
yeshanshan f7e76a9706
feat: Add SizeMode support (#95)
enable SizeMode support by default.
  user can set environment `D_DTK_SIZEMODE` to set
SizeMode support.
  application can set SizeMode by `setSizeMode` explicitly.

Log: 支持紧凑模式切换
Task: https://pms.uniontech.com/task-view-227385.html
Influence: none
Change-Id: I2eefe254f9bbf380d9ab133c4eb0caa979ed1356
2023-01-06 05:00:41 +00:00
deepin-admin-bot b6b4691e55 chore: Sync by
sync by github workflow

Log: none
Influence: none
2023-01-06 01:52:43 +00:00
bluesky c84d977c2b docs: add example for ddciicon
给ddciicon添加例子

Log: add example

Task: deepin-community/coding-quarter#26
2023-01-04 08:27:57 +00:00
xzl 87f2388f31 docs: add docs and group, update dep5
添加文档和分组, 更新分组和dep5文件

Log:
2023-01-04 14:34:51 +08:00
xzl 0a76949970 chore: add gitignore item
添加gitignore item

Log:
2023-01-04 10:34:09 +08:00
ck a74f91cc7b feat: add standard status icons
add info/ok/warning builtin svg icons (32x32 scalable)
add ok/alert/waiting/warning dci icons (20x20)

Log: none
Influence: icons
Change-Id: I57a62d452ccc58688dce57202e384a86772dd99b
2023-01-03 18:01:52 +08:00
ck f0b2a3c536 fix: unexpected reply signature bool
reply type is void not bool

Log: none
Influence: none
Change-Id: I5bdbe7ee89aedbb572e12942742225e07922be86
2023-01-03 18:01:29 +08:00
wangyixue e0081d840f chore: change include and tool directory
Change include and tool directory to dtk${PROJECT_VERSION_MAJOR}.

Log: change include and tool directory
2023-01-03 15:28:56 +08:00
wangyixue a69ed2efdc chore: add export target support
Export target Dtk::Gui. Users can simply use target_link_libraries.

Log: add export target support
2022-12-29 09:52:49 +08:00
ck 2e8f35a33e fix: fix-dark-theme not work on link file
--fix-dark-theme only copy linktarget file to ouputput dir.
record link-target map and makelink after fix job
update version to 0.0.2

Log: none
Influence: none
Change-Id: I9100c98107551eb002656e34937a8524075743bc
2022-12-28 17:38:19 +08:00
ck 0f872fa323 feat: add linglong build support
add linglong.yaml to support linglong build
see https://linglong.dev/guide/ll-builder/manifests.html

Log: linglong
Influence: linglong
Change-Id: Iaefe90c764b6f9370e9b26c07556e7a718822001
2022-12-27 17:08:51 +08:00
xzl ded66d1d3b docs: add dci docs
添加dci文档(初步完成,需要补充例子)

Log:
2022-12-27 00:32:16 -06:00
ck 2eae43e7be feat: add dci-icon-theme tool
add dci-icon-theme tool to generate dci icon theme

Log: none
Influence: dci icon theme
Change-Id: Iec3b6ab5adef6ca2510e2d22bbd78ae7395c7e51
2022-12-27 13:04:05 +08:00
zccrs d0bc6d89d5 feat: using native settings in frameless window example
Add examples for _d_buildNativeSettings platform function.

Log: none
Influence: none
2022-12-19 15:48:23 +08:00
ck eed4e3faee fix: no return value on some case
no return value after asyncCall

Log: undefined behavior
Influence: none
Change-Id: I15a6aec8a8ab57e446f25fbf91c979acde667903
2022-12-19 13:57:10 +08:00
zccrs 195e45f285 feat: add an example
Show the frameless window implementation.

Log: none
Influence: none
2022-12-16 16:09:23 +08:00
ck edd51cbd8a chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: I98f818c3f64b509dce012024da2a7f98400e2a2b
2022-12-12 17:49:34 +08:00
ck 8e1a76a607 chore: dbus service and path
<org_name>.<project_name>.<control_version>
org_name        : org.deepin
project_name    : dde
control_version : XEventMonitor1
see https://doc.uniontech.com/docs/erAdP6Xj4ySMyvAG

Log: tweek dbus service and path
Influence: dbus service name and path
Change-Id: I50dedca94bc02a6d482463d7ddecf9bc0d13b6ba
2022-12-12 17:49:34 +08:00
ck 2a9847a5a0 chore: use asyncCall instead of call
1. use asyncCall instead of call to prevent block gui
2. check sessionBus isConnected instead of isServiceRegistered

Log: none
Influence: none
Change-Id: Idac86416735482269d81432aba2993ceceb5e0e5
2022-12-12 14:19:28 +08:00
renbin 5f33adfb3c feat: Doxygen exclude dimagehandlerlibs.
Set DOXYGEN_EXCLUDE_PATTERNS variable to exclude private class
DLibFreeImage.

Log: Doxygen exclude dimagehandlerlibs.
2022-12-12 06:16:33 +00:00
renbin 9dc1bb90d1 feat: Add image algorithms, ut and comment.
Add image algorithms, unit test cases, dox file comment and example.

Log: Add image algorithms, ut and comment.
2022-12-12 06:16:33 +00:00
renbin 2600e5ea59 feat: Add the DImagehandler class.
Add the DImagehandler class, provide functions such as reading image,
rotating image, getting image metadata. DImagehandler dynamically load
libfreeimage to support extended image formats.

Log: Add the DImagehandler class.
Influence: Add build dependency libfreeimage-dev.
2022-12-12 06:16:33 +00:00
ck 70cea31810 fix: edit clearbutton pressed style incorrect
QLineEditIconButton(Qt 5.15) get pixmap from Active state
instead of Selected state when button is down
add active state pixmap (note that dstyle  will fill
10% opacity black or white on active state)

Bug: https://pms.uniontech.com/bug-view-172425.html
Incluence: QLineEdit clearbutton
Log: none
Change-Id: I182e6ec7b68bd251a3eb935616d2e3f6393d6676
2022-12-12 13:22:08 +08:00
ck d6cd2c8c63 fix: AreadList metaType override
qRegisterMetaType<AreaList>("AreaList");
覆盖导致dock使用接口出现位置异常
cc2a09558b/libdframeworkdbus/types/arealist.cpp (L35)

Bug: https://pms.uniontech.com/bug-view-175747.html
Log: none
Influence: dock hide and show
Change-Id: Ie10bd436ddaa66e0477b5db40d6e36fbea2d0733
2022-12-07 15:49:46 +08:00
wangyixue 89698b4c1c chore: fix linking error
DtkGuiConfig.cmake will always find the library under system library
path. This will cause a linking error when you want to use the version
deployed by yourself. Fix that by appending the path prefix.

Log: fix DtkGuiConfig.cmake.in
Influence: DtkGuiConfig.cmake.in
2022-12-05 10:37:45 +08:00
ck f0c7c06e79 fix: uengine not set appname cause crashed
uengine app not set appname cause DSGApplication::id() assert

Log: none
Influence: uengine app
2022-12-03 15:19:59 +08:00
ck 36eb4ff565 chore: 适配 XEventMonitor 服务改名
修改 XEventMonitor 服务名为 org.deepin.api.XEventMonitor1

Log: 修改XEventMonitor服务名。
Influence: 无。
2022-12-02 13:52:35 +08:00
ck b1a1654f69 chore: update changelog
5.6.2.2

Log: none
Influence: none
2022-11-30 11:54:26 +08:00
Ye ShanShan 9fb5d8c794 fix: Remove ASan check for debug
Removing asan check

Log: 移除库的asan检测
Influence: none
Change-Id: I248ae4d41dfcb70e565fc68d510b9c318c459ee1
2022-11-29 14:51:24 +08:00
ck b6d844990b feat: construct DDciIconPalette from QPalette
add a way to construct DDciIconPalette from QPalette

Log: none
Influence: none
Change-Id: I4e9b9f8bf3a653c066bf92c7ba1a3ef72526e2ac
2022-11-29 11:42:52 +08:00
ck 1e305e8e38 fix: 包含 href 特性的 svg 图标无法显示
librsvg2 对 SVG2 的 href 解析有问题,需要改成 xlink:href 规避
当前是临时规避方案,如果后续 librsvg2 升级修复这个问题,可以 revert
https://www.w3.org/TR/2018/CR-SVG2-20181004/types.html#InterfaceSVGURIReference

Task: https://pms.uniontech.com/task-view-218689.html
Influence: 包含href的svg图标
Log: 修复包含href的svg图标无法显示的问题
Change-Id: Idaf0ca9519153cd8fe217aeaaeab250b18f35393
2022-11-25 16:20:41 +08:00
deepin-admin-bot 7f0057bcd0 chore: Sync by 3de30af6dc
sync by github workflow

Log: none
Influence: none
2022-11-24 08:45:32 +00:00
deepin-admin-bot f688039440 chore: Sync by 6aa579e31c
sync by github workflow

Log: none
Influence: none
2022-11-18 02:00:24 +00:00
ck 934be318be feat: add DIcon
get pixmap of specified devicePixelRatio
Fix https://pms.uniontech.com/bug-view-162771.html

Log: none
Change-Id: I38b16c8402be74d1ef216faf7c77fa096282dadc
2022-11-17 13:54:12 +08:00
deepin-admin-bot de0385eca6 chore: Sync by 50ad27fb2a
sync by github workflow

Log: none
Influence: none
2022-11-16 03:44:34 +00:00
deepin-admin-bot f94b34cf37 chore: Sync by d15debb9d3
sync by github workflow

Log: none
Influence: none
2022-11-11 06:54:33 +00:00
Ye ShanShan 27eeedefdf feat: Moving loadTranslator from dtkwidget
moving implement of loadTranslator from dtkwidget,
  refact the code's logic.

Log: 加载翻译功能移至dtkgui,以便供dtkdeclarative使用
Bug: https://pms.uniontech.com/bug-view-157977.html
Influence: qml相关应用没有加载翻译
Change-Id: I75483320cbb6f8a1378cb8a93f00da3d8abfc26f
2022-11-03 10:24:56 +08:00
kamiyadm cedce64025 fix: cannot find dman if the installation path not /usr/bin
find dman from system environment variables

Log: none
2022-10-28 13:11:55 +08:00
wang fei aa23085099 feat: Add Warning for unsupport Image format
it causes paint error when load unsupport image format, we add
output some information.
  we can install package `qt5-image-formats-plugins`.
  it's need to support `webp` image for some dci icon.

Log: 添加dciicon图标解析失败导致无法绘制时的警告信息
Influence: none
Change-Id: Ief27263af5caa74c4a9f0436ebdf8759ea39bd82
2022-10-27 11:24:16 +08:00
ck 37aa254da9 fix: filedrag do not send data in ll-box
qApp->applicationPid() 获取的是沙箱中的pid
QDBusConnectionInterface::servicePid 获取的是沙箱外的pid
改成相同的pid

Log: 修复v23无法拖拽邮件到桌面
Bug: https://pms.uniontech.com/bug-view-156601.html
Change-Id: I1e41a47e7f1e5030a33fff766b7fa35c675b7ae7
2022-10-20 11:36:13 +08:00
deepin-admin-bot 3fc47d2201 chore: Sync by 6fbf8e00b9
sync by github workflow

Log: none
Influence: none
2022-10-14 05:24:57 +00:00
rewine 5204f570ef feat: Improve install path information
Log:
1. Add DtkGui_LIBRARY_DIRS
2. fix typo in Config.cmake
3. replace the previously missed  INCLUDE_INSTALL_DIR
2022-09-27 03:35:46 +00:00
Ye ShanShan d30618f92b fix: Cast error when platform theme changed
QMetaMethod::invoke will test whether object is an instance
of the QMetaObject by Q_ASSERT(mobj->cast(object)),
but invokeOnGadge will not, and their role seem to be the same,
we only use DirectConnection to invoke it.
  DPlatformTheme is inherits DNativeSettings, and it's metaobject
is changed to DNativeSettings in qt5platform-plugin.

Log: 调用invoke会做assert判断,导致当qt为debug编译时,改变主题会导致程序崩溃
Influence: 当qt为debug编译时,改变主题会导致程序崩溃
Change-Id: I9133430ba6f3df4c4a806ff9fa96ba8ec8213ce4
2022-09-27 02:10:05 +00:00
Ye ShanShan 999b6f5fc5 fix: Application theme can't follow change by system
DPlatformTheme is invalid when DGuiApplicationHelper::instance()
is called before QApplication constructed. it causes application
theme can't follow change by control-center setted.

  for example:
```c++
DGuiApplicationHelper::instance();
QApplication a(argc, argv);
```
  it also reports warning info about `Must construct a QGuiApplication
before accessing a platform function` in QGuiApplication.

Log: 延迟DPlantfromTheme构造
Bug: https://pms.uniontech.com/bug-view-160485.html
Influence: 先调用DGuiApplicationHelper::instance()可能有影响,
若先构造QApplication,与之前逻辑一致

Change-Id: I91297fb47c38c1ebb6d97f9c62915aa5d5557624
2022-09-26 11:38:24 +08:00
rewine f7324e32cf feat: Improve version information
1. 使用 CMakePackageConfigHelpers 生成 Config.cmake
2. 提供 DtkWidgetConfigVersion.cmake 供调用者检查版本
3. 使用 GNUInstallDir 提供的 FULL 版本变量配置 pkg-config 路径
4. 补充 pkg-config -L 参数
5. 增加引入 dtkcore 版本检查
2022-09-22 14:34:03 +08:00
chenhongtao 69f96446c0 fix(licence): licence
README and LICENSE

Log: fix licence
2022-09-22 05:33:34 +00:00
Wang Zichong 798f77411a chore: update .reuse/dep5 for dox format doc files
更新 dep5 文件,追加对 dox 格式文档文件的声明
2022-09-08 01:36:08 +00:00
Wang Zichong 084d467a83 docs: update docs related to DGuiApplicationHelper
更新与 DGuiApplicationHelper 相关的文档

相关反馈:https://github.com/orgs/linuxdeepin/discussions/3412

Log:
2022-09-08 01:36:08 +00:00
chenhongtao 4cffb60f92 chore(mkspecs): define mkspecs self
一开始只处理了archlinux和debian,但是nixos更加特殊,以外还有很多不知道的处理,所以让打包者自定义好了

Log: mkspecs path
2022-09-06 06:23:02 +00:00
chenhongtao 09de488645 fix(coverage): add the option of compiler to generage gcda files
A mistake, the compile option is forgetton

Log: add compiler options to generage gcda files
2022-09-05 09:04:13 +00:00
chenhongtao 9dbff1eb87 fix(shell): fix recoveryshell to cmake
Now the configure file is cmake , then the shell should be cmake too

Log: fix recoveryshell
2022-09-02 08:28:53 +00:00
chenhongtao adb29f1dff fix: wrong option() usage in CMakeLists.txt
修复错误的 option() 用法

Log: wrong option usage
2022-09-02 15:06:28 +08:00
Chen Bin c20933e29c fix: Abnormal Dci Icon on high resolution screen
The AA_UseHighDpiPixmaps attribute is used to control the icon
blurring problem of the high-resolution screen. However, we do
not use this attribute, but expand the standard size of the icon
by default. This is unreasonable. Therefore, we modified the way
to enlarge the icon size to use AA_ After the usehighdpipixmaps
attribute, the icon blurring problem of the high-resolution screen
is solved.

Log:
Bug: https://pms.uniontech.com/bug-view-150309.html
Change-Id: Ie7d476cdec6c2ddea0a6432bc4a8a7d26aab5cac
2022-09-02 14:19:42 +08:00
chenhongtao 750478f24e feat(doc): add package libdtkgui-doc
build the package for doc

Log: build the pacakge of doc for dtkgui
2022-09-02 06:18:11 +00:00
Chen Bin 0abaada3ce fix: XdgIcon crashed in release mode
The return value is not processed effectively, resulting
in an exception under release mode.

Log:
Change-Id: I0c6e918a99fd6f28a441c23a28c786dac572f5e2
2022-08-31 11:11:45 +08:00
deepin-admin-bot edd1ce77ac "chore: Sync by " 2022-08-30 09:07:26 +00:00
Ye ShanShan bf97026e5e chore: Add zh_CN readme
add README.zh_CN.md

Log: 添加中文说明文档
Influence: none
Change-Id: I2be04bc4b9142d6ba3cb095a1a075212031d6895
2022-08-29 08:25:11 +08:00
xzl 77638b7fb5 chore: update .dep5
更新dep5文件

Log: 更新dep5文件
2022-08-19 10:31:01 +08:00
Chen Bin 4869430d96 fix: blocked UI when help service is not open
When migrating dtkwidget code, not all code was added
completely, leaving out how to get services through the
other thread.

Log:
Influence: None
Change-Id: Ib45b596bff68a138df0b0dd50d8fb8ec0c3827c4
2022-08-18 13:14:20 +08:00
ck d1188cf35b fix(build): invalid digit "8" in octal constant
when BUILD_VERSION start with 0 was recognized as octal

Log:
Influence: debian build
Change-Id: Ic71784120cacd66f763a72f38937fc0d99fb0454
2022-08-18 13:13:56 +08:00
ShootingStarDragons 7f227daf8a feat(tocmake): tocmake
I change the source code from qmake to cmake. Move the files
which will be install to the /usr/include to $root/include, which will
help to mattern match and easylier to do install. and the change will
break the build of qmake

Log: from qmake to cmake

Influence: qmake is breaked
2022-08-17 16:59:12 +08:00
deepin-bot[bot] b9d3127db6
chore: Sync by 8fb17418f4 (#49)
chore: Sync by 8fb17418f4
2022-08-16 09:28:16 +00:00
deepin-bot[bot] bdfcc85de9
chore: Sync by ab82576125 (#48)
chore: Sync by ab82576125
2022-08-16 00:07:28 +00:00
wangyixue 7efd175217 chore: Rename zh_CN README
Rename README_zh_CN.md to README.zh_CN.md.

Log: Rename zh_CN README
Influence: None
2022-08-15 08:12:50 +00:00
deepin-bot[bot] 689785e07e
chore: Sync by 64c2bdac28 (#46)
chore: Sync by 64c2bdac28
2022-08-15 02:22:49 +00:00
wangyixue 1ad9b719d5 chore: Add zh_CN README
Add zh_CN README.

Log: Add zh_CN README
Influence: None
2022-08-15 01:50:18 +00:00
deepin-bot[bot] c4bd7a1dd5
chore: Sync by 1086c873ff (#44)
chore: Sync by 1086c873ff
2022-08-12 01:59:12 +00:00
deepin-bot[bot] 0f802e61e4
chore: Sync by 8cd7951872 (#43)
chore: Sync by 8cd7951872
2022-08-11 08:45:53 +00:00
xzl 987b356f46 chore: adapt REUSE license header
修改版权声明

Log: 修改版权声明
2022-08-11 05:01:51 +00:00
Chen Bin 75e7f708ae chore: Add stream operators for DciIcon
Register the stream operators when the ddciicon
has been initialized. It is convenient to drag
and drop in the list view and register it into
the meta object.

Log:
Influence: None
Change-Id: I90ba9199bd3139e0423f1a3d8a6897990e697708
2022-08-11 02:41:51 +00:00
Wang Zichong c58b078b79 chore: build doxygen documentation
追加基于 doxygen 的文档构建

Log:
2022-08-09 07:58:58 +00:00
Chen Bin 8a9fa760f0 feat: Register the DciIcon as a meta type
After registering the DciIcon as a meta type, it is
convenient for applications to use it on QVariant.

The << and >> operators are provided to facilitate
applications to read and write.

Log:
Influence: None
Change-Id: I0df76a9e5378a46dcb075b2368fd05eb360d074d
2022-07-29 07:31:23 +00:00
zccrs 2c345bbd26 fix: remove unused depend of Archlinux
Remove 'qt5-x11extras'.

Log:
2022-07-27 11:34:32 +08:00
deepin-bot[bot] 7e2f328a57
chore: Sync by fed570b6d7 (#35)
chore: Sync by fed570b6d7
2022-07-26 05:40:33 +00:00
Cloud 20fd72d9d3 fix: build failed when the .git folder exist
build failed when the .git folder exist

Log: fix build failed when the .git folder exist
2022-07-25 08:58:53 +00:00
justforlxz ffe5dfa572 fix: missing runtime qtxdg
add qtxdg package

Log:
2022-07-21 18:05:06 +08:00
deepin-bot[bot] 0c3dd24063
chore: Sync by (#33)
chore: Sync by
2022-07-21 09:55:45 +00:00
deepin-bot[bot] 6002ec2b37
chore: Sync by (#30)
chore: Sync by
2022-07-19 10:28:40 +00:00
ck ea044318c0 fix(build): arch build failed
add makedepends libqtxdg

Log:
Influence: none
Change-Id: I7993a5bd0ca9cadac0c2af38a10e9d45afd8d75a
2022-07-19 10:22:35 +08:00
ck a479eaa5a8 chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: Iefda76009421210bfb0132576e973757407fafd4
2022-07-19 10:22:35 +08:00
ck 4976a77764 chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: I6ba374db79ab7e5448317008cf97f26c5ba23b29
2022-07-19 10:22:35 +08:00
Chen Bin d0bf83a9f6 fix: Icon fallback for mode option only
In the method of getting icons in QML, only the mode of
the icon needs to be fallback, so change all fallback to
only fallback mode to ensure the consistency of the interface.

Log:
Influence: None
Change-Id: If95c352b77c89fba2e393e542d43f19aff665ba3
2022-07-19 10:22:35 +08:00
Chen Bin 454ba294a9 fix: DciIcon allows no fallback when matching icons
When using DciIcon, it is allowed to apply a fallback mechanism
that does not use DciIcon's own. In this case, the target icon
will be found directly by the parameters.

Log:
Influence: None
Change-Id: Ia288e3ba3bd08c2a7729cf9f6154e77e4ad7b512
2022-07-19 10:22:35 +08:00
Chen Bin b917cd8f65 fix: Add default icon fill style
1. For icons that do not use the palette, it is hoped that the
effect can be achieved by modifying the brightness of icons in
different states. Therefore, it is necessary to add an interface
for DciIcon to determine whether to use the palette.

2. Add the interface to modify the icon style by default, traverse
the pixels of the picture, and uniformly reduce the brightness.

Log:
Influence: None
Change-Id: I2c8592fab72751f887b51d48f346e562f82a51cc
2022-07-19 10:22:35 +08:00
ck 3cba7f1fce chore: update changelog version
update verion to 5.6.1

Log: none
Influence: none
Change-Id: I39e316f1e556d2fe67fc68bce5bcf2a303f25cbd
2022-07-19 10:22:35 +08:00
ck 326eb00c69 chore: use Qt5XdgIconLoader instead of Qt5Xdg
Qt5Xdg depends Qt5Widgets, dtkgui not depends Qt5Widgets

Log: none
Influence: none
Change-Id: I8dd89e323ff7c7cdaa5c9ac9ea62bc70d6d506e8
2022-07-19 10:22:35 +08:00
ck 71b349d2c7 fix(build): 覆盖旧配方rc文件重复添加
util.pri 中添加过 RESOURCES,去掉重复添加的

Log: none
Influence: none
Change-Id: Ie576f712405dc9309c164324f745567603a74bbc
2022-07-19 10:22:35 +08:00
wang fei 0f52bb9546 chore: 更新changelog
develop/snipe 分支更新changelog 到 5.6.0.1

Log:
Influence: changelog
Change-Id: I4da222f8d3b65b85acb3d507acff51c219453aa1
2022-07-19 10:22:35 +08:00
ck e7568851c4 revert: 将拼写错误接口标记废弃
This revert commit 06d2103534a21346e3996dbbcdf7cd403411bf0e
标记废弃而不删除,保证接口不减少

Log:
Incluence: abi
Change-Id: I4c5a24088eeafacad7a421f91f4c97b069ebed48
2022-07-19 10:22:35 +08:00
Chen Bin 5c15f33b5d fix: Memory leakage of icons
When the picture data is empty, an uninitialized variable generates a
random-size picture, which takes up a lot of memory space. So these
variables must be initialized before they can be used to prevent unknown
problems.

Log:
Influence: Dci Icon
Change-Id: Ife9f6e02f3fe2cc07e9d6f9f39d76b6230c6c930
2022-07-19 10:22:35 +08:00
Chen Bin 4b8687678b fix: DCI path has one more '/' symbol
When looking for icon theme, redundant '/' symbols will
appear in the icon of parsing application.

Log:
Influence: None
Change-Id: Ib55a8d6132eb1ed2aec98918529d59c3dd9c9536
2022-07-19 10:22:35 +08:00
Chen Bin 503ac5d6b0 chore: fix typo
DPalette中存在错别字接口修复。

Log:
Influence: 使用dtkgui的应用的接口影响
Change-Id: I4622c7c9c40e2aa7f3924f332dbe9f20a0dfd9ac
2022-07-19 10:22:35 +08:00
ck 7eefcfe8ae fix(build): can't build with source format '3.0 (quilt)'
debian: switch packaging format from "quilt" to "native"

Log:
Influence: build
Change-Id: I2fdda4245fcc0e467b9d815c846d791791950b3f
2022-07-19 10:22:35 +08:00
Ye ShanShan ca0a01c9c7 feat: add openUrl function
it's convenient for qml moved openUrl from dtkwidget to dtkgui.

Log: 
Influence: dtkdeclarative relys on this commit.
Change-Id: I7f720b02e91467a2bfb2bd3608afba8ad0d12312
2022-07-19 10:22:35 +08:00
Ye ShanShan 679a234177 feat: Add user manual functon
widgets and quick both use user manual,
so it is moved from DApplication.

Log: 
Influence: dtkdeclarative relys on this commit.
Change-Id: Ie2a5fb7edffb9ceeee48d42ba1b396291a4e5539
2022-07-19 10:22:35 +08:00
ck 7484c50c08 fix: 修复异常退出时再次启动失败的问题
reverts commit 88e0b51da7
去掉原来通过共享内存记录pid的方式来避免快速启动应用导致单进程失败的实现
改成启动时通过QLockFile来确保是 server 还是 client。保证只有一个 server ,其他
都是 client (旧逻辑:启动先通过localsocket连接 localserver,连接失败再启动
server,正常启动时没有问题, 当脚本快速多次启动(detached)单进程应用时,都在
等待连接,超时之后就启动了多个应用)

Bug: https://pms.uniontech.com/bug-view-111699.html
Log:
Influence: single-instance
Change-Id: I9b38e039abbbd70de969a1abf2f4f37fe07e1315
2022-07-19 10:22:35 +08:00
Chen Bin 6393c2e1ee refactor: Refactor the attribute parsing function
1. Separate the logic of each step so that the parsing part of each
property does not interfere with each other.

2. Fix the problem of parsing failure when it has `padding` and no
`palette` in the property

Log:
Influence: None
Change-Id: I35c2b807a72d6329a222fbcd99ce5b656e1dc412
2022-07-19 10:22:35 +08:00
wang fei 2c0a96ce2a feat: ddciicon增加fromTheme接口
1. 增加static DDciIcon fromTheme(const QString &name);
2. 增加static DDciIcon fromTheme(const QString &name, const DDciIcon &fallback);

Log:
Influence: fromTheme接口
Change-Id: I280bbac69e68bd500069ad145baf02861311f3f7
2022-07-19 10:22:35 +08:00
zccrs 3dd4b9b5fa feat: support group name on find dci icon file
Use the '/' to split the icon group name and it's actual icon name.
In the dtkdeclarative and dtkwidget, should be add the application
id for prefix for the icon name, eg: the "test" built-in icon in the
"org.deepin.app" application,  when to find it with
DIconTheme::findDciIconFile, the "iconName" argument should is
"org.deepin.app/test".

Influence: 无

Log:
Change-Id: Icc45faf16926993a6281aca5bee995b839c5b462
2022-07-19 10:22:35 +08:00
zccrs 54ef3e64ca feat: supported fallback to without theme directory for get dci icon
Use the DStandardPaths::paths(DStandardPaths::DSG::DataDir) instead of
the DStandardPaths::path(DStandardPaths::DSG::DataDir), support multi
path for find icon from theme.

Influence: 无

Log:
Change-Id: Ie444eea4e6a93ff37a8585aee8b451940302cd7f
2022-07-19 10:22:35 +08:00
Chen Bin e9c615b5dc feat: Add the webp plugin dependence
DCI icons need the support of webp plugin when parsing
some icons, otherwise the images will not be displayed
normally.

Log:
Influence: Dtkgui dependence
Change-Id: I9c4a780dc23fdf2e96c9e23e6580b4efd56f695b
2022-07-19 10:22:35 +08:00
Chen Bin d145d3027d fix(DciIcon): Image scaling sawtooth
Fast scaling of the image will cause aliasing problems, Use
smooth scaling to solve this problem.

Log:
Influence: Dci icon
Change-Id: I4fa8e464539e03bd7bee79fe2f3e34463b3bd6c3
2022-07-19 10:22:35 +08:00
Chen Bin 411ceb5116 fix(DciIcon): Function add const keyword
Add keywords to limit the call scope of a function.

Log:
Influence: Dci icon
Change-Id: I091fca795da23aa128ffc0e5bbecf361d5db9b15
2022-07-19 10:22:35 +08:00
Chen Bin eba6c902da fix: macos runtime error.
Add runtime environment dependencies for MacOS.

Log:
Influence: dci image tool
Change-Id: I1d8869b719fcaa1ff6cbab9d88b7a330f6fa3b67
2022-07-19 10:22:35 +08:00
Chen Bin 533d213b1b feat: Add dci image convert tool
Some images saved into dci icon should convert it's format
to alpha8. therefore, we need to add a tool to complete the
format conversion.

Log:
Influence: none
Change-Id: Ia9e146db60e9e7cc4b323c5a4b892777a9313a42
2022-07-19 10:22:35 +08:00
Chen Bin 885c1fd01f feat(DCI icon): Add analytical adaptation under alpha8 format
Alpha8 format only retains the alpha channel, so the file size
of DCI icon will be effectively reduced. However, due to the
compression problem of some image formats, this behavior only
supports images in the format of "PNG".

Log:
Influence: dci icon
Change-Id: Ifbc99fc1a5995adbf593d24aa60b943a49d4b308
2022-07-19 10:22:35 +08:00
Chen Bin 794fdc7af4 fix: Determine if the icon file is empty when painting
There may be situations where the icon data reading fails
or the icon file cannot be read, resulting in the inability
 to obtain the pixmap data with warnings.

Log:
Influence: Built-in Icon
Change-Id: I6fa4677bc4c5d7986d5546c4068d390976591e98
2022-07-19 10:22:35 +08:00
Chen Bin 1d4d680ded fix(icon theme): Search built-in theme when themeName is empty
We expect to find icons from built-in icon themes without icon themes.

Log:
Influence: DCI icon theme
Change-Id: Ie625c4f9c431c4fb95f5c509d16742715d79a9a1
2022-07-19 10:22:35 +08:00
Chen Bin 6d092b93f0 feat: Add icon padding property
Layers with some icons may have a padding attribute that
makes the layer not take up Icon space beyond the padding
area (based on this design).

1. Padding will increase in scale ratio to fit icon size
2. The resulting icon file will contain all sizes of the
icon (including padding sizes).
3. If the target icon size is larger than the source icon
size, padding scales to fit the icon size.

Log:
Influence: DCI icon
Change-Id: I5f1594e24202bf5ee1891885322e327d37344d23
2022-07-19 10:22:35 +08:00
Chen Bin a252a7fa1f fix: Convert icon palette to QString
There is no need to convert the icon palette into qurl type,
but directly into qstring type in the internal implementation,
which is convenient for external use.

Log:
Influence: dci icon
Change-Id: Idc0136bb0fdff2ac96b0f84aca9ff86f5b4df152
2022-07-19 10:22:35 +08:00
Chen Bin b3a9d5362b refactor: Reimplement DCI Icon
1. Delete the icon type controlled by Type enum. The icon type
does not recognize whether the icon is one or more, and has
certain limitations in finding and using.

2. Delete data qualification with foreground and background only.
Add the layer concept, Each state of an icon can only add 5
layers at most, and each layer has its own color for decoration,
increasing the flexibility of icon drawing.

3. Add Icon palette object. It is a common object that controls
the color of icon layers. There are currently four palettes:
foreground, background, highlight, highlightForeground.

Log:
Influence: DCI ICON
Change-Id: Idf818cc9cf77aefd8a88a13fd21f9f817160e729
2022-07-19 10:22:35 +08:00
Chen Bin 38b51ed45d fix: High DPI case the icon size is invalid
Because of calculating the device ratio multi-times, painting icons
use a invalid size.

Log:
Influence: None
Change-Id: Ia6f5407a6bc4ad58781483c83ca08eec6a2a11a9
2022-07-19 10:22:35 +08:00
Chen Bin 56873401b9 fix: Cannot get the icon data when the iconSize is -1
Some icons use - 1 as the initial icon size, but the icon cannot be
found, This problem can be solved by modifying the judgment condition
to < = 0.

Log:
Influence: find DciIcon use iconSize -1
Change-Id: If34bd8d609a5df0f67689519abe9189cc4e44db0
2022-07-19 10:22:35 +08:00
Chen Bin b4e53fb126 refactor: Change DDciIcon result to icon path
Loading the dci icon file will consume some time. Modify the loading
icon file way to load its path, and add the corresponding cache var-
iable to speed up the loading speed.

Log:
Influence: dci icon theme
Change-Id: I44c593484da14a4c2757ac38321622ad83b031b0
2022-07-19 10:22:35 +08:00
Chen Bin 678a18847e feat: Add implementation of icon theme
This implementation is based on the icon theme specification and
the dci file specification. Relevant specifications including icon
naming, directory naming and icon search are formulated. For more
details, please refer to the icon topic specification document of
DSG.

icon name example:
    // Correctly
    *  1. example
    *  2. org.deepin.app/example
    *  3. org.deepin.app/icons/example
    // Wrongful
    *  1. example.dci
    *  2. org.deepin.app/../icons/example.dci
    *  3. ../example.dci
    *  4. org.deepin.app/../icons/example.dci
    ...

icon theme paths:
    *  1. DSG system path: DSG-DataDir + "/icons"
    *  2. app resource path: :/dsg/icons
    *  3. app built in path: :/dsg/built-in-icons
    *  4. other custom paths.

Log:
Influence: None
Change-Id: If9b3cbe42b21319bfde4091f845aa1e28b7a27b4
2022-07-19 10:22:35 +08:00
Chen Bin 1562b12e9a fix: Move the CurrentType enum value to the end.
The CurrentType is a special value that indicates the type which
is used currently. It is not an actual value, and can't be used to
process logic. So move the value to the end of Type enum.

Log:
Influence: Dci Icon's type
Change-Id: I08a2ffa70d63c33f8ba4818e1982d4bbc9127fc4
2022-07-19 10:22:35 +08:00
Ye ShanShan 0eae7ec610 feat: add openUrl function
it's convenient for qml moved openUrl from dtkwidget to dtkgui.

Log: 
Influence: dtkdeclarative relys on this commit.
Change-Id: I7f720b02e91467a2bfb2bd3608afba8ad0d12312
2022-07-19 10:22:35 +08:00
Ye ShanShan 8f76d8e683 feat: Place the macro Q_ENUM after the enum declaration
This macro registers enum type with the meta-object system.

Log: 
Influence: qml access window's flags.
Change-Id: I9dfef86724a86c04b7a0fa4b36436464bd12d7da
2022-07-19 10:22:35 +08:00
Chen Bin 918da56c8d fix: DCI icon paint failed when size is invalid
When the iconsize parameter does not exist, we still expect
to draw the DCI icon instead of returning an error. Because
the icon passed in by the user already contains the size of
the icon.

The ok variable is not used. We need to use it as the judgment
condition for the success of integer conversion.

Log:
Influence: DCI Icons
Change-Id: I3a26102819542718af97aa8ff373b05cfc5de61f
(cherry picked from commit 58088867b060426cee52a7656a0986862e6ef8c9)
2022-07-19 10:22:35 +08:00
zccrs 2b30030af2 feat: 根据DCI标准添加DDciIcon类
DDciIcon 类为 Dci 文件和 Dci 图标资源提供了一个
严格标准的图标实例。通过将标准的 DCI 图标文件或图标
数据解析成可添加到 Dtk 控件中的图标资源。通常的这类
标准的图标资源都包含{ 深浅主题、图标状态、以及不同类
型 }。该类将根据当前需要的状态,将对应的图标展现出来。

 DDciIcon 所需要的原始数据文件最少需要一个 Normal
状态下的图标资源,否则此 Icon 将被视为是空图标。对于
有不同状态的图标资源,DDciIcon 在绘制时会优选选择使
用其自带的内容,但对于目标状态和图标状态不同的图标资源,
其绘制会根据画笔的前景色进行统一处理。

针对图标种类,DDciIcon 存储一个当前图标的变量,如果在
绘制时未指定目标图标种类,则会获取默认的当前图标种类变量
进行绘制,默认的当前图标种类为 TextType,不同的图标种
类其绘制方式也不一样,种类包含{ TextType、ActionType、
IconType }。详细描述请查阅DTK相关文档。

Log:
Influence: 无
Change-Id: Ia85d64e0885674d8b8ff8c17587f3781ac54d6b2
(cherry picked from commit 62f7b1d290841372a6dbe6e03a034bec093febb6)
2022-07-19 10:22:35 +08:00
Ye ShanShan b22b1d6aa2 feat: Add user manual functon
widgets and quick both use user manual,
so it is moved from DApplication.

Log: 
Influence: dtkdeclarative relys on this commit.
Change-Id: Ie2a5fb7edffb9ceeee48d42ba1b396291a4e5539
2022-07-19 10:22:35 +08:00
zccrs 6e800eb1d8 fix: Avoid repeatedly turning on notitlebar mode
Only in the enable state to initialize the window radius property.

Log:
Influence: None
Change-Id: I025bd95fe50834c8dbbbe8ca3f72945b0209af13
2022-07-19 10:22:35 +08:00
zccrs b40b8b42a8 feat: Add DIconTheme class
DIconTheme 提供从图标主题中查找 QIcon 的功能,与 QIcon::fromTheme
不同的是,DIconTheme 默认不会通过 Qt platform theme 进行图标加载,
而是直接创建内置图标引擎,或者是 XdgIconLoaderEngine,这样可以保证
在任何桌面环境下使用此接口的程序都能正确的查找到图标,这对 DTK 程序
而言非常重要,因为它们一般都还会依赖 DBuiltinIconEngine 提供的功能。

Log:
Influence: 无
Change-Id: I34ff035ffc7b3cfece780fe2676553638904a00d
2022-07-19 10:22:35 +08:00
ck d8f440c01e fix: dock radius changed when set global windowradius
if user has set windowradius, we do not set again when
DPlatformTheme::windowRadiusChanged emit.

Bug: https://pms.uniontech.com/bug-view-147219.html
Log: fix dock radius changed when set global windowradius
Influence: dock radius
Change-Id: Iba8226a67bbc5dfdac4151ab046725b3b1dca512
2022-07-13 14:42:41 +08:00
justforlxz ede95f3d9d feat: update archlinux build
update archlinux build

Log:
2022-06-21 17:43:35 +08:00
justforlxz 9777dc8959 feat: add archlinux build
sync from deepin-community

Log:
2022-06-21 13:08:01 +08:00
ck b24280bbe0 fix: dcc 再次调用 setSingleInstance后无法启动
旧版控制中心有使用不同的 key 再次调用 setSingleInstance
本次修改后,同一个进程多次调用接口使用后调用的key来锁定文件,符合
之前的 local server close 再 listen 的逻辑。

Influence: dcc setSingleInstance twice
Log: 修复dtkgui升级后dcc无法启动的问题
Change-Id: I97d9146be88d34cc12d16fc75cd1eccdeb53c315
2022-06-06 14:53:24 +08:00
WangFei 86e21e00d0
fix: 修改深色模式下TextWarning的色值 (#23)
修改深色模式下TextWarning的色值为E43F2E

Log:
Task: https://pms.uniontech.com/task-view-138099.html
Influence: 深色模式TextWarning调色板
2022-06-01 09:19:44 +08:00
deepin-bot[bot] fe8ae12998
chore: Sync by 99dfe0471c (#22)
chore: Sync by 99dfe0471c
2022-05-19 03:38:46 +00:00
deepin-bot[bot] 6ef15092b2
File Sync from linuxdeepin/.github (#21)
chore: Sync by b5a441b9bb
2022-04-21 07:01:55 +00:00
deepin-bot[bot] a7b6d0cbe0
chore: Sync by 41155231b0 (#20)
chore: Sync by 41155231b0
2022-04-18 09:42:45 +00:00
mike 0ff3c8fa33
fix: 修复异常退出时再次启动失败的问题 (#18)
reverts commit 88e0b51da7
去掉原来通过共享内存记录pid的方式来避免快速启动应用导致单进程失败的实现
改成启动时通过QLockFile来确保是 server 还是 client。保证只有一个 server ,其他
都是 client (旧逻辑:启动先通过localsocket连接 localserver,连接失败再启动
server,正常启动时没有问题, 当脚本快速多次启动(detached)单进程应用时,都在
等待连接,超时之后就启动了多个应用)

Bug: https://pms.uniontech.com/bug-view-111699.html
Log:
Influence: single-instance
Change-Id: I9b38e039abbbd70de969a1abf2f4f37fe07e1315

Co-authored-by: ck <chenke@uniontech.com>
2022-04-02 14:16:50 +08:00
justforlxz 7dd939a80f fix: remove old archlinux build check
It will use the new version profile in the near future.

Log:
2022-03-30 11:04:38 +08:00
Arun Kumar Pariyar 18ee272b32 fix: use detected pkg-config to fix cross build.
Debian Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979451

Log:
2022-03-17 14:05:47 +08:00
deepin-bot[bot] 1fe66600c3
File Sync from linuxdeepin/.github (#17)
chore: Sync by d459ab5b73
2022-03-15 08:13:54 +00:00
AlexOne 55351686f0 chore: 按照要求修改单元测试生成文件名
按照要求修改单元测试生成文件名

Log:
Influence: none
Change-Id: I032d0f01fc9e11238b6e7a81bf08d62eb81074e0
2022-02-21 13:11:57 +08:00
AlexOne 24b51b64f2 chore: 修改单元测试生成目录
修改单元测试相关文件的目录结构

Log:
Influence: 单元测试目录结构
Change-Id: Idcd26a04e02fc16dd2f83ed6f3cddf6c87f4ba24
2022-02-18 11:11:17 +08:00
AlexOne 3ecea3b455 feat: 支持无标题、窗口圆角、系统菜单
窗口圆角、系统菜单兼容旧借口,新增无标题栏的适配

Log: 支持无标题、窗口圆角、系统菜单
Task: https://pms.uniontech.com/zentao/task-view-93008.html
Influence: 所有dtk应用的标题栏、窗口圆角
Change-Id: Ia847505216521c0206776b5159fe4ae5b41df1b8
2021-12-09 16:03:52 +08:00
ck 99b89b3943 chore: dnd-example 优化及编译问题修复
1. 部分文件路径变化导致头文件找不到修复
2. 编译报错修复
3. 添加 ignore 的行为处理,当 client 拒绝时server不再继续走进度

Log:
Influence: none
Change-Id: Idd2d0df213d4c532b9fef35e0f4f6d60ec14a297
2021-12-08 16:17:55 +08:00
chenke 86b29ebcdf Revert "fix: 判断特殊环境逻辑写反了"
This reverts commit cf580cd804.

Reason for revert: <是否特效而非是否专有设备>

Change-Id: I64a692e7f223f715a9b77eebf28e918fae49ed14
2021-11-23 09:53:31 +08:00
ck cf580cd804 fix: 判断特殊环境逻辑写反了
没有加这个环境变量返回false,设置为1是true

Log:
Influence: 特殊设备判断
Change-Id: Ia7a99e20fa88a24a154196345762c4ceff6cec66
2021-11-20 14:18:10 +08:00
ck 6b4bc297d4 fix: 同一个进程再次调用单示例逻辑调整
再次调用不是直接返回true,而是不走guard守护这个逻辑。
修复控制中心再次直接运行无法激活前一个窗口的问题

Log:
Influence: 单进程接口优化
Bug: https://pms.uniontech.com/zentao/bug-view-103930.html
Change-Id: I4510f269b7c5bf8d7339f69d34d927cd4cf4d7ba
2021-11-20 12:59:00 +08:00
Ye ShanShan a53f41135d chore: 部分架构上单元测试打包错误
arm和mips架构,单元测试报munmap_chunk(): invalid pointer错误

Log: 
Influence: 单元测试报错
Change-Id: Iff51f48a20c318b0fabc6f9fe14afc00f46cf4cc
2021-11-01 15:07:12 +08:00
ck 10df23848f chore(build): add gtest-devel build required
添加gtest编译依赖

Log:
Influence: rpm 打包
Change-Id: Iccf61661a06aa75f388c88f978b98131e500e81c
2021-10-30 12:46:29 +08:00
zsien 0c81b195bf chore: 修复 euler 打包失败
* 增加依赖 dtkcommon-devel、gtest、gmock
* 删除 %{_sysconfdir}/dbus-1/system.d/com.deepin.dtk.FileDrag.conf
* 增加 %{_libexecdir}/dtk5/dde-kwin-debug

Log:
Influence: euler 打包
Change-Id: Iea46a5f29ae901dd3d556d55376b0520e9d7a521
2021-10-29 16:46:45 +08:00
ck 03fb207df5 chore(build): 增加qmake/cmake文件生成条件
仅仅当设置 qmake 变量DTK_MULTI_VERSION才生成5.5的qmake/cmake文件

Log:
Influence: build
Change-Id: I1ee763c8099c5cac0b84b4d450d97f41efed4d2d
2021-10-27 09:50:18 +08:00
AlexOne c30d53d1ec fix: 多次调用单例实例导致的应用启动不了
同一进程多次调用单例实例导致的应用启动不了。
主要在于应用使用旧的接口未更新,库的接口被依赖更新时发生的部分应用启动不了。

Influence: 所有 dtk 设置了单实例的应用

Log:
Change-Id: Ie7a97aec12ac584bbe8278c5144bc9288db614aa
(cherry picked from commit 71eabfd27f)
2021-10-18 16:14:17 +08:00
Wang Penga 8350799750 feat: 添加获取特效开关的接口
专有设备性能优化,需要获取环境变量判断当前是否开启了特效。

Log:
Change-Id: I674091c0580edeb5600cdc27ac0c40d3c76908b8
2021-10-15 15:33:16 +08:00
Chen Bin abd1a8d3e2 chore: 清除 QDoc 运行时的警告信息
1. 修改注释中错误的用法,以减少 QDoc 运行
时的报错。
2. 对部分缺失注释的类添加注释。

Log:
Change-Id: I9e2ca9b88ea0385e3bc991b2c16484f306c7b3a2
2021-09-09 16:48:47 +08:00
ck d2b41535cd chore: 部分单元测试依赖窗口特效
windowmanager有些单元测试写的不合理,用来判断是否开启特效是否支持模糊的不能直接
断定为true. platformhandle部分接口需要有模糊支持才能成功。

Log:
Change-Id: I7a03d4954d23e0d96a560c20f9c5b155aa2f0713
(cherry picked from commit e3fe88eb0d)
2021-09-06 11:01:55 +08:00
Chen Bin ec1f342a38 docs: 更新dtkgui项目注释
1. 增加QDoc注释识别配置文件
2. 修改项目注释信息,使QDoc能够正确识别
3. 修改一些不规范的注释,调整部分注释内容
4. 将部分.h文件的注释信息迁移到.cpp文件中

Log: 更新项目注释信息
Change-Id: Ide1db246b78b004b90f35be9e8201f040691a489
2021-08-18 14:14:07 +08:00
ut003691 df4d814658 feat: 添加dde-kwin-debug工具
一个监测程序启动到界面显示所用时间的工具,用来评估程序的启动性能

Log:
Change-Id: I0c9fab12d3530cd43151a9ff32187ff0a4f20d3d
2021-07-30 13:11:01 +08:00
ck 14a2e1a0e1 feat: 输出测试报告xml文件
增加测试用例输出成xml,便于后端获取测试报告数据

Log: UT输出xml报告数据
Change-Id: I313b9ed21d60b12021972dd1535b4ec5c01b79ac
2021-07-07 17:38:49 +08:00
wangpenga ffab5edef0 fix: 单元测试内存泄露
修复单元测试中 dforeignwindow 的内存泄露。

Log:
Change-Id: I531c233c6496b9ea1e2f62185b86181d160753aa
2021-07-06 09:11:34 +08:00
Chen Bin 17b58b0bb7 chore: 单元测试文件增加copyright
补上单元测试文件遗漏的copyright

Log:
Change-Id: Ia678a90b33ea4bd7e70c6f4013d5ba1befccf9c9
(cherry picked from commit 06462b7dda026efa7d46d837f86951108c28bacb)
2021-07-02 11:37:24 +08:00
wangfei a0d4c793e1 fix: cppcheck错误警告修改
单参数构造函数添加explicit关键字,局部变量声明

Log: 修复cppcheck错误及警告
Change-Id: I187ec230376c3f72488e13509b87bcfdb5dd90c5
(cherry picked from commit 3ccc4785ef)
(cherry picked from commit f6c6854942b7b9ec26dc99d556ce39755910cce7)
2021-07-02 11:37:05 +08:00
Chen Bin 118cf1daeb fix: 修复上游filedrag.conf问题
将FileDrag中的dbus改为session级别

Log:
Bug: https://pms.uniontech.com/zentao/bug-view-78217.html
Change-Id: I721040c68a9a351e57f50d4ca1b9ba00b5de1a80
(cherry picked from commit b26b6acc13)
(cherry picked from commit 68331aed06786742433d85613441cb5b410b1ee2)
2021-07-02 10:34:40 +08:00
Chen Bin 0ee689b9c0 chore: 添加一包多版本依赖的注释
更新一包多依赖pro文件注释

Log: 
Change-Id: I7db4eac6196eb72f3c5c6710ca144c3fc30516db
(cherry picked from commit 215c1f9efe93dc06d427c029735de9df502744fb)
2021-07-01 16:58:06 +08:00
wangpenga b1c55d7fa4 chore: update abi json file
按照新的规则要求更新abi文件。

Log:
Change-Id: Ia7c771466a66b445aa7bf5b64f75a57e2973902d
2021-06-22 17:03:36 +08:00
wangpenga 87b29bde2d fix: unit test memory leak check failed due to AddressSanitizer.
添加参数使得内存检测的误报不影响单元测试结果生成。
环境变量和编译参数要配合使用。

Log:
Change-Id: I144217f1ac5116e94c58e0c065e24360deb427b9
2021-06-11 15:30:29 +08:00
AlexOne 0bc6f7572b fix: unit test failed, due to QDataStream set qt version.
单元测试里面的 datastream 设置了 qt 版本号导致单元测试失败。
在qt5.11下ok,社区版默认qt5.15。读写不同版本出错。

Log: 修复社区版下单元测试失败的问题
Change-Id: I4693070762b653373bf5a4fcac4598fca69f8356
2021-06-07 20:16:51 +08:00
wangpenga 93724d74c1 fix: Add memory leak detection parameters
添加内存泄露检测参数

Log:
Change-Id: I40103596f81c92153f0b3bb437149e12d1b7b7f3
2021-06-04 15:48:00 +08:00
AlexOne 88e0b51da7 fix: DGuiApplicationHelper::setSingleInstance start multiple instances
用脚本启动实例,会发生单实例的程序启动多个实例的情况。

Log:
Bug: https://pms.uniontech.com/zentao/bug-view-69284.html
Change-Id: I935bc04b8c6c49df994d774370a68bc72d9a0f42
2021-05-28 18:34:23 +08:00
AlexOne 959c3ebc10 fix: eliminate warning
消除 if 语句缺少括号造成的警告

Log:
Change-Id: Ia52e5ad05313c8b860d51da6d160a51c5fa7dec2
2021-05-06 11:39:14 +08:00
Robin Lee 5fcda3f5e0 fix: rpm BuildRequires make
Fedora no longer installs make in the default build environment.

Log:
Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
Change-Id: I6ff54b4da9a559817b1ca86d9d60c348154e4892
2021-04-09 13:03:03 +08:00
Chen Bin 2161407cbc feat: 添加gtest单元测试
1.增加部分文件的单元测试文件
2.提高单元测试覆盖率到70以上

Log: 新增dtkgui单元测试
Change-Id: Icd8e3702ece36f6af565e2b9453015218da35953
2021-03-24 15:39:22 +08:00
Chen Bin b27f489812 feat: 适配社区版5.15环境下调色板问题
qt5.12中新增了PlaceholderText颜色,添加与5.11
颜色一致的对应颜色到此调色板中。使风格保持一致

Log:
Bug: https://pms.uniontech.com/zentao/bug-view-66654.html
Change-Id: I247d1619b9ec24582c09945bb2b3f4cd913fd4f5
2021-03-24 14:28:44 +08:00
chengyulong c988b2a824 docs: 添加DGuiApplicationHelper::setSingleInstanceInterval详细注释
添加DGuiApplicationHelper::setSingleInstanceInterval更详细的注释,增加对成员变量waitTime默认值和相关成员函数setSingleInstance的使用

Log: 添加注释
Change-Id: Ie0aeed59e3c41c9e06c131f1e1724473d10d42de
2021-03-19 13:15:46 +08:00
ck c9c2941aa8 chore: 修改ignore文件
忽略qmake生成的文件

Log:
Change-Id: I7c2a7010f9f9ae83bdb766601bf63c4484515e59
2021-03-16 11:42:16 +08:00
Chen Bin 6e3f7d497d feat: 添加部分单元测试
1.添加项目内单元测试文件
2.修改部分源码以适应单元测试

Log: 提高dtkgui单元测试覆盖率到50以上
Change-Id: Ib3cf3ccadbefbc334883c175b0a9c47d1b8674d8
2021-03-12 17:45:13 +08:00
ck 307f0e94ff fix: 完善dtkgui依赖dtkcommon
libdtdtkgui5依赖libdtkcommon, 因为filedrag的dbus配置文件移动到dtkcommon中

Log: 新增dtkcommon依赖
Change-Id: Ib5bc516a932b3883b624cb1bc02243b7959aeb9c
2021-03-03 10:11:59 +08:00
sunkang 63f1ce54b4 fix: 适配dtkgui多版本共存的处理
1. 删除src/dbus/com.deepin.dtk.FileDrag.conf 文件,此文件转移到libdtkcommon中

Log:
Change-Id: I9346141589524a209f31e8b195dfe0721778d23e
(cherry picked from commit 2a11ae19920829a411e4faabec8cbc56e50b654b)
2021-03-01 19:08:19 +08:00
ck 183fcd429b chore: 移除注释的一行
移除注释的无用代码

Log: 删除无用的注释代码
Change-Id: I896ba53ba6478460e931eff9c738d9059b02e8e1
2021-02-25 13:48:30 +08:00
ck 7925668a88 fix: 添加dtkcommon的依赖
gui添加dtkcommon依赖

Log: 修复gerrit打包失败,添加dtkcommon依赖
Change-Id: I4f866862f67697995446f54d6a269bdf07b3d22e
2021-02-25 13:27:14 +08:00
chengyulong 58e254702f feat: 增加单元测试覆盖率
对项目目录结构进行优化,增加lcov计算单元测试覆盖率。

Log: 增加lcov计算单元测试覆盖率
Change-Id: I4454aee03a1dffb8e9bc443b967aa84e7dc57a60
2021-02-04 18:11:59 +08:00
justforlxz 278f960381
feat(DGuiApplicationHelper): add setAttribute function
Support the use of setAttribute function for some settings

Log:
Change-Id: I794e300d7bff1d4ce58527e39555f7addaf247df
2021-02-04 10:30:43 +08:00
chenbin 066c89e6ed style: 修改调色板浅色模式下TextTips的颜色
将调色板中浅色模式下的TextTips颜色从#8AA1B4修
改为#526A7F

Log:
Task: https://pms.uniontech.com/zentao/task-view-57698.html
Change-Id: I57638bc4734deef0ccf272da54c08df38f603bb5
2021-01-25 17:59:33 +08:00
zccrs d2ff5d299c fix: 取消废弃paletteType
补充paletteType属性的定义,将其与themeType的含义分开,跟
最初设计的一样,paletteType仅和setPaletteType设置过的值
有关,在上次重构代码的基础上只废弃setThemeType接口。
上次重构的提交:2d18a7955d9540e2b8cd735cb3ef962f495cbb3f

Log:
Change-Id: I0df74f1f1654870e49a715dea496f5013dea67a7
2021-01-25 15:14:52 +08:00
zccrs 2ccf6dfc85 fix: 修复staticInitApplication可能会被调用多次的问题
qAddPreRoutine每调用一次即会在QCoreApplication创建
时被调用一次, 因此不要多次调用此函数.

Log:
Change-Id: Ib4efa7213aa942654c2b13a0ce89672317eb71e9
2021-01-20 10:12:18 +08:00
chengyulong 13a42f4a9a feat: 添加GTest测试单元
添加DRegionMonitor、DForeignWindow测试case

Log: 添加GTest测试
Change-Id: I46a680bb1baaec3616c238c0fac7797bdd1daecc
2021-01-18 14:48:44 +08:00
zccrs 43075064f8 refactor: 使DGuiApplication跟随QGuiApplication对象销毁
DGuiApplication中有大量的内容与QGuiApplication绑定, 因此
需要在QGuiApplication销毁时清理当前的实例, 以便当一个新的
QGuiApplication被创建时可以正常使用DGuiApplication. 主要
是为了支持在程序运行期间销毁并重新创建QGuiApplication对象
的场景, 如在deepin-turbo的booster中会预先创建一个
QGuiApplication对象(主要是预加载数据), 之后可能会删除这个
对象, 当booster开始加载一个程序时, 在程序的代码中会再次创建
QGuiApplication对象.

另外修复在非dxcb插件环境下使用DGuiApplicationHelper::applicationTheme
时可能会陷入死循环.

Log:
Change-Id: I169235cae8fd802805de6757f4e2668e65f7dfc9
2021-01-14 17:22:21 +08:00
zccrs 357df725cb refactor: 重构DFontManager类
不再提instance方法获取单例对象, 程序级别的DFontManager
转移到DGuiApplicationHelper中提供.
重构DFontManager类, 删除一些无用信号, 提供直接指定baseFont
的属性.

Log:
Change-Id: I7591acbb0b1223ae1ad4b0b8d7e0c4bbeb3b4035
2021-01-11 17:17:02 +08:00
pengwenhao 263581fce3 fix: 2d also allow setting of wallpaper effect data
2d 下也会设置wallpaper effect的数据,保障从2d切换到3d后特效可以
直接开启

Log: 2d下也允许设置wallpaper effect使用到的参数
Change-Id: I763ed7a44c07fcbda135d0b4ce35a4bec0a38851
2021-01-06 17:47:49 +08:00
zccrs f27e05fb44 fix: 修复themeTypeChanged等信号失效
当appTheme被初始化为systemTheme时, 应当为appTheme初始化信号链接

Log:
Change-Id: I682e6e64a64d687485e36b11f81ce4b6d927eaee
2021-01-05 21:36:53 +08:00
zccrs 2d18a7955d refactor: 整理DTK程序调色板相关的代码逻辑
简化程序自定义调色板与DPlatformTheme的关系, 当使用
setApplicationPalette或setThemeType自定义调色板之后,
将不再考虑DPlatformTheme中设置的themeName等属性.

废弃了paletteType属性, 避免在使用上跟themeType
产生误解.

废弃了窗口级别的DPlatformTheme相关接口, 只允许使用
sytemTheme获取系统级别的平台主题信息, 另外将applicationTheme
等价于systemTheme, 程序和窗口级别主题设置不再允许通过
DPlatformTheme从外部获取, 在实际需求中, 在程序内部
按需实现自定义即可.

Log:
Change-Id: Ideea8673bb3bdec44a8978c9f4556a971c4723b5
2021-01-04 13:26:45 +08:00
zccrs a4faf581f3 feat: add Q_GADGET for DPalette
允许在Qt元对象系统中使用DPalette, 同QPalette可用于qml中.

Log:
Change-Id: I10ca98b98800336d0584420ceb461ac197f84b97
2021-01-04 13:15:09 +08:00
zccrs 3088a98d7c fix: 修复在销毁DSvgRenderer时断言失败
Q_GLOBAL_STATIC创建的全局对象会在程序退出阶段销毁, 然而
不能保证在这之后DSvgRenderer就不再被使用, 往往会出现RSvg
对象销毁之后DSvgRenderer对象才被销毁, 将导致析构时断言
__rsvg->isValid失败.

Log:
Change-Id: I3ed2613a88c5828c79a96653f33379411d41fdb1
2021-01-04 11:52:49 +08:00
sunkang 550a8c58ea fix: 修复example生成的临时desktop文件没有删除导致的启动器显示问题
修复example生成的临时desktop文件没有删除导致的启动器显示问题

Log:

Change-Id: Iae77bed7fa3ab15ddfb76a95318e11e527d0ea7e
2020-12-30 13:51:48 +08:00
sunkang 8389d05326 feat: 新增一个函数用于判断当前桌面环境是否是平板电脑
添加一个函数用于判断当前桌面是否是平板电脑的环境

Log:

Change-Id: Icb8d76f12d5f0df3146a33a9dbd91b384049af46
2020-12-29 17:51:30 +08:00
zccrs 30c310a75f fix: 修复DPlatformTheme的主题继承时可能无法产生属性变化的通知信号
假设 A 被 B 继承,B 被 C 继承,修复当A的主题属性变化时未能通知
到C的问题。
当为窗口创建DPlatformTheme对象前,先确保当前的appTheme已经被
初始化,否则会误将systemTheme当作了主题继承对象。

Log:
Change-Id: Ic0ba7007c39e8b0e257e11ef06f26093a09b8f65
2020-12-29 15:59:06 +08:00
zccrs fde47fa1f3 fix: 整理与DPlatformTheme相关的一些逻辑
为DPlatformTheme添加更多的代码注释。
移除DGuiApplicationHelper中与systemTheme相关的信号监听,仅
使用applicationTheme中的信号即可,它会自动继承systemTheme
中与程序主题相关的属性(不包含调色板的部分)。

DPlatformTheme自动转发parent theme以及非调色板的属性变化信号
到 propertyChanged(之前这个信号只会通知与调色板内容变化相关的属性变化)

Log:
Change-Id: I136511cd94cc2b711230b561c0fa45516763a57b
2020-12-29 14:59:06 +08:00
zccrs 6f0a551492 feat: 支持设置wm class name
用于在窗口创建之前设置WM_CLASS属性,只适用于x11平台

Log:
Change-Id: I19b978ef811ec00cce0791811a7a41b5eb1bded9
2020-12-25 16:10:23 +08:00
sunkang f18578db58 fix: 修复fontGenericPixelSize属性在QML中使用类型不能识别和字体属性变化信号没有发射的问题
1. fontGenericPixelSize属性使用的quint16在qml中赋值出现不能识别的问题,这里统一修改为int类型
2. 修复系统字体大小变化后没有发射字体变化信号的问题

Log:

Change-Id: I8e7298f9f820d973ec8f03eb495beb67ae72a30d
2020-12-24 16:59:27 +08:00
pengwenhao a0e0513540 feat: add interface for set wallpaper effect parameters
添加对于kwin壁纸特效参数设置接口

log: 添加对于kwin壁纸特效参数设置接口
Change-Id: I26e4191d0922dbf07919a1922ca0ce864322cc4f
2020-12-23 09:47:11 +08:00
sunkang a9423da236 feat: 新增DFontManager类,用于字体的管理
新增DFontManager类用于字体的管理,方便字体的设置和获取

Log:

Change-Id: I97f70b8837196a89c7bfb95ac87d37d6682ae549
2020-12-22 17:24:03 +08:00
zccrs 583c58b3b2 chore: 添加对PT_GNU_STACK的指定
仅在龙芯架构上添加,默认时mips的编译器未指定相关参数
导致deb包构建时对libdtkgui动态库检查失败

Log:
Change-Id: If9f243664828c7017b2fbfe852894ff18227af44
2020-12-22 11:52:20 +08:00
sunkang 47b80d5a1d fix: registerInstanceCreator函数标记为废弃
因为DApplicationHelper继承 DGuiApplicationHelper的缘故,所以需要registerInstanceCreator
函数初始化 DGuiApplicationHelper类,用于实现单例模式,现在DApplicationHelper标记为废弃(推荐使用
DPaletteHelper类), 相应的这个函数标记为废弃

Log:

Change-Id: I401eb4cadc6abd008b90a109cf2bc20203ee57fa
2020-12-22 09:35:55 +08:00
zccrs 97f1c63d9f feat: register the DWindowManagerHelper::WmWindowTypes flags
将此类型注册以供qml使用

Log:
Change-Id: I0ffa932030d225aa0d27f7986ad8ea36e76d1e17
2020-12-21 21:02:53 +08:00
zccrs 910230573b feat: add DWindowManagerHelper::setWmWindowTypes
提供更丰富的接口用于为窗口设置WM提供的窗口类型
x11平台下的窗口类型来源: https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html

Log:
Change-Id: I843564394526a8c1041826174f84e98fae9c1ea0
2020-12-21 20:15:30 +08:00
chengyulong 16d8bf2dee fix: 修改DRegionMonitorPrivate的CursorEnter和CursorLeave错误的问题
修改DRegionMonitorPrivate的信号CursorEnter和CursorLeave与dbus相同。

Log: 修改DRegionMonitorPrivate的CursorEnter和CursorLeave错误的问题
Change-Id: Ib5c6d9301e96c431e73c51ce46d48b8f621bddc7
2020-12-07 11:16:53 +08:00
chengyulong c244347686 fix: DRegionMonitor优化,增加设置监听鼠标移动、鼠标按键、键盘按键事件的接口
DRegionMonitor因为需要调用dbus,监听鼠标移动影响性能,新增设置监听鼠标移动、鼠标按键、键盘按键的接口。增加cursorEnter、cursorLeave信号。监听全屏区域时调用RegisterArea。增加WatchedFlags的鼠标中键、上下滚动flag

Log: DRegionMonitor优化,增加设置监听鼠标移动、鼠标按键、键盘按键事件的接口
Task: https://pms.uniontech.com/zentao/task-view-45197.html
Change-Id: Id2df84097d3e7e39df37176e23fbf4383612d24d
2020-11-27 13:57:29 +08:00
ck a238a9466a feat: 重载dh_makeshlibs
安装时依赖dtk的版本号要不小于构建时的版本,需要系统部改脚本支持

Log: 修改打包规则
Change-Id: I7b6ce39ab64270072f05e8360c0ca6ebf7727ca6
2020-11-23 13:12:47 +08:00
lxz 124068be0e
feat: add github action
add github action

Log:
Change-Id: I9c85c2fc33969c2c186a501a62ded98543ad5376
2020-11-10 13:37:05 +08:00
ck 5f6ab73182 fix: disable text color hard to read
针对QPalette::Text的disable状态在暗色主题下在dialog透明模糊时,如果后面有白色背景的应用几乎看不清文字的修复。修改方法是将原来混合颜色改成降低透明度,disable时透明度未原来的40%(来自设计的建议)

Log: 修复控制中心在白色背景下,开启屏幕的第一个屏幕名称看不清的问题
Bug: https://pms.uniontech.com/zentao/bug-view-53017.html
Change-Id: Id6ce0d4bacaa7755b5d108c484d7707760bd4a72
2020-11-10 09:06:02 +08:00
Robin Lee 0e9633f2e7 feat: Initial packit setup
This commit contains the specfile for building the official package for Fedora
with a Packit setup.

Ultimately, a unified specfile is targeted for Fedora and any other rpm-based
distributions, e.g. openEuler.

And Packit(https://packit.dev/) is a tool for maintaining specfile within
upstream source. It requires a simple config file(.packit.yaml).

Log:
Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
Change-Id: I59b00d9a21b1c00a337684e5a4e3c9b2354d79f2
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/8522
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: zhangjide <zhangjide@uniontech.com>
2020-10-23 08:56:23 +08:00
zccrs ea60f6b0bb fix: fallback to parent theme for the windowRadius property
支持读取windowRadius属性时fallback到上一级的theme主题

Change-Id: I78a801b6ee216139b9aaf5644731b7ac6390704c
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/8260
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Reviewed-by: <mailman@uniontech.com>
Tested-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-10-21 17:54:39 +08:00
xmuli 6ae8f77d42 fix: Fix DToolTip control, also modified to rounded corner values.
The result is not as expected, not aesthetically pleasing, so it needs to be left alone.

Log:
Change-Id: I72624d44247d71e3eef8f9fddaddc94342c431a5
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/7957
Reviewed-by: zhangwengeng <xmulitech@gmail.com>
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: chenke <chenke@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-10-20 09:07:15 +08:00
xmuli de1f742ede fix: Fix default display right angle
A call to `FETCH_PROPERTY("DTK/WindowRadius", windowRadius)` will return -1 by default, resulting in the right angle parameter. So the cup is fixed here.

Log:
Change-Id: I4988af2bdd0a57ae99d9c5562fe8ba6808de8700
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/7769
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: chenke <chenke@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-10-16 15:55:14 +08:00
xmuli a3b9836b83 feat: Adding a Window Rounded Rectangle Interface
The deepin community version can change the window corner rounding size.

Log: The deepin community version can change the window corner rounding size.
Change-Id: I1e097bb30fd6ac6557dd255d1a70ee0e12a8c062
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/7495
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Reviewed-by: zhangyueqian <zhangyueqian@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-10-14 17:04:12 +08:00
ck e717fdaedd feat: dpalette添加打印信息输出
添加打印信息输出,方便调试,更新api.json

Log: DPalette添加打印日志支持
Change-Id: I92d779edd86717a4ab46d366c9be85fb005208df
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/5096
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: chenke <chenke@uniontech.com>
Reviewed-by: caitongxun <caitongxun@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-09-16 17:34:02 +08:00
ck 6d92f7ee2d fix: lib未指定版本号时加载成了dev包
1.QLibrary未指定第二个参数时,会找到dev包,在非开发环境时会导致加载失败。现象是svg无法渲染(即应用无图标了)。2. 更新abi.json

Log: 修复加载lib包不对的问题(更新abi.json)
Change-Id: Ie210866e090e8b6a94af34fc6fbbbd76bd25b4ef
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/2599
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-24 09:49:01 +08:00
chenbin 3d3f3de410 fix: 去除dsvgrenderer.cpp文件中INIT_FUNCTION产生的警告
修改类型转换方式,替换reinterpret_cast转换方式,增加decltype关键字进行转换以去除编译警告;并去除部分隐式转换造成的的编译警告

Log: 去除dsvgrenderer.cpp文件中的编译警告
Change-Id: I051ce3db25ba49f66f4be0d2347ea73da1ed81fd
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/2190
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-18 14:12:49 +08:00
zccrs 76f129da63 refactor: remove libqt5x11extras5-dev depend
只在一个地方使用了QX11Info,但是却导致链接了一些X11的库
所以使用native接口调用移除了对QX11Info的依赖

Change-Id: Ia272e6bf9c50ba23c3fe9148c8c329660846d410
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/2131
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-17 13:22:34 +08:00
zccrs 4c159f015d refactor: remove link the librsvg-2.0
将对librsvg的依赖改为使用QLibrary动态加载
增加了libdtkgui库的加载速度

Change-Id: Icfbfbc80f504c789cc313c27e204c5c84bea3695
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/2130
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-17 12:34:16 +08:00
ck 94e6ed00f1 fix: dtk窗口隐藏再显示无法通过窗管菜单关闭
设置MotifFunction时,既设置了close又设置了FUNC_ALL,就会出现无法关闭的情况,kwin中有这样的判断逻辑

Log: 修复应用关闭到托盘后再次显示无法通过任务栏菜单关闭所有关闭
Task: https://pms.uniontech.com/zentao/bug-view-3391.html
Change-Id: Id35b905a55159631ee1cb46c8d69a8eac5ee1a6c
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/1856
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Reviewed-by: <mailman@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-13 15:31:42 +08:00
ck a1d77d3f1d feat: add rpm spec
行业板打rpm包需要添加spec文件

Log: 支持rpm打包构建
Change-Id: I383acfb32526015f8a4f05c1ebd611b82df0cb10
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/1529
Tested-by: chenke <chenke@uniontech.com>
Reviewed-by: chenke <chenke@uniontech.com>
2020-08-11 15:38:34 +08:00
ck b227464a40 feat: 新增windowFromPoint接口
获取指定位置的窗口,需要自己释放内存

Log: 新增windowFromPoint接口
Bug: https://pms.uniontech.com/zentao/bug-view-30174.html
Change-Id: I26d8ba04d3497832312129a660c6d01ea8fd9e30
Reviewed-on: http://gerrit.uniontech.com/c/dtkgui/+/1158
Reviewed-by: chenke <chenke@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Reviewed-by: <mailman@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-06 10:39:24 +08:00
ck 8219b171f3 fix: 加入symbols文件后有的架构打包失败
文件名改为 symbols.amd64 只在amd64 平台检查abi兼容

Log: 修复加入symbols文件后有的平台打包失败
2020-07-02 18:53:48 +08:00
ck 557caf63d3 fix: function name typo and default waitTime
修改接口的一个拼写错误,将原来的接口标记为废弃,默认等待时间和QLocalSocket 一致 3000ms

Log: 修改默认等待时间和接口拼写错误
Task: https://pms.uniontech.com/zentao/task-view-28124.html
2020-06-29 10:39:08 +08:00
lyym f774bfc4f2 abigail: 集成dabi的json文件到包中
通过json文件来对比检查EXPORT_SYMBOL的函数是否发生改变,在debian目录加入了之
前的版本生成的json文件用来和基于当前生成的做对比

Log: 加入用以对比检查EXPORT_SYMBOL的函数是否发生改变的json文件
Task: https://pms.uniontech.com/zentao/task-view-28032.html
2020-06-28 17:48:41 +08:00
ck b279354875 fix: delete symbols file
Log: symbols文件错误导致sw和i386编译失败。暂时删除。
2020-06-23 17:46:13 +08:00
chengyulong_cm ab57dd8dd0 add: add symbols file 2020-06-18 19:21:22 +08:00
chengyulong b5539b26fe fix: bug27468,注销PC后,打开语音记事本,打开两个语音记事本应用窗口
将语音记事本设置为开机启动后,重启或注销再重新登陆后在该应用程序自启动前可手动启动一个语音记事本导致会启动两个语音记事本,原因是在判断是否已经存在正在运行的语音记事本时等待QLocalSever通知时间太短,故此将原本等待100ms改为等待1000ms,增加一个设置等待时长的接口。增加等待时长可能会增加程序自启动的耗时。

Log: 修复语音记事本设置为开机启动后,重启或注销系统后可打开两个语音记事本的bug。
Bug: https://pms.uniontech.com/zentao/bug-view-27468.html
2020-06-17 18:19:59 +08:00
刘阳 c3e0ce45ca fix: lintian command check libdtkgui5*.deb occured error
使用 lintian 命令检查 deb 包报错;E: libdtkgui5: dbus-policy-excessively-broad。
2020-06-01 16:09:51 +08:00
zccrs 2582f298d6 refactor: disable dh_makeshlibs 2020-05-06 12:58:47 +08:00
zhangwengeng 17d1d6af12 license: switch to LGPLv3 license 2020-04-24 17:55:17 +08:00
zhangwengeng eb80c8d763 license: switch to LGPLv3 license 2020-04-24 16:52:09 +08:00
Gary Wang e0ff824d03 Release 5.1.2 2020-04-09 14:41:06 +08:00
sunkang 3543ab0ac6 feat:添加Launcher API接口
1.添加了测试用的demo
2020-02-21 15:08:56 +08:00
zccrs ea029575d8 hasComposite default value to true on non-x11 platform 2020-02-21 14:31:38 +08:00
justforlxz 66a653f465 fix: ldap user cannot use single instance
group scope use gid and user scope use uid
2020-02-20 09:44:57 +08:00
Ding Heng 2a62e855bc Update .gitlab-ci.yml 2020-01-08 10:44:36 +08:00
zhangwengeng f15f19b10c feat: Add ObviousBackground enum 2020-01-06 13:10:02 +08:00
zccrs d402053227 feat: add DGuiApplicationHelper::isXWindowPlatform 2019-12-30 20:08:13 +08:00
ck 91d3c11943 docs:add dfiledrag comments 2019-12-24 16:01:46 +08:00
wang 6b6efe32ea feat: 添加dthumbnailprovider注释 2019-12-24 13:45:53 +08:00
wang ab1f527976 feat: 添加dsvgrenderer类的注释 2019-12-23 14:23:37 +08:00
wang 3048443350 feat: 添加dnativesettings注释 2019-12-23 14:10:39 +08:00
wang e3ed72c652 feat: dplatformtheme注释 2019-12-23 14:10:04 +08:00
wang 896675cc75 feat: dregionmonitor注释 2019-12-22 11:46:12 +08:00
zccrs cca21c5e51 feat: add setDotsPerInch/dotsPerInch functions for DPlatformTheme 2019-12-19 23:04:15 +08:00
wang 9e57aa6736 feat: 修改调色板颜色 2019-12-18 14:37:03 +08:00
zccrs 512bf17e9f fix: adjust FrameBorder color of dark theme 2019-12-12 16:03:34 +08:00
zccrs 773b21d8d2 feat: add DRegionMonitor DSvgRenderer DThumbnailProvider
move from dtkwidget
2019-11-30 16:51:43 +08:00
zccrs 2d41615156 feat: add FrameShadowBorder color 2019-11-26 11:24:10 +08:00
zccrs d5e94c7d30 feat: add PlaceholderText color for DPalette 2019-11-23 10:33:37 +08:00
Ding Heng 705e9599b5 Update .gitlab-ci.yml 2019-11-18 10:05:26 +08:00
zccrs 1487cf4c56 refactor: use double of fontPointSize 2019-11-13 13:50:08 +08:00
zccrs ad9d83530e feat: add properties for DPlatformTheme
Qt/FontName
Qt/MonoFontName
Qt/FontPointSize
2019-11-11 16:12:37 +08:00
zccrs 54b7c79e6d feat: support instance process 2019-11-08 20:05:08 +08:00
zccrs 00a1e3e0e2 chore: adjust standard colors on ColorCompositing mode 2019-11-06 15:44:44 +08:00
wang 426bfac1ba feat: 添加 Dguiapplicationhelper 注释 2019-11-05 13:17:32 +08:00
wang e0b5af5972 feat: 添加 Dpalette 注释 2019-10-29 19:10:47 +08:00
zccrs 94fd8d772d chore: adjust HighlightedText of dark theme 2019-10-28 15:19:22 +08:00
zccrs 80e83bc1a5 feat: add DGuiApplicationHelper::setColorCompositingEnabled 2019-10-24 18:57:40 +08:00
zccrs bc33564826 fix: use "enabled" of DPlatformHandle::setXXXNoTitlebar 2019-10-14 16:48:12 +08:00
zccrs f1fa63fac2 fix: use active color if the color is valid 2019-10-08 11:03:03 +08:00
zccrs 55dffb8646 feat: adjust QPalette::Base color of dark theme 2019-09-26 19:23:59 +08:00
zccrs 55f5fb2f64 feat: support active color if the app palette is set 2019-09-26 13:42:37 +08:00
zccrs 9ea7d2d311 feat: adjust palette colors 2019-09-26 11:02:17 +08:00
Chris Xiong 6286dceb20 feat: add classes for advanced inter-process drag and drop support. 2019-09-24 14:29:02 +08:00
zccrs 88c828b45c fix: return the 'ok' value for DPlatformHandle::setEnableNoTitlebarForWindow 2019-09-21 14:24:55 +08:00
zccrs 5f781c7aac chore: set the no titlebar window window radius to 18px with default 2019-09-21 13:48:24 +08:00
zccrs cb5835885e fix: check the creator is using for DGuiApplicationHelper::registerInstanceCreator 2019-09-20 18:59:17 +08:00
zccrs acba86a4c0 chore: adjust bright text 2019-09-19 13:39:41 +08:00
356 changed files with 31981 additions and 4408 deletions

20
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,20 @@
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.

15
.github/workflows/backup-to-gitlab.yml vendored Normal file
View File

@ -0,0 +1,15 @@
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

13
.github/workflows/call-api-check.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: apiCheck
on:
pull_request_target:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
api-check:
uses: linuxdeepin/.github/.github/workflows/api-check.yml@master
secrets: inherit

50
.github/workflows/call-auto-release.yml vendored Normal file
View File

@ -0,0 +1,50 @@
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_release:
uses: linuxdeepin/.github/.github/workflows/auto-release.yml@master
secrets: inherit
with:
version: ${{ inputs.version }}
name: ${{ inputs.name }}
email: ${{ inputs.email }}
timezone: ${{ inputs.timezone }}

16
.github/workflows/call-auto-tag.yml vendored Normal file
View File

@ -0,0 +1,16 @@
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

View File

@ -0,0 +1,13 @@
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

9
.github/workflows/call-chatOps.yml vendored Normal file
View File

@ -0,0 +1,9 @@
name: chatOps
on:
issue_comment:
types: [created]
jobs:
chatopt:
uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master
secrets: inherit

15
.github/workflows/call-clacheck.yml vendored Normal file
View File

@ -0,0 +1,15 @@
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

11
.github/workflows/call-commitlint.yml vendored Normal file
View File

@ -0,0 +1,11 @@
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

13
.github/workflows/call-debian-check.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: debianCheck
on:
pull_request_target:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
debian-check:
uses: linuxdeepin/.github/.github/workflows/debian-check.yml@master
secrets: inherit

View File

@ -0,0 +1,26 @@
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

14
.github/workflows/call-doc-check.yml vendored Normal file
View File

@ -0,0 +1,14 @@
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

View File

@ -0,0 +1,16 @@
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

13
.github/workflows/call-static-check.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: staticCheck
on:
pull_request_target:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-check:
uses: linuxdeepin/.github/.github/workflows/static-check.yml@master
secrets: inherit

View File

@ -0,0 +1,19 @@
name: Call synchronize to dtk6
on:
pull_request_target:
paths-ignore:
- "debian/**"
- "archlinux/**"
- "rpm/**"
- ".obs/**"
- ".github/**"
jobs:
call-synchronize:
uses: linuxdeepin/dtk/.github/workflows/synchronize-to-dtk6.yml@master
secrets: inherit
with:
dest_repo: linuxdeepin/dtk6gui
source_repo: ${{ github.event.pull_request.head.repo.full_name }}
source_ref: ${{ github.event.pull_request.head.ref }}
pull_number: ${{ github.event.pull_request.number }}

26
.github/workflows/cppcheck.yml vendored Normal file
View File

@ -0,0 +1,26 @@
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

24
.gitignore vendored
View File

@ -42,8 +42,28 @@ target_wrapper.*
# QtCreator CMake
CMakeLists.txt.user*
# vscode
.vscode
# idea
.idea
#clangformat
.clang-format
# build
compile_commands.json
bin
cmake
DtkGuis
dtkgui_config.h
qt_lib_dtkgui.pri
qt_lib_dtkgui*.pri
build
.cache
dtkgui.pc
DtkGuiConfig.cmake
asan.*
Testing
# Ignore Doxygen theme files
docs/doxygen-theme/

View File

@ -1,2 +1,5 @@
include:
- remote: 'https://gitlab.deepin.io/dev-tools/letmeci/raw/master/gitlab-ci/dde.yml'
variables:
CPPCHECK: "true"
CODESPELL: "true"

51
.obs/workflows.yml Normal file
View File

@ -0,0 +1,51 @@
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

17
.packit.yaml Normal file
View File

@ -0,0 +1,17 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
specfile_path: rpm/dtkgui.spec
# add or remove files that should be synced
synced_files:
- rpm/dtkgui.spec
- .packit.yaml
upstream_package_name: dtkgui
# downstream (Fedora) RPM package name
downstream_package_name: dtkgui
actions:
fix-spec-file: |
bash -c "sed -i -r \"s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/dtkgui.spec"

68
.reuse/dep5 Normal file
View File

@ -0,0 +1,68 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dtkgui
Upstream-Contact: UnionTech Software Technology Co., Ltd. <>
Source: https://github.com/linuxdeepin/dtkgui
# ci
Files: .github/* .gitlab-ci.yml .obs/*
Copyright: None
License: CC0-1.0
# gitignore
Files: .gitignore .syncexclude
Copyright: None
License: CC0-1.0
# json conf yaml
Files: *.json *conf *.yaml
Copyright: None
License: CC0-1.0
#interface
Files: include/DtkGui/D*
Copyright: None
License: CC0-1.0
# RPM/Arch Packaging
Files: archlinux/* rpm/*
Copyright: None
License: CC0-1.0
# debian
Files: debian/*
Copyright: None
License: LGPL-3.0-or-later
# README
Files: *README.md *README.zh_CN.md CHANGELOG.md
Copyright: None
License: CC-BY-4.0
# Documentations
Files: docs/*
Copyright: 2022-2023 deepin doc doc go SIG
License: CC-BY-4.0
# DBus
Files: src/dbus/*.xml
Copyright: None
License: CC0-1.0
# Project file
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt *.cmake *.in VERSION
Copyright: None
License: CC0-1.0
# images: png svg dci webp
Files: src/util/icons/actions/* src/util/icons/icons/* src/util/icons/texts/*
src/util/icons/dci/* tests/images/* tests/actions/* tests/dcis/* examples/animation-dci/*
Copyright: UnionTech Software Technology Co., Ltd.
License: LGPL-3.0-or-later
Files: toolGenerate/**/*
Copyright: None
License: CC0-1.0
Files: src/kernel/orgdeepindtkpreference.hpp
Copyright: None
License: CC0-1.0

13
.syncexclude Normal file
View File

@ -0,0 +1,13 @@
# 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

97
CHANGELOG.md Normal file
View File

@ -0,0 +1,97 @@
# 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).
## [5.7.25] - 2025-10-30
### Changed
- Improve icon theme generation with scalable support
## [5.7.24] - 2025-10-16
### Added
- Support Qt 6.10
### Changed
- Improve icon size detection and duplicate handling
### Fixed
- Correct lockfile path construction
- Fix Qt6 compilation error with libxdg
## [5.7.23] - 2025-09-25
### Fixed
- 解决控制中心闪烁问题
- Fix build for Qt 6.9
## [5.7.22] - 2025-09-04
### Added
- Add T11 font size and adjust T5 default
### Fixed
- Improve PID namespace detection in setSingleInstance
## [5.7.21] - 2025-08-14
### Added
- Add flags parameter to DDciIconPlayer play method
### Fixed
- Resolve compilation warnings and deprecation issues
## [5.7.20] - 2025-07-31
### Added
- Add pid namespace isolation to setSingleInstance
- Add concurrent processing for DCI icon conversion
### Changed
- Update REUSE license file for CHANGELOG
- Move icon finder functionality to separate tool
- Switch to QGuiApplication for SVG rendering
## [5.7.19] - 2025-07-03
### Fixed
- Enhance build security hardening
## [5.7.18] - 2025-06-27
### Fixed
- Make version parameter optional in release workflow
## [5.7.17] - 2025-06-19
### Added
- Add missing header
- Fix: add missing prefix for QTranslator::load()
### Changed
- Chore: use another QTranslator::load overload to tidy code
- Support VERSION file
- Add auto release workflow
- Update .syncexclude
[5.7.17]: https://github.com/linuxdeepin/dtkgui/compare/5.7.16..5.7.17
<!-- generated by git-cliff -->

22
CMakeLists.txt Normal file
View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.25)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION)
string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION)
set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "define project version")
project(DtkGui
VERSION ${DTK_VERSION}
DESCRIPTION "DTK Gui module"
HOMEPAGE_URL "https://github.com/linuxdeepin/dtkgui"
LANGUAGES CXX C
)
if("${PROJECT_VERSION_MAJOR}" STREQUAL "5")
set(QT_VERSION_MAJOR "5")
elseif("${PROJECT_VERSION_MAJOR}" STREQUAL "6")
set(QT_VERSION_MAJOR "6")
set(DTK_VERSION_MAJOR "6")
else()
message(SEND_ERROR "not support Prject Version ${PROJECT_VERSION}.")
endif()
include(dtkgui.cmake)

965
LICENSE
View File

@ -1,674 +1,305 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <https://www.gnu.org/licenses/>.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
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. <http://fsf.org/>
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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:
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
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.
<program> Copyright (C) <year> <name of author>
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".
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
<https://www.gnu.org/licenses/>.
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 <http://www.gnu.org/licenses/>.
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 <http://www.gnu.org/philosophy/why-not-lgpl.html>.
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
<https://www.gnu.org/licenses/why-not-lgpl.html>.

156
LICENSES/CC-BY-4.0.txt Normal file
View File

@ -0,0 +1,156 @@
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 licensors permission is not necessary for any reasonfor example, because of any applicable exception or limitation to copyrightthen 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.

121
LICENSES/CC0-1.0.txt Normal file
View File

@ -0,0 +1,121 @@
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.

View File

@ -0,0 +1,304 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
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. <http://fsf.org/>
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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:
<program> Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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 <http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,2 +1,52 @@
### dtkgui
Deepin Toolkit, gui module for DDE look and feel
## Deepin Tool Kit Gui
Deepin Tool Kit (DtkGui) is the development graphical user interface of all C++/Qt Developer work on Deepin.
You should read the <a href=doc/Specification.md>Deepin Application Specification</a> firstly.
## Dependencies
### Build dependencies
* Qt >= 5.10
## 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).

52
README.zh_CN.md Normal file
View File

@ -0,0 +1,52 @@
## Deepin Tool Kit Gui
Deepin Tool Kit Gui(DtkGui) 提供开发图形用户界面应用程序所需的功能.
您应该首先阅读 <a href=doc/Specification.md>Deepin应用程序规范</a>.
## 依赖
### 编译依赖
* Qt >= 5.10
## 安装
### 从源代码构建
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).

1
VERSION Normal file
View File

@ -0,0 +1 @@
5.7.25

1
VERSION.in Normal file
View File

@ -0,0 +1 @@
@version@

40
archlinux/PKGBUILD Normal file
View File

@ -0,0 +1,40 @@
# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=dtkgui-git
pkgver=5.7.25
pkgrel=1
sourcename=dtkgui
sourcetars=("$sourcename"_"$pkgver".tar.xz)
sourcedir="$sourcename"
pkgdesc='Deepin Toolkit, gui module for DDE look and feel'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dtkgui"
license=('LGPL3')
depends=('dtkcore-git' 'dtkcommon-git' 'qt5-svg' 'libqtxdg' 'freeimage' 'librsvg' 'qt5-wayland')
# INFO: you can disable freeimage not to support RAW images
# Then set DTK_DISABLE_EX_IMAGE_FORMAT=OFF
makedepends=('git' 'qt5-tools' 'gtest' 'gmock' 'ninja' 'cmake' 'doxygen' 'extra-cmake-modules')
conflicts=('dtkgui')
provides=('dtkgui')
groups=('deepin-git')
source=("${sourcetars[@]}")
sha512sums=('SKIP')
build() {
cd $sourcedir
cmake -GNinja \
-DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules/ \
-DBUILD_DOCS=ON \
-DQCH_INSTALL_DESTINATION=share/doc/qt \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
ninja
# INFO: Another cmake option is DTK_DISABLE_EX_IMAGE_FORMAT
# If you not want to support RAW images, set it to off
}
package() {
cd $sourcedir
DESTDIR="$pkgdir" ninja install
}

56
cmake/FindFreeImage.cmake Normal file
View File

@ -0,0 +1,56 @@
#
# Try to find the FreeImage library and include path.
# Once done this will define
#
# FreeImage_FOUND
# FreeImage_INCLUDE_PATH
# FreeImage_LIBRARY
#
find_path(FreeImage_INCLUDE_DIR
NAMES FreeImage.h
PATHS
/usr/include
/usr/local/include
/sw/include
/opt/local/include
${CMAKE_INCLUDE_PATH}
${CMAKE_INSTALL_PREFIX}/include)
find_library(FreeImage_LIBRARY
NAMES FreeImage freeimage
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FreeImage
FOUND_VAR FreeImage_FOUND
REQUIRED_VARS
FreeImage_LIBRARY
FreeImage_INCLUDE_DIR
)
if(FreeImage_FOUND)
set(FreeImage_LIBRARIES ${FreeImage_LIBRARY})
set(FreeImage_INCLUDE_DIRS ${FreeImage_INCLUDE_DIR})
endif()
if(FreeImage_FOUND AND NOT TARGET FreeImage::FreeImage)
add_library(FreeImage::FreeImage UNKNOWN IMPORTED)
set_target_properties(FreeImage::FreeImage PROPERTIES
IMPORTED_LOCATION "${FreeImage_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}"
)
endif()
mark_as_advanced(
FreeImage_INCLUDE_DIR
FreeImage_LIBRARY
)

442
debian/changelog vendored
View File

@ -1,3 +1,445 @@
dtkgui (5.7.25) unstable; urgency=medium
* Release 5.7.25
-- yeshanshan <yeshanshan@uniontech.com> Thu, 30 Oct 2025 21:47:33 +0800
dtkgui (5.7.24) unstable; urgency=medium
* Release 5.7.24
-- yeshanshan <yeshanshan@uniontech.com> Thu, 16 Oct 2025 19:45:30 +0800
dtkgui (5.7.23) unstable; urgency=medium
* Release 5.7.23
-- yeshanshan <packages@deepin.org> Thu, 25 Sep 2025 16:49:18 +0800
dtkgui (5.7.22) unstable; urgency=medium
* Release 5.7.22
-- yeshanshan <yeshanshan@uniontech.com> Thu, 04 Sep 2025 19:27:38 +0800
dtkgui (5.7.21) unstable; urgency=medium
* Release 5.7.21
-- yeshanshan <packages@deepin.org> Thu, 14 Aug 2025 19:47:40 +0800
dtkgui (5.7.20) unstable; urgency=medium
* Release 5.7.20
-- yeshanshan <yeshanshan@uniontech.com> Thu, 31 Jul 2025 19:59:35 +0800
dtkgui (5.7.19) unstable; urgency=medium
* Release 5.7.19
-- yeshanshan <yeshanshan@uniontech.com> Thu, 03 Jul 2025 21:12:27 +0800
dtkgui (5.7.18) unstable; urgency=medium
* Release 5.7.18
-- yeshanshan <yeshanshan@uniontech.com> Fri, 27 Jun 2025 17:09:35 +0800
dtkgui (5.7.17) unstable; urgency=medium
* Release 5.7.17
-- yeshanshan <yeshanshan@uniontech.com> Thu, 19 Jun 2025 10:03:48 +0800
dtkgui (5.7.16) unstable; urgency=medium
* Release 5.7.16
-- YeShanShan <yeshanshan@uniontech.com> Mon, 19 May 2025 17:21:59 +0800
dtkgui (5.7.15) unstable; urgency=medium
* fix: correct bitwise operation in preference handling
* fix: prevent theme saving when DontSaveApplicationTheme is set
* refactor: improve thread safety in OrgDeepinDTKPreference
* fix: build failed in qt5
* feat: use dconfig2cpp for read/write the DConfig
* fix: fix build on Qt 6.8
-- YeShanShan <yeshanshan@uniontech.com> Thu, 08 May 2025 17:53:09 +0800
dtkgui (5.7.14) unstable; urgency=medium
* build: compiling failed with Qt 6.9
-- YeShanShan <yeshanshan@uniontech.com> Thu, 17 Apr 2025 21:51:32 +0800
dtkgui (5.7.13) unstable; urgency=medium
* Release 5.7.13
-- YeShanShan <yeshanshan@uniontech.com> Thu, 20 Mar 2025 17:05:55 +0800
dtkgui (5.7.12) unstable; urgency=medium
* fix: palette refresh delayed in qt6
* feat: Add files generated by qdbusXML2cpp and DCONG2cpp
-- YeShanShan <yeshanshan@uniontech.com> Thu, 06 Mar 2025 17:29:35 +0800
dtkgui (5.7.11) unstable; urgency=medium
* Release 5.7.11
-- YeShanShan <yeshanshan@uniontech.com> Thu, 27 Feb 2025 20:47:39 +0800
dtkgui (5.7.10) unstable; urgency=medium
* fix: icon is blurry
-- YeShanShan <yeshanshan@uniontech.com> Thu, 13 Feb 2025 17:18:19 +0800
dtkgui (5.7.9) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Thu, 23 Jan 2025 09:07:08 +0000
dtkgui (5.7.8) unstable; urgency=medium
* fix: missing window decoration for treeland
* chore: update default window corner size
-- Deepin Packages Builder <packages@deepin.org> Tue, 14 Jan 2025 11:17:31 +0000
dtkgui (5.7.7) unstable; urgency=medium
* fix: accessing wild pointer in qt6
* chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute
Thanks to Felix Yan
-- Deepin Packages Builder <packages@deepin.org> Thu, 09 Jan 2025 09:28:38 +0000
dtkgui (5.7.6) unstable; urgency=medium
* refact: refacting DPlatformHandle to adap treeland
* Revert "refact: refacting DPlatformHandle to adap treeland"
* refact: refacting DPlatformHandle to adapt treeland
* fix: iterator out of bounds for dciicon
* fix: set font family invalid
-- Deepin Packages Builder <packages@deepin.org> Thu, 02 Jan 2025 05:43:53 +0000
dtkgui (5.7.5) unstable; urgency=medium
* fix: availableSizes not work on Qt6
-- Deepin Packages Builder <packages@deepin.org> Thu, 12 Dec 2024 03:03:53 +0000
dtkgui (5.7.4) unstable; urgency=medium
* chore(CI): add debian check workflow
Thanks to kuchune
* refactor: xcb platform theme interface
* refactor: treeland platform theme interface 扩展Treeland的个性化接口
* fix: Possible null pointer dereference and Notitlebar input parameter error
* feat: support treeland platform for wmHelper
* fix: blur is invalid for treeland
* feat: Limit maximum and minimum fonts
* fix: app crashed when window destroyed in quick
* fix: app crashed when window destroyed in quick
* fix: linglong app load qt translations failed
-- Deepin Packages Builder <packages@deepin.org> Tue, 03 Dec 2024 02:00:46 +0000
dtkgui (5.7.3) unstable; urgency=medium
* fix: No judgment on the validity of the protocol(Bug: 286859)
-- Deepin Packages Builder <packages@deepin.org> Wed, 20 Nov 2024 02:19:06 +0000
dtkgui (5.7.2) unstable; urgency=medium
* chore: Correct the name of TreelandProtocols package in cmake
* fix: Under treeland, the dialog has not disabled titlebar
* fix: Print "load translate" debug log to channels(Bug: 284539)
* chore: add IsWaylandPlatform attribute
* chore: highlight color is inconsistency
-- Deepin Packages Builder <packages@deepin.org> Wed, 13 Nov 2024 01:53:26 +0000
dtkgui (5.7.1) unstable; urgency=medium
* Revert "feat: add close.dci"(Issue: https://github.com/linuxdeepin/developer-center/issues/10482)
* feat: Add notitlebar function on wayland platform
* feat: support qt5 and qt6
* fix: cannot move window on wayland
* fix: remove treeland personalization protocols useless function
* feat: add fixme note
* chore: update license info
* chore: add build dep
* chore: update license
* chore: add extra cmake modules
* chore: add dtkgui namespace
* fix: app crashed in x11
-- Deepin Packages Builder <packages@deepin.org> Wed, 16 Oct 2024 03:30:46 +0000
dtkgui (5.6.34) unstable; urgency=medium
* feat: add close.dci
Thanks to Yixue Wang
* chore: animation-dci supports custom icon
* fix: wrong judgment conditions
* feat: support to change window effects(Bug: 244347)
* feat: add window startup effect Type(Issue: https://github.com/linuxdeepin/developer-center/issues/10322)
-- Deepin Packages Builder <packages@deepin.org> Tue, 20 Aug 2024 05:03:52 +0000
dtkgui (5.6.32) unstable; urgency=medium
* Revert "fix: jagged edges on ddciicon"(Issue: https://github.com/linuxdeepin/developer-center/issues/9443)
* chore: dci-icon-theme tool tweak
-- Deepin Packages Builder <packages@deepin.org> Mon, 08 Jul 2024 02:29:21 +0000
dtkgui (5.6.31) unstable; urgency=medium
* fix: jagged edges on ddciicon(Issue: https://github.com/linuxdeepin/developer-center/issues/8691)
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jun 2024 09:11:34 +0000
dtkgui (5.6.30) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Thu, 30 May 2024 02:46:31 +0000
dtkgui (5.6.29) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Mon, 13 May 2024 03:02:53 +0000
dtkgui (5.6.28) unstable; urgency=medium
* chore: insert to cache when icon is not null
* chore: add flag to disable noncache flag
* fix: missing initialization for baseFont of fontManager(Issue: https://github.com/linuxdeepin/developer-center/issues/8040)
* feat: dci-icon-theme support multiple icon size
-- Deepin Packages Builder <packages@deepin.org> Mon, 29 Apr 2024 08:23:44 +0000
dtkgui (5.6.27) unstable; urgency=medium
* fix: setWindowBlurAreaByWM only work once in qt6
-- Deepin Packages Builder <packages@deepin.org> Fri, 19 Apr 2024 08:55:34 +0000
dtkgui (5.6.26) unstable; urgency=medium
* fix: wrong availableSizes for DIconProxyEngine
* fix: PlaceholderText color tweak(Issue: https://github.com/linuxdeepin/developer-center/issues/7554)
* feat: support to get specified palette
-- Deepin Packages Builder <packages@deepin.org> Tue, 26 Mar 2024 05:47:35 +0000
dtkgui (5.6.25) unstable; urgency=medium
* fix: icon doesn't update when iconTheme changed
* fix: font can't follow changes in qt6
* fix: app refresh slowly
* fix: changed paletteType's config value
* fix: search icon can't change with theme change(Issue: #6230)
-- Deepin Packages Builder <packages@deepin.org> Mon, 11 Mar 2024 01:16:27 +0000
dtkgui (5.6.22) unstable; urgency=medium
* fix: menu icon incorrect in dark mode(Issue: https://github.com/linuxdeepin/developer-center/issues/6624)
* feat: enable xdgIconLoader under Qt6
* chore: warning for connect
-- Deepin Packages Builder <packages@deepin.org> Wed, 10 Jan 2024 02:30:59 +0000
dtkgui (5.6.21) unstable; urgency=medium
* chore: update cmake version
* fix: xdg icon loading failed with qt6(Issue: https://github.com/linuxdeepin/developer-center/issues/6459)
* fix: debian build failed
* fix: DIconProxyEngine read not ensureEngine
* chore: fix ut_dciiconengine failed on dark theme
-- Deepin Packages Builder <packages@deepin.org> Tue, 09 Jan 2024 01:45:43 +0000
dtkgui (5.6.20) unstable; urgency=medium
* chore: add synchronization workflow
* fix: indirect inclusion of QSharedPointer
* feat: move ddesktopservices to dtkgui(Issue: #134)
-- Deepin Packages Builder <packages@deepin.org> Tue, 28 Nov 2023 05:40:52 +0000
dtkgui (5.6.19) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Mon, 23 Oct 2023 07:33:18 +0000
dtkgui (5.6.18) unstable; urgency=medium
* fix: Wrong value of DPalette::TextLively
* chore: find qhelpgenerator from property
* fix: svg with filter attribute rendering exception
* fix: when iconName is absolute path
* fix: missing link when disable librsvg
* fix: Wrong IconName for DIconEngine(Issue: https://github.com/linuxdeepin/developer-center/issues/5760)
-- Deepin Packages Builder <packages@deepin.org> Wed, 18 Oct 2023 06:01:44 +0000
dtkgui (5.6.17) unstable; urgency=medium
* Release 5.6.17
-- Deepin Packages Builder <packages@deepin.org> Fri, 08 Sep 2023 15:15:39 +0800
dtkgui (5.6.16) unstable; urgency=medium
* chore: ut build without source
* fix: Compiling error in qt6.4
* chore: add DtkBuildHelper depends
* fix(build): ut failed on Qt6.4
* fix: dci icon cache key miss theme name(Issue: https://github.com/linuxdeepin/developer-center/issues/4517)
-- Deepin Packages Builder <packages@deepin.org> Tue, 22 Aug 2023 06:13:45 +0000
dtkgui (5.6.15) unstable; urgency=medium
* chore: iconengine tweak and uint test
* chore: do not show ui in ut
* chore: add unit test
* chore: Adaptation for Qt5.11
* refator: rewrite hasUserManual function
-- Yixue Wang <wangyixue@deepin.org> Fri, 11 Aug 2023 13:57:02 +0800
dtkgui (5.6.14) unstable; urgency=medium
* chore: ignore doxygen-theme folder
Thanks to syn(Task: 99)
* chore: change OUTPUT_DIR variable in cmake (#163)
Thanks to WangFei
* chore: adjust builtiniconengine (#164)
Thanks to WangFei
* chore: adjust xdgiconproxyengine (#167)
Thanks to WangFei
* chore: add unit test about builtinengine
* refactor!: deprecate some interfaces in dtk6
* chore: add dciiconengine
* chore: adjust icontheme
* chore: add unit test about dciiconengine
* chore: reduce compilation warnings
Thanks to SPUER(Issue: #96)
* chore: Sync by https://github.com/linuxdeepin/.github/commit/559e91167d4919644f37bbcf123eb0651c1528ea(Influence: none)
* chore: add proxyiconengine
* refactor: Move dotsPerInch from normal function to slots
* chore: remove unused pro files
* fix: build failed in qt6 due to proxyengine
* feat: DIconTheme::findQIcon add fallback icon
* fix(build): DIconTheme ut failed
* fix: DFileDragClient::serverDestroyed nerver emit
* feat: add helper for high dpi pixmap
* fix: dplatformtheme fetchPalette crash
* feat: load app and qt Translation files
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jul 2023 06:56:34 +0000
dtkgui (5.6.12) unstable; urgency=medium
* chore: Sync by https://github.com/linuxdeepin/.github/commit/2e5e092ba3f86b16d1aabbabcf0bfd2ae65b19c8(Influence: none)
* fix: fix build failure due to metasystem change
* fix(build): suport build with Qt6 && Qt5
* chore: Adapt Qt6 && Dtk6 compilation
* fix: ut failed
* chore: update dconfig appid
-- Deepin Packages Builder <packages@deepin.org> Sun, 25 Jun 2023 14:43:42 +0800
dtkgui (5.6.11) unstable; urgency=medium
* Release 5.6.11
* Fix developer-center#4117
* Fix bug-197713(App blocked by hasUserManual in live system)
-- Deepin Packages Builder <packages@deepin.com> Mon, 08 May 2023 13:16:17 +0800
dtkgui (5.6.10) unstable; urgency=medium
* Release 5.6.10
* support XDG_SESSION_DESKTOP set to DDE
* add DontSaveApplciationTheme Attribute
-- Deepin Packages Builder <packages@deepin.com> Mon, 17 Apr 2023 17:11:55 +0800
dtkgui (5.6.9) unstable; urgency=medium
* Release 5.6.9
-- Deepin Packages Builder <packages@deepin.com> Mon, 03 Apr 2023 10:13:06 +0800
dtkgui (5.6.8) unstable; urgency=medium
* Release 5.6.8
-- Deepin Packages Builder <packages@deepin.com> Wed, 22 Feb 2023 14:12:16 +0800
dtkgui (5.6.6) unstable; urgency=medium
* Release 5.6.6
-- Deepin Packages Builder <packages@deepin.com> Tue, 21 Feb 2023 11:46:51 +0800
dtkgui (5.6.5) unstable; urgency=medium
* Release 5.6.5
-- Deepin Packages Builder <packages@deepin.com> Thu, 02 Feb 2023 14:12:15 +0800
dtkgui (5.6.4) unstable; urgency=medium
* Release 5.6.4
-- Deepin Packages Builder <packages@deepin.com> Mon, 09 Jan 2023 13:28:09 +0800
dtkgui (5.6.3) unstable; urgency=medium
* Release 5.6.3
-- Deepin Packages Builder <packages@deepin.com> Mon, 12 Dec 2022 14:44:49 +0800
dtkgui (5.6.2.2) unstable; urgency=medium
* Release 5.6.2.2
-- Deepin Packages Builder <packages@deepin.com> Wed, 30 Nov 2022 10:32:07 +0800
dtkgui (5.6.1.1) unstable; urgency=medium
* snipe release 5.6.1.1
-- Deepin Packages Builder <packages@deepin.com> Wed, 22 Jun 2022 14:33:59 +0800
dtkgui (5.6.0.1) unstable; urgency=medium
* Release 5.6.0.1
-- Deepin Packages Builder <packages@deepin.com> Tue, 14 Jun 2022 10:51:30 +0800
dtkgui (5.0.0) unstable; urgency=medium
* Release 5.0.0

1
debian/compat vendored
View File

@ -1 +0,0 @@
9

22
debian/control vendored
View File

@ -2,14 +2,17 @@ Source: dtkgui
Section: libdevel
Priority: optional
Maintainer: Deepin Packages Builder <packages@deepin.com>
Build-Depends: debhelper (>= 9), pkg-config,
qtbase5-private-dev,
libdtkcore-dev
Build-Depends: debhelper-compat (= 12), pkg-config,
qtbase5-private-dev, qtbase5-dev-tools, doxygen, graphviz, qttools5-dev,
libdtkcore-dev, librsvg2-dev, libfreeimage-dev, libraw-dev, libgtest-dev, libgmock-dev,
libqt5xdg-dev, libqt5xdgiconloader-dev, cmake, qt5-image-formats-plugins, libqt5waylandclient5-dev,
extra-cmake-modules, qtwayland5-dev-tools, qtwayland5-private-dev, libkf5wayland-dev, treeland-protocols
Standards-Version: 3.9.8
Package: libdtkgui5
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkdata,
qt5-image-formats-plugins
Multi-Arch: same
Description: Deepin Tool Kit Gui library
DtkGui is base library of Deepin Qt/C++ applications.
@ -27,8 +30,17 @@ Description: Deepin Tool Kit Gui Utilities
Package: libdtkgui-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkgui5( =${binary:Version})
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkgui5( =${binary:Version}), libdtkcommon-dev(>=5.6.16)
Description: Deepin Tool Kit Gui Devel library
DtkGui is base devel library of Deepin Qt/C++ applications.
.
This package contains the header files and static libraries of DtkGui
Package: libdtkgui-doc
Build-Profiles: <!nodoc>
Architecture: any
Depends: ${misc:Depends}
Description: Deepin Tool Kit Gui (Document)
DtkGui is base devel library of Deepin Qt/C++ applications.
.
This package contains the qt Document of DtkGui

14
debian/copyright vendored
View File

@ -3,20 +3,20 @@ Upstream-Name: dtkgui
Source: https://github.com/linuxdeepin/dtkgui
Files: *
Copyright: 2019 Deepin Technology Co., Ltd.
License: GPL-3+
Copyright: 2022 Uniontech Software 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 General Public License as published by
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 General Public License for more details.
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
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".

1
debian/libdtkgui-doc.install vendored Normal file
View File

@ -0,0 +1 @@
usr/share/qt5/doc/dtkgui.qch

View File

@ -1 +1 @@
usr/lib/*/*/DGui/bin/*
usr/*/*/DGui/bin/*

View File

@ -1 +1,2 @@
usr/lib/*/lib*.so.*
#usr/share/dsg/*/*

23
debian/rules vendored
View File

@ -3,29 +3,30 @@ DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export QT_SELECT = qt5
# 安全编译参数
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
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
ifneq (,$(wildcard .git/config))
CONFIG_VERSION=
else
VERSION = $(DEB_VERSION_UPSTREAM)
_PACK_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}')
_BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g')
_BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
ifeq ($(_BUILD_VER),)
CONFIG_VERSION = $(_PACK_VER)
else
CONFIG_VERSION = $(_PACK_VER).$(_BUILD_VER)
endif
endif
%:
dh $@ --parallel
dh $@
override_dh_auto_configure:
dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) VERSION=$(CONFIG_VERSION)
override_dh_auto_test:
echo "skip auto test"
dh_auto_configure -- -DBUILD_TESTING=OFF -DBUILD_DOCS=ON -DDTK_VERSION=$(_PACK_VER)
#override_dh_auto_test:
# echo "skip auto test"
override_dh_makeshlibs:
dh_makeshlibs -V
dh_makeshlibs -V "libdtkgui5 (>= $(shell echo $(VERSION) | cut -d '.' -f 1,2))"

View File

@ -1 +1 @@
3.0 (quilt)
3.0 (native)

89
docs/CMakeLists.txt Normal file
View File

@ -0,0 +1,89 @@
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 ${CMAKE_PROJECT_VERSION} CACHE STRING "") # Should be the same as this project is using.
set (DOXYGEN_EXTRACT_STATIC YES)
set (DOXYGEN_OUTPUT_LANGUAGE "Chinese" CACHE STRING "Doxygen Output Language")
set (DOXYGEN_IMAGE_PATH ${CMAKE_CURRENT_LIST_DIR}/images/)
set (DOXYGEN_QHP_NAMESPACE "org.deepin.dtk.gui")
set (DOXYGEN_QCH_FILE "dtkgui.qch")
set (DOXYGEN_QHP_VIRTUAL_FOLDER "dtkgui")
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")
# find from cmake target property
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_PREDEFINED
"D_DECL_DEPRECATED_X(x)="
"DCORE_BEGIN_NAMESPACE=namespace Dtk { namespace Core {"
"DCORE_END_NAMESPACE=}}"
"DCORE_USE_NAMESPACE=using namespace Dtk::Core\;"
"DGUI_BEGIN_NAMESPACE=namespace Dtk { namespace Gui {"
"DGUI_END_NAMESPACE=}}"
"DGUI_USE_NAMESPACE=using namespace Dtk::Gui\;"
)
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_EXPAND_ONLY_PREDEF "YES")
# Exclude private classes.
set (DOXYGEN_EXCLUDE_PATTERNS
${PROJECT_SOURCE_DIR}/src/util/private/dimagehandlerlibs_p.h
${PROJECT_SOURCE_DIR}/src/util/dimagehandlerlibs.cpp
)
doxygen_add_docs (doxygen
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/docs
ALL
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation via Doxygen"
)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/html/dtkgui.qch DESTINATION ${QCH_INSTALL_DESTINATION})

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,104 @@
/*!
@~chinese
@file dpalette.h
@ingroup palette
@brief DPalette提供了调色板相关操作
@sa [qpalette](https://doc.qt.io/qt-6/qpalette.html)
@class Dtk::Gui::DPalette
@brief DPalette继承并且扩展了 QPalette 类, 提供了dtk特有的特性.
@enum Dtk::Gui::DPalette::ColorType
DPalette::ColorType 定义了 DPalette 颜色类型
@details
| **键** | **值** | **含义** |
|:-----------------:|:-----:|:-------------------------------------------------:|
| NoType | 0 | 无类型 |
| ItemBackground | 1 | 列表项的背景色 |
| TextTitle | 2 | 标题型文本的颜色 |
| TextTips | 3 | 提示性文本的颜色 |
| TextWarning | 4 | 警告类型的文本颜色 |
| TextLively | 5 | 活跃式文本颜色(不受活动色影响) |
| LightLively | 6 | 活跃式按钮recommend button背景色中的亮色不受活跃色影响 |
| DarkLively | 7 | 活跃式按钮recommend button背景色中的暗色会从亮色渐变到暗色不受活跃色影响 |
| FrameBorder | 8 | 控件边框颜色 |
| PlaceholderText | 9 | 占位类型的文本颜色,可用于输入框占位内容等提示性文字 |
| FrameShadowBorder | 10 | 用于跟阴影叠加的边框颜色 |
| ObviousBackground | 11 | 明显的背景色 |
| NColorTypes | 12 | 无颜色类型 |
@fn Dtk::Gui::DPalette::DPalette()
@brief 构造一个 DPalette 对象
@fn Dtk::Gui::DPalette::DPalette(const DPalette &palette)
@brief 构造一个 DPalette 对象
@param[in] palette 要复制的 DPalette 对象
@fn Dtk::Gui::DPalette::DPalette(const QPalette &palette)
@brief 构造一个 DPalette 对象
@param[in] palette 要复制的 QPalette 对象
@fn const QColor Dtk::Gui::DPalette::clore(ColorGroup cg, ColorType ct) const
@brief 获取指定颜色组和颜色类型的颜色
@param[in] cg 颜色组
@param[in] ct 颜色类型
@fn void Dtk::Gui::DPalette::brush(ColorGroup cg, ColorType ct, const QColor &color)
@brief 设置指定颜色组和颜色类型的笔刷
@param[in] cg 颜色组
@param[in] ct 颜色类型
@param[in] color 颜色
@fn void Dtk::Gui::DPalette::setColor(ColorGroup cg, ColorType ct, const QColor &color)
@brief 设置指定颜色组和颜色类型的颜色
@param[in] cg 颜色组
@param[in] ct 颜色类型
@param[in] color 颜色
@fn void Dtk::Gui::DPalette::setColor(ColorType ct, const QColor &color)
@brief 设置指定颜色类型的颜色
@param[in] ct 颜色类型
@param[in] color 颜色
@fn void Dtk::Gui::DPalette::setBrush(ColorType ct, const QBrush &brush)
@brief 设置指定颜色类型的笔刷
@param[in] ct 颜色类型
@param[in] brush 笔刷
@fn void Dtk::Gui::DPalette::setBrush(ColorGroup cg, ColorType ct, const QBrush &brush)
@brief 设置指定颜色组和颜色类型的笔刷
@param[in] cg 颜色组
@param[in] ct 颜色类型
@param[in] brush 笔刷
@fn const QBrush & Dtk::Gui::DPalette::itemBackground() const
@brief 获取列表项的背景色
@fn const QBrush & Dtk::Gui::DPalette::textTitle() const
@brief 获取标题型文本的颜色
@fn const QBrush & Dtk::Gui::DPalette::textTips() const
@brief 获取提示性文本的颜色
@fn const QBrush & Dtk::Gui::DPalette::textWarning() const
@brief 获取警告类型的文本颜色
@fn const QBrush & Dtk::Gui::DPalette::textLively() const
@brief 获取活跃式文本颜色(不受活动色影响)
@fn const QBrush & Dtk::Gui::DPalette::lightLively() const
@brief 获取活跃式按钮recommend button背景色中的亮色会从暗色渐变到亮色不受活跃色影响
@fn const QBrush & Dtk::Gui::DPalette::darkLively() const
@brief 获取活跃式按钮recommend button背景色中的暗色会从暗色渐变到亮色不受活跃色影响
@fn const QBrush & Dtk::Gui::DPalette::frameBorder() const
@brief 获取边框颜色
@fn const QBrush & Dtk::Gui::DPalette::placeholderText() const
@brief 获取占位符文本颜色
@fn const QBrush & Dtk::Gui::DPalette::frameShadowBorder() const
@brief 获取阴影边框颜色
*/

View File

@ -0,0 +1,10 @@
@page kernel kernel--dtkgui核心组件
# Dtk-Gui kernel
TODO添加组件说明
@defgroup palette
@brief 调色板工具
@details

View File

@ -0,0 +1,55 @@
/*!
@~chinese
@file dguiapplicationhelper.h
@class Dtk::Gui::DGuiApplicationHelper
@ingroup dtkgui
@brief DGuiApplicationHelper类提供了一个gui应用程序的应用帮助类可提供widget和declarative的
公共gui功能例如调色板、字体、主题等功能。
@details
@enum Dtk::Gui::DGuiApplicationHelper::SizeMode
@brief 控件大小模式枚举包含 dtk支持的控件大小模式种类.
| **值** | **含义** |
|:-----------:|:---------------------:|
| NormalMode | 普通模式,为默认模式 |
| CompactMode | 紧凑模式 |
@fn void DGuiApplicationHelper::newProcessInstance(qint64 pid, const QStringList &arguments)
@brief 通知新进程的信息。
@details
单例程序情况下,尝试启动新的程序实例将触发此信号,以便获取所传入的参数列表等信息,来进行进一步处理。
@param pid 进程 ID.
@param arguments 启动进程时所传入的参数列表.
@fn DGuiApplicationHelper::SizeMode DGuiApplicationHelper::sizeMode() const
@brief 当前应用的控件大小模式。
@details
- 若应用没有设置控件大小模式,则跟随系统的控件大小模式
- 用户也可以设置环境变量 D_DTK_SIZEMODE 来影响应用的大小模式的支持,`D_DTK_SIZEMODE=1`为指定为普通模式,
当应用没有显示设置控件大小模式,则会采用普通模式。
- 优先级为 `DGuiApplicationHelper::setSizeMode` > `D_DTK_SIZEMODE` > `System's SizeMode`。
@fn void DGuiApplicationHelper::setSizeMode(const DGuiApplicationHelper::SizeMode sizeMode)
@brief 设置应用控件大小模式,应用使用的为此模式,不再响应系统的控件大小模式。
@param sizeMode 需要设置的控件大小模式.
@fn void DGuiApplicationHelper::resetSizeMode()
@brief 重置设置应用控件大小模式,跟随系统的控件大小模式。
@fn static inline bool DGuiApplicationHelper::isCompactMode()
@brief 当前控件大小模式是否为紧凑模式。
@fn void DGuiApplicationHelper::applicationPaletteChanged()
@brief 通知调色板对象的改变。
@sa windowPalette()
@fn void DGuiApplicationHelper::sizeModeChanged(DGuiApplicationHelper::SizeMode sizeMode)
@brief 通知控件大小模式发生改变。
@fn static QStringList DGuiApplicationHelper::userManualPaths(const QString &appName)
@brief 获取帮助手册已存在目录
@param appName 目标应用名称
@detail 目录深度具体到appName层级一个典型的目录路径为:/usr/share/deepin-manual/manual-assets/application/appName
*/

View File

@ -0,0 +1,243 @@
/*!
@~chinese
@file dimagehandler.h
dimagehandler.h 提供图像处理类 DImageHandler
@class Dtk::Gui::DImageHandler
@brief DImageHandler 提供图像处理,读取、保存、旋转、滤镜等。
@details
## 概述
提供多种格式图片的读取、保存,允许对部分格式进行旋转。提供多种滤镜、锐化、二值化等图像处理算法。
通过 `DImageHandler::setFileName` 设置当前处理的图片文件路径,通过 `DImageHandler::readImage`
取得图片数据,通过 `DImageHandler::thumbnail` 取得图片缩略图。设置文件路径将不会立即加载图片,
将在需要图片数据时读取,当不需要缓存数据时,可通过 `DImageHandler::clearCache` 清除缓存数据。
@note 拓展的图片格式依赖 FreeImage 和 LibRaw 公共库DImageHandler 通过动态加载的方式解析公共库接口。
可通过 DImageHandler::supportFormats() 获取当前支持的图片格式类型。
## 编译
支持拓展的图片格式,编译时会判断环境是否存在依赖包,安装 libfreeimage-dev 及 libraw-dev
设置编译选项 DTK_DISABLE_EX_IMAGE_FORMAT=OFF 后将开启拓展图片格式支持。
不同包构建环境默认策略不同,在 **debian** 和 **linglong** 构建环境默认依赖 libfreeimage-dev 及 libraw-dev
支持拓展图片格式,其它环境需手动安装。
## image-handler 工具示例
可在程序根目录 ./tools/image-handler 中查看 image-handler 工具项目。
image-handler 工具可用于提取图像信息、旋转图像、设置图像滤镜等。
```shell
image-handler [options] [file...]
```
### image-handler 选项
| **选项** | **描述** |
|---|---|
| -h, --help | 显示工具帮助信息 |
| -r, --rotate <degresses> | 根据设置角度旋转图片,旋转角度需为 **90度** 的倍数 |
| -o, --output <file> | 保存处理后的文件到指定路径 |
| -f <filter> | 为图片设置滤镜,可选图片滤镜包括 old, warm, cool, gray, anticolor, metal |
| -l, --list | 列出所有图片的格式 |
| -e | 列出所有图片的详细信息,结合 **-l** 使用 |
@fn Dtk::Gui::DImageHandler::DImageHandler(QObject *parent)
@brief 构造 DImageHandler 实例,并指定父控件
@param[in] parent 作为实例的父控件
@fn Dtk::Gui::DImageHandler::~DImageHandler()
@brief 销毁 DImageHandler 实例
@fn void Dtk::Gui::DImageHandler::setFileName(const QString &fileName)
@brief 设置当前处理的图片文件路径
@param[in] fileName 图片文件路径
@fn QString Dtk::Gui::DImageHandler::fileName() const
@brief 返回当前处理的图片文件路径
@return 图片文件路径
@fn QImage Dtk::Gui::DImageHandler::readImage()
@brief 从设置的图片文件路径中读取图片
@details 从 fileName() 设置的图片文件中读取图片,若读取失败,将返回空图片实例,
错误信息通过 lastError() 获取
@return 图片实例
@fn QImage Dtk::Gui::DImageHandler::thumbnail(const QSize &size, Qt::AspectRatioMode mode)
@brief 获取当前处理图片指定大小的缩略图,可调整宽高比适配模式
@param[in] 缩略图大小
@return 缩略图实例
@fn QString Dtk::Gui::DImageHandler::imageFormat() const
@brief 返回当前设置图片文件的格式,若未设置文件路径,返回空字符串
@return 图片格式
@fn QSize Dtk::Gui::DImageHandler::imageSize()
@brief 返回当前处理的图片尺寸,若未设置图片文件或加载失败,返回空图片尺寸 (-1, -1)
@return 图片大小
@fn QHash<QString, QString> Dtk::Gui::DImageHandler::findAllMetaData()
@brief 查询图片包含的所有元数据,在动态加载 FreeImage 库后有效
@return 图片信息表
@fn void Dtk::Gui::DImageHandler::clearCache()
@brief 清空缓存数据,释放缓存的图片和错误信息
@fn bool Dtk::Gui::DImageHandler::saveImage(const QString &fileName, const QString &format = QString())
@brief 保存当前处理的图片至文件,可指定保存的图片格式, 若存在错误,将返回 false ,错误信息通过 lastError() 获取
@param[in] fileName 保存的文件路径
@param[in] format 指定保存图片格式,默认为空,表示保持原格式
@return 是否成功保存图片
@fn bool Dtk::Gui::DImageHandler::saveImage(const QImage &image, const QString &fileName, const QString &format)
@brief 保存图片至文件,可指定保存的图片格式, 若存在错误,将返回 false ,错误信息通过 lastError() 获取
@param[in] image 图片实例
@param[in] fileName 保存的文件路径
@param[in] format 指定保存图片格式,默认为空,表示保持原格式
@return 是否成功保存图片
@fn bool Dtk::Gui::DImageHandler::rotateImage(QImage &image, int angle)
@brief 顺时针旋转图片,若存在错误,将返回 false ,错误信息通过 lastError() 获取
@param[in,out] image 图片实例
@param[in] angle 图片旋转角度必须以90度为倍数
@return 是否成功旋转图片
@fn bool Dtk::Gui::DImageHandler::rotateImageFile(const QString &fileName, int angle)
@brief 顺时针旋转图片文件中的图片
@details 读取 fileName 图片文件,顺时针旋转图片 angle 度,并将图片数据写回文件,
若存在错误,将返回 false ,错误信息通过 lastError() 获取
@param[in] fileName 图片文件路径
@param[in] angle 图片旋转角度必须以90度为倍数
@return 是否成功旋转并保存图片文件
@fn bool Dtk::Gui::DImageHandler::isReadable() const
@brief 返回当前设置的图片文件是否可读取判断基于图片格式fileName() 为空时返回 false
@return 是否可读取
@fn bool Dtk::Gui::DImageHandler::isWriteable() const
@brief 返回当前设置的图片文件是否可写入判断基于图片格式fileName() 为空时返回 false
@return 是否可写入
@fn bool Dtk::Gui::DImageHandler::isRotatable() const
@brief 返回当前设置的图片文件是否可旋转判断基于图片格式fileName() 为空时返回 false
@return 是否可旋转
@fn static QStringList Dtk::Gui::DImageHandler::supportFormats()
@brief 返回当前环境下 DImageHandler 可支持的图片格式,可动态加载 FreeImage 库以支持更多图片格式
@return 支持的图片格式
@fn static QString Dtk::Gui::DImageHandler::detectImageFormat(const QString &fileName)
@brief 根据文件名称及文件内容检测图片格式
@param[in] fileName 图片文件路径
@return 图片格式
@fn QString Dtk::Gui::DImageHandler::lastError() const;
@brief 返回最近一次错误的详细信息
@return 错误信息
@fn static QImage Dtk::Gui::DImageHandler::oldColorFilter(const QImage &img)
@brief 为图片设置老照片滤镜并返回处理图片实例
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::warmColorFilter(const QImage &img, int intensity = 30)
@brief 为图片设置暖色滤镜并返回处理图片实例
@param[in] img 待处理的图片实例
@param[in] intensity 滤镜处理强度,取值范围 -255 ~ 255 默认30
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::coolColorFilter(const QImage &img, int intensity = 30)
@brief 为图片设置冷色滤镜并返回处理图片实例
@param[in] img 待处理的图片实例
@param[in] intensity 滤镜处理强度,取值范围 -255 ~ 255 默认30
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::grayScaleColorFilter(const QImage &img)
@brief 为图片设置灰色滤镜并返回处理图片实例
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::antiColorFilter(const QImage &img)
@brief 为图片设置反色滤镜并返回处理图片实例
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::metalColorFilter(const QImage &img)
@brief 为图片设置金属风格滤镜并返回处理图片实例
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::bilateralFilter(const QImage &img, double spatialDecay, double photometricStandardDeviation)
@brief 对图片进行双边滤波处理,可保持边界并去除噪点,可用于磨皮等处理
@param[in] img 待处理的图片实例
@param[in] spatialDecay 空间衰减值,用于双边滤波的空域信息,默认 0.02
@param[in] photometricStandardDeviation 光度标准差值,用于双边滤波的值域信息, 默认 10
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::contourExtraction(const QImage &img)
@brief 提取图片轮廓
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::binaryzation(const QImage &img)
@brief 对图片进行二值化处理
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::grayScale(const QImage &img)
@brief 取得灰阶图片
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::laplaceSharpen(const QImage &img)
@brief 拉普拉斯锐化处理
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::sobelEdgeDetector(const QImage &img)
@brief sobel边缘检测处理用于图片锐化
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::changeLightAndContrast(const QImage &img, int light = 100, int contrast = 150)
@brief 变更图片的亮度和对比度并返回处理图片实例
@param[in] img 待处理的图片实例
@param[in] light 调整图片亮度,取值范围 0 ~ 300
@param[in] constrase 调整图片对比度,取值范围 0 ~ 300
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::changeBrightness(const QImage &img, int brightness)
@brief 调整图片亮度并返回处理图片实例,取值范围 -255 ~ 255
@param[in] img 待处理的图片实例
@param[in] brightness 图片亮度
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::changeTransparency(const QImage &img, int transparency)
@brief 调整图片透明度并返回处理图片实例,取值范围 0 ~ 255
@param[in] img 待处理的图片实例
@param[in] transparency 图片透明度
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::changeStauration(const QImage &img, int saturation)
@brief 调整图片饱和度并返回处理图片实例,取值范围 -100 ~ 100
@param[in] img 待处理的图片实例
@param[in] saturation 图片饱和度
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::replacePointColor(const QImage &img, QColor oldColor, QColor newColor)
@brief 遍历图片所有像素点,替换图片像素点颜色
@param[in] img 待处理的图片实例
@param[in] oldColor 旧像素颜色
@param[in] newColor 新像素颜色
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::flipHorizontal(const QImage &img)
@brief 水平翻转图片
@param[in] img 待处理的图片实例
@return 处理完成的图片实例
@fn static QImage Dtk::Gui::DImageHandler::flipVertical(const QImage &img)
@brief 垂直翻转图片
@param[in] img 待处理的图片
@return 处理完成的图片实例
*/

View File

@ -0,0 +1,13 @@
/*!
@~chinese
@file dplatformtheme.h
@class Dtk::Gui::DPlatformTheme
@ingroup dtkgui
@brief DPlatformTheme类提供了一个应用程序的主题配置管理类,可以在外部控制应用的默认主题行为,
达到个性化主题的设置,所有的设置是实时响应的。
@property DPlatformTheme::sizeMode
@brief 从配置中获取当前控件大小模式
*/

View File

@ -0,0 +1,340 @@
/*!
@~chinese
@file include/util/ddciicon.h
@ingroup dci
@brief DCI图标类
@class Dtk::Gui::DDciIconImage ddciicon.h
@details 用于获取 dci 图标某种状态的图片资源(位图数据),同时支持静态图和动态图,接口的设计类似于 QImageReader一般通过调用 DDciIcon::image 构造此对象。与 DDciIcon 配合使用,其所支持的图片格式与 DDciIcon::pixmap 接口一致,都取决于 Qt 图片插件系统(即 QImageReader所提供的能力。
@sa DDciIcon::image
@fn Dtk::Gui::DDciIconImage::DDciIconImage()
@details 构造一个空的对象。
@fn Dtk::Gui::DDciIconImage::DDciIconImage(const DDciIconImage &other)
@details 根据 other 对象构造一个新的 DDciIconImage 对象,这个新的对象将与 other 共享 DDciIconImagePrivate 对象。
@fn Dtk::Gui::DDciIconImage::operator=(const DDciIconImage &other)
@details 对当前对象进行赋值,这将导致此对象与 other 共享 DDciIconImagePrivate 对象。
@fn Dtk::Gui::DDciIconImage::operator=(DDciIconImage &&other)
@details 对当前对象进行赋值,这将导致此对象与 other 两者的 DDciIconImagePrivate 对象被交换。
@sa DDciIconImage::swap
@fn Dtk::Gui::DDciIconImage::swap(DDciIconImage &other)
@details 交换两个对象的数据,这将导致两者的 DDciIconImagePrivate 对象被交换。
@fn Dtk::Gui::DDciIconImage::operator ==(const DDciIconImage &other) const
@details 如果两个对象引用了相同的 DDciIconImagePrivate 数据对象,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::operator !=(const DDciIconImage &other) const
@details 如果两个对象引用了不同的 DDciIconImagePrivate 数据对象,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::isNull() const
@details 如果此对象为空,则返回 true否则返回 false。当对象为空时调用其它成员函数将获得一个无效的结果。
@fn Dtk::Gui::DDciIconImage::reset()
@details 重置数据的状态,将清理所有的内部缓存数据,并且重置所有的状态记录,与重新调用 DDciIcon::image 获取一个新的对象后的状态相同。对于动画图片而言,这会导致 DDciIconImage::atBegin 变成 true即动画将从第一帧重新开始。
@fn Dtk::Gui::DDciIconImage::toImage(const DDciIconPalette &palette) const
@details 对于静态图片,将读取图片数据,并加载为 QImage 对象返回。对于动态图片,将返回当前帧的位图数据,且多次调用时不会重新加载,将返回缓存的 QImage 对象,另外需要注意的时,与 QImageReader::read 的不同,在调用此函数读取当前帧后,并不会自动跳转到下一帧,即在未调用 DDciIconImage::jumpToNextImage 时,多次调用此函数将返回同一帧。
@param[in] palette 如果此图片支持指定调色板,则将根据传入的 DDciIconPalette 中指定的颜色对图片进行加工。详情请参见 DSG 标准中的 DCI 图片格式设计。
@sa DDciIconImage::hasPalette DDciIconImage::paint
@fn Dtk::Gui::DDciIconImage::paint(QPainter *painter, const QRectF &rect, Qt::Alignment alignment, const DDciIconPalette &palette) const
@details 将图片的位图数据通过传入的画笔进行绘制。
@param[in] painter 指定画笔对象。
@param[in] rect 指定绘制区域,此区域相对于画笔所对应的 QPainter::paintDevice(),如果此区域的宽度比图片的宽度小,则会在绘制时将图片缩小到此区域的大小,反之则保持图片自身大小,而不会知道图片被放大。
@param[in] alignment 指定绘制时图片相对于 rect 所指定区域的位置,即当图片宽度小于 rect 所指定的宽度时,将根据此参数决定图片的显示位置。
@param[in] palette 如果此图片支持指定调色板,则将根据传入的 DDciIconPalette 中指定的颜色对图片进行加工。详情请参见 DSG 标准中的 DCI 图片格式设计。
@sa DDciIconImage::toImage
@fn Dtk::Gui::DDciIconImage::hasPalette() const
@details 如果此图片支持指定调色板,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::supportsAnimation() const
@details 如果此图片支持动画,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::atBegin() const
@details 如果此图片支持动画且动画处于第一帧,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::atEnd() const
@details 如果此图片支持动画且动画处于最后一帧,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::jumpToNextImage()
@details 将动画跳转到下一帧,如果此图片支持动画且当前不是最后一帧,则返回 true否则返回 false。
@fn Dtk::Gui::DDciIconImage::loopCount() const
@details 返回动画的轮播次数,如果此图片不支持动画,则返回值无效。如果返回值为 -1则表明此动画需要无限循环播放。
@fn Dtk::Gui::DDciIconImage::maxImageCount() const
@details 返回动画的最大帧数,如果当前图片有多层且每一层都支持动画,则是所有动画帧数的累加,因此多个动画的播放时间会可能会有重叠的帧,所以无法确保播放此图片时一定能显示这么多帧,动画是否结束需要以 DDciIconImage::atEnd 的返回结果为准。如果此图片不支持动画,则返回值无效。
@fn Dtk::Gui::DDciIconImage::currentImageDuration() const
@details 返回当前动画帧的持续时间,单位为毫秒。如果此图片不支持动画,则返回值无效。
@fn Dtk::Gui::DDciIconImage::currentImageNumber() const
@details 返回动画已经播放到的帧的序号,此值一定小于 DDciIconImage::maxImageCount - 1。如果此图片不支持动画则返回值无效。
@class Dtk::Gui::DDciIcon ddciicon.h
@details 如果需要详细dci相关介绍以及规范文档, 可以参见[dci文件图标规范](https://github.com/linuxdeepin/deepin-specifications/blob/master/unstable/%E5%9B%BE%E6%A0%87%E6%96%87%E4%BB%B6%E8%A7%84%E8%8C%83.md)
## DDciIcon示例
项目目录结构在同一目录下
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(ddciicon-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(Qt5 REQUIRED COMPONENTS Gui) # 寻找Qt5组件Core
find_package(Qt5 REQUIRED COMPONENTS Widgets) # 寻找Qt5组件Widgets
find_package(DtkCore REQUIRED) # 寻找Dtk组件Core
find_package(Dtk REQUIRED COMPONENTS Gui) # 寻找Dtk组件Gui
find_package(Dtk REQUIRED COMPONENTS Widget) # 寻找Dtk组件Widget
add_executable(${PROJECT_NAME} # 生成可执行文件
main.cpp
qml.qrc
)
target_link_libraries(${PROJECT_NAME} PRIVATE # 添加需要链接的共享库
Qt5::Core
Qt5::Gui
Qt5::Widgets
Dtk::Core
dtkgui
dtkwidget
)
```
## main.cpp
```cpp
#include <DApplication>
#include <DWidgetUtil>
#include <DIconButton>
#include <DDciIcon>
#include <QtDebug>
#include <QFormLayout>
#include <DMainWindow>
#include <QWidget>
#include <QLabel>
#include <QHBoxLayout>
DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[])
{
DApplication a(argc, argv);
DMainWindow win;
QWidget w;
QFormLayout* layout = new QFormLayout(&w);
// fromTheme表示从图标主题中寻找资源。
DDciIcon dci = DDciIcon::fromTheme("select_indicator");
auto icon = dci.matchIcon(0, DDciIcon::Light, DDciIcon::Hover);
qDebug() << "DCI图标的实际大小" << dci.actualSize(icon);
// 定义一个函数传入DIconButton以及提示信息
auto addBtnRow = [&](DIconButton *iconBtn, const QString name){
iconBtn->setIconSize(QSize(32,32));
QHBoxLayout *hlayout = new QHBoxLayout();
hlayout->addWidget(iconBtn);
QLabel *btnLabel = new QLabel(name);
hlayout->addWidget(btnLabel);
return hlayout;
};
// 将DDciIcon传入DIconButton
DIconButton *iconBtn1 = new DIconButton(dci);
layout->addRow(addBtnRow(iconBtn1, "icon button"));
DIconButton *iconBtn2 = new DIconButton(dci);
iconBtn2->setDisabled(true);
layout->addRow(addBtnRow(iconBtn2, "disabled state"));
DIconButton *iconBtn3 = new DIconButton(dci);
iconBtn3->setDown(true);
layout->addRow(addBtnRow(iconBtn3, "pressed state"));
win.setCentralWidget(&w);
win.resize(200,100);
win.show();
Dtk::Widget::moveToCenter(&win);
return a.exec();
}
```
## qml.qrc
```xml
<RCC>
<qresource prefix="/dsg/built-in-icons">
<file>select_indicator.dci</file>
</qresource>
</RCC>
```
## select_indicator.dci
下载dci-demo解压获取这是个用qml编写的例子使用DDciIcon更灵活
[dci-demo](https://github.com/linuxdeepin/deepin-specifications/blob/master/unstable/dci-demo.zip)
编译和运行程序
```bash
cmake -B build
cmake --build build
./build/ddciicon-example
```
程序运行效果如下:
![ddciicon-example](/docs/images/ddciicon-example1.jpg)
@enum Dtk::Gui::DDciIcon::Mode
@brief DCI图标模式
@details
| 键 | 值 |
|:--------:|:---:|
| Normal | 0 |
| Disabled | 1 |
| Hover | 2 |
| Pressed | 3 |
@enum Dtk::Gui::DDciIcon::Theme
@brief DCI图标主题
@details
| 键 | 值 |
|:-----:|:---:|
| Light | 0 |
| Dark | 1 |
@enum Dtk::Gui::DDciIcon::IconAttribute
@brief DCI图标属性
@details
| 键 | 值 |
|:-----:|:---:|
| HasPalette | 0x001 |
这个属性为了获取dci图标的图层是否包含调色板颜色调整, 比如某一个图层的图片的需要用高亮色的填充就是 HasPalette, 这个高亮色还可以调整亮度饱和度rgba等参数
@enum Dtk::Gui::DDciIcon::IconMatchedFlag
@brief DCI图标匹配参数
@var DDciIcon::None
@brief 空,无含义
@var DDciIcon::DontFallbackMode
@brief 在查找图片资源时,如果指定的 mode 不存在,则禁止回退,直接当作查找不到处理
@var DDciIcon::RegardPaddingsAsSize
@brief 将图层中携带的 paddings 属性算作图层大小的一部分,这会影响图片匹配时的大小判断
@fn Dtk::Gui::DDciIcon::DDciIcon()
@brief 构造函数
@fn Dtk::Gui::DDciIcon::DDciIcon(const DCORE_NAMESPACE::DDciFile *dciFile)
@brief 指定DCI文件的构造函数
@fn Dtk::Gui::DDciIcon(const QString &fileName)
@brief 指定DCI文件名的构造函数
@fn Dtk::Gui::DDciIcon::DDciIcon(const QByteArray &data)
@brief 指定DCI文件数据的构造函数
@fn Dtk::Gui::DDciIcon::DDciIcon(const DDciIcon &other)
@brief 拷贝构造函数,重载赋值运算符
@fn Dtk::Gui::DDciIcon::swap(DDciIcon &other)
@brief 交换两个DDciIcon对象
@fn bool Dtk::Gui::DDciIcon::isNull() const
@brief 判断DCI图标是否为空
@fn DDciIconMatchResult Dtk::Gui::DDciIcon::matchIcon(int size, Theme theme, Mode mode, IconMatchedFlags flags = None) const
@brief 获取DCI图标匹配元信息, 元信息仅能作为传入参数使用
@param[in] size 图标大小
@param[in] theme 图标主题
@param[in] mode 图标模式
@param[in] flags 图标匹配标志
@fn int Dtk::Gui::DDciIcon::actualSize(DDciIconMatchResult result) const
@brief 获取DCI图标实际大小
@param[in] result DCI图标匹配结果
@fn int Dtk::Gui::DDciIcon::actualSize(int size, Theme theme, Mode mode =Normal) const
@brief 获取DCI图标实际大小
@details 该函数会根据传入的参数获取DCI图标匹配结果,然后调用actualSize(DDciIconMatchResult result)函数获取DCI图标实际大小
@sa DDciIcon::actualSize(DDciIconMatchResult result)
@fn QList<int> Dtk::Gui::DDciIcon::availableSizes(Theme theme, Mode mode=Normal) const
@brief 获取DCI图标可用大小列表
@param[in] theme 图标主题
@param[in] mode 图标模式默认为Normal
@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr)
@brief 判断DCI图标是否支持指定属性
@param[in] result DCI图标匹配结果
@param[in] attr 图标属性
@fn QPixmap Dtk::Gui::DDciIcon::pixmap(qreal devicePixelRatio, int iconSize, Theme theme, Mode mode = Normal,const DDciIconPalette &palette = DDciIconPalette()) const
@brief 获取DCI图标的QPixmap
@param[in] devicePixelRatio 设备像素比
@param[in] iconSize 图标大小
@param[in] theme 图标主题
@param[in] mode 图标模式, 默认为Normal
@param[in] palette 图标调色板,默认为无(空)调色板
@fn QPixmap Dtk::Gui::DDciIcon::pixmap(qreal devicePixelRatio, int iconSize, DDciIconMatchResult result, const DDciIconPalette &palette = DDciIconPalette()) const
@brief 获取DCI图标的QPixmap
@param[in] devicePixelRatio 设备像素比
@param[in] iconSize 图标大小
@param[in] result DCI图标匹配结果
@param[in] palette 图标调色板, 默认为无(空)调色板
@fn void Dtk::Gui::DDciIcon::paint(QPainter *painter, const QRect &rect, qreal devicePixelRatio, Theme theme, Mode mode = Normal, Qt::Alignment alignment = Qt::AlignCenter, const DDciIconPalette &palette = DDciIconPalette()) const
@brief 绘制DCI图标
@param[in] painter QPainter对象
@param[in] rect 绘制区域
@param[in] devicePixelRatio 设备像素比
@param[in] theme 图标主题
@param[in] mode 图标模式, 默认为Normal
@param[in] alignment 对齐方式, 默认为Qt::AlignCenter
@param[in] palette 图标调色板, 默认为无(空)调色板
@fn void Dtk::Gui::DDciIcon::paint(QPainter *painter, const QRect &rect, qreal devicePixelRatio, DDciIconMatchResult result, Qt::Alignment alignment = Qt::AlignCenter, const DDciIconPalette &palette = DDciIconPalette()) const
@brief 绘制DCI图标
@param[in] painter QPainter对象
@param[in] rect 绘制区域
@param[in] devicePixelRatio 设备像素比
@param[in] result DCI图标匹配结果
@param[in] alignment 对齐方式, 默认为Qt::AlignCenter
@param[in] palette 图标调色板, 默认为无(空)调色板
@fn Dtk::Gui::DDciIcon::image(DDciIconMatchResult result, int size, qreal devicePixelRatio) const
@details 构造一个 DDciIconImage 对象
@param[in] result 匹配到的图片结果,将根据此匹配结果查找对应的图片数据。
@param[in] size 期望获取到的图片大小,将根据此大小寻找最为接近的图片资源,当图片大小与传入的大小不一致时,将优先返回一个稍大的图片。
@param[in] devicePixelRatio 期望获取到的图片的缩放比例,将根据其寻找最为接近的图片资源,当无法找到指定比例的图片时,将优先返回一个稍大比例的图片。
@sa DDciIcon::matchIcon
@fn static DDciIcon Dtk::Gui::DDciIcon::fromTheme(const QString &name)
@brief 从dci图标主题(包括内置dci图标资源)中获取图标名字为name的图标
@param[in] name DCI图标名称
@fn static DDciIcon Dtk::Gui::DDciIcon::fromTheme (const QString &name, const DDciIcon &fallback)
@brief 从dci图标主题(包括内置dci图标资源)中获取图标名字为name的图标
@param[in] name DCI图标名称
@param[in] fallback 当图标名为 name 的图标找不到时, fallback 到 fallback 的这个dci图标
*/

View File

@ -0,0 +1,79 @@
/*!
@~chinese
@file include/util/ddciiconpalette.h
@ingroup dci
@brief DCI图标调色板
@class Dtk::Gui::DDciIconPalette ddciiconpalette.h
@brief DCI图标调色板
@fn Dtk::Gui::DDciIconPalette::DDciIconPalette (QColor foreground=QColor::Invalid, QColor background=QColor::Invalid, QColor highlight=QColor::Invalid, QColor highlightForeground=QColor::Invalid)
@brief 构造函数
@param[in] foreground 前景色, 默认值为无效色
@param[in] background 背景色, 默认值为无效色
@param[in] highlight 高亮色, 默认值为无效色
@param[in] highlightForeground 高亮前景色, 默认值为无效色
@property Dtk::Gui::DDciIconPalette::foreground()
@brief foreground()属性
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::foreground()
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setForeground(const QColor &foreground)
@fn QColor Dtk::Gui::DDciIconPalette::foreground() const
@brief 返回前景色
@sa DDciIconPalette::foreground
@fn void Dtk::Gui::DDciIconPalette::setForeground(const QColor &foreground)
@brief 设置前景色
@sa DDciIconPalette::foreground
@property Dtk::Gui::DDciIconPalette::background
@brief background()属性
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::background()
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setBackground(const QColor &background)
@fn QColor Dtk::Gui::DDciIconPalette::background() const
@brief 返回背景色
@sa DDciIconPalette::background
@fn void Dtk::Gui::DDciIconPalette::setBackground(const QColor &background)
@brief 设置背景色
@sa DDciIconPalette::background
@property Dtk::Gui::DDciIconPalette::highlightForeground
@brief highlightForeground()属性
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::highlightForeground()
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setHighlightForeground(const QColor &highlightForeground)
@fn QColor Dtk::Gui::DDciIconPalette::highlightForeground() const
@brief 返回高亮前景色
@sa DDciIconPalette::highlightForeground
@fn void Dtk::Gui::DDciIconPalette::setHighlightForeground(const QColor &highlightForeground)
@brief 设置高亮前景色
@sa DDciIconPalette::highlightForeground
@property Dtk::Gui::DDciIconPalette::highlight
@brief highlight()属性
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::highlight()
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setHighlight()
@fn QColor Dtk::Gui::DDciIconPalette::highlight() const
@brief 返回高亮色
@sa DDciIconPalette::highlight
@fn void Dtk::Gui::DDciIconPalette::setHighlight()
@brief 设置高亮色
@sa DDciIconPalette::highlight
@fn static QString Dtk::Gui::DDciIconPalette::convertToString(const DDciIconPalette &palette)
@brief 将DDciIconPalette转换为字符串
@fn static DDciIconPalette Dtk::Gui::DDciIconPalette::convertFromString(const QString &data)
@brief 将字符串转换为DDciIconPalette
@fn static DDciIconPalette Dtk::Gui::DDciIconPalette::fromQPalette(const QPalette &pa)
@brief 将QPalette转换为DDciIconPalette
@sa QPalette
*/

View File

@ -0,0 +1,201 @@
/*!
@~chinese
@file include/util/ddciiconplayer.h
@ingroup dci
@brief DCI 图标播放工具
@class Dtk::Gui::DDciIconImagePlayer ddciiconplayer.h
@details 用于 DDciIconImage 的动画播放,功能设计类似于 QMovie。支持无缝顺序播放播放多个图片、倒序播放等高级功能。
@enum Dtk::Gui::DDciIconImagePlayer::State
@brief 播放状态
@var DDciIconImagePlayer::NotRunning
@brief 未播放动画
@var DDciIconImagePlayer::WaitingRead
@brief 正在播放动画,且等待读取当前帧
@var DDciIconImagePlayer::Running
@brief 正在播放动画,此时处于等待下一帧到来的状态
@enum Dtk::Gui::DDciIconImagePlayer::Flag
@brief 播放参数
@details 缓存的帧被判断为无效时将会被自动清理,如调用 DDciIconImagePlayer::setImage 改变了要播放的图片资源。
@var DDciIconImagePlayer::Continue
@brief 接着上一次动画停止时的状态继续播放,一般会配合 InvertedOrder 同时使用
@var DDciIconImagePlayer::CacheAll
@brief 缓存本次播放中的所有动画帧
@var DDciIconImagePlayer::InvertedOrder
@brief 倒序播放
@var DDciIconImagePlayer::IgnoreLastImageLoop
@brief 忽略最后一个图片的动画循环次数,即无论 DDciIconImage::loopCount 的值是什么,动画都只播放一次
@var DDciIconImagePlayer::AllowNonLastImageLoop
@brief 允许非最后一个图片循环播放,默认时不允许,以确保所有图片都有机会被播放,避免动画在前面的图片中无限循环进行播放
@var DDciIconImagePlayer::ClearCacheOnStop
@brief 在动画停止时清理缓存的帧,无论动画是播放完成时的自动停止还是被动停止
@fn Dtk::Gui::DDciIconImagePlayer::DDciIconImagePlayer(QObject *parent)
@details 构造此对象。
@param[in] parent 指定此 QObject 对象的父对象
@fn Dtk::Gui::DDciIconImagePlayer::setImages(const QVector<DDciIconImage> &images)
@details 指定待播放的图片序列,如果当前的状态不是 NotRunning并且与上一次指定的图片序列不同则停止动画。
@param[in] images 图片序列,当为多个时,将无缝顺序播放所有图片。
@fn Dtk::Gui::DDciIconImagePlayer::images() const
@details 返回当前已指定的图片序列。
@fn Dtk::Gui::DDciIconImagePlayer::currentImage() const
@details 返回当前正在播放的图片对象,如果当前的状态是 NotRunning则会返回一个空的 DDciIconImage。
@fn Dtk::Gui::DDciIconImagePlayer::currentLoopForever() const
@details 如果当前正在播放的图片陷入了无限循环,则返回 true否则返回 false。
@sa DDciIconImagePlayer::Flag::IgnoreLastImageLoop DDciIconImagePlayer::Flag::AllowNonLastImageLoop
@fn Dtk::Gui::DDciIconImagePlayer::setPalette(const DDciIconPalette &palette)
@details 指定读取动画帧时所使用的调色板,如果图片支持此功能,则能控制获取到的图片的某些颜色。如果设置成功,并且当前的状态是 NotRunning则会立即清理缓存帧否则会在动画停止时清理缓存帧。
@param[out] 如果新的 DDciIconPalette 与当前的 DDciIconPalette 相同,则返回 false否则返回 true。
@sa DDciIconImagePlayer::palette
@fn Dtk::Gui::DDciIconImagePlayer::palette() const
@details 返回当前已指定的调色板,如果未设置过调色板,则返回一个空的 DDciIconPalette。
@sa DDciIconImagePlayer::setPalette
@fn Dtk::Gui::DDciIconImagePlayer::setLoopCount(int count)
@details 指定动画的循环次数,当从调用 DDciIconImagePlayer::start 到收到 DDciIconImagePlayer::finished 信号为一次循环,除非调用 DDciIconImagePlayer::stop否则不会终止此循环。另外需要注意的是此循环与 DDciIconImage::loopCount 无关,他们相互独立,且会叠加生效。
@sa DDciIconImagePlayer::loopCount
@fn Dtk::Gui::DDciIconImagePlayer::loopCount() const
@details 返回动画循环次数。
@sa DDciIconImagePlayer::setLoopCount
@fn Dtk::Gui::DDciIconImagePlayer::abortLoop() const
@details 终止本次播放中的所有动画循环,即后续的动画都仅播放一遍,这会导致忽略 DDciIconImage::loopCount 和 DDciIconImagePlayer::loopCount。
@fn Dtk::Gui::DDciIconImagePlayer::readImage()
@details 读取当前动画帧,这是一个“生产者-消费者”模型,只有当状态为 WaitingRead 时才能读取,且每一帧只能读取一次。
@sa DDciIconImagePlayer::updated
@fn Dtk::Gui::DDciIconImagePlayer::state() const
@details 返回当前的状态。
@sa DDciIconImagePlayer::stateChanged
@fn Dtk::Gui::DDciIconImagePlayer::clearCache()
@details 立即清理所有的缓存帧。
@fn Dtk::Gui::DDciIconImagePlayer::start(float speed, DDciIconImagePlayer::Flags flags)
@details 立即启动动画,应当在此之前调用 DDciIconImagePlayer::setImages。如果启动成功将发送 started 信号。在启动后,会根据每一帧的间隔自动触发 updated 信号,以通知使用方在合适的时候显示新的帧。在动画播放完成后,将发送 finished 信号,在动画未播放结束前调用了 stop 主动结束动画则不会发送信号。
@param[in] speed 本次动画的播放速度,其表示的是倍速,值越大动画播放的越快。设置为 0 时与设置为 1.0 等价。
@param[in] flags 控制本次动画播放时的一些行为。
@param[out] 如果动画启动成功则返回 true否则返回 false。动画启动失败的原因一般是因为此时已经在播放动画、没有设置任何图片或所有图片都不支持动画。
@sa DDciIconImagePlayer::started DDciIconImagePlayer::updated DDciIconImagePlayer::readImage DDciIconImagePlayer::finished DDciIconImagePlayer::stateChanged
@fn Dtk::Gui::DDciIconImagePlayer::stop()
@details 立即停止当前动画的播放。这不会发送 finished 信号。
@fn Dtk::Gui::DDciIconImagePlayer::started()
@details 通知动画已开始播放。
@fn Dtk::Gui::DDciIconImagePlayer::updated()
@details 通知动画的当前帧已经发生变化,在收到此信号后需要立即调用 readImage否则动画会被暂停不会自动到下一帧。
@sa DDciIconImagePlayer::readImage
@fn Dtk::Gui::DDciIconImagePlayer::finished()
@details 在本次动画播放结束时发送信号通知。因为调用 DDciIconImagePlayer::stop 导致的动画停止不会触发此信号。
@sa DDciIconImagePlayer::start
@fn Dtk::Gui::DDciIconImagePlayer::stateChanged()
@details 在状态改变时发送信号通知。
@sa DDciIconImagePlayer::state
@class Dtk::Gui::DDciIconPlayer ddciiconplayer.h
@details 实现根据 DDciIcon::Mode 的变化,自动化计算要显示的图标内容,支持动态图标,在 DDciIcon::Mode 被设置时通过 updated 信号通知控件绘制新的内容。对于动态图标的动画播放先后顺序、播放速度等规则遵守 DSG 规范中所提出的 DCI 图标文件标准。有几条特性:
1. 支持动画的倒序播放,如从 Hover 状态变为 Normal 时,可以倒序播放 Hover 状态所对应的 DDciIconImage。此功能依赖于 DDciIconImagePlayer 的实现。
2. 支持动画无缝衔接播放,如从 Normal 状态变化为 Hover 时,在播放 Hover 动画的途中又变为 Pressed 状态,则不会立即将 Hover 的动画打断,将把 Pressed 动画在当前动画播放接受后自动播放。
3. 支持动画记忆播放,如从 Normal 状态变化为 Hover 时,在播放 Hover 动画的途中变回了 Normal 状态,则会从当前已经播放到的这一帧开始倒序播放 Hover 动画。
@enum Dtk::Gui::DDciIconPlayer::State
@brief 工作状态
@var DDciIconPlayer::Idle
@brief 处于空闲状态,一般表示此时未播放动画
@var DDciIconPlayer::Busy
@brief 处于忙碌状态,此时可能正在播放动画
@fn Dtk::Gui::DDciIconPlayer::DDciIconPlayer
@details 构造此对象。
@param[in] parent 指定此 QObject 对象的父对象
@fn Dtk::Gui::DDciIconPlayer::state() const
@details 返回当前的状态。
@sa DDciIconPlayer::State
@fn Dtk::Gui::DDciIconPlayer::setIcon(const DDciIcon &icon)
@details 设置要处理的图标对象,这会导致当前动画停止播放,并且释放上一个 icon 相关的所有资源。会触发 updated 信号。
@fn Dtk::Gui::DDciIconPlayer::icon() const
@details 返回已设置的图标对象。
@fn Dtk::Gui::DDciIconPlayer::setTheme(DDciIcon::Theme theme)
@details 为图标指定要使用的主题,如果值发生变化,会导致当前动画停止播放,并且释放图标相关的所有资源。会触发 updated 信号。
@fn Dtk::Gui::DDciIconPlayer::theme() const
@details 返回已设置的图标主题。
@fn Dtk::Gui::DDciIconPlayer::setMode(DDciIcon::Mode mode)
@details 指定图标当前要使用的模式,如果值发生变化,会根据新旧模式的过渡规则计算接下来是否需要播放动画,以及当动画不存在或动画停止后所停留的内容。动画播放规则遵守 DSG 中 DCI 图标格式规范中的定义。
@sa DDciIconPlayer::modeChanged DDciIconPlayer::updated
@fn Dtk::Gui::DDciIconPlayer::mode() const
@details 返回已设置的图标模式。
@fn Dtk::Gui::DDciIconPlayer::setIconSize(int size)
@details 为图标指定要渲染的大小,如果值发生变化,会导致当前动画停止播放,并且释放图标相关的所有资源。会触发 updated 信号。
@fn Dtk::Gui::DDciIconPlayer::iconSize() const
@details 返回已设置的图标大小。
@fn Dtk::Gui::DDciIconPlayer::setDevicePixelRatio(qreal devicePixelRatio)
@details 为图标指定渲染时的缩放比例,如果值发生变化,会导致当前动画停止播放,并且释放图标相关的所有资源。会触发 updated 信号。
@fn Dtk::Gui::DDciIconPlayer::devicePixelRatio() const
@details 返回已设置的图标缩放比例。
@fn Dtk::Gui::DDciIconPlayer::setPalette(const DDciIconPalette &palette)
@details 为图标指定渲染时所使用的调色板,如果值发生变化,并且当前模式所对应的图片支持指定调色板,在 Busy 状态下,会导致接下来新的动画帧的颜色发生变化,在 Idle 状态下,则会重新为当前模式计算应该显示的内容,这可能会触发 updated 信号。
@sa DDciIconImage::hasPalette DDciIconImage::toImage DDciIconImage::paint
@fn Dtk::Gui::DDciIconPlayer::currentImage() const
@details 返回当前图标在当前时刻应该显示的位图数据。当此数据变化时会发送 updated 信号。
@sa DDciIconPlayer::setIcon DDciIconPlayer::updated
@fn Dtk::Gui::DDciIconPlayer::play(DDciIcon::Mode mode)
@details 为指定的图标模式计算要显示的内容,这可能会导致 currentImage 发生变化。这是个一次性行为,不会影响下一次调用 setMode 后的结果。
@param[in] mode 指定要播放的图标模式,如果此模式支持动画,会触发此模式自身的动画播放(与 setMode 导致的动画不同的是,此动画不涉及两种模式变化时的过渡规则),否则将修改 currentImage 为此模式对应的静态图片资源。
@fn Dtk::Gui::DDciIconPlayer::play(DDciIcon::Mode mode, DDciIconImagePlayer::Flags flags)
@details 为指定的图标模式和播放参数计算要显示的内容。
@param[in] mode 指定要播放的图标模式。
@param[in] flags 播放参数
@fn Dtk::Gui::DDciIconPlayer::stop()
@details 如果当前正在播放动画,则停止当前动画的播放,但不会影响队列中下一个动画的播放。可能会导致 DDciIconPlayer::state 发生变化。
@sa DDciIconPlayer::abort
@fn Dtk::Gui::DDciIconPlayer::abort()
@details 如果当前正在播放动画,则停止当前动画的播放,并取消队列中所有计划播放的动画。可能会导致 DDciIconPlayer::state 发生变化。
@sa DDciIconPlayer::stop
@fn Dtk::Gui::DDciIconPlayer::stateChanged()
@details 通知状态发生变化。
@sa DDciIconPlayer::state
@fn Dtk::Gui::DDciIconPlayer::updated()
@details 通知 DDciIconPlayer::currentImage 发生变化。
@sa DDciIconPlayer::currentImage
@fn Dtk::Gui::DDciIconPlayer::modeChanged(DDciIcon::Mode oldMode, DDciIcon::Mode newMode)
@details 通知图标的模式发生变化。
@param[in] oldMode 变化之前的 mode
@param[in] newMode 变化之后的 mode
@sa DDciIconPlayer::setMode DDciIconPlayer::setMode
*/

View File

@ -0,0 +1,164 @@
/*!
@~chinese
@file include/util/ddesktopservices.h
@ingroup DesktopServices
@brief Dtk 提供常见桌面服务的方法工具类
@namespace Dtk::Gui::DDesktopServices ddesktopservices.h
@details 用于提供一些接口,包括在文件管理器中显示目录,显示文件,显示文件属性,移入回收站,播放系统音效等。
@enum Dtk::Gui::DDesktopServices::SystemSoundEffect
@brief 系统音效的枚举
@var Dtk::Gui::DDesktopServices::SSE_Notifications
@brief 显示通知的音效
@var Dtk::Gui::DDesktopServices::SEE_Screenshot
@brief 截屏的音效
@var Dtk::Gui::DDesktopServices::SSE_EmptyTrash
@brief 清空回收站的音效
@var Dtk::Gui::DDesktopServices::SSE_SendFileComplete
@brief 完成发送文件(到桌面)的音效
@var Dtk::Gui::DDesktopServices::SSE_BootUp
@brief 开机的音效
@var Dtk::Gui::DDesktopServices::SSE_Shutdown
@brief 关机的音效
@var Dtk::Gui::DDesktopServices::SSE_Logout
@brief 注销的音效
@var Dtk::Gui::DDesktopServices::SSE_WakeUp
@brief 唤醒的音效
@var Dtk::Gui::DDesktopServices::SSE_VolumeChange
@brief 音量调节的音效
@var Dtk::Gui::DDesktopServices::SSE_LowBattery
@brief 低电量的音效
@var Dtk::Gui::DDesktopServices::SSE_PlugIn
@brief 电源接入的音效
@var Dtk::Gui::DDesktopServices::SSE_PlugOut
@brief 电源移除的音效
@var Dtk::Gui::DDesktopServices::SSE_DeviceAdded
@brief 移动设备接入的音效
@var Dtk::Gui::DDesktopServices::SSE_DeviceRemoved
@brief 移动设备移除的音效
@var Dtk::Gui::DDesktopServices::SSE_Error
@brief 错误提示的音效
@fn Dtk::Gui::DDesktopServices::showFolder(const QString &localFilePath, const QString &startupId = QString())
@details 通过文件管理器显示目录
@param[in] localFilePath 要显示的目录路径
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFolders(const QList<QString> &localFilePaths, const QString &startupId = QString())
@details 通过文件管理器显示多个目录
@param[in] localFilePaths 要显示的目录路径列表
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFolder(const QUrl &url, const QString &startupId = QString())
@details 通过文件管理器显示目录
@param[in] url 要显示的目录 QUrl 形式路径
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFolders(const QList<QUrl> &urls, const QString &startupId = QString())
@details 通过文件管理器显示多个目录
@param[in] urls 要显示的目录路径 url 列表
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItemProperty(const QString &localFilePath, const QString &startupId = QString())
@details 通过文件管理器显示文件的属性
@param[in] localFilePath 要显示的文件路径
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItemProperties(const QList<QString> &localFilePaths, const QString &startupId = QString())
@details 通过文件管理器显示多个文件的属性
@param[in] localFilePaths 要显示的文件路径列表
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItemProperty(const QUrl &url, const QString &startupId = QString())
@details 通过文件管理器显示文件的属性
@param[in] url 要显示的文件 QUrl 形式路径
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItemProperties(const QList<QUrl> &urls, const QString &startupId = QString())
@details 通过文件管理器显示多个文件的属性
@param[in] urls 要显示的目录路径 url 列表
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItem(const QString &localFilePath, const QString &startupId = QString())
@details 通过文件管理器在父目录中显示并选中文件(目录)
@param[in] localFilePath 要显示(选中)的文件(目录)路径
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItems(const QList<QString> &localFilePaths, const QString &startupId = QString())
@details 通过文件管理器父目录中显示并选中多个文件(目录)
@param[in] localFilePaths 要显示(选中)的文件(目录)路径列表
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItem(const QUrl &url, const QString &startupId = QString())
@details 通过文件管理器在父目录中显示并选中文件(目录)
@param[in] url 要显示选中的文件目录QUrl 形式路径
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::showFileItems(const QList<QUrl> &urls, const QString &startupId = QString())
@details 通过文件管理器父目录中显示并选中多个文件(目录)
@param[in] urls 要显示选中)的文件(目录)路径 url 列表
@param[in] startupId 本次启动的id, 默认为空
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::trash(const QString &localFilePath)
@details 通过文件管理器将文件移入回收站
@param[in] localFilePath 要移入回收站的文件路径
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::trash(const QList<QString> &localFilePaths)
@details 通过文件管理器将多个文件移入回收站
@param[in] localFilePaths 要移入回收站的文件路径列表
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::trash(const QUrl &url)
@details 通过文件管理器将文件移入回收站
@param[in] url 要移入回收站的文件 url 路径
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::trash(const QList<QUrl> &urls)
@details 通过文件管理器将多个文件移入回收站
@param[in] urls 要移入回收站的文件路径 url 列表
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::playSystemSoundEffect(const SystemSoundEffect &effect)
@details 播放系统音效。如果系统音效被禁用或者要播放音效被禁用将播放失败
@param[in] effect 要播放的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::playSystemSoundEffect(const QString &name)
@details 根据音效名播放系统音效。如果系统音效被禁用或者要播放音效被禁用将播放失败
@param[in] name 要播放的音效名称,见 Dtk::Gui::DDesktopServices::getNameByEffectType
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::previewSystemSoundEffect(const SystemSoundEffect &effect)
@details 系统音效预览。
@param[in] effect 要播放的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::previewSystemSoundEffect(const QString &name)
@details 根据音效名预览系统音效。
@param[in] name 要播放的音效名称,见 Dtk::Gui::DDesktopServices::getNameByEffectType
@return 调用成功返回 true, 否则返回 false
@fn Dtk::Gui::DDesktopServices::getNameByEffectType(const SystemSoundEffect &effect)
@details 根据音效名预览系统音效。
@param[in] effect 要获取名称的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
@return QString effect 对应的音效名称
@fn Dtk::Gui::DDesktopServices::errorMessage()
@details 文件管理器相关调用出错时可以通过此接口获取错误信息
@return 错误信息
*/

View File

@ -0,0 +1,94 @@
/*!
@~chinese
@file include/util/dicontheme.h
@ingroup dci
@brief Dtk 图标主题工具类
@namespace Dtk::Gui::DIconTheme dicontheme.h
@details 用于提供一些接口,包括查找图标(包括 QIcon 和 DCI 图标 ),图标搜索路径等。
@enum Dtk::Gui::DIconTheme::Option
@brief 查找图标时的选项
@var Dtk::Gui::DIconTheme::DontFallbackToQIconFromTheme
@brief 是否**不使用** QIcon::fromTheme 的方式去查找图标,当设置此 flag 时查找图标失败时直接返回空图标对象,否则回退到通过 QIcon::fromTheme 查找图标
@var Dtk::Gui::DIconTheme::IgnoreBuiltinIcons
@brief 是否忽略通过内置图标引擎方式查找图标资源,当设置此 flag 时查找图标会跳过内置图标引擎的方式查找图标资源,否则优先尝试内置图标引擎查找资源。
@class Dtk::Gui::DIconTheme::Cached
@details 图标查找缓存类,提供的查找图标接口,如果找到会加入缓存,下次查找会更快。
@fn Dtk::Gui::DIconTheme::Cached::Cached()
@details 图标缓存构造函数
@fn Dtk::Gui::DIconTheme::Cached::~Cached()
@details 图标缓存析构函数
@fn Dtk::Gui::DIconTheme::Cached::maxCost() const
@details 返回允许的最大缓存数量
@fn Dtk::Gui::DIconTheme::Cached::setMaxCost(int cost)
@details 将最大允许的缓存数量设置为 cost 。如果当前的缓存数量大于 cost ,则某些缓存对象会立即删除。
@fn Dtk::Gui::DIconTheme::Cached::clear()
@details 清理所有缓存
@fn Dtk::Gui::DIconTheme::Cached::findQIcon(const QString &iconName, Options options, const QIcon &fallback)
@details 通过 iconName 查找 QIcon 的接口,找到时会加入缓存
@param[in] iconName 要查找的图标名称
@param[in] options 要查找的选项
@param[in] fallback 图标查找失败时可以返回用户指定的 fallback 对象,默认为空
@sa DIconTheme::findQIcon
@fn Dtk::Gui::DIconTheme::Cached::findDciIconFile(const QString &iconName, const QString &themeName, const QString &fallback)
@details 通过指定图标名 iconName 和主题名 themeName 查找 DCI 图标文件路径的接口,找到时会加入缓存
@param[in] iconName 要查找的图标名称
@param[in] options 指定 DCI 图标主题
@param[in] fallback 图标查找失败时可以返回用户指定的 fallback ,默认为空
@fn Dtk::Gui::DIconTheme::cached()
@details 获取(首次次调用时构造)缓存对象。
@fn Dtk::Gui::DIconTheme::findQIcon(const QString &iconName, Options options)
@details 返回 DIconTheme::createIconEngine 接口创建的图标引擎构造 QIcon当没有设置 DontFallbackToQIconFromTheme 和 createIconEngine 失败时回退到 QIcon::fromTheme
@param[in] iconName 要查找的图标名称
@param[in] options 要查找的选项, 选项默认为空
@sa DIconTheme::Cached::findQIcon
@sa DIconTheme::createIconEngine
@fn Dtk::Gui::DIconTheme::findQIcon(const QString &iconName, const QIcon &fallback, Options options)
@details 重载 DIconTheme::findQIcon, 当查找图标失败时返回调用者中提供的 fallback 图标
@param[in] iconName 要查找的图标名称
@param[in] options 要查找的选项, 选项默认为空
@param[in] fallback 如果 iconName 无法找到, 返回此图标
@sa DIconTheme::Cached::findQIcon
@sa DIconTheme::createIconEngine
@fn Dtk::Gui::DIconTheme::createIconEngine(const QString &iconName, Options options)
@details 通过图标名构造图标引擎, 如果未设置 IgnoreBuiltinIcons 标志则优先尝试 qrc:/icons/deepin/builtin 目录查找图标来构造内置图标引擎,否则构造 XDG 图标引擎。
@param[in] iconName 图标名称
@param[in] options 选项, 选项默认为 DIconTheme::DontFallbackToQIconFromTheme
@return QIconEngine 对象指针,注意图标查找失败时返回 nullptr。
@fn Dtk::Gui::DIconTheme::findDciIconFile(const QString &iconName, const QString &themeName)
@details 通过指定图标名 iconName 和主题名 themeName 查找 DCI 图标文件路径的接口
@param[in] iconName 要查找的图标名称
@param[in] options 指定 DCI 图标主题
@return 返回找到的 DCI 图标文件路径
@sa DDciIcon::fromTheme
@sa DIconTheme::dciThemeSearchPaths()
@fn Dtk::Gui::DIconTheme::dciThemeSearchPaths()
@details 返回 DCI 图标的搜索路径。默认会从这些路径查找 /usr/share/dsg/icons/$theme_name, qrc:/dsg/icons/$theme_name, qrc:/dsg/built-in-icons
@sa DIconTheme::findDciIconFile
@fn Dtk::Gui::DIconTheme::setDciThemeSearchPaths(const QStringList &path)
@details 设置查找 DCI 图标的搜索路径
@sa DIconTheme::dciThemeSearchPaths
@fn Dtk::Gui::DIconTheme::isBuiltinIcon(const QIcon &icon)
@details 返回 QIcon 是否为内置图标,`内置图标` 是 DTK 中规定的一类集成在二进制内部的图标资源,其一般放置于 qrc:/icons/deepin/builtin 的路径下,在使用 findQIcon 或 createIconEngine 时,如找到此路径下对应的图标文件,则会为其使用一个自定义的 QIconEngine 进行渲染。此方法即通过判断 icon 所使用的 QIconEngine 确认其是否为内置图标。
@fn Dtk::Gui::DIconTheme::isXdgIcon(const QIcon &icon)
@details 返回 QIcon 是否为 XDG 图标, XDG 图标一般放置于系统图标主题目录(如:/usr/share/icons。和 isBuiltinIcon 类似,此方法是通过判断 icon 所使用的 QIconEngine 确认其是否为 XDG 图标。
*/

10
docs/util/index.zh_CN.md Normal file
View File

@ -0,0 +1,10 @@
@page util util--dtkgui工具组件
# Dtk-Gui utildtk工具组件
TODO添加组件说明
@defgroup dci
@brief dci图标操作类
@details

149
dtkgui.cmake Normal file
View File

@ -0,0 +1,149 @@
message(STATUS "Current Qt Version: ${QT_VERSION_MAJOR}")
set(LIB_NAME dtk${DTK_VERSION_MAJOR}gui)
# Set install path
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /usr)
endif ()
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Set build option
option(DTK_DISABLE_LIBXDG "Disable libxdg" OFF)
option(DTK_DISABLE_LIBRSVG "Disable librsvg" OFF)
option(DTK_DISABLE_EX_IMAGE_FORMAT "Disable libraw and freeimage" OFF)
set(CMAKE_CXX_STANDARD 17)
if("${QT_VERSION_MAJOR}" STREQUAL "5")
set (BUILD_DOCS ON CACHE BOOL "Generate doxygen-based documentation")
else()
# dtk6 not build doc
set (BUILD_DOCS OFF CACHE BOOL "Generate doxygen-based documentation")
endif()
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/dtk${PROJECT_VERSION_MAJOR}/DGui")
set(TOOL_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}/dtk${PROJECT_VERSION_MAJOR}/DGui/bin")
set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
set(MKSPECS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/mkspecs/modules" CACHE STRING "Install dir for qt pri module files")
set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Gui")
set(PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wextra -fopenmp")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BUILD_TESTING ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fno-omit-frame-pointer")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast")
endif ()
set(CONFIGNAME include/global/dtkgui_config.h)
file(WRITE ${CONFIGNAME}
"// This is an auto-generated header, please don't modify it.\n"
)
file(GLOB CONFIGSOURCE include/DtkGui/*)
foreach(FILENAME ${CONFIGSOURCE})
get_filename_component(thefile ${FILENAME} NAME)
file(APPEND ${CONFIGNAME} "#define DTKGUI_CLASS_${thefile}\n")
endforeach()
# Generate cmake config file
configure_package_config_file(misc/DtkGuiConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfig.cmake
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
PATH_VARS TOOL_INSTALL_DIR
)
# Generate cmake version file
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfigVersion.cmake"
VERSION ${DTK_VERSION}
COMPATIBILITY SameMajorVersion
)
# Install cmake config file and version file to CONFIG_INSTALL_DIR
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfigVersion.cmake
DESTINATION "${CONFIG_INSTALL_DIR}"
)
# Install pkgconfig file
configure_file(misc/dtkgui.pc.in dtk${DTK_VERSION_MAJOR}gui.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtk${DTK_VERSION_MAJOR}gui.pc DESTINATION "${PKGCONFIG_INSTALL_DIR}")
# Install pri module
configure_file(misc/qt_lib_dtkgui.pri.in qt_lib_dtkgui.pri @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qt_lib_dtkgui.pri DESTINATION "${MKSPECS_INSTALL_DIR}")
set(GUISGNAME DtkGuis)
file(WRITE ${GUISGNAME}
"// This is an auto-generated header, please don't modify it.\n"
"#ifndef DTK_GUI_MODULE_H\n"
"#define DTK_GUI_MODULE_H\n"
)
file(GLOB FILEGRAGTOWRITSOURCE include/filedrag/*)
foreach(FILENAME ${FILEGRAGTOWRITSOURCE})
get_filename_component(thefile ${FILENAME} NAME)
file(APPEND ${GUISGNAME} "#include \"${thefile}\"\n")
endforeach()
file(GLOB KERNELTOWRITESOURCE include/kernel/*)
foreach(FILENAME ${KERNELTOWRITESOURCE})
get_filename_component(thefile ${FILENAME} NAME)
file(APPEND ${GUISGNAME} "#include \"${thefile}\"\n")
endforeach()
file(GLOB UTILTOWRITESOURCE include/util/*)
foreach(FILENAME ${UTILTOWRITESOURCE})
get_filename_component(thefile ${FILENAME} NAME)
file(APPEND ${GUISGNAME} "#include \"${thefile}\"\n")
endforeach()
file(APPEND ${GUISGNAME} "#endif")
install(FILES DtkGuis DESTINATION "${INCLUDE_INSTALL_DIR}")
# Find common dependencies
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui DBus Network)
find_package(PkgConfig REQUIRED)
find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED Core)
find_package(DtkBuildHelper REQUIRED)
pkg_check_modules(librsvg REQUIRED IMPORTED_TARGET librsvg-2.0)
if(NOT DTK_DISABLE_LIBXDG)
# Only use libxdg under Qt5
if (${QT_VERSION_MAJOR} STREQUAL "5")
find_package(Qt5XdgIconLoader REQUIRED)
if (NOT Qt5XdgIconLoader_FOUND)
message(WARNING " XdgIconLoader Not Found, DISABLE LIBXDG !")
set (DTK_DISABLE_LIBXDG ON)
endif()
else()
set (DTK_DISABLE_LIBXDG ON)
endif()
endif()
# Check optional image handler dependencies.
find_package(FreeImage)
pkg_check_modules(libraw IMPORTED_TARGET libraw)
if(FreeImage_FOUND AND libraw_FOUND)
set(EX_IMAGE_FORMAT_LIBS_FOUND ON)
endif()
set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(src ${OUTPUT_DIR}/src)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests ${OUTPUT_DIR}/tests)
endif()
add_subdirectory(tools ${OUTPUT_DIR}/tools)
add_subdirectory(examples ${OUTPUT_DIR}/examples)
if (BUILD_DOCS)
add_subdirectory(docs ${OUTPUT_DIR}/docs)
endif ()

View File

@ -1 +0,0 @@
load(dtk_lib)

4
examples/CMakeLists.txt Normal file
View File

@ -0,0 +1,4 @@
add_subdirectory(dnd-example)
#add_subdirectory(test-taskbar) # Don't build
#add_subdirectory(frameless-window) # Don't build
add_subdirectory(animation-dci)

Binary file not shown.

View File

@ -0,0 +1,19 @@
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(Dtk${DTK_VERSION_MAJOR}Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(BIN_NAME animation-dci)
set(TARGET ${BIN_NAME}${DTK_VERSION_MAJOR})
add_executable(${TARGET}
main.cpp
test_dci_icon.qrc
)
target_link_libraries(
${TARGET} PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
dtk${DTK_VERSION_MAJOR}gui
)
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${BIN_NAME})

Binary file not shown.

View File

@ -0,0 +1,166 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#include <QApplication>
#include <QWidget>
#include <QImage>
#include <QPainter>
#include <QPainterPath>
#include <QLabel>
#include <QEvent>
#include <QDebug>
#include <QDateTime>
#include <QMainWindow>
#include <QStatusBar>
#include <QMenuBar>
#include <QPushButton>
#include <QHBoxLayout>
#include <QFileDialog>
#include <DDciIcon>
#include <DDciIconPlayer>
#include <QDropEvent>
#include <QMimeData>
DGUI_USE_NAMESPACE
static QString iconModeToString(DDciIcon::Mode mode)
{
switch (mode) {
case DDciIcon::Normal:
return "Normal";
case DDciIcon::Hover:
return "Hover";
case DDciIcon::Pressed:
return "Pressed";
case DDciIcon::Disabled:
return "Disabled";
default:
break;
}
return nullptr;
}
class IconWidget : public QMainWindow
{
public:
IconWidget(const QString &iconName)
{
setCentralWidget(label = new QLabel(this));
label->setAcceptDrops(true);
centralWidget()->setAttribute(Qt::WA_MouseTracking);
centralWidget()->installEventFilter(this);
statusBar()->addWidget(message = new QLabel());
auto normal = new QPushButton("Normal");
connect(normal, &QPushButton::clicked, this, [this] {
player.setMode(DDciIcon::Normal);
});
auto hover = new QPushButton("Hover");
connect(hover, &QPushButton::clicked, this, [this] {
player.setMode(DDciIcon::Hover);
});
auto pressed = new QPushButton("Pressed");
connect(pressed, &QPushButton::clicked, this, [this] {
player.setMode(DDciIcon::Pressed);
});
auto disabled = new QPushButton("Disabled");
connect(disabled, &QPushButton::clicked, this, [this] {
player.setMode(DDciIcon::Disabled);
});
auto open = new QPushButton("...");
connect(open, &QPushButton::clicked, this, [this] {
QString dciFile = QFileDialog::getOpenFileName(this, "select a dci icon file", "", "*.dci");
player.setIcon(DDciIcon(dciFile));
player.setMode(DDciIcon::Normal);
});
QWidget *menuWidget = new QWidget(this);
QHBoxLayout *layout = new QHBoxLayout(menuWidget);
layout->addWidget(normal);
layout->addWidget(hover);
layout->addWidget(pressed);
layout->addWidget(disabled);
layout->addWidget(open);
setMenuWidget(menuWidget);
icon = DDciIcon::fromTheme(iconName);
connect(&player, &DDciIconPlayer::updated, this, [this] {
auto image = player.currentImage();
label->setPixmap(QPixmap::fromImage(image));
});
connect(&player, &DDciIconPlayer::modeChanged, this, [this] (DDciIcon::Mode old, DDciIcon::Mode newMode) {
message->setText(QString("Old State: %1, Current State: %2")
.arg(iconModeToString(old))
.arg(iconModeToString(newMode)));
});
DDciIconPalette p("pink");
player.setPalette(p);
player.setDevicePixelRatio(devicePixelRatioF());
player.setIcon(icon);
}
private:
bool event(QEvent *event) override {
if (event->type() == QEvent::WindowActivate) {
player.play(DDciIcon::Normal);
}
return QMainWindow::event(event);
}
bool eventFilter(QObject *watched, QEvent *event) {
if (watched != label)
return QMainWindow::eventFilter(watched, event);
if (event->type() == QEvent::Enter) {
player.setMode(DDciIcon::Hover);
} else if (event->type() == QEvent::Leave) {
if (player.mode() == DDciIcon::Hover)
player.setMode(DDciIcon::Normal);
} else if (event->type() == QEvent::MouseButtonPress) {
player.setMode(DDciIcon::Pressed);
} else if (event->type() == QEvent::MouseButtonRelease) {
player.setMode(label->hasMouseTracking() ? DDciIcon::Hover : DDciIcon::Normal);
} else if (event->type() == QEvent::DragEnter) {
event->accept();
} else if (event->type() == QEvent::Drop) {
auto de = static_cast<QDropEvent *>(event);
if (de->mimeData()->hasFormat("text/uri-list")) {
QString uris = de->mimeData()->data("text/uri-list");
QUrl url(uris.split("\r\n").value(0));
DDciIcon icon(url.path());
if (!icon.isNull()) {
player.setIcon(icon);
player.setMode(DDciIcon::Normal);
}
}
} else {
return false;
}
return true;
}
DDciIcon icon;
DDciIconPlayer player;
QLabel *message = nullptr;
QLabel *label = nullptr;
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
IconWidget *window = new IconWidget(QStringLiteral("test_heart"));
window->setMinimumSize(300, 300);
window->show();
return app.exec();
}

View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file alias="/dsg/built-in-icons/test_heart.dci">dci_heart.dci</file>
<file alias="/dsg/built-in-icons/test_static_3depict.dci">3depict.dci</file>
</qresource>
</RCC>

View File

@ -0,0 +1,32 @@
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(BIN1 dnd-test-client)
set(BIN2 dnd-test-server)
set(TARGET1 ${BIN1}${DTK_VERSION_MAJOR})
set(TARGET2 ${BIN2}${DTK_VERSION_MAJOR})
add_executable(${TARGET1}
dnd-test-client.cpp
)
target_link_libraries(${TARGET1} PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::DBus
${LIB_NAME}
)
add_executable(${TARGET2}
dnd-test-server.cpp
)
target_link_libraries(${TARGET2} PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::DBus
${LIB_NAME}
)
set_target_properties(${TARGET1} PROPERTIES OUTPUT_NAME ${BIN1})
set_target_properties(${TARGET2} PROPERTIES OUTPUT_NAME ${BIN2})
install(TARGETS ${TARGET1} DESTINATION "${TOOL_INSTALL_DIR}")
install(TARGETS ${TARGET2} DESTINATION "${TOOL_INSTALL_DIR}")

View File

@ -0,0 +1,101 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#include "dfiledragclient.h"
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QFrame>
#include <QDragEnterEvent>
#include <QDragMoveEvent>
#include <QDropEvent>
#include <QApplication>
#include <QDebug>
#include <QProgressBar>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTimer>
#include <QDBusConnectionInterface>
DGUI_USE_NAMESPACE
static DFileDragClient *c;
static QProgressBar *p;
class DropArea : public QFrame
{
Q_OBJECT
public:
explicit DropArea(QString s)
: lb(new QLabel(s, this))
, le(new QLineEdit(this))
{
setLayout(new QVBoxLayout);
setFrameShape(Shape::Box);
layout()->addWidget(lb);
layout()->addWidget(le);
lb->setAlignment(Qt::AlignmentFlag::AlignCenter);
le->setText("/tmp");
le->setPlaceholderText(QString("do not accept drop when edit is empty"));
setAcceptDrops(true);
}
protected:
void dragEnterEvent(QDragEnterEvent *e)
{
if (DFileDragClient::checkMimeData(e->mimeData())) {
if (le->text().isEmpty())
e->ignore(); // or e->setDropAction(Qt::IgnoreAction);
else
e->acceptProposedAction();
DFileDragClient::setTargetUrl(e->mimeData(), QUrl(le->text()));
}
}
void dragMoveEvent(QDragMoveEvent *e)
{
if (DFileDragClient::checkMimeData(e->mimeData())) {
e->acceptProposedAction();
DFileDragClient::setTargetUrl(e->mimeData(), QUrl(le->text()));
}
}
void dropEvent(QDropEvent *e)
{
if (DFileDragClient::checkMimeData(e->mimeData())) {
e->acceptProposedAction();
DFileDragClient::setTargetUrl(e->mimeData(), QUrl(le->text()));
c = new DFileDragClient(e->mimeData());
connect(c, &DFileDragClient::progressChanged, p, &QProgressBar::setValue);
}
}
private:
QLabel *lb;
QLineEdit *le;
};
int main(int argc, char **argv)
{
QApplication a(argc, argv);
QDialog d;
d.show();
QHBoxLayout *lo = new QHBoxLayout();
lo->addWidget(new DropArea("area 51"));
lo->addWidget(new DropArea("area 61"));
QScopedPointer<QProgressBar> pp (new QProgressBar());
p = pp.data();
p->setMinimum(0);
p->setMaximum(100);
QVBoxLayout *hlo = new QVBoxLayout();
d.setLayout(hlo);
hlo->addLayout(lo);
hlo->addWidget(p);
a.exec();
}
#include "dnd-test-client.moc"

View File

@ -0,0 +1,121 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#include "dfiledragserver.h"
#include "dfiledrag.h"
#include <QDialog>
#include <QLabel>
#include <QTimer>
#include <QMimeData>
#include <QApplication>
#include <QMouseEvent>
#include <QVBoxLayout>
#include <QProgressBar>
#include <QDebug>
#include <QRandomGenerator>
DGUI_USE_NAMESPACE
static int p;
static DFileDragServer *s = nullptr;
static QLabel *lbr = nullptr;
class DraggableLabel : public QLabel
{
Q_OBJECT
public:
using QLabel::QLabel;
Q_SIGNALS:
void dragFinished();
protected:
void mousePressEvent(QMouseEvent *e)
{
if (e->button() == Qt::MouseButton::LeftButton) {
dragpos = e->pos();
}
}
void mouseMoveEvent(QMouseEvent *e)
{
if (!(e->buttons() & Qt::MouseButton::LeftButton) || s) {
return;
}
if ((e->pos() - dragpos).manhattanLength() < QApplication::startDragDistance()) {
return;
}
s = new DFileDragServer();
DFileDrag *drag = new DFileDrag(this, s);
QMimeData *m = new QMimeData();
m->setText("your stuff here");
drag->setMimeData(m);
connect(drag, &DFileDrag::targetUrlChanged, [drag] {
lbr->setText(drag->targetUrl().toString());
});
Qt::DropAction res = drag->exec(Qt::MoveAction);
if (res!= Qt::IgnoreAction)
Q_EMIT dragFinished();
else {
s->deleteLater();
s = nullptr;
}
}
private:
QPoint dragpos;
};
int main(int argc, char **argv)
{
QApplication a(argc, argv);
QDialog d;
d.show();
DraggableLabel l("Drag me", &d);
l.setAlignment(Qt::AlignCenter);
QTimer t;
t.setInterval(50);
t.setSingleShot(false);
QProgressBar pg;
pg.setMinimum(0);
pg.setMaximum(100);
QLabel lb;
lbr = &lb;
lb.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
QObject::connect(&l, &DraggableLabel::dragFinished, [&t] {
p = -1;
t.start();
});
QObject::connect(&t, &QTimer::timeout, [&t, &pg] {
if (QRandomGenerator::global()->generate() & 1) {
s->setProgress(++p);
pg.setValue(p);
if(p == 100) {
t.stop();
s->deleteLater();
s = nullptr;
}
}
});
QVBoxLayout lo;
lo.addWidget(&l);
lo.addWidget(&pg);
lo.addWidget(&lb);
d.setLayout(&lo);
a.exec();
}
#include "dnd-test-server.moc"

View File

@ -0,0 +1,15 @@
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS X11Extras)
pkg_check_modules(XCB IMPORTED_TARGET xcb)
set(BIN_NAME frameless-window)
add_executable(${BIN_NAME}
main.cpp
)
target_link_libraries(${BIN_NAME} PRIVATE
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::GuiPrivate
Qt${QT_VERSION_MAJOR}::X11Extras
PkgConfig::XCB
)

View File

@ -0,0 +1,166 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#include <QGuiApplication>
#include <QWindow>
#include <QX11Info>
#include <QMouseEvent>
#include <qpa/qplatformwindow.h>
#include <xcb/xcb.h>
void setWindowProperty(quint32 WId, xcb_atom_t propAtom, xcb_atom_t typeAtom, const void *data, quint32 len, uint8_t format)
{
xcb_connection_t* conn = QX11Info::connection();
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, WId, propAtom, typeAtom, format, len, data);
xcb_flush(conn);
}
void clearWindowProperty(quint32 WId, xcb_atom_t propAtom)
{
xcb_delete_property_checked(QX11Info::connection(), WId, propAtom);
}
xcb_atom_t internAtom(xcb_connection_t *connection, const char *name, bool only_if_exists)
{
if (!name || *name == 0)
return XCB_NONE;
xcb_intern_atom_cookie_t cookie = xcb_intern_atom(connection, only_if_exists, strlen(name), name);
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, cookie, 0);
if (!reply)
return XCB_NONE;
xcb_atom_t atom = reply->atom;
free(reply);
return atom;
}
xcb_atom_t internAtom(const char *name, bool only_if_exists)
{
return internAtom(QX11Info::connection(), name, only_if_exists);
}
bool isSupported(xcb_atom_t targetAtom)
{
// get _NET_SUPPORTED from root window
QVector<xcb_atom_t> net_wm_atoms;
xcb_window_t root = QX11Info::appRootWindow();
int offset = 0;
int remaining = 0;
xcb_connection_t *xcb_connection = QX11Info::connection();
auto _net_supported = internAtom(QT_STRINGIFY(_NET_SUPPORTED), false);
do {
xcb_get_property_cookie_t cookie = xcb_get_property(xcb_connection, false, root, _net_supported,
XCB_ATOM_ATOM, offset, 1024);
xcb_get_property_reply_t *reply = xcb_get_property_reply(xcb_connection, cookie, NULL);
if (!reply)
break;
remaining = 0;
if (reply->type == XCB_ATOM_ATOM && reply->format == 32) {
int len = xcb_get_property_value_length(reply)/sizeof(xcb_atom_t);
xcb_atom_t *atoms = (xcb_atom_t *)xcb_get_property_value(reply);
int s = net_wm_atoms.size();
net_wm_atoms.resize(s + len);
memcpy(net_wm_atoms.data() + s, atoms, len*sizeof(xcb_atom_t));
remaining = reply->bytes_after;
offset += len;
}
free(reply);
} while (remaining > 0);
return net_wm_atoms.contains(targetAtom);
}
bool setNoTitlebar(quint32 WId, bool on)
{
xcb_atom_t _deepin_no_titlebar = internAtom(QT_STRINGIFY(_DEEPIN_NO_TITLEBAR), false);
if (!isSupported(_deepin_no_titlebar))
return false;
quint8 value = on;
setWindowProperty(WId, _deepin_no_titlebar, XCB_ATOM_CARDINAL, &value, 1, 8);
// force enable window decorations, becouse we need the window shadow and border, its contains in decorations.
xcb_atom_t _deepin_force_decorate = internAtom(QT_STRINGIFY(_DEEPIN_FORCE_DECORATE), false);
if (on) {
quint8 value = on;
setWindowProperty(WId, _deepin_force_decorate, XCB_ATOM_CARDINAL, &value, 1, 8);
} else {
clearWindowProperty(WId, _deepin_force_decorate);
}
return true;
}
QObject *createNativeSettingsFor(QWindow *window)
{
// The platform function in dxcb plugin:
// https://github.com/linuxdeepin/qt5platform-plugins/blob/master/src/dnativesettings.h
static QFunctionPointer build_function = qApp->platformFunction("_d_buildNativeSettings");
if (!build_function) {
return nullptr;
}
QObject *obj = new QObject(window);
bool ok = reinterpret_cast<bool(*)(QObject*, quint32)>(build_function)(obj, window->winId());
if (!ok) {
delete obj;
return nullptr;
}
return obj;
}
class Window : public QWindow
{
public:
bool handleMoveing = false;
private:
void mouseMoveEvent(QMouseEvent *e) override {
if (handleMoveing && e->buttons() == Qt::LeftButton) {
handle()->startSystemMove();
} else {
QWindow::mouseMoveEvent(e);
}
}
};
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
Window window;
window.resize(200, 200);
if (setNoTitlebar(window.winId(), true)) {
// If enabled no titlebar mode, the window is no min/max/close buttons, you need to implement it by Qt widgets.
// Like as https://github.com/linuxdeepin/dtkwidget/blob/master/src/widgets/dtitlebar.cpp
window.handleMoveing = true;
auto nativeSettings = createNativeSettingsFor(&window);
if (nativeSettings) {
nativeSettings->setProperty("DTK/WindowRadius", "100,100");
nativeSettings->setProperty("borderWidth", 2);
nativeSettings->setProperty("borderColor", QColor(Qt::red));
nativeSettings->setProperty("shadowOffset", "30,30");
nativeSettings->setProperty("shadowRadius", 30);
nativeSettings->setProperty("shadowColor", QColor(Qt::blue));
// See more properties in DPlatformTheme
}
}
window.show();
return app.exec();
}

View File

@ -0,0 +1,17 @@
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(BIN taskbar)
set(TARGET_NAME ${BIN}${DTK_VERSION_MAJOR})
add_executable(${TARGET_NAME}
testtaskbarwindow.h
testtaskbarwindow.cpp
main.cpp
)
target_link_libraries(${TARGET_NAME} PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Gui
${LIB_NAME}
)
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${BIN})

View File

@ -0,0 +1,44 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#include <DGuiApplicationHelper>
#include <DFontManager>
#include <QApplication>
#include "testtaskbarwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
auto name = QUuid::createUuid().toString() + QStringLiteral(".desktop");
a.setDesktopFileName(name);
QDir appDir = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
QFile desktopFile(appDir.absoluteFilePath(name));
if(!desktopFile.exists()) {
desktopFile.open(QIODevice::WriteOnly);
desktopFile.write("[Desktop Entry]\n");
desktopFile.write("Type=Application\n");
desktopFile.write("Version=1.1\n");
desktopFile.write("Name=" + QApplication::applicationDisplayName().toUtf8() + "\n");
desktopFile.write("Exec=" + QApplication::applicationFilePath().toUtf8() + "\n");
desktopFile.close();
}
TestTaskbarWindow *pTaskbarWindow = new TestTaskbarWindow;
pTaskbarWindow->showMaximized();
//这里删除用于测试的desktop文件
QObject::connect(pTaskbarWindow, &TestTaskbarWindow::closeWindow, [&desktopFile] {
QFile::remove(desktopFile.fileName());
});
//控制中心修改字体大小可以看到打印输出
QObject::connect(DGuiApplicationHelper::instance()->fontManager(), &DFontManager::fontChanged, [] {
qDebug() << DGuiApplicationHelper::instance()->fontManager()->baseFont();
});
return a.exec();
}

View File

@ -0,0 +1,78 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#include "testtaskbarwindow.h"
#include <QIntValidator>
#include <QApplication>
#include <QCloseEvent>
TestTaskbarWindow::TestTaskbarWindow(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *pHBoxLayout_1 = new QHBoxLayout;
m_pProgressBox = new QCheckBox("progress");
m_pProgress = new QSlider(Qt::Horizontal);
m_pProgress->setRange(0, 100);
m_pProgress->setMinimumWidth(300);
pHBoxLayout_1->addWidget(m_pProgressBox);
pHBoxLayout_1->addWidget(m_pProgress);
QHBoxLayout *pHBoxLayout_2 = new QHBoxLayout;
m_pCounterBox = new QCheckBox("counter");
m_pNumEdit = new QLineEdit;
m_pNumEdit->setMinimumWidth(300);
m_pNumEdit->setValidator(new QIntValidator);
pHBoxLayout_2->addWidget(m_pCounterBox);
pHBoxLayout_2->addWidget(m_pNumEdit);
m_pUrgencyBox= new QCheckBox("test urgency");
QHBoxLayout *pHBoxLayout_3 = new QHBoxLayout;
pHBoxLayout_3->addWidget(m_pUrgencyBox);
QVBoxLayout *pVBoxLayout = new QVBoxLayout;
setLayout(pVBoxLayout);
pVBoxLayout->addStretch();
pVBoxLayout->addLayout(pHBoxLayout_1);
pVBoxLayout->addSpacing(30);
pVBoxLayout->addLayout(pHBoxLayout_2);
pVBoxLayout->addSpacing(50);
pVBoxLayout->addLayout(pHBoxLayout_3);
pVBoxLayout->addStretch();
m_pTaskbarControl = new DTaskbarControl(this);
m_pTaskbarControl->setProgress(false, 0);
m_pTaskbarControl->setCounter(false, 0);
connect(m_pProgressBox, &QCheckBox::stateChanged, this, [this] (int state) {
m_pTaskbarControl->setProgress(state == Qt::Checked, static_cast<double>(m_pProgress->value()) / 100);
});
connect(m_pCounterBox, &QCheckBox::stateChanged, this, [this] (int state) {
m_pTaskbarControl->setCounterVisible(state == Qt::Checked);
});
connect(m_pProgress, &QSlider::valueChanged, this, [this] (int value) {
m_pTaskbarControl->setProgress(m_pProgressBox->checkState() == Qt::Checked, static_cast<double>(value) / 100);
});
connect(m_pNumEdit, &QLineEdit::textChanged, [this] (const QString &str) {
m_pTaskbarControl->setCounter(m_pCounterBox->checkState() == Qt::Checked, str.toInt());
});
connect(m_pUrgencyBox, &QCheckBox::stateChanged, this, [this] (int state) {
m_pTaskbarControl->setUrgency(state == Qt::Checked);
});
}
TestTaskbarWindow::~TestTaskbarWindow()
{
}
void TestTaskbarWindow::closeEvent(QCloseEvent *event)
{
Q_EMIT closeWindow();
event->accept();
}

View File

@ -0,0 +1,49 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef TESTTASKBARWINDOW_H
#define TESTTASKBARWINDOW_H
#include <QWidget>
#include <QPushButton>
#include <QUuid>
#include <QDir>
#include <QStandardPaths>
#include <QDebug>
#include <QColor>
#include <QCheckBox>
#include <QSlider>
#include <QColorDialog>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "dtaskbarcontrol.h"
DGUI_USE_NAMESPACE
class TestTaskbarWindow : public QWidget
{
Q_OBJECT
public:
explicit TestTaskbarWindow(QWidget *parent = nullptr);
~TestTaskbarWindow();
protected:
void closeEvent(QCloseEvent *event);
Q_SIGNALS:
void closeWindow();
private:
DTaskbarControl *m_pTaskbarControl;
QCheckBox *m_pProgressBox;
QCheckBox *m_pCounterBox;
QLineEdit *m_pNumEdit;
QSlider *m_pProgress;
QCheckBox *m_pUrgencyBox;
};
#endif // TESTTASKBARWINDOW_H

1
include/DtkGui/DDciIcon Normal file
View File

@ -0,0 +1 @@
#include "ddciicon.h"

View File

@ -0,0 +1 @@
#include "ddciiconplayer.h"

View File

@ -0,0 +1 @@
#include "ddciiconpalette.h"

View File

@ -0,0 +1 @@
#include "ddciiconplayer.h"

View File

@ -0,0 +1 @@
#include "ddesktopservices.h"

1
include/DtkGui/DFileDrag Normal file
View File

@ -0,0 +1 @@
#include "dfiledrag.h"

View File

@ -0,0 +1 @@
#include "dfiledragclient.h"

View File

@ -0,0 +1 @@
#include "dfiledragserver.h"

View File

@ -0,0 +1 @@
#include "dfontmanager.h"

1
include/DtkGui/DIcon Normal file
View File

@ -0,0 +1 @@
#include "dicon.h"

View File

@ -0,0 +1 @@
#include "dicontheme.h"

View File

@ -0,0 +1 @@
#include "dimagehandler.h"

View File

@ -0,0 +1 @@
#include "dregionmonitor.h"

View File

@ -0,0 +1 @@
#include "dsvgrenderer.h"

View File

@ -0,0 +1 @@
#include "dtaskbarcontrol.h"

View File

@ -0,0 +1 @@
#include "dthumbnailprovider.h"

View File

@ -0,0 +1,38 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef DFILEDRAG_H
#define DFILEDRAG_H
#include <dtkgui_global.h>
#include <DObject>
#include <QDrag>
#include <QUrl>
DGUI_BEGIN_NAMESPACE
class DFileDragServer;
class DFileDragPrivate;
class DFileDrag : public QDrag, public DCORE_NAMESPACE::DObject
{
Q_OBJECT
public:
explicit DFileDrag(QObject *source, DFileDragServer *server);
QUrl targetUrl();
void setMimeData(QMimeData *data);
Q_SIGNALS:
void targetUrlChanged(QUrl url);
private:
D_DECLARE_PRIVATE(DFileDrag)
};
DGUI_END_NAMESPACE
#endif // DFILEDRAG_H

View File

@ -0,0 +1,44 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef DFILEDRAGCLIENT_H
#define DFILEDRAGCLIENT_H
#include "dfiledragcommon.h"
#include <dtkgui_global.h>
#include <DObject>
#include <QObject>
class QMimeData;
DGUI_BEGIN_NAMESPACE
class DFileDragClientPrivate;
class DFileDragClient : public QObject, public DCORE_NAMESPACE::DObject
{
Q_OBJECT
public:
explicit DFileDragClient(const QMimeData *data, QObject *parent = nullptr);
int progress() const;
DFileDragState state() const;
Q_SIGNALS:
void progressChanged(int progress);
void stateChanged(DFileDragState state);
void serverDestroyed();
public:
static bool checkMimeData(const QMimeData *data);
static void setTargetData(const QMimeData *data, QString key, QVariant value);
static void setTargetUrl(const QMimeData *data, QUrl url);
private:
D_DECLARE_PRIVATE(DFileDragClient)
};
DGUI_END_NAMESPACE
#endif // DFILEDRAGCLIENT_H

View File

@ -0,0 +1,24 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef DFILEDRAGCOMMON_H
#define DFILEDRAGCOMMON_H
#include <dtkgui_global.h>
DGUI_BEGIN_NAMESPACE
enum DFileDragState
{
Failed = -1,
Stalled,
Paused,
Running,
Finished,
CustomState = 0x100
};
DGUI_END_NAMESPACE
#endif // DFILEDRAGCOMMON_H

Some files were not shown because too many files have changed in this diff Show More