xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QSoundEffect.x
浏览该文件的文档.
1//xlang Source, Name:qt5/widgets/QSoundEffect.x
2//Date: Fri Oct 05:03:46 2022
3package Qt{
4 @SuppressWarnings public class QSoundEffect : QObject{
5 public QSoundEffect() {}
6 public QSoundEffect(long handle){
7 super(handle);
8 }
9 public bool create() {
10 nativehandle = QtXnl.createQObject(QType.qtSoundEffect, this, 0l);
11 if (nativehandle == 0){
12 return false;
13 }
14 return true;
15 }
16 public bool create(@NotNilptr QObject parent) {
17 nativehandle = QtXnl.createQObject(QType.qtSoundEffect, this, parent.nativehandle);
18 if (nativehandle == 0){
19 return false;
20 }
21 return true;
22 }
23 public void setLocalSource(String file){
24 QtXnl.widget_slot_string(nativehandle, Constant.SOUNDEFSETURI, file);
25 }
26 public void play(){
27 QtXnl.widget_slot(nativehandle, Constant.QSOUNDEFFECT_PLAY);
28 }
29 public void stop(){
30 QtXnl.widget_slot(nativehandle, Constant.QSOUNDEFFECT_STOP);
31 }
32 public void setVolume(int volume){
33 QtXnl.widget_set_vint_value(nativehandle, Constant.QSOUNDEFFECT_SETVOLUME, volume);
34 }
35 public void setLoopCount(int loop){
36 QtXnl.widget_set_vint_value(nativehandle, Constant.QSOUNDEFFECT_SETLOOPCOUNT, loop);
37 }
38 };
39};
bool create(@NotNilptr QObject parent)
void setLocalSource(String file)
void setVolume(int volume)
void setLoopCount(int loop)
字符串类