KPropertiesDialogPlugin Class Reference
from PyKDE4.kio import *
Inherits: QObject
Detailed Description
A Plugin in the Properties dialog This is an abstract class. You must inherit from this class to build a new kind of tabbed page for the KPropertiesDialog. A plugin in itself is just a library containing code, not a dialog's page. It's up to the plugin to insert pages into the parent dialog.
To make a plugin available, define a service that implements the KPropertiesDialog/Plugin servicetype, as well as the mimetypes for which the plugin should be created. For instance, ServiceTypes=KPropertiesDialog/Plugin,text/html,application/x-mymimetype.
You can also include X-KDE-Protocol=file if you want that plugin to be loaded only for local files, for instance.
Signals | |
changed () | |
Methods | |
__init__ (self, KPropertiesDialog _props) | |
applyChanges (self) | |
int | fontHeight (self) |
bool | isDirty (self) |
setDirty (self, bool b) | |
setDirty (self) | |
Static Methods | |
bool | isDesktopFile (KFileItem _item) |
Signal Documentation
changed | ( | ) |
Emit this signal when the user changed anything in the plugin's tabs. The hosting PropertiesDialog will call applyChanges only if the PropsPlugin has emitted this signal or if you have called setDirty() before.
- Signal syntax:
QObject.connect(source, SIGNAL("changed()"), target_slot)
Method Documentation
__init__ | ( | self, | ||
KPropertiesDialog | _props | |||
) |
Constructor To insert tabs into the properties dialog, use the add methods provided by KPageDialog (the properties dialog is a KPageDialog).
applyChanges | ( | self ) |
Applies all changes to the file. This function is called when the user presses 'Ok'. The last plugin inserted is called first.
int fontHeight | ( | self ) |
Returns the font height.
bool isDirty | ( | self ) |
setDirty | ( | self, | ||
bool | b | |||
) |
setDirty | ( | self ) |
Static Method Documentation
bool isDesktopFile | ( | KFileItem | _item | |
) |
Convenience method for most .supports methods
- Returns:
- true if the file is a local, regular, readable, desktop file
- Deprecated:
- use KFileItem.isDesktopFile