DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dwaterprogress.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DWATERPROGRESS_H
6#define DWATERPROGRESS_H
7
8#include <dtkwidget_global.h>
9#include <DObject>
10
11#include <QScopedPointer>
12#include <QWidget>
13
14DWIDGET_BEGIN_NAMESPACE
15
17class LIBDTKWIDGETSHARED_EXPORT DWaterProgress : public QWidget, public DTK_CORE_NAMESPACE::DObject
18{
19 Q_OBJECT
20
21 Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
22public:
23 explicit DWaterProgress(QWidget *parent = 0);
25
26 int value() const;
27
28Q_SIGNALS:
29 void valueChanged();
30
31public Q_SLOTS:
32 void start();
33 void stop();
34 void setValue(int value);
35 void setTextVisible(bool visible);
36
37protected:
38 void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
39 void changeEvent(QEvent *e) override;
40
41private:
42 D_DECLARE_PRIVATE(DWaterProgress)
43};
44
45DWIDGET_END_NAMESPACE
46
47#endif // DWATERPROGRESS_H
Definition dwaterprogress.cpp:36
可以使用 DWaterProgress 类快速创建圆形容器内水位高低指示进度的动画控件.并提供了可选的是否显示进度文字的选项。
Definition dwaterprogress.h:18