DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
daccessibilitychecker.h
1// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DACCESSIBILITYCHECKER_H
6#define DACCESSIBILITYCHECKER_H
7
8#include "dtkwidget_global.h"
9
10#include <DObject>
11
12DWIDGET_BEGIN_NAMESPACE
13
14class DAccessibilityCheckerPrivate;
15class LIBDTKWIDGETSHARED_EXPORT DAccessibilityChecker : public QObject, public DCORE_NAMESPACE::DObject
16{
17 Q_OBJECT
18 D_DECLARE_PRIVATE(DAccessibilityChecker)
19 Q_PROPERTY(OutputFormat outputFormat READ outputFormat WRITE setOutputFormat)
20
21public:
23 AssertFormat,
24 FullFormat
25 };
26
27 enum Role {
28 Widget,
29 ViewItem
30 };
31
32 explicit DAccessibilityChecker(QObject *parent = nullptr);
33
34 void setOutputFormat(OutputFormat format);
35 OutputFormat outputFormat() const;
36
37 bool check();
38 void start(int msec = 3000);
39
40protected:
41 virtual bool isIgnore(Role role, const QWidget *w);
42
43private:
44 D_PRIVATE_SLOT(void _q_checkTimeout())
45};
46
47DWIDGET_END_NAMESPACE
48#endif // DACCESSIBILITYCHECKER_H
该类用于检测自动化标记是否存在.
Definition daccessibilitychecker.h:16
OutputFormat
日志格式枚举.
Definition daccessibilitychecker.h:22
Role
检测的角色.
Definition daccessibilitychecker.h:27