diff --git a/icons/icons.qrc b/icons/icons.qrc
index 07232d1b6..b9971320c 100644
--- a/icons/icons.qrc
+++ b/icons/icons.qrc
@@ -45,5 +45,7 @@
folder.png
record.png
record-disabled.png
+ transition-tool.png
+ transition-tool-disabled.png
diff --git a/icons/transition-tool-disabled.png b/icons/transition-tool-disabled.png
new file mode 100644
index 000000000..e8313318c
Binary files /dev/null and b/icons/transition-tool-disabled.png differ
diff --git a/icons/transition-tool.png b/icons/transition-tool.png
new file mode 100644
index 000000000..c4d7bdcb5
Binary files /dev/null and b/icons/transition-tool.png differ
diff --git a/mainwindow.cpp b/mainwindow.cpp
index bd1d7a805..f17059b91 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -876,3 +876,7 @@ void MainWindow::on_actionEnable_Seek_to_Import_triggered() {
void MainWindow::on_actionAudio_Scrubbing_triggered() {
config.enable_audio_scrubbing = !config.enable_audio_scrubbing;
}
+
+void MainWindow::on_actionTransition_Tool_triggered() {
+ if (panel_timeline->focused()) panel_timeline->ui->toolTransitionButton->click();
+}
diff --git a/mainwindow.h.autosave b/mainwindow.h.autosave
new file mode 100644
index 000000000..a8a3db252
--- /dev/null
+++ b/mainwindow.h.autosave
@@ -0,0 +1,205 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include
+
+class Project;
+class EffectControls;
+class Viewer;
+class Timeline;
+
+extern QMainWindow* mainWindow;
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+public slots:
+ void undo();
+ void redo();
+ void openSpeedDialog();
+ void cut();
+ void copy();
+ void paste();
+
+protected:
+ void closeEvent(QCloseEvent *);
+ void paintEvent(QPaintEvent *event);
+
+private slots:
+ void on_action_Import_triggered();
+
+ void on_actionExit_triggered();
+
+ void on_actionAbout_triggered();
+
+ void on_actionDelete_triggered();
+
+ void on_actionSelect_All_triggered();
+
+ void on_actionSequence_triggered();
+
+ void on_actionZoom_In_triggered();
+
+ void on_actionZoom_out_triggered();
+
+ void on_actionExport_triggered();
+
+ void on_actionProject_2_toggled(bool arg1);
+
+ void on_actionEffect_Controls_toggled(bool arg1);
+
+ void on_actionViewer_toggled(bool arg1);
+
+ void on_actionTimeline_toggled(bool arg1);
+
+ void on_actionRipple_Delete_triggered();
+
+ void on_actionSplit_at_Playhead_triggered();
+
+ void on_action_Save_Project_triggered();
+
+ void on_action_Open_Project_triggered();
+
+ void on_actionProject_triggered();
+
+ void on_actionSave_Project_As_triggered();
+
+ void on_actionDeselect_All_triggered();
+
+ void on_actionGo_to_start_triggered();
+
+ void on_actionReset_to_default_layout_triggered();
+
+ void on_actionPrevious_Frame_triggered();
+
+ void on_actionNext_Frame_triggered();
+
+ void on_actionGo_to_End_triggered();
+
+ void on_actionPlay_Pause_triggered();
+
+ void on_actionEdit_Tool_triggered();
+
+ void on_actionToggle_Snapping_triggered();
+
+ void on_actionPointer_Tool_triggered();
+
+ void on_actionRazor_Tool_triggered();
+
+ void on_actionRipple_Tool_triggered();
+
+ void on_actionRolling_Tool_triggered();
+
+ void on_actionSlip_Tool_triggered();
+
+ void on_actionGo_to_Previous_Cut_triggered();
+
+ void on_actionGo_to_Next_Cut_triggered();
+
+ void autorecover_interval();
+
+ void on_actionPreferences_triggered();
+
+ void on_actionIncrease_Track_Height_triggered();
+
+ void on_actionDecrease_Track_Height_triggered();
+
+ void windowMenu_About_To_Be_Shown();
+
+ void on_actionFrames_triggered();
+
+ void on_actionDrop_Frame_triggered();
+
+ void on_actionNon_Drop_Frame_triggered();
+
+ void viewMenu_About_To_Be_Shown();
+
+ void on_actionEdit_Tool_Selects_Links_triggered();
+
+ void on_actionEdit_Tool_Also_Seeks_triggered();
+
+ void toolMenu_About_To_Be_Shown();
+
+ void on_actionDuplicate_triggered();
+
+ void on_actionSelecting_Also_Seeks_triggered();
+
+ void on_actionSeek_to_the_End_of_Pastes_triggered();
+
+ void on_actionAdd_Default_Transition_triggered();
+
+ void on_actionSlide_Tool_triggered();
+
+ void on_actionFolder_triggered();
+
+ void editMenu_About_To_Be_Shown();
+
+ void fileMenu_About_To_Be_Shown();
+
+ void load_recent_project();
+
+ void on_actionScroll_Wheel_Zooms_triggered();
+
+ void on_actionLink_Unlink_triggered();
+
+ void on_actionRipple_To_In_Point_triggered();
+
+ void on_actionRipple_to_Out_Point_triggered();
+
+ void on_actionSet_In_Point_triggered();
+
+ void on_actionSet_Out_Point_triggered();
+
+ void on_actionClear_In_Out_triggered();
+
+ void on_actionDelete_In_Out_triggered();
+
+ void on_actionRipple_Delete_In_Out_triggered();
+
+ void on_actionTimeline_Track_Lines_triggered();
+
+ void on_actionRectified_Waveforms_triggered();
+
+ void on_actionDefault_triggered();
+
+ void on_actionOff_triggered();
+
+ void on_action4_3_triggered();
+
+ void on_action16_9_triggered();
+
+ void on_actionCustom_triggered();
+
+ void on_actionEnable_Drag_Files_to_Timeline_triggered();
+
+ void on_actionAuto_scale_by_Default_triggered();
+
+ void on_actionSet_Edit_Marker_triggered();
+
+ void on_actionEnable_Disable_Clip_triggered();
+
+ void on_actionEnable_Seek_to_Import_triggered();
+
+ void on_actionAudio_Scrubbing_triggered();
+
+ void on_actionTransition_Tool_triggered();
+
+private:
+ Ui::MainWindow *ui;
+ void setup_layout();
+ bool save_project_as();
+ bool save_project();
+ bool can_close_project();
+ void updateTitle(const QString &url);
+};
+
+#endif // MAINWINDOW_H
diff --git a/mainwindow.ui.autosave b/mainwindow.ui.autosave
new file mode 100644
index 000000000..de637c292
--- /dev/null
+++ b/mainwindow.ui.autosave
@@ -0,0 +1,831 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 653
+ 394
+
+
+
+ MainWindow
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+ &Open Project
+
+
+ Ctrl+O
+
+
+
+
+ &Save Project
+
+
+ Ctrl+S
+
+
+
+
+ Save Project &As
+
+
+
+
+ &Import...
+
+
+ Ctrl+I
+
+
+
+
+ &Export...
+
+
+ Ctrl+M
+
+
+
+
+ E&xit
+
+
+
+
+ About...
+
+
+
+
+ &Undo
+
+
+ Ctrl+Z
+
+
+
+
+ &Redo
+
+
+ Ctrl+Shift+Z
+
+
+
+
+ Cu&t
+
+
+ Ctrl+X
+
+
+
+
+ Cop&y
+
+
+ Ctrl+C
+
+
+
+
+ &Paste
+
+
+ Ctrl+V
+
+
+
+
+ Delete
+
+
+ Del
+
+
+
+
+ Select &All
+
+
+ Ctrl+A
+
+
+
+
+ true
+
+
+ Track Lines
+
+
+
+
+ Project...
+
+
+ Ctrl+N
+
+
+
+
+ Sequence...
+
+
+ Ctrl+Shift+N
+
+
+
+
+ Zoom In
+
+
+ =
+
+
+
+
+ Zoom Out
+
+
+ -
+
+
+
+
+ true
+
+
+ true
+
+
+ Project
+
+
+
+
+ true
+
+
+ true
+
+
+ Effect Controls
+
+
+
+
+ true
+
+
+ true
+
+
+ Viewer
+
+
+
+
+ true
+
+
+ true
+
+
+ Timeline
+
+
+
+
+ Ripple Delete
+
+
+ Shift+Del
+
+
+
+
+ Split at Playhead
+
+
+ Ctrl+K
+
+
+
+
+ Deselect All
+
+
+
+
+ Go to Start
+
+
+ Home
+
+
+
+
+ Reset to default layout
+
+
+
+
+ Previous Frame
+
+
+ Left
+
+
+
+
+ Play/Pause
+
+
+ Space
+
+
+
+
+ Next Frame
+
+
+ Right
+
+
+
+
+ Go to End
+
+
+ End
+
+
+
+
+ Crash
+
+
+ false
+
+
+
+
+ Pointer Tool
+
+
+ V
+
+
+
+
+ Edit Tool
+
+
+ X
+
+
+
+
+ Razor Tool
+
+
+ C
+
+
+
+
+ Ripple Tool
+
+
+ B
+
+
+
+
+ Rolling Tool
+
+
+ N
+
+
+ false
+
+
+
+
+ Preferences
+
+
+ Ctrl+.
+
+
+
+
+ true
+
+
+ Snapping
+
+
+ Snapping
+
+
+ S
+
+
+
+
+ Slip Tool
+
+
+ Y
+
+
+
+
+ Go to Previous Cut
+
+
+ Up
+
+
+
+
+ Go to Next Cut
+
+
+ Down
+
+
+
+
+ true
+
+
+ Edit Tool Also Seeks
+
+
+
+
+ Increase Track Height
+
+
+ Ctrl+=
+
+
+
+
+ Decrease Track Height
+
+
+ Ctrl+-
+
+
+
+
+ true
+
+
+ Frames
+
+
+
+
+ true
+
+
+ Drop-Frame
+
+
+
+
+ true
+
+
+ Non-Drop Frame
+
+
+
+
+ true
+
+
+ Edit Tool Selects Links
+
+
+
+
+ Duplicate
+
+
+ Ctrl+D
+
+
+
+
+ true
+
+
+ Selecting Also Seeks
+
+
+
+
+ true
+
+
+ Seek to the End of Pastes
+
+
+
+
+ Add Default Transition
+
+
+ Ctrl+Shift+D
+
+
+
+
+ Slide Tool
+
+
+ U
+
+
+
+
+ Folder
+
+
+
+
+ Clear Recent List
+
+
+
+
+ true
+
+
+ Scroll Wheel Zooms
+
+
+
+
+ Link/Unlink
+
+
+ Ctrl+L
+
+
+
+
+ Ripple to In Point
+
+
+ Q
+
+
+
+
+ Ripple to Out Point
+
+
+ W
+
+
+
+
+ Set In Point
+
+
+ I
+
+
+
+
+ Set Out Point
+
+
+ O
+
+
+
+
+ Clear In/Out
+
+
+ G
+
+
+
+
+ Delete In/Out
+
+
+ ;
+
+
+
+
+ Ripple Delete In/Out
+
+
+ '
+
+
+
+
+ true
+
+
+ Rectified Waveforms
+
+
+
+
+ true
+
+
+ Default
+
+
+
+
+ true
+
+
+ Off
+
+
+
+
+ true
+
+
+ 4:3
+
+
+
+
+ true
+
+
+ 16:9
+
+
+
+
+ true
+
+
+ Custom
+
+
+
+
+ true
+
+
+ Enable Drag Files to Timeline
+
+
+
+
+ true
+
+
+ Auto-scale by Default
+
+
+
+
+ Set/Edit Marker
+
+
+ M
+
+
+
+
+ Enable/Disable Clip
+
+
+ Shift+E
+
+
+
+
+ true
+
+
+ Enable Seek to Import
+
+
+
+
+ true
+
+
+ Audio Scrubbing
+
+
+
+
+ Transition Tool
+
+
+ T
+
+
+
+
+
+
+
diff --git a/panels/timeline.cpp b/panels/timeline.cpp
index 04faecce5..e5946adb8 100644
--- a/panels/timeline.cpp
+++ b/panels/timeline.cpp
@@ -89,6 +89,7 @@ Timeline::Timeline(QWidget *parent) :
tool_buttons.append(ui->toolSlipButton);
tool_buttons.append(ui->toolRollingButton);
tool_buttons.append(ui->toolSlideButton);
+ tool_buttons.append(ui->toolTransitionButton);
ui->toolArrowButton->click();
@@ -1042,7 +1043,7 @@ void Timeline::deselect() {
}
long getFrameFromScreenPoint(double zoom, int x) {
- long f = qRound((float) x / zoom);
+ long f = qCeil((float) x / zoom);
if (f < 0) {
return 0;
}
@@ -1050,7 +1051,7 @@ long getFrameFromScreenPoint(double zoom, int x) {
}
int getScreenPointFromFrame(double zoom, long frame) {
- return (int) qRound(frame*zoom);
+ return (int) qFloor(frame*zoom);
}
long Timeline::getTimelineFrameFromScreenPoint(int x) {
@@ -1167,3 +1168,10 @@ void Timeline::on_recordButton_clicked() {
creating_object = ADD_OBJ_AUDIO;
}
}
+
+void Timeline::on_toolTransitionButton_clicked() {
+ decheck_tool_buttons(sender());
+ ui->timeline_area->setCursor(Qt::CrossCursor);
+ tool = TIMELINE_TOOL_TRANSITION;
+ creating = false;
+}
diff --git a/panels/timeline.h b/panels/timeline.h
index eb9c5f11e..16e64408a 100644
--- a/panels/timeline.h
+++ b/panels/timeline.h
@@ -201,6 +201,8 @@ private slots:
void on_recordButton_clicked();
+ void on_toolTransitionButton_clicked();
+
private:
QVector tool_buttons;
void decheck_tool_buttons(QObject* sender);
diff --git a/panels/timeline.ui b/panels/timeline.ui
index 985a2eea3..d5fb2e486 100644
--- a/panels/timeline.ui
+++ b/panels/timeline.ui
@@ -194,6 +194,25 @@
+ -
+
+
+ Transition Tool (T)
+
+
+
+
+
+
+ :/icons/transition-tool.png
+ :/icons/transition-tool-disabled.png
+
+
+
+ true
+
+
+
-