Source Code (Use browser search to find items of interest.)
Class Index
kdevelop'DefaultsDialog (./kdevelop/kdevelop/kwrite/highlight.h:595)
class DefaultsDialog : public QDialog {
Q_OBJECT
public:
DefaultsDialog(HlManager *, ItemStyleList *, ItemFont *, QWidget *parent);
protected slots:
void changed(int);
protected:
StyleChanger *styleChanger;
ItemStyleList *itemStyleList;
};
kdevelop'DefaultsDialog::DefaultsDialog() (./kdevelop/kdevelop/kwrite/highlight.cpp:2317)
DefaultsDialog::DefaultsDialog(HlManager *hlManager, ItemStyleList *styleList,
ItemFont *font, QWidget *parent) : QDialog(parent,0L,true) {
QGroupBox *group;
QComboBox *styleCombo;
QLabel *label;
FontChanger *fontChanger;
QPushButton *button;
QRect r, gr;
int z;
group = new QGroupBox(i18n("Default Item Styles"),this);
gr.setRect(10,10,200,180);
group->setGeometry(gr);
styleCombo = new QComboBox(false,group);
label = new QLabel(styleCombo,i18n("Item:"),group);
connect(styleCombo,SIGNAL(activated(int)),this,SLOT(changed(int)));
r.setRect(10,15,160,25);
label->setGeometry(r);
r.moveBy(0,25);
styleCombo->setGeometry(r);
styleChanger = new StyleChanger(group,r.x(),r.y() + 25);
connect(styleCombo,SIGNAL(activated(int)),this,SLOT(changed(int)));
for (z = 0; z < hlManager->defaultStyles(); z++) {
styleCombo->insertItem(i18n(hlManager->defaultStyleName(z)));
}
// for (defStyle = defStyleList->first(); defStyle != 0L;
// defStyle = defStyleList->next()) {
// styleCombo->insertItem(defStyle->name);
// }
group = new QGroupBox(i18n("Default Font"),this);
gr.moveBy(gr.width() + 10,0);
group->setGeometry(gr);
fontChanger = new FontChanger(group,10,15);
fontChanger->setRef(font);
itemStyleList = styleList;
changed(0);
button = new QPushButton(i18n("&OK"),this);
button->setDefault(true);
r.setRect(10,210,70,25);
button->setGeometry(r);
connect(button,SIGNAL(clicked()),this,SLOT(accept()));
button = new QPushButton(i18n("&Cancel"),this);
r.moveBy(gr.right() - r.width() -5,0);
button->setGeometry(r);
connect(button,SIGNAL(clicked()),this,SLOT(reject()));
}
kdevelop'DefaultsDialog::changed() (./kdevelop/kdevelop/kwrite/highlight.cpp:2371)
void DefaultsDialog::changed(int z) {
styleChanger->setRef(itemStyleList->at(z));
}