Commit 7170c83f authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Project loading is functionnal (from file -> load project)

parent e5269fef
......@@ -43,6 +43,7 @@
#include "PreviewWidget.h"
#include "PreferenceWidget.h"
#include "ProjectPreferences.h"
#include "ProjectManager.h"
#include "AudioProjectPreferences.h"
#include "VideoProjectPreferences.h"
#include "VLMCPreferences.h"
......@@ -139,6 +140,21 @@ void MainWindow::setupLibrary()
this, SLOT( mediaListItemDoubleClicked( QListWidgetItem* ) ) );
}
void MainWindow::on_actionLoad_Project_triggered()
{
QString outputFileName =
QFileDialog::getSaveFileName( NULL, "Enter the output file name",
QString(), "VLMC project file(*.vlmc)" );
if ( outputFileName.length() == 0 )
return ;
else
{
//Project manager will destroy itself.
ProjectManager* pm = new ProjectManager( outputFileName );
pm->loadProject();
}
}
void MainWindow::createStatusBar()
{
m_zoomSlider = new QSlider( this );
......
......@@ -44,6 +44,7 @@ class MainWindow : public QMainWindow
Q_DISABLE_COPY( MainWindow )
public:
explicit MainWindow( QWidget *parent = 0 );
void registerWidgetInViewMenu( QDockWidget* widget );
~MainWindow();
......@@ -81,6 +82,7 @@ private slots:
void on_actionRender_triggered();
void on_actionNew_Project_triggered();
void on_actionOpen_Project_triggered();
void on_actionLoad_Project_triggered();
void mediaListItemDoubleClicked( QListWidgetItem* );
signals:
......
......@@ -27,7 +27,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>25</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
......@@ -36,6 +36,7 @@
</property>
<addaction name="actionNew_Project"/>
<addaction name="actionOpen_Project"/>
<addaction name="actionLoad_Project"/>
<addaction name="actionTranscode_File"/>
<addaction name="actionRender"/>
<addaction name="actionQuit"/>
......@@ -165,6 +166,11 @@
<string>Render</string>
</property>
</action>
<action name="actionLoad_Project">
<property name="text">
<string>Load Project</string>
</property>
</action>
</widget>
<resources>
<include location="../../../ressources.qrc"/>
......
......@@ -61,7 +61,8 @@ SOURCES += src/main.cpp \
src/Commands/Commands.cpp \
src/GUI/AudioProjectPreferences.cpp \
src/GUI/VLMCPreferences.cpp \
src/GUI/VideoProjectPreferences.cpp
src/GUI/VideoProjectPreferences.cpp \
src/Project/ProjectManager.cpp
HEADERS += src/GUI/MainWindow.h \
src/GUI/DockWidgetManager.h \
src/GUI/LibraryWidget.h \
......@@ -116,7 +117,8 @@ HEADERS += src/GUI/MainWindow.h \
src/Commands/Commands.h \
src/GUI/VLMCPreferences.h \
src/GUI/AudioProjectPreferences.h \
src/GUI/VideoProjectPreferences.h
src/GUI/VideoProjectPreferences.h \
src/Project/ProjectManager.h
FORMS += src/GUI/ui/MainWindow.ui \
src/GUI/ui/PreviewWidget.ui \
src/GUI/ui/LanguagePreferences.ui \
......@@ -144,6 +146,7 @@ INCLUDEPATH += src/LibVLCpp \
src/Workflow \
src/Library \
src/Media \
src/Project \
src
# QMAKE_CFLAGS+=-pg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment