org.kde.koala
Class KConfigBase

java.lang.Object
  extended by org.kde.qt.Qt
      extended by org.kde.qt.QObject
          extended by org.kde.koala.KConfigBase
All Implemented Interfaces:
org.kde.qt.QtSupport
Direct Known Subclasses:
KConfig, KConfigGroup

public class KConfigBase
extends org.kde.qt.QObject

This class forms the base for all %KDE configuration. It is an abstract base class, meaning that you cannot directly instantiate objects of this class. Either use KConfig (for usual %KDE configuration) or KSimpleConfig (for special needs as in ksamba), or even KSharedConfig (stores values in shared memory). All configuration entries are key, value pairs. Each entry also belongs to a specific group of related entries. All configuration entries that do not explicitly specify which group they are in are in a special group called the default group. If there is a $ character in an entry, KConfigBase tries to expand environment variable and uses its value instead of its name. You can avoid this feature by having two consecutive $ characters in your config file which get expanded to one. Note:<> the '=' char is not allowed in keys and the ']' char is not allowed in a group name.

Author:
Kalle Dalheimer , Preston Brown
See Also:
KGlobal.config(), KConfig, KSimpleConfig, KSharedConfig

Field Summary
static int NoAccess
          Possible return values for getConfigState().
static int ReadOnly
           
static int ReadWrite
           
 
Fields inherited from class org.kde.qt.Qt
AlignAuto, AlignBottom, AlignCenter, AlignHCenter, AlignHorizontal_Mask, AlignJustify, AlignLeft, AlignRight, AlignTop, AlignVCenter, AlignVertical_Mask, AlphaDither_Mask, ALT, AltButton, AnchorHref, AnchorName, AndNotROP, AndROP, ArrowCursor, Ascending, ASCII_ACCEL, AutoColor, AutoDither, AutoText, AvoidDither, BDiagPattern, BeginsWith, BevelJoin, BitmapCursor, BlankCursor, Bottom, BottomLeft, BottomRight, BreakAnywhere, BusyCursor, CaseSensitive, ClearROP, ColorMode_Mask, ColorOnly, Contains, ControlButton, CopyROP, CrossCursor, CrossPattern, CTRL, CustomPattern, DashDotDotLine, DashDotLine, DashLine, Dense1Pattern, Dense2Pattern, Dense3Pattern, Dense4Pattern, Dense5Pattern, Dense6Pattern, Dense7Pattern, Descending, DiagCrossPattern, DiffuseAlphaDither, DiffuseDither, Dither_Mask, DitherMode_Mask, DockBottom, DockLeft, DockMinimized, DockRight, DockTop, DockTornOff, DockUnmanaged, DontClip, DontPrint, DotLine, DownArrow, EndsWith, EraseROP, ExactMatch, ExpandTabs, FDiagPattern, FixedColor, FixedPixmap, FlatCap, ForbiddenCursor, HiEnglishUnit, HiMetricUnit, Horizontal, HorPattern, IbeamCursor, Identical, IncludeTrailingSpaces, ISODate, Key_0, Key_1, Key_2, Key_3, Key_4, Key_5, Key_6, Key_7, Key_8, Key_9, Key_A, Key_aacute, Key_Aacute, Key_acircumflex, Key_Acircumflex, Key_acute, Key_adiaeresis, Key_Adiaeresis, Key_ae, Key_AE, Key_agrave, Key_Agrave, Key_Alt, Key_Ampersand, Key_Any, Key_Apostrophe, Key_aring, Key_Aring, Key_AsciiCircum, Key_AsciiTilde, Key_Asterisk, Key_At, Key_atilde, Key_Atilde, Key_B, Key_Back, Key_Backslash, Key_Backspace, Key_BackSpace, Key_Backtab, Key_BackTab, Key_Bar, Key_BassBoost, Key_BassDown, Key_BassUp, Key_BraceLeft, Key_BraceRight, Key_BracketLeft, Key_BracketRight, Key_brokenbar, Key_C, Key_CapsLock, Key_ccedilla, Key_Ccedilla, Key_cedilla, Key_cent, Key_Clear, Key_Colon, Key_Comma, Key_Control, Key_copyright, Key_currency, Key_D, Key_degree, Key_Delete, Key_diaeresis, Key_Direction_L, Key_Direction_R, Key_division, Key_Dollar, Key_Down, Key_E, Key_eacute, Key_Eacute, Key_ecircumflex, Key_Ecircumflex, Key_ediaeresis, Key_Ediaeresis, Key_egrave, Key_Egrave, Key_End, Key_Enter, Key_Equal, Key_Escape, Key_eth, Key_ETH, Key_Exclam, Key_exclamdown, Key_F, Key_F1, Key_F10, Key_F11, Key_F12, Key_F13, Key_F14, Key_F15, Key_F16, Key_F17, Key_F18, Key_F19, Key_F2, Key_F20, Key_F21, Key_F22, Key_F23, Key_F24, Key_F25, Key_F26, Key_F27, Key_F28, Key_F29, Key_F3, Key_F30, Key_F31, Key_F32, Key_F33, Key_F34, Key_F35, Key_F4, Key_F5, Key_F6, Key_F7, Key_F8, Key_F9, Key_Favorites, Key_Forward, Key_G, Key_Greater, Key_guillemotleft, Key_guillemotright, Key_H, Key_Help, Key_Home, Key_HomePage, Key_Hyper_L, Key_Hyper_R, Key_hyphen, Key_I, Key_iacute, Key_Iacute, Key_icircumflex, Key_Icircumflex, Key_idiaeresis, Key_Idiaeresis, Key_igrave, Key_Igrave, Key_Insert, Key_J, Key_K, Key_L, Key_Launch0, Key_Launch1, Key_Launch2, Key_Launch3, Key_Launch4, Key_Launch5, Key_Launch6, Key_Launch7, Key_Launch8, Key_Launch9, Key_LaunchA, Key_LaunchB, Key_LaunchC, Key_LaunchD, Key_LaunchE, Key_LaunchF, Key_LaunchMail, Key_LaunchMedia, Key_Left, Key_Less, Key_M, Key_macron, Key_masculine, Key_MediaLast, Key_MediaNext, Key_MediaPlay, Key_MediaPrev, Key_MediaRecord, Key_MediaStop, Key_Menu, Key_Meta, Key_Minus, Key_mu, Key_multiply, Key_N, Key_Next, Key_nobreakspace, Key_notsign, Key_ntilde, Key_Ntilde, Key_NumberSign, Key_NumLock, Key_O, Key_oacute, Key_Oacute, Key_ocircumflex, Key_Ocircumflex, Key_odiaeresis, Key_Odiaeresis, Key_ograve, Key_Ograve, Key_onehalf, Key_onequarter, Key_onesuperior, Key_Ooblique, Key_OpenUrl, Key_ordfeminine, Key_oslash, Key_otilde, Key_Otilde, Key_P, Key_PageDown, Key_PageUp, Key_paragraph, Key_ParenLeft, Key_ParenRight, Key_Pause, Key_Percent, Key_Period, Key_periodcentered, Key_Plus, Key_plusminus, Key_Print, Key_Prior, Key_Q, Key_Question, Key_questiondown, Key_QuoteDbl, Key_QuoteLeft, Key_R, Key_Refresh, Key_registered, Key_Return, Key_Right, Key_S, Key_ScrollLock, Key_Search, Key_section, Key_Semicolon, Key_Shift, Key_Slash, Key_Space, Key_ssharp, Key_Standby, Key_sterling, Key_Stop, Key_Super_L, Key_Super_R, Key_SysReq, Key_T, Key_Tab, Key_thorn, Key_THORN, Key_threequarters, Key_threesuperior, Key_TrebleDown, Key_TrebleUp, Key_twosuperior, Key_U, Key_uacute, Key_Uacute, Key_ucircumflex, Key_Ucircumflex, Key_udiaeresis, Key_Udiaeresis, Key_ugrave, Key_Ugrave, Key_Underscore, Key_unknown, Key_Up, Key_V, Key_VolumeDown, Key_VolumeMute, Key_VolumeUp, Key_W, Key_X, Key_Y, Key_yacute, Key_Yacute, Key_ydiaeresis, Key_yen, Key_Z, KeyButtonMask, Keypad, LastCursor, LastROP, Left, LeftArrow, LeftButton, LocalDate, LocalTime, LoEnglishUnit, LogText, LoMetricUnit, MacStyle, META, MetaButton, MidButton, Minimized, MiterJoin, MODIFIER_MASK, MonoOnly, MotifStyle, MouseButtonMask, MPenCapStyle, MPenJoinStyle, MPenStyle, MV_10_DOT_0, MV_10_DOT_1, MV_10_DOT_2, MV_10_DOT_3, MV_10_DOT_4, MV_9, MV_CHEETAH, MV_JAGUAR, MV_PANTHER, MV_PUMA, MV_TIGER, MV_Unknown, NandROP, NoAccel, NoAlpha, NoBackground, NoBrush, NoButton, NoMatch, NoPen, NopROP, NorROP, NotAndROP, NotCopyROP, NotEraseROP, NotOrROP, NotROP, NotXorROP, OpaqueMode, OrderedAlphaDither, OrderedDither, OrNotROP, OrROP, Overline, PaletteBackground, PaletteBase, PaletteBrightText, PaletteButton, PaletteButtonText, PaletteDark, PaletteForeground, PaletteHighlight, PaletteHighlightedText, PaletteLight, PaletteLink, PaletteLinkVisited, PaletteMid, PaletteMidlight, PaletteShadow, PaletteText, PartialMatch, PixelUnit, PlainText, PMStyle, PointingHandCursor, PreferDither, RichText, Right, RightArrow, RightButton, RoundCap, RoundJoin, SetROP, SHIFT, ShiftButton, ShowPrefix, SingleLine, SizeAllCursor, SizeBDiagCursor, SizeFDiagCursor, SizeHorCursor, SizeVerCursor, SolidLine, SolidPattern, SplitHCursor, SplitVCursor, SquareCap, StrikeOut, TextDate, ThresholdAlphaDither, ThresholdDither, Top, TopLeft, TopRight, TornOff, TransparentMode, TwipsUnit, UI_AnimateCombo, UI_AnimateMenu, UI_AnimateToolBox, UI_AnimateTooltip, UI_FadeMenu, UI_FadeTooltip, UI_General, Underline, UNICODE_ACCEL, Unmanaged, UpArrow, UpArrowCursor, UTC, VerPattern, Vertical, WaitCursor, WDestructiveClose, WGroupLeader, WhatsThisCursor, Win3Style, WindowActive, WindowFullScreen, WindowMaximized, WindowMinimized, WindowNoState, WindowsStyle, WMacDrawer, WMacNoSheet, WMouseNoMask, WNoAutoErase, WNoMousePropagation, WNorthWestGravity, WordBreak, WPaintClever, WPaintDesktop, WPaintUnclipped, WRepaintNoErase, WResizeNoErase, WShowModal, WState_AutoMask, WState_BlockUpdates, WState_CompressKeys, WState_ConfigPending, WState_Created, WState_CreatedHidden, WState_Disabled, WState_DND, WState_Exposed, WState_ForceDisabled, WState_ForceHide, WState_FullScreen, WState_HasMouse, WState_InPaintEvent, WState_Maximized, WState_Minimized, WState_MouseTracking, WState_OwnCursor, WState_OwnSizePolicy, WState_Polished, WState_Reparented, WState_Reserved0, WState_Resized, WState_Visible, WStaticContents, WStyle_ContextHelp, WStyle_Customize, WStyle_Dialog, WStyle_DialogBorder, WStyle_Mask, WStyle_Maximize, WStyle_Minimize, WStyle_MinMax, WStyle_NoBorder, WStyle_NoBorderEx, WStyle_NormalBorder, WStyle_Reserved, WStyle_Splash, WStyle_StaysOnTop, WStyle_SysMenu, WStyle_Title, WStyle_Tool, WSubWindow, WType_Desktop, WType_Dialog, WType_Mask, WType_Modal, WType_Popup, WType_TopLevel, WV_2000, WV_2003, WV_32s, WV_95, WV_98, WV_CE, WV_CE_based, WV_CENET, WV_DOS_based, WV_Me, WV_NT, WV_NT_based, WV_XP, WWinOwnDC, WX11BypassWM, X11ParentRelative, XorROP
 
