class KComponentData |
|
|
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().
Author Torben Weis
Author Matthias Kretz |
|
|
|
Creates an invalid KComponentData object. See also isValid() |
|
Copy constructor. It does not copy the data. The data is shared between the old and new objects. |
|
Constructor.
componentName - the name of the component. catalogName - the name of the translation catalog; if left empty componentName is used registerAsMain - whether to register the component as the main component of the application. This has no effect, if the application already has a main component. See also KGlobal.mainComponent |
|
Constructor. When instanciating a KComponentData that is not your KApplication, make sure that the KAboutData and the KComponentData have the same life time. You have to destroy both, since KComponentData does not own the about data. Do not create a KAboutData on the stack in this case! Building a KAboutData on the stack is only ok for usage with KCmdLineArgs and KApplication (not destroyed until the app exits).
aboutData - data about this component registerAsMain - whether to register the component as the main component of the application. This has no effect, if the application already has a main component. See also KGlobal.mainComponent See also KAboutData |
|
|
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. |
|
Returns the name of the translation catalog. Returns The catalog name. |
|
Returns the name of the component. Returns The component name. |
|
Returns the general config object ("appnamerc"). Returns the KConfig object for the component. |
|
Returns the application standard dirs object. Returns The KStandardDirs of the application. |
|
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. |
|
Set name of default config file. name - the name of the default config file |
RegisterAsMainComponent | - | ||
SkipMainComponentRegistration | - |