DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dexpandgroup.h
1// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef EXPANDGROUP_H
6#define EXPANDGROUP_H
7
8#include <QObject>
9#include <QList>
10#include <QMap>
11
12#include <dtkwidget_global.h>
13#include <dbaseexpand.h>
14
15#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
16
17DWIDGET_BEGIN_NAMESPACE
18
19class LIBDTKWIDGETSHARED_EXPORT D_DECL_DEPRECATED_X("Use DDrawerGroup") DExpandGroup : public QObject
20{
21 Q_OBJECT
22public:
23 explicit DExpandGroup(QObject *parent = 0);
24
25 QList<DBaseExpand *> expands() const;
26 DBaseExpand * checkedExpand() const;
27 DBaseExpand * expand(int id) const;
28 void addExpand(DBaseExpand *expand, int id = -1);
29 void setId(DBaseExpand *expand, int id);
30 void removeExpand(DBaseExpand *expand);
31 int checkedId() const;
32 int id(DBaseExpand *expand) const;
33
34private:
35 void onExpandChanged(bool v);
36
37private:
38 QMap<int, DBaseExpand *> m_expandMap;
39 QMap<int, DBaseExpand *> m_checkedMap;
40};
41
42DWIDGET_END_NAMESPACE
43
44#endif // EXPANDGROUP_H
45
46#endif
一个美观的可展开的控件.