Back to index

kdeartwork  4.3.2
Public Member Functions | Protected Attributes
KXSSelectItem Class Reference

#include <kxsitem.h>

Inheritance diagram for KXSSelectItem:
Inheritance graph
Collaboration diagram for KXSSelectItem:
Collaboration graph

List of all members.

Public Member Functions

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

Protected Attributes

QStringList mOptions
QStringList mSwitches
int mValue
QString mName
QString mLabel

Detailed Description

Definition at line 98 of file kxsitem.h.

Constructor & Destructor Documentation

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

Definition at line 168 of file kxsitem.cpp.

  : KXSConfigItem(name, config)
  KConfigGroup grp(&config, name);
  mOptions = grp.readEntry("Options",QStringList());
  mSwitches = grp.readEntry("Switches",QStringList());
  mValue = grp.readEntry("Value",0);
KXSSelectItem::KXSSelectItem ( const QString &  name,
const QXmlAttributes &  attr 

Definition at line 177 of file kxsitem.cpp.

  : KXSConfigItem(name, attr), mValue(0)

Member Function Documentation

void KXSSelectItem::addOption ( const QXmlAttributes &  attr) [virtual]

Reimplemented in KXSDropListControl.

Definition at line 182 of file kxsitem.cpp.

    QString opt = attr.value("_label");
    QString arg = attr.value("arg-set");
    if ( arg.isEmpty() )
       mValue = mSwitches.count();
    mOptions += opt;
    mSwitches += arg;

Here is the caller graph for this function:

QString KXSSelectItem::command ( ) [virtual]

Implements KXSConfigItem.

Definition at line 192 of file kxsitem.cpp.

  QString tmp =;
  return tmp;
void KXSSelectItem::read ( KConfig &  config) [virtual]

Implements KXSConfigItem.

Reimplemented in KXSDropListControl.

Definition at line 198 of file kxsitem.cpp.

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

Implements KXSConfigItem.

Definition at line 205 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.

QStringList KXSSelectItem::mOptions [protected]

Definition at line 112 of file kxsitem.h.

QStringList KXSSelectItem::mSwitches [protected]

Definition at line 113 of file kxsitem.h.

int KXSSelectItem::mValue [protected]

Definition at line 114 of file kxsitem.h.

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