dde-control-center
Deepin Control Center
载入中...
搜索中...
未找到
settingshead.h
1//SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
2//
3//SPDX-License-Identifier: GPL-3.0-or-later
4#pragma once
5
6#include "interface/namespace.h"
7#include "widgets/settingsitem.h"
8
9#include <dtkwidget_global.h>
10
11DWIDGET_BEGIN_NAMESPACE
12class DCommandLinkButton;
13DWIDGET_END_NAMESPACE
14
15namespace DCC_NAMESPACE {
16
17class TitleLabel;
19{
20 Q_OBJECT
21
22public:
23 enum State {
24 Edit,
25 Cancel
26 };
27
28public:
29 explicit SettingsHead(QFrame *parent = nullptr);
30
31 void setTitle(const QString &title);
32 void setEditEnable(bool state = true);
33
34public Q_SLOTS:
35 void toEdit();
36 void toCancel();
37
38Q_SIGNALS:
39 void editChanged(bool edit);
40
41private Q_SLOTS:
42 void refershButton();
43 void onClicked();
44
45private:
46 TitleLabel *m_title;
47 DTK_WIDGET_NAMESPACE::DCommandLinkButton *m_edit;
48
49 State m_state;
50};
51
52}
Definition settingshead.h:19
Definition settingsitem.h:11
Definition titlelabel.h:13