Commit bfecceb6 authored by Clement CHAVANCE's avatar Clement CHAVANCE

added project management action on the mainwindow

parent 5aa0533a
......@@ -24,6 +24,7 @@
#include <QSizePolicy>
#include <QPalette>
#include <QDockWidget>
#include <QFileDialog>
#include "MainWindow.h"
#include "LibraryWidget.h"
......@@ -79,10 +80,25 @@ void MainWindow::setupLibrary()
Qt::TopDockWidgetArea );
//Connecting GUI and Frontend :
connect( libraryWidget, SIGNAL( newClipLoadingAsked(const QString& ) ), library, SLOT( newClipLoadingAsked( const QString& ) ) );
connect( library, SIGNAL( newClipLoaded( Clip* ) ), libraryWidget, SLOT( newClipLoaded( Clip* ) ) );
connect( libraryWidget, SIGNAL( removingClipAsked( const QUuid& ) ), library, SLOT( removingClipAsked( const QUuid& ) ) );
connect( library, SIGNAL( clipRemoved( const QUuid& ) ), libraryWidget, SLOT( clipRemoved( const QUuid& ) ) );
connect( libraryWidget,
SIGNAL( newClipLoadingAsked(const QString& ) ),
library,
SLOT( newClipLoadingAsked( const QString& ) ) );
connect( library,
SIGNAL( newClipLoaded( Clip* ) ),
libraryWidget,
SLOT( newClipLoaded( Clip* ) ) );
connect( libraryWidget,
SIGNAL( removingClipAsked( const QUuid& ) ),
library,
SLOT( removingClipAsked( const QUuid& ) ) );
connect( library,
SIGNAL( clipRemoved( const QUuid& ) ),
libraryWidget,
SLOT( clipRemoved( const QUuid& ) ) );
}
void MainWindow::m_initializeDockWidgets( void )
......@@ -125,3 +141,16 @@ void MainWindow::on_actionTranscode_File_triggered()
{
Transcode::instance( this )->exec();
}
void MainWindow::on_actionNew_Project_triggered()
{
//TODO : clear the library, the timeline, and show the configuration box
//of the newly created project
}
void MainWindow::on_actionOpen_Project_triggered()
{
QString path = QFileDialog::getOpenFileName( this, tr( "Choose a project to open" ),
QDir::currentPath(),
tr( "VideoLAN Movie Creator file (*.vlmc)" ) );
}
......@@ -55,6 +55,8 @@ private slots:
void on_actionAbout_triggered();
void on_actionPreferences_triggered();
void on_actionTranscode_File_triggered();
void on_actionNew_Project_triggered();
void on_actionOpen_Project_triggered();
signals:
void translateDockWidgetTitle();
......
......@@ -27,13 +27,15 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>26</height>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionNew_Project"/>
<addaction name="actionOpen_Project"/>
<addaction name="actionTranscode_File"/>
<addaction name="actionQuit"/>
</widget>
......@@ -129,6 +131,22 @@
<string>Transcode File</string>
</property>
</action>
<action name="actionNew_Project">
<property name="text">
<string>New Project</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action>
<action name="actionOpen_Project">
<property name="text">
<string>Open Project</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
</widget>
<resources>
<include location="../../../ressources.qrc"/>
......
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