started export dialog

This commit is contained in:
itsmattkc
2019-12-15 13:44:16 +11:00
parent a977020833
commit eb7c63bace
7 changed files with 87 additions and 2 deletions
+7
View File
@@ -32,6 +32,7 @@
#include "audio/audiomanager.h"
#include "config/config.h"
#include "dialog/about/about.h"
#include "dialog/export/export.h"
#include "dialog/sequence/sequence.h"
#include "dialog/preferences/preferences.h"
#include "dialog/projectproperties/projectproperties.h"
@@ -230,6 +231,12 @@ void Core::DialogProjectPropertiesShow()
ppd.exec();
}
void Core::DialogExportShow()
{
ExportDialog ed(main_window_);
ed.exec();
}
void Core::CreateNewFolder()
{
// Locate the most recently focused Project panel (assume that's the panel the user wants to import into)
+5
View File
@@ -160,6 +160,11 @@ public slots:
*/
void DialogProjectPropertiesShow();
/**
* @brief Show Export dialog
*/
void DialogExportShow();
/**
* @brief Create a new folder in the currently active project
*/
+1
View File
@@ -16,6 +16,7 @@
add_subdirectory(about)
add_subdirectory(actionsearch)
add_subdirectory(export)
add_subdirectory(footageproperties)
add_subdirectory(preferences)
add_subdirectory(projectproperties)
+22
View File
@@ -0,0 +1,22 @@
# Olive - Non-Linear Video Editor
# Copyright (C) 2019 Olive Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(OLIVE_SOURCES
${OLIVE_SOURCES}
dialog/export/export.h
dialog/export/export.cpp
PARENT_SCOPE
)
+38
View File
@@ -0,0 +1,38 @@
#include "export.h"
#include <QComboBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QOpenGLWidget>
#include <QPushButton>
#include <QSplitter>
ExportDialog::ExportDialog(QWidget *parent) :
QDialog(parent)
{
QHBoxLayout* layout = new QHBoxLayout(this);
QSplitter* splitter = new QSplitter(Qt::Horizontal);
layout->addWidget(splitter);
QWidget* preferences_area = new QWidget();
QGridLayout* preferences_layout = new QGridLayout(preferences_area);
preferences_layout->addWidget(new QLabel(tr("Filename:")), 0, 0);
preferences_layout->addWidget(new QLineEdit(), 0, 1);
preferences_layout->addWidget(new QLabel(tr("Preset:")), 1, 0);
preferences_layout->addWidget(new QComboBox(), 1, 1);
QTabWidget* preferences_tabs = new QTabWidget();
preferences_tabs->addTab(new QWidget(), tr("Video"));
preferences_tabs->addTab(new QWidget(), tr("Audio"));
preferences_layout->addWidget(preferences_tabs, 2, 0, 1, 2);
preferences_layout->addWidget(new QPushButton(tr("Export")), 3, 0);
preferences_layout->addWidget(new QPushButton(tr("Cancel")), 3, 1);
splitter->addWidget(preferences_area);
QWidget* preview_area = new QWidget();
QVBoxLayout* preview_layout = new QVBoxLayout(preview_area);
preview_layout->addWidget(new QLabel(tr("Preview")));
preview_layout->addWidget(new QOpenGLWidget());
splitter->addWidget(preview_area);
}
+12
View File
@@ -0,0 +1,12 @@
#ifndef EXPORTDIALOG_H
#define EXPORTDIALOG_H
#include <QDialog>
class ExportDialog : public QDialog
{
public:
ExportDialog(QWidget* parent = nullptr);
};
#endif // EXPORTDIALOG_H
+2 -2
View File
@@ -47,7 +47,7 @@ MainMenu::MainMenu(QMainWindow *parent) :
file_menu_->addSeparator();
file_import_item_ = file_menu_->AddItem("import", &olive::core, SLOT(DialogImportShow()), "Ctrl+I");
file_menu_->addSeparator();
file_export_item_ = file_menu_->AddItem("export", nullptr, nullptr, "Ctrl+M");
file_export_item_ = file_menu_->AddItem("export", &olive::core, SLOT(DialogExportShow()), "Ctrl+M");
file_menu_->addSeparator();
file_project_properties_item_ = file_menu_->AddItem("projectproperties", &olive::core, SLOT(DialogProjectPropertiesShow()));
file_menu_->addSeparator();
@@ -476,7 +476,7 @@ void MainMenu::GoToNextCutTriggered()
}
void MainMenu::Retranslate()
{
{
// MenuShared is not a QWidget and therefore does not receive a LanguageEvent, we use MainMenu's to update it
olive::menu_shared.Retranslate();