void TimelineAbstractRenderer::setNotes(TimelineNotesModel *notes) { Q_D(TimelineAbstractRenderer); if (d->notes == notes) return; if (d->notes) { disconnect(d->notes, &TimelineNotesModel::changed, this, &TimelineAbstractRenderer::setNotesDirty); disconnect(d->notes, &QObject::destroyed, this, nullptr); } d->notes = notes; if (d->notes) { connect(d->notes, &TimelineNotesModel::changed, this, &TimelineAbstractRenderer::setNotesDirty); connect(d->notes, &QObject::destroyed, this, [this, d]() { // Weak pointers are supposed to be notified before the destroyed() signal is sent. Q_ASSERT(d->notes.isNull()); setNotesDirty(); emit notesChanged(d->notes); }); } setNotesDirty(); emit notesChanged(d->notes); }
void NotesDialog::createConnections() { connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(save())); connect(ui->openButton, SIGNAL(clicked()), this, SLOT(open())); connect(ui->appendButton, SIGNAL(clicked()), this, SLOT(append())); connect(ui->removeButton, SIGNAL(clicked()), this, SLOT(remove())); connect(ui->editModeCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeEditMode(bool))); connect(ui->tableView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(currentRowChanged(QModelIndex,QModelIndex))); connect(ui->textEdit, SIGNAL(textChanged()), this, SLOT(notesChanged())); connect(data->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(notesChanged())); }
void TargetsDialog::teardownConnections() { disconnect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); disconnect(ui->targetsListView->selectionModel() , SIGNAL(currentRowChanged(QModelIndex, QModelIndex)), this, SLOT(populateFormWithIndex(QModelIndex))); disconnect(ui->typeComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(targetTypeChanged(const QString&))); disconnect(ui->addTargetButton, SIGNAL(clicked()), this, SLOT(insertNewTarget())); disconnect(ui->deleteTargetButton, SIGNAL(clicked()), this, SLOT(deleteSelectedTarget())); disconnect(ui->addFromSelectionButton, SIGNAL(clicked()), this, SLOT(createTargetFromSelection())); disconnect(ui->aliasLineEdit, SIGNAL(editingFinished()), this, SLOT(aliasChanged())); disconnect(ui->catalogNumberLineEdit, SIGNAL(editingFinished()), this, SLOT(catalogNumberChanged())); disconnect(ui->j2000DecLineEdit, SIGNAL(editingFinished()), this, SLOT(declinationChanged())); disconnect(ui->j2000RALineEdit, SIGNAL(editingFinished()), this, SLOT(rightAscentionChanged())); disconnect(ui->distanceLineEdit, SIGNAL(editingFinished()), this, SLOT(distanceChanged())); disconnect(ui->magnitudeLineEdit, SIGNAL(editingFinished()), this, SLOT(magnitudeChanged())); disconnect(ui->sizeLineEdit, SIGNAL(editingFinished()), this, SLOT(sizeChanged())); disconnect(ui->notesTextEdit, SIGNAL(textChanged()), this, SLOT(notesChanged())); }
void TimelineAbstractRenderer::setNotes(TimelineNotesModel *notes) { Q_D(TimelineAbstractRenderer); if (d->notes == notes) return; if (d->notes) disconnect(d->notes, &TimelineNotesModel::changed, this, &TimelineAbstractRenderer::setNotesDirty); d->notes = notes; if (d->notes) connect(d->notes, &TimelineNotesModel::changed, this, &TimelineAbstractRenderer::setNotesDirty); setNotesDirty(); emit notesChanged(d->notes); }
void AccessEventObject::setNotes(QString notes) { m_notes = notes; emit notesChanged(m_notes); }
void xTupleDesigner::setNotes(QString p) { _notes = p; emit notesChanged(p); }