DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dapplicationhelper.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DAPPLICATIONHELPER_H
6#define DAPPLICATIONHELPER_H
7
8#include <dtkwidget_global.h>
9#include <DGuiApplicationHelper>
10#include <DPalette>
11
12#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
13
14DWIDGET_BEGIN_NAMESPACE
15
16DGUI_USE_NAMESPACE
17
18class D_DECL_DEPRECATED_X("Use DPaletteHelper") DApplicationHelper : public DGuiApplicationHelper
19{
20 Q_OBJECT
21
22public:
23 static DApplicationHelper *instance();
24
25 DPalette palette(const QWidget *widget, const QPalette &base = QPalette()) const;
26 void setPalette(QWidget *widget, const DPalette &palette);
27 void resetPalette(QWidget *widget);
28
29private:
32
33 bool eventFilter(QObject *watched, QEvent *event) override;
34 bool event(QEvent *event) override;
35
36 friend class _DApplicationHelper;
37};
38
39DWIDGET_END_NAMESPACE
40
41#endif // DAPPLICATIONHELPER_H
42
43#endif
DApplicationHelper 提供了一个修改的 DGuiApplicationHelper 类.