summaryrefslogtreecommitdiffstats
path: root/python/pykde/examples/uimodules/uimenus.py
blob: 19173b3c5fb587dc40171323b7498e04f9f37a1a (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import os

from qt import QLabel

from kdecore import KApplication

class PageLaunch:
    def __init__ (self, parent):
        self.page = parent.addPage ()

        x = 10
        y = 10

        launchLbl   = QLabel ("Launching application ... please wait\n\nClose launched application to continue", self.page)
        launchLbl.setGeometry (x, y, 300, 80)
        launchLbl.show ()

        self.page.show ()

        KApplication.kApplication ().processEvents ()


class PageNotImpl:
    def __init__ (self, parent):
        self.page = parent.addPage ()

        x = 10
        y = 10

        niLbl   = QLabel ("Nothing is currently implemented for this widget", self.page)
        niLbl.setGeometry (x, y, 300, 20)
        niLbl.show ()


def menuKAccelGen (parent):
    parent.currentPageObj = PageNotImpl (parent)

def menuKAccelMenu (parent):
    parent.currentPageObj = PageNotImpl (parent)

def menuKAction (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKActionMenu (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKActionSeparator (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKContextMenuManager (parent):
    pass

def menuKDCOPActionProxy (parent):
    pass

def menuKHelpMenu (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKMenuBar (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKPanelApplet (parent):
    parent.currentPageObj = PageNotImpl (parent)

def menuKPanelExtension (parent):
    parent.currentPageObj = PageNotImpl (parent)

def menuKPanelMenu (parent):
    parent.currentPageObj = PageNotImpl (parent)

def menuKPopupFrame (parent):
    pass

def menuKPopupMenu (parent):
    pass

def menuKPopupTitle (parent):
    pass

def menuKStatusBar (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKStatusBarLabel (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKStdAction (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKToolBar (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python menudemo.py")

def menuKWindowListMenu (parent):
    pass


if __name__ == "__main__":
    print
    print "Please run uisampler.py"
    print