Changeset View
Changeset View
Standalone View
Standalone View
plugins/dockers/animation/timeline_frames_view.cpp
Context not available. | |||||
363 | action = m_d->actionMan->createAction("paste_frames_from_clipboard"); | 363 | action = m_d->actionMan->createAction("paste_frames_from_clipboard"); | ||
---|---|---|---|---|---|
364 | connect(action, SIGNAL(triggered()), SLOT(slotPasteFrames())); | 364 | connect(action, SIGNAL(triggered()), SLOT(slotPasteFrames())); | ||
365 | 365 | | |||
366 | action = m_d->actionMan->createAction("set_start_time"); | ||||
367 | connect(action, SIGNAL(triggered()), SLOT(slotSetStartTimeToCurrentPosition())); | ||||
368 | | ||||
369 | action = m_d->actionMan->createAction("set_end_time"); | ||||
370 | connect(action, SIGNAL(triggered()), SLOT(slotSetEndTimeToCurrentPosition())); | ||||
371 | | ||||
366 | } | 372 | } | ||
367 | } | 373 | } | ||
368 | 374 | | |||
Context not available. | |||||
552 | m_d->model->setAudioVolume(qreal(value) / 100.0); | 558 | m_d->model->setAudioVolume(qreal(value) / 100.0); | ||
553 | } | 559 | } | ||
554 | 560 | | |||
561 | | ||||
562 | | ||||
563 | | ||||
555 | void TimelineFramesView::slotUpdateInfiniteFramesCount() | 564 | void TimelineFramesView::slotUpdateInfiniteFramesCount() | ||
556 | { | 565 | { | ||
557 | if (horizontalScrollBar()->isSliderDown()) return; | 566 | if (horizontalScrollBar()->isSliderDown()) return; | ||
Context not available. | |||||
938 | QMenu *frames = menu->addMenu(i18nc("@item:inmenu", "Keyframes")); | 947 | QMenu *frames = menu->addMenu(i18nc("@item:inmenu", "Keyframes")); | ||
939 | KisActionManager::safePopulateMenu(frames, "insert_keyframes_right", m_d->actionMan); | 948 | KisActionManager::safePopulateMenu(frames, "insert_keyframes_right", m_d->actionMan); | ||
940 | KisActionManager::safePopulateMenu(frames, "insert_keyframes_left", m_d->actionMan); | 949 | KisActionManager::safePopulateMenu(frames, "insert_keyframes_left", m_d->actionMan); | ||
950 | | ||||
941 | frames->addSeparator(); | 951 | frames->addSeparator(); | ||
942 | KisActionManager::safePopulateMenu(frames, "insert_n_keyframes_right", m_d->actionMan); | 952 | KisActionManager::safePopulateMenu(frames, "insert_n_keyframes_right", m_d->actionMan); | ||
943 | KisActionManager::safePopulateMenu(frames, "insert_n_keyframes_left", m_d->actionMan); | 953 | KisActionManager::safePopulateMenu(frames, "insert_n_keyframes_left", m_d->actionMan); | ||
Context not available. | |||||
945 | QMenu *hold = menu->addMenu(i18nc("@item:inmenu", "Hold Frames")); | 955 | QMenu *hold = menu->addMenu(i18nc("@item:inmenu", "Hold Frames")); | ||
946 | KisActionManager::safePopulateMenu(hold, "insert_hold_frame", m_d->actionMan); | 956 | KisActionManager::safePopulateMenu(hold, "insert_hold_frame", m_d->actionMan); | ||
947 | KisActionManager::safePopulateMenu(hold, "remove_hold_frame", m_d->actionMan); | 957 | KisActionManager::safePopulateMenu(hold, "remove_hold_frame", m_d->actionMan); | ||
958 | | ||||
948 | hold->addSeparator(); | 959 | hold->addSeparator(); | ||
949 | KisActionManager::safePopulateMenu(hold, "insert_n_hold_frames", m_d->actionMan); | 960 | KisActionManager::safePopulateMenu(hold, "insert_n_hold_frames", m_d->actionMan); | ||
950 | KisActionManager::safePopulateMenu(hold, "remove_n_hold_frames", m_d->actionMan); | 961 | KisActionManager::safePopulateMenu(hold, "remove_n_hold_frames", m_d->actionMan); | ||
Context not available. | |||||
952 | menu->addSeparator(); | 963 | menu->addSeparator(); | ||
953 | KisActionManager::safePopulateMenu(menu, "remove_frames", m_d->actionMan); | 964 | KisActionManager::safePopulateMenu(menu, "remove_frames", m_d->actionMan); | ||
954 | KisActionManager::safePopulateMenu(menu, "remove_frames_and_pull", m_d->actionMan); | 965 | KisActionManager::safePopulateMenu(menu, "remove_frames_and_pull", m_d->actionMan); | ||
966 | | ||||
967 | menu->addSeparator(); | ||||
968 | KisActionManager::safePopulateMenu(menu, "set_start_time", m_d->actionMan); | ||||
969 | KisActionManager::safePopulateMenu(menu, "set_end_time", m_d->actionMan); | ||||
955 | } | 970 | } | ||
956 | 971 | | |||
957 | void TimelineFramesView::mousePressEvent(QMouseEvent *event) | 972 | void TimelineFramesView::mousePressEvent(QMouseEvent *event) | ||
Context not available. | |||||
1189 | 1204 | | |||
1190 | enableAction("paste_frames_from_clipboard", data && data->hasFormat("application/x-krita-frame")); | 1205 | enableAction("paste_frames_from_clipboard", data && data->hasFormat("application/x-krita-frame")); | ||
1191 | 1206 | | |||
1207 | enableAction("set_start_time", true); | ||||
1208 | enableAction("set_end_time", true); | ||||
1209 | | ||||
1192 | //TODO: update column actions! | 1210 | //TODO: update column actions! | ||
1193 | } | 1211 | } | ||
1194 | 1212 | | |||
1213 | void TimelineFramesView::slotSetStartTimeToCurrentPosition() | ||||
1214 | { | ||||
1215 | m_d->model->setFullClipRangeStart(this->currentIndex().column()); | ||||
1216 | } | ||||
1217 | | ||||
1218 | void TimelineFramesView::slotSetEndTimeToCurrentPosition() | ||||
1219 | { | ||||
1220 | m_d->model->setFullClipRangeEnd(this->currentIndex().column()); | ||||
1221 | } | ||||
1222 | | ||||
1195 | void TimelineFramesView::slotLayerContextMenuRequested(const QPoint &globalPos) | 1223 | void TimelineFramesView::slotLayerContextMenuRequested(const QPoint &globalPos) | ||
1196 | { | 1224 | { | ||
1197 | m_d->layerEditingMenu->exec(globalPos); | 1225 | m_d->layerEditingMenu->exec(globalPos); | ||
Context not available. |