Update RingQt - GUILib - MsgInfo() Function.
@@ -21,6 +21,15 @@ func setbtnimage pBtn,cImage
if cImage = NULL return ok
pBtn.setIcon(new qicon(new qpixmap(cImage)))
+func MsgInfo cTitle,cMessage
+ new qmessagebox(null)
+ {
+ setwindowtitle(cTitle)
+ setstandardbuttons(QMessageBox_Ok)
+ settext(cMessage)
+ exec()
+ }
+
func confirmMsg cTitle,cMessage
new qmessagebox(null)
{
@@ -28,12 +37,9 @@ func confirmMsg cTitle,cMessage
setstandardbuttons(QMessageBox_Yes | QMessageBox_No)
settext(cMessage)
result = exec()
- if result = QMessageBox_Yes
- return 1
- but result = QMessageBox_No
- return 0
- ok
}
+ if result = QMessageBox_Yes return 1 ok
+ return 0
func InputBox cTitle,cMessage
oInput = new QInputDialog(null)
@@ -42,10 +48,8 @@ func InputBox cTitle,cMessage
setgeometry(100,100,400,50)
setlabeltext(cMessage)
lcheck = exec()
- if lCheck
- return oInput.textvalue()
- ok
}
+ if lCheck return oInput.textvalue() ok
func InputBoxNum cTitle,cMessage
oInput = new QInputDialog(null)
@@ -55,10 +59,8 @@ func InputBoxNum cTitle,cMessage
setlabeltext(cMessage)
setInputMode(2) # Accept Number (Double)
lcheck = exec()
- if lCheck
- return oInput.doublevalue()
- ok
}
+ if lCheck return oInput.doublevalue() ok
Class GUILib
