ember/model/project.h

58 lines
996 B
C++

#ifndef PROJECT_H
#define PROJECT_H
#include <string>
#include <time.h>
#include <boost/filesystem.hpp>
#include "projectitem.h"
namespace Ember
{
class Project
{
public:
Project(boost::filesystem::path projectFilePath);
// Getters
boost::filesystem::path path() const;
std::string name() const;
int bitsPerChannel() const;
int audioSampleRate() const;
ProjectItem& rootItem();
// Setters
void setName(const std::string &name);
void setBitsPerChannel(int bitsPerChannel);
void setAudioSampleRate(int audioSampleRate);
// Actions
void load();
void save();
private:
boost::filesystem::path m_path;
// Details (that will be stored in project file)
std::string m_name;
int m_bitsPerChannel = 8;
int m_audioSampleRate = 48000;
// Items
ProjectItem m_rootItem;
};
struct RecentProject
{
std::string name;
boost::filesystem::path path;
time_t access;
bool pinned;
};
}
#endif // PROJECT_H