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

快速创建一个获取可输入数据的对话框. 更多...

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

Public 类型

enum  InputMode { TextInput , ComboBox , IntInput , DoubleInput }
 
- Public 类型 继承自 Dtk::Widget::DDialog
enum  ButtonType { ButtonNormal , ButtonWarning , ButtonRecommend }
 
- Public 类型 继承自 Dtk::Widget::DAbstractDialog
enum  DisplayPosition { Center , TopRight }
 
enum  DisplayPostion { DisplayCenter = Center , DisplayTopRight = TopRight }
 

信号

void textValueChanged (const QString &text)
 当属性 DInputDialog::textValue 发生变化时调用此信号 更多...
 
void textValueSelected (const QString &text)
 确认按钮被点击时调用此信号. 更多...
 
void intValueChanged (int value)
 当属性 DInputDialog::intValue 发生变化时调用此信号 更多...
 
void intValueSelected (int value)
 确认按钮被点击时调用此信号 更多...
 
void doubleValueChanged (double value)
 当属性 DInputDialog::doubleValue 发生变化时调用此信号 更多...
 
void doubleValueSelected (double value)
 确认按钮被点击时调用此信号 更多...
 
void cancelButtonClicked ()
 取消按钮被点击时调用此信号
 
void okButtonClicked ()
 确认按钮被点击时调用此信号
 
void comboBoxCurrentIndexChanged (int comboBoxCurrentIndex)
 当属性 DInputDialog::comboBoxCurrentIndex 发生变化时调用此信号 更多...
 
void textAlertChanged (bool textAlert)
 当属性 DInputDialog::textAlert 发生变化时调用此信号 更多...
 
- 信号 继承自 Dtk::Widget::DDialog
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)
 
- 信号 继承自 Dtk::Widget::DAbstractDialog
void sizeChanged (QSize size)
 sizeChanged is emitted when the size of this dialog changed. size is the target size.
 

Public 成员函数

 DInputDialog (QWidget *parent=0)
 获取 DInputDialog::DInputDialog 实例 parent 作为 DInputDialog::DInputDialog 实例的父控件
 
Q_SLOT void setInputMode (InputMode mode)
 
InputMode inputMode () const
 
Q_SLOT void setTextValue (const QString &text)
 
QString textValue () const
 
Q_SLOT void setTextEchoMode (QLineEdit::EchoMode mode)
 
QLineEdit::EchoMode textEchoMode () const
 
Q_SLOT void setComboBoxEditable (bool editable)
 
bool isComboBoxEditable () const
 
Q_SLOT void setComboBoxItems (const QStringList &items)
 
QStringList comboBoxItems () const
 
Q_SLOT void setComboBoxCurrentIndex (int comboBoxCurrentIndex)
 
int comboBoxCurrentIndex () const
 
Q_SLOT void setIntValue (int value)
 
int intValue () const
 
Q_SLOT void setIntMinimum (int min)
 
int intMinimum () const
 
Q_SLOT void setIntMaximum (int max)
 
int intMaximum () const
 
Q_SLOT void setIntRange (int min, int max)
 设置对话框中的整形可选输入框SpinBox的可选范围(最小值和最大值) 更多...
 
Q_SLOT void setIntStep (int step)
 
int intStep () const
 
Q_SLOT void setDoubleValue (double value)
 
double doubleValue () const
 
Q_SLOT void setDoubleMinimum (double min)
 
double doubleMinimum () const
 
Q_SLOT void setDoubleMaximum (double max)
 
double doubleMaximum () const
 
Q_SLOT void setDoubleRange (double min, double max)
 设置对话框中的浮点型可选输入框SpinBox的可选范围(最小值和最大值) 更多...
 
Q_SLOT void setDoubleDecimals (int decimals)
 
int doubleDecimals () const
 
Q_SLOT void setOkButtonText (const QString &text)
 
QString okButtonText () const
 
Q_SLOT void setOkButtonEnabled (const bool enable)
 设置确认按钮是否可以点击 enable 为 true 即为可以点击,反之则反
 
bool okButtonIsEnabled () const
 获取确认按钮是否可以点击 更多...
 
Q_SLOT void setCancelButtonText (const QString &text)
 
QString cancelButtonText () const
 
Q_SLOT void setTextAlert (bool textAlert)
 
bool isTextAlert () const
 
- Public 成员函数 继承自 Dtk::Widget::DDialog
 DDialog (QWidget *parent=nullptr)
 构造一个 DDialog 对话框. 更多...
 
 DDialog (const QString &title, const QString &message, QWidget *parent=0)
 构造一个 DDialog 对话框。 更多...
 
int getButtonIndexByText (const QString &text) const
 通过按钮文字获取按钮下标. 更多...
 
int buttonCount () const
 获得对话框包含的按钮数量.
 
int contentCount () const
 获得对话框所含的所有内容控件的数量.
 
QList< QAbstractButton * > getButtons () const
 获得对话框的按钮列表
 
QList< QWidget * > getContents () const
 获得对话框所含的所有内容控件列表
 
QAbstractButton * getButton (int index) const
 获得指定下标所对应的按钮. 更多...
 
QWidget * getContent (int index) const
 获取指定下标对应的内容控件. index 控件下标 更多...
 
QString title () const
 返回对话框标题. 更多...
 
QString message () const
 返回对话框消息文本. 更多...
 
QIcon icon () const
 返回对话框图标. 更多...
 
D_DECL_DEPRECATED QPixmap iconPixmap () const
 返回对话框图标的 QPixmap 对象. 更多...
 
Qt::TextFormat textFormat () const
 返回对话框的文本格式. 更多...
 
bool onButtonClickedClose () const
 检查在点击任何按钮后是否都会关闭对话框. 更多...
 
void setContentLayoutContentsMargins (const QMargins &margins)
 设定内容布局的内容 margin . margins 具体的 margins
 
QMargins contentLayoutContentsMargins () const
 返回内容布局的边距. 更多...
 
bool closeButtonVisible () const
 关闭按钮的可见属性. 更多...
 
- Public 成员函数 继承自 Dtk::Widget::DAbstractDialog
 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)
 

静态 Public 成员函数

static QString getText (QWidget *parent, const QString &title, const QString &message, QLineEdit::EchoMode echo=QLineEdit::Normal, const QString &text=QString(), bool *ok=0, Qt::WindowFlags flags=0, Qt::InputMethodHints inputMethodHints=Qt::ImhNone)
 快速创建一个可以输入文字的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 echo 设置文本输入框文字的显示模式 text 设置文本输入框文字默认的内容 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置 inputMethodHints 设置输入法相关属性,一般无需设置 更多...
 
static QString getItem (QWidget *parent, const QString &title, const QString &message, const QStringList &items, int current=0, bool editable=true, bool *ok=0, Qt::WindowFlags flags=0, Qt::InputMethodHints inputMethodHints=Qt::ImhNone)
 快速创建一个多选框的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 items 设置所有可选项 current 设置当前的可选项 editable 设置多选框是否可编辑 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置 inputMethodHints 设置输入法相关属性,一般无需设置 更多...
 
static int getInt (QWidget *parent, const QString &title, const QString &message, int value=0, int minValue=-2147483647, int maxValue=2147483647, int step=1, bool *ok=0, Qt::WindowFlags flags=0)
 快速创建一个获取整数的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 value 设置默认的值 minValue 设置最小值 maxValue 设置最大值 step 设置步进值 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置 更多...
 
static double getDouble (QWidget *parent, const QString &title, const QString &message, double value=0, double minValue=-2147483647, double maxValue=2147483647, int decimals=1, bool *ok=0, Qt::WindowFlags flags=0)
 快速创建一个获取浮点数的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 value 设置默认的值 minValue 设置最小值 maxValue 设置最大值 decimals 设置精度 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置 更多...
 

Protected 成员函数

void showEvent (QShowEvent *e)
 
- Protected 成员函数 继承自 Dtk::Widget::DDialog
 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
 
- Protected 成员函数 继承自 Dtk::Widget::DAbstractDialog
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)
 

属性

InputMode inputMode
 这个属性保存对话框当前的输入模式 更多...
 
QString textValue
 这个属性保存对话框当前的输入文本 更多...
 
int intValue
 这个属性保存对话框当前的整型值 更多...
 
int doubleValue
 这个属性保存对话框当前的浮点数值 更多...
 
QLineEdit::EchoMode textEchoMode
 这个属性保存对话框中的输入框文字显示模式 更多...
 
bool comboBoxEditable
 这个属性表示对话框中的多选框是否可以编辑 更多...
 
QStringList comboBoxItems
 这个属性保存对话框中多选框的所有可选值 更多...
 
int comboBoxCurrentIndex
 这个属性保存对话框中多选框当前的索引 更多...
 
int intMinimum
 这个属性保存对话框中的整形可选输入框SpinBox的最小值 更多...
 
int intMaximum
 这个属性保存对话框中的整形可选输入框SpinBox的最大值 更多...
 
int intStep
 这个属性保存对话框中的可选输入框点击调增按钮时的步进值 更多...
 
double doubleMinimum
 这个属性保存对话框中的浮点型可选输入框SpinBox的最小值 更多...
 
double doubleMaximum
 这个属性保存对话框中的浮点型可选输入框SpinBox的最大值 更多...
 
int doubleDecimals
 这个属性保存对话框中的浮点型可选输入框SpinBox的精度 更多...
 
QString okButtonText
 这个属性保存对话框的确认按钮文字 更多...
 
QString cancelButtonText
 这个属性保存对话框的取消按钮文字 更多...
 
bool textAlert
 这个属性保存对话框是否处于警告状态 更多...
 
- 属性 继承自 Dtk::Widget::DDialog
QString title
 
QString message
 
QIcon icon
 
Qt::TextFormat textFormat
 
bool onButtonClickedClose
 
bool closeButtonVisible
 
- 属性 继承自 Dtk::Widget::DAbstractDialog
DisplayPosition displayPosition
 

额外继承的成员函数

- Public 槽 继承自 Dtk::Widget::DDialog
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)
 设置按钮图标. index 需要设置图标的按钮的下标 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)
 设置对话框图标. icon 对话框图标.
 
D_DECL_DEPRECATED void setIcon (const QIcon &icon, const QSize &expectedSize)
 设置对话框图标. 这是为便于使用而提供的一个重载成员函数.与上面的函数相比,它接受不同类型的参数.为对话框设置图标,同时可以指定一个期望的图标大小。 更多...
 
D_DECL_DEPRECATED void setIconPixmap (const QPixmap &iconPixmap)
 设置对话框位图图标. 更多...
 
void setTextFormat (Qt::TextFormat textFormat)
 设置文字格式. textFormat 文字格式.
 
void setOnButtonClickedClose (bool onButtonClickedClose)
 设置是否在点击按钮后关闭对话框. 更多...
 
void setCloseButtonVisible (bool closeButtonVisible)
 
int exec () Q_DECL_OVERRIDE
 以模态框形式显示当前对话框. 更多...
 
- Public 槽 继承自 Dtk::Widget::DAbstractDialog
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. 更多...
 

详细描述

快速创建一个获取可输入数据的对话框.

\inmodule dtkwidget \obsolete

Use QInputDialog instead.

DInputDialog 一般直接调用其静态函数 DInputDialog::getText DInputDialog::getItem DInputDialog::getInt DInputDialog::getDouble 来直接获取文字,选项,整数,浮点数

成员函数说明

◆ comboBoxCurrentIndexChanged

void Dtk::Widget::DInputDialog::comboBoxCurrentIndexChanged ( int  comboBoxCurrentIndex)
signal

当属性 DInputDialog::comboBoxCurrentIndex 发生变化时调用此信号

参见
DInputDialog::comboBoxCurrentIndex

◆ comboBoxItems()

QStringList Dtk::Widget::DInputDialog::comboBoxItems ( ) const

◆ doubleValueChanged

void Dtk::Widget::DInputDialog::doubleValueChanged ( double  value)
signal

