summaryrefslogtreecommitdiff
path: root/portato/gui/qt/helper.py
blob: fa1576abaf5391b558eb19fd006fc40941770e76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
#
# File: portato/gui/qt/helper.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
# Copyright (C) 2007 René 'Necoro' Neumann
# This is free software.  You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>

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
to/gui/windows/mailinfo.py?h=v0.13&id=fcd88477de3b0fddb695693f3580c9a243d02296&follow=1'>Implemented the mail sendingRené 'Necoro' Neumann2-3/+63 2008-06-22First mail window draftRené 'Necoro' Neumann3-0/+220 2008-06-10Added gpytage pluginRené 'Necoro' Neumann2-0/+29 2008-06-10Modified plugin.xsd so it allows also menu-only pluginsRené 'Necoro' Neumann2-7/+8 2008-06-10Fixed the default handlingRené 'Necoro' Neumann1-1/+1 2008-06-10Allowed default for session; load 'app-portage/portato' as default for select...René 'Necoro' Neumann2-10/+18 2008-06-09Fixed 'kill' in the systray popupRené 'Necoro' Neumann1-2/+2 2008-06-09Fixed error messageRené 'Necoro' Neumann2-4/+1 2008-06-08Make blocks way more intelligentRené 'Necoro' Neumann3-45/+107