Declare Class "QWidget" Declare Sub "QWidget" void clearMask(); Declare Class "QAbstractButton" Declare Signal "QAbstractButton" void pressed(); 'Signal on_pushButton_pressed() ' is working ' MsgBox("on_pushButton_pressed") 'End Signal Declare Class "QNeedleIndicator" SuperClass "QWidget" Declare Sub "QNeedleIndicator" void setMajorTicks(int ticks); Declare Function "QNeedleIndicator" int getMajorTicks(void); Declare Sub "QNeedleIndicator" void setMinorTicks(int ticks); Declare Function "QNeedleIndicator" int getMinorTicks(void); Declare Sub "QNeedleIndicator" void setDigitFont(QFont font); Declare Function "QNeedleIndicator" QFont getDigitFont(void); Declare Sub "QNeedleIndicator" void setRange(qreal min, qreal max); Declare Sub "QNeedleIndicator" void setMinValue(qreal min); Declare Function "QNeedleIndicator" qreal getMinValue(void); Declare Sub "QNeedleIndicator" void setMaxValue(qreal max); Declare Function "QNeedleIndicator" qreal getMaxValue(void); Declare Sub "QNeedleIndicator" void setAnimated(bool anim); Declare Function "QNeedleIndicator" bool isAnimated(void); Declare Sub "QNeedleIndicator" void setLabel(QString label); Declare Function "QNeedleIndicator" QString getLabel(void); Declare Sub "QNeedleIndicator" void setDigitFormat(QString fmt); Declare Function "QNeedleIndicator" QString getDigitFormat(void); Declare Sub "QNeedleIndicator" void setGapAngle(qreal gap); Declare Function "QNeedleIndicator" qreal getGapAngle(void); Declare Sub "QNeedleIndicator" void setLabelOffset(qreal offset); Declare Function "QNeedleIndicator" qreal getLabelOffset(void); Declare Function "QNeedleIndicator" qreal getValue(void); Declare Sub "QNeedleIndicator" Alias "setValue" void setValue(qreal value); Declare Const Qt::NoButton As Integer Declare Enum Qt::MouseButton As Integer { Qt::NoButton, Qt::LeftButton, Qt::RightButton, Qt::MidButton } Dim mmm As myTest99 Signal on_mmm_testSignal(s As String) MsgBox(s) End Signal Declare Class "test99" SuperClass "QWidget" Declare Sub "test99" void raiseSignal(); Declare Signal "test99" void testSignal(QString s); Declare Event "test99" void testEvent(QString s); Dim myTest As test99 Signal on_myTest_testSignal(s As String) MsgBox(s) End Signal Outlet widget As QNeedleIndicator Set Outlet widget_2 As QNeedleIndicator Set Outlet widget_3 As QNeedleIndicator Set Outlet ImageButton2 As ImageButton Set 'Signal on_ImageButton2_clicked(Checked As Boolean) ' imagebutton has no signals yet 'End Signal Outlet mdiArea As QMdiArea Signal on_mdiArea_GotFocusMDI(theWidget As QWidget) MsgBox("on_mdiArea_GotFocusMDI" & theWidget) End Signal Outlet menubar As QMenuBar Signal on_menubar_hovered(action As QAction) MsgBox("on_menubar_hovered") End Signal Outlet aLabel As Label Set Signal on_aLabel_MouseDown(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean) MsgBox("!on_aLabel_MouseDown " & LeftButton & RightButton & MidButton) Dim w As QWidget = OpenMDI("mytest") End Signal Event Init() If Contains("Argument", "Search") Then MsgBox(Asc("GUT")) MsgBox(Asc("GUT", 2)) End If 'Dim ww As QWidget 'Dim oo As QPushButton ' TODO ww = oo 'Dim InputId As String 'InputId = Null 'If InputId = Null Then ' MsgBox("Null" & "\n") ' Else ' MsgBox(InputId & "\n") ' End If ' Open "C:\\Users\\Bernd\Desktop\\Neues Textdokument (2).txt" For Input Access Read As 1 ' Do While Not EOF(1) ' Dim sLine9 As String ' Line Input 1, sLine9 ' MsgBox(sLine9) ' Loop Dim vq As Qt::MouseButton vq = Qt::NoButton 'MsgBox(vq) 'MsgBox(Qt::NoButton) 'MsgBox(Qt::LeftButton) widget.ContextMenuPolicy = 0 widget.ShowFullScreen() widget.clearMask() widget.setRange(0, 10) widget.setRange(Float(0), Float(10)) widget.setMajorTicks(11) widget.setMinorTicks(8) widget.setLabel("Voltage") widget.setValue(5) widget_2.setRange(0, 10) widget_2.setMajorTicks(5) widget_2.setMinorTicks(4) widget_2.setGapAngle(200) widget_2.setLabelOffset(0.4) widget_2.setLabel("Current") widget_2.setAnimated( False) 'widget_2.setDigitFont(QFont("Fixed", 10, QFont::Bold)) widget_2.setDigitFormat("%.1f") widget_2.setValue(5) widget_3.setRange(0, 50) widget_3.setDigitFormat("%.0f") widget_3.setMajorTicks(11) widget_3.setMinorTicks(0) widget_3.setGapAngle(120) widget_3.setLabel("Pressure") widget_3.setValue(5) ImageButton2.Enabled = True ImageButton2.Checkable = True ImageButton2.Checked = True ImageButton2.EnabledImage = "enabledimage2.jpg" ImageButton2.EnterImage = "enterimage2.jpg" ImageButton2.MouseDownImage = "mousedownimage2.jpg" ImageButton2.EnterSound = "neon_light.wav" ImageButton2.ExitSound = "gong.wav" ImageButton2.MouseDownSound = "neon_light.wav" ImageButton2.MouseUpSound = "gong.wav" ImageButton2.CheckedEnabledImage = "checkedenabledimage2.jpg" ImageButton2.CheckedDisabledImage = "checkeddisabledimage2.jpg" ImageButton2.CheckedEnterImage = "checkedenterimage2.jpg" ImageButton2.CheckedMouseDownImage = "checkedmousedownimage2.jpg" ImageButton2.Caption = "Left" ' MsgBox(ImageButton2.EnabledImage) 'MsgBox(ImageButton2.Caption) End Event Public Dim s As String = "Gut" Public Dim ss As String = "Besser" Dim tut As Integer Public Outlet label As QLabel Public Outlet pushButton As QPushButton Public Sub bbb(i As Integer) MsgBox("bbb") End Sub Public Function aaa() Return "aaa" End Function Public Dim my As myClass 'Public Dim my2 As myClass2 Sub testtt() Static Dim aaa As Integer 'Static Dim ooo[100, 22] As Integer ' throws an error, because static with array is not allowed 'Static Dim ooo As type1 ' throws an error, because static with udf is not allowed Dim oooo[100, 22] As Integer ' ooo = oooo ''ooo[10] = 89 '' ooo[4, 5] = oooo[10] ' ooo[4, 5] = oooo[4, 5] Dim vvv[] As Integer ReDim Preserve vvv[10] ' anzahl index wird nicht �berpr�ft bei [] -> nur runtime 'vvv[333, 7, 888] = 8 ' out of bounds nur wenn eigentlcihe dimension zu gro� ' MsgBox(vvv[3, 7, 888]) Dim uu[20, 60] As id Dim ss As String Dim x As Integer Dim y As Integer For y = 0 To 6 - 1 For x = 0 To 2 - 1 uu[x, y] = " " & (x + y * 10) ss = ss & " " & (x + y * 10) Next ss = ss & "\n" Next MsgBox(ss) ' MsgBox(UBound(uu)) ' anzahl der dimensionen ' MsgBox(UBound(uu, 0)) ' obergrenze erste dimension ' MsgBox(UBound(uu, 1)) ' obergrenze zweite dimension ' uu[899] = 8 ' falscher array zugriff assignment ' MsgBox(uu[899]) ' falscher array zugriff expression MsgBox("MsgBox(uu)", uu) ' gesamtarray zugriff expression ReDim Preserve uu[20, 8] ' ,5 wenn anzahl der dimension sich ?ndert, compilerfehler MsgBox(uu) ' gesamtarray zugriff expression Dim v[] As String v = returnArray() MsgBox("returnArray", v) v = uu Dim d As Integer = 9 ' byref MsgBox(d) testbyref(d) MsgBox(d) Dim aa[10, 10] As String aa[1, 1] = "gut" ' byref MsgBox(aa) testbyref2(aa) MsgBox(aa) End Sub Function returnArray() As id[] Dim a[10, 10] As id a[1, 1] = "freitag" Return a End Function Sub testbyref(d As Integer) d = 888 End Sub Sub testbyref2(aa[] As String) ReDim aa[10, 10] aa[1, 1] = "besser" End Sub Sub printArray(qv[] As String) Dim x As Integer Dim y As Integer Dim s As String For y = 0 To UBound(qv, 1) - 1 For x = 0 To UBound(qv, 0) - 1 s = s & " !" & qv[x, y] Next s = s & "\n" Next MsgBox(s) End Sub Signal on_pushButton_clicked(Checked As Boolean) 'my2.myVar2 = 334 'MsgBox(my2.myVar2) my.myVar2 = 334 MsgBox(my.myVar2) mmm.raiseSignal() myTest.raiseSignal() Return testtt() Dim tt2[88, 77] As myClass.type2 tt2[7, 5].b2[3].c = 777 MsgBox(tt2[7, 5].b2[3].c) 'Dim tt2 As myClass.type2 'tt2.b2[3].c = 777 'MsgBox(tt2.b2[3].c) 'tt2[7, 5].c2 = 777 ' MsgBox(tt2[7, 5].c2) 'tt2[7, 5].b2.c = 777 'MsgBox(tt2[7, 5].b2.c) Dim qqq[99] As Integer qqq[10] = 4444 MsgBox(qqq[10]) Return Dim t1 As type1 Dim t2 As myClass.type2 'Dim t3 As type3 Dim t4 As type4 t2.b2.c = 777 MsgBox(t2.b2.c) t1.a = 9 MsgBox(t1.a) Dim ddd ddd = t1.a MsgBox(ddd) Return Dim w1 As enum1 Dim w2 As myClass.enum2 'Dim w3 As myClass.enum3 Dim w4 As global_enum w1 = enum1.my1Const77 w2 = myClass.enum2.my2Const77 ' w3 = enum3.my3Const77 w4 = global_enum.my4Const77 MsgBox(w4 ) Return Global.myVar2 = 134 MsgBox(Global.myVar2) myClass.myVar2 = 234 MsgBox(myClass.myVar2) my.myVar2 = 334 MsgBox(my.myVar2) Dim k As MainWindow = Me k.my.myVar2 = 434 MsgBox(k.my.myVar2) Return Const d = 34 'd = 3455 Dim _gut_bgg Var _gut_bghhg Dim sgfdf As id = QWidget() sgfdf = QWidget() k = MainWindow() k = id() 'MsgBoxTODO(myClass.bernd) ' test global keyword MsgBox(myFunc()) mySub() myVar = 99999999 MsgBox(myVar) MsgBox(myConst) 'myConst = 777777777 Return k.my = myClass() MsgBox("B") ' MsgBox("????3") k.my.bernd = "!!!!" MsgBox("C") MsgBox("????4") MsgBox(k.my.bernd & "k.my.bernd") ' k.my.label = label k.my.label.Text = "!!!!" ' k.my.label.Show() ' MsgBox(k.my.label.Actions()) k.my.test123() MsgBox(k.my.test(999)) 'myClass.label = label ' singleton object of a class myClass.bernd = "myClass.bernd = !!!!" MsgBox(myClass.bernd) ' myClass.label.Text = "!!!!" ' myClass.label.Show() ' MsgBox(myClass.label.Actions()) myClass.test123() my.bernd = "!!!!" ' my.label.Text = "!!!!" my.test123() MsgBox(my.test(999)) k.s = "88" MsgBox(k.s) k.bbb(999) MsgBox(k.aaa()) 'label = pushButton ' label = Me 'Me = label ' MsgBox(Me) ' s = "1" ' MsgBox(s) ' Me Me.s = "1" MsgBox(Me.s) bbb(999) Me.bbb(999) MsgBox(aaa()) MsgBox(Me.aaa()) MsgBox("111") ' global object / object access test2() MsgBox("111____aaa") Global.test2() MsgBox("111____bbb") MsgBox(test(999)) MsgBox("111____ccc") MsgBox(Global.test(999)) MsgBox("111____ddd") MsgBox("111aaa") global_s = "1" MsgBox("111bbb") MsgBox(global_s) MsgBox("111ccc") Global.global_s = "19" MsgBox("111ddd") MsgBox(Global.global_s) MsgBox("222") ' usage of built-in class MsgBox("Hello world") label.Text = s ' me class variable label.Show() MsgBox("333") MsgBox(label.Actions()) pushButton.Text = label.Text Dim sss As String = "paulaner" label.Text = sss ' local variable End Signal Event CloseEvent(e As QCloseEvent) End Event 'Event ResizeEvent(e As QResizeEvent) ' MsgBox("ResizeEvent") 'End Event