org.kde.koala
Class KCModuleInfo

java.lang.Object
  extended by org.kde.koala.KCModuleInfo
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KCModuleInfo
extends java.lang.Object
implements org.kde.qt.QtSupport

A class that provides information about a KCModule KCModuleInfo provides various technical information, such as icon, library etc. about a KCModule.n

Author:
Daniel Molkentin

Constructor Summary
  KCModuleInfo()
          Same as above but creates an empty KCModuleInfo.
protected KCModuleInfo(java.lang.Class dummy)
           
  KCModuleInfo(KCModuleInfo rhs)
          Same as above but takes a KCModuleInfo as argument.
  KCModuleInfo(java.lang.String desktopFile)
          Constructs a KCModuleInfo.
 
Method Summary
 java.lang.String comment()
           
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
 java.lang.String docPath()
           
 java.lang.String factoryName()
          Returns the module's factory name, if it's set.
 java.lang.String fileName()
           
protected  void finalize()
          Deletes the wrapped C++ instance
 java.lang.String handle()
           
 java.lang.String icon()
           
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 java.util.ArrayList keywords()
           
 java.lang.String library()
           
protected  void loadAll()
          Reads the service entries specific for KCModule from the desktop file.
 java.lang.String moduleName()
           
 boolean needsRootPrivileges()
           
 boolean needsTest()
           
 boolean op_equals(KCModuleInfo rhs)
          Equal operator
 boolean op_not_equals(KCModuleInfo rhs)
           
protected  void setComment(java.lang.String comment)
          Sets the object's name.
protected  void setDocPath(java.lang.String p)
          Sets the object's documentation path
protected  void setHandle(java.lang.String handle)
          Sets the factory name
protected  void setIcon(java.lang.String icon)
          Sets the object's icon.
protected  void setKeywords(java.lang.String[] keyword)
          Sets the object's keywords.
protected  void setLibrary(java.lang.String lib)
          Set the object's library
protected  void setName(java.lang.String name)
          Sets the object's name.
protected  void setNeedsRootPrivileges(boolean needsRootPrivileges)
          Toggles whether the represented module needs root privileges.
protected  void setNeedsTest(boolean val)
          Sets if the module should be tested for loading.
protected  void setWeight(int weight)
          Sets the object's weight property which determines in what order modules will be displayed.
 int weight()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KCModuleInfo

protected KCModuleInfo(java.lang.Class dummy)

KCModuleInfo

public KCModuleInfo(java.lang.String desktopFile)
Constructs a KCModuleInfo.

Parameters:
desktopFile - the desktop file representing the module, or the name of the module.

KCModuleInfo

public KCModuleInfo(KCModuleInfo rhs)
Same as above but takes a KCModuleInfo as argument.

Parameters:
rhs - specifies the module

KCModuleInfo

public KCModuleInfo()
Same as above but creates an empty KCModuleInfo. You should not normally call this.

Method Detail

op_equals

public boolean op_equals(KCModuleInfo rhs)
Equal operator

Returns:
true if rhs equals itself

op_not_equals

public boolean op_not_equals(KCModuleInfo rhs)
Returns:
true if rhs is not equal itself

fileName

public java.lang.String fileName()
Returns:
the filename of the .desktop file that describes the KCM

keywords

public java.util.ArrayList keywords()
Returns:
the keywords associated with this KCM.

factoryName

public java.lang.String factoryName()
Returns the module's factory name, if it's set. If not, the library name is returned.

Returns:
the module's factory name

moduleName

public java.lang.String moduleName()
Returns:
the module\'s (translated) name

comment

public java.lang.String comment()
Returns:
the module's (translated) comment field

icon

public java.lang.String icon()
Returns:
the module's icon name

docPath

public java.lang.String docPath()
Returns:
the path of the module's documentation

library

public java.lang.String library()
Returns:
the library name

handle

public java.lang.String handle()
Returns:
a handle (usually the contents of the FactoryName field)

weight

public int weight()
Returns:
the weight of the module which determines the order of the pages in the KCMultiDialog. It's set by the X-KDE-Weight field.

needsRootPrivileges

public boolean needsRootPrivileges()
Returns:
whether the module might require root permissions

needsTest

public boolean needsTest()
Returns:
true if the module should be conditionally loaded.

setKeywords

protected void setKeywords(java.lang.String[] keyword)
Sets the object's keywords.

Parameters:
keyword - the new keywords

setName

protected void setName(java.lang.String name)
Sets the object's name.

Parameters:
name - the new name

setComment

protected void setComment(java.lang.String comment)
Sets the object's name.

Parameters:
comment - the new comment

setIcon

protected void setIcon(java.lang.String icon)
Sets the object's icon.

Parameters:
icon - the name of the new icon

setLibrary

protected void setLibrary(java.lang.String lib)
Set the object's library

Parameters:
lib - the name of the new library without any extensions or prefixs.

setHandle

protected void setHandle(java.lang.String handle)
Sets the factory name

Parameters:
handle - The new factory name

setWeight

protected void setWeight(int weight)
Sets the object's weight property which determines in what order modules will be displayed. Default is 100.

Parameters:
weight - the new weight

setNeedsTest

protected void setNeedsTest(boolean val)
Sets if the module should be tested for loading.

Parameters:
val - the value to set

setNeedsRootPrivileges

protected void setNeedsRootPrivileges(boolean needsRootPrivileges)
Toggles whether the represented module needs root privileges. Use with caution.

Parameters:
needsRootPrivileges - if module needs root privilges

setDocPath

protected void setDocPath(java.lang.String p)
Sets the object's documentation path

Parameters:
p - the new documentation path

loadAll

protected void loadAll()
Reads the service entries specific for KCModule from the desktop file. The usual desktop entries are read in init.


finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?