Back to index

kdeartwork  4.3.2
Public Member Functions | Protected Attributes
KXSBoolItem Class Reference

#include <kxsitem.h>

Inheritance diagram for KXSBoolItem:
Inheritance graph
Collaboration diagram for KXSBoolItem:
Collaboration graph

List of all members.

Public Member Functions

 KXSBoolItem (const QString &name, KConfig &config)
 KXSBoolItem (const QString &name, const QXmlAttributes &attr)
virtual QString command ()
virtual void read (KConfig &config)
virtual void save (KConfig &config)

Protected Attributes

QString mSwitchOn
QString mSwitchOff
bool mValue
QString mName
QString mLabel

Detailed Description

Definition at line 82 of file kxsitem.h.

Constructor & Destructor Documentation

KXSBoolItem::KXSBoolItem ( const QString &  name,
KConfig &  config 

Definition at line 132 of file kxsitem.cpp.

  : KXSConfigItem(name, config)
  KConfigGroup grp(&config, name);
  mValue = grp.readEntry("Value",0);
  mSwitchOn  = grp.readEntry("SwitchOn");
  mSwitchOff = grp.readEntry("SwitchOff");
KXSBoolItem::KXSBoolItem ( const QString &  name,
const QXmlAttributes &  attr 

Definition at line 141 of file kxsitem.cpp.

  : KXSConfigItem(name, attr)
  mSwitchOn  = attr.value("arg-set");
  mSwitchOff = attr.value("arg-unset");
  mValue = mSwitchOn.isEmpty() ? true : false;

Member Function Documentation

QString KXSBoolItem::command ( ) [virtual]

Implements KXSConfigItem.

Definition at line 149 of file kxsitem.cpp.

  return mValue ? mSwitchOn : mSwitchOff;
void KXSBoolItem::read ( KConfig &  config) [virtual]

Implements KXSConfigItem.

Reimplemented in KXSCheckBoxControl.

Definition at line 154 of file kxsitem.cpp.

  KConfigGroup grp =;
  if (grp.hasKey("Value"))
      mValue = grp.readEntry("Value", false);
void KXSBoolItem::save ( KConfig &  config) [virtual]

Implements KXSConfigItem.

Definition at line 161 of file kxsitem.cpp.

  KConfigGroup grp =;
  grp.writeEntry("Value", mValue);

Member Data Documentation

QString KXSConfigItem::mLabel [protected, inherited]

Definition at line 43 of file kxsitem.h.

QString KXSConfigItem::mName [protected, inherited]

Definition at line 42 of file kxsitem.h.

QString KXSBoolItem::mSwitchOff [protected]

Definition at line 94 of file kxsitem.h.

QString KXSBoolItem::mSwitchOn [protected]

Definition at line 93 of file kxsitem.h.

bool KXSBoolItem::mValue [protected]

Definition at line 95 of file kxsitem.h.

The documentation for this class was generated from the following files: