summaryrefslogtreecommitdiffstats
path: root/python/pykde/examples/pykde-sampler/icon_handling/misc.py
blob: 4c7f4259a76a7deec7ac317102092761e1e90033 (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

iconName = 'icons'
labelText = 'Misc.'


from qt import QFrame, QHBoxLayout, QVBoxLayout, SIGNAL, QPoint
from kdecore import i18n
from kdeui import KAboutDialog, KPushButton, KBugReport, KTextEdit
from kdeui import KRootPermsIcon, KWritePermsIcon


helpText = ("Samples for the KRootPermsIcon and KWritePermsIcon classes."
            "These icons don't do anything.")


class MainFrame(QFrame):
    def __init__(self, parent=None):
        QFrame.__init__(self, parent)

        layout = QVBoxLayout(self, 4)
        layout.setAutoAdd(True)

        self.help = KTextEdit(helpText, '', self)
        self.root = KRootPermsIcon(None)
        self.root.reparent(self, 0, QPoint(0,0), True)

        import os
        fn = os.path.abspath('.')
        print fn
        self.write = KWritePermsIcon(fn)
        self.write.reparent(self, 0, QPoint(0,0), True)