#include <model.h>
Public Member Functions | |
GraphicDocument ()=default | |
GraphicDocument (const std::string &path) | |
void | load_document (const std::string &path) |
void | add_primitive_to_document (std::shared_ptr< figures::CanvasPrimitive > &primitive) |
void | remove_primitive_from_document (std::shared_ptr< figures::CanvasPrimitive > &primitive) |
void | save_document (const std::string &path) |
std::vector< std::string > | get_elements_representations () const |
|
default |
Construct empty document
editor::GraphicDocument::GraphicDocument | ( | const std::string & | path | ) |
Load document from file
void editor::GraphicDocument::add_primitive_to_document | ( | std::shared_ptr< figures::CanvasPrimitive > & | primitive | ) |
Add primitive (figure) to document
std::vector< std::string > editor::GraphicDocument::get_elements_representations | ( | ) | const |
void editor::GraphicDocument::load_document | ( | const std::string & | path | ) |
Reload current document from (other) file
void editor::GraphicDocument::remove_primitive_from_document | ( | std::shared_ptr< figures::CanvasPrimitive > & | primitive | ) |
Remove primitive (figure) from document
void editor::GraphicDocument::save_document | ( | const std::string & | path | ) |
Save document to file