Constructor Summary
protected KConfigBase(java.lang.Class dummy)
           
 
Method Summary
 boolean checkConfigFilesWritable(boolean warnUser)
          Check whether the config files are writable.
 java.lang.String className()
           
 void deleteEntry(java.lang.String pKey)
           
 void deleteEntry(java.lang.String pKey, boolean bNLS)
           
 void deleteEntry(java.lang.String pKey, boolean bNLS, boolean bGlobal)
          Deletes the entry specified by pKey in the current group.
 boolean deleteGroup(java.lang.String group)
           
 boolean deleteGroup(java.lang.String group, boolean bDeep)
           
 boolean deleteGroup(java.lang.String group, boolean bDeep, boolean bGlobal)
          Deletes a configuration entry group If the group is not empty and bDeep is false, nothing gets deleted and false is returned.
 boolean entryIsImmutable(java.lang.String key)
          Checks whether it is possible to change the given entry.
 int getConfigState()
          Returns the state of the app-config object.
 java.lang.String group()
          Returns the name of the group in which we are searching for keys and from which we are retrieving entries.
 boolean groupIsImmutable(java.lang.String group)
          Checks whether it is possible to change the given group.
 java.util.ArrayList groupList()
          Returns a list of groups that are known about.
 boolean hasDefault(java.lang.String key)
          Returns whether a default is specified for an entry in either the system wide configuration file or the global KDE config file.
 boolean hasGroup(java.lang.String group)
          Returns true if the specified group is known about.
 boolean hasKey(java.lang.String key)
          Checks whether the key has an entry in the currently active group.
 boolean isDirty()
          Checks whether the config file has any dirty (modified) entries.
 boolean isDollarExpansion()
          Returns whether dollar expansion is on or off.
 boolean isImmutable()
          Checks whether this configuration file can be modified.
 boolean isReadOnly()
          Returns the read-only status of the config object.
 java.lang.String locale()
          Returns a the current locale.
 org.kde.qt.QMetaObject metaObject()
           
 boolean readBoolEntry(java.lang.String pKey)
           
 boolean readBoolEntry(java.lang.String pKey, boolean bDefault)
          Reads a booleanean entry.
 org.kde.qt.QColor readColorEntry(java.lang.String pKey)
           
 org.kde.qt.QColor readColorEntry(java.lang.String pKey, org.kde.qt.QColor pDefault)
          Reads a QColor entry.
 java.util.Calendar readDateTimeEntry(java.lang.String pKey)
           
 java.util.Calendar readDateTimeEntry(java.lang.String pKey, java.util.Calendar pDefault)
          Reads a Calendar entry.
 boolean readDefaults()
           
 double readDoubleNumEntry(java.lang.String pKey)
           
 double readDoubleNumEntry(java.lang.String pKey, double nDefault)
          Reads a floating point value.
 java.lang.String readEntry(java.lang.String pKey)
           
 java.lang.String readEntry(java.lang.String pKey, java.lang.String aDefault)
          Reads the value of an entry specified by pKey in the current group.
 java.lang.String readEntryUntranslated(java.lang.String pKey)
           
 java.lang.String readEntryUntranslated(java.lang.String pKey, java.lang.String aDefault)
          Reads the value of an entry specified by pKey in the current group.
 org.kde.qt.QFont readFontEntry(java.lang.String pKey)
           
 org.kde.qt.QFont readFontEntry(java.lang.String pKey, org.kde.qt.QFont pDefault)
          Reads a QFont value.
 int[] readIntListEntry(java.lang.String pKey)
          Reads a list of Integers.
 java.util.ArrayList readListEntry(java.lang.String pKey)
           
 java.util.ArrayList readListEntry(java.lang.String pKey, char sep)
          Reads a list of strings.
 java.util.ArrayList readListEntry(java.lang.String pKey, java.lang.String[] aDefault)
           
 java.util.ArrayList readListEntry(java.lang.String pKey, java.lang.String[] aDefault, char sep)
          Reads a list of strings, but returns a default if the key did not exist.
 long readLongNumEntry(java.lang.String pKey)
           
 long readLongNumEntry(java.lang.String pKey, long nDefault)
          Reads a numerical value.
 long readNum64Entry(java.lang.String pKey)
           
 long readNum64Entry(java.lang.String pKey, long nDefault)
          Reads a 64-bit numerical value.
 int readNumEntry(java.lang.String pKey)
           
 int readNumEntry(java.lang.String pKey, int nDefault)
          Reads a numerical value.
 java.lang.String readPathEntry(java.lang.String pKey)
           
 java.lang.String readPathEntry(java.lang.String pKey, java.lang.String aDefault)
          Reads a path.
 java.util.ArrayList readPathListEntry(java.lang.String pKey)
           
 java.util.ArrayList readPathListEntry(java.lang.String pKey, char sep)
          Reads a list of string paths.
 org.kde.qt.QPoint readPointEntry(java.lang.String pKey)
           
 org.kde.qt.QPoint readPointEntry(java.lang.String pKey, org.kde.qt.QPoint pDefault)
          Reads a QPoint entry.
 org.kde.qt.QVariant readPropertyEntry(java.lang.String pKey, org.kde.qt.QVariant aDefault)
          Reads the value of an entry specified by pKey in the current group.
 org.kde.qt.QRect readRectEntry(java.lang.String pKey)
           
 org.kde.qt.QRect readRectEntry(java.lang.String pKey, org.kde.qt.QRect pDefault)
          Reads a QRect entry.
 org.kde.qt.QSize readSizeEntry(java.lang.String pKey)
           
 org.kde.qt.QSize readSizeEntry(java.lang.String pKey, org.kde.qt.QSize pDefault)
          Reads a QSize entry.
 long readUnsignedLongNumEntry(java.lang.String pKey)
           
 long readUnsignedLongNumEntry(java.lang.String pKey, long nDefault)
          Read an unsigned numerical value.
 long readUnsignedNum64Entry(java.lang.String pKey)
           
 long readUnsignedNum64Entry(java.lang.String pKey, long nDefault)
          Read an 64-bit unsigned numerical value.
 int readUnsignedNumEntry(java.lang.String pKey)
           
 int readUnsignedNumEntry(java.lang.String pKey, int nDefault)
          Reads an unsigned numerical value.
 void reparseConfiguration()
          Reparses all configuration files.
 void revertToDefault(java.lang.String key)
          Reverts the entry with key key in the current group in the application specific config file to either the system wide (default) value or the value specified in the global KDE config file.
 void rollback()
           
 void rollback(boolean bDeep)
          Mark the config object as "clean," i.e.
 void setDesktopGroup()
          Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc.
 void setDollarExpansion()
           
 void setDollarExpansion(boolean _bExpand)
          Turns on or off "dollar expansion" (see KConfigBase introduction) when reading config entries.
 void setGroup(java.lang.String group)
          Specifies the group in which keys will be read and written.
 void setReadDefaults(boolean b)
          When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference.
 void setReadOnly(boolean _ro)
          Sets the config object's read-only status.
 void sync()
          Flushes all changes that currently reside only in memory back to disk / permanent storage.
 void writeEntry(java.lang.String pKey, boolean bValue)
           
 void writeEntry(java.lang.String pKey, boolean bValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, boolean bValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, boolean bValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, java.util.Calendar rDateTime)
           
 void writeEntry(java.lang.String pKey, java.util.Calendar rDateTime, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, java.util.Calendar rDateTime, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, java.util.Calendar rDateTime, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, double nValue)
           
 void writeEntry(java.lang.String pKey, double nValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, double nValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, double nValue, boolean bPersistent, boolean bGlobal, char format)
           
 void writeEntry(java.lang.String pKey, double nValue, boolean bPersistent, boolean bGlobal, char format, int precision)
           
 void writeEntry(java.lang.String pKey, double nValue, boolean bPersistent, boolean bGlobal, char format, int precision, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, int nValue)
           
 void writeEntry(java.lang.String pKey, int[] rValue)
           
 void writeEntry(java.lang.String pKey, int[] rValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, int[] rValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, int[] rValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          writeEntry() overridden to accept a list of Integers.
 void writeEntry(java.lang.String pKey, int nValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, int nValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, int nValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Write a (key/value) pair.
 void writeEntry(java.lang.String pKey, long nValue)
           
 void writeEntry(java.lang.String pKey, long nValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, long nValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, long nValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, org.kde.qt.QColor rColor)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QColor rColor, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QColor rColor, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QColor rColor, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, org.kde.qt.QFont rFont)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QFont rFont, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QFont rFont, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QFont rFont, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, org.kde.qt.QPoint rValue)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QPoint rValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QPoint rValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QPoint rValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, org.kde.qt.QRect rValue)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QRect rValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QRect rValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QRect rValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, org.kde.qt.QSize rValue)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QSize rValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QSize rValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QSize rValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a (key/value) pair.
 void writeEntry(java.lang.String pKey, org.kde.qt.QVariant rValue)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QVariant rValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QVariant rValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, org.kde.qt.QVariant rValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          writeEntry() Overridden to accept a property.
 void writeEntry(java.lang.String pKey, java.lang.String pValue)
           
 void writeEntry(java.lang.String pKey, java.lang.String[] rValue)
           
 void writeEntry(java.lang.String pKey, java.lang.String[] rValue, char sep)
           
 void writeEntry(java.lang.String pKey, java.lang.String[] rValue, char sep, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, java.lang.String[] rValue, char sep, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, java.lang.String[] rValue, char sep, boolean bPersistent, boolean bGlobal, boolean bNLS)
          writeEntry() overridden to accept a list of strings.
 void writeEntry(java.lang.String pKey, java.lang.String pValue, boolean bPersistent)
           
 void writeEntry(java.lang.String pKey, java.lang.String pValue, boolean bPersistent, boolean bGlobal)
           
 void writeEntry(java.lang.String pKey, java.lang.String pValue, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a key/value pair.
 void writePathEntry(java.lang.String pKey, java.lang.String path)
           
 void writePathEntry(java.lang.String pKey, java.lang.String[] rValue)
           
 void writePathEntry(java.lang.String pKey, java.lang.String[] rValue, char sep)
           
 void writePathEntry(java.lang.String pKey, java.lang.String[] rValue, char sep, boolean bPersistent)
           
 void writePathEntry(java.lang.String pKey, java.lang.String[] rValue, char sep, boolean bPersistent, boolean bGlobal)
           
 void writePathEntry(java.lang.String pKey, java.lang.String[] rValue, char sep, boolean bPersistent, boolean bGlobal, boolean bNLS)
          writePathEntry() overridden to accept a list of paths (strings).
 void writePathEntry(java.lang.String pKey, java.lang.String path, boolean bPersistent)
           
 void writePathEntry(java.lang.String pKey, java.lang.String path, boolean bPersistent, boolean bGlobal)
           
 void writePathEntry(java.lang.String pKey, java.lang.String path, boolean bPersistent, boolean bGlobal, boolean bNLS)
          Writes a file path.
 
Methods inherited from class org.kde.qt.QObject
activate_filters, activate_signal_bool, activate_signal, activate_signal, activate_signal, activate_signal, blockSignals, checkConnectArgs, child, child, child, childEvent, children, connect, connect, connectInternal, connectNotify, customEvent, deleteLater, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnectInternal, disconnectNotify, dispose, dumpObjectInfo, dumpObjectTree, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, event, eventFilter, finalize, highPriority, i18n, inherits, insertChild, installEventFilter, isA, isDisposed, isWidgetType, killTimer, killTimers, name, name, normalizeSignalSlot, objectTrees, parent, property, queryList, queryList, queryList, queryList, queryList, registerUserData, removeChild, removeEventFilter, sender, setName, setProperty, signalsBlocked, startTimer, timerEvent, tr, tr
 
Methods inherited from class org.kde.qt.Qt
arrowCursor, bin, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, black, blankCursor, blue, color0, color1, copyBlt, copyBlt, copyBlt, copyBlt, copyBlt, crossCursor, cyan, darkBlue, darkCyan, darkGray, darkGreen, darkMagenta, darkRed, darkYellow, dec, dynamicCast, endl, flush, forbiddenCursor, fromUtf8, gray, green, hex, ibeamCursor, lightGray, magenta, oct, op_div, op_div, op_div, op_div, op_equals, op_equals, op_equals, op_equals, op_minus, op_minus, op_minus, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_not_equals, op_not_equals, op_not_equals, op_not_equals, op_plus, op_plus, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, pointingHandCursor, qAlpha, qApp, qAppName, qBlue, qCompress, qCompress, qDebug, qDebug, qDrawArrow, qDrawItem, qDrawItem, qDrawItem, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qFatal, qFatal, qGLVersion, qGray, qGray, qGreen, qInitNetworkProtocols, qInstallPath, qInstallPathBins, qInstallPathData, qInstallPathDocs, qInstallPathHeaders, qInstallPathLibs, qInstallPathPlugins, qInstallPathSysconf, qInstallPathTranslations, qItemRect, qItemRect, qObsolete, qObsolete, qObsolete, qRed, qRgb, qRgba, qRound, qSharedBuild, qSuppressObsoleteWarnings, qSuppressObsoleteWarnings, qSysInfo, qSystemWarning, qSystemWarning, qUncompress, qUncompress, qVersion, qWarning, qWarning, red, reset, SIGNAL, sizeAllCursor, sizeBDiagCursor, sizeFDiagCursor, sizeHorCursor, sizeVerCursor, SLOT, splitHCursor, splitVCursor, upArrowCursor, waitCursor, whatsThisCursor, white, ws, yellow
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NoAccess

public static final int NoAccess
Possible return values for getConfigState().

See Also:
getConfigState(), Constant Field Values

ReadOnly

public static final int ReadOnly
See Also:
Constant Field Values

ReadWrite

public static final int ReadWrite
See Also:
Constant Field Values
Constructor Detail

KConfigBase

protected KConfigBase(java.lang.Class dummy)
Method Detail

metaObject

public org.kde.qt.QMetaObject metaObject()
Overrides:
metaObject in class org.kde.qt.QObject

className

public java.lang.String className()
Overrides:
className in class org.kde.qt.QObject

setGroup

public void setGroup(java.lang.String group)
Specifies the group in which keys will be read and written. Subsequent calls to readEntry() and writeEntry() will be applied only in the activated group. Switch back to the default group by passing a null string.

Parameters:
group - The name of the new group.

setDesktopGroup

public void setDesktopGroup()
Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc.


group

public java.lang.String group()
Returns the name of the group in which we are searching for keys and from which we are retrieving entries.

Returns:
The current group.

hasGroup

public boolean hasGroup(java.lang.String group)
Returns true if the specified group is known about.

Parameters:
group - The group to search for.
Returns:
true if the group exists.

groupList

public java.util.ArrayList groupList()
Returns a list of groups that are known about.

Returns:
The list of groups.

locale

public java.lang.String locale()
Returns a the current locale.

Returns:
A string representing the current locale.

readEntry

public java.lang.String readEntry(java.lang.String pKey,
                                  java.lang.String aDefault)
Reads the value of an entry specified by pKey in the current group. If you want to read a path, please use readPathEntry().

Parameters:
pKey - The key to search for.
aDefault - A default value returned if the key was not found.
Returns:
The value for this key. Can be null if aDefault is null.

readEntry

public java.lang.String readEntry(java.lang.String pKey)

readPropertyEntry

public org.kde.qt.QVariant readPropertyEntry(java.lang.String pKey,
                                             org.kde.qt.QVariant aDefault)
Reads the value of an entry specified by pKey in the current group. The value is treated as if it is of the type of the given default value. Note that only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.

Parameters:
pKey - The key to search for.
aDefault - A default value returned if the key was not found or if the read value cannot be converted to the QVariant.Type.
Returns:
The value for the key or the default value if the key was not found.

readListEntry

public java.util.ArrayList readListEntry(java.lang.String pKey,
                                         char sep)
Reads a list of strings.

Parameters:
pKey - The key to search for.
sep - The list separator (default is ",").
Returns:
The list. Empty if the entry does not exist.

readListEntry

public java.util.ArrayList readListEntry(java.lang.String pKey)

readListEntry

public java.util.ArrayList readListEntry(java.lang.String pKey,
                                         java.lang.String[] aDefault,
                                         char sep)
Reads a list of strings, but returns a default if the key did not exist.

Parameters:
pKey - The key to search for.
aDefault - The default value to use if the key does not exist.
sep - The list separator (default is ",").
Returns:
The list. Contains aDefault if the Key does not exist.

readListEntry

public java.util.ArrayList readListEntry(java.lang.String pKey,
                                         java.lang.String[] aDefault)

readIntListEntry

public int[] readIntListEntry(java.lang.String pKey)
Reads a list of Integers.

Parameters:
pKey - The key to search for.
Returns:
The list. Empty if the entry does not exist.

readPathEntry

public java.lang.String readPathEntry(java.lang.String pKey,
                                      java.lang.String aDefault)
Reads a path. Read the value of an entry specified by pKey in the current group and interpret it as a path. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

Parameters:
pKey - The key to search for.
aDefault - A default value returned if the key was not found.
Returns:
The value for this key. Can be null if aDefault is null.

readPathEntry

public java.lang.String readPathEntry(java.lang.String pKey)

readPathListEntry

public java.util.ArrayList readPathListEntry(java.lang.String pKey,
                                             char sep)
Reads a list of string paths. Read the value of an entry specified by pKey in the current group and interpret it as a list of paths. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

Parameters:
pKey - The key to search for.
sep - The list separator (default is ",").
Returns:
The list. Empty if the entry does not exist.

readPathListEntry

public java.util.ArrayList readPathListEntry(java.lang.String pKey)

readNumEntry

public int readNumEntry(java.lang.String pKey,
                        int nDefault)
Reads a numerical value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readNumEntry

public int readNumEntry(java.lang.String pKey)

readUnsignedNumEntry

public int readUnsignedNumEntry(java.lang.String pKey,
                                int nDefault)
Reads an unsigned numerical value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readUnsignedNumEntry

public int readUnsignedNumEntry(java.lang.String pKey)

readLongNumEntry

public long readLongNumEntry(java.lang.String pKey,
                             long nDefault)
Reads a numerical value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readLongNumEntry

public long readLongNumEntry(java.lang.String pKey)

readUnsignedLongNumEntry

public long readUnsignedLongNumEntry(java.lang.String pKey,
                                     long nDefault)
Read an unsigned numerical value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readUnsignedLongNumEntry

public long readUnsignedLongNumEntry(java.lang.String pKey)

readNum64Entry

public long readNum64Entry(java.lang.String pKey,
                           long nDefault)
Reads a 64-bit numerical value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readNum64Entry

public long readNum64Entry(java.lang.String pKey)

readUnsignedNum64Entry

public long readUnsignedNum64Entry(java.lang.String pKey,
                                   long nDefault)
Read an 64-bit unsigned numerical value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readUnsignedNum64Entry

public long readUnsignedNum64Entry(java.lang.String pKey)

readDoubleNumEntry

public double readDoubleNumEntry(java.lang.String pKey,
                                 double nDefault)
Reads a floating point value. Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey - The key to search for.
nDefault - A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readDoubleNumEntry

public double readDoubleNumEntry(java.lang.String pKey)

readFontEntry

public org.kde.qt.QFont readFontEntry(java.lang.String pKey,
                                      org.kde.qt.QFont pDefault)
Reads a QFont value. Read the value of an entry specified by pKey in the current group and interpret it as a font object.

Parameters:
pKey - The key to search for.
pDefault - A default value (null QFont by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readFontEntry

public org.kde.qt.QFont readFontEntry(java.lang.String pKey)

readBoolEntry

public boolean readBoolEntry(java.lang.String pKey,
                             boolean bDefault)
Reads a booleanean entry. Read the value of an entry specified by pKey in the current group and interpret it as a booleanean value. Currently "on" and "true" are accepted as true, everything else if false.

Parameters:
pKey - The key to search for
bDefault - A default value returned if the key was not found.
Returns:
The value for this key.

readBoolEntry

public boolean readBoolEntry(java.lang.String pKey)

readRectEntry

public org.kde.qt.QRect readRectEntry(java.lang.String pKey,
                                      org.kde.qt.QRect pDefault)
Reads a QRect entry. Read the value of an entry specified by pKey in the current group and interpret it as a QRect object.

Parameters:
pKey - The key to search for
pDefault - A default value (null QRect by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readRectEntry

public org.kde.qt.QRect readRectEntry(java.lang.String pKey)

readPointEntry

public org.kde.qt.QPoint readPointEntry(java.lang.String pKey,
                                        org.kde.qt.QPoint pDefault)
Reads a QPoint entry. Read the value of an entry specified by pKey in the current group and interpret it as a QPoint object.

Parameters:
pKey - The key to search for
pDefault - A default value (null QPoint by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readPointEntry

public org.kde.qt.QPoint readPointEntry(java.lang.String pKey)

readSizeEntry

public org.kde.qt.QSize readSizeEntry(java.lang.String pKey,
                                      org.kde.qt.QSize pDefault)
Reads a QSize entry. Read the value of an entry specified by pKey in the current group and interpret it as a QSize object.

Parameters:
pKey - The key to search for
pDefault - A default value (null QSize by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readSizeEntry

public org.kde.qt.QSize readSizeEntry(java.lang.String pKey)

readColorEntry

public org.kde.qt.QColor readColorEntry(java.lang.String pKey,
                                        org.kde.qt.QColor pDefault)
Reads a QColor entry. Read the value of an entry specified by pKey in the current group and interpret it as a color.

Parameters:
pKey - The key to search for.
pDefault - A default value (null QColor by default) returned if the key was not found or if the value cannot be interpreted.
Returns:
The value for this key.

readColorEntry

public org.kde.qt.QColor readColorEntry(java.lang.String pKey)

readDateTimeEntry

public java.util.Calendar readDateTimeEntry(java.lang.String pKey,
                                            java.util.Calendar pDefault)
Reads a Calendar entry. Read the value of an entry specified by pKey in the current group and interpret it as a date and time.

Parameters:
pKey - The key to search for.
pDefault - A default value ( currentDateTime() by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

readDateTimeEntry

public java.util.Calendar readDateTimeEntry(java.lang.String pKey)

readEntryUntranslated

public java.lang.String readEntryUntranslated(java.lang.String pKey,
                                              java.lang.String aDefault)
Reads the value of an entry specified by pKey in the current group. The untranslated entry is returned, you normally do not need this.

Parameters:
pKey - The key to search for.
aDefault - A default value returned if the key was not found.
Returns:
The value for this key.

readEntryUntranslated

public java.lang.String readEntryUntranslated(java.lang.String pKey)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String pValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a key/value pair. This is stored in the most specific config file when destroying the config object or when calling sync(). If you want to write a path, please use writePathEntry().

Parameters:
pKey - The key to write.
pValue - The value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String pValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String pValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String pValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QVariant rValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
writeEntry() Overridden to accept a property. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write
rValue - The property to write
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.
See Also:
writeEntry(java.lang.String, java.lang.String, boolean, boolean, boolean)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QVariant rValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QVariant rValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QVariant rValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String[] rValue,
                       char sep,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write
rValue - The list to write
sep - The list separator (default is ",").
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.
See Also:
writeEntry(java.lang.String, java.lang.String, boolean, boolean, boolean)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String[] rValue,
                       char sep,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String[] rValue,
                       char sep,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String[] rValue,
                       char sep)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.lang.String[] rValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int[] rValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
writeEntry() overridden to accept a list of Integers. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write
rValue - The list to write
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.
See Also:
writeEntry(java.lang.String, java.lang.String, boolean, boolean, boolean)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int[] rValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int[] rValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int[] rValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int nValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Write a (key/value) pair. Same as above, but writes a numerical value.

Parameters:
pKey - The key to write.
nValue - The value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       int nValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int nValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       int nValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       long nValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but write a long numerical value.

Parameters:
pKey - The key to write.
nValue - The value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       long nValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       long nValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       long nValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       double nValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       char format,
                       int precision,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a floating-point value.

Parameters:
pKey - The key to write.
nValue - The value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
format - format determines the format to which the value is converted. Default is 'g'.
precision - precision sets the precision with which the value is converted. Default is 6 as in String.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       double nValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       char format,
                       int precision)

writeEntry

public void writeEntry(java.lang.String pKey,
                       double nValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       char format)

writeEntry

public void writeEntry(java.lang.String pKey,
                       double nValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       double nValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       double nValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       boolean bValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a booleanean value.

Parameters:
pKey - The key to write.
bValue - The value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       boolean bValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       boolean bValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       boolean bValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QFont rFont,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a font value.

Parameters:
pKey - The key to write.
rFont - The font value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QFont rFont,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QFont rFont,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QFont rFont)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QColor rColor,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but write a color entry. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write.
rColor - The color value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QColor rColor,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QColor rColor,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QColor rColor)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.util.Calendar rDateTime,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a date and time entry. Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters:
pKey - The key to write.
rDateTime - The date and time value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.util.Calendar rDateTime,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.util.Calendar rDateTime,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       java.util.Calendar rDateTime)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QRect rValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a rectangle. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write.
rValue - The rectangle value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QRect rValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QRect rValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QRect rValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QPoint rValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a point. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write.
rValue - The point value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QPoint rValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QPoint rValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QPoint rValue)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QSize rValue,
                       boolean bPersistent,
                       boolean bGlobal,
                       boolean bNLS)
Writes a (key/value) pair. Same as above, but writes a size. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!

Parameters:
pKey - The key to write.
rValue - The size value to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QSize rValue,
                       boolean bPersistent,
                       boolean bGlobal)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QSize rValue,
                       boolean bPersistent)

writeEntry

public void writeEntry(java.lang.String pKey,
                       org.kde.qt.QSize rValue)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String path,
                           boolean bPersistent,
                           boolean bGlobal,
                           boolean bNLS)
Writes a file path. It is checked whether the path is located under $HOME. If so the path is written out with the user's home-directory replaced with $HOME. The path should be read back with readPathEntry()

Parameters:
pKey - The key to write.
path - The path to write.
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String path,
                           boolean bPersistent,
                           boolean bGlobal)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String path,
                           boolean bPersistent)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String path)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String[] rValue,
                           char sep,
                           boolean bPersistent,
                           boolean bGlobal,
                           boolean bNLS)
writePathEntry() overridden to accept a list of paths (strings). It is checked whether the paths are located under $HOME. If so each of the paths are written out with the user's home-directory replaced with $HOME. The paths should be read back with readPathListEntry()

Parameters:
pKey - The key to write
rValue - The list to write
sep - The list separator (default is ",").
bPersistent - If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobal - If bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the locale tag is added to the key when writing it back.
See Also:
writePathEntry(java.lang.String, java.lang.String, boolean, boolean, boolean), readPathListEntry(java.lang.String, char)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String[] rValue,
                           char sep,
                           boolean bPersistent,
                           boolean bGlobal)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String[] rValue,
                           char sep,
                           boolean bPersistent)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String[] rValue,
                           char sep)

