From 7a6f5b2c1d83fe62c62f0c30cad28eb091d52dfe Mon Sep 17 00:00:00 2001 From: necoro <> Date: Fri, 20 Apr 2007 14:44:45 +0000 Subject: Made qt plugin-ready; lots of documentation --- portato/gui/qt/helper.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'portato/gui/qt/helper.py') diff --git a/portato/gui/qt/helper.py b/portato/gui/qt/helper.py index 1b7dbdc..fa1576a 100644 --- a/portato/gui/qt/helper.py +++ b/portato/gui/qt/helper.py @@ -13,10 +13,23 @@ from PyQt4 import Qt def qCheck (check): + """Maps True or False to Qt.Checked or Qt.Unchecked. + + @param check: boolean value + @type check: bool + @returns: CheckState-Constant + @rtype: int""" + if check: return Qt.Qt.Checked else: return Qt.Qt.Unchecked def qIsChecked (check): + """Maps Qt.Checked and Qt.Unchecked to True and False. + + @param check: CheckState-Constant + @type check: int + @returns: appropriate boolean value + @rtype: bool""" return check == Qt.Qt.Checked -- cgit v1.2.3-70-g09d2