Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAnimCurvesModel Class Reference

#include <KisAnimCurvesModel.h>

+ Inheritance diagram for KisAnimCurvesModel:

Classes

struct  Private
 

Public Types

enum  ItemDataRole {
  ScalarValueRole = KisTimeBasedItemModel::UserRole + 101 , InterpolationModeRole , TangentsModeRole , LeftTangentRole ,
  RightTangentRole , CurveColorRole , CurveVisibleRole , PreviousKeyframeTime ,
  NextKeyframeTime , ChannelIdentifier , ChannelLimits
}
 
- Public Types inherited from KisTimeBasedItemModel
enum  ItemDataRole {
  ActiveFrameRole = Qt::UserRole + 101 , ScrubToRole , CloneOfActiveFrame , CloneCount ,
  FrameExistsRole , SpecialKeyframeExists , FrameCachedRole , FrameEditableRole ,
  FramesPerSecondRole , FrameHasContent , WithinClipRange , UserRole
}
 

Signals

void dataAdded (const QModelIndex &index)
 

Public Member Functions

KisAnimationCurveaddCurve (KisScalarKeyframeChannel *channel)
 
bool adjustKeyframes (const QModelIndexList &indexes, int timeOffset, qreal valueOffset)
 
void beginCommand (const KUndo2MagicString &text)
 
QVariant data (const QModelIndex &index, int role) const override
 
void endCommand ()
 
bool hasConnectionToCanvas () const
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
 KisAnimCurvesModel (QObject *parent)
 
void removeCurve (KisAnimationCurve *curve)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
void setCurveVisible (KisAnimationCurve *curve, bool visible)
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) override
 
 ~KisAnimCurvesModel () override
 
- Public Member Functions inherited from KisTimeBasedItemModel
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
int currentTime () const
 
QVariant data (const QModelIndex &index, int role) const override
 
KisDocumentdocument () const
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
bool isFrameCached (const int frame)
 
bool isPlaybackActive () const
 
bool isPlaybackPaused () const
 
bool isScrubbing ()
 
 KisTimeBasedItemModel (QObject *parent)
 
bool mirrorFrames (QModelIndexList indexes)
 
bool removeFrames (const QModelIndexList &indexes)
 
bool removeFramesAndOffset (QModelIndexList indicesToRemove)
 
void scrubHorizontalHeaderUpdate (int activeHeader)
 
void setAnimationPlayer (KisCanvasAnimationState *player)
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
void setDocument (class KisDocument *document)
 
void setFrameCache (KisAnimationFrameCacheSP cache)
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) override
 
void setImage (KisImageWSP image)
 
void setLastVisibleFrame (int time)
 
void setPlaybackRange (const KisTimeSpan &range)
 
void setScrubState (bool active)
 
void stopPlayback () const
 
 ~KisTimeBasedItemModel () override
 

Protected Member Functions

KisKeyframeChannelchannelByID (QModelIndex index, const QString &id) const override
 
QMap< QString, KisKeyframeChannel * > channelsAt (QModelIndex index) const override
 
KisNodeSP nodeAt (QModelIndex index) const override
 
- Protected Member Functions inherited from KisTimeBasedItemModel
int cloneCount (const QModelIndex &index) const
 
bool cloneOfActiveFrame (const QModelIndex &index) const
 
KUndo2CommandcreateOffsetFramesCommand (QModelIndexList srcIndexes, const QPoint &offset, bool copyFrames, bool moveEmptyFrames, KUndo2Command *parentCommand=0)
 
KisImageWSP image () const
 

Private Slots

void slotKeyframeAdded (const KisKeyframeChannel *channel, int time)
 
void slotKeyframeChanged (const KisKeyframeChannel *channel, int time)
 

Private Attributes

const QScopedPointer< Privatem_d
 

Additional Inherited Members

- Protected Slots inherited from KisTimeBasedItemModel
void slotCurrentTimeChanged (int time)
 

Detailed Description

Definition at line 33 of file KisAnimCurvesModel.h.

Member Enumeration Documentation

◆ ItemDataRole