writePathEntry

public void writePathEntry(java.lang.String pKey,
                           java.lang.String[] rValue)

deleteEntry

public void deleteEntry(java.lang.String pKey,
                        boolean bNLS,
                        boolean bGlobal)
Deletes the entry specified by pKey in the current group.

Parameters:
pKey - The key to delete.
bGlobal - If bGlobal is true, the pair is not removed from the application specific config file, but to the global KDE config file.
bNLS - If bNLS is true, the key with the locale tag is removed.

deleteEntry

public void deleteEntry(java.lang.String pKey,
                        boolean bNLS)

deleteEntry

public void deleteEntry(java.lang.String pKey)

deleteGroup

public boolean deleteGroup(java.lang.String group,
                           boolean bDeep,
                           boolean bGlobal)
Deletes a configuration entry group If the group is not empty and bDeep is false, nothing gets deleted and false is returned. If this group is the current group and it is deleted, the current group is undefined and should be set with setGroup() before the next operation on the configuration object.

Parameters:
group - The name of the group
bDeep - Specify whether non-empty groups should be completely deleted (including their entries).
bGlobal - If bGlobal is true, the group is not removed from the application specific config file, but from the global KDE config file.
Returns:
If the group is not empty and bDeep is false, deleteGroup returns false.

deleteGroup

