separated keyframe navigation
This commit is contained in:
@@ -1,242 +1,244 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-05-11T10:31:59
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui multimedia opengl
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
mac {
|
||||
TARGET = Olive
|
||||
}
|
||||
!mac {
|
||||
TARGET = olive-editor
|
||||
}
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
panels/project.cpp \
|
||||
panels/effectcontrols.cpp \
|
||||
panels/viewer.cpp \
|
||||
panels/timeline.cpp \
|
||||
ui/sourcetable.cpp \
|
||||
dialogs/aboutdialog.cpp \
|
||||
ui/timelinewidget.cpp \
|
||||
project/media.cpp \
|
||||
project/footage.cpp \
|
||||
project/sequence.cpp \
|
||||
project/clip.cpp \
|
||||
playback/playback.cpp \
|
||||
playback/audio.cpp \
|
||||
io/config.cpp \
|
||||
dialogs/newsequencedialog.cpp \
|
||||
ui/viewerwidget.cpp \
|
||||
ui/viewercontainer.cpp \
|
||||
dialogs/exportdialog.cpp \
|
||||
ui/collapsiblewidget.cpp \
|
||||
panels/panels.cpp \
|
||||
playback/cacher.cpp \
|
||||
io/exportthread.cpp \
|
||||
ui/timelineheader.cpp \
|
||||
io/previewgenerator.cpp \
|
||||
ui/labelslider.cpp \
|
||||
dialogs/preferencesdialog.cpp \
|
||||
ui/audiomonitor.cpp \
|
||||
project/undo.cpp \
|
||||
ui/scrollarea.cpp \
|
||||
ui/comboboxex.cpp \
|
||||
ui/colorbutton.cpp \
|
||||
dialogs/replaceclipmediadialog.cpp \
|
||||
ui/fontcombobox.cpp \
|
||||
ui/checkboxex.cpp \
|
||||
ui/keyframeview.cpp \
|
||||
ui/texteditex.cpp \
|
||||
dialogs/demonotice.cpp \
|
||||
project/marker.cpp \
|
||||
dialogs/speeddialog.cpp \
|
||||
dialogs/mediapropertiesdialog.cpp \
|
||||
io/crc32.cpp \
|
||||
project/projectmodel.cpp \
|
||||
io/loadthread.cpp \
|
||||
dialogs/loaddialog.cpp \
|
||||
debug.cpp \
|
||||
io/path.cpp \
|
||||
effects/internal/linearfadetransition.cpp \
|
||||
effects/internal/transformeffect.cpp \
|
||||
effects/internal/solideffect.cpp \
|
||||
effects/internal/texteffect.cpp \
|
||||
effects/internal/timecodeeffect.cpp \
|
||||
effects/internal/audionoiseeffect.cpp \
|
||||
effects/internal/paneffect.cpp \
|
||||
effects/internal/toneeffect.cpp \
|
||||
effects/internal/volumeeffect.cpp \
|
||||
effects/internal/crossdissolvetransition.cpp \
|
||||
effects/internal/shakeeffect.cpp \
|
||||
effects/internal/exponentialfadetransition.cpp \
|
||||
effects/internal/logarithmicfadetransition.cpp \
|
||||
effects/internal/cornerpineffect.cpp \
|
||||
io/math.cpp \
|
||||
io/qpainterwrapper.cpp \
|
||||
project/effect.cpp \
|
||||
project/transition.cpp \
|
||||
project/effectrow.cpp \
|
||||
project/effectfield.cpp \
|
||||
effects/internal/cubetransition.cpp \
|
||||
project/effectgizmo.cpp \
|
||||
io/clipboard.cpp \
|
||||
dialogs/stabilizerdialog.cpp \
|
||||
io/avtogl.cpp \
|
||||
ui/resizablescrollbar.cpp \
|
||||
ui/sourceiconview.cpp \
|
||||
project/sourcescommon.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
panels/project.h \
|
||||
panels/effectcontrols.h \
|
||||
panels/viewer.h \
|
||||
panels/timeline.h \
|
||||
ui/sourcetable.h \
|
||||
dialogs/aboutdialog.h \
|
||||
ui/timelinewidget.h \
|
||||
project/media.h \
|
||||
project/footage.h \
|
||||
project/sequence.h \
|
||||
project/clip.h \
|
||||
playback/playback.h \
|
||||
playback/audio.h \
|
||||
io/config.h \
|
||||
dialogs/newsequencedialog.h \
|
||||
ui/viewerwidget.h \
|
||||
ui/viewercontainer.h \
|
||||
dialogs/exportdialog.h \
|
||||
ui/collapsiblewidget.h \
|
||||
panels/panels.h \
|
||||
playback/cacher.h \
|
||||
io/exportthread.h \
|
||||
ui/timelinetools.h \
|
||||
ui/timelineheader.h \
|
||||
io/previewgenerator.h \
|
||||
ui/labelslider.h \
|
||||
dialogs/preferencesdialog.h \
|
||||
ui/audiomonitor.h \
|
||||
project/undo.h \
|
||||
ui/scrollarea.h \
|
||||
ui/comboboxex.h \
|
||||
ui/colorbutton.h \
|
||||
dialogs/replaceclipmediadialog.h \
|
||||
ui/fontcombobox.h \
|
||||
ui/checkboxex.h \
|
||||
ui/keyframeview.h \
|
||||
ui/texteditex.h \
|
||||
dialogs/demonotice.h \
|
||||
project/marker.h \
|
||||
project/selection.h \
|
||||
dialogs/speeddialog.h \
|
||||
dialogs/mediapropertiesdialog.h \
|
||||
io/crc32.h \
|
||||
project/projectmodel.h \
|
||||
io/loadthread.h \
|
||||
dialogs/loaddialog.h \
|
||||
debug.h \
|
||||
io/path.h \
|
||||
effects/internal/transformeffect.h \
|
||||
effects/internal/solideffect.h \
|
||||
effects/internal/texteffect.h \
|
||||
effects/internal/timecodeeffect.h \
|
||||
effects/internal/audionoiseeffect.h \
|
||||
effects/internal/paneffect.h \
|
||||
effects/internal/toneeffect.h \
|
||||
effects/internal/volumeeffect.h \
|
||||
effects/internal/shakeeffect.h \
|
||||
effects/internal/linearfadetransition.h \
|
||||
effects/internal/crossdissolvetransition.h \
|
||||
effects/internal/exponentialfadetransition.h \
|
||||
effects/internal/logarithmicfadetransition.h \
|
||||
effects/internal/cornerpineffect.h \
|
||||
io/math.h \
|
||||
io/qpainterwrapper.h \
|
||||
project/effect.h \
|
||||
project/transition.h \
|
||||
project/effectrow.h \
|
||||
project/effectfield.h \
|
||||
effects/internal/cubetransition.h \
|
||||
project/effectgizmo.h \
|
||||
io/clipboard.h \
|
||||
dialogs/stabilizerdialog.h \
|
||||
io/avtogl.h \
|
||||
ui/resizablescrollbar.h \
|
||||
ui/sourceiconview.h \
|
||||
project/sourcescommon.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
panels/effectcontrols.ui \
|
||||
panels/viewer.ui \
|
||||
panels/timeline.ui \
|
||||
dialogs/aboutdialog.ui \
|
||||
dialogs/newsequencedialog.ui \
|
||||
dialogs/exportdialog.ui \
|
||||
dialogs/preferencesdialog.ui \
|
||||
dialogs/demonotice.ui
|
||||
|
||||
win32 {
|
||||
RC_FILE = icons/resources.rc
|
||||
LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32
|
||||
}
|
||||
|
||||
mac {
|
||||
LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample
|
||||
ICON = icons/olive.icns
|
||||
INCLUDEPATH = /usr/local/include
|
||||
}
|
||||
|
||||
unix:!mac {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
icons/icons.qrc
|
||||
|
||||
unix:!mac {
|
||||
metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
|
||||
metainfo.path = $$PREFIX/share/metainfo
|
||||
desktop.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.desktop
|
||||
desktop.path = $$PREFIX/share/applications
|
||||
mime.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.xml
|
||||
mime.path = $$PREFIX/share/mime/packages
|
||||
icon16.files = $$PWD/packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png
|
||||
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps
|
||||
icon32.files = $$PWD/packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png
|
||||
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
|
||||
icon48.files = $$PWD/packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png
|
||||
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
|
||||
icon64.files = $$PWD/packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png
|
||||
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
|
||||
icon128.files = $$PWD/packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png
|
||||
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
|
||||
icon256.files = $$PWD/packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png
|
||||
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
|
||||
icon512.files = $$PWD/packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png
|
||||
icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps
|
||||
icon1024.files = $$PWD/packaging/linux/icons/1024x1024/org.olivevideoeditor.Olive.png
|
||||
icon1024.path = $$PREFIX/share/icons/hicolor/1024x1024/apps
|
||||
INSTALLS += metainfo desktop mime icon16 icon32 icon48 icon64 icon128 icon256 icon512 icon1024
|
||||
}
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-05-11T10:31:59
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui multimedia opengl
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
mac {
|
||||
TARGET = Olive
|
||||
}
|
||||
!mac {
|
||||
TARGET = olive-editor
|
||||
}
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
panels/project.cpp \
|
||||
panels/effectcontrols.cpp \
|
||||
panels/viewer.cpp \
|
||||
panels/timeline.cpp \
|
||||
ui/sourcetable.cpp \
|
||||
dialogs/aboutdialog.cpp \
|
||||
ui/timelinewidget.cpp \
|
||||
project/media.cpp \
|
||||
project/footage.cpp \
|
||||
project/sequence.cpp \
|
||||
project/clip.cpp \
|
||||
playback/playback.cpp \
|
||||
playback/audio.cpp \
|
||||
io/config.cpp \
|
||||
dialogs/newsequencedialog.cpp \
|
||||
ui/viewerwidget.cpp \
|
||||
ui/viewercontainer.cpp \
|
||||
dialogs/exportdialog.cpp \
|
||||
ui/collapsiblewidget.cpp \
|
||||
panels/panels.cpp \
|
||||
playback/cacher.cpp \
|
||||
io/exportthread.cpp \
|
||||
ui/timelineheader.cpp \
|
||||
io/previewgenerator.cpp \
|
||||
ui/labelslider.cpp \
|
||||
dialogs/preferencesdialog.cpp \
|
||||
ui/audiomonitor.cpp \
|
||||
project/undo.cpp \
|
||||
ui/scrollarea.cpp \
|
||||
ui/comboboxex.cpp \
|
||||
ui/colorbutton.cpp \
|
||||
dialogs/replaceclipmediadialog.cpp \
|
||||
ui/fontcombobox.cpp \
|
||||
ui/checkboxex.cpp \
|
||||
ui/keyframeview.cpp \
|
||||
ui/texteditex.cpp \
|
||||
dialogs/demonotice.cpp \
|
||||
project/marker.cpp \
|
||||
dialogs/speeddialog.cpp \
|
||||
dialogs/mediapropertiesdialog.cpp \
|
||||
io/crc32.cpp \
|
||||
project/projectmodel.cpp \
|
||||
io/loadthread.cpp \
|
||||
dialogs/loaddialog.cpp \
|
||||
debug.cpp \
|
||||
io/path.cpp \
|
||||
effects/internal/linearfadetransition.cpp \
|
||||
effects/internal/transformeffect.cpp \
|
||||
effects/internal/solideffect.cpp \
|
||||
effects/internal/texteffect.cpp \
|
||||
effects/internal/timecodeeffect.cpp \
|
||||
effects/internal/audionoiseeffect.cpp \
|
||||
effects/internal/paneffect.cpp \
|
||||
effects/internal/toneeffect.cpp \
|
||||
effects/internal/volumeeffect.cpp \
|
||||
effects/internal/crossdissolvetransition.cpp \
|
||||
effects/internal/shakeeffect.cpp \
|
||||
effects/internal/exponentialfadetransition.cpp \
|
||||
effects/internal/logarithmicfadetransition.cpp \
|
||||
effects/internal/cornerpineffect.cpp \
|
||||
io/math.cpp \
|
||||
io/qpainterwrapper.cpp \
|
||||
project/effect.cpp \
|
||||
project/transition.cpp \
|
||||
project/effectrow.cpp \
|
||||
project/effectfield.cpp \
|
||||
effects/internal/cubetransition.cpp \
|
||||
project/effectgizmo.cpp \
|
||||
io/clipboard.cpp \
|
||||
dialogs/stabilizerdialog.cpp \
|
||||
io/avtogl.cpp \
|
||||
ui/resizablescrollbar.cpp \
|
||||
ui/sourceiconview.cpp \
|
||||
project/sourcescommon.cpp \
|
||||
ui/keyframenavigator.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
panels/project.h \
|
||||
panels/effectcontrols.h \
|
||||
panels/viewer.h \
|
||||
panels/timeline.h \
|
||||
ui/sourcetable.h \
|
||||
dialogs/aboutdialog.h \
|
||||
ui/timelinewidget.h \
|
||||
project/media.h \
|
||||
project/footage.h \
|
||||
project/sequence.h \
|
||||
project/clip.h \
|
||||
playback/playback.h \
|
||||
playback/audio.h \
|
||||
io/config.h \
|
||||
dialogs/newsequencedialog.h \
|
||||
ui/viewerwidget.h \
|
||||
ui/viewercontainer.h \
|
||||
dialogs/exportdialog.h \
|
||||
ui/collapsiblewidget.h \
|
||||
panels/panels.h \
|
||||
playback/cacher.h \
|
||||
io/exportthread.h \
|
||||
ui/timelinetools.h \
|
||||
ui/timelineheader.h \
|
||||
io/previewgenerator.h \
|
||||
ui/labelslider.h \
|
||||
dialogs/preferencesdialog.h \
|
||||
ui/audiomonitor.h \
|
||||
project/undo.h \
|
||||
ui/scrollarea.h \
|
||||
ui/comboboxex.h \
|
||||
ui/colorbutton.h \
|
||||
dialogs/replaceclipmediadialog.h \
|
||||
ui/fontcombobox.h \
|
||||
ui/checkboxex.h \
|
||||
ui/keyframeview.h \
|
||||
ui/texteditex.h \
|
||||
dialogs/demonotice.h \
|
||||
project/marker.h \
|
||||
project/selection.h \
|
||||
dialogs/speeddialog.h \
|
||||
dialogs/mediapropertiesdialog.h \
|
||||
io/crc32.h \
|
||||
project/projectmodel.h \
|
||||
io/loadthread.h \
|
||||
dialogs/loaddialog.h \
|
||||
debug.h \
|
||||
io/path.h \
|
||||
effects/internal/transformeffect.h \
|
||||
effects/internal/solideffect.h \
|
||||
effects/internal/texteffect.h \
|
||||
effects/internal/timecodeeffect.h \
|
||||
effects/internal/audionoiseeffect.h \
|
||||
effects/internal/paneffect.h \
|
||||
effects/internal/toneeffect.h \
|
||||
effects/internal/volumeeffect.h \
|
||||
effects/internal/shakeeffect.h \
|
||||
effects/internal/linearfadetransition.h \
|
||||
effects/internal/crossdissolvetransition.h \
|
||||
effects/internal/exponentialfadetransition.h \
|
||||
effects/internal/logarithmicfadetransition.h \
|
||||
effects/internal/cornerpineffect.h \
|
||||
io/math.h \
|
||||
io/qpainterwrapper.h \
|
||||
project/effect.h \
|
||||
project/transition.h \
|
||||
project/effectrow.h \
|
||||
project/effectfield.h \
|
||||
effects/internal/cubetransition.h \
|
||||
project/effectgizmo.h \
|
||||
io/clipboard.h \
|
||||
dialogs/stabilizerdialog.h \
|
||||
io/avtogl.h \
|
||||
ui/resizablescrollbar.h \
|
||||
ui/sourceiconview.h \
|
||||
project/sourcescommon.h \
|
||||
ui/keyframenavigator.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
panels/effectcontrols.ui \
|
||||
panels/viewer.ui \
|
||||
panels/timeline.ui \
|
||||
dialogs/aboutdialog.ui \
|
||||
dialogs/newsequencedialog.ui \
|
||||
dialogs/exportdialog.ui \
|
||||
dialogs/preferencesdialog.ui \
|
||||
dialogs/demonotice.ui
|
||||
|
||||
win32 {
|
||||
RC_FILE = icons/resources.rc
|
||||
LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32
|
||||
}
|
||||
|
||||
mac {
|
||||
LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample
|
||||
ICON = icons/olive.icns
|
||||
INCLUDEPATH = /usr/local/include
|
||||
}
|
||||
|
||||
unix:!mac {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
icons/icons.qrc
|
||||
|
||||
unix:!mac {
|
||||
metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
|
||||
metainfo.path = $$PREFIX/share/metainfo
|
||||
desktop.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.desktop
|
||||
desktop.path = $$PREFIX/share/applications
|
||||
mime.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.xml
|
||||
mime.path = $$PREFIX/share/mime/packages
|
||||
icon16.files = $$PWD/packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png
|
||||
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps
|
||||
icon32.files = $$PWD/packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png
|
||||
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
|
||||
icon48.files = $$PWD/packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png
|
||||
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
|
||||
icon64.files = $$PWD/packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png
|
||||
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
|
||||
icon128.files = $$PWD/packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png
|
||||
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
|
||||
icon256.files = $$PWD/packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png
|
||||
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
|
||||
icon512.files = $$PWD/packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png
|
||||
icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps
|
||||
icon1024.files = $$PWD/packaging/linux/icons/1024x1024/org.olivevideoeditor.Olive.png
|
||||
icon1024.path = $$PREFIX/share/icons/hicolor/1024x1024/apps
|
||||
INSTALLS += metainfo desktop mime icon16 icon32 icon48 icon64 icon128 icon256 icon512 icon1024
|
||||
}
|
||||
|
||||
+8
-50
@@ -13,6 +13,7 @@
|
||||
#include "panels/viewer.h"
|
||||
#include "effect.h"
|
||||
#include "ui/viewerwidget.h"
|
||||
#include "ui/keyframenavigator.h"
|
||||
|
||||
EffectRow::EffectRow(Effect *parent, bool save, QGridLayout *uilayout, const QString &n, int row) :
|
||||
parent_effect(parent),
|
||||
@@ -27,49 +28,12 @@ EffectRow::EffectRow(Effect *parent, bool save, QGridLayout *uilayout, const QSt
|
||||
ui->addWidget(label, row, 0);
|
||||
|
||||
if (parent_effect->meta->type != EFFECT_TYPE_TRANSITION) {
|
||||
QSize icon_size(12, 12);
|
||||
QSize button_size(20, 20);
|
||||
|
||||
key_controls = new QHBoxLayout();
|
||||
key_controls->setSpacing(0);
|
||||
key_controls->setMargin(0);
|
||||
key_controls->addStretch();
|
||||
|
||||
left_key_nav = new QPushButton();
|
||||
left_key_nav->setIcon(QIcon(":/icons/tri-left.png"));
|
||||
left_key_nav->setMaximumSize(button_size);
|
||||
left_key_nav->setIconSize(icon_size);
|
||||
left_key_nav->setVisible(false);
|
||||
key_controls->addWidget(left_key_nav);
|
||||
connect(left_key_nav, SIGNAL(clicked(bool)), this, SLOT(goto_previous_key()));
|
||||
|
||||
key_addremove = new QPushButton();
|
||||
key_addremove->setIcon(QIcon(":/icons/diamond.png"));
|
||||
key_addremove->setMaximumSize(button_size);
|
||||
key_addremove->setIconSize(QSize(8, 8));
|
||||
key_addremove->setVisible(false);
|
||||
key_controls->addWidget(key_addremove);
|
||||
connect(key_addremove, SIGNAL(clicked(bool)), this, SLOT(toggle_key()));
|
||||
|
||||
right_key_nav = new QPushButton();
|
||||
right_key_nav->setIcon(QIcon(":/icons/tri-right.png"));
|
||||
right_key_nav->setMaximumSize(button_size);
|
||||
right_key_nav->setIconSize(icon_size);
|
||||
right_key_nav->setVisible(false);
|
||||
key_controls->addWidget(right_key_nav);
|
||||
connect(right_key_nav, SIGNAL(clicked(bool)), this, SLOT(goto_next_key()));
|
||||
|
||||
keyframe_enable = new QPushButton(QIcon(":/icons/clock.png"), "");
|
||||
keyframe_enable->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
|
||||
keyframe_enable->setMaximumSize(button_size);
|
||||
keyframe_enable->setIconSize(icon_size);
|
||||
keyframe_enable->setCheckable(true);
|
||||
keyframe_enable->setToolTip("Enable Keyframes");
|
||||
connect(keyframe_enable, SIGNAL(clicked(bool)), this, SLOT(set_keyframe_enabled(bool)));
|
||||
connect(keyframe_enable, SIGNAL(toggled(bool)), this, SLOT(keyframe_ui_enabled(bool)));
|
||||
key_controls->addWidget(keyframe_enable);
|
||||
|
||||
ui->addLayout(key_controls, row, 6);
|
||||
keyframe_nav = new KeyframeNavigator();
|
||||
connect(keyframe_nav, SIGNAL(goto_previous_key()), this, SLOT(goto_previous_key()));
|
||||
connect(keyframe_nav, SIGNAL(toggle_key()), this, SLOT(toggle_key()));
|
||||
connect(keyframe_nav, SIGNAL(goto_next_key()), this, SLOT(goto_next_key()));
|
||||
connect(keyframe_nav, SIGNAL(set_keyframe_enabled(bool)), this, SLOT(set_keyframe_enabled(bool)));
|
||||
ui->addWidget(keyframe_nav, row, 6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +44,7 @@ bool EffectRow::isKeyframing() {
|
||||
void EffectRow::setKeyframing(bool b) {
|
||||
if (parent_effect->meta->type != EFFECT_TYPE_TRANSITION) {
|
||||
keyframing = b;
|
||||
keyframe_enable->setChecked(b);
|
||||
keyframe_nav->enable_keyframes(b);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,12 +69,6 @@ void EffectRow::set_keyframe_enabled(bool enabled) {
|
||||
}
|
||||
}
|
||||
|
||||
void EffectRow::keyframe_ui_enabled(bool enabled) {
|
||||
left_key_nav->setVisible(enabled);
|
||||
key_addremove->setVisible(enabled);
|
||||
right_key_nav->setVisible(enabled);
|
||||
}
|
||||
|
||||
void EffectRow::goto_previous_key() {
|
||||
long key = LONG_MIN;
|
||||
Clip* c = parent_effect->parent_clip;
|
||||
|
||||
+2
-6
@@ -12,6 +12,7 @@ class KeyframeDelete;
|
||||
class QPushButton;
|
||||
class ComboAction;
|
||||
class QHBoxLayout;
|
||||
class KeyframeNavigator;
|
||||
|
||||
class EffectRow : public QObject {
|
||||
Q_OBJECT
|
||||
@@ -35,7 +36,6 @@ public:
|
||||
QVector<int> keyframe_types;
|
||||
private slots:
|
||||
void set_keyframe_enabled(bool);
|
||||
void keyframe_ui_enabled(bool);
|
||||
void goto_previous_key();
|
||||
void toggle_key();
|
||||
void goto_next_key();
|
||||
@@ -46,11 +46,7 @@ private:
|
||||
int ui_row;
|
||||
QVector<EffectField*> fields;
|
||||
|
||||
QHBoxLayout* key_controls;
|
||||
QPushButton* keyframe_enable;
|
||||
QPushButton* left_key_nav;
|
||||
QPushButton* key_addremove;
|
||||
QPushButton* right_key_nav;
|
||||
KeyframeNavigator* keyframe_nav;
|
||||
|
||||
bool just_made_unsafe_keyframe;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
#include "keyframenavigator.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
|
||||
KeyframeNavigator::KeyframeNavigator(QWidget *parent) : QWidget(parent) {
|
||||
QSize icon_size(12, 12);
|
||||
QSize button_size(20, 20);
|
||||
|
||||
key_controls = new QHBoxLayout();
|
||||
key_controls->setSpacing(0);
|
||||
key_controls->setMargin(0);
|
||||
key_controls->addStretch();
|
||||
|
||||
setLayout(key_controls);
|
||||
|
||||
left_key_nav = new QPushButton();
|
||||
left_key_nav->setIcon(QIcon(":/icons/tri-left.png"));
|
||||
left_key_nav->setMaximumSize(button_size);
|
||||
left_key_nav->setIconSize(icon_size);
|
||||
left_key_nav->setVisible(false);
|
||||
key_controls->addWidget(left_key_nav);
|
||||
connect(left_key_nav, SIGNAL(clicked(bool)), this, SIGNAL(goto_previous_key()));
|
||||
|
||||
key_addremove = new QPushButton();
|
||||
key_addremove->setIcon(QIcon(":/icons/diamond.png"));
|
||||
key_addremove->setMaximumSize(button_size);
|
||||
key_addremove->setIconSize(QSize(8, 8));
|
||||
key_addremove->setVisible(false);
|
||||
key_controls->addWidget(key_addremove);
|
||||
connect(key_addremove, SIGNAL(clicked(bool)), this, SIGNAL(toggle_key()));
|
||||
|
||||
right_key_nav = new QPushButton();
|
||||
right_key_nav->setIcon(QIcon(":/icons/tri-right.png"));
|
||||
right_key_nav->setMaximumSize(button_size);
|
||||
right_key_nav->setIconSize(icon_size);
|
||||
right_key_nav->setVisible(false);
|
||||
key_controls->addWidget(right_key_nav);
|
||||
connect(right_key_nav, SIGNAL(clicked(bool)), this, SIGNAL(goto_next_key()));
|
||||
|
||||
keyframe_enable = new QPushButton(QIcon(":/icons/clock.png"), "");
|
||||
keyframe_enable->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
|
||||
keyframe_enable->setMaximumSize(button_size);
|
||||
keyframe_enable->setIconSize(icon_size);
|
||||
keyframe_enable->setCheckable(true);
|
||||
keyframe_enable->setToolTip("Enable Keyframes");
|
||||
connect(keyframe_enable, SIGNAL(clicked(bool)), this, SIGNAL(set_keyframe_enabled(bool)));
|
||||
connect(keyframe_enable, SIGNAL(toggled(bool)), this, SLOT(keyframe_ui_enabled(bool)));
|
||||
key_controls->addWidget(keyframe_enable);
|
||||
}
|
||||
|
||||
void KeyframeNavigator::enable_keyframes(bool b) {
|
||||
keyframe_enable->setChecked(b);
|
||||
}
|
||||
|
||||
void KeyframeNavigator::keyframe_ui_enabled(bool enabled) {
|
||||
left_key_nav->setVisible(enabled);
|
||||
key_addremove->setVisible(enabled);
|
||||
right_key_nav->setVisible(enabled);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef KEYFRAMENAVIGATOR_H
|
||||
#define KEYFRAMENAVIGATOR_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QHBoxLayout;
|
||||
class QPushButton;
|
||||
|
||||
class KeyframeNavigator : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KeyframeNavigator(QWidget* parent = 0);
|
||||
void enable_keyframes(bool);
|
||||
signals:
|
||||
void goto_previous_key();
|
||||
void toggle_key();
|
||||
void goto_next_key();
|
||||
void set_keyframe_enabled(bool);
|
||||
private slots:
|
||||
void keyframe_ui_enabled(bool);
|
||||
private:
|
||||
QHBoxLayout* key_controls;
|
||||
QPushButton* left_key_nav;
|
||||
QPushButton* key_addremove;
|
||||
QPushButton* right_key_nav;
|
||||
QPushButton* keyframe_enable;
|
||||
};
|
||||
|
||||
#endif // KEYFRAMENAVIGATOR_H
|
||||
Reference in New Issue
Block a user