Enumerator
ScalarValueRole 
InterpolationModeRole 
TangentsModeRole 
LeftTangentRole 
RightTangentRole 
CurveColorRole 
CurveVisibleRole 
PreviousKeyframeTime 
NextKeyframeTime 
ChannelIdentifier 
ChannelLimits 

Definition at line 61 of file KisAnimCurvesModel.h.

Constructor & Destructor Documentation

◆ KisAnimCurvesModel()

KisAnimCurvesModel::KisAnimCurvesModel ( QObject * parent)

Definition at line 105 of file KisAnimCurvesModel.cpp.

106 : KisTimeBasedItemModel(parent)
107 , m_d(new Private())
108{}
const QScopedPointer< Private > m_d
KisTimeBasedItemModel(QObject *parent)

◆ ~KisAnimCurvesModel()

KisAnimCurvesModel::~KisAnimCurvesModel ( )
override

Definition at line 110 of file KisAnimCurvesModel.cpp.

111{
112 qDeleteAll(m_d->curves);
113}

References m_d.

Member Function Documentation

◆ addCurve()

KisAnimationCurve * KisAnimCurvesModel::addCurve ( KisScalarKeyframeChannel * channel)

Definition at line 377 of file KisAnimCurvesModel.cpp.

378{
379 beginInsertRows(QModelIndex(), m_d->curves.size(), m_d->curves.size());
380
381 KisAnimationCurve *curve = new KisAnimationCurve(channel, m_d->chooseNextColor());
382 m_d->curves.append(curve);
383
384 endInsertRows();
385
388
391
393 this, [this](const KisKeyframeChannel* channel, int time) {
394 this->slotKeyframeChanged(channel, time);
395 });
396
397 connect(channel, SIGNAL(sigKeyframeChanged(const KisKeyframeChannel*,int)),
398 this, SLOT(slotKeyframeChanged(const KisKeyframeChannel*,int)));
399
400 return curve;
401}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void slotKeyframeAdded(const KisKeyframeChannel *channel, int time)
void slotKeyframeChanged(const KisKeyframeChannel *channel, int time)
KisKeyframeChannel stores and manages KisKeyframes. Maps units of time to virtual keyframe values....
void sigKeyframeHasBeenRemoved(const KisKeyframeChannel *channel, int time)
This signal is emitted just AFTER a keyframe is removed from the channel.
void sigAddedKeyframe(const KisKeyframeChannel *channel, int time)
This signal is emitted just AFTER a keyframe was added to the channel.

References connect(), m_d, KisKeyframeChannel::sigAddedKeyframe(), KisKeyframeChannel::sigKeyframeHasBeenRemoved(), slotKeyframeAdded(), and slotKeyframeChanged().

◆ adjustKeyframes()

bool KisAnimCurvesModel::adjustKeyframes ( const QModelIndexList & indexes,
int timeOffset,
qreal valueOffset )

Definition at line 311 of file KisAnimCurvesModel.cpp.

312{
313 QScopedPointer<KUndo2Command> command(
314 new KUndo2Command(
315 kundo2_i18np("Adjust Keyframe",
316 "Adjust %1 Keyframes",
317 indexes.size())));
318
319 {
320 KisImageBarrierLock lock(image());
321
322 if (timeOffset != 0) {
323 bool ok = createOffsetFramesCommand(indexes, QPoint(timeOffset, 0), false, false, command.data());
324 if (!ok) return false;
325 }
326
329 FrameItemList frameItems;
330
331 Q_FOREACH(QModelIndex index, indexes) {
332 KisScalarKeyframeChannel *channel = m_d->getCurveAt(index)->channel();
333 KIS_ASSERT_RECOVER_RETURN_VALUE(channel, false);
334
335 frameItems << FrameItem(channel->node(),
336 channel->id(),
337 index.column() + timeOffset);
338 };
339
341 command.data(),
342 [frameItems, valueOffset] () -> KUndo2Command* {
343
344 QScopedPointer<KUndo2Command> cmd(new KUndo2Command());
345
346 bool result = false;
347
348 Q_FOREACH (const FrameItem &item, frameItems) {
349 const int time = item.time;
350 KisNodeSP node = item.node;
351
352 KisKeyframeChannel *channel = node->getKeyframeChannel(item.channel);
353
354 if (!channel) continue;
355
356 KisScalarKeyframeSP scalarKeyframe = channel->keyframeAt(time).dynamicCast<KisScalarKeyframe>();
357
358 if (!scalarKeyframe) continue;
359
360 const qreal currentValue = scalarKeyframe->value();
361 //TODO Undo considerations.
362 scalarKeyframe->setValue(currentValue + valueOffset, cmd.data());
363 result = true;
364 }
365
366 return result ? new KisCommandUtils::SkipFirstRedoWrapper(cmd.take()) : 0;
367 });
368 }
369
373
374 return true;
375}
static void runSingleCommandStroke(KisImageSP image, KUndo2Command *cmd, KisStrokeJobData::Sequentiality sequentiality=KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::Exclusivity exclusivity=KisStrokeJobData::NORMAL)
runSingleCommandStroke creates a stroke and runs cmd in it. The text() field of cmd is used as a titl...
The KisScalarKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisSca...
KUndo2Command * createOffsetFramesCommand(QModelIndexList srcIndexes, const QPoint &offset, bool copyFrames, bool moveEmptyFrames, KUndo2Command *parentCommand=0)
#define KIS_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:85
KUndo2MagicString kundo2_i18np(const char *sing, const char *plur, const A1 &a1)
QVector< FrameItem > FrameItemList
The LambdaCommand struct is a shorthand for creation of AggregateCommand commands using C++ lambda fe...

