xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QDialogButtonBox.x
浏览该文件的文档.
1//xlang Source, Name:qt5/QDialogButtonBox.x
2//Date: Fri Dec 01:16:38 2023
3package Qt{
4 public interface onDialogButtonBoxListener{
5 void clicked(QDialogButtonBox , QAbstractButton button) ;
6 void accepted(QDialogButtonBox ) ;
7 void helpRequested(QDialogButtonBox ) ;
8 void rejected(QDialogButtonBox );
9 };
10
11 public class QDialogButtonBox : QWidget{
12
13 onDialogButtonBoxListener lis;
14
16
17 }
18
19 public QDialogButtonBox(long h) {
20 super(h);
21 }
22
23 public bool create() {
24 nativehandle = QtXnl.createQObject(QType.qtButtonBox, this, 0);
25 if (nativehandle == 0) {
26 return false;
27 }
28 return true;
29 }
30
31 public bool create(@NotNilptr QWidget parent) {
32 nativehandle = QtXnl.createQObject(QType.qtButtonBox, this, parent.nativehandle);
33 if (nativehandle == 0) {
34 return false;
35 }
36 return true;
37 }
38
39 public void setOrientation(int Orientation){
40 QtXnl.widget_set_vint_value(nativehandle, Constant.QDBB_setOrientation, Orientation);
41 }
42
43 public int orientation(){
44 return QtXnl.widget_get_int_value(nativehandle, Constant.QDBB_QPORIENTATION);
45 }
46
47 public void addButton(QAbstractButton button, ButtonRole role){
48 QtXnl.widget_set_intlongint_value(nativehandle, Constant.QDBB_QDBB_addButton, button.nativehandle, role, 0);
49 }
50
51 public QPushButton addButton(String text, ButtonRole role){
52 return (QPushButton)QtXnl.object_get_handle_string(nativehandle, Constant.QDBB_QDBB_addButton, role, text);
53 }
54
55 public QPushButton addButton(StandardButton button){
56 return (QPushButton)QtXnl.object_get_handle_string(nativehandle, Constant.QDBB_QDBB_addButton1, button, nilptr);
57 }
58
59 public void removeButton(QAbstractButton button){
60 QtXnl.widget_set_native_value(nativehandle, Constant.QDBB_RemoveBotton, button.nativehandle);
61 }
62
63 public void clear(){
64 QtXnl.widget_slot(nativehandle, Constant.QDBB_Clear);
65 }
66
67 public void clicked(QAbstractButton button) {
68 if (lis != nilptr){
69 lis.clicked(this, button);
70 }
71 }
72
73 public void accepted() {
74 if (lis != nilptr){
75 lis.accepted(this);
76 }
77 }
78
79 public void helpRequested() {
80 if (lis != nilptr){
81 lis.helpRequested(this);
82 }
83 }
84
85 public void rejected() {
86 if (lis != nilptr){
87 lis.rejected(this);
88 }
89 }
90 };
91};
void clicked(QAbstractButton button)
onDialogButtonBoxListener lis
QPushButton addButton(StandardButton button)
void addButton(QAbstractButton button, ButtonRole role)
void setOrientation(int Orientation)
bool create(@NotNilptr QWidget parent)
QPushButton addButton(String text, ButtonRole role)
void removeButton(QAbstractButton button)
字符串类
void helpRequested(QDialogButtonBox )
void rejected(QDialogButtonBox )
void accepted(QDialogButtonBox )