KComponentData Class Reference
from PyKDE4.kdecore import *
Detailed Description
Per component data.
This class holds a KAboutData object or only a component name, a KStandardDirs object and a KSharedConfig object. Those objects normally are different per component but the same per instance of one component.
The application component data can always be accessed using KGlobal.mainComponent() (or the convenience function KGlobal.dirs() and KGlobal.config()) while the component data of the currently active component (mainly used for KParts) can be accessed using KGlobal.activeComponent().
Enumerations | |
MainComponentRegistration | { RegisterAsMainComponent, SkipMainComponentRegistration } |
Methods | |
__init__ (self) | |
__init__ (self, KComponentData a0) | |
__init__ (self, QByteArray componentName, QByteArray catalogName=QByteArray(), KComponentData.MainComponentRegistration registerAsMain=KComponentData.RegisterAsMainComponent) | |
__init__ (self, KAboutData aboutData, KComponentData.MainComponentRegistration registerAsMain=KComponentData.RegisterAsMainComponent) | |
__init__ (self, KAboutData aboutData, KComponentData.MainComponentRegistration registerAsMain=KComponentData.RegisterAsMainComponent) | |
KAboutData | aboutData (self) |
QString | catalogName (self) |
QString | componentName (self) |
KSharedConfig.Ptr | config (self) |
KStandardDirs | dirs (self) |
bool | isValid (self) |
bool | operator != (self, KComponentData rhs) |
bool | operator == (self, KComponentData a0) |
setConfigName (self, QString name) |
Method Documentation
__init__ | ( | self ) |
__init__ | ( | self, | ||
KComponentData | a0 | |||
) |
__init__ | ( | self, | ||
QByteArray | componentName, | |||
QByteArray | catalogName=QByteArray(), | |||
KComponentData.MainComponentRegistration | registerAsMain=KComponentData.RegisterAsMainComponent | |||
) |
__init__ | ( | self, | ||
KAboutData | aboutData, | |||
KComponentData.MainComponentRegistration | registerAsMain=KComponentData.RegisterAsMainComponent | |||
) |
__init__ | ( | self, | ||
KAboutData | aboutData, | |||
KComponentData.MainComponentRegistration | registerAsMain=KComponentData.RegisterAsMainComponent | |||
) |
KAboutData aboutData | ( | self ) |
Returns the about data of this component.
- Returns:
- The about data of the component. If none has been set in the constructor but a component name was set, a default constructed KAboutData object is returned.
QString catalogName | ( | self ) |
Returns the name of the translation catalog.
- Returns:
- The catalog name.
QString componentName | ( | self ) |
Returns the name of the component.
- Returns:
- The component name.
KSharedConfig.Ptr config | ( | self ) |
Returns the general config object ("appnamerc").
- Returns:
- the KConfig object for the component.
KStandardDirs dirs | ( | self ) |
Returns the application standard dirs object.
- Returns:
- The KStandardDirs of the application.
bool isValid | ( | self ) |
Returns whether this is a valid object.
Don't call any functions on invalid objects, that will crash. Assignment (and of course destruction) is the only valid operation you may do.
bool operator != | ( | self, | ||
KComponentData | rhs | |||
) |
Returns whether two KComponentData objects do not reference the same data.
bool operator == | ( | self, | ||
KComponentData | a0 | |||
) |
Returns whether two KComponentData objects reference the same data.
setConfigName | ( | self, | ||
QString | name | |||
) |
Set name of default config file.
- Parameters:
-
name the name of the default config file
Enumeration Documentation
MainComponentRegistration |
- Enumerator:
-