xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QTableWidget.xcsm
浏览该文件的文档.
1//xlang Source, Name:qt5/widgets/QTableWidget.xcsm
2//Date: Mon Feb 18:20:25 2019
3
4package Qt{
5 @SuppressWarnings public class QTableWidget : QAbstractItemView{
6 public QTableWidget(){
7
8 }
9
10 public QTableWidget(long handle){
11 super(handle);
12 }
13
14 public bool create() override {
15 nativehandle = QtXnl.createQObject(QType.qtTableWidget, this, 0);
16 if (nativehandle == 0){
17 return false;
18 }
19 return true;
20 }
21
22 public bool create(@NotNilptr QWidget parent) override {
23 nativehandle = QtXnl.createQObject(QType.qtTableWidget, this, parent.nativehandle);
24 if (nativehandle == 0){
25 return false;
26 }
27 return true;
28 }
29
30 public long setItem(int row, int column, String icon, String text){
31 return QtXnl.long_long_string2(nativehandle, Constant.TABLESETITEM, ((long)row) << 32 | column, icon, text);
32 }
33
34 public void setColumnCount(int c){
35 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETCOLUMNCNT, c);
36 }
37
38 public int columnCount(){
39 return QtXnl.widget_get_int_value(nativehandle, Constant.QTABLEWIDGET_COLCOUNT);
40 }
41
42
43 public void setRowCount(int c){
44 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETROWCNT, c);
45 }
46
47 public int rowCount(){
48 return QtXnl.widget_get_int_value(nativehandle, Constant.QTABLEWIDGET_ROWCOUNT);
49 }
50
51 public int currentRow(){
52 return QtXnl.widget_get_int_value(nativehandle, Constant.QTABLEWIDGET_CURROW);
53 }
54
55 public int currentColumn(){
56 return QtXnl.widget_get_int_value(nativehandle, Constant.QTABLEWIDGET_CURCOL);
57 }
58
59 public void removeRow(int n){
60 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLEREMOVEROW, n);
61 }
62
63 public void removeColumn(int n){
64 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLEREMOVECOLUMN, n);
65 }
66
67 public void selectRow(int n){
68 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESELECTROW, n);
69 }
70
71 public void modifyItemFlags(long item, int add, int remove){
72 QtXnl.widget_set_v2int_value(item, Constant.TABLEITEMFLAG, add, remove);
73 }
74
75 public void setItemTag(long item, long tag){
76 QtXnl.object_set_long_int_long(nativehandle, Constant.TABLESETTAG, item, 0, tag);
77 }
78
79 public long getTag(long item){
80 return QtXnl.object_get_long_int(0,Constant. TABLEGETTAG, item, 0);
81 }
82
83 public void setHHStretchLastSection(bool b){
84 QtXnl.widget_set_bool_value(nativehandle, Constant.TABLESETHHLS, b);
85 }
86 public void setVHResizeMode(int b){
87 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETVHRM, b);
88 }
89 public void setVHDefaultSectionSize(int b){
90 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETVHDSS, b);
91 }
92 public void setShowGrid(bool s){
93 QtXnl.widget_set_bool_value(nativehandle, Constant.TABLESETSG, s);
94 }
95 public void setVHVisible(bool bv){
96 QtXnl.widget_set_bool_value(nativehandle, Constant.TABLESETVHV, bv);
97 }
98 public void setSelectionMode(int sm){
99 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETSM, sm);
100 }
101 public void setSelectionBehavior(int sb){
102 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETSB, sb);
103 }
104 public void setEditTriggers(int et){
105 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETET, et);
106 }
107 public void resizeHHSection(int row, int size){
108 QtXnl.widget_set_v2int_value(nativehandle, Constant.TABLESETHHRS, row, size);
109 }
110 public void setHHFixedHeight(int h){
111 QtXnl.widget_set_vint_value(nativehandle, Constant.TABLESETHHFH, h);
112 }
113 public void setHHColumns(String [] columns){
114 QtXnl.widget_set_object_value(nativehandle, Constant.SETTABHHCOLUMNS, columns);
115 }
116 public void setVHColumns(String [] columns){
117 QtXnl.widget_set_object_value(nativehandle, Constant.SETTABVHCOLUMNS, columns);
118 }
119 public String getText(int x, int y){
120 return (String)QtXnl.core_getStringlongint(nativehandle, Constant.TABLEGETTEXTBYRC, x, y);
121 }
122 public String getItemText(long item){
123 return (String)QtXnl.core_getStringlongint(item, Constant.TABLEGETTEXTBYITEM, 0, 0);
124 }
125 public void clear(){
126 QtXnl.widget_slot(nativehandle, Constant.TABLECLEAR);
127 }
128 public void clearContent(){
129 QtXnl.widget_slot(nativehandle,Constant. TABLECLEARCONTENT);
130 }
131 public long[] getSelectedItems(){
132 return (long[])QtXnl.widget_get_object(nativehandle, Constant.TABLEGETSELITEM);
133 }
134 public long getItem(int row, int column){
135 return QtXnl.object_get_long_int(nativehandle,Constant. TABLEGETITEM, row, column);
136 }
137 public QRect [] getSelectedRanges(){
138 long [] rs = (long[])QtXnl.widget_get_object(nativehandle, Constant.TABLEGETSELRANGE);
139 if (rs != nilptr){
140 QRect []rgs = new QRect[rs.length / 2];
141
142 for (long i =0, c = rgs.length; i < c; i++){
143 QRect r = new QRect((int)(rs[i * 2] >> 32) & 0xffffffff, (int)(rs[i * 2 + 1] >> 32) & 0xffffffff, (int)rs[i * 2] & 0xffffffff, (int)rs[i * 2 + 1] & 0xffffffff);
144 rgs[i] = r;
145 }
146
147 return rgs;
148 }
149 return nilptr;
150 }
151 public void setItemText(long item, String text){
152 QtXnl.widget_set_intlongstring_value(0, Constant.SETTABLEITEMTEXT, item, 0, text);
153 }
154 public void setItemIcon(long item , String iconFile){
155 QtXnl.widget_set_intlongstring_value(0, Constant.SETTABLEITEMICON, item, 0, iconFile);
156 }
157 public void setItemColor(long item, int color){
158 QtXnl.widget_set_intlongint_value(nativehandle, Constant.SETTABLEITEMCOLOR, item, 0, color);
159 }
160 public void setItemBackColor(long item, int color){
161 QtXnl.widget_set_intlongint_value(nativehandle, Constant.SETTABLEITEMBACKCOLOR, item, 0, color);
162 }
163 public void setItemCheck(long item , bool checked){
164 QtXnl.widget_set_int_bool_value(item, Constant.TABITEMSETCHECK, 0, checked);
165 }
166
167 public bool isItemCheck(long item){
168 return QtXnl.widget_get_int_bool(item, Constant.TABITEMGETCHECK, 0);
169 }
170
171 public int getItemFlags(long item){
172 return QtXnl.widget_get_int_value(item, Constant.TABITEMGETFLAG);
173 }
174
175 public void setCellWidget(int x,int y,@NotNilptr QWidget w){
176 QtXnl.widget_set_intlongint_value(nativehandle, Constant.TABLESETCELLWIDGET, w.nativehandle, x, y);
177 }
178
179 public QWidget getCellWidget(int x,int y){
180 return (QWidget)QtXnl.object_get_handle2(nativehandle, Constant.TABLEGETCELLWIDGET, x, y);
181 }
182
183 public QHeaderView verticalHeader(){
184 return (QHeaderView)QtXnl.widget_get_object(nativehandle, Constant.QTW_VERTICALHEADER);
185 }
186
187 public QHeaderView horizontalHeader(){
188 return (QHeaderView)QtXnl.widget_get_object(nativehandle, Constant.QTW_HORIZONTALHEADER);
189 }
190
191
194 public int rowViewportPosition(int row) {
195 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_ROWVIEWPORTPOSITION, row, 0);
196 }
197 public int rowAt(int y) {
198 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_ROWAT, y, 0);
199 }
200 public void setRowHeight(int row, int height){
201 QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_SETROWHEIGHT, row, height);
202 }
203 public int rowHeight(int row) {
204 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_ROWHEIGHT, row, 0);
205 }
206 public int columnViewportPosition(int column) {
207 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_COLUMNVIEWPORTPOSITION, column, 0);
208 }
209 public int columnAt(int x) {
210 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_COLUMNAT, x, 0);
211 }
212 public void setColumnWidth(int column, int width){
213 QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_SETCOLUMNWIDTH, column, width);
214 }
215 public int columnWidth(int column){
216 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_COLUMNWIDTH, column, 0);
217 }
218 public bool isRowHidden(int row) {
219 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_ISROWHIDDEN, row, 0) != 0;
220 }
221 public void setRowHidden(int row, bool hide){
222 QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_SETROWHIDDEN, row, hide ? 1 : 0);
223 }
224 public bool isColumnHidden(int column){
225 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_ISCOLUMNHIDDEN, column, 0) != 0;
226 }
227 public void setColumnHidden(int column, bool hide){
228 QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_SETCOLUMNHIDDEN, column, hide ? 1 : 0);
229 }
230 public void setSortingEnabled(bool enable){
231 QtXnl.widget_set_bool_value(nativehandle, Constant.QTV_SETSORTINGENABLED, enable);
232 }
233 public bool isSortingEnabled() {
234 return QtXnl.widget_get_bool_value(nativehandle, Constant.QTV_ISSORTINGENABLED);
235 }
236 public bool showGrid() {
237 return QtXnl.widget_get_bool_value(nativehandle, Constant.QTV_SHOWGRID);
238 }
239 public PenStyle gridStyle() {
240 return (PenStyle)QtXnl.widget_get_int_value(nativehandle, Constant.QTV_GRIDSTYLE);
241 }
242 public void setGridStyle(PenStyle style){
243 QtXnl.widget_set_vint_value(nativehandle, Constant.QTV_SETGRIDSTYLE, style);
244 }
245 public void setWordWrap(bool on){
246 QtXnl.widget_set_bool_value(nativehandle, Constant.QTV_SETWORDWRAP, on);
247 }
248 public bool wordWrap(){
249 return QtXnl.widget_get_bool_value(nativehandle, Constant.QTV_WORDWRAP);
250 }
251 public void setCornerButtonEnabled(bool enable){
252 QtXnl.widget_set_bool_value(nativehandle, Constant.QTV_SETCORNERBUTTONENABLED, enable);
253 }
254 public bool isCornerButtonEnabled() {
255 return QtXnl.widget_get_bool_value(nativehandle, Constant.QTV_ISCORNERBUTTONENABLED);
256 }
257 public void setSpan(int row, int column, int rowSpan, int columnSpan){
258 QtXnl.native_int4(nativehandle, Constant.QTV_SETSPAN, row, column, rowSpan, columnSpan);
259 }
260 public int rowSpan(int row, int column){
261 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_ROWSPAN, row, column);
262 }
263 public int columnSpan(int row, int column){
264 return QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_COLUMNSPAN, row, column);
265 }
266 public void clearSpans(){
267 QtXnl.widget_slot(nativehandle, Constant.QTV_CLEARSPANS);
268 }
269 public void sortByColumn(int column, Qt.SortOrder order){
270 QtXnl.widget_set_v2int_value(nativehandle, Constant.QTV_SORTBYCOLUMN, column, order);
271 }
272 };
273};
long getItem(int row, int column)
void setItemIcon(long item , String iconFile)
void modifyItemFlags(long item, int add, int remove)
void setVHColumns(String [] columns)
void setShowGrid(bool s)
void setSpan(int row, int column, int rowSpan, int columnSpan)
int rowAt(int y)
long [] getSelectedItems()
QWidget getCellWidget(int x,int y)
void setCellWidget(int x,int y,@NotNilptr QWidget w)
void setSortingEnabled(bool enable)
void setGridStyle(PenStyle style)
int getItemFlags(long item)
void setItemTag(long item, long tag)
QRect [] getSelectedRanges()
void setCornerButtonEnabled(bool enable)
void setEditTriggers(int et)
void setVHResizeMode(int b)
bool create() override
void setHHStretchLastSection(bool b)
int columnSpan(int row, int column)
void setItemText(long item, String text)
void setSelectionMode(int sm)
void setRowHidden(int row, bool hide)
int columnWidth(int column)
void resizeHHSection(int row, int size)
void setItemBackColor(long item, int color)
void removeColumn(int n)
void setVHVisible(bool bv)
void setWordWrap(bool on)
bool create(@NotNilptr QWidget parent) override
String getItemText(long item)
void setItemColor(long item, int color)
void setVHDefaultSectionSize(int b)
QHeaderView verticalHeader()
bool isCornerButtonEnabled()
bool isItemCheck(long item)
void removeRow(int n)
void setRowHeight(int row, int height)
bool isColumnHidden(int column)
void setColumnWidth(int column, int width)
void sortByColumn(int column, Qt.SortOrder order)
void setHHFixedHeight(int h)
void selectRow(int n)
int rowViewportPosition(int row)
int rowHeight(int row)
int rowSpan(int row, int column)
bool isRowHidden(int row)
void setHHColumns(String [] columns)
String getText(int x, int y)
void setColumnCount(int c)
QHeaderView horizontalHeader()
void setSelectionBehavior(int sb)
int columnAt(int x)
void setColumnHidden(int column, bool hide)
void setItemCheck(long item , bool checked)
long getTag(long item)
PenStyle gridStyle()
void setRowCount(int c)
long setItem(int row, int column, String icon, String text)
int columnViewportPosition(int column)
字符串类
Definition QCefQuery.x:3