Source Code (Use browser search to find items of interest.)
Class Index
kdevelop'IndentConfigTab (./kdevelop/kdevelop/kwrite/kwdialog.h:66)
class IndentConfigTab : public QWidget {
Q_OBJECT
public:
IndentConfigTab(QWidget *parent, KWrite *, const char *name = 0L);
void getData(KWrite *);
protected:
static const int numFlags = 5;
static const int flags[numFlags];
QCheckBox *opt[numFlags];
};
kdevelop'IndentConfigTab::IndentConfigTab() (./kdevelop/kdevelop/kwrite/kwdialog.cpp:298)
IndentConfigTab::IndentConfigTab(QWidget *parent, KWrite *kWrite,
const char *name) : QWidget(parent, name) {
QVBoxLayout *layout;
int configFlags;
static const char *labels[numFlags] = {i18nop("&Auto Indent"),
i18nop("&Backspace Indents"), i18nop("&Tab Indents"),
i18nop("&Keep Indent Profile"), i18nop("&Keep Extra Spaces")};
int z;
layout = new QVBoxLayout(this, 10, 2);
configFlags = kWrite->config();
for (z = 0; z < numFlags; z++) {
opt[z] = new QCheckBox(i18n(labels[z]), this);
layout->addWidget(opt[z], 0, AlignLeft);
opt[z]->setChecked(configFlags & flags[z]);
}
layout->addStretch();
}
kdevelop'IndentConfigTab::getData() (./kdevelop/kdevelop/kwrite/kwdialog.cpp:318)
void IndentConfigTab::getData(KWrite *kWrite) {
int configFlags, z;
configFlags = kWrite->config();
for (z = 0; z < numFlags; z++) {
configFlags &= ~flags[z];
if (opt[z]->isChecked()) configFlags |= flags[z];
}
kWrite->setConfig(configFlags);
}