Ejemplo n.º 1
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()
Ejemplo n.º 2
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)
Ejemplo n.º 3
0
        QToolTip.add(self, toolTip)
        self.setPixmap(self.icons.loadIcon(iconName, KIcon.Desktop, 22))


if __name__ == '__main__':
    appName = 'PyWireless'
    programName = 'PyWireless'
    description = 'A Basic Wireless Connection Monitor'
    license = KAboutData.License_GPL_V2
    version = '3.3'
    copyright = '(C) 2005 S.Çağlar Onur <*****@*****.**>'

    aboutData = KAboutData(appName, programName, version, description, license,
                           copyright)

    aboutData.addAuthor('S.Çağlar Onur', 'Maintainer', '*****@*****.**')
    aboutData.addAuthor('Onur Küçük', 'Contributor [Rx/Tx bytes part]',
                        '*****@*****.**')
    aboutData.addAuthor(
        'Serdar Soytetir',
        'Contributor [New PyWireless Icons & UI Improvements]',
        '*****@*****.**')
    aboutData.addAuthor('Furkan Duman', 'Contributor [Bug fix]',
                        '*****@*****.**')

    KCmdLineArgs.init(sys.argv, aboutData)
    ''' Use KUniqueApplication and initialize'''
    gettext.install(appName)
    app = KUniqueApplication(True, True, True)
    trayWindow = SystemTray(None, appName)
Ejemplo n.º 4
0
#!/usr/bin/python
"""KDE support for dpaste"""
import sys, time
import dcop
import dcopext
from kdecore import KApplication, KCmdLineArgs, KAboutData
from qt import QString, QCString

import StringIO
import dpaster

description = "KDE interface to http://dpaste.com/"
version     = "0.1"
aboutData   = KAboutData ("testdcopext", "testdcopext",\
    version, description, KAboutData.License_GPL,\
    "(C) 2007 Peter Fein")

aboutData.addAuthor ("Peter Fein", "wrote it", "*****@*****.**")

KCmdLineArgs.init (sys.argv, aboutData)

app  = KApplication ()
dcop = app.dcopClient ()

d = dcopext.DCOPApp ("klipper", dcop)
res, content = d.klipper.getClipboardContents()
sio=StringIO.StringIO(content)
url=dpaster.paste(sio)
res=d.klipper.setClipboardContents(url)
Ejemplo n.º 5
0
Archivo: tab.py Proyecto: pipacs/etc
    """
    Monitor a file.
    
    @param  fileName    File to monitor
    """
    def monitor(self, fileName):
        try:
            tailer = Tail(fileName)
        except:
            KMessageBox.error(self, 
                str(i18n("Cannot open file for monitoring:\n%s")) % fileName,
                i18n("Error - lovi"))
            return
        self.tab.addTab(Monitor(tailer), os.path.basename(fileName))

"""
Main program.
"""
description = str(i18n("Simple log file viewer"))
version = "0.1"
about = KAboutData("", "", \
    version, description, KAboutData.License_GPL, \
    "(C) 2005 Akos Polster")
about.addAuthor("Akos Polster", "", "*****@*****.**")
KCmdLineArgs.init(sys.argv, about)
# KCmdLineArgs.addCmdLineOptions([("+files", "File to open")])
app = KApplication()
mainWindow = MainWin(None, "lovi#")
mainWindow.show()
app.exec_loop()
Ejemplo n.º 6
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys

from kdecore import KApplication, KAboutData, KCmdLineArgs, KGlobal, KIcon
from qt import QObject, SIGNAL, SLOT

from pakito.gui.mainwindow import MainWindow

def I18N_NOOP(x):
    return x

name = "Pakito"
version = "0.3"
mail = "*****@*****.**"
description = I18N_NOOP("A tool for accelerating package making process")

if __name__ == "__main__":    
    about = KAboutData(name.lower(), name, version, description, KAboutData.License_GPL_V2, "(C) Gökçen Eraslan 2007", None, None, mail)
    about.addAuthor("Gökçen Eraslan", None, mail)
    KCmdLineArgs.init(sys.argv, about)
    app = KApplication()
    programLogo = KGlobal.iconLoader().loadIcon("pisikga", KIcon.Desktop)
    about.setProgramLogo(programLogo.convertToImage())
    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
    pac = MainWindow(None, name)
    app.setMainWidget(pac)
    pac.show()
    app.exec_loop()