References KisTimeBasedItemModel::createOffsetFramesCommand(), KisKeyframeChannel::id(), KisTimeBasedItemModel::image(), KIS_ASSERT_RECOVER_RETURN_VALUE, kundo2_i18np(), m_d, and KisKeyframeChannel::node().

◆ beginCommand()

void KisAnimCurvesModel::beginCommand ( const KUndo2MagicString & text)

Begins a block of commands. The following calls to setData will be grouped to a single undo step. Note: MUST be followed by a call to endCommand().

Definition at line 296 of file KisAnimCurvesModel.cpp.

297{
298 KIS_ASSERT_RECOVER_RETURN(!m_d->undoCommand);
299 m_d->undoCommand = new KUndo2Command(text);
300}
#define KIS_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:75

References KIS_ASSERT_RECOVER_RETURN, and m_d.

◆ channelByID()

KisKeyframeChannel * KisAnimCurvesModel::channelByID ( QModelIndex index,
const QString & id ) const
overrideprotectedvirtual

Implements KisTimeBasedItemModel.

Definition at line 443 of file KisAnimCurvesModel.cpp.

444{
445 return nodeAt(index)->getKeyframeChannel(id);
446}
KisNodeSP nodeAt(QModelIndex index) const override
KisKeyframeChannel * getKeyframeChannel(const QString &id, bool create)

References KisBaseNode::getKeyframeChannel(), and nodeAt().

◆ channelsAt()

QMap< QString, KisKeyframeChannel * > KisAnimCurvesModel::channelsAt ( QModelIndex index) const
overrideprotectedvirtual

Implements KisTimeBasedItemModel.

Definition at line 435 of file KisAnimCurvesModel.cpp.

436{
437 KisKeyframeChannel *channel = m_d->getCurveAt(index)->channel();
438 QMap<QString, KisKeyframeChannel*> list;
439 list[""] = channel;
440 return list;
441}

References m_d.

◆ data()

QVariant KisAnimCurvesModel::data ( const QModelIndex & index,
int role ) const
override

Definition at line 121 of file KisAnimCurvesModel.cpp.

