29 #include "../system/eptexception.h"
30 #include "../system/log.h"
31 #include "../messages/messagehandler.h"
32 #include "../messages/messageprojectfile.h"
70 MessageHandler::send<MessageProjectFile>(
212 LogI(
"Quitting accepted");
288 switch (m->getType()) {
310 EptAssert(path.size() > 0,
"Path not valid.");
314 LogW(
"File could not be saved");
326 LogW(
"Exception during saving a file: %s", e.
what());
337 LogW(
"File could not be opened");
342 LogI(
"File opened!");
355 LogW(
"Exception during opening a file: %s", e.
what());
sent by SignalAnalyzer if FFT is ready
PianoManager * getPianoManager()
std::shared_ptr< Message > MessagePtr
Global type of a shared message pointer.
virtual void showOpenError()=0
Show a message box that an error occurred during the open process.
virtual void fillNew(Piano &piano)=0
function to fill the piano data with the current new settings
called when the recording was cleared
void setCallback(FileChangesCallback *cb)
Set a callback function for file changes.
const char * what() const
Override std::exception::what.
const piano::FileType fileType
void setChangesInFile(bool b)
change the state of mChangesInFile and notify the listener
FileType
supported piano file types
FileDialogResult(const std::string path="")
Results checkForNoChanges()
std::string mCurrentFilePath
current file path
PianoFile mPianoFile
the piano file
bool write(const std::string &absolutePath, const Piano &piano, piano::FileType fileType) const
bool read(const std::string &absolutePath, Piano &piano)
Results
Enumeration of the possible outcomes of a typical mouse button.
Results openFile(const std::string &path, bool cached=false)
The ProjectManagerChangesInFileUpdatedCallback class.
Results onNewFile()
New-file menu response.
virtual FileDialogResult getSavePath(int fileType)=0
get a path were to save the file
void init(Core *core)
Initialize the project management adapter.
Message that the tuning curve has been adapted.
virtual void showSaveError()=0
Show a message box that an error occurred during the save process.
virtual Results share()=0
shares the current file with the actual device
CORE : Class managing the core.
virtual void handleMessage(MessagePtr m) override
message listener callback
ProjectManagerAdapter()
Constructor.
FileType parseFileType(const std::string &fileEnding)
bool mChangesInFile
stores whether there are unsaved changes in the current file
virtual void changesInFileUpdated(bool changes)=0
virtual FileDialogResult getOpenPath(int fileType)=0
get a path to a file to open
Results saveFile(const std::string &path, piano::FileType type)
virtual Results askForSaving()=0
asks the user whether to save the current project file
FileChangesCallback * mCallback
callback if mChangesInFileChanged
virtual Results editFile()=0
edit a project file