Back to index

kdeartwork  4.3.2
Signals | Public Member Functions | Protected Slots | Protected Attributes
KXSCheckBoxControl Class Reference

#include <kxscontrol.h>

Inheritance diagram for KXSCheckBoxControl:
Inheritance graph
[legend]
Collaboration diagram for KXSCheckBoxControl:
Collaboration graph
[legend]

List of all members.

Signals

void changed ()

Public Member Functions

 KXSCheckBoxControl (QWidget *parent, const QString &name, KConfig &config)
 KXSCheckBoxControl (QWidget *parent, const QString &name, const QXmlAttributes &attr)
virtual void read (KConfig &config)
virtual QString command ()
virtual void save (KConfig &config)

Protected Slots

void slotToggled (bool)

Protected Attributes

QString mSwitchOn
QString mSwitchOff
bool mValue
QString mName
QString mLabel

Detailed Description

Definition at line 81 of file kxscontrol.h.


Constructor & Destructor Documentation

KXSCheckBoxControl::KXSCheckBoxControl ( QWidget *  parent,
const QString &  name,
KConfig &  config 
)

Definition at line 179 of file kxscontrol.cpp.

  : QCheckBox(parent), KXSBoolItem(name, config)
{
  setText(mLabel);
  setChecked(mValue);
  connect(this, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
}

Here is the call graph for this function:

KXSCheckBoxControl::KXSCheckBoxControl ( QWidget *  parent,
const QString &  name,
const QXmlAttributes &  attr 
)

Definition at line 188 of file kxscontrol.cpp.

  : QCheckBox(parent), KXSBoolItem(name, attr)
{
  setText(i18n(mLabel.toUtf8()));
  setChecked(mValue);
  connect(this, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
}

Here is the call graph for this function:


Member Function Documentation

void KXSCheckBoxControl::changed ( ) [signal]

Here is the caller graph for this function:

QString KXSBoolItem::command ( ) [virtual, inherited]

Implements KXSConfigItem.

Definition at line 149 of file kxsitem.cpp.

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

Reimplemented from KXSBoolItem.

Definition at line 203 of file kxscontrol.cpp.

{
    KXSBoolItem::read(config);
    setChecked(mValue);
}
void KXSBoolItem::save ( KConfig &  config) [virtual, inherited]

Implements KXSConfigItem.

Definition at line 161 of file kxsitem.cpp.

{
  KConfigGroup grp = config.group(mName);
  grp.writeEntry("Value", mValue);
}
void KXSCheckBoxControl::slotToggled ( bool  state) [protected, slot]

Definition at line 197 of file kxscontrol.cpp.

{
    mValue = state;
    emit changed();
}

Here is the call graph for this function:

Here is the caller graph for this function:


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, inherited]

Definition at line 94 of file kxsitem.h.

QString KXSBoolItem::mSwitchOn [protected, inherited]

Definition at line 93 of file kxsitem.h.

bool KXSBoolItem::mValue [protected, inherited]

Definition at line 95 of file kxsitem.h.


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