122{
123 KisAnimationCurve *curve = m_d->getCurveAt(index);
124
125 if (curve) {
126 KisScalarKeyframeChannel *channel = curve->channel();
127 KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(channel, QVariant());
128
129 const int time = index.column();
130 KisScalarKeyframeSP keyframe = channel->keyframeAt(time).dynamicCast<KisScalarKeyframe>();
131
132 switch (role) {
134 return !keyframe.isNull();
135 case ScalarValueRole:
136 return channel->valueAt(time);
137 case LeftTangentRole: {
138 if (keyframe.isNull())
139 return QVariant();
140
141 const int previousKeyTime = channel->previousKeyframeTime(time);
142 KisScalarKeyframeSP previousKeyframe = channel->keyframeAt(previousKeyTime).dynamicCast<KisScalarKeyframe>();
143
144 //Tangent null whenever there's no previous keyframe.
145 if (!previousKeyframe)
146 return QVariant();
147
148 //Tangent should be null if previous keyframe not set to bezier.
149 if (previousKeyframe->interpolationMode() != KisScalarKeyframe::Bezier)
150 return QVariant();
151
152 return keyframe->leftTangent();
153 }
154 case RightTangentRole: {
155 if (keyframe.isNull())
156 return QVariant();
157
158 if (keyframe->interpolationMode() != KisScalarKeyframe::Bezier)
159 return QVariant();
160
161 return keyframe->rightTangent();
162 }
164 return (keyframe.isNull()) ? QVariant() : keyframe->interpolationMode();
165 case TangentsModeRole:
166 return (keyframe.isNull()) ? QVariant() : keyframe->tangentsMode();
167 case CurveColorRole:
168 return curve->color();
169 case CurveVisibleRole:
170 return curve->visible();
172 {
173 int activeKeyframeIndex = channel->activeKeyframeTime(time);
174 if (!channel->keyframeAt(activeKeyframeIndex)) return QVariant();
175 if (activeKeyframeIndex < time) {
176 return activeKeyframeIndex;
177 }
178
179 int previousKeyframeIndex = channel->previousKeyframeTime(activeKeyframeIndex);
180 if (!channel->keyframeAt(previousKeyframeIndex)) return QVariant();
181 return previousKeyframeIndex;
182 }
183 case NextKeyframeTime:
184 {
185 int activeKeyframeIndex = channel->activeKeyframeTime(time);
186 if (!channel->keyframeAt(activeKeyframeIndex)) {
187 int firstKeyIndex = channel->firstKeyframeTime();
188 if (firstKeyIndex != -1 && firstKeyIndex > time) {
189 return firstKeyIndex;
190 }
191 return QVariant();
192 }
193
194 int nextKeyframeIndex = channel->nextKeyframeTime(activeKeyframeIndex);
195 if (!channel->keyframeAt(nextKeyframeIndex)) return QVariant();
196 return nextKeyframeIndex;
197 }
199 return channel->id();
200 case ChannelLimits:
201 {
203
204 if (!limits)
205 return QVariant();
206
207 return QVariant::fromValue<ChannelLimitsMetatype>( ChannelLimitsMetatype(limits->lower, limits->upper) );
208 }
209 default:
210 break;
211 }
212 }
213
214 return KisTimeBasedItemModel::data(index, role);
215}
QPair< qreal, qreal > ChannelLimitsMetatype
KisScalarKeyframeChannel * channel() const
int previousKeyframeTime(const int time) const
KisKeyframeSP keyframeAt(int time) const
Get a keyframe at specified time. Used primarily when the value of a given keyframe is needed.
int activeKeyframeTime(int time) const
Get the time of the active keyframe. Useful for snapping any time to that of the most recent keyframe...
int nextKeyframeTime(const int time) const
qreal valueAt(int time) const
Quickly get the interpolated value at the given time.
QSharedPointer< ScalarKeyframeLimits > limits() const
The KisScalarKeyframe class is a concrete subclass of KisKeyframe that wraps a scalar value and inter...
QVariant data(const QModelIndex &index, int role) const override
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:129

References KisKeyframeChannel::activeKeyframeTime(), KisScalarKeyframe::Bezier, KisAnimationCurve::channel(), ChannelIdentifier, ChannelLimits, KisAnimationCurve::color(), CurveColorRole, CurveVisibleRole, KisTimeBasedItemModel::data(), KisKeyframeChannel::firstKeyframeTime(), KisKeyframeChannel::id(), InterpolationModeRole, KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, LeftTangentRole, KisScalarKeyframeChannel::limits(), m_d, KisKeyframeChannel::nextKeyframeTime(), NextKeyframeTime, KisKeyframeChannel::previousKeyframeTime(), PreviousKeyframeTime, RightTangentRole, ScalarValueRole, KisTimeBasedItemModel::SpecialKeyframeExists, TangentsModeRole, KisScalarKeyframeChannel::valueAt(), and KisAnimationCurve::visible().