Ejemplo n.º 7
0
    @param  fileName    File to monitor
    """

    def monitor(self, fileName):
        try:
            tailer = Tail(fileName)
        except:
            KMessageBox.error(
                self,
                str(i18n("Cannot open file for monitoring:\n%s")) % fileName,
                i18n("Error - lovi"))
            return
        self.tab.addTab(Monitor(tailer), os.path.basename(fileName))


"""
Main program.
"""
description = str(i18n("Simple log file viewer"))
version = "0.1"
about = KAboutData("", "", \
    version, description, KAboutData.License_GPL, \
    "(C) 2005 Akos Polster")
about.addAuthor("Akos Polster", "", "*****@*****.**")
KCmdLineArgs.init(sys.argv, about)
# KCmdLineArgs.addCmdLineOptions([("+files", "File to open")])
app = KApplication()
mainWindow = MainWin(None, "lovi#")
mainWindow.show()
app.exec_loop()
Ejemplo n.º 8
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

from kdecore import KApplication, KAboutData, KCmdLineArgs, KGlobal, KIcon
from qt import QObject, SIGNAL, SLOT

from pakito.gui.mainwindow import MainWindow

def I18N_NOOP(x):
    return x

name = "Pakito"
version = "0.3"
mail = "*****@*****.**"
description = I18N_NOOP("A tool for accelerating package making process")

if __name__ == "__main__":    
    about = KAboutData(name.lower(), name, version, description, KAboutData.License_GPL_V2, "(C) Gökçen Eraslan 2007", None, None, mail)
    about.addAuthor("Gökçen Eraslan", None, mail)
    KCmdLineArgs.init(sys.argv, about)
    app = KApplication()
    programLogo = KGlobal.iconLoader().loadIcon("pisikga", KIcon.Desktop)
    about.setProgramLogo(programLogo.convertToImage())
    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
    pac = MainWindow(None, name)
    app.setMainWidget(pac)
    pac.show()
    app.exec_loop()
Ejemplo n.º 9
0
#!/usr/bin/python
"""KDE support for dpaste"""
import sys, time
import dcop
import dcopext
from kdecore import KApplication, KCmdLineArgs, KAboutData
from qt import QString, QCString

import StringIO
import dpaster

description = "KDE interface to http://dpaste.com/"
version = "0.1"
aboutData   = KAboutData ("testdcopext", "testdcopext",\
    version, description, KAboutData.License_GPL,\
    "(C) 2007 Peter Fein")

aboutData.addAuthor("Peter Fein", "wrote it", "*****@*****.**")

KCmdLineArgs.init(sys.argv, aboutData)

app = KApplication()
dcop = app.dcopClient()

d = dcopext.DCOPApp("klipper", dcop)
res, content = d.klipper.getClipboardContents()
sio = StringIO.StringIO(content)
url = dpaster.paste(sio)
res = d.klipper.setClipboardContents(url)
Ejemplo n.º 10
0
#!/usr/bin/python2.4

import sys
import os
from qt import SIGNAL
from kdecore import i18n, KAboutData, KApplication, KGlobal, KIcon, KCmdLineArgs
from KPyBTMain import *

if __name__=="__main__":
    mainpath = os.path.dirname (os.path.abspath (sys.argv[0]))
    print mainpath
    authorname='Stephan Hermann'
    authormail='*****@*****.**'
    prgVersion='0.1'
    lic=KAboutData.License_GPL
    prgName='KPyBT'
    prgDesc='A Python KDE BitTorrent Client'
    authordesc=i18n("Maintainer and Core Developer")
    about=KAboutData(prgName,prgName,prgVersion,prgDesc,lic,"&copy; 2005")
    about.addAuthor(authorname,str(authordesc),authormail)
    KCmdLineArgs.init(sys.argv,about)
    app=KApplication()
    mainWindow=KPyBTMainWindow(mainpath)
    mainWindow.show()
    app.setMainWidget(mainWindow)
    
    app.exec_loop()