当属性 DInputDialog::doubleValue 发生变化时调用此信号

参见
DInputDialog::doubleValue

◆ doubleValueSelected

Dtk::Widget::DInputDialog::doubleValueSelected ( double  value)
signal

确认按钮被点击时调用此信号

如果InputMode是 DInputDialog::DoubleInput ,则确认按钮被点击时调用此信号发送当前的浮点数值

value 要发送的值

◆ getDouble()

double Dtk::Widget::DInputDialog::getDouble ( QWidget *  parent,
const QString title,
const QString message,
double  value = 0,
double  minValue = -2147483647,
double  maxValue = 2147483647,
int  decimals = 1,
bool *  ok = 0,
Qt::WindowFlags  flags = 0 
)
static

快速创建一个获取浮点数的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 value 设置默认的值 minValue 设置最小值 maxValue 设置最大值 decimals 设置精度 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置

返回
返回整数值

◆ getInt()

int Dtk::Widget::DInputDialog::getInt ( QWidget *  parent,
const QString title,
const QString message,
int  value = 0,
int  minValue = -2147483647,
int  maxValue = 2147483647,
int  step = 1,
bool *  ok = 0,
Qt::WindowFlags  flags = 0 
)
static

快速创建一个获取整数的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 value 设置默认的值 minValue 设置最小值 maxValue 设置最大值 step 设置步进值 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置

返回
返回整数值

◆ getItem()

QString Dtk::Widget::DInputDialog::getItem ( QWidget *  parent,
const QString title,
const QString message,
const QStringList items,
int  current = 0,
bool  editable = true,
bool *  ok = 0,
Qt::WindowFlags  flags = 0,
Qt::InputMethodHints  inputMethodHints = Qt::ImhNone 
)
static

快速创建一个多选框的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 items 设置所有可选项 current 设置当前的可选项 editable 设置多选框是否可编辑 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置 inputMethodHints 设置输入法相关属性,一般无需设置

返回
返回选中的项

◆ getText()

QString Dtk::Widget::DInputDialog::getText ( QWidget *  parent,
const QString title,
const QString message,
QLineEdit::EchoMode  echo = QLineEdit::Normal,
const QString text = QString(),
bool *  ok = 0,
Qt::WindowFlags  flags = 0,
Qt::InputMethodHints  inputMethodHints = Qt::ImhNone 
)
static

快速创建一个可以输入文字的对话框 parent 作为对话框的父控件 title 作为对话框的标题 message 作为对话框提示信息 echo 设置文本输入框文字的显示模式 text 设置文本输入框文字默认的内容 ok 用于获取对话框是否点击了确认的指针 flags 设置对话框的窗口属性,一般无需设置 inputMethodHints 设置输入法相关属性,一般无需设置

返回
返回输入的字符串

◆ intValueChanged

void Dtk::Widget::DInputDialog::intValueChanged ( int  value)
signal

当属性 DInputDialog::intValue 发生变化时调用此信号

参见
DInputDialog::intValue

◆ intValueSelected

void Dtk::Widget::DInputDialog::intValueSelected ( int  value)
signal

确认按钮被点击时调用此信号

如果InputMode是 DInputDialog::IntInput ,则确认按钮被点击时调用此信号发送当前的整数值

value 要发送的值

◆ isComboBoxEditable()

bool Dtk::Widget::DInputDialog::isComboBoxEditable ( ) const

◆ isTextAlert()

bool Dtk::Widget::DInputDialog::isTextAlert ( ) const

◆ okButtonIsEnabled()

bool Dtk::Widget::DInputDialog::okButtonIsEnabled ( ) const

获取确认按钮是否可以点击

返回
true 即为可以点击,反之则反

◆ setCancelButtonText()

void Dtk::Widget::DInputDialog::setCancelButtonText ( const QString text)

◆ setComboBoxCurrentIndex()

void Dtk::Widget::DInputDialog::setComboBoxCurrentIndex ( int  comboBoxCurrentIndex)

◆ setComboBoxEditable()

