PyKDE - Python Bindings for KDE
class KApplication
Table of contents
Modules
tdecore Classes
All Classes
Module
tdecore
Class
KApplication
Inherits
QApplication, KInstance
enums
(anonymous)
= {ShiftModifier, LockModifier, ControlModifier, Modifier1, Modifier2, Modifier3, Modifier4, Modifier5 }
(anonymous)
= {Button1Pressed, Button2Pressed, Button3Pressed, Button4Pressed, Button5Pressed }
CaptionLayout
= {CaptionAppLast, CaptionAppFirst, CaptionNoApp }
SettingsCategory
= {SETTINGS_MOUSE, SETTINGS_COMPLETION, SETTINGS_PATHS, SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS }
ShutdownConfirm
= {ShutdownConfirmDefault, ShutdownConfirmNo, ShutdownConfirmYes }
ShutdownMode
= {ShutdownModeDefault, ShutdownModeSchedule, ShutdownModeTryNow, ShutdownModeForceNow, ShutdownModeInteractive }
ShutdownType
= {ShutdownTypeDefault, ShutdownTypeNone, ShutdownTypeReboot, ShutdownTypeHalt }
methods
KApplication
(allowStyles = 1, GUIenabled = 1)
returns
a KApplication instance
Argument
Type
Default
allowStyles
bool
1
GUIenabled
bool
1
KApplication
(display, visual = 0, colormap = 0, allowStyles = 1)
Not Implemented
KApplication
(display, rAppName, allowStyles = 1, GUIenabled = 1)
Not Implemented
KApplication
(argv, rAppName, allowStyles = 1, GUIenabled = 1)
returns
a KApplication instance
Argument
Type
Default
argv
a Python list of strings
rAppName
Python string
allowStyles
bool
1
GUIenabled
bool
1
KApplication
(allowStyles, GUIenabled, _instance)
returns
a KApplication instance
Argument
Type
Default
allowStyles
bool
GUIenabled
bool
_instance
KInstance
KApplication
(display, visual, colormap, allowStyles, _instance)
Not Implemented
KApplication
(a0)
returns
a KApplication instance
Argument
Type
Default
a0
KApplication
addCmdLineOptions
()
returns
nothing
static
addKipcEventMask
(id)
returns
nothing
Argument
Type
Default
id
int
allowURLAction
(action, _baseURL, _destURL)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
action
QString
_baseURL
KURL
_destURL
KURL
appearanceChanged
()
returns
nothing
authorize
(genericAction)
returns
(bool)
Argument
Type
Default
genericAction
QString
authorizeControlModule
(menuId)
returns
(bool)
In versions KDE 3.2.0 and above only
Argument
Type
Default
menuId
QString
authorizeControlModules
(menuIds)
returns
(QStringList)
In versions KDE 3.2.0 and above only
Argument
Type
Default
menuIds
QStringList
authorizeKAction
(action)
returns
(bool)
Argument
Type
Default
action
char
authorizeURLAction
(action, baseURL, destURL)
returns
(bool)
In versions KDE 3.1.0 and above only
Argument
Type
Default
action
QString
baseURL
KURL
destURL
KURL
backgroundChanged
(desk)
returns
nothing
Argument
Type
Default
desk
int
caption
()
returns
(QString)
checkRecoverFile
(pFilename)
returns
(QString) bRecover (bool)
Argument
Type
Default
pFilename
QString
clear
()
returns
nothing
In versions KDE 3.2.0 and above only
commitData
(sm)
returns
nothing
Argument
Type
Default
sm
QSessionManager
copy
()
returns
nothing
In versions KDE 3.2.0 and above only
createApplicationPalette
()
returns
(QPalette)
In versions KDE 3.1.0 and above only
static
createApplicationPalette
(config, contrast)
returns
(QPalette)
In versions KDE 3.1.0 and above only
static
Argument
Type
Default
config
KConfig
contrast
int
cut
()
returns
nothing
In versions KDE 3.2.0 and above only
dcopClient
()
returns
(DCOPClient)
static
deref
()
returns
nothing
disableAutoDcopRegistration
()
returns
nothing
static
disableSessionManagement
()
returns
nothing
disableStyles
()
returns
nothing
enableSessionManagement
()
returns
nothing
In versions KDE 3.2.0 and above only
enableStyles
()
returns
nothing
geometryArgument
()
returns
(QString)
getDisplay
()
returns
(Display)
guiEnabled
()
returns
(bool)
In versions KDE 3.2.0 and above only
static
iceIOErrorHandler
(conn)
Not Implemented
icon
()
returns
(QPixmap)
iconChanged
(group)
returns
nothing
Argument
Type
Default
group
int
iconName
()
returns
(QString)
installKDEPropertyMap
()
returns
nothing
installSigpipeHandler
()
returns
nothing
In versions KDE 3.2.0 and above only
static
installX11EventFilter
(filter)
returns
nothing
Argument
Type
Default
filter
QWidget
invokeBrowser
(url, startup_id)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
url
QString
startup_id
QCString
invokeBrowser
(url)
returns
nothing
Argument
Type
Default
url
QString
invokeEditSlot
(slot)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
slot
char
invokeHTMLHelp
(aFilename, aTopic = QString .null)
returns
nothing
Argument
Type
Default
aFilename
QString
aTopic
QString
QString .null
invokeHelp
(anchor, appname, startup_id)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
anchor
QString
appname
QString
startup_id
QCString
invokeHelp
(anchor = QString .null, appname = QString .null)
returns
nothing
Argument
Type
Default
anchor
QString
QString .null
appname
QString
QString .null
invokeMailer
(address, subject, startup_id)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
address
QString
subject
QString
startup_id
QCString
invokeMailer
(address, subject)
returns
nothing
Argument
Type
Default
address
QString
subject
QString
invokeMailer
(mailtoURL, startup_id, allowAttachments)
returns
nothing
In versions KDE 3.3.0 and above only
Argument
Type
Default
mailtoURL
KURL
startup_id
QCString
allowAttachments
bool
invokeMailer
(mailtoURL, startup_id)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
mailtoURL
KURL
startup_id
QCString
invokeMailer
(mailtoURL)
returns
nothing
Argument
Type
Default
mailtoURL
KURL
invokeMailer
(to, cc, bcc, subject, body, messageFile, attachURLs, startup_id)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
to
QString
cc
QString
bcc
QString
subject
QString
body
QString
messageFile
QString
attachURLs
QStringList
startup_id
QCString
invokeMailer
(to, cc, bcc, subject, body, messageFile = QString .null, attachURLs = QStringList ())
returns
nothing
Argument
Type
Default
to
QString
cc
QString
bcc
QString
subject
QString
body
QString
messageFile
QString
QString .null
attachURLs
QStringList
QStringList ()
isRestored
()
returns
(bool)
kApplication
()
returns
(KApplication)
static
tdeinitExec
(name, args, startup_id)
returns
(int) error (QString) pid (int)
In versions KDE 3.2.0 and above only
static
Argument
Type
Default
name
QString
args
QStringList
startup_id
QCString
tdeinitExec
(name, args)
returns
(int) error (QString) pid (int)
static
Argument
Type
Default
name
QString
args
QStringList
tdeinitExecWait
(name, args, startup_id)
returns
(int) error (QString) pid (int)
In versions KDE 3.2.0 and above only
static
Argument
Type
Default
name
QString
args
QStringList
startup_id
QCString
tdeinitExecWait
(name, args)
returns
(int) error (QString) pid (int)
static
Argument
Type
Default
name
QString
args
QStringList
kdisplayFontChanged
()
returns
nothing
kdisplayPaletteChanged
()
returns
nothing
kdisplayStyleChanged
()
returns
nothing
keyboardModifiers
()
returns
(uint)
In versions KDE 3.1.0 and above only
static
keyboardMouseState
()
returns
(ButtonState)
In versions KDE 3.4.0 and above only
static
kipcMessage
(id, data)
returns
nothing
Argument
Type
Default
id
int
data
int
kstyle
()
Not Implemented
launcher
()
returns
(QCString)
static
makeStdCaption
(userCaption, withAppName = 1, modified = 0)
returns
(QString)
Argument
Type
Default
userCaption
QString
withAppName
bool
1
modified
bool
0
miniIcon
()
returns
(QPixmap)
miniIconName
()
returns
(QString)
mouseState
()
returns
(uint)
In versions KDE 3.1.0 and above only
static
notify
(receiver, event)
returns
(bool)
Argument
Type
Default
receiver
QObject
event
QEvent
paste
()
returns
nothing
In versions KDE 3.2.0 and above only
propagateSessionManager
()
returns
nothing
random
()
returns
(int)
static
randomString
(length)
returns
(QString)
static
Argument
Type
Default
length
int
ref
()
returns
nothing
removeKipcEventMask
(id)
returns
nothing
Argument
Type
Default
id
int
removeX11EventFilter
(filter)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
filter
QWidget
requestShutDown
(confirm = ShutdownConfirmDefault, sdtype = ShutdownTypeDefault, sdmode = ShutdownModeDefault)
returns
(bool)
Argument
Type
Default
confirm
KApplication.ShutdownConfirm
ShutdownConfirmDefault
sdtype
KApplication.ShutdownType
ShutdownTypeDefault
sdmode
KApplication.ShutdownMode
ShutdownModeDefault
saveState
(sm)
returns
nothing
Argument
Type
Default
sm
QSessionManager
saveYourself
()
returns
nothing
selectAll
()
returns
nothing
In versions KDE 3.2.0 and above only
sessionConfig
()
returns
(KConfig)
sessionSaving
()
returns
(bool)
In versions KDE 3.1.1 and above only
setStartupId
(startup_id)
returns
nothing
Argument
Type
Default
startup_id
QCString
setTopWidget
(topWidget)
returns
nothing
Argument
Type
Default
topWidget
QWidget
settingsChanged
(category)
returns
nothing
Argument
Type
Default
category
int
shutDown
()
returns
nothing
startKdeinit
()
returns
nothing
static
startServiceByDesktopName
(_name, URL, startup_id = QCString ("" ), noWait = 0)
returns
(int) error (QString) dcopService (QCString) pid (int)
static
Argument
Type
Default
_name
QString
URL
QString
startup_id
QCString
QCString ("" )
noWait
bool
0
startServiceByDesktopName
(_name, URLs, startup_id = QCString ("" ), noWait = 0)
returns
(int) error (QString) dcopService (QCString) pid (int)
static
Argument
Type
Default
_name
QString
URLs
QStringList
startup_id
QCString
QCString ("" )
noWait
bool
0
startServiceByDesktopPath
(_name, URL, startup_id = QCString ("" ), noWait = 0)
returns
(int) error (QString) dcopService (QCString) pid (int)
static
Argument
Type
Default
_name
QString
URL
QString
startup_id
QCString
QCString ("" )
noWait
bool
0
startServiceByDesktopPath
(_name, URLs, startup_id = QCString ("" ), noWait = 0)
returns
(int) error (QString) dcopService (QCString) pid (int)
static
Argument
Type
Default
_name
QString
URLs
QStringList
startup_id
QCString
QCString ("" )
noWait
bool
0
startServiceByName
(_name, URL, startup_id = QCString ("" ), noWait = 0)
returns
(int) error (QString) dcopService (QCString) pid (int)
static
Argument
Type
Default
_name
QString
URL
QString
startup_id
QCString
QCString ("" )
noWait
bool
0
startServiceByName
(_name, URLs, startup_id = QCString ("" ), noWait = 0)
returns
(int) error (QString) dcopService (QCString) pid (int)
static
Argument
Type
Default
_name
QString
URLs
QStringList
startup_id
QCString
QCString ("" )
noWait
bool
0
startupId
()
returns
(QCString)
tempSaveName
(pFilename)
returns
(QString)
Argument
Type
Default
pFilename
QString
toolbarAppearanceChanged
(a0)
returns
nothing
Argument
Type
Default
a0
int
updateRemoteUserTimestamp
(dcopId, time = 0)
returns
nothing
In versions KDE 3.3.0 and above only
Argument
Type
Default
dcopId
QCString
time
ulong
0
updateUserTimestamp
(time = 0)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
time
ulong
0
userTimestamp
()
returns
(ulong)
In versions KDE 3.2.3 and above only
x11EventFilter
(a0)
Not Implemented
xErrhandler
(a0, a1)
Not Implemented
xioErrhandler
(a0)
Not Implemented
xioErrhandler
()
returns
(int)
In versions
less than
KDE 3.2.0 only
variables
variables
Variable
Type
loadedByKdeinit
bool