Commit Graph

52 Commits

Author SHA1 Message Date
yeshanshan bd6a9cdb28 fix: resolve various compilation warnings
1. Fixed unused parameter warnings by removing parameter names in lambda
captures
2. Added Qt version check for deprecated AA_UseHighDpiPixmaps attribute
3. Fixed documentation comment syntax in DFontComboBox
4. Added nullptr check for QGuiApplication::inputMethod()
5. Added parent parameter in DPrintPreviewWidget constructor
6. Fixed pixel metric switch case with static cast
7. Updated meta type registration for Qt6 compatibility
8. Removed unused variable casts in test cases
9. Added Qt version check for QContextMenuEvent constructor

Influence:
1. Verify UI elements still render correctly after DPI attribute changes
2. Test input method behavior on tablet devices
3. Check print preview functionality
4. Validate combo box and text edit test cases still pass
5. Confirm no new warnings appear during compilation

fix: 修复各种编译警告

1. 在lambda捕获中移除未使用的参数名以消除警告
2. 添加Qt版本检查处理废弃的AA_UseHighDpiPixmaps属性
3. 修复DFontComboBox中的文档注释语法
4. 为QGuiApplication::inputMethod()添加nullptr检查
5. 在DPrintPreviewWidget构造函数中添加父控件参数
6. 使用静态转换修复像素度量switch case
7. 更新元类型注册以兼容Qt6
8. 移除测试用例中未使用的变量转换
9. 为QContextMenuEvent构造函数添加Qt版本检查

Influence:
1. 验证DPI属性变更后UI元素仍能正确渲染
2. 测试平板设备上的输入法行为
3. 检查打印预览功能
4. 确保组合框和文本编辑测试用例仍能通过
5. 确认编译时不再出现新的警告
2025-08-14 11:39:42 +00:00
yeshanshan 32d0f1ee53 fix: resolve Qt6 compatibility issues
1. Replace deprecated qAsConst with std::as_const for Qt6 compatibility
2. Update key sequence handling to use | operator instead of + for Qt6
3. Fix touch event handling for Qt6 API changes
4. Replace stateChanged with checkStateChanged for Qt6 checkbox signals
5. Add version checks for Qt6-specific API changes
6. Fix various other Qt6 deprecation warnings

These changes ensure the codebase works correctly with both Qt5 and
Qt6, addressing API changes and deprecations in Qt6 while maintaining
backward compatibility. Key technical changes include:
- Using Qt version checks for API differences
- Standardizing on newer APIs where possible
- Maintaining compatibility with both major Qt versions

fix: 解决Qt6兼容性问题

1. 使用std::as_const替代已弃用的qAsConst以兼容Qt6
2. 更新键序列处理,在Qt6中使用|运算符而非+
3. 修复Qt6中触摸事件处理的API变更
4. 将stateChanged替换为checkStateChanged以适配Qt6复选框信号
5. 添加Qt6特定API变更的版本检查
6. 修复其他Qt6弃用警告

这些修改确保代码库能正确工作在Qt5和Qt6环境下,解决了Qt6中的API变更和弃用
问题,同时保持向后兼容性。关键技术变更包括:
- 针对API差异使用Qt版本检查
- 尽可能标准化使用新API
- 保持对两个主要Qt版本的兼容性
2025-07-28 16:05:40 +08:00
ck cda1bbbbcc fix: webengineView abnormal in DMainWindow
`DPlatformWindowHandle::setWindowSurfaceType(QWindow::OpenGLSurface)`
needs to be called before constructing DMainWindow when use
webengineview
2024-12-09 15:46:52 +08:00
zhangkun 5b338f0cbc fix: some windows have dual title bars
- 使用windowhandle的close()去关闭窗口
- DDialog和DMainWindow适配Treeland

pms: BUG-286173
2024-11-28 12:02:27 +08:00
覃本学 9d77c29c2c feat: 动效增加开关
动效增加开关,通过DGuiApplication::testAttribute(DGuiApplication::HasAnimations)接口和环境变量DTK_DISABLE_ANIMATION_***控制动效总开关和单个动效开关