void Dtk::Widget::DInputDialog::setComboBoxEditable ( bool  editable)

◆ setComboBoxItems()

void Dtk::Widget::DInputDialog::setComboBoxItems ( const QStringList items)

◆ setDoubleDecimals()

void Dtk::Widget::DInputDialog::setDoubleDecimals ( int  decimals)

◆ setDoubleMaximum()

void Dtk::Widget::DInputDialog::setDoubleMaximum ( double  max)

◆ setDoubleMinimum()

void Dtk::Widget::DInputDialog::setDoubleMinimum ( double  min)

◆ setDoubleRange()

void Dtk::Widget::DInputDialog::setDoubleRange ( double  min,
double  max 
)

设置对话框中的浮点型可选输入框SpinBox的可选范围(最小值和最大值)

参见
DInputDialog::doubleMinimum DInputDialog::doubleMaximum

◆ setDoubleValue()

void Dtk::Widget::DInputDialog::setDoubleValue ( double  value)

◆ setInputMode()

void Dtk::Widget::DInputDialog::setInputMode ( DInputDialog::InputMode  mode)

◆ setIntMaximum()

void Dtk::Widget::DInputDialog::setIntMaximum ( int  max)

◆ setIntMinimum()

void Dtk::Widget::DInputDialog::setIntMinimum ( int  min)

◆ setIntRange()

void Dtk::Widget::DInputDialog::setIntRange ( int  min,
int  max 
)

设置对话框中的整形可选输入框SpinBox的可选范围(最小值和最大值)

参见
DInputDialog::intMinimum DInputDialog::intMaximum

◆ setIntStep()

void Dtk::Widget::DInputDialog::setIntStep ( int  step)

◆ setIntValue()

void Dtk::Widget::DInputDialog::setIntValue ( int  value)

◆ setOkButtonText()

void Dtk::Widget::DInputDialog::setOkButtonText ( const QString text)

◆ setTextAlert()

void Dtk::Widget::DInputDialog::setTextAlert ( bool  textAlert)

◆ setTextEchoMode()

void Dtk::Widget::DInputDialog::setTextEchoMode ( QLineEdit::EchoMode  mode)

◆ setTextValue()

void Dtk::Widget::DInputDialog::setTextValue ( const QString text)

◆ textAlertChanged

Dtk::Widget::DInputDialog::textAlertChanged ( bool  textAlert)
signal

当属性 DInputDialog::textAlert 发生变化时调用此信号

参见
DInputDialog::textAlert

◆ textValueChanged

Dtk::Widget::DInputDialog::textValueChanged ( const QString text)
signal

当属性 DInputDialog::textValue 发生变化时调用此信号

参见
DInputDialog::textValue

◆ textValueSelected

void Dtk::Widget::DInputDialog::textValueSelected ( const QString text)
signal

确认按钮被点击时调用此信号.

如果InputMode是 DInputDialog::TextInput 或者 DInputDialog::ComboBox ,则确认按钮被点击时调用此信号发送当前文本输入框或多选框中当前的值

value 要发送的值

属性说明

◆ cancelButtonText

Dtk::Widget::DInputDialog::cancelButtonText
readwrite

这个属性保存对话框的取消按钮文字

Getter: DInputDialog::cancelButtonText , Setter: DInputDialog::setCancelButtonText

◆ comboBoxCurrentIndex

Dtk::Widget::DInputDialog::comboBoxCurrentIndex
readwrite

这个属性保存对话框中多选框当前的索引

Getter: DInputDialog::comboBoxCurrentIndex , Setter: DInputDialog::setComboBoxCurrentIndex , Signal: DInputDialog::comboBoxCurrentIndexChanged

◆ comboBoxEditable

Dtk::Widget::DInputDialog::comboBoxEditable
readwrite

这个属性表示对话框中的多选框是否可以编辑

Getter: DInputDialog::isComboBoxEditable , Setter: DInputDialog::setComboBoxEditable

◆ comboBoxItems

Dtk::Widget::DInputDialog::comboBoxItems
readwrite

这个属性保存对话框中多选框的所有可选值