◆ dataAdded

void KisAnimCurvesModel::dataAdded ( const QModelIndex & index)
signal

◆ endCommand()

void KisAnimCurvesModel::endCommand ( )

Definition at line 302 of file KisAnimCurvesModel.cpp.

303{
304 KIS_ASSERT_RECOVER_RETURN(m_d->undoCommand);
306
307 m_d->undoCommand = 0;
308}
KisPostExecutionUndoAdapter * postExecutionUndoAdapter() const override
QSharedPointer< T > toQShared(T *ptr)

References KisPostExecutionUndoAdapter::addCommand(), KisTimeBasedItemModel::image(), KIS_ASSERT_RECOVER_RETURN, m_d, KisImage::postExecutionUndoAdapter(), and toQShared().

◆ hasConnectionToCanvas()

bool KisAnimCurvesModel::hasConnectionToCanvas ( ) const

◆ headerData()

QVariant KisAnimCurvesModel::headerData ( int section,
Qt::Orientation orientation,
int role ) const
override

Definition at line 286 of file KisAnimCurvesModel.cpp.

287{
288 return KisTimeBasedItemModel::headerData(section, orientation, role);
289}
QVariant headerData(int section, Qt::Orientation orientation, int role) const override

References KisTimeBasedItemModel::headerData().

◆ nodeAt()

KisNodeSP KisAnimCurvesModel::nodeAt ( QModelIndex index) const
overrideprotectedvirtual

Implements KisTimeBasedItemModel.

Definition at line 426 of file KisAnimCurvesModel.cpp.

427{
428 KisAnimationCurve *curve = m_d->getCurveAt(index);
429 if (curve && curve->channel() && curve->channel()->node()) {
430 return KisNodeSP(curve->channel()->node());
431 }
432 return 0;
433}
KisSharedPtr< KisNode > KisNodeSP
Definition kis_types.h:86

References KisAnimationCurve::channel(), m_d, and KisKeyframeChannel::node().

◆ removeCurve()

void KisAnimCurvesModel::removeCurve ( KisAnimationCurve * curve)

Definition at line 403 of file KisAnimCurvesModel.cpp.

404{
405 int index = m_d->curves.indexOf(curve);
406 if (index < 0) return;
407
408 curve->channel()->disconnect(this);
409
410 beginRemoveRows(QModelIndex(), index, index);
411
412 m_d->curves.removeAt(index);
413 delete curve;
414
415 endRemoveRows();
416}

References KisAnimationCurve::channel(), and m_d.

◆ rowCount()

int KisAnimCurvesModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
override

Definition at line 115 of file KisAnimCurvesModel.cpp.

116{
117 Q_UNUSED(parent);
118 return m_d->curves.size();
119}

References m_d.

◆ setCurveVisible()

void KisAnimCurvesModel::setCurveVisible ( KisAnimationCurve * curve,
bool visible )

Definition at line 418 of file KisAnimCurvesModel.cpp.

419{
420 curve->setVisible(visible);
421
422 int row = m_d->rowForCurve(curve);
423 Q_EMIT dataChanged(index(row, 0), index(row, columnCount()));
424}
void setVisible(bool visible)
int columnCount(const QModelIndex &parent=QModelIndex()) const override

References KisTimeBasedItemModel::columnCount(), m_d, and KisAnimationCurve::setVisible().

◆ setData()

bool KisAnimCurvesModel::setData ( const QModelIndex & index,
const QVariant & value,
int role )
override

Definition at line 217 of file KisAnimCurvesModel.cpp.

218{
219 if (!index.isValid())
220 return false;
221
222 KisScalarKeyframeChannel *channel = m_d->getCurveAt(index)->channel();
223 KUndo2Command *command = m_d->undoCommand;
224
225 switch (role) {
226 case ScalarValueRole:
227 {
228 if (channel->keyframeAt(index.column())) {
229
230 if (!command) command = new KUndo2Command(kundo2_i18n("Adjust keyframe"));
231 channel->keyframeAt<KisScalarKeyframe>(index.column())->setValue(value.toReal(), command);
232 } else {
233
234 if (!command) command = new KUndo2Command(kundo2_i18n("Insert keyframe"));
235 channel->addScalarKeyframe(index.column(), value.toReal(), command);
236 }
237 dataChanged(index,index);
238 }
239 break;
240 case LeftTangentRole:
241 case RightTangentRole:
242 {
243 KisScalarKeyframeSP keyframe = channel->keyframeAt<KisScalarKeyframe>(index.column());
244 if (!keyframe) return false;
245
246 QPointF leftTangent = (role == LeftTangentRole ? value.toPointF() : keyframe->leftTangent());
247 QPointF rightTangent = (role == RightTangentRole ? value.toPointF() : keyframe->rightTangent());
248
249 if (!command) command = new KUndo2Command(kundo2_i18n("Adjust tangent"));
250 keyframe->setInterpolationTangents(leftTangent, rightTangent, command);
251 dataChanged(index, index);
252 }
253 break;
255 {
256 KisScalarKeyframeSP key = channel->keyframeAt<KisScalarKeyframe>(index.column());
257
258 if (!command) command = new KUndo2Command(kundo2_i18n("Set interpolation mode"));
259 key->setInterpolationMode((KisScalarKeyframe::InterpolationMode)value.toInt(), command);
260 dataChanged(index, index);
261 }
262 break;
263 case TangentsModeRole:
264 {
265 KisScalarKeyframeSP keyframe = channel->keyframeAt<KisScalarKeyframe>(index.column());
266 if (!keyframe) return false;
267
269
270 if (!command) command = new KUndo2Command(kundo2_i18n("Set interpolation mode"));
271 keyframe->setTangentsMode( mode, command );
272 dataChanged(index,index);
273 }
274 break;
275 default:
276 return KisTimeBasedItemModel::setData(index, value, role);
277 }
278
279 if (command && !m_d->undoCommand) {
281 }
282
283 return true;
284}
float value(const T *src, size_t ch)
void addScalarKeyframe(int time, qreal value, KUndo2Command *parentUndoCmd=nullptr)
InterpolationMode
Controls the type of interpolation between this KisScalarKeyframe and the next.
TangentsMode
Controls the behavior of the left and right tangents on a given keyframe for different curve shapes.
bool setData(const QModelIndex &index, const QVariant &value, int role) override
KUndo2MagicString kundo2_i18n(const char *text)

References KisPostExecutionUndoAdapter::addCommand(), KisScalarKeyframeChannel::addScalarKeyframe(), KisTimeBasedItemModel::image(), InterpolationModeRole, KisKeyframeChannel::keyframeAt(), kundo2_i18n(), LeftTangentRole, m_d, KisImage::postExecutionUndoAdapter(), RightTangentRole, ScalarValueRole, KisTimeBasedItemModel::setData(), TangentsModeRole, toQShared(), and value().

◆ setHeaderData()

bool KisAnimCurvesModel::setHeaderData ( int section,
Qt::Orientation orientation,
const QVariant & value,
int role )
override

Definition at line 291 of file KisAnimCurvesModel.cpp.

292{
293 return KisTimeBasedItemModel::setHeaderData(section, orientation, value, role);
294}
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role) override

References KisTimeBasedItemModel::setHeaderData(), and value().

◆ slotKeyframeAdded

void KisAnimCurvesModel::slotKeyframeAdded ( const KisKeyframeChannel * channel,
int time )
privateslot

Definition at line 455 of file KisAnimCurvesModel.cpp.

456{
457 Q_EMIT dataAdded(index(m_d->rowForChannel(channel), time));
458}
void dataAdded(const QModelIndex &index)

References dataAdded(), and m_d.

◆ slotKeyframeChanged

void KisAnimCurvesModel::slotKeyframeChanged ( const KisKeyframeChannel * channel,
int time )
privateslot

Definition at line 448 of file KisAnimCurvesModel.cpp.

449{
450 int row = m_d->rowForChannel(channel);
451 QModelIndex changedIndex = index(row, time);
452 Q_EMIT dataChanged(changedIndex, changedIndex);
453}

References m_d.

Member Data Documentation

◆ m_d

const QScopedPointer<Private> KisAnimCurvesModel::m_d
private

Definition at line 90 of file KisAnimCurvesModel.h.


The documentation for this class was generated from the following files: