+/****************************************************************************
+**
+** Copyright (C) 2011 Tito Eritja Real <jtitoo@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 3 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, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
#include "utils.h"
#include "constants.h"
#include "track.h"
qDebug() << "going to read file:" << fileName;
- Track* myTrack = new Track();
+ Track* myTrack = new Track(fileName);
myTrack->addActivity("doesn'tmatter");
if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) {
return point;
}
+QString nameFromFile(QString fileName){
+
+ QString sep = "/";
+ int indexName = fileName.lastIndexOf(sep);
+ if(indexName<0){
+ return fileName;
+ }else{
+ int cont = fileName.length()-indexName-1;
+ QString stringName = fileName.right(cont);
+ return stringName;
+ }
+
+}