completed focus filter and menu helpers
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
|
||||
#include "dialogs/demonotice.h"
|
||||
#include "dialogs/preferencesdialog.h"
|
||||
#include "dialogs/exportdialog.h"
|
||||
#include "dialogs/debugdialog.h"
|
||||
#include "dialogs/aboutdialog.h"
|
||||
#include "dialogs/speeddialog.h"
|
||||
#include "dialogs/actionsearch.h"
|
||||
|
||||
#include "project/sequence.h"
|
||||
|
||||
@@ -80,6 +85,10 @@ void OliveGlobal::load_project_on_launch(const QString& s) {
|
||||
enable_load_project_on_init = true;
|
||||
}
|
||||
|
||||
QString OliveGlobal::get_recent_project_list_file() {
|
||||
return get_data_dir().filePath("recents");
|
||||
}
|
||||
|
||||
void OliveGlobal::new_project() {
|
||||
if (can_close_project()) {
|
||||
// clear effects panel
|
||||
@@ -166,6 +175,18 @@ bool OliveGlobal::can_close_project() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void OliveGlobal::open_export_dialog() {
|
||||
if (Olive::ActiveSequence == nullptr) {
|
||||
QMessageBox::information(Olive::MainWindow,
|
||||
tr("No active sequence"),
|
||||
tr("Please open the sequence you wish to export."),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
ExportDialog e(Olive::MainWindow);
|
||||
e.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void OliveGlobal::finished_initialize() {
|
||||
// if a project was set as a command line argument, we load it here
|
||||
if (enable_load_project_on_init) {
|
||||
@@ -230,3 +251,34 @@ void OliveGlobal::paste_insert() {
|
||||
panel_timeline->paste(true);
|
||||
}
|
||||
}
|
||||
|
||||
void OliveGlobal::open_about_dialog() {
|
||||
AboutDialog a(Olive::MainWindow);
|
||||
a.exec();
|
||||
}
|
||||
|
||||
void OliveGlobal::open_debug_log() {
|
||||
Olive::DebugDialog->show();
|
||||
}
|
||||
|
||||
void OliveGlobal::open_speed_dialog() {
|
||||
if (Olive::ActiveSequence != nullptr) {
|
||||
SpeedDialog s(Olive::MainWindow);
|
||||
for (int i=0;i<Olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
s.clips.append(c);
|
||||
}
|
||||
}
|
||||
if (s.clips.size() > 0) s.run();
|
||||
}
|
||||
}
|
||||
|
||||
void OliveGlobal::clear_undo_stack() {
|
||||
Olive::UndoStack.clear();
|
||||
}
|
||||
|
||||
void OliveGlobal::open_action_search() {
|
||||
ActionSearch as(Olive::MainWindow);
|
||||
as.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user