DtkWidget 5.6.0.2
DTK Widget module
Public 类型 | Public 槽 | 信号 | Public 成员函数 | Protected 成员函数 | 属性 | 所有成员列表
Dtk::Widget::DAbstractDialog类 参考

可以使用 DAbstractDialog 类创建符合 DDE 风格的对话框窗口. 更多...

类 Dtk::Widget::DAbstractDialog 继承关系图:
Inheritance graph
[图例]
Dtk::Widget::DAbstractDialog 的协作图:
Collaboration graph
[图例]

Public 类型

enum  DisplayPosition { Center , TopRight }
 
enum  DisplayPostion { DisplayCenter = Center , DisplayTopRight = TopRight }
 

Public 槽

void moveToCenter ()
 DAbstractDialog::moveToCenter moves the dialog to the center of the screen or its parent widget. 更多...
 
void moveToTopRight ()
 DAbstractDialog::moveToTopRight moves the dialog to the top right of the screen or its parent widget. 更多...
 
void moveToCenterByRect (const QRect &rect)
 DAbstractDialog::moveToCenterByRect moves the dialog to the center of the rect. rect is the target rect. 更多...
 
void moveToTopRightByRect (const QRect &rect)
 DAbstractDialog::moveToTopRightByRect moves the dialog to the top right corner of the rect. rect is the target rect. 更多...
 
void setDisplayPosition (DisplayPosition displayPosition)
 DAbstractDialog::setDisplayPosition sets the position of the dialog. displayPosition is the target position. 更多...
 

信号

void sizeChanged (QSize size)
 sizeChanged is emitted when the size of this dialog changed. size is the target size.
 

Public 成员函数

 DAbstractDialog (QWidget *parent=nullptr)
 DAbstractDialog::DAbstractDialog constructs a DAbstractDialog instance. parent is the parent widget to be used. 更多...
 
 DAbstractDialog (bool blurIfPossible, QWidget *parent=nullptr)
 
DisplayPosition displayPosition () const
 DAbstractDialog::displayPosition 更多...
 
void move (const QPoint &pos)
 
void move (int x, int y)
 
void setGeometry (const QRect &rect)
 
void setGeometry (int x, int y, int width, int height)
 

Protected 成员函数

void mouseMoveEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
void mousePressEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
void mouseReleaseEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
void resizeEvent (QResizeEvent *event) Q_DECL_OVERRIDE
 
void showEvent (QShowEvent *event) override
 
 DAbstractDialog (DAbstractDialogPrivate &dd, QWidget *parent=nullptr)
 

属性

DisplayPosition displayPosition
 

详细描述

可以使用 DAbstractDialog 类创建符合 DDE 风格的对话框窗口.

\inmodule dtkwidget

Use DAbstractDialog class to create dialog window matched DDE style.

对话框是一个用于供用户进行短暂周期的任务交互的顶层窗体。 DDialogs 对话框可以是模态的或非模态的。 对话框可以提供一个 return "返回值", 并且对话框可以拥有 default "默认按钮"。

请注意 DAbstractDialog (以及其他继承自 QDialog 的对话框)对构造时传入的 parent 父组件的行为和其他 Qt 组件或 DTK 组件不同。一个对话框总是一个顶层控件(top-level widget),但如果它有一个父组件 则对话框的默认位置将会位于其父组件的正中央,并共用其父控件的任务栏入口。

成员枚举类型说明

◆ DisplayPostion

枚举值
DisplayCenter 

display this dialog in the center of the screen

DisplayTopRight 

display this dialog in the top right of the screen

构造及析构函数说明

◆ DAbstractDialog()

Dtk::Widget::DAbstractDialog::DAbstractDialog ( QWidget *  parent = nullptr)

DAbstractDialog::DAbstractDialog constructs a DAbstractDialog instance. parent is the parent widget to be used.

构造一个 DAbstractDialog 实例

成员函数说明

◆ displayPosition()

DAbstractDialog::DisplayPosition Dtk::Widget::DAbstractDialog::displayPosition ( ) const

DAbstractDialog::displayPosition

返回
the display position of this dialog.

获取对话框显示位置

◆ moveToCenter

void Dtk::Widget::DAbstractDialog::moveToCenter ( )
slot

DAbstractDialog::moveToCenter moves the dialog to the center of the screen or its parent widget.

将对话框移动至屏幕中央或其父控件的中央。

◆ moveToCenterByRect

void Dtk::Widget::DAbstractDialog::moveToCenterByRect ( const QRect rect)
slot

DAbstractDialog::moveToCenterByRect moves the dialog to the center of the rect. rect is the target rect.

移动对话框到给定 rect 区域的中央。 rect 是移动对话框要参照的 QRect 区域

◆ moveToTopRight

void Dtk::Widget::DAbstractDialog::moveToTopRight ( )
slot

DAbstractDialog::moveToTopRight moves the dialog to the top right of the screen or its parent widget.

将对话框移动至屏幕右上角或其父控件的右上角。

◆ moveToTopRightByRect

void Dtk::Widget::DAbstractDialog::moveToTopRightByRect ( const QRect rect)
slot

DAbstractDialog::moveToTopRightByRect moves the dialog to the top right corner of the rect. rect is the target rect.

移动对话框到给定 rect 区域的右上角。 rect 是移动所需要参照的 QRect 位置。

◆ resizeEvent()

void Dtk::Widget::DAbstractDialog::resizeEvent ( QResizeEvent *  event)
protected

\reimp

◆ setDisplayPosition

void Dtk::Widget::DAbstractDialog::setDisplayPosition ( DAbstractDialog::DisplayPosition  displayPosition)
slot

DAbstractDialog::setDisplayPosition sets the position of the dialog. displayPosition is the target position.

设置对话框的显示位置。 displayPosition 要显示到的位置


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