xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QCore.xcsm
浏览该文件的文档.
1package Qt{
2 @SuppressWarnings public class QCore : QNative {
3 public QCore() {
4 }
5 public QCore(int type) throws IllegalArgumentException {
6 nativehandle = QtXnl.createQObject(type, this, 0);
7 if (nativehandle == 0) {
8 throw new IllegalArgumentException("can't new Object");
9 }
10 }
11 public QCore(int type, QNative parent) throws IllegalArgumentException{
12 if (parent == nilptr) {
13 throw new IllegalArgumentException("parent is null");
14 }
15 nativehandle = QtXnl.createQObject(QType.qtWidget, this, parent.nativehandle);
16 if (nativehandle == 0) {
17 throw new IllegalArgumentException("can't new Object");
18 }
19 }
20
21 public QCore(long handle) {
22 super(handle);
23 }
24
25 public Object subClass(@NotNilptr QCore object) {
26 if (QtXnl.core_sub_class(nativehandle, this, object)) {
27 object.nativehandle = nativehandle;
28 nativehandle = 0;
29 return object;
30 }
31 return nilptr;
32 }
33
34 public static bool openUrl(String url) {
35 return 0 != QtXnl.long_string2(0, Constant.OPENURL, url, nilptr);
36 }
37 public static bool openLocal(String url) {
38 return 0 != QtXnl.long_string2(0, Constant.OPENLOCAL, url, nilptr);
39 }
40 public void Notify(long eventid) {
41 QtXnl.widget_set_native_value(nativehandle, Constant.XNOTIFY, eventid);
42 }
43 public void Notify(long eventid, String tag) {
44 QtXnl.long_longstring(nativehandle, Constant.XNOTIFY, eventid, tag);
45 }
46 public static void setClipboardText(String text) {
47 QtXnl.widget_slot_string(0, Constant.CLIPBOARDTEXT, text);
48 }
49 public static String getClipboardText() {
50 return (String)QtXnl.core_getString(0, Constant.CLIPBOARDTEXT);
51 }
52 public static void setClipboardImage(@NotNilptr QImage img) {
53 QtXnl.widget_set_native_value(0, Constant.CLIPBOARDIMAGE, img.himage);
54 }
55 public static QImage getClipboardImage() {
56 QImage img = nilptr;
57 long handle = QtXnl.object_get_long_int(0, Constant.CLIPBOARDIMAGE, 0, 0);
58 if (handle != 0) {
59 img = new QImage();
60 img.himage = handle;
61 }
62 return img;
63 }
64 };
65};
static bool openLocal(String url)
Definition QCore.xcsm:37
static QImage getClipboardImage()
Definition QCore.xcsm:55
static String getClipboardText()
Definition QCore.xcsm:49
QCore(long handle)
Definition QCore.xcsm:21
static bool openUrl(String url)
Definition QCore.xcsm:34
void Notify(long eventid, String tag)
Definition QCore.xcsm:43
Object subClass(@NotNilptr QCore object)
Definition QCore.xcsm:25
void Notify(long eventid)
Definition QCore.xcsm:40
static void setClipboardImage(@NotNilptr QImage img)
Definition QCore.xcsm:52
QCore(int type, QNative parent)
Definition QCore.xcsm:11
static void setClipboardText(String text)
Definition QCore.xcsm:46
字符串类