Bug with getting the filetype

This commit is contained in:
Jan Schuffenhauer
2020-01-23 14:15:22 +01:00
parent ede3f512cd
commit 083368dcab
7 changed files with 57 additions and 21 deletions

View File

@@ -1,16 +1,28 @@
#include "IntelliDatamanager.h"
#include "Layer/PaintingArea.h"
IntelliDatamanager::IntelliDatamanager()
{
bool IntelliDatamanager::saveProject(PaintingArea* Canvas, QString filePath){
QFile openFile(filePath);
if(openFile.open(QIODevice::WriteOnly)){
qDebug() << "works.";
openFile.write("Hahaha");
openFile.close();
return true;
}
return false;
}
void IntelliDatamanager::saveProject(PaintingArea* Canvas, QString filePath){
bool IntelliDatamanager::loadProject(PaintingArea* Canvas, QString filePath){
QFile openFile(filePath);
if(openFile.open(QIODevice::ReadOnly)){
qDebug() << openFile.readAll();
openFile.close();
return true;
}
return;
}
void IntelliDatamanager::loadProject(PaintingArea* Canvas, QString filePath){
return;
return false;
}

View File

@@ -1,17 +1,16 @@
#ifndef INTELLIDATAMANAGER_H
#define INTELLIDATAMANAGER_H
#include "Layer/PaintingArea.h"
#include <QFile>
#include <QDebug>
class IntelliDatamanager
{
private:
class PaintingArea;
public:
void loadProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
void saveProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
IntelliDatamanager();
};
namespace IntelliDatamanager{
bool loadProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
bool saveProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
}
#endif // INTELLIDATAMANAGER_H