DtkWidget 5.6.0.2
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
12DGUI_USE_NAMESPACE
13DWIDGET_BEGIN_NAMESPACE
14
15class D_DECL_DEPRECATED_X("Use DPaletteHelper") DApplicationHelper : public DGuiApplicationHelper
16{
17 Q_OBJECT
18
19public:
20 static DApplicationHelper *instance();
21
22 DPalette palette(const QWidget *widget, const QPalette &base = QPalette()) const;
23 void setPalette(QWidget *widget, const DPalette &palette);
24 void resetPalette(QWidget *widget);
25
26private:
29
30 bool eventFilter(QObject *watched, QEvent *event) override;
31 bool event(QEvent *event) override;
32
33 friend class _DApplicationHelper;
34};
35
36DWIDGET_END_NAMESPACE
37
38#endif // DAPPLICATIONHELPER_H
DApplicationHelper提供了一个修改的 DGuiApplicationHelper 类.
Definition: dapplicationhelper.h:16
Definition: dpalettehelper.h:18
Definition: dapplicationhelper.cpp:12