public boolean deleteGroup(java.lang.String group,
                           boolean bDeep)

deleteGroup

public boolean deleteGroup(java.lang.String group)

setDollarExpansion

public void setDollarExpansion(boolean _bExpand)
Turns on or off "dollar expansion" (see KConfigBase introduction) when reading config entries. Dollar sign expansion is initially OFF.

Parameters:
_bExpand - Tf true, dollar expansion is turned on.

setDollarExpansion

public void setDollarExpansion()

isDollarExpansion

public boolean isDollarExpansion()
Returns whether dollar expansion is on or off. It is initially OFF.

Returns:
true if dollar expansion is on.

rollback

public void rollback(boolean bDeep)
Mark the config object as "clean," i.e. don't write dirty entries at destruction time. If bDeep is false, only the global dirty flag of the KConfig object gets cleared. If you then call writeEntry() again, the global dirty flag is set again and all dirty entries will be written at a subsequent sync() call. Classes that derive from KConfigBase should override this method and implement storage-specific behavior, as well as calling the KConfigBase.rollback() explicitly in the initializer.

Parameters:
bDeep - If true, the dirty flags of all entries are cleared, as well as the global dirty flag.

rollback

public void rollback()

sync

public void sync()
Flushes all changes that currently reside only in memory back to disk / permanent storage. Dirty configuration entries are written to the most specific file available. Asks the back end to flush out all pending writes, and then calls rollback(). No changes are made if the object has readOnly status. You should call this from your destructor in derivative classes.

See Also:
rollback(boolean), isReadOnly()

isDirty

public boolean isDirty()
Checks whether the config file has any dirty (modified) entries.

Returns:
true if the config file has any dirty (modified) entries.

setReadOnly

public void setReadOnly(boolean _ro)
Sets the config object's read-only status.

Parameters:
_ro - If true, the config object will not write out any changes to disk even if it is destroyed or sync() is called.

isReadOnly

public boolean isReadOnly()
Returns the read-only status of the config object.

Returns:
The read-only status.

hasKey

public boolean hasKey(java.lang.String key)
Checks whether the key has an entry in the currently active group. Use this to determine whether a key is not specified for the current group (hasKey() returns false). Keys with null data are considered nonexistent.

Parameters:
key - The key to search for.
Returns:
If true, the key is available.

reparseConfiguration

public void reparseConfiguration()
Reparses all configuration files. This is useful for programs that use stand alone graphical configuration tools. The base method implemented here only clears the group list and then appends the default group. Derivative classes should clear any internal data structures and then simply call parseConfigFiles() when implementing this method.

See Also:
#parseConfigFiles

isImmutable

public boolean isImmutable()
Checks whether this configuration file can be modified.

Returns:
whether changes may be made to this configuration file.

groupIsImmutable

public boolean groupIsImmutable(java.lang.String group)
Checks whether it is possible to change the given group.

