DtkWidget 5.6.0.2
DTK Widget module
|
可以使用 DAbstractDialog 类创建符合 DDE 风格的对话框窗口. 更多...
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),但如果它有一个父组件 则对话框的默认位置将会位于其父组件的正中央,并共用其父控件的任务栏入口。
Dtk::Widget::DAbstractDialog::DAbstractDialog | ( | QWidget * | parent = nullptr | ) |
DAbstractDialog::DAbstractDialog constructs a DAbstractDialog instance. parent is the parent widget to be used.
构造一个 DAbstractDialog 实例
DAbstractDialog::DisplayPosition Dtk::Widget::DAbstractDialog::displayPosition | ( | ) | const |
DAbstractDialog::displayPosition
获取对话框显示位置
|
slot |
DAbstractDialog::moveToCenter moves the dialog to the center of the screen or its parent widget.
将对话框移动至屏幕中央或其父控件的中央。
|
slot |
DAbstractDialog::moveToCenterByRect moves the dialog to the center of the rect. rect is the target rect.
移动对话框到给定 rect 区域的中央。 rect 是移动对话框要参照的 QRect 区域
|
slot |
DAbstractDialog::moveToTopRight moves the dialog to the top right of the screen or its parent widget.
将对话框移动至屏幕右上角或其父控件的右上角。
|
slot |
DAbstractDialog::moveToTopRightByRect moves the dialog to the top right corner of the rect. rect is the target rect.
移动对话框到给定 rect 区域的右上角。 rect 是移动所需要参照的 QRect 位置。
|
protected |
\reimp
|
slot |
DAbstractDialog::setDisplayPosition sets the position of the dialog. displayPosition is the target position.
设置对话框的显示位置。 displayPosition 要显示到的位置