Commit e5269fef authored by Geoffroy Lacarriere's avatar Geoffroy Lacarriere

Project saving: Add of the preference classes and ui for the projects/VLMC settings

parent 7fecd7d3
/*****************************************************************************
* AudioProjectPreferences.cpp: VLMC Audio project preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "AudioProjectPreferences.h"
#include "QDebug"
AudioProjectPreferences::AudioProjectPreferences( QWidget *parent ) :
QWidget( parent )
{
this->setWidget( this );
m_ui.setupUi( this );
}
AudioProjectPreferences::~AudioProjectPreferences() { }
bool AudioProjectPreferences::load()
{
qDebug() << "Loading AudioProjectPreferences values";
return true;
}
void AudioProjectPreferences::save( QSettings& settings )
{
settings.beginGroup( "Project" );
//settings.setValue( "outputFPS", m_ui.outputFPS->text() );
settings.endGroup();
}
/*****************************************************************************
* AudioProjectPreferences.h: VLMC Audio project preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef AUDIOPROJECTPREFERENCES_H
#define AUDIOPROJECTPREFERENCES_H
#include <QWidget>
#include <QSettings>
#include "PreferenceWidget.h"
#include "ui_AudioProjectPreferences.h"
class AudioProjectPreferences : public QWidget, public PreferenceWidget
{
//Q_OBJECT
public:
AudioProjectPreferences(QWidget *parent = 0);
~AudioProjectPreferences();
bool load();
void save( QSettings& settings );
private:
Ui::AudioProjectPreferences m_ui;
};
#endif // AUDIOPROJECTPREFERENCES_H
......@@ -43,6 +43,9 @@
#include "PreviewWidget.h"
#include "PreferenceWidget.h"
#include "ProjectPreferences.h"
#include "AudioProjectPreferences.h"
#include "VideoProjectPreferences.h"
#include "VLMCPreferences.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ), m_renderer( NULL )
......@@ -190,14 +193,10 @@ void MainWindow::initializeDockWidgets( void )
void MainWindow::createGlobalPreferences()
{
m_globalPreferences = new Settings( );
m_globalPreferences->addWidget("Project",
new ProjectPreferences,
"images/vlmc.png",
"Project");
m_globalPreferences->addWidget("test",
new ProjectPreferences,
"images/vlmc.png",
"Truc");
m_globalPreferences->addWidget("VLMC",
new VLMCPreferences,
"../images/vlmc.png",
"VLMC settings");
////For debugging purpose
//m_globalPreferences->addWidget("Test",
// new QLabel("This is a test"),
......@@ -253,6 +252,21 @@ void MainWindow::on_actionNew_Project_triggered()
{
//TODO : clear the library, the timeline, and show the configuration box
//of the newly created project
m_projectPreferences = new Settings( );
m_projectPreferences->addWidget("Project",
new ProjectPreferences,
"../images/vlmc.png",
"Project settings");
m_projectPreferences->addWidget("Video",
new VideoProjectPreferences,
"../images/scalable/video.svg",
"Video settings");
m_projectPreferences->addWidget("Audio",
new AudioProjectPreferences,
"../images/scalable/audio.svg",
"Audio settings");
m_projectPreferences->build();
m_projectPreferences->show();
}
void MainWindow::on_actionOpen_Project_triggered()
......
......@@ -69,7 +69,8 @@ private:
PreviewWidget* m_clipPreview;
PreviewWidget* m_projectPreview;
WorkflowFileRenderer* m_renderer;
Settings* m_globalPreferences;
Settings* m_globalPreferences;
Settings* m_projectPreferences;
private slots:
void on_actionFullscreen_triggered( bool checked );
......
/*****************************************************************************
* ProjectPreferences.cpp: VLMC project preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
//DEBUG
#include <QtDebug>
//!DEBUG
......@@ -16,7 +38,6 @@ ProjectPreferences::ProjectPreferences( QWidget* parent )
ProjectPreferences::~ProjectPreferences() { }
bool ProjectPreferences::load()
{
qDebug() << "Loading ProjectPreferences values";
......
/*****************************************************************************
* ProjectPreferences.h: VLMC project preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef PROJECTPREFERENCES_H
#define PROJECTPREFERENCES_H
......
/*****************************************************************************
* VLMCPreferences.cpp: VLMC preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "VLMCPreferences.h"
#include "QDebug"
VLMCPreferences::VLMCPreferences(QWidget *parent) :
QWidget(parent)
{
this->setWidget( this );
m_ui.setupUi(this);
}
VLMCPreferences::~VLMCPreferences() { }
bool VLMCPreferences::load()
{
qDebug() << "Loading VLMCPreferences values";
return true;
}
void VLMCPreferences::save( QSettings& settings )
{
settings.beginGroup( "Project" );
//settings.setValue( "outputFPS", m_ui.outputFPS->text() );
settings.endGroup();
}
/*****************************************************************************
* VLMCPreferences.h: VLMC preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLMCPREFERENCES_H
#define VLMCPREFERENCES_H
#include <QWidget>
#include <QSettings>
#include "PreferenceWidget.h"
#include "ui_VLMCPreferences.h"
class VLMCPreferences : public QWidget, public PreferenceWidget
{
//Q_OBJECT
public:
VLMCPreferences(QWidget *parent = 0);
~VLMCPreferences();
bool load();
void save( QSettings& settings );
private:
Ui::VLMCPreferences m_ui;
};
#endif // VLMCPREFERENCES_H
/*****************************************************************************
* VideoProjectPreferences.cpp: VLMC video project preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "VideoProjectPreferences.h"
#include "QDebug"
VideoProjectPreferences::VideoProjectPreferences(QWidget *parent) :
QWidget(parent)
{
this->setWidget( this );
m_ui.setupUi( this );
}
VideoProjectPreferences::~VideoProjectPreferences() { }
bool VideoProjectPreferences::load()
{
qDebug() << "Loading VideoProjectPreferences values";
return true;
}
void VideoProjectPreferences::save( QSettings& settings )
{
settings.beginGroup( "Project" );
//settings.setValue( "outputFPS", m_ui.outputFPS->text() );
settings.endGroup();
}
/*****************************************************************************
* VideoProjectPreferences.h: VLMC video project preferences class
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VIDEOPROJECTPREFERENCES_H
#define VIDEOPROJECTPREFERENCES_H
#include <QWidget>
#include <QSettings>
#include "PreferenceWidget.h"
#include "ui_VideoProjectPreferences.h"
class VideoProjectPreferences : public QWidget, public PreferenceWidget
{
//Q_OBJECT
public:
VideoProjectPreferences(QWidget *parent = 0);
~VideoProjectPreferences();
bool load();
void save( QSettings& settings );
private:
Ui::VideoProjectPreferences m_ui;
};
#endif // VIDEOPROJECTPREFERENCES_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AudioProjectPreferences</class>
<widget class="QWidget" name="AudioProjectPreferences">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>200</width>
<height>33</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="SampleRateLabel">
<property name="text">
<string>SampleRate</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>VideoProjectPreferences</class>
<widget class="QWidget" name="VideoProjectPreferences">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>374</width>
<height>193</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="FPSLabel">
<property name="text">
<string>FPS</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="FrameSizeLabel_4">
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="HeightSpinBox_2">
<property name="suffix">
<string> Pixels</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="value">
<number>800</number>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="FrameSizeLabel_5">
<property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QSpinBox" name="WidthSpinBox_2">
<property name="suffix">
<string> Pixels</string>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="value">
<number>600</number>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QSpinBox" name="FPSSpinBox">
<property name="suffix">
<string> Frames/Seconds</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="value">
<number>25</number>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -58,7 +58,10 @@ SOURCES += src/main.cpp \
src/GUI/Panel.cpp \
src/GUI/PreferenceWidget.cpp \
src/GUI/ProjectPreferences.cpp \
src/Commands/Commands.cpp
src/Commands/Commands.cpp \
src/GUI/AudioProjectPreferences.cpp \
src/GUI/VLMCPreferences.cpp \
src/GUI/VideoProjectPreferences.cpp
HEADERS += src/GUI/MainWindow.h \
src/GUI/DockWidgetManager.h \
src/GUI/LibraryWidget.h \
......@@ -110,7 +113,10 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/Settings.h \
src/GUI/Panel.h \
src/GUI/GraphicsTrack.hpp \
src/Commands/Commands.h
src/Commands/Commands.h \
src/GUI/VLMCPreferences.h \
src/GUI/AudioProjectPreferences.h \
src/GUI/VideoProjectPreferences.h
FORMS += src/GUI/ui/MainWindow.ui \
src/GUI/ui/PreviewWidget.ui \
src/GUI/ui/LanguagePreferences.ui \
......@@ -121,7 +127,10 @@ FORMS += src/GUI/ui/MainWindow.ui \
src/GUI/ui/FileBrowser.ui \
src/GUI/ui/WorkflowFileRendererDialog.ui \
src/GUI/ui/ClipProperty.ui \
src/GUI/ui/ProjectPreferences.ui
src/GUI/ui/ProjectPreferences.ui \
src/GUI/ui/VLMCPreferences.ui \
src/GUI/ui/VideoProjectPreferences.ui \
src/GUI/ui/AudioProjectPreferences.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