Parameters:
group - the group to check
Returns:
whether changes may be made to group in this configuration file.

entryIsImmutable

public boolean entryIsImmutable(java.lang.String key)
Checks whether it is possible to change the given entry.

Parameters:
key - the key to check
Returns:
whether the entry key may be changed in the current group in this configuration file.

getConfigState

public int getConfigState()
Returns the state of the app-config object. Possible return values are NoAccess (the application-specific config file could not be opened neither read-write nor read-only), ReadOnly (the application-specific config file is opened read-only, but not read-write) and ReadWrite (the application-specific config file is opened read-write).

Returns:
the state of the app-config object
See Also:
ConfigState

checkConfigFilesWritable

public boolean checkConfigFilesWritable(boolean warnUser)
Check whether the config files are writable.

Parameters:
warnUser - Warn the user if the configuration files are not writable.
Returns:
Indicates that all of the configuration files used are writable.

setReadDefaults

public void setReadDefaults(boolean b)
When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference. This is off by default.


readDefaults

public boolean readDefaults()
Returns:
true if all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference.

revertToDefault

public void revertToDefault(java.lang.String key)
Reverts the entry with key key in the current group in the application specific config file to either the system wide (default) value or the value specified in the global KDE config file. To revert entries in the global KDE config file, the global KDE config file should be opened explicitly in a separate config object.

Parameters:
key - The key of the entry to revert.

hasDefault

public boolean hasDefault(java.lang.String key)
Returns whether a default is specified for an entry in either the system wide configuration file or the global KDE config file. If an application computes a default value at runtime for a certain entry, e.g. like:
                 QColor computedDefault = kapp.palette().color(QPalette.Active, QColorGroup.Text)
                 QColor color = config.readEntry(key, computedDefault);
                 \encode
                         Then it may wish to make the following check before
                 writing back changes:
                 
                 if ( (value == computedDefault) && !config.hasDefault(key) )
                    config.revertToDefault(key)
                 else
                    config.writeEntry(key, value)
                 
This ensures that as long as the entry is not modified to differ from the computed default, the application will keep using the computed default and will follow changes the computed default makes over time.

Parameters:
key - The key of the entry to check.