feat: mandatory watermark required for security level 4#673
feat: mandatory watermark required for security level 4#673luojiahao11 wants to merge 1 commit intolinuxdeepin:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: luojiahao11 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
CLA Assistant Lite bot: |
|
Hi @luojiahao11. Thanks for your PR. 😃 |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#673
|
Hi @luojiahao11. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| public: | ||
| BaseWatermarkItem(QGraphicsItem *parent = nullptr) : QGraphicsItem(parent) { | ||
| m_font.setFamily("SourceHanSansSC"); | ||
| m_font.setPointSize(12); |
There was a problem hiding this comment.
这里的字体需要跟随系统么,颜色需要适配暗亮色主题么?
| }; | ||
|
|
||
| // 基底水印图元类 | ||
| class BaseWatermarkItem : public QGraphicsItem |
There was a problem hiding this comment.
能共用WaterMark这个类来实现默认水印么?
src/widgets/dprintpreviewwidget.cpp
Outdated
| QString userId = getUserId(); | ||
| QPair<int,int> securityLabel = getUserSecurityLabel(); | ||
| QString timeStr = QDateTime::currentDateTime().toString(DATE_TIME_FORMAT); | ||
| QString waterMarkText = QString("时间: %1\n" |
src/widgets/dprintpreviewwidget.cpp
Outdated
| QString userName = getUserName(); | ||
| QString userId = getUserId(); | ||
| QPair<int,int> securityLabel = getUserSecurityLabel(); | ||
| QString timeStr = QDateTime::currentDateTime().toString(DATE_TIME_FORMAT); |
src/widgets/dprintpreviewwidget.cpp
Outdated
|
|
||
| bool ok = false; | ||
| quint32 hexValue = 0; | ||
| if (!hexString.isEmpty() && hexString.startsWith("0x")) { |
There was a problem hiding this comment.
qt中的字符串转数字,应该能够识别0x,自动转为16进制的值,
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#673
src/widgets/dprintpreviewwidget.cpp
Outdated
| return d_ptr->previewPages(); | ||
| } | ||
|
|
||
| void WaterMark::setBaseWatermark() |
There was a problem hiding this comment.
是不是可以不在watermark里添加这个方法么,它只是text类型的水印而已,业务逻辑可以放在设置的地方,
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#673
add mandatory watermark about user info, time and user usec_smodel label feat: 等保4级要求必须存在包含用户信息,时间和用户安全标签的水印
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#673
| #include <cups/ppd.h> | ||
|
|
||
| #include <pwd.h> | ||
| #include <selinux/selinux.h> |
There was a problem hiding this comment.
这个加个debian/control的依赖,
|
TAG Bot New tag: 5.7.20 |
|
TAG Bot New tag: 5.7.21 |
|
TAG Bot New tag: 5.7.22 |
|
问题太久没处理,先关闭, |
add mandatory watermark about user info, time and user usec_smodel label
feat: 等保4级要求必须存在包含用户信息,时间和用户安全标签的水印