.TH "kdk::KInputDialog" 3 "Version version:3.0" "LIBKYSDK-APPLICATIONS" \" -*- nroff -*- .ad l .nh .SH NAME kdk::KInputDialog \- 输入对话框,接口与 QInputDialog 相同。 .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBkdk::KDialog\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBInputDialogOption\fP { \fBNoButtons\fP = 0x00000001, \fBUseListViewForComboBoxItems\fP = 0x00000002, \fBUsePlainTextEditForTextInput\fP = 0x00000004 }" .br .ti -1c .RI "enum \fBInputMode\fP { \fBTextInput\fP, \fBIntInput\fP, \fBDoubleInput\fP }" .br .in -1c .SS "Signals" .in +1c .ti -1c .RI "void \fBtextValueChanged\fP (const QString &text)" .br .ti -1c .RI "void \fBtextValueSelected\fP (const QString &text)" .br .ti -1c .RI "void \fBintValueChanged\fP (int value)" .br .ti -1c .RI "void \fBintValueSelected\fP (int value)" .br .ti -1c .RI "void \fBdoubleValueChanged\fP (double value)" .br .ti -1c .RI "void \fBdoubleValueSelected\fP (double value)" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBKInputDialog\fP (QWidget *parent=nullptr)" .br .ti -1c .RI "void \fBsetInputMode\fP (InputMode mode)" .br .RI "设置输入模式 " .ti -1c .RI "InputMode \fBinputMode\fP () const" .br .RI "返回输入模式 " .ti -1c .RI "void \fBsetLabelText\fP (const QString &text)" .br .RI "设置提示信息 " .ti -1c .RI "QString \fBlabelText\fP () const" .br .RI "获取提示信息 " .ti -1c .RI "void \fBsetOption\fP (InputDialogOption option, bool on=true)" .br .RI "设置option类型 " .ti -1c .RI "bool \fBtestOption\fP (InputDialogOption option) const" .br .RI "返回是否设置了option类型 " .ti -1c .RI "void \fBsetOptions\fP (InputDialogOptions \fBoptions\fP)" .br .RI "设置options类型 " .ti -1c .RI "InputDialogOptions \fBoptions\fP () const" .br .RI "返回options类型 " .ti -1c .RI "void \fBsetTextValue\fP (const QString &text)" .br .RI "设置文本值 " .ti -1c .RI "QString \fBtextValue\fP () const" .br .RI "获取当前文本值 " .ti -1c .RI "void \fBsetTextEchoMode\fP (QLineEdit::EchoMode mode)" .br .RI "设置保存文本值的回声模式 QLineEdit::EchoMode " .ti -1c .RI "QLineEdit::EchoMode \fBtextEchoMode\fP () const" .br .RI "返回保存文本值的回声模式 " .ti -1c .RI "void \fBsetComboBoxEditable\fP (bool editable)" .br .RI "设置输入对话框中使用的组合框是否可编辑 " .ti -1c .RI "bool \fBisComboBoxEditable\fP () const" .br .RI "返回输入对话框中使用的组合框是否可编辑 " .ti -1c .RI "void \fBsetComboBoxItems\fP (const QStringList &items)" .br .RI "设置输入对话框组合框中使用的项目 " .ti -1c .RI "QStringList \fBcomboBoxItems\fP () const" .br .RI "返回输入对话框组合框中使用的项目 " .ti -1c .RI "void \fBsetIntValue\fP (int value)" .br .RI "设置int类型值 " .ti -1c .RI "int \fBintValue\fP () const" .br .RI "获取int类型值 " .ti -1c .RI "void \fBsetIntMinimum\fP (int min)" .br .RI "设置int类型最小值 " .ti -1c .RI "int \fBintMinimum\fP () const" .br .RI "获取int类型最小值 " .ti -1c .RI "void \fBsetIntMaximum\fP (int max)" .br .RI "设置int类型最大值 " .ti -1c .RI "int \fBintMaximum\fP () const" .br .RI "获取int类型最大值 " .ti -1c .RI "void \fBsetIntRange\fP (int min, int max)" .br .RI "设置int类型值范围 " .ti -1c .RI "void \fBsetIntStep\fP (int step)" .br .RI "设置步长 " .ti -1c .RI "int \fBintStep\fP () const" .br .RI "获取int类型步长 " .ti -1c .RI "void \fBsetDoubleValue\fP (double value)" .br .RI "设置double类型值 " .ti -1c .RI "double \fBdoubleValue\fP () const" .br .RI "获取double类型值 " .ti -1c .RI "void \fBsetDoubleMinimum\fP (double min)" .br .RI "设置double类型最小值 " .ti -1c .RI "double \fBdoubleMinimum\fP () const" .br .RI "获取double类型最小值 " .ti -1c .RI "void \fBsetDoubleMaximum\fP (double max)" .br .RI "设置double类型最大值 " .ti -1c .RI "double \fBdoubleMaximum\fP () const" .br .RI "获取double类型最大值 " .ti -1c .RI "void \fBsetDoubleRange\fP (double min, double max)" .br .RI "设置double类型值范围 " .ti -1c .RI "void \fBsetDoubleDecimals\fP (int decimals)" .br .RI "以小数为单位设置双自旋盒的精度 " .ti -1c .RI "int \fBdoubleDecimals\fP () const" .br .RI "获取双自旋盒的精度 " .ti -1c .RI "void \fBsetOkButtonText\fP (const QString &text)" .br .RI "设置OK按钮的文本 " .ti -1c .RI "QString \fBokButtonText\fP () const" .br .RI "获取OK按钮的文本 " .ti -1c .RI "void \fBsetCancelButtonText\fP (const QString &text)" .br .RI "设置cancel按钮的文本 " .ti -1c .RI "QString \fBcancelButtonText\fP () const" .br .RI "获取cancel按钮的文本 " .ti -1c .RI "void \fBopen\fP (QObject *receiver, const char *member)" .br .RI "将对话框显示为窗口模式对话框,并立即返回。 " .ti -1c .RI "QSize \fBminimumSizeHint\fP () const override" .br .RI "获取部件的推荐最小尺寸 " .ti -1c .RI "QSize \fBsizeHint\fP () const override" .br .RI "获取保存部件的推荐尺寸 " .ti -1c .RI "void \fBsetVisible\fP (bool visible) override" .br .RI "设置窗口部件是否可见 " .ti -1c .RI "QString \fBplaceholderText\fP () const" .br .RI "获取背景提示文本 " .ti -1c .RI "void \fBsetPlaceholderText\fP (const QString &)" .br .RI "设置背景提示文本 " .ti -1c .RI "void \fBsetDoubleStep\fP (double step)" .br .RI "设置doubel类型步长 " .ti -1c .RI "double \fBdoubleStep\fP () const" .br .RI "获取doubel类型步长 " .ti -1c .RI "void \fBdone\fP (int result) override" .br .in -1c Public Member Functions inherited from \fBkdk::KDialog\fP .in +1c .ti -1c .RI "\fBKDialog\fP (QWidget *parent=nullptr)" .br .ti -1c .RI "void \fBsetWindowIcon\fP (const QIcon &icon)" .br .RI "设置对话框图标 " .ti -1c .RI "void \fBsetWindowIcon\fP (const QString &iconName)" .br .RI "设置对话框图标 " .ti -1c .RI "void \fBsetWindowTitle\fP (const QString &)" .br .RI "设置对话框标题名称 " .ti -1c .RI "QPushButton * \fBmaximumButton\fP ()" .br .RI "获取最大化按钮 " .ti -1c .RI "QPushButton * \fBminimumButton\fP ()" .br .RI "获取最小化按钮 " .ti -1c .RI "QPushButton * \fBcloseButton\fP ()" .br .RI "获取关闭按钮 " .ti -1c .RI "\fBKMenuButton\fP * \fBmenuButton\fP ()" .br .RI "获取下拉菜单按钮 " .ti -1c .RI "QWidget * \fBmainWidget\fP ()" .br .RI "获取主内容区Widget " .ti -1c .RI "\fBKWindowButtonBar\fP * \fBwindowButtonBar\fP ()" .br .RI "windowButtonBar " .ti -1c .RI "\fBKIconBar\fP * \fBiconBar\fP ()" .br .RI "iconBar " .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static QString \fBgetText\fP (QWidget *parent, const QString &label, QLineEdit::EchoMode echo=QLineEdit::Normal, const QString &text=QString(), bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints=Qt::ImhNone)" .br .RI "静态便利函数,用于从用户处获取单行字符串。 " .ti -1c .RI "static QString \fBgetMultiLineText\fP (QWidget *parent, const QString &label, const QString &text=QString(), bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints=Qt::ImhNone)" .br .RI "静态便利函数,用于从用户处获取多行字符串。 " .ti -1c .RI "static QString \fBgetItem\fP (QWidget *parent, const QString &label, const QStringList &items, int current=0, bool editable=true, bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints=Qt::ImhNone)" .br .RI "静态便利函数,用于让用户从字符串列表中选择一个项目。 " .ti -1c .RI "static int \fBgetInt\fP (QWidget *parent, const QString &label, int value=0, int minValue=\-2147483647, int maxValue=2147483647, int step=1, bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())" .br .RI "静态便利函数,用于从用户处获取整数输入值。 " .ti -1c .RI "static double \fBgetDouble\fP (QWidget *parent, const QString &label, double value=0, double minValue=\-2147483647, double maxValue=2147483647, int decimals=1, bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())" .br .RI "静态便利函数,用于从用户处获取浮点数。 " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBchangeTheme\fP ()" .br .in -1c Protected Member Functions inherited from \fBkdk::KDialog\fP .in +1c .ti -1c .RI "bool \fBeventFilter\fP (QObject *target, QEvent *event) override" .br .ti -1c .RI "void \fBchangeTheme\fP ()" .br .ti -1c .RI "void \fBchangeIconStyle\fP ()" .br .ti -1c .RI "QBoxLayout * \fBmainLayout\fP ()" .br .in -1c .SH "Detailed Description" .PP 输入对话框,接口与 QInputDialog 相同。 .PP \fBSince\fP .RS 4 1\&.0\&.0 .RE .PP .SH "Author" .PP Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code\&.