2018-12-06 07:25:57 -05:00
|
|
|
#pragma once
|
|
|
|
|
2019-01-24 05:38:25 -05:00
|
|
|
#include <memory>
|
2018-12-06 07:25:57 -05:00
|
|
|
|
|
|
|
#include <QFileInfo>
|
|
|
|
|
2019-06-14 15:56:14 -04:00
|
|
|
#include "config/directories.h"
|
|
|
|
|
2019-01-24 05:38:25 -05:00
|
|
|
namespace Xybrid::Data {
|
|
|
|
class Project;
|
|
|
|
class Graph;
|
|
|
|
class Node;
|
|
|
|
}
|
|
|
|
|
2018-12-06 07:25:57 -05:00
|
|
|
namespace Xybrid::FileOps {
|
2019-01-24 14:26:20 -05:00
|
|
|
namespace Filter {
|
|
|
|
extern const QString project;
|
|
|
|
extern const QString node;
|
2019-07-20 15:25:35 -04:00
|
|
|
|
2019-07-20 15:28:04 -04:00
|
|
|
extern const QString audioIn;
|
|
|
|
extern const QString audioOut;
|
2019-01-24 14:26:20 -05:00
|
|
|
}
|
2019-01-24 14:14:52 -05:00
|
|
|
QString showOpenDialog(QWidget* parent = nullptr, const QString& caption = QString(), const QString& directory = QString(), const QString& filter = QString());
|
|
|
|
QString showSaveAsDialog(QWidget* parent = nullptr, const QString& caption = QString(), const QString& directory = QString(), const QString& filter = QString(), const QString& suffix = QString());
|
|
|
|
|
2019-01-24 14:26:20 -05:00
|
|
|
bool saveProject(std::shared_ptr<Data::Project> project, QString fileName = QString());
|
2022-03-10 19:26:43 -05:00
|
|
|
std::shared_ptr<Data::Project> loadProject(QString fileName, bool asTemplate = false);
|
2022-03-10 19:43:38 -05:00
|
|
|
std::shared_ptr<Data::Project> newProject(bool useTemplate = true);
|
2018-12-06 07:25:57 -05:00
|
|
|
|
2019-01-24 14:26:20 -05:00
|
|
|
bool saveNode(std::shared_ptr<Data::Node> node, QString fileName);
|
2019-01-24 05:38:25 -05:00
|
|
|
std::shared_ptr<Data::Node> loadNode(QString fileName, std::shared_ptr<Data::Graph> parent = nullptr);
|
|
|
|
|
2019-06-14 15:56:14 -04:00
|
|
|
void loadConfig();
|
|
|
|
void saveConfig();
|
|
|
|
|
2022-03-13 06:47:17 -04:00
|
|
|
void loadUIState();
|
|
|
|
void saveUIState();
|
|
|
|
|
2018-12-06 07:25:57 -05:00
|
|
|
}
|