[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src core/AudioFileMerger.cpp core/Audi...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src core/AudioFileMerger.cpp core/Audi... |
Date: |
Wed, 10 Oct 2007 16:49:45 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/10/10 16:49:45
Added files:
src/core : AudioFileMerger.cpp AudioFileMerger.h
ProjectConverter.cpp ProjectConverter.h
src/traverso/dialogs: ProjectConverterDialog.cpp
ProjectConverterDialog.h
Log message:
* Added project conversion logic, needs some more work
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioFileMerger.cpp?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioFileMerger.h?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ProjectConverter.cpp?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ProjectConverter.h?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/ProjectConverterDialog.cpp?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/ProjectConverterDialog.h?cvsroot=traverso&rev=1.1
Patches:
Index: core/AudioFileMerger.cpp
===================================================================
RCS file: core/AudioFileMerger.cpp
diff -N core/AudioFileMerger.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ core/AudioFileMerger.cpp 10 Oct 2007 16:49:45 -0000 1.1
@@ -0,0 +1,136 @@
+/*
+Copyright (C) 2007 Remon Sijrier
+
+This file is part of Traverso
+
+Traverso 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+
+#include "AudioFileMerger.h"
+#include <QFile>
+#include <QMutexLocker>
+
+#include "Export.h"
+#include "AbstractAudioReader.h"
+#include "ReadSource.h"
+#include "WriteSource.h"
+#include "defines.h"
+
+AudioFileMerger::AudioFileMerger()
+{
+ moveToThread(this);
+ start();
+ connect(this, SIGNAL(dequeueTask()), this, SLOT(dequeue_tasks()),
Qt::QueuedConnection);
+}
+
+void AudioFileMerger::enqueue_task(ReadSource * source0, ReadSource * source1,
const QString& dir, const QString & outfilename)
+{
+ MergeTask task;
+ task.readsource0 = source0;
+ task.readsource1 = source1;
+ task.outFileName = outfilename;
+ task.dir = dir;
+
+ m_mutex.lock();
+ m_tasks.enqueue(task);
+ m_mutex.unlock();
+
+ emit dequeueTask();
+}
+
+void AudioFileMerger::dequeue_tasks()
+{
+ m_mutex.lock();
+ if (m_tasks.size()) {
+ MergeTask task = m_tasks.dequeue();
+ m_mutex.unlock();
+ process_task(task);
+ return;
+ }
+ m_mutex.unlock();
+}
+
+void AudioFileMerger::process_task(MergeTask task)
+{
+ printf("Entering process_task\n");
+ printf("task readsource rate: %d\n", task.readsource0->get_rate());
+ QString name = task.readsource0->get_name();
+ int length = name.length();
+ emit taskStarted(name.left(length-28));
+ uint buffersize = 16384;
+ DecodeBuffer decodebuffer0;
+ DecodeBuffer decodebuffer1;
+
+ ExportSpecification* spec = new ExportSpecification();
+ spec->startLocation = 0;
+ spec->endLocation = task.readsource0->get_length();
+ spec->totalTime = spec->endLocation;
+ spec->pos = 0;
+ spec->isRecording = false;
+
+ spec->exportdir = task.dir;
+ spec->writerType = "sndfile";
+ spec->extraFormat["filetype"] = "wav";
+ spec->data_width = 16;
+ spec->channels = 2;
+ spec->sample_rate = task.readsource0->get_rate();
+ spec->blocksize = buffersize;
+ spec->name = task.outFileName;
+ spec->dataF = new audio_sample_t[buffersize * 2];
+
+ WriteSource* writesource = new WriteSource(spec);
+ if (writesource->prepare_export() == -1) {
+ delete writesource;
+ delete [] spec->dataF;
+ delete spec;
+ return;
+ }
+
+ int oldprogress = 0;
+ do {
+ nframes_t diff = (spec->endLocation -
spec->pos).to_frame(task.readsource0->get_rate());
+ nframes_t this_nframes = std::min(diff, buffersize);
+ nframes_t nframes = this_nframes;
+
+ memset (spec->dataF, 0, sizeof (spec->dataF[0]) * nframes *
spec->channels);
+
+ task.readsource0->file_read(&decodebuffer0, spec->pos, nframes);
+ task.readsource1->file_read(&decodebuffer1, spec->pos, nframes);
+
+ for (uint x = 0; x < nframes; ++x) {
+ spec->dataF[x*spec->channels] =
decodebuffer0.destination[0][x];
+ spec->dataF[1+(x*spec->channels)] =
decodebuffer1.destination[0][x];
+ }
+
+ writesource->process(buffersize);
+
+ spec->pos.add_frames(nframes, task.readsource0->get_rate());
+
+ int currentprogress = int(double(spec->pos.universal_frame()) /
double(spec->totalTime.universal_frame()) * 100);
+ if (currentprogress > oldprogress) {
+ oldprogress = currentprogress;
+ emit progress(currentprogress);
+ }
+
+ } while (spec->pos != spec->totalTime);
+
+ writesource->finish_export();
+ delete writesource;
+ delete [] spec->dataF;
+ delete spec;
+
+ emit taskFinished(name.left(length-28));
+}
Index: core/AudioFileMerger.h
===================================================================
RCS file: core/AudioFileMerger.h
diff -N core/AudioFileMerger.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ core/AudioFileMerger.h 10 Oct 2007 16:49:45 -0000 1.1
@@ -0,0 +1,66 @@
+/*
+Copyright (C) 2007 Remon Sijrier
+
+This file is part of Traverso
+
+Traverso 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+
+#ifndef AUDIO_FILE_MERGER_H
+#define AUDIO_FILE_MERGER_H
+
+#include <QThread>
+#include <QQueue>
+#include <QMutex>
+
+class ReadSource;
+
+class AudioFileMerger : public QThread
+{
+ Q_OBJECT
+public:
+ AudioFileMerger();
+ void run() {
+ exec();
+ }
+
+ void enqueue_task(ReadSource* source0, ReadSource* source2, const
QString& dir, const QString& outfilename);
+
+
+private slots:
+ void dequeue_tasks();
+
+private:
+ struct MergeTask {
+ QString outFileName;
+ QString dir;
+ ReadSource* readsource0;
+ ReadSource* readsource1;
+ };
+
+ QQueue<MergeTask> m_tasks;
+ QMutex m_mutex;
+
+ void process_task(MergeTask task);
+
+signals:
+ void dequeueTask();
+ void progress(int);
+ void taskStarted(QString);
+ void taskFinished(QString);
+};
+
+#endif
Index: core/ProjectConverter.cpp
===================================================================
RCS file: core/ProjectConverter.cpp
diff -N core/ProjectConverter.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ core/ProjectConverter.cpp 10 Oct 2007 16:49:45 -0000 1.1
@@ -0,0 +1,267 @@
+/*
+ Copyright (C) 2007 Remon Sijrier
+
+ This file is part of Traverso
+
+ Traverso 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+
+#include "ProjectConverter.h"
+
+#include <QTextStream>
+#include <QFile>
+
+#include "FileHelpers.h"
+#include "AudioFileMerger.h"
+#include "ReadSource.h"
+#include "Utils.h"
+#include "defines.h"
+
+
+ProjectConverter::ProjectConverter()
+{
+ m_projectfileversion = -1;
+ connect(this, SIGNAL(conversionFinished()), this,
SLOT(conversion_finished()));
+}
+
+int ProjectConverter::start()
+{
+
+ switch(m_projectfileversion) {
+ case 2: {
+ start_conversion_from_version_2_to_3();
+ break;
+ }
+ default: {
+ emit message(tr("Project file with version %1 cannot be
converted, only files with version 2 can!").arg(m_projectfileversion));
+ return -1;
+ }
+ }
+}
+
+void ProjectConverter::set_project(const QString & rootdir, const QString &
name)
+{
+ m_rootdir = rootdir;
+ m_projectname = name;
+
+ QDomDocument doc("Project");
+
+ QString filename(m_rootdir + "/project.tpf");
+ QFile file(filename);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ printf("filename '%s' could not be opened!\n", QS_C(filename));
+ return;
+ }
+
+ // Start setting and parsing the content of the xml file
+ QString errorMsg;
+ if (!doc.setContent(&file, &errorMsg)) {
+ QString error = tr("Project %1: Failed to parse project.tpf
file! (Reason: %2)").arg(m_projectname).arg(errorMsg);
+ printf("%s\n", QS_C(error));
+ return;
+ }
+
+ QDomElement docElem = doc.documentElement();
+ QDomNode propertiesNode = docElem.firstChildElement("Properties");
+ QDomElement projectelement = propertiesNode.toElement();
+
+ m_projectfileversion = projectelement.attribute("projectfileversion",
"-1").toInt();
+
+ m_document = doc.cloneNode(true).toDocument();
+}
+
+int ProjectConverter::start_conversion_from_version_2_to_3()
+{
+ emit message(tr("Starting to convert Project from version 2 to version
3"));
+
+ m_merger = new AudioFileMerger;
+ m_filesToMerge = m_filesMerged = 0;
+ connect(m_merger, SIGNAL(progress(int)), this, SIGNAL(progress(int)));
+ connect(m_merger, SIGNAL(taskStarted(QString)), this,
SLOT(file_merge_started(QString)));
+ connect(m_merger, SIGNAL(taskFinished(QString)), this,
SLOT(file_merge_finished(QString)));
+
+ QDomElement docElem = m_document.documentElement();
+ QDomNode propertiesNode = docElem.firstChildElement("Properties");
+ QDomElement projectelement = propertiesNode.toElement();
+
+ QString version = projectelement.attribute("projectfileversion", "-1");
+ int projectrate = projectelement.attribute("rate", "44100").toInt();
+ printf("version is %s\n", QS_C(version));
+ version = QString::number(3);
+ projectelement.setAttribute("projectfileversion", version);
+
+
+ // Load all the AudioSources for this project
+ QDomNode asmNode = docElem.firstChildElement("ResourcesManager");
+ QDomNode sourcesNode =
asmNode.firstChildElement("AudioSources").firstChild();
+
+ while(!sourcesNode.isNull()) {
+ QDomElement readsourceelement = sourcesNode.toElement();
+ int channelcount = readsourceelement.attribute("channelcount",
"0").toInt();
+ int filecount = readsourceelement.attribute("filecount",
"0").toInt();
+ qint64 id = readsourceelement.attribute("id", "").toLongLong();
+ QString dir = readsourceelement.attribute("dir", "" );
+ QString name = readsourceelement.attribute("name", "No name
supplied?" );
+
+ if (filecount == 2 && channelcount == 2 && dir == (m_rootdir +
"/audiosources/")) {
+ ReadSource* readsource0 = new ReadSource(dir, name +
"-ch0.wav");
+ ReadSource* readsource1 = new ReadSource(dir, name +
"-ch1.wav");
+ readsource0->ref();
+ readsource0->init();
+ readsource1->ref();
+ readsource1->init();
+
+ m_readsources.insertMulti(id, readsource0);
+ m_readsources.insertMulti(id, readsource1);
+
+ m_filesToMerge++;
+ m_merger->enqueue_task(readsource0, readsource1, dir,
name);
+
+ readsourceelement.setAttribute("name", name + ".wav");
+ readsourceelement.setAttribute("length",
readsource0->get_length().universal_frame());
+ readsourceelement.setAttribute("rate",
readsource0->get_rate());
+
+ }
+
+
+ sourcesNode = sourcesNode.nextSibling();
+ }
+
+
+ QDomNode clipsNode =
asmNode.firstChildElement("AudioClips").firstChild();
+
+ while(!clipsNode.isNull()) {
+ QDomElement clipelement = clipsNode.toElement();
+ qint64 readsourceid = clipelement.attribute("source",
"").toLongLong();
+ nframes_t length = clipelement.attribute( "length", "0"
).toUInt();
+ nframes_t sourceStartFrame = clipelement.attribute(
"sourcestart", "" ).toUInt();
+ nframes_t trackStart = clipelement.attribute( "trackstart", ""
).toUInt();
+ ReadSource* source = m_readsources.value(readsourceid);
+ int rate = projectrate;
+ if (source) {
+ rate = source->get_rate();
+ }
+
+ clipelement.setAttribute("trackstart", TimeRef(trackStart,
rate).universal_frame());
+ clipelement.setAttribute("sourcestart",
TimeRef(sourceStartFrame, rate).universal_frame());
+ clipelement.setAttribute("length", TimeRef(length,
rate).universal_frame());
+
+ clipsNode = clipsNode.nextSibling();
+ }
+
+ QDomNode songsNode = docElem.firstChildElement("Sheets");
+ QDomNode songNode = songsNode.firstChild();
+
+ // Load all the Songs
+ while(!songNode.isNull())
+ {
+ QDomNode tracksNode = songNode.firstChildElement("Tracks");
+ QDomNode trackNode = tracksNode.firstChild();
+
+ while(!trackNode.isNull()) {
+ QDomElement trackelement = trackNode.toElement();
+ trackelement.setAttribute("OutBus", "Master Out");
+ trackNode = trackNode.nextSibling();
+ }
+ songNode = songNode.nextSibling();
+ }
+
+ emit message(tr("Converting project.tpf file..... Done!"));
+
+ if (!m_filesToMerge) {
+ finish_2_3_conversion();
+ } else {
+ emit message(tr("<b>Need to convert %1
files</b>").arg(m_filesToMerge));
+ }
+
+ return 1;
+}
+
+int ProjectConverter::save_converted_document()
+{
+ QString filename(m_rootdir + "/project.tpf");
+
+ QFile backup(filename);
+ backup.copy(m_rootdir + "/projectv" +
QString::number(m_projectfileversion) + "backup.tpf");
+
+ QFile savefile( filename );
+
+ if (!savefile.open( QIODevice::WriteOnly ) ) {
+ QString errorstring =
FileHelper::fileerror_to_string(savefile.error());
+ printf("%s\n", QS_C(tr("Couldn't open Project properties file
for writing! (File %1. Reason: %2)").arg(filename).arg(errorstring)));
+ return -1;
+ }
+
+ QTextStream stream(&savefile);
+ m_document.save(stream, 4);
+ printf("%s\n", QS_C(tr("Project %1 converted").arg(m_projectname)));
+ emit message(tr("Saving converted project.tpf file.... Done!"));
+
+ return 1;
+}
+
+void ProjectConverter::conversion_finished()
+{
+ emit message(tr("Conversion finished succesfully"));
+}
+
+QString ProjectConverter::get_conversion_description()
+{
+ switch(m_projectfileversion) {
+ case 2 : {
+ QFile file(":/project_conversion_description_2_3");
+ file.open(QIODevice::ReadOnly);
+ return file.readAll();
+ }
+ }
+ return tr("No conversion description available!");
+}
+
+void ProjectConverter::file_merge_started(QString file)
+{
+ emit fileMergeStarted(file + " (" + QString::number(m_filesMerged +
1) + "/" + QString::number(m_filesToMerge) + ")");
+}
+
+void ProjectConverter::file_merge_finished(QString file)
+{
+ emit fileMergeFinished(file);
+
+ m_filesMerged++;
+
+ if ((m_filesToMerge - m_filesMerged) == 0) {
+ finish_2_3_conversion();
+ }
+}
+
+void ProjectConverter::finish_2_3_conversion()
+{
+ foreach(ReadSource* source, m_readsources) {
+ delete source;
+ }
+
+ if ( ! m_merger->wait(1000) ) {
+ qWarning("FileMerger:: Still running after 1 second wait,
terminating!");
+ m_merger->terminate();
+ }
+
+ delete m_merger;
+
+ save_converted_document();
+
+ emit conversionFinished();
+}
+
Index: core/ProjectConverter.h
===================================================================
RCS file: core/ProjectConverter.h
diff -N core/ProjectConverter.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ core/ProjectConverter.h 10 Oct 2007 16:49:45 -0000 1.1
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2007 Remon Sijrier
+
+ This file is part of Traverso
+
+ Traverso 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+
+#ifndef PROJECT_CONVERTER_H
+#define PROJECT_CONVERTER_H
+
+#include <QObject>
+#include <QString>
+#include <QDomDocument>
+#include <QHash>
+
+class AudioFileMerger;
+class ReadSource;
+
+class ProjectConverter : public QObject
+{
+ Q_OBJECT
+
+public:
+ ProjectConverter();
+
+ void set_project(const QString& rootdir, const QString& name);
+ int start();
+ QString get_conversion_description();
+
+private:
+ QHash<qint64, ReadSource*> m_readsources;
+ AudioFileMerger* m_merger;
+ int m_filesToMerge;
+ int m_filesMerged;
+ QDomDocument m_document;
+ QString m_rootdir;
+ QString m_projectname;
+ int m_projectfileversion;
+
+ int save_converted_document();
+ int start_conversion_from_version_2_to_3();
+
+private slots:
+ void conversion_finished();
+ void file_merge_started(QString file);
+ void file_merge_finished(QString file);
+ void finish_2_3_conversion();
+
+signals:
+ void progress(int);
+ void actionProgressInfo(QString);
+ void fileMergeStarted(QString file);
+ void fileMergeFinished(QString file);
+ void conversionFinished();
+ void message(QString);
+};
+
+#endif
Index: traverso/dialogs/ProjectConverterDialog.cpp
===================================================================
RCS file: traverso/dialogs/ProjectConverterDialog.cpp
diff -N traverso/dialogs/ProjectConverterDialog.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ traverso/dialogs/ProjectConverterDialog.cpp 10 Oct 2007 16:49:45 -0000
1.1
@@ -0,0 +1,95 @@
+/*
+ Copyright (C) 2007 Remon Sijrier
+
+ This file is part of Traverso
+
+ Traverso 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+
+#include "ProjectConverterDialog.h"
+
+#include "ProjectConverter.h"
+#include "ProjectManager.h"
+#include <QScrollBar>
+
+ProjectConverterDialog::ProjectConverterDialog(QWidget * parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ m_converter = new ProjectConverter;
+
+ stopConversionButton->hide();
+ loadProjectButton->hide();
+
+ connect(m_converter, SIGNAL(progress(int)), progressBar,
SLOT(setValue(int)));
+ connect(m_converter, SIGNAL(fileMergeStarted(QString)), this,
SLOT(file_merge_started(QString)));
+ connect(m_converter, SIGNAL(fileMergeFinished(QString)), this,
SLOT(file_merge_finished(QString)));
+ connect(m_converter, SIGNAL(message(QString)), this,
SLOT(converter_messages(QString)));
+ connect(m_converter, SIGNAL(conversionFinished()), this,
SLOT(conversion_finished()));
+}
+
+
+void ProjectConverterDialog::accept()
+{
+ stopConversionButton->show();
+ startButton->hide();
+ closeButton->hide();
+
+ m_converter->start();
+}
+
+void ProjectConverterDialog::reject()
+{
+ hide();
+}
+
+void ProjectConverterDialog::set_project(const QString & rootdir, const
QString & name)
+{
+ m_projectname = name;
+ projectNameLable->setText(tr("Conversion needed for Project:
<b>'%1'</b>").arg(name));
+ m_converter->set_project(rootdir, name);
+ conversionInfoText->append(m_converter->get_conversion_description());
+}
+
+void ProjectConverterDialog::file_merge_started(QString filename)
+{
+ taskTextBrowswer->append(tr("Converting file %1").arg(filename));
+}
+
+void ProjectConverterDialog::file_merge_finished(QString filename)
+{
+// taskTextBrowswer->append(tr("Finished converting %1").arg(filename));
+}
+
+void ProjectConverterDialog::converter_messages(QString message)
+{
+ taskTextBrowswer->append(message);
+}
+
+void ProjectConverterDialog::conversion_finished()
+{
+ loadProjectButton->show();
+ closeButton->show();
+ startButton->hide();
+ stopConversionButton->hide();
+}
+
+void ProjectConverterDialog::on_loadProjectButton_clicked()
+{
+ pm().load_project(m_projectname);
+ reject();
+}
+
Index: traverso/dialogs/ProjectConverterDialog.h
===================================================================
RCS file: traverso/dialogs/ProjectConverterDialog.h
diff -N traverso/dialogs/ProjectConverterDialog.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ traverso/dialogs/ProjectConverterDialog.h 10 Oct 2007 16:49:45 -0000
1.1
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2007 Remon Sijrier
+
+ This file is part of Traverso
+
+ Traverso 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+
+#ifndef PROJECT_CONVERTER_DIALOG_H
+#define PROJECT_CONVERTER_DIALOG_H
+
+#include "ui_ProjectConverterDialog.h"
+#include <QDialog>
+
+class Project;
+class ProjectConverter;
+
+class ProjectConverterDialog : public QDialog, protected
Ui::ProjectConverterDialog
+{
+ Q_OBJECT
+
+public:
+ ProjectConverterDialog(QWidget* parent = 0);
+ ~ProjectConverterDialog() {};
+
+ void set_project(const QString& rootdir, const QString& name);
+
+private:
+ ProjectConverter* m_converter;
+ QString m_projectname;
+
+ void accept();
+ void reject();
+
+private slots:
+ void file_merge_started(QString);
+ void file_merge_finished(QString);
+ void converter_messages(QString);
+ void conversion_finished();
+ void on_loadProjectButton_clicked();
+};
+
+#endif
+
+//eof
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src core/AudioFileMerger.cpp core/Audi...,
Remon Sijrier <=