Source Code (Use browser search to find items of interest.)
Class Index
ksirtet'OptionDialog (./kdegames/ksirtet/dialogs.h:55)
class OptionDialog : public DialogBase
{
Q_OBJECT
public:
OptionDialog(QWidget *parent);
static bool readMenuVisible();
static void writeMenuVisible(bool visible);
static bool readShadow();
static bool readShowNext();
static bool readAnimations();
private slots:
void accept();
private:
QCheckBox *shadow, *next, *anim;
static KConfig *config();
};
ksirtet'OptionDialog::OptionDialog() (./kdegames/ksirtet/dialogs.cpp:211)
OptionDialog::OptionDialog(QWidget *parent)
: DialogBase(i18n("Settings"), Ok|Cancel, Cancel, parent)
{
shadow = new QCheckBox(i18n("Show tile's shadow"), plainPage());
shadow->setChecked(readShadow());
top->addWidget(shadow);
top->addSpacing(spacingHint());
next = new QCheckBox(i18n("Show next tile"), plainPage());
next->setChecked(readShowNext());
top->addWidget(next);
anim = new QCheckBox(i18n("Enable animations"), plainPage());
anim->setChecked(readAnimations());
top->addWidget(anim);
}
ksirtet'OptionDialog::config() (./kdegames/ksirtet/dialogs.cpp:228)
KConfig *OptionDialog::config()
{
KConfig *conf = kapp->config();
conf->setGroup(OP_GRP);
return conf;
}
ksirtet'OptionDialog::accept() (./kdegames/ksirtet/dialogs.cpp:235)
void OptionDialog::accept()
{
KConfig *conf = config();
conf->writeEntry(OP_SHADOW, shadow->isChecked());
conf->writeEntry(OP_SHOW_NEXT, next->isChecked());
conf->writeEntry(OP_ANIMATIONS, anim->isChecked());
DialogBase::accept();
}
ksirtet'OptionDialog::readShadow() (./kdegames/ksirtet/dialogs.cpp:245)
bool OptionDialog::readShadow()
{
return config()->readBoolEntry(OP_SHADOW, TRUE);
}
ksirtet'OptionDialog::readShowNext() (./kdegames/ksirtet/dialogs.cpp:250)
bool OptionDialog::readShowNext()
{
return config()->readBoolEntry(OP_SHOW_NEXT, TRUE);
}
ksirtet'OptionDialog::readAnimations() (./kdegames/ksirtet/dialogs.cpp:255)
bool OptionDialog::readAnimations()
{
return config()->readBoolEntry(OP_ANIMATIONS, TRUE);
}
ksirtet'OptionDialog::readMenuVisible() (./kdegames/ksirtet/dialogs.cpp:260)
bool OptionDialog::readMenuVisible()
{
return config()->readBoolEntry(OP_MENUBAR, TRUE);
}
ksirtet'OptionDialog::writeMenuVisible() (./kdegames/ksirtet/dialogs.cpp:265)
void OptionDialog::writeMenuVisible(bool visible)
{
config()->writeEntry(OP_MENUBAR, visible);
}