QtCanpool 3.3.0
载入中...
搜索中...
未找到
QxApp::QxToastPrivate类 参考

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 行定义.

构造及析构函数说明

◆ QxToastPrivate()

QxApp::QxToastPrivate::QxToastPrivate ( )
default

成员函数说明

◆ applyLevel()

void QxApp::QxToastPrivate::applyLevel ( )

Applies the level to the icon and to the text colour.

在文件 qxtoast.cpp 第 127 行定义.

◆ finishDismiss()

void QxApp::QxToastPrivate::finishDismiss ( )

Hides the widget and tells the owner it may delete it.

在文件 qxtoast.cpp 第 215 行定义.

◆ init()

void QxApp::QxToastPrivate::init ( )

在文件 qxtoast.cpp 第 86 行定义.

◆ outerHeightFor()

int QxApp::QxToastPrivate::outerHeightFor ( int  outerWidth) const

Height of the whole widget when it is outerWidth wide.

在文件 qxtoast.cpp 第 172 行定义.

◆ placeChildren()

void QxApp::QxToastPrivate::placeChildren ( )

Places the icon and the label inside the current geometry.

在文件 qxtoast.cpp 第 178 行定义.

◆ plateWidth()

int QxApp::QxToastPrivate::plateWidth ( int  outerWidth) const

Width of the plate for a widget outerWidth wide, clamped to the limits.

在文件 qxtoast.cpp 第 159 行定义.

◆ startFade()

void QxApp::QxToastPrivate::startFade ( qreal  to,
bool  dismissWhenFaded 
)

Fades the opacity to to; dismissWhenFaded finishes the dismissal.

在文件 qxtoast.cpp 第 192 行定义.

◆ textWidthFor()

int QxApp::QxToastPrivate::textWidthFor ( int  plateWidth)
static

Width left for the text on a plate plateWidth pixels wide.

在文件 qxtoast.cpp 第 167 行定义.

类成员变量说明

◆ m_dismissing

bool QxApp::QxToastPrivate::m_dismissing = false

在文件 qxtoast_p.h 第 58 行定义.

◆ m_dismissWhenFaded

bool QxApp::QxToastPrivate::m_dismissWhenFaded = false

在文件 qxtoast_p.h 第 60 行定义.

◆ m_effect

QGraphicsOpacityEffect* QxApp::QxToastPrivate::m_effect = 0

在文件 qxtoast_p.h 第 64 行定义.

◆ m_fade

QPropertyAnimation* QxApp::QxToastPrivate::m_fade = 0

在文件 qxtoast_p.h 第 65 行定义.

◆ m_fadeDuration

int QxApp::QxToastPrivate::m_fadeDuration = QxToast::DefaultFadeDuration

在文件 qxtoast_p.h 第 55 行定义.

◆ m_icon

QLabel* QxApp::QxToastPrivate::m_icon = 0

在文件 qxtoast_p.h 第 61 行定义.

◆ m_label

QLabel* QxApp::QxToastPrivate::m_label = 0

在文件 qxtoast_p.h 第 62 行定义.

◆ m_level

QxToast::Level QxApp::QxToastPrivate::m_level = QxToast::Information

在文件 qxtoast_p.h 第 53 行定义.

◆ m_paused

bool QxApp::QxToastPrivate::m_paused = false

在文件 qxtoast_p.h 第 59 行定义.

◆ m_remaining

int QxApp::QxToastPrivate::m_remaining = 0

Milliseconds left on the countdown while the pointer holds it back.

在文件 qxtoast_p.h 第 57 行定义.

◆ m_text

QString QxApp::QxToastPrivate::m_text

在文件 qxtoast_p.h 第 52 行定义.

◆ m_timeout

int QxApp::QxToastPrivate::m_timeout = QxToast::DefaultTimeout

在文件 qxtoast_p.h 第 54 行定义.

◆ m_timer

QTimer* QxApp::QxToastPrivate::m_timer = 0

在文件 qxtoast_p.h 第 63 行定义.


该类的文档由以下文件生成: