forked from linuxdeepin/dde-cooperation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcooperationstatewidget.h
101 lines (77 loc) · 2 KB
/
cooperationstatewidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef COOPERATIONSTATEWIDGET_H
#define COOPERATIONSTATEWIDGET_H
#include <QWidget>
#include "backgroundwidget.h"
#include "global_defines.h"
namespace cooperation_core {
class LineWidget;
class LookingForDeviceWidget : public QWidget
{
Q_OBJECT
public:
explicit LookingForDeviceWidget(QWidget *parent = nullptr);
void seAnimationtEnabled(bool enabled);
protected:
void paintEvent(QPaintEvent *event) override;
private:
void initUI();
CooperationLabel *iconLabel { nullptr };
QTimer *animationTimer { nullptr };
int angle { 0 };
bool isEnabled { false };
};
class NoNetworkWidget : public QWidget
{
Q_OBJECT
public:
explicit NoNetworkWidget(QWidget *parent = nullptr);
private:
void initUI();
};
class NoResultTipWidget : public QWidget
{
Q_OBJECT
public:
explicit NoResultTipWidget(QWidget *parent = nullptr, bool usetipMode = false);
void onLinkActivated(const QString &link);
void setTitleVisible(bool visible);
protected:
void paintEvent(QPaintEvent *event) override;
private:
void initUI();
CooperationLabel *titleLabel { nullptr };
bool useTipMode = false;
};
class NoResultWidget : public QWidget
{
Q_OBJECT
public:
explicit NoResultWidget(QWidget *parent = nullptr);
void mousePressEvent(QMouseEvent *event) override;
private:
void initUI();
};
class BottomLabel : public QWidget
{
Q_OBJECT
public:
explicit BottomLabel(QWidget *parent = nullptr);
void showDialog() const;
protected:
void paintEvent(QPaintEvent *) override;
bool eventFilter(QObject *obj, QEvent *event) override;
private slots:
void updateSizeMode();
private:
void initUI();
private:
CooperationAbstractDialog *dialog { nullptr };
QLabel *tipLabel { nullptr };
QLabel *ipLabel { nullptr };
QTimer *timer { nullptr };
};
} // namespace cooperation_core
#endif // COOPERATIONSTATEWIDGET_H