|
QtCanpool 3.3.0
|
The state behind QxToast: the message, the level, the clock and the two animations. 更多...
#include <qxapp/qxtoast_p.h>
Public 成员函数 | |
| QxToastPrivate () | |
| void | init () |
| void | applyLevel () |
| Applies the level to the icon and to the text colour. | |
| void | placeChildren () |
| Places the icon and the label inside the current geometry. | |
| void | startFade (qreal to, bool dismissWhenFaded) |
| Fades the opacity to to; dismissWhenFaded finishes the dismissal. | |
| void | finishDismiss () |
| Hides the widget and tells the owner it may delete it. | |
| int | plateWidth (int outerWidth) const |
| Width of the plate for a widget outerWidth wide, clamped to the limits. | |
| int | outerHeightFor (int outerWidth) const |
| Height of the whole widget when it is outerWidth wide. | |
静态 Public 成员函数 | |
| static int | textWidthFor (int plateWidth) |
| Width left for the text on a plate plateWidth pixels wide. | |
Public 属性 | |
| QString | m_text |
| QxToast::Level | m_level = QxToast::Information |
| int | m_timeout = QxToast::DefaultTimeout |
| int | m_fadeDuration = QxToast::DefaultFadeDuration |
| int | m_remaining = 0 |
| Milliseconds left on the countdown while the pointer holds it back. | |
| bool | m_dismissing = false |
| bool | m_paused = false |
| bool | m_dismissWhenFaded = false |
| QLabel * | m_icon = 0 |
| QLabel * | m_label = 0 |
| QTimer * | m_timer = 0 |
| QGraphicsOpacityEffect * | m_effect = 0 |
| QPropertyAnimation * | m_fade = 0 |
The state behind QxToast: the message, the level, the clock and the two animations.
The toast keeps no layout on purpose. Its plate has a width the manager decides - a column of toasts of the same width reads as one column - and a height that only the wrapped text can tell, so the geometry is computed from the text metrics instead of being negotiated with a QLayout. That also makes heightForWidth() cheap enough to call while placing a stack.
在文件 qxtoast_p.h 第 29 行定义.
|
default |
| void QxApp::QxToastPrivate::applyLevel | ( | ) |
Applies the level to the icon and to the text colour.
在文件 qxtoast.cpp 第 127 行定义.
| void QxApp::QxToastPrivate::finishDismiss | ( | ) |
Hides the widget and tells the owner it may delete it.
在文件 qxtoast.cpp 第 215 行定义.
| void QxApp::QxToastPrivate::init | ( | ) |
在文件 qxtoast.cpp 第 86 行定义.
| int QxApp::QxToastPrivate::outerHeightFor | ( | int | outerWidth | ) | const |
Height of the whole widget when it is outerWidth wide.
在文件 qxtoast.cpp 第 172 行定义.
| void QxApp::QxToastPrivate::placeChildren | ( | ) |
Places the icon and the label inside the current geometry.
在文件 qxtoast.cpp 第 178 行定义.
| int QxApp::QxToastPrivate::plateWidth | ( | int | outerWidth | ) | const |
Width of the plate for a widget outerWidth wide, clamped to the limits.
在文件 qxtoast.cpp 第 159 行定义.
| void QxApp::QxToastPrivate::startFade | ( | qreal | to, |
| bool | dismissWhenFaded | ||
| ) |
Fades the opacity to to; dismissWhenFaded finishes the dismissal.
在文件 qxtoast.cpp 第 192 行定义.
|
static |
Width left for the text on a plate plateWidth pixels wide.
在文件 qxtoast.cpp 第 167 行定义.
| bool QxApp::QxToastPrivate::m_dismissing = false |
在文件 qxtoast_p.h 第 58 行定义.
| bool QxApp::QxToastPrivate::m_dismissWhenFaded = false |
在文件 qxtoast_p.h 第 60 行定义.
| QGraphicsOpacityEffect* QxApp::QxToastPrivate::m_effect = 0 |
在文件 qxtoast_p.h 第 64 行定义.
| QPropertyAnimation* QxApp::QxToastPrivate::m_fade = 0 |
在文件 qxtoast_p.h 第 65 行定义.
| int QxApp::QxToastPrivate::m_fadeDuration = QxToast::DefaultFadeDuration |
在文件 qxtoast_p.h 第 55 行定义.
| QLabel* QxApp::QxToastPrivate::m_icon = 0 |
在文件 qxtoast_p.h 第 61 行定义.
| QLabel* QxApp::QxToastPrivate::m_label = 0 |
在文件 qxtoast_p.h 第 62 行定义.
| QxToast::Level QxApp::QxToastPrivate::m_level = QxToast::Information |
在文件 qxtoast_p.h 第 53 行定义.
| bool QxApp::QxToastPrivate::m_paused = false |
在文件 qxtoast_p.h 第 59 行定义.
| int QxApp::QxToastPrivate::m_remaining = 0 |
Milliseconds left on the countdown while the pointer holds it back.
在文件 qxtoast_p.h 第 57 行定义.
| QString QxApp::QxToastPrivate::m_text |
在文件 qxtoast_p.h 第 52 行定义.
| int QxApp::QxToastPrivate::m_timeout = QxToast::DefaultTimeout |
在文件 qxtoast_p.h 第 54 行定义.
| QTimer* QxApp::QxToastPrivate::m_timer = 0 |
在文件 qxtoast_p.h 第 63 行定义.