summaryrefslogtreecommitdiff
path: root/kberylsettings/lib.py
diff options
context:
space:
mode:
authornatural <natural>2006-12-19 13:03:14 +0000
committernatural <natural>2006-12-19 13:03:14 +0000
commite87833f32ea631dab7391484f0f89bedf669b80c (patch)
tree2a66917ce2bad8f7d6619ebbccf0d37598f12f22 /kberylsettings/lib.py
parent99b44818d60794aae11dca5f67722ab32c98f137 (diff)
downloadkberylsettings-e87833f32ea631dab7391484f0f89bedf669b80c.tar.gz
kberylsettings-e87833f32ea631dab7391484f0f89bedf669b80c.tar.bz2
Support for basic setting saves. Other refactorings and fixes.
Diffstat (limited to 'kberylsettings/lib.py')
-rw-r--r--kberylsettings/lib.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/kberylsettings/lib.py b/kberylsettings/lib.py
index 8a2d795..33c0ca0 100644
--- a/kberylsettings/lib.py
+++ b/kberylsettings/lib.py
@@ -57,6 +57,13 @@ class Slots:
close = SLOT('close()')
+def iconLoader():
+ """ returns the global icon loader
+
+ @return KIconLoader instance
+ """
+ return KGlobal.instance().iconLoader()
+
def icon(name, group=KIcon.NoGroup, size=KIcon.SizeSmall):
""" loads pixmap by name
@@ -73,7 +80,7 @@ def icon(name, group=KIcon.NoGroup, size=KIcon.SizeSmall):
return iconCache[(name, size)]
except (KeyError, ):
pass
- ico = KGlobal.instance().iconLoader().loadIcon(name, group)
+ ico = iconLoader().loadIcon(name, group)
img = ico.convertToImage()
pix = iconCache[(name, size)] = QPixmap()
pix.convertFromImage(img.smoothScale(size, size, QImage.ScaleMin))
@@ -88,7 +95,7 @@ def iconSet(name, group=KIcon.NoGroup, size=KIcon.SizeSmall):
@param size KIcon size
@return icon as QIconSet instance
"""
- return KGlobal.instance().iconLoader().loadIconSet(name, group, size)
+ return iconLoader().loadIconSet(name, group, size)
def action(text, label, icon, accel, tip, collection, pluggable):