DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dimagebutton_p.h
1// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DIMAGEBUTTON_P_H
6#define DIMAGEBUTTON_P_H
7
8#include <DImageButton>
9
10#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
11
12#include <DObjectPrivate>
13
14DWIDGET_BEGIN_NAMESPACE
15
16class DImageButtonPrivate : public DTK_CORE_NAMESPACE::DObjectPrivate
17{
18public:
19 explicit DImageButtonPrivate(DImageButton *qq);
20 ~DImageButtonPrivate();
21
22 void updateIcon();
23 void setState(DImageButton::State state);
24 QPixmap loadPixmap(const QString &path);
25
26 DImageButton::State m_state = DImageButton::Normal;
27
28 bool m_isChecked = false;
29 bool m_isCheckable = false;
30 QString m_normalPic;
31 QString m_hoverPic;
32 QString m_pressPic;
33 QString m_checkedPic;
34 QString m_disabledPic;
35
36 D_DECLARE_PUBLIC(DImageButton)
37};
38
39DWIDGET_END_NAMESPACE
40
41#endif // DIMAGEBUTTON_P_H
42
43#endif