DtkWidget 5.6.0.2
DTK Widget module
|
DArrowRectangle 提供了可以在四个边中的任意一个边显示箭头的矩形控件. 更多...
Public 类型 | |
enum | ArrowDirection { ArrowLeft , ArrowRight , ArrowTop , ArrowBottom } |
enum | FloatMode { FloatWindow , FloatWidget } |
信号 | |
void | windowDeactivate () const |
Public 成员函数 | |
DArrowRectangle (ArrowDirection direction, QWidget *parent=nullptr) | |
DArrowRectangle::DArrowRectangle constructs an instance of DArrowRectangle. 更多... | |
DArrowRectangle (ArrowDirection direction, FloatMode floatMode, QWidget *parent=nullptr) | |
获取 DArrowRectangle 实例,并指定浮动模式. 更多... | |
int | radius () const |
bool | radiusForceEnabled () const |
是否强制(忽略特效)开启圆角 更多... | |
int | arrowHeight () const |
int | arrowWidth () const |
int | arrowX () const |
int | arrowY () const |
int | margin () const |
int | borderWidth () const |
QColor | borderColor () const |
QColor | backgroundColor () const |
ArrowDirection | arrowDirection () const |
void | setRadius (int value) |
该函数用于设置圆角大小. 更多... | |
void | setRadiusForceEnable (bool enable) |
DArrowRectangle::setRadiusForceEnable 设置圆角样式. 更多... | |
void | setArrowHeight (int value) |
设置箭头高度. 更多... | |
void | setArrowWidth (int value) |
设置箭头宽度. 更多... | |
void | setArrowX (int value) |
设置箭头 x 坐标的值. 更多... | |
void | setArrowY (int value) |
设置箭头 y 坐标的值. 更多... | |
void | setMargin (int value) |
设置边距大小. 更多... | |
void | setBorderWidth (int borderWidth) |
void | setBorderColor (const QColor &borderColor) |
void | setBackgroundColor (const QColor &backgroundColor) |
void | setBackgroundColor (DBlurEffectWidget::MaskColorType type) |
DArrowRectangle::setBackgroundColor is an overloaded function. 更多... | |
void | setArrowDirection (ArrowDirection value) |
该函数用于设置箭头方向. 更多... | |
void | setWidth (int value) |
该函数用于设置整个控件固定的宽度 更多... | |
void | setHeight (int value) |
设置整个控件固定的高度 更多... | |
virtual void | show (int x, int y) |
在指定的坐标位置显示本控件; 更多... | |
void | setContent (QWidget *content) |
DArrowRectangle::setContent sets the content of the arrow rectangle. 更多... | |
QWidget * | getContent () const |
获取内容控件. 更多... | |
void | resizeWithContent () |
根据内容控件的大小自动设置矩形控件的大小. 更多... | |
void | move (int x, int y) |
移动到指定的坐标位置. 更多... | |
QSize | getFixedSize () |
获取整个矩形控件的大小. 更多... | |
qreal | shadowXOffset () const |
qreal | shadowYOffset () const |
qreal | shadowBlurRadius () const |
void | setShadowBlurRadius (const qreal &shadowBlurRadius) |
void | setShadowXOffset (const qreal &shadowXOffset) |
void | setShadowYOffset (const qreal &shadowYOffset) |
void | setLeftRightRadius (bool enable) |
DArrowRectangle::setLeftRightRadius 设置左右箭头时的圆角. 更多... | |
void | setRadiusArrowStyleEnable (bool enable) |
DArrowRectangle::setArrowStyleEnable 设置圆角箭头样式. 更多... | |
Protected 成员函数 | |
void | paintEvent (QPaintEvent *) Q_DECL_OVERRIDE |
void | resizeEvent (QResizeEvent *e) Q_DECL_OVERRIDE |
bool | event (QEvent *e) Q_DECL_OVERRIDE |
属性 | |
QColor | backgroundColor |
这个属性表示矩形控件的背景颜色 更多... | |
QColor | borderColor |
这个属性表示控件边框的颜色 更多... | |
int | borderWidth |
这个属性表示控件边框的宽度 更多... | |
int | radius |
这个属性表示矩形的圆角 更多... | |
int | arrowWidth |
这个属性表示箭头的宽度 更多... | |
int | arrowHeight |
height of rectangle's arrow 更多... | |
int | arrowX |
the x coordinate of the rectangle's arrow 更多... | |
int | arrowY |
这个属性表示箭头的y轴坐标 更多... | |
int | margin |
这个属性表示边距大小 更多... | |
ArrowDirection | arrowDirection |
This property holds the direction of the rectangle's arrow points to. 更多... | |
qreal | shadowXOffset |
这属性表示小部件及其阴影在x轴上的偏移量 更多... | |
qreal | shadowYOffset |
这属性表示小部件及其阴影在y轴上的偏移量. 更多... | |
qreal | shadowBlurRadius |
这个属性保存小部件阴影的模糊半径 更多... | |
DArrowRectangle 提供了可以在四个边中的任意一个边显示箭头的矩形控件.
\inmodule dtkwidget
The DArrowRectangle class provides a widget that has an arrow on one of its four borders.
通常用于作为其他控件的容器,将其显示在矩形内作为内容控件 It's usually used as a container of some other widgets, see DArrowRectangle::setContent()
|
explicit |
DArrowRectangle::DArrowRectangle constructs an instance of DArrowRectangle.
获取 DArrowRectangle 实例
direction is used to initialize the direction of which the arrow points to. parent is the parent widget the arrow rectangle will be attached to. direction 用于初始化箭头的方向 parent 作为其父控件
|
explicit |
获取 DArrowRectangle 实例,并指定浮动模式.
DArrowRectangle::DArrowRectangle can set DArrowRectangle show as a window or a widget in parentWidget by floatMode
direction 用于初始化箭头的方向 floatMode parent 作为其父控件
QWidget * Dtk::Widget::DArrowRectangle::getContent | ( | ) | const |
获取内容控件.
QSize Dtk::Widget::DArrowRectangle::getFixedSize | ( | ) |
void Dtk::Widget::DArrowRectangle::move | ( | int | x, |
int | y | ||
) |
移动到指定的坐标位置.
DArrowRectangle::move moves the widget to the coordinate that provided,
参数的作用类似于 DArrowRectangle::show , 移动整个控件直到箭头出现在参数中指定的坐标 Like the rules in DArrowRectangle::show(int x, int y), it moves the widget so that the arrow head's coordinate matches the one that provided.
x 控件箭头的x轴坐标 y 控件箭头的y轴坐标 x is the x coordinate of the arrow head. y is the y coordinate of the arrow head.
bool Dtk::Widget::DArrowRectangle::radiusForceEnabled | ( | ) | const |
是否强制(忽略特效)开启圆角
Getter: DArrowRectangle::radiusForceEnabled , Setter: DArrowRectangle::setRadiusForceEnable
void Dtk::Widget::DArrowRectangle::resizeWithContent | ( | ) |
根据内容控件的大小自动设置矩形控件的大小.
DArrowRectangle::resizeWithContent automatically adjust the rectangle's size to fit the its content.
void Dtk::Widget::DArrowRectangle::setArrowDirection | ( | ArrowDirection | value | ) |
void Dtk::Widget::DArrowRectangle::setArrowHeight | ( | int | value | ) |
void Dtk::Widget::DArrowRectangle::setArrowWidth | ( | int | value | ) |
void Dtk::Widget::DArrowRectangle::setArrowX | ( | int | value | ) |
void Dtk::Widget::DArrowRectangle::setArrowY | ( | int | value | ) |
void Dtk::Widget::DArrowRectangle::setBackgroundColor | ( | DBlurEffectWidget::MaskColorType | type | ) |
DArrowRectangle::setBackgroundColor is an overloaded function.
DArrowRectangle::setBackgroundColor 是一个重载方法
通过改变 DBlurEffectWidget::MaskColorType 来修改控件矩形的背景 It sets the background color by modifing the mask color of the Dtk::Widget::DBlurEffectWidget.
type is the mask color to set.
void Dtk::Widget::DArrowRectangle::setContent | ( | QWidget * | content | ) |
DArrowRectangle::setContent sets the content of the arrow rectangle.
设置要显示在矩形内的内容控件.
content 要显示内容控件
void Dtk::Widget::DArrowRectangle::setHeight | ( | int | value | ) |
设置整个控件固定的高度
value 高度大小
void Dtk::Widget::DArrowRectangle::setLeftRightRadius | ( | bool | enable | ) |
DArrowRectangle::setLeftRightRadius 设置左右箭头时的圆角.
enable 是否开启.
void Dtk::Widget::DArrowRectangle::setMargin | ( | int | value | ) |
void Dtk::Widget::DArrowRectangle::setRadius | ( | int | value | ) |
void Dtk::Widget::DArrowRectangle::setRadiusArrowStyleEnable | ( | bool | enable | ) |
DArrowRectangle::setArrowStyleEnable 设置圆角箭头样式.
enable 是否开启.
void Dtk::Widget::DArrowRectangle::setRadiusForceEnable | ( | bool | enable | ) |
DArrowRectangle::setRadiusForceEnable 设置圆角样式.
默认窗管支持特效混成时有圆角,没有特效时没有圆角,如果启用一直都有圆角 enable 是否开启.
void Dtk::Widget::DArrowRectangle::setWidth | ( | int | value | ) |
该函数用于设置整个控件固定的宽度
value 宽度大小
|
virtual |
在指定的坐标位置显示本控件;
DArrowRectangle::show shows the widget at the given coordinate.
x 控件箭头的x轴坐标 y 控件箭头的y轴坐标 x is the x coordinate of the arrow head. y is the y coordinate of the arrow head.
|
readwrite |
This property holds the direction of the rectangle's arrow points to.
这个属性表示箭头的方向
Getter: DArrowRectangle::arrowDirection , Setter: DArrowRectangle::setArrowDirection
|
readwrite |
height of rectangle's arrow
这个属性表示箭头的高度
Getter: DArrowRectangle::arrowHeight , Setter: DArrowRectangle::setArrowHeight
|
readwrite |
这个属性表示箭头的宽度
width of the rectangle's arrow
Getter: DArrowRectangle::arrowWidth , Setter: DArrowRectangle::setArrowWidth
|
readwrite |
the x coordinate of the rectangle's arrow
这个属性表示箭头的x轴坐标
Getter: DArrowRectangle::arrowX , Setter: DArrowRectangle::setArrowX
|
readwrite |
这个属性表示箭头的y轴坐标
the y coordinate of the rectangle's arrow
Getter: DArrowRectangle::arrowY , Setter: DArrowRectangle::setArrowY
|
readwrite |
这个属性表示矩形控件的背景颜色
the background color of this rectangle.
Getter: DArrowRectangle::backgroundColor , Setter: DArrowRectangle::setBackgroundColor
|
readwrite |
这个属性表示控件边框的颜色
This property holds the border color of this widget.
Getter: DArrowRectangle::borderColor , Setter: DArrowRectangle::setBorderColor
|
readwrite |
这个属性表示控件边框的宽度
This property holds the border width of this widget.
Getter: DArrowRectangle::borderWidth , Setter: DArrowRectangle::setBorderWidth
|
readwrite |
这个属性表示边距大小
This property holds the width of the margin
The margin is the distance between the innermost pixel of the rectangle and the outermost pixel of its contents. The default margin is 0. 边距是指矩形最里面的像素与其内容最外面的像素之间的距离 Getter: DArrowRectangle::margin , Setter: DArrowRectangle::setMargin
|
readwrite |
这个属性表示矩形的圆角
radius of the rectangle
Getter: DArrowRectangle::radius , Setter: DArrowRectangle::setRadius
|
readwrite |
这个属性保存小部件阴影的模糊半径
This property holds the blur radius of the widget's shadow.
Getter: DArrowRectangle::shadowBlurRadius Setter: DArrowRectangle::setShadowBlurRadius
|
readwrite |
这属性表示小部件及其阴影在x轴上的偏移量
the offset of the widget and its shadow on x axis.
Getter: DArrowRectangle::shadowXOffset Setter: DArrowRectangle::setShadowXOffset
|
readwrite |
这属性表示小部件及其阴影在y轴上的偏移量.
the offset of the widget and its shadow on y axis.
Getter: DArrowRectangle::shadowYOffset Setter: DArrowRectangle::setShadowYOffset