def main():
    aboutData = KAboutData(
        PACKAGE, PROGRAMNAME, VERSION,
        I18N_NOOP("LilyKDE servicemenu helper"),
        KAboutData.License_GPL,
        "Copyright (c) 2008, " + AUTHOR,
        "", HOMEPAGE)
    KCmdLineArgs.init (sys.argv, aboutData)
    KCmdLineArgs.addCmdLineOptions([
        ("+files", I18N_NOOP("LilyPond files to convert"))
        ])
    app = KApplication()
    log = LogWidget()
    app.setMainWidget(log)
    log.setMinimumHeight(240)
    log.setMinimumWidth(400)
    log.setCaption(PROGRAMNAME)
    log.show()

    # get the files to convert
    pa = KCmdLineArgs.parsedArgs()
    files = map(pa.arg, range(pa.count()))

    # start the first job. Itself takes care of running the rest.
    Job(files, log)
    app.exec_loop()
Example #2
0
def main():

    """Main program."""

    description = str(i18n("Simple log file viewer"))
    version = "0.3"
    about = KAboutData("lovi", "lovi", version, description,
        KAboutData.License_GPL, "Copyright (C) 2005-2006 by Akos Polster")
    about.addAuthor("Akos Polster", "", "*****@*****.**")
    KCmdLineArgs.init(sys.argv, about)
    KCmdLineArgs.addCmdLineOptions([("+files", "Files to monitor")])
    app = KApplication()
    mainWindow = MainWin(None, "lovi#")
    app.setMainWidget(mainWindow)
    
    # Get list of monitored files from the command line or from the cfg file
    args = KCmdLineArgs.parsedArgs()
    if args.count() > 0:
        for i in range(0, args.count()):
            mainWindow.monitor(args.arg(i))
    else:
        cfg = app.config()
        cfg.setGroup("Monitor")
        files = cfg.readListEntry("files")
        for f in files:
            mainWindow.monitor(str(f))
        
    mainWindow.show()
    app.exec_loop()
Example #3
0
 def __init__(self, argv, opts):
     KLocale.setMainCatalogue("kdelibs")
     if not '--caption' in argv:
         argv += ['--caption', 'PyQLogger']
         sysargv = argv[:]
         from pyqlogger import VERSION
         aboutData = KAboutData("pyqlogger", "PyQLogger",
                                VERSION, "Blogger GUI",
                                KAboutData.License_GPL,
                                "(C) 2004, Eli Yukelzon", "",
                                "http://pyqlogger.berlios.de",
                                "")
         aboutData.addAuthor("Eli Yukelzon a.k.a Reflog", "",
                             "*****@*****.**")
         aboutData.addAuthor("Xander Soldaat a.k.a Mightor", "",
                             "*****@*****.**")
         try:
             options = [("s",
                         "Status bar (default = disabled)"),
                        ("statusbar",
                         "Status bar (default = disabled)")]
             KCmdLineArgs.init(argv, aboutData)
             KCmdLineArgs.addCmdLineOptions(options)
         except TypeError:
             KCmdLineArgs.init(sysargv, sysargv[0], '', '')
         if opts:
             KCmdLineArgs.addCmdLineOptions(opts)
         KApplication.__init__(self)