MCPcopy Create free account
hub / github.com/KDAB/KDChart / init

Method init

examples/Gantt/legend_example/entrydialog.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void EntryDialog::init()
34{
35 ui->type->addItem(tr("Event"), KDGantt::TypeEvent);
36 ui->type->addItem(tr("Task"), KDGantt::TypeTask);
37 ui->type->addItem(tr("Summary"), KDGantt::TypeSummary);
38 ui->type->addItem(tr("Multi"), KDGantt::TypeMulti);
39
40 for (int row = 0; row < model->rowCount(); ++row)
41 addDependItem(model, model->index(row, 0));
42
43 connect(ui->startDate, SIGNAL(dateTimeChanged(const QDateTime &)), this, SLOT(updateEndDate(const QDateTime &)));
44 connect(ui->readOnly, SIGNAL(toggled(bool)), this, SLOT(disableEditing(bool)));
45 connect(ui->type, SIGNAL(currentIndexChanged(int)), this, SLOT(typeChanged(int)));
46
47 ui->startDate->setDateTime(QDateTime::currentDateTime());
48 typeChanged(0);
49}
50
51void EntryDialog::initFrom(const QModelIndex &index, const KDGantt::ConstraintModel *constraintModel)
52{

Callers

nothing calls this directly

Calls 3

addItemMethod · 0.80
rowCountMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected