|
Krita Source Code Documentation
|
The main storyboard model. This class manages a StoryboardItemList which is a list of StoryboardItem objects. It provides the interface to manipulate and access the data.
More...
#include <StoryboardModel.h>
Inheritance diagram for StoryboardModel:Classes | |
| class | KeyframeReorderLock |
Public Types | |
| enum | AdditionalRoles { TotalSceneDurationInFrames = Qt::UserRole + 1 , TotalSceneDurationInSeconds = Qt::UserRole + 2 } |
Public Slots | |
| void | slotSetActiveNode (KisNodeSP) |
Signals | |
| void | sigStoryboardItemListChanged () |
| This signal is emitted whenever m_items is changed. it is used to keep the StoryboardItemList in KisDocument in sync with m_items. | |
Public Member Functions | |
| QModelIndexList | affectedIndexes (KisTimeSpan range) const |
| Returns a list of index of items that have frame in between argument range. | |
| bool | changeSceneHoldLength (int oldDuration, QModelIndex itemIndex) |
moves all keyframes in all layers after the frame of the parent of durationIndex Keyframes are moved to the left or right based on the difference (newDuration-oldDuration) | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| void | createBlankKeyframes (const QModelIndex &index, KUndo2Command *cmd=nullptr) |
| void | createDuplicateKeyframes (const QModelIndex &index, KUndo2Command *cmd=nullptr) |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| StoryboardComment | getComment (int row) const |
| StoryboardItemList | getData () |
| int | getFramesPerSecond () const |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
| QModelIndex | indexFromFrame (int frame, bool framePerfect=true) const |
| Returns the index of the item corresponding the frame, if there is an item with that frame. | |
| void | insertChildRows (int position, KUndo2Command *cmd=nullptr) |
| must be called after a first level index is inserted. Adds child nodes to the first level indices | |
| void | insertChildRows (int position, StoryboardItemSP item) |
| Adds child nodes from the item provided. | |
| bool | insertItem (QModelIndex index, bool after) |
inserts item after or before index based on after parameter | |
| bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) override |
| bool | isFrozen () const |
| bool | isLocked () const |
| QModelIndex | lastIndexBeforeFrame (int frame) const |
| Returns the index of the item with largest frame smaller than argument frame. | |
| int | lastKeyframeGlobal () const |
| int | lastKeyframeWithin (QModelIndex index) |
| Gets the last keyframe that exists within an index's duration. Used to prevent duration from overwriting keyframes that exist internal to an existing scene. | |
| QMimeData * | mimeData (const QModelIndexList &indexes) const override |
| QStringList | mimeTypes () const override |
| bool | moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override |
| int | nextKeyframeGlobal (int keyframeTime) const |
the next time at which there is a keyframe in any layer after keyframeTime | |
| QModelIndex | parent (const QModelIndex &index) const override |
| void | pushUndoCommand (KUndo2Command *command) |
| bool | removeItem (QModelIndex index, KUndo2Command *command=nullptr) |
| removes item, deletes keyframes within and shifts keyframe after the scene to fill in the gap | |
| bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) override |
| void | reorderKeyframes () |
| reorders all keyframes to reflect storyboard docker's arrangement. typically used after drag and drop to keep storyboard timing accurate to timeline timing. | |
| void | resetData (StoryboardItemList list) |
resets m_items to list | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| void | setCommentModel (StoryboardCommentModel *commentModel) |
| Sets the commentModel in StoryboardModel and creates connections to keep the local copy of comments in sync with the commentModel's. | |
| bool | setCommentScrollData (const QModelIndex &index, const QVariant &value) |
Sets the scrollValue of the CommentBox object. | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| void | setFreeze (bool) |
| void | setImage (KisImageWSP image) |
| void | setLocked (bool) |
| bool | setThumbnailPixmapData (const QModelIndex &parentIndex, const KisPaintDeviceSP &dev) |
| Sets the Pixmap data. | |
| void | setView (StoryboardView *view) |
| void | shiftKeyframes (KisTimeSpan affected, int offset, KUndo2Command *cmd=nullptr) |
| void | slotUpdateThumbnailsForItems (QModelIndexList indices) |
| StoryboardModel (QObject *parent) | |
| Qt::DropActions | supportedDragActions () const override |
| Qt::DropActions | supportedDropActions () const override |
| int | totalCommentCount () |
| Get total number of comments. | |
| bool | updateDurationData (const QModelIndex &parentIndex) |
updates the duration data of item at parentIndex to the number of frame to the next keyframe in any layer. | |
| int | visibleCommentCount () const |
Used in StoryboardDelegate and StoryboardView to get size of one storyboard item. | |
| int | visibleCommentsUpto (QModelIndex index) const |
Used in StoryboardView to design the layout of storyboard item. | |
| void | visualizeScene (const QModelIndex &index, bool useUndo=true) |
| ~StoryboardModel () override | |
Private Slots | |
| void | slotCommentDataChanged () |
| void | slotCommentRowInserted (const QModelIndex, int, int) |
| void | slotCommentRowMoved (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) |
| void | slotCommentRowRemoved (const QModelIndex, int, int) |
| void | slotCurrentFrameChanged (int frameId) |
| called when currentUiTime changes | |
| void | slotFramerateChanged () |
| void | slotFrameRenderCancelled (int frame) |
called KisStoryboardThumbnailRenderScheduler when frame render is cancelled. | |
| void | slotFrameRenderCompleted (int frame, KisPaintDeviceSP dev) |
called KisStoryboardThumbnailRenderScheduler when frame render is complete | |
| void | slotKeyframeAdded (const KisKeyframeChannel *channel, int time) |
| void | slotKeyframeRemoved (const KisKeyframeChannel *channel, int time) |
| void | slotNodeRemoved (KisNodeSP node) |
| void | slotUpdateThumbnailForFrame (int frame, bool delay=true) |
calls regeneration of frame in the background i.e. in another thread. | |
| void | slotUpdateThumbnails () |
calls regeneration of the currentUiTime() and all frames in affectedIndexes(KisTimeSpan) | |
Private Member Functions | |
| bool | isValidBoard (const QModelIndex &index) const |
| bool | moveRowsImpl (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild, KUndo2Command *parentCMD=nullptr) |
Private Attributes | |
| KisNodeWSP | m_activeNode |
| QVector< StoryboardComment > | m_commentList |
| StoryboardCommentModel * | m_commentModel {0} |
| bool | m_freezeKeyframePositions {false} |
| KisImageWSP | m_image |
| KisIdleWatcher | m_imageIdleWatcher |
| StoryboardItemList | m_items |
| int | m_lastScene {0} |
| bool | m_lockBoards {false} |
| KisStoryboardThumbnailRenderScheduler * | m_renderScheduler {0} |
| KisSignalCompressor | m_renderSchedulingCompressor |
| bool | m_reorderingKeyframes {false} |
| StoryboardView * | m_view {0} |
Friends | |
| class | KisMoveStoryboardCommand |
The main storyboard model. This class manages a StoryboardItemList which is a list of StoryboardItem objects. It provides the interface to manipulate and access the data.
Definition at line 32 of file StoryboardModel.h.
| Enumerator | |
|---|---|
| TotalSceneDurationInFrames | |
| TotalSceneDurationInSeconds | |
Definition at line 37 of file StoryboardModel.h.
| StoryboardModel::StoryboardModel | ( | QObject * | parent | ) |
Definition at line 30 of file StoryboardModel.cpp.
References connect(), m_imageIdleWatcher, m_renderScheduler, m_renderSchedulingCompressor, slotFrameRenderCancelled(), slotFrameRenderCompleted(), and slotUpdateThumbnails().
|
override |
Definition at line 45 of file StoryboardModel.cpp.
References m_renderScheduler.
| QModelIndexList StoryboardModel::affectedIndexes | ( | KisTimeSpan | range | ) | const |
Returns a list of index of items that have frame in between argument range.
| range | The range of frames |
Definition at line 667 of file StoryboardModel.cpp.
References data(), KisTimeSpan::end(), StoryboardItem::FrameNumber, index(), indexFromFrame(), KisTimeSpan::isInfinite(), KisTimeSpan::isValid(), rowCount(), and KisTimeSpan::start().
| bool StoryboardModel::changeSceneHoldLength | ( | int | oldDuration, |
| QModelIndex | itemIndex ) |
moves all keyframes in all layers after the frame of the parent of durationIndex Keyframes are moved to the left or right based on the difference (newDuration-oldDuration)
| oldDuration | The old duration in frames assigned to item |
| itemIndex | The storyboard item index. |
Definition at line 854 of file StoryboardModel.cpp.
References data(), KisTimeSpan::infinite(), lastKeyframeWithin(), shiftKeyframes(), and TotalSceneDurationInFrames.
|
override |
Definition at line 107 of file StoryboardModel.cpp.
References parent().
| void StoryboardModel::createBlankKeyframes | ( | const QModelIndex & | index, |
| KUndo2Command * | cmd = nullptr ) |
Definition at line 1321 of file StoryboardModel.cpp.
References StoryboardItem::FrameNumber, index(), m_freezeKeyframePositions, m_image, KisLayerUtils::recursiveApplyNodes(), and KisNodeFacade::root.
| void StoryboardModel::createDuplicateKeyframes | ( | const QModelIndex & | index, |
| KUndo2Command * | cmd = nullptr ) |
Definition at line 1304 of file StoryboardModel.cpp.
References StoryboardItem::FrameNumber, index(), m_freezeKeyframePositions, m_image, KisLayerUtils::recursiveApplyNodes(), and KisNodeFacade::root.
|
override |
Definition at line 120 of file StoryboardModel.cpp.
References StoryboardItem::Comments, CommentBox::content, StoryboardItem::DurationFrame, StoryboardItem::DurationSecond, ThumbnailData::frameNum, StoryboardItem::FrameNumber, getFramesPerSecond(), index(), isValidBoard(), m_items, ThumbnailData::pixmap, CommentBox::scrollValue, TotalSceneDurationInFrames, and TotalSceneDurationInSeconds.
|
override |
Definition at line 468 of file StoryboardModel.cpp.
References data(), index(), isLocked(), moveRows(), and parent().
|
override |
Definition at line 320 of file StoryboardModel.cpp.
References index(), and isValidBoard().
| StoryboardComment StoryboardModel::getComment | ( | int | row | ) | const |
| row | The row of the comment. |
Definition at line 556 of file StoryboardModel.cpp.
References m_commentList.
| StoryboardItemList StoryboardModel::getData | ( | ) |
Definition at line 1030 of file StoryboardModel.cpp.
References m_items.
| int StoryboardModel::getFramesPerSecond | ( | ) | const |
Definition at line 581 of file StoryboardModel.cpp.
References KisImage::animationInterface(), KisImageAnimationInterface::framerate(), KisWeakSharedPtr< T >::isValid(), and m_image.
|
override |
Definition at line 50 of file StoryboardModel.cpp.
References isValidBoard(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, m_items, parent(), and rowCount().
| QModelIndex StoryboardModel::indexFromFrame | ( | int | frame, |
| bool | framePerfect = true ) const |
Returns the index of the item corresponding the frame, if there is an item with that frame.
| frame | The frame whose index is needed. |
| framePerfect | Whether query will return a valid scene even when a scene contains the frame, not just if it starts on said frame. Default == true |
Definition at line 637 of file StoryboardModel.cpp.
References StoryboardItem::FrameNumber, index(), and rowCount().
| void StoryboardModel::insertChildRows | ( | int | position, |
| KUndo2Command * | cmd = nullptr ) |
must be called after a first level index is inserted. Adds child nodes to the first level indices
| position | Index of the first level node. |
Definition at line 1245 of file StoryboardModel.cpp.
References KisImage::animationInterface(), createBlankKeyframes(), createDuplicateKeyframes(), KisImageAnimationInterface::currentTime(), data(), StoryboardItem::DurationFrame, StoryboardItem::DurationSecond, StoryboardItem::FrameNumber, index(), KisTimeSpan::infinite(), insertRows(), StoryboardItem::ItemName, lastKeyframeGlobal(), m_commentList, m_image, m_lastScene, KisSwitchCurrentTimeCommand::redo(), rowCount(), setData(), shiftKeyframes(), and TotalSceneDurationInFrames.
| void StoryboardModel::insertChildRows | ( | int | position, |
| StoryboardItemSP | item ) |
Adds child nodes from the item provided.
| position | Index of the first level node. |
Definition at line 1415 of file StoryboardModel.cpp.
References data(), index(), insertRows(), m_commentList, m_renderScheduler, setData(), setFreeze(), KisStoryboardThumbnailRenderScheduler::slotStartFrameRendering(), and slotUpdateThumbnails().
| bool StoryboardModel::insertItem | ( | QModelIndex | index, |
| bool | after ) |
inserts item after or before index based on after parameter
| index | The index at which right click was clicked or the plus button belonged to. |
| after | If True item is added after index, otherwise before |
Definition at line 926 of file StoryboardModel.cpp.
References KisImage::animationInterface(), KisImageAnimationInterface::currentTime(), StoryboardItem::FrameNumber, index(), insertChildRows(), m_activeNode, m_image, m_items, m_renderScheduler, m_view, KisBaseNode::paintDevice(), pushUndoCommand(), KisSwitchCurrentTimeCommand::redo(), rowCount(), StoryboardView::setCurrentItem(), KisStoryboardThumbnailRenderScheduler::slotStartFrameRendering(), and slotUpdateThumbnails().
|
override |
Definition at line 335 of file StoryboardModel.cpp.
References isLocked(), m_items, parent(), sigStoryboardItemListChanged(), and toQShared().
| bool StoryboardModel::isFrozen | ( | ) | const |
Definition at line 566 of file StoryboardModel.cpp.
References m_freezeKeyframePositions.
| bool StoryboardModel::isLocked | ( | ) | const |
Definition at line 576 of file StoryboardModel.cpp.
References m_lockBoards.
|
inlineprivate |
Definition at line 275 of file StoryboardModel.h.
| QModelIndex StoryboardModel::lastIndexBeforeFrame | ( | int | frame | ) | const |
Returns the index of the item with largest frame smaller than argument frame.
| frame |
Definition at line 662 of file StoryboardModel.cpp.
References indexFromFrame().
| int StoryboardModel::lastKeyframeGlobal | ( | ) | const |
Definition at line 717 of file StoryboardModel.cpp.
References KoID::id(), KisBaseNode::isAnimated(), m_image, KisKeyframeChannel::Raster, KisLayerUtils::recursiveApplyNodes(), KisImage::rootLayer(), and KisBaseNode::supportsKeyframeChannel().
| int StoryboardModel::lastKeyframeWithin | ( | QModelIndex | index | ) |
Gets the last keyframe that exists within an index's duration. Used to prevent duration from overwriting keyframes that exist internal to an existing scene.
Definition at line 742 of file StoryboardModel.cpp.
References data(), StoryboardItem::FrameNumber, index(), KIS_ASSERT, m_image, nextKeyframeGlobal(), and TotalSceneDurationInFrames.
|
override |
Definition at line 449 of file StoryboardModel.cpp.
References encodeData(), index(), and mimeData().
|
override |
Definition at line 442 of file StoryboardModel.cpp.
|
override |
Definition at line 421 of file StoryboardModel.cpp.
References KisImage::animationInterface(), KisStrokeJobData::BARRIER, KisImageAnimationInterface::currentTime(), KisStrokeJobData::EXCLUSIVE, KisMoveStoryboardCommand, m_image, moveRowsImpl(), and KisProcessingApplicator::runSingleCommandStroke().
|
private |
Definition at line 1337 of file StoryboardModel.cpp.
References isLocked(), m_items, parent(), reorderKeyframes(), rowCount(), and sigStoryboardItemListChanged().
| int StoryboardModel::nextKeyframeGlobal | ( | int | keyframeTime | ) | const |
the next time at which there is a keyframe in any layer after keyframeTime
| keyframeTime | The time after which keyframe is wanted. |
Definition at line 688 of file StoryboardModel.cpp.
References KoID::id(), KisBaseNode::isAnimated(), m_image, KisKeyframeChannel::Raster, KisLayerUtils::recursiveApplyNodes(), KisImage::rootLayer(), and KisBaseNode::supportsKeyframeChannel().
|
override |
Definition at line 73 of file StoryboardModel.cpp.
References index(), m_items, and StoryboardChild::parent().
| void StoryboardModel::pushUndoCommand | ( | KUndo2Command * | command | ) |
Definition at line 1035 of file StoryboardModel.cpp.
References KisPostExecutionUndoAdapter::addCommand(), m_image, KisImage::postExecutionUndoAdapter(), and toQShared().
| bool StoryboardModel::removeItem | ( | QModelIndex | index, |
| KUndo2Command * | command = nullptr ) |
removes item, deletes keyframes within and shifts keyframe after the scene to fill in the gap
| index | The index of the item to be removed |
Definition at line 968 of file StoryboardModel.cpp.
References KisImage::animationInterface(), KisImageAnimationInterface::currentTime(), data(), StoryboardItem::FrameNumber, index(), KisTimeSpan::infinite(), KisBaseNode::isAnimated(), KisBaseNode::isEditable(), m_image, KisLayerUtils::recursiveApplyNodes(), KisSwitchCurrentTimeCommand::redo(), KisImage::rootLayer(), rowCount(), shiftKeyframes(), and TotalSceneDurationInFrames.
|
override |
Definition at line 373 of file StoryboardModel.cpp.
References isLocked(), m_items, parent(), and sigStoryboardItemListChanged().
| void StoryboardModel::reorderKeyframes | ( | ) |
reorders all keyframes to reflect storyboard docker's arrangement. typically used after drag and drop to keep storyboard timing accurate to timeline timing.
Definition at line 767 of file StoryboardModel.cpp.
References KisKeyframeChannel::allKeyframeTimes(), KisStoryboardThumbnailRenderScheduler::cancelAllFrameRendering(), data(), StoryboardItem::FrameNumber, index(), KisRasterKeyframeChannel::insertKeyframe(), KisBaseNode::isAnimated(), KisKeyframeChannel::keyframeAt(), KisPaintDevice::keyframeChannel(), m_freezeKeyframePositions, m_image, m_renderScheduler, KisBaseNode::paintDevice(), KisLayerUtils::recursiveApplyNodes(), KisRasterKeyframeChannel::removeKeyframe(), KisNodeFacade::root, rowCount(), setData(), KisStoryboardThumbnailRenderScheduler::slotStartFrameRendering(), slotUpdateThumbnailForFrame(), and TotalSceneDurationInFrames.
| void StoryboardModel::resetData | ( | StoryboardItemList | list | ) |
resets m_items to list
| list | The new list of StoryboardItem* |
Definition at line 1023 of file StoryboardModel.cpp.
References m_items.
|
override |
Definition at line 95 of file StoryboardModel.cpp.
| void StoryboardModel::setCommentModel | ( | StoryboardCommentModel * | commentModel | ) |
Sets the commentModel in StoryboardModel and creates connections to keep the local copy of comments in sync with the commentModel's.
Definition at line 543 of file StoryboardModel.cpp.
References connect(), m_commentModel, slotCommentDataChanged(), slotCommentRowInserted(), slotCommentRowMoved(), and slotCommentRowRemoved().
| bool StoryboardModel::setCommentScrollData | ( | const QModelIndex & | index, |
| const QVariant & | value ) |
Sets the scrollValue of the CommentBox object.
| index | The index of the CommentBox object whose scrollValue is changed |
| value | The new scrollValue |
True if data was set Definition at line 258 of file StoryboardModel.cpp.
References index(), m_items, CommentBox::scrollValue, sigStoryboardItemListChanged(), and value().
|
override |
Definition at line 167 of file StoryboardModel.cpp.
References KisConfig::adaptivePlaybackRange(), KisImage::animationInterface(), changeSceneHoldLength(), StoryboardItem::Comments, CommentBox::content, data(), KisImageAnimationInterface::documentPlaybackRange(), StoryboardItem::DurationFrame, StoryboardItem::DurationSecond, ThumbnailData::frameNum, StoryboardItem::FrameNumber, KisImageAnimationInterface::framerate(), getFramesPerSecond(), KisTimeSpan::include(), index(), isLocked(), KisWeakSharedPtr< T >::isValid(), isValidBoard(), lastKeyframeWithin(), m_image, m_items, rowCount(), setData(), KisImageAnimationInterface::setDocumentRange(), siblingAtRow(), sigStoryboardItemListChanged(), TotalSceneDurationInFrames, and value().
| void StoryboardModel::setFreeze | ( | bool | value | ) |
Definition at line 561 of file StoryboardModel.cpp.
References m_freezeKeyframePositions, and value().
| void StoryboardModel::setImage | ( | KisImageWSP | image | ) |
Definition at line 591 of file StoryboardModel.cpp.
References KisImage::animationInterface(), connect(), KisImageAnimationInterface::currentUITime(), KisIdleWatcher::forceImageModified(), StoryboardItem::FrameNumber, m_image, m_imageIdleWatcher, m_items, m_lastScene, m_renderScheduler, m_renderSchedulingCompressor, KisStoryboardThumbnailRenderScheduler::scheduleFrameForRegeneration(), KisStoryboardThumbnailRenderScheduler::setImage(), KisIdleWatcher::setTrackedImage(), slotCurrentFrameChanged(), slotFramerateChanged(), slotKeyframeAdded(), slotKeyframeRemoved(), and slotNodeRemoved().
| void StoryboardModel::setLocked | ( | bool | value | ) |
Definition at line 571 of file StoryboardModel.cpp.
References m_lockBoards, and value().
| bool StoryboardModel::setThumbnailPixmapData | ( | const QModelIndex & | parentIndex, |
| const KisPaintDeviceSP & | dev ) |
Sets the Pixmap data.
| parentIndex | The index of item whose thumbnail changed. |
| dev | Projection of the new pixmap. |
True if data was set Definition at line 271 of file StoryboardModel.cpp.
References KisImage::bounds(), KisPaintDevice::convertToQImage(), KisImage::height(), index(), KoColorSpaceRegistry::instance(), isValidBoard(), m_image, m_items, m_view, ThumbnailData::pixmap, KisImage::size(), StoryboardView::visualRect(), and KisImage::width().
| void StoryboardModel::setView | ( | StoryboardView * | view | ) |
| void StoryboardModel::shiftKeyframes | ( | KisTimeSpan | affected, |
| int | offset, | ||
| KUndo2Command * | cmd = nullptr ) |
Definition at line 875 of file StoryboardModel.cpp.
References KisBaseNode::isAnimated(), m_freezeKeyframePositions, m_image, KisLayerUtils::recursiveApplyNodes(), KisImage::rootLayer(), and KisTimeSpan::start().
|
signal |
This signal is emitted whenever m_items is changed. it is used to keep the StoryboardItemList in KisDocument in sync with m_items.
|
privateslot |
Definition at line 1204 of file StoryboardModel.cpp.
References StoryboardCommentModel::m_commentList, m_commentList, and m_commentModel.
|
privateslot |
Definition at line 1210 of file StoryboardModel.cpp.
References index(), insertRows(), parent(), rowCount(), and slotCommentDataChanged().
|
privateslot |
Definition at line 1232 of file StoryboardModel.cpp.
References index(), moveRowsImpl(), rowCount(), and slotCommentDataChanged().
|
privateslot |
Definition at line 1221 of file StoryboardModel.cpp.
References index(), parent(), removeRows(), rowCount(), and slotCommentDataChanged().
|
privateslot |
called when currentUiTime changes
Definition at line 1040 of file StoryboardModel.cpp.
References m_view, and StoryboardView::setCurrentItem().
|
privateslot |
Definition at line 1097 of file StoryboardModel.cpp.
References StoryboardItem::DurationFrame, StoryboardItem::DurationSecond, StoryboardItem::FrameNumber, getFramesPerSecond(), index(), lastKeyframeGlobal(), and m_items.
|
privateslot |
called KisStoryboardThumbnailRenderScheduler when frame render is cancelled.
Definition at line 1199 of file StoryboardModel.cpp.
|
privateslot |
called KisStoryboardThumbnailRenderScheduler when frame render is complete
| frame | The frame whose regeneration was requested |
| dev | The projection of the frame |
Definition at line 1191 of file StoryboardModel.cpp.
References index(), indexFromFrame(), and setThumbnailPixmapData().
|
privateslot |
Definition at line 1045 of file StoryboardModel.cpp.
References affectedIndexes(), data(), StoryboardItem::DurationFrame, StoryboardItem::DurationSecond, StoryboardItem::FrameNumber, KisTimeSpan::fromTimeToTime(), getFramesPerSecond(), index(), KIS_ASSERT, lastIndexBeforeFrame(), m_items, m_reorderingKeyframes, KisKeyframeChannel::nextKeyframeTime(), slotUpdateThumbnailsForItems(), and TotalSceneDurationInFrames.
|
privateslot |
Definition at line 1073 of file StoryboardModel.cpp.
References KisKeyframeChannel::activeKeyframeTime(), affectedIndexes(), KisTimeSpan::fromTimeToTime(), m_reorderingKeyframes, KisKeyframeChannel::nextKeyframeTime(), and slotUpdateThumbnailsForItems().
Definition at line 1082 of file StoryboardModel.cpp.
References KisKeyframeChannel::firstKeyframeTime(), KisBaseNode::isAnimated(), KisKeyframeChannel::keyframeAt(), KisPaintDevice::keyframeChannel(), KisKeyframeChannel::nextKeyframeTime(), KisBaseNode::paintDevice(), slotKeyframeRemoved(), and slotUpdateThumbnails().
Definition at line 632 of file StoryboardModel.cpp.
References m_activeNode.
|
privateslot |
calls regeneration of frame in the background i.e. in another thread.
| frame | The frame to be regenerated. |
| delay | Update thumbnail with delay if true |
Definition at line 1136 of file StoryboardModel.cpp.
References index(), indexFromFrame(), isLocked(), m_image, m_renderScheduler, KisStoryboardThumbnailRenderScheduler::scheduleFrameForRegeneration(), and KisStoryboardThumbnailRenderScheduler::slotStartFrameRendering().
|
privateslot |
calls regeneration of the currentUiTime() and all frames in affectedIndexes(KisTimeSpan)
Definition at line 1168 of file StoryboardModel.cpp.
References affectedIndexes(), KisImage::animationInterface(), KisTimeSpan::calculateAffectedFramesRecursive(), KisImageAnimationInterface::currentUITime(), StoryboardItem::FrameNumber, index(), isLocked(), m_activeNode, m_image, and slotUpdateThumbnailForFrame().
| void StoryboardModel::slotUpdateThumbnailsForItems | ( | QModelIndexList | indices | ) |
Definition at line 1151 of file StoryboardModel.cpp.
References StoryboardItem::FrameNumber, index(), isLocked(), and slotUpdateThumbnailForFrame().
|
override |
Definition at line 508 of file StoryboardModel.cpp.
|
override |
Definition at line 503 of file StoryboardModel.cpp.
| int StoryboardModel::totalCommentCount | ( | ) |
Get total number of comments.
Definition at line 524 of file StoryboardModel.cpp.
References m_commentList.
| bool StoryboardModel::updateDurationData | ( | const QModelIndex & | parentIndex | ) |
updates the duration data of item at parentIndex to the number of frame to the next keyframe in any layer.
| parentIndex | The index whose duration is to be updated. |
True if data was set Definition at line 295 of file StoryboardModel.cpp.
References data(), StoryboardItem::DurationFrame, StoryboardItem::DurationSecond, StoryboardItem::FrameNumber, getFramesPerSecond(), index(), and setData().
| int StoryboardModel::visibleCommentCount | ( | ) | const |
Used in StoryboardDelegate and StoryboardView to get size of one storyboard item.
Definition at line 513 of file StoryboardModel.cpp.
References m_commentList, and StoryboardComment::visibility.
| int StoryboardModel::visibleCommentsUpto | ( | QModelIndex | index | ) | const |
Used in StoryboardView to design the layout of storyboard item.
Definition at line 531 of file StoryboardModel.cpp.
References index(), and m_commentList.
| void StoryboardModel::visualizeScene | ( | const QModelIndex & | index, |
| bool | useUndo = true ) |
Definition at line 1291 of file StoryboardModel.cpp.
References KisImage::animationInterface(), KisImageAnimationInterface::currentTime(), StoryboardItem::FrameNumber, index(), m_image, KisImageAnimationInterface::STAO_NONE, KisImageAnimationInterface::STAO_USE_UNDO, and KisImageAnimationInterface::switchCurrentTimeAsync().
|
friend |
Definition at line 335 of file StoryboardModel.h.
|
private |
Definition at line 347 of file StoryboardModel.h.
|
private |
Definition at line 338 of file StoryboardModel.h.
|
private |
Definition at line 339 of file StoryboardModel.h.
|
private |
Definition at line 340 of file StoryboardModel.h.
|
private |
Definition at line 345 of file StoryboardModel.h.
|
private |
Definition at line 344 of file StoryboardModel.h.
|
private |
Definition at line 337 of file StoryboardModel.h.
|
private |
Definition at line 343 of file StoryboardModel.h.
|
private |
Definition at line 341 of file StoryboardModel.h.
|
private |
Definition at line 348 of file StoryboardModel.h.
|
private |
Definition at line 349 of file StoryboardModel.h.
|
private |
Definition at line 342 of file StoryboardModel.h.
|
private |
Definition at line 346 of file StoryboardModel.h.