| 31 | } |
| 32 | |
| 33 | void 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 | |
| 51 | void EntryDialog::initFrom(const QModelIndex &index, const KDGantt::ConstraintModel *constraintModel) |
| 52 | { |