File: kmainwindow.py

package info (click to toggle)
pykde4 4%3A4.14.3-2%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 30,912 kB
  • ctags: 18,431
  • sloc: python: 2,063; cpp: 327; makefile: 52; sh: 5
file content (47 lines) | stat: -rwxr-xr-x 1,237 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/env python


import sys

from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs
from PyKDE4.kdeui import KApplication, KMainWindow


class MainWindow (KMainWindow):
    def __init__ (self):
        KMainWindow.__init__ (self)

        self.resize (640, 480)



#--------------- main ------------------

def main ():
        appName     = "KMainWindow"
        catalog     = ""
        programName = ki18n ("KMainWindow")
        version     = "1.0"
        description = ki18n ("Tutorial - Second Program")
        license     = KAboutData.License_GPL
        copyright   = ki18n ("(c) 2007 Jim Bublitz")
        text        = ki18n ("none")
        homePage    = "www.riverbankcomputing.com"
        bugEmail    = "jbublitz@nwinternet.com"
        
        aboutData   = KAboutData (appName, catalog, programName, version, description,
                                    license, copyright, text, homePage, bugEmail)
        
            
        KCmdLineArgs.init (sys.argv, aboutData)
            
        app = KApplication ()
        
        #------- new stuff added here ----------
        
        mainWindow = MainWindow ()
        mainWindow.show ()
        app.exec_ ()

if __name__ == '__main__':
    main ()