25 #ifndef PROJECTMANAGERADAPTER_H
26 #define PROJECTMANAGERADAPTER_H
29 #include "../piano/pianofile.h"
30 #include "../messages/messagelistener.h"
118 virtual FileDialogResult
getSavePath(
int fileType) = 0;
122 virtual FileDialogResult
getOpenPath(
int fileType) = 0;
163 #endif // PROJECTMANAGERADAPTER_H
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
void setCallback(FileChangesCallback *cb)
Set a callback function for file changes.
const piano::FileType fileType
void setChangesInFile(bool b)
change the state of mChangesInFile and notify the listener
FileType
supported piano file types
bool hasChangesInFile() const
FileDialogResult(const std::string path="")
Results checkForNoChanges()
std::string mCurrentFilePath
current file path
PianoFile mPianoFile
the piano file
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.
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.
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
virtual ~ProjectManagerAdapter()
Empty destructor.
const std::string & getCurrentFilePath() const
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
Project manager adapter class.
virtual Results editFile()=0
edit a project file