Log: 动效增加开关
2024-10-25 09:39:27 +00:00
wangfei 87fd9f385a fix: wrong status of switch button
correct the wrong initial status of switch button

Bug: https://pms.uniontech.com/bug-view-276221.html
Log:
2024-10-10 02:47:53 +00:00
wangfei 1d8279345e Revert "chore: 使用dci icon重绘toolbutton, 增加动画 (#594)"
This reverts commit 4e5c37c017.
2024-09-26 15:56:05 +08:00
Whale107 6cfb9aba46 chore: 增加应用内通知动画 (#592)
增加应用内通知动画

Log:
2024-09-23 06:50:04 +00:00
Whale107 4e5c37c017 chore: 使用dci icon重绘toolbutton, 增加动画 (#594)
使用dci icon重绘toolbutton, 增加动画

Log:
2024-09-23 06:50:04 +00:00
Whale107 bc3a6eaa3b chore: 增加ButtonBox hover 和切换动画 (#595)
增加ButtonBox hover 和切换动画

Log:
2024-09-23 06:50:04 +00:00
Whale107 78fccaa520 chore: 增加滚动区域滚轮滚动到顶部或底部的回弹效果 (#596)
增加滚动区域滚轮滚动到顶部或底部的回弹效果

Log:
2024-09-23 06:50:04 +00:00
Whale107 8ec72aeef9 chore: 新增进度条动效和一个新进度条类 (#589)
新增进度条动效和一个新进度条类

Log:
2024-09-23 06:50:04 +00:00
ssk-wh 12bdf18b15 fix: fix the problem of text position in dstyleditemdelegate
as title

log: as title
issue: https://github.com/linuxdeepin/developer-center/issues/7673
2024-04-09 10:38:24 +08:00
覃本学 881ff56727 chore: 调整标题栏“更多/最小化/最大化/关闭按钮”的图标为最新1070图标样式
调整标题栏“更多/最小化/最大化/关闭按钮”的图标为最新1070图标样式

Log: 调整标题栏“更多/最小化/最大化/关闭按钮”的图标为最新1070图标样式
Task: https://pms.uniontech.com/task-view-331465.html
Influence: 窗口标题栏 更多/最小化/最大化/关闭按钮
2024-03-20 16:51:32 +08:00
chenhongtao 894d840e41 chore: remove unused headers in header
Log:
2024-01-10 10:04:34 +08:00
ck 13505358b6 feat: move ddesktopservices to dtkgui
move ddesktopservices from dtkwidget to dtkgui

Issue: linuxdeepin/dtk#134
2023-11-28 13:40:36 +08:00
ck 42e319184c feat: styleHint tweak
SH_UnderlineShortcut
Whether shortcuts are underlined.

SH_Menu_KeyboardSearch
Whether disable the typing to search for menu items
2023-10-25 14:00:57 +08:00
Felix Yan 3a2f266613 chore: correct typos about action slots
Log:
2023-10-02 12:15:14 +08:00
ck f3d1a4423b feat: DFontSizeManager tweak
- add T11 (default 8 px)
- T5 17px ==> 16px

Issue: https://github.com/linuxdeepin/dtk/issues/116
2023-09-05 10:56:41 +08:00
xzl 290e075c63 chore: remove useless files
Log:
2023-07-29 21:58:21 +08:00
wangyixue 63cb178bc7 chore: deprecate dhidpihelper
DHiDPIHelper has nothing to do with dtkwidget. Move the only function
loadNxPixmap to Dtk::Gui::DIcon. Deprecate the implementation in
dtkwidget.

Log: deprecate dhidpihelper
2023-07-27 13:47:42 +08:00
xzl 75ad5f10cb fix: fix memory leak in danchors.cpp
Log:
2023-07-18 15:34:35 +08:00
heyuming eb5e0f0a11 refactor!: deprecate some interfaces in dtk6
Log: 在dtk6中废弃一些接口
2023-07-04 18:26:14 +08:00
heyuming 637e3eb52a feat(lib): support Qt6
Log:适配Qt6
2023-06-19 13:15:20 +08:00
wangfei bb7bb1db80 chore: Add properties about license in dapplication interface
add properties about license feature in dapplication interface.

Log: Add properties about license
2023-05-17 16:42:01 +08:00
wangfei f585d1f9df feat: add license dialog widget
add dlicensedialog interface and function.

Log: add license dialog widget
2023-05-10 09:07:01 +08:00
wangfei dcb6217d4b fix: adjust floatbutton's size in compact mode
In compact mode, add the margins to sizehint.

Log: modify floatbutton's content size to 36*36
Issue: https://github.com/linuxdeepin/dtk/issues/36
2023-05-05 11:13:02 +08:00
YeShanShan 7692c1572e feat: Deprecate DApplicationSettings
The feature has been moved to DGuiApplicationHelper in the
commit 19492cbfb71954a4939028b37ce66981d34e324e
2023-04-24 13:58:34 +08:00
wangfei 47c5b4576f Revert "fix: icon size is abnormal when dpi > 1"
This reverts commit de8d8f9920.
2023-04-20 16:30:09 +08:00
wangfei de8d8f9920 fix: icon size is abnormal when dpi > 1
ButtonIconSize does't multiply ratio in dstyle, which lead to
both pixmap size and rect size disagree.

Log: modify ButtonIconSize's default value
Issue: https://github.com/linuxdeepin/dtkwidget/issues/390
2023-04-07 10:09:02 +08:00
ssk-wh 92573ab37e feat: 增加覆盖指定界面的水印类DWaterMarkHelper
可通过DWaterMarkHelper的接口设置水印样式,并通过registerWidget添加水印

Log:
Influence: 无
Task: https://pms.uniontech.com/task-view-243575.html
Change-Id: I84cf4d3fb0eb17deb0ab9c2e7b154bf884167a0b
2023-04-03 10:10:47 +08:00
wang fei 9d03dc792a chore: Remove redundant code about acknowledgement in daboutdialog
1. add obsolete interfaces about acknowledgement
2. remove redundant code about acknowledgement

Log: remove redundant code about acknowledgement in daboutdialog
2023-03-13 09:45:52 +08:00
renbin cbd8237ed9 chore: DPrintPreviewDialog add update setting interface.
Add interface updateDialogSettingInfo, apps can update print dialog
settings at construction time.
Add docs and UT, fix a bug that may cause a memory leak.

Log: DPrintPreviewDialog add update setting interface.
Influence: Add update setting interface.
2023-03-10 09:27:36 +00:00
Ye ShanShan e8338437eb fix: DStyleOptionButton's incompatible
This is a supplement for 9b6e608005
It's default assignment constructor will call buillt
dtkwidget's  `dciIcon` conftructor, but `dciIcon` object is a
unassignment space, it causes app crashed.
2023-02-22 14:07:43 +08:00
wang fei bd8c3e1042 chore: rename sidebarVisble to sidebarVisible
obsolete old interface sidebarVisible due to spelling mistake

Log: rename sidebarVisble to sidebarVisible
Influence: sidebar
Change-Id: I7c932f4fc8f43db2271d3562d446b4f663e11ad4
2023-02-17 01:56:39 +00:00
wang fei f92823736a fix: the entrance of feature display is visible when no item is added
when no feature item is added, hide the entrance in about daboutdialog

Log: fix the issue about feature dialog has no content
Influence: feature display
Change-Id: Id13ce0b84ede3d084f219cfbd35e1d2a94e3b4bc
2023-02-10 17:11:21 +08:00
wangyixue d6b55d4121 refactor(cmake): improve cmake and add new feature
* remove redundant "dtkwidget" in include directory;
 * improve cmake, modify some variable names, use file() to collect
 source files for scalability;
 * add full target_link_libraries support.

Log: add full target_link_libraries support
Influence: all projects who include headers directly by path
2023-01-18 11:22:46 +08:00
ck 0386852043 feat: 自定义工具栏
1. 显示自定义工具栏;
2. 工具栏上调整控件位置;
3. 工具栏上添加和移除控件;
4. 恢复默认工具栏控件;
5. 工具栏生效。

Log: 添加自定义工具栏功能
Influence: none

Change-Id: Icb1d12d4c8881ace309e9b5cd5508bbca965c5fc
2023-01-17 16:47:22 +08:00
wang fei 217cfc5514 feat: 增加特性展示功能
1. 增加特性对话框类接口;
2. dapplication增加特性对话框相关接口;
3. 重新布局关于对话框;

Log: 新增特性介绍功能
Task: https://pms.uniontech.com/task-view-227391.html
Influence: 特性介绍,关于介绍
Change-Id: Ie6244bd313bb385846f4c5c066108b65f5afcb4f
2023-01-13 02:01:37 +00:00
Ye ShanShan fe89639b37 feat: Add compact support for some widgets
Modify dstyle's value when switch SizeMode;
  Add compact support for dialog, listview and other base widget.

Log: 支持基本控件的紧凑模式切换
Task: https://pms.uniontech.com/task-view-227385.html
Influence: none
Change-Id: I8f83d1fddd723a51bd01561c3723a9c352e9d852
2023-01-11 12:19:42 +08:00
Ye ShanShan d9a63823d1 feat: Add TightMode support for TitleBar
Send StyleChange event for all widget when
received sizemode changed.
  Add SizeModeHelper for common function.
  Modify radius, Shadow of MainWindow.

Log: 支持紧凑模式切换
Task: https://pms.uniontech.com/task-view-227385.html
Influence: none
Change-Id: I3cb83d22db1b3b058ed34443263d8321af09281d
2023-01-10 11:12:17 +08:00
wangyixue 097b17d599 feat: add ToolTip support
Add ToolTip support for DListView and DLabel

Task: https://pms.uniontech.com/task-view-227383.html
Log: add ToolTip support
2023-01-05 13:13:04 +08:00
wangyixue 5648360acc fix: correct default constructor for DStyleHelper
Modify default value for m_style of DStyleHelper from nullptr to
QApplication::style in case we have a stack overflow.

Log: correct default constructor for DStyleHelper
2023-01-03 16:39:10 +08:00
renbin 30225aa55c feat: Add DImageViewer crop image function.
Add DImageViewer crop image function, DGraphicsCropItem class.
Add crop image unit test cases, update dox file comments.

Log: Add DImageViewer crop image function.
2022-12-08 14:08:41 +08:00
wang fei e60b44d898 feat: 侧边栏功能
按钮控制侧边栏展开和收缩

Log: 添加侧边栏功能
Influence: 侧边栏和标题栏
Change-Id: I39790200db1606a6513a99a47ecaab17c2f171ee
2022-12-07 09:59:56 +08:00
renbin b96acedda2 feat: Implements DImageViewer rotate, scale and gesture.
Implements the DImageViewer interface, including rotate, scale, gesture.
Add unit test cases and interface comment.

Log: Implements DImageViewer rotate, scale and gesture.
2022-12-02 05:43:40 +00:00
renbin a880020d62 feat: Implements DImageViewer set image and clear.
Implements the DImageViewer interface, including set image and clear.
And implements the DGraphicsitem classes, add unit test cases, update comment.

Log: Implements DImageViewer set image and clear.
2022-12-02 05:43:40 +00:00
xzl 4df9612c9f docs: update dabstractdialog docs
更新dabstractdialog文档

Log:
Task: https://pms.uniontech.com/task-view-216407.html
2022-11-30 00:45:10 -06:00
renbin 347724293d feat: Change DImageViewer widget and image handler.
DImageViewer just show images, the image file handler will be moved to DtkGui.

Log: Change DImageViewer widget and image handler.
2022-11-22 09:45:15 +00:00
renbin 9dde038f09 feat: Add DImageViewer interface and interface documents.
Add DImageViewer interface and interface documents.

Log: Add DImageViewer interface and interface documents.
2022-11-22 09:45:15 +00:00