Commit d6329e1f authored by Geoffroy Lacarriere's avatar Geoffroy Lacarriere

First version of the import dialog box

parent 49254320
#include "Import.h"
#include "ui_Import.h"
#include "FileBrowser.h"
#include "PreviewWidget.h"
#include "ClipRenderer.h"
Import::Import(QWidget *parent) :
QDialog(parent), ui(new Ui::Import)
{
ui->setupUi(this);
ui->FileBrowserWidget = new FileBrowser(this);
ui->PreviewWidget = new PreviewWidget( new ClipRenderer, this );
}
Import::~Import()
{
delete ui;
}
void Import::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
#ifndef IMPORT_H
#define IMPORT_H
#include <QDialog>
namespace Ui
{
class Import;
}
class Import : public QDialog
{
Q_OBJECT
public:
Import(QWidget *parent = 0);
~Import();
protected:
void changeEvent(QEvent *e);
private:
Ui::Import *ui;
};
#endif // IMPORT_H
......@@ -47,6 +47,7 @@
#include "AudioProjectPreferences.h"
#include "VideoProjectPreferences.h"
#include "VLMCPreferences.h"
#include "Import.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ), m_renderer( NULL )
......@@ -300,6 +301,12 @@ void MainWindow::on_actionNew_Project_triggered()
m_projectPreferences->show();
}
void MainWindow::on_actionImport_triggered()
{
Import* import = new Import( );
import->exec();
}
void MainWindow::zoomIn()
{
m_zoomSlider->setValue( m_zoomSlider->value() - 1 );
......
......@@ -83,6 +83,7 @@ private slots:
void on_actionNew_Project_triggered();
void on_actionLoad_Project_triggered();
void on_actionSave_triggered();
void on_actionImport_triggered();
void mediaListItemDoubleClicked( QListWidgetItem* );
signals:
......
......@@ -3,7 +3,7 @@
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* Authors: Clement CHAVANCE <kinder@vlmc.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......
......@@ -3,7 +3,7 @@
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* Authors: Clement CHAVANCE <kinder@vlmc.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Import</class>
<widget class="QDialog" name="Import">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>759</width>
<height>737</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QWidget" name="FileBrowserWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QWidget" name="PreviewWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>328</width>
<height>340</height>
</size>
</property>
<zorder>MediaPropertiesGroupBox</zorder>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="MediaPropertiesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Media Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="QLabel" name="nameValueLabel">
<property name="text">
<string>unnamed</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="durationLabel">
<property name="text">
<string>Duration</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="durationValueLabel">
<property name="text">
<string>0s</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="resolutionLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="resolutionValueLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>0px. x 0px.</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="fpsLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FPS</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="fpsValueLabel">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Import</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Import</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
......@@ -27,7 +27,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
......@@ -37,6 +37,7 @@
<addaction name="actionNew_Project"/>
<addaction name="actionLoad_Project"/>
<addaction name="actionSave"/>
<addaction name="actionImport"/>
<addaction name="actionTranscode_File"/>
<addaction name="actionRender"/>
<addaction name="actionQuit"/>
......@@ -176,6 +177,11 @@
<string>Save</string>
</property>
</action>
<action name="actionImport">
<property name="text">
<string>Import</string>
</property>
</action>
</widget>
<resources>
<include location="../../../ressources.qrc"/>
......
......@@ -37,7 +37,7 @@
<item row="2" column="1">
<widget class="QPushButton" name="BrowsePushButton">
<property name="text">
<string>Browse</string>
<string>Browse...</string>
</property>
</widget>
</item>
......
......@@ -31,7 +31,7 @@
<item row="1" column="2">
<widget class="QSpinBox" name="HeightSpinBox_2">
<property name="suffix">
<string> Pixels</string>
<string/>
</property>
<property name="minimum">
<number>1</number>
......@@ -54,7 +54,7 @@
<item row="1" column="4">
<widget class="QSpinBox" name="WidthSpinBox_2">
<property name="suffix">
<string> Pixels</string>
<string/>
</property>
<property name="maximum">
<number>65536</number>
......
......@@ -31,8 +31,7 @@ SOURCES += src/main.cpp \
src/GUI/ListViewMediaItem.cpp \
src/GUI/MediaListWidget.cpp \
src/Media/Clip.cpp \
src/GUI/About.cpp \
# src/GUI/Transcode.cpp \
src/GUI/About.cpp \ # src/GUI/Transcode.cpp \
src/GUI/Slider.cpp \
src/Metadata/MetaDataWorker.cpp \
src/Library/Library.cpp \
......@@ -62,7 +61,8 @@ SOURCES += src/main.cpp \
src/GUI/AudioProjectPreferences.cpp \
src/GUI/VLMCPreferences.cpp \
src/GUI/VideoProjectPreferences.cpp \
src/Project/ProjectManager.cpp
src/Project/ProjectManager.cpp \
src/GUI/Import.cpp
HEADERS += src/GUI/MainWindow.h \
src/GUI/DockWidgetManager.h \
src/GUI/LibraryWidget.h \
......@@ -80,8 +80,7 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/ListViewMediaItem.h \
src/Media/Clip.h \
src/GUI/MediaListWidget.h \
src/GUI/About.h \
# src/GUI/Transcode.h \
src/GUI/About.h \ # src/GUI/Transcode.h \
src/GUI/Slider.h \
src/Metadata/MetaDataWorker.h \
src/Tools/Singleton.hpp \
......@@ -118,21 +117,22 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/VLMCPreferences.h \
src/GUI/AudioProjectPreferences.h \
src/GUI/VideoProjectPreferences.h \
src/Project/ProjectManager.h
src/Project/ProjectManager.h \
src/GUI/Import.h
FORMS += src/GUI/ui/MainWindow.ui \
src/GUI/ui/PreviewWidget.ui \
src/GUI/ui/LanguagePreferences.ui \
src/GUI/ui/Timeline.ui \
src/GUI/ui/LibraryWidget.ui \
src/GUI/ui/About.ui \
# src/GUI/ui/Transcode.ui \
src/GUI/ui/About.ui \ # src/GUI/ui/Transcode.ui \
src/GUI/ui/FileBrowser.ui \
src/GUI/ui/WorkflowFileRendererDialog.ui \
src/GUI/ui/ClipProperty.ui \
src/GUI/ui/ProjectPreferences.ui \
src/GUI/ui/VLMCPreferences.ui \
src/GUI/ui/VideoProjectPreferences.ui \
src/GUI/ui/AudioProjectPreferences.ui
src/GUI/ui/AudioProjectPreferences.ui \
src/GUI/ui/Import.ui
TRANSLATIONS = ts/vlmc_es.ts \
ts/vlmc_fr.ts \
ts/vlmc_sv.ts
......
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