added focus panel filter
This commit is contained in:
+12
-108
@@ -17,6 +17,7 @@
|
||||
#include "ui/sourceiconview.h"
|
||||
#include "ui/timelineheader.h"
|
||||
#include "ui/cursors.h"
|
||||
#include "ui/focusfilter.h"
|
||||
|
||||
#include "panels/panels.h"
|
||||
#include "panels/project.h"
|
||||
@@ -669,22 +670,22 @@ void MainWindow::setup_menus() {
|
||||
QMenu* playback_menu = menuBar->addMenu(tr("&Playback"));
|
||||
connect(playback_menu, SIGNAL(aboutToShow()), this, SLOT(playbackMenu_About_To_Be_Shown()));
|
||||
|
||||
playback_menu->addAction(tr("Go to Start"), this, SLOT(go_to_start()), QKeySequence("Home"))->setProperty("id", "gotostart");
|
||||
playback_menu->addAction(tr("Previous Frame"), this, SLOT(prev_frame()), QKeySequence("Left"))->setProperty("id", "prevframe");
|
||||
playback_menu->addAction(tr("Play/Pause"), this, SLOT(playpause()), QKeySequence("Space"))->setProperty("id", "playpause");
|
||||
playback_menu->addAction(tr("Play In to Out"), this, SLOT(play_in_to_out()), QKeySequence("Shift+Space"))->setProperty("id", "playintoout");
|
||||
playback_menu->addAction(tr("Next Frame"), this, SLOT(next_frame()), QKeySequence("Right"))->setProperty("id", "nextframe");
|
||||
playback_menu->addAction(tr("Go to End"), this, SLOT(go_to_end()), QKeySequence("End"))->setProperty("id", "gotoend");
|
||||
playback_menu->addAction(tr("Go to Start"), &Olive::FocusFilter, SLOT(go_to_start()), QKeySequence("Home"))->setProperty("id", "gotostart");
|
||||
playback_menu->addAction(tr("Previous Frame"), &Olive::FocusFilter, SLOT(prev_frame()), QKeySequence("Left"))->setProperty("id", "prevframe");
|
||||
playback_menu->addAction(tr("Play/Pause"), &Olive::FocusFilter, SLOT(playpause()), QKeySequence("Space"))->setProperty("id", "playpause");
|
||||
playback_menu->addAction(tr("Play In to Out"), &Olive::FocusFilter, SLOT(play_in_to_out()), QKeySequence("Shift+Space"))->setProperty("id", "playintoout");
|
||||
playback_menu->addAction(tr("Next Frame"), &Olive::FocusFilter, SLOT(next_frame()), QKeySequence("Right"))->setProperty("id", "nextframe");
|
||||
playback_menu->addAction(tr("Go to End"), &Olive::FocusFilter, SLOT(go_to_end()), QKeySequence("End"))->setProperty("id", "gotoend");
|
||||
playback_menu->addSeparator();
|
||||
playback_menu->addAction(tr("Go to Previous Cut"), panel_timeline, SLOT(previous_cut()), QKeySequence("Up"))->setProperty("id", "prevcut");
|
||||
playback_menu->addAction(tr("Go to Next Cut"), panel_timeline, SLOT(next_cut()), QKeySequence("Down"))->setProperty("id", "nextcut");
|
||||
playback_menu->addSeparator();
|
||||
playback_menu->addAction(tr("Go to In Point"), this, SLOT(go_to_in()), QKeySequence("Shift+I"))->setProperty("id", "gotoin");
|
||||
playback_menu->addAction(tr("Go to Out Point"), this, SLOT(go_to_out()), QKeySequence("Shift+O"))->setProperty("id", "gotoout");
|
||||
playback_menu->addAction(tr("Go to In Point"), &Olive::FocusFilter, SLOT(go_to_in()), QKeySequence("Shift+I"))->setProperty("id", "gotoin");
|
||||
playback_menu->addAction(tr("Go to Out Point"), &Olive::FocusFilter, SLOT(go_to_out()), QKeySequence("Shift+O"))->setProperty("id", "gotoout");
|
||||
playback_menu->addSeparator();
|
||||
playback_menu->addAction(tr("Shuttle Left"), this, SLOT(decrease_speed()), QKeySequence("J"))->setProperty("id", "decspeed");
|
||||
playback_menu->addAction(tr("Shuttle Stop"), this, SLOT(pause()), QKeySequence("K"))->setProperty("id", "pause");
|
||||
playback_menu->addAction(tr("Shuttle Right"), this, SLOT(increase_speed()), QKeySequence("L"))->setProperty("id", "incspeed");
|
||||
playback_menu->addAction(tr("Shuttle Left"), &Olive::FocusFilter, SLOT(decrease_speed()), QKeySequence("J"))->setProperty("id", "decspeed");
|
||||
playback_menu->addAction(tr("Shuttle Stop"), &Olive::FocusFilter, SLOT(pause()), QKeySequence("K"))->setProperty("id", "pause");
|
||||
playback_menu->addAction(tr("Shuttle Right"), &Olive::FocusFilter, SLOT(increase_speed()), QKeySequence("L"))->setProperty("id", "incspeed");
|
||||
playback_menu->addSeparator();
|
||||
|
||||
loop_action = playback_menu->addAction(tr("Loop"), this, SLOT(toggle_bool_action()));
|
||||
@@ -991,104 +992,7 @@ void MainWindow::reset_layout() {
|
||||
setup_layout(true);
|
||||
}
|
||||
|
||||
void MainWindow::go_to_in() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_in();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_in();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::go_to_out() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_out();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_out();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::go_to_start() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_start();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_start();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::prev_frame() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->previous_frame();
|
||||
} else {
|
||||
panel_sequence_viewer->previous_frame();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::play_in_to_out() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->play(true);
|
||||
} else {
|
||||
panel_sequence_viewer->play(true);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::next_frame() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->next_frame();
|
||||
} else {
|
||||
panel_sequence_viewer->next_frame();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::go_to_end() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_end();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_end();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::playpause() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->toggle_play();
|
||||
} else {
|
||||
panel_sequence_viewer->toggle_play();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::pause() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->pause();
|
||||
} else {
|
||||
panel_sequence_viewer->pause();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::increase_speed() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->increase_speed();
|
||||
} else {
|
||||
panel_sequence_viewer->increase_speed();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::decrease_speed() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->decrease_speed();
|
||||
} else {
|
||||
panel_sequence_viewer->decrease_speed();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::maximize_panel() {
|
||||
// toggles between normal state and a state of one panel being maximized
|
||||
|
||||
+1
-16
@@ -53,21 +53,7 @@ private slots:
|
||||
void zoom_in();
|
||||
void zoom_out();
|
||||
void export_dialog();
|
||||
void ripple_delete();
|
||||
|
||||
void go_to_in();
|
||||
void go_to_out();
|
||||
void go_to_start();
|
||||
void prev_frame();
|
||||
void play_in_to_out();
|
||||
void playpause();
|
||||
void pause();
|
||||
void increase_speed();
|
||||
void decrease_speed();
|
||||
void next_frame();
|
||||
void go_to_end();
|
||||
void prev_cut();
|
||||
void next_cut();
|
||||
void ripple_delete();
|
||||
|
||||
void maximize_panel();
|
||||
void reset_layout();
|
||||
@@ -110,7 +96,6 @@ private slots:
|
||||
|
||||
void set_marker();
|
||||
|
||||
void toggle_enable_clips();
|
||||
void edit_to_in_point();
|
||||
void edit_to_out_point();
|
||||
void paste_insert();
|
||||
|
||||
@@ -142,7 +142,8 @@ SOURCES += \
|
||||
dialogs/advancedvideodialog.cpp \
|
||||
ui/cursors.cpp \
|
||||
ui/menuhelper.cpp \
|
||||
oliveglobal.cpp
|
||||
oliveglobal.cpp \
|
||||
ui/focusfilter.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
@@ -249,7 +250,8 @@ HEADERS += \
|
||||
ui/cursors.h \
|
||||
ui/menuhelper.h \
|
||||
oliveglobal.h \
|
||||
project/projectelements.h
|
||||
project/projectelements.h \
|
||||
ui/focusfilter.h
|
||||
|
||||
FORMS +=
|
||||
|
||||
|
||||
+4
-2
@@ -88,8 +88,7 @@ public:
|
||||
void delete_areas_and_relink(ComboAction *ca, QVector<Selection>& areas, bool deselect_areas);
|
||||
void relink_clips_using_ids(QVector<int>& old_clips, QVector<Clip*>& new_clips);
|
||||
void update_sequence();
|
||||
void increase_track_height();
|
||||
void decrease_track_height();
|
||||
|
||||
void add_transition();
|
||||
QVector<int> get_tracks_of_linked_clips(int i);
|
||||
bool has_clip_been_split(int c);
|
||||
@@ -215,6 +214,9 @@ public slots:
|
||||
void ripple_delete_empty_space();
|
||||
void toggle_enable_on_selected_clips();
|
||||
|
||||
void increase_track_height();
|
||||
void decrease_track_height();
|
||||
|
||||
void previous_cut();
|
||||
void next_cut();
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
#include "focusfilter.h"
|
||||
|
||||
#include "panels/panels.h"
|
||||
|
||||
FocusFilter Olive::FocusFilter;
|
||||
|
||||
FocusFilter::FocusFilter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FocusFilter::go_to_in() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_in();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_in();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::go_to_out() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_out();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_out();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::go_to_start() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_start();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_start();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::prev_frame() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->previous_frame();
|
||||
} else {
|
||||
panel_sequence_viewer->previous_frame();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::play_in_to_out() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->play(true);
|
||||
} else {
|
||||
panel_sequence_viewer->play(true);
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::next_frame() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->next_frame();
|
||||
} else {
|
||||
panel_sequence_viewer->next_frame();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::go_to_end() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->go_to_end();
|
||||
} else {
|
||||
panel_sequence_viewer->go_to_end();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::playpause() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->toggle_play();
|
||||
} else {
|
||||
panel_sequence_viewer->toggle_play();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::pause() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->pause();
|
||||
} else {
|
||||
panel_sequence_viewer->pause();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::increase_speed() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->increase_speed();
|
||||
} else {
|
||||
panel_sequence_viewer->increase_speed();
|
||||
}
|
||||
}
|
||||
|
||||
void FocusFilter::decrease_speed() {
|
||||
QDockWidget* focused_panel = get_focused_panel();
|
||||
if (focused_panel == panel_footage_viewer) {
|
||||
panel_footage_viewer->decrease_speed();
|
||||
} else {
|
||||
panel_sequence_viewer->decrease_speed();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef FOCUSFILTER_H
|
||||
#define FOCUSFILTER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class FocusFilter : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
FocusFilter();
|
||||
|
||||
public slots:
|
||||
void go_to_in();
|
||||
void go_to_out();
|
||||
void go_to_start();
|
||||
void prev_frame();
|
||||
void play_in_to_out();
|
||||
void playpause();
|
||||
void pause();
|
||||
void increase_speed();
|
||||
void decrease_speed();
|
||||
void next_frame();
|
||||
void go_to_end();
|
||||
};
|
||||
|
||||
namespace Olive {
|
||||
extern FocusFilter FocusFilter;
|
||||
}
|
||||
|
||||
#endif // FOCUSFILTER_H
|
||||
Reference in New Issue
Block a user