summaryrefslogtreecommitdiff
path: root/portato/gui/qt/helper.py
diff options
context:
space:
mode:
authornecoro <>2007-04-20 14:44:45 +0000
committernecoro <>2007-04-20 14:44:45 +0000
commit7a6f5b2c1d83fe62c62f0c30cad28eb091d52dfe (patch)
treec14d3a2f65fe0ff5799ba1673a73dc7ff3799d44 /portato/gui/qt/helper.py
parent524f67fb5a96f0f50b595023f46895e741654b59 (diff)
downloadportato-7a6f5b2c1d83fe62c62f0c30cad28eb091d52dfe.tar.gz
portato-7a6f5b2c1d83fe62c62f0c30cad28eb091d52dfe.tar.bz2
portato-7a6f5b2c1d83fe62c62f0c30cad28eb091d52dfe.zip
Made qt plugin-ready; lots of documentation
Diffstat (limited to 'portato/gui/qt/helper.py')
-rw-r--r--portato/gui/qt/helper.py13
1 files changed, 13 insertions, 0 deletions
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