Getter: DInputDialog::comboBoxItems , Setter: DInputDialog::setComboBoxItems

◆ doubleDecimals

Dtk::Widget::DInputDialog::doubleDecimals
readwrite

这个属性保存对话框中的浮点型可选输入框SpinBox的精度

精度即处理多少位小数

Getter: DInputDialog::doubleDecimals , Setter: DInputDialog::setDoubleDecimals

◆ doubleMaximum

Dtk::Widget::DInputDialog::doubleMaximum
readwrite

这个属性保存对话框中的浮点型可选输入框SpinBox的最大值

Getter: DInputDialog::doubleMaximum , Setter: DInputDialog::setDoubleMaximum

参见
DInputDialog::doubleMinimum

◆ doubleMinimum

Dtk::Widget::DInputDialog::doubleMinimum
readwrite

这个属性保存对话框中的浮点型可选输入框SpinBox的最小值

Getter: DInputDialog::doubleMinimum , Setter: DInputDialog::setDoubleMinimum

参见
DInputDialog::doubleMaximum

◆ doubleValue

Dtk::Widget::DInputDialog::doubleValue
readwrite

这个属性保存对话框当前的浮点数值

Getter: DInputDialog::doubleValue , Setter: DInputDialog::setDoubleValue , Signal: DInputDialog::doubleValueChanged

◆ inputMode

Dtk::Widget::DInputDialog::inputMode
readwrite

这个属性保存对话框当前的输入模式

查看 DInputDialog::InputMode 以了解对话框支持的多种输入模式

Getter: DInputDialog::inputMode , Setter: DInputDialog::setInputMode

参见
DInputDialog::InputMode

◆ intMaximum

Dtk::Widget::DInputDialog::intMaximum
readwrite

这个属性保存对话框中的整形可选输入框SpinBox的最大值

Getter: DInputDialog::intMaximum , Setter: DInputDialog::setIntMaximum

参见
DInputDialog::intMinimum

◆ intMinimum

Dtk::Widget::DInputDialog::intMinimum
readwrite

这个属性保存对话框中的整形可选输入框SpinBox的最小值

Getter: DInputDialog::intMinimum , Setter: DInputDialog::setIntMinimum

参见
DInputDialog::intMaximum

◆ intStep

Dtk::Widget::DInputDialog::intStep
readwrite

这个属性保存对话框中的可选输入框点击调增按钮时的步进值

步进值即点击一次增大或减小多少

Getter: DInputDialog::intStep , Setter: DInputDialog::setIntStep

◆ intValue

Dtk::Widget::DInputDialog::intValue
readwrite

这个属性保存对话框当前的整型值

Getter: DInputDialog::intValue , Setter: DInputDialog::setIntValue , Signal: DInputDialog::intValueChanged

◆ okButtonText

Dtk::Widget::DInputDialog::okButtonText
readwrite

这个属性保存对话框的确认按钮文字

Getter: DInputDialog::okButtonText , Setter: DInputDialog::setOkButtonText

◆ textAlert

Dtk::Widget::DInputDialog::textAlert
readwrite

这个属性保存对话框是否处于警告状态

当对话框处于警告状态时,输入框的边框将会显示不同的颜色,一般警告告诉用户当前输入框的内容不合法

Getter: DInputDialog::textAlert , Setter: DInputDialog::setTextAlert , Signal: DInputDialog::textAlertChanged

◆ textEchoMode

Dtk::Widget::DInputDialog::textEchoMode
readwrite

这个属性保存对话框中的输入框文字显示模式

Getter: DInputDialog::textEchoMode , Setter: DInputDialog::setTextEchoMode

参见
QLineEdit::EchoMode

◆ textValue

Dtk::Widget::DInputDialog::textValue
readwrite

这个属性保存对话框当前的输入文本

如果当前的输入模式是 DInputDialog::ComboBox 则返回当前已选择的ComboBox选项,否则返回输入框的内容

Getter: DInputDialog::textValue , Setter: DInputDialog::setTextValue , Signal: DInputDialog::textValueChanged

参见
DInputDialog::InputMode

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