SF.net SVN: fclient:[746] trunk/fclient/src/fclient/lib/qt4ex/lib/actions. py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-25 22:38:56
|
Revision: 746
http://fclient.svn.sourceforge.net/fclient/?rev=746&view=rev
Author: jUrner
Date: 2008-07-25 22:39:04 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
some more options
Modified Paths:
--------------
trunk/fclient/src/fclient/lib/qt4ex/lib/actions.py
Modified: trunk/fclient/src/fclient/lib/qt4ex/lib/actions.py
===================================================================
--- trunk/fclient/src/fclient/lib/qt4ex/lib/actions.py 2008-07-25 17:45:32 UTC (rev 745)
+++ trunk/fclient/src/fclient/lib/qt4ex/lib/actions.py 2008-07-25 22:39:04 UTC (rev 746)
@@ -31,6 +31,7 @@
self._dummyGroups = [] # cheat a bit to always trigger SIGNAL('triggered(QAction*)')
def action(self,
+ parent=None,
name=None,
text=None,
group=None,
@@ -39,8 +40,11 @@
isCheckable=False,
isChecked=False,
isEnabled=True,
+ shortcut=None,
userData=None,
):
+ """
+ """
if group is None:
group = QtGui.QActionGroup(self.parent())
self._dummyGroups.append(group) #TODO: is this necessary?
@@ -55,12 +59,16 @@
act.setObjectName(name)
act.setCheckable(isCheckable)
+ if parent is not None:
+ parent.addAction(act)
+
if icon is not None:
act.setIcon(icon)
if isCheckable:
act.setChecked(isChecked)
act.setEnabled(isEnabled)
-
+ if shortcut is not None:
+ act.setShortcut(shortcut)
self._registerAction(name, act)
return act
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|