|
| enum | ButtonType { ButtonNormal
, ButtonWarning
, ButtonRecommend
} |
| | 表示按钮类型
|
| |
| enum | DisplayPosition { Center
, TopRight
} |
| | 对话框显示位置 更多...
|
| |
| enum | DisplayPostion { DisplayCenter = Center
, DisplayTopRight = TopRight
} |
| |
| int | addButton (const QString &text, bool isDefault=false, ButtonType type=ButtonNormal) |
| | 向对话框添加按钮
|
| |
| int | addButtons (const QStringList &text) |
| | 向对话框添加按钮
|
| |
| void | insertButton (int index, const QString &text, bool isDefault=false, ButtonType type=ButtonNormal) |
| | 向对话框插入按钮
|
| |
| void | insertButton (int index, QAbstractButton *button, bool isDefault=false) |
| | 向对话框插入按钮
|
| |
| void | insertButtons (int index, const QStringList &text) |
| | 向对话框插入按钮
|
| |
| void | removeButton (int index) |
| | 从对话框移除按钮
|
| |
| void | removeButton (QAbstractButton *button) |
| | 从对话框移除按钮
|
| |
| void | removeButtonByText (const QString &text) |
| | 从对话框移除按钮
|
| |
|
void | clearButtons () |
| | 清除所有按钮
|
| |
| bool | setDefaultButton (int index) |
| | 设置默认按钮
|
| |
| bool | setDefaultButton (const QString &str) |
| | 设置默认按钮
|
| |
| void | setDefaultButton (QAbstractButton *button) |
| | 设置默认按钮
|
| |
| void | addContent (QWidget *widget, Qt::Alignment alignment={}) |
| | 添加控件到对话框内容布局.
|
| |
| void | insertContent (int index, QWidget *widget, Qt::Alignment alignment={}) |
| | 在对话框内容布局指定位置插入控件.
|
| |
| void | removeContent (QWidget *widget, bool isDelete=true) |
| | 从对话框内容布局中移除指定控件
|
| |
| void | clearContents (bool isDelete=true) |
| | 清空对话框内容布局中的所有内容.
|
| |
| void | setSpacing (int spacing) |
| | 设置对话框内容间隔
|
| |
| void | addSpacing (int spacing) |
| | 追加对话框内容间隔.
|
| |
| void | insertSpacing (int index, int spacing) |
| | 插入对话框内容间隔
|
| |
| void | clearSpacing () |
| | 清除内容间隔
|
| |
| void | setButtonText (int index, const QString &text) |
| | 设置按钮文字
|
| |
| void | setButtonIcon (int index, const QIcon &icon) |
| | 设置按钮图标
|
| |
| void | setTitle (const QString &title) |
| | 设置对话框标题
|
| |
| void | setWordWrapTitle (bool wordWrap) |
| | 设定标题Label内容是否可截断换行
|
| |
| void | setMessage (const QString &message) |
| | 设置对话框消息内容
|
| |
|
void | setWordWrapMessage (bool wordWrap) |
| | 设置对话框消息内容
|
| |
| void | setIcon (const QIcon &icon) |
| | 设置对话框图标
|
| |
| void | setTextFormat (Qt::TextFormat textFormat) |
| | 设置文字格式
|
| |
| void | setOnButtonClickedClose (bool onButtonClickedClose) |
| | 设置是否在点击按钮后关闭对话框
|
| |
|
void | setCloseButtonVisible (bool closeButtonVisible) |
| | 设置关闭按钮的可见性
|
| |
| int | exec () Q_DECL_OVERRIDE |
| | 以模态框形式显示当前对话框
|
| |
|
void | moveToCenter () |
| | 将对话框移动至屏幕中央或其父控件的中央
|
| |
|
void | moveToTopRight () |
| | 将对话框移动至屏幕右上角或其父控件的右上角
|
| |
|
void | moveToCenterByRect (const QRect &rect) |
| | 移动对话框到给定rect区域的中央。rect是移动对话框要参照的QRect区域
|
| |
|
void | moveToTopRightByRect (const QRect &rect) |
| | 移动对话框到给定rect区域的右上角。rect是移动所需要参照的QRect位置。
|
| |
| void | setDisplayPosition (DisplayPosition displayPosition) |
| | 设置对话框显示位置
|
| |
|
void | aboutToClose () |
| |
|
void | closed () |
| |
|
void | buttonClicked (int index, const QString &text) |
| |
|
void | titleChanged (QString title) |
| |
|
void | messageChanged (QString massage) |
| |
|
void | textFormatChanged (Qt::TextFormat textFormat) |
| |
|
void | sizeChanged (QSize size) |
| |
|
void | visibleChanged (bool visible) |
| |
|
void | sizeChanged (QSize size) |
| | 窗口大小发生改变
|
| |
|
| DDialog (DDialogPrivate &dd, QWidget *parent=0) |
| |
| void | showEvent (QShowEvent *event) Q_DECL_OVERRIDE |
| |
| void | hideEvent (QHideEvent *event) Q_DECL_OVERRIDE |
| |
|
void | closeEvent (QCloseEvent *event) override |
| |
|
void | childEvent (QChildEvent *event) Q_DECL_OVERRIDE |
| |
|
void | resizeEvent (QResizeEvent *event) override |
| |
|
void | keyPressEvent (QKeyEvent *event) override |
| |
|
bool | eventFilter (QObject *watched, QEvent *event) override |
| |
|
void | changeEvent (QEvent *event) override |
| |
| 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) |
| |
| QString | title |
| | 对话框标题属性
|
| |
| QString | message |
| | 对话框消息属性
|
| |
| QIcon | icon |
| | 对话框图标属性
|
| |
| Qt::TextFormat | textFormat |
| | 对话框的文本格式属性
|
| |
| bool | onButtonClickedClose |
| | 标志是否在点击按钮后关闭对话框的属性
|
| |
| bool | closeButtonVisible |
| | 关闭按钮的可见属性
|
| |
| DisplayPosition | displayPosition |
| | 获取对话框显示位置
|
| |