void KoGradientEditWidget::setupConnections() { connect(m_gradientType, SIGNAL(activated(int)), this, SLOT(combosChange(int))); connect(m_gradientRepeat, SIGNAL(activated(int)), this, SLOT(combosChange(int))); connect(m_gradientTarget, SIGNAL(activated(int)), this, SLOT(combosChange(int))); connect(m_addToPredefs, SIGNAL(clicked()), this, SLOT(addGradientToPredefs())); connect(m_opacity, SIGNAL(valueChanged(qreal,bool)), this, SLOT(opacityChanged(qreal,bool))); connect(m_actionStopColor, SIGNAL(colorChanged(KoColor)), this, SLOT(stopChanged())); connect(m_stopPosition, SIGNAL(valueChanged(double)), this, SLOT(stopChanged())); }
void QtGradientStopsModel::changeStop(QtGradientStop *stop, const QColor &newColor) { if (!d_ptr->m_stopToPos.contains(stop)) return; if (stop->color() == newColor) return; emit stopChanged(stop, newColor); stop->setColor(newColor); }
void QHtspDvrEntryModel::_removeRow(QHtspDvrEntry *dvrEntry) { disconnect(dvrEntry, SIGNAL(idChanged()), this, SLOT(_updateId())); disconnect(dvrEntry, SIGNAL(channelChanged()), this, SLOT(_updateChannel())); disconnect(dvrEntry, SIGNAL(stateChanged()), this, SLOT(_updateState())); disconnect(dvrEntry, SIGNAL(startChanged()), this, SLOT(_updateStart())); disconnect(dvrEntry, SIGNAL(stopChanged()), this, SLOT(_updateStop())); disconnect(dvrEntry, SIGNAL(titleChanged()), this, SLOT(_updateTitle())); if(dvrEntry->channel()) disconnect(dvrEntry->channel(), SIGNAL(nameChanged()), this, SLOT(_updateChannel())); int row = m_dvrEntries->indexOf(dvrEntry); beginRemoveRows(QModelIndex(), row, row); endRemoveRows(); }
void QHtspDvrEntryModel::_addRow(QHtspDvrEntry *dvrEntry) { int rows = rowCount() - 1; beginInsertRows(QModelIndex(), rows, rows); endInsertRows(); connect(dvrEntry, SIGNAL(idChanged()), this, SLOT(_updateId())); connect(dvrEntry, SIGNAL(channelChanged()), this, SLOT(_updateChannel())); connect(dvrEntry, SIGNAL(stateChanged()), this, SLOT(_updateState())); connect(dvrEntry, SIGNAL(startChanged()), this, SLOT(_updateStart())); connect(dvrEntry, SIGNAL(stopChanged()), this, SLOT(_updateStop())); connect(dvrEntry, SIGNAL(titleChanged()), this, SLOT(_updateTitle())); if(dvrEntry->channel()) connect(dvrEntry->channel(), SIGNAL(nameChanged()), this, SLOT(_updateChannel())); }