-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3565 from rism-digital/develop-facsimile
Initial refactoring for making the use of facsimile more generic
- Loading branch information
Showing
34 changed files
with
694 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
|
||
namespace vrv { | ||
|
||
class FunctorParams; | ||
class Mensur; | ||
class Object; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
///////////////////////////////////////////////////////////////////////////// | ||
// Name: facsimilefunctor.h | ||
// Author: Laurent Pugin | ||
// Created: 2023 | ||
// Copyright (c) Authors and others. All rights reserved. | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
#ifndef __VRV_FACSIMILEFUNCTOR_H__ | ||
#define __VRV_FACSIMILEFUNCTOR_H__ | ||
|
||
#include "functor.h" | ||
#include "view.h" | ||
|
||
namespace vrv { | ||
|
||
class LayerElement; | ||
class Measure; | ||
class Page; | ||
class Pb; | ||
class Sb; | ||
class Staff; | ||
class Surface; | ||
class System; | ||
|
||
//---------------------------------------------------------------------------- | ||
// SyncFromFacsimileFunctor | ||
//---------------------------------------------------------------------------- | ||
|
||
/** | ||
* This class sync the layout encoded in the facsimile to m_Abs members | ||
*/ | ||
class SyncFromFacsimileFunctor : public Functor { | ||
public: | ||
/** | ||
* @name Constructors, destructors | ||
*/ | ||
///@{ | ||
SyncFromFacsimileFunctor(Doc *doc); | ||
virtual ~SyncFromFacsimileFunctor() = default; | ||
///@} | ||
|
||
/* | ||
* Abstract base implementation | ||
*/ | ||
bool ImplementsEndInterface() const override { return false; } | ||
|
||
/* | ||
* Functor interface | ||
*/ | ||
///@{ | ||
FunctorCode VisitLayerElement(LayerElement *layerElement) override; | ||
FunctorCode VisitMeasure(Measure *measure) override; | ||
FunctorCode VisitPage(Page *page) override; | ||
FunctorCode VisitPb(Pb *pb) override; | ||
FunctorCode VisitSb(Sb *sb) override; | ||
FunctorCode VisitStaff(Staff *staff) override; | ||
FunctorCode VisitSystem(System *system) override; | ||
///@} | ||
|
||
protected: | ||
// | ||
private: | ||
// | ||
public: | ||
// | ||
private: | ||
/** The doc */ | ||
Doc *m_doc; | ||
// | ||
View m_view; | ||
// | ||
Page *m_currentPage; | ||
System *m_currentSystem; | ||
}; | ||
|
||
//---------------------------------------------------------------------------- | ||
// SyncToFacsimileFunctor | ||
//---------------------------------------------------------------------------- | ||
|
||
/** | ||
* This class sync the layout calculated to the facsimile | ||
*/ | ||
class SyncToFacsimileFunctor : public Functor { | ||
public: | ||
/** | ||
* @name Constructors, destructors | ||
*/ | ||
///@{ | ||
SyncToFacsimileFunctor(Doc *doc); | ||
virtual ~SyncToFacsimileFunctor() = default; | ||
///@} | ||
|
||
/* | ||
* Abstract base implementation | ||
*/ | ||
bool ImplementsEndInterface() const override { return false; } | ||
|
||
/* | ||
* Functor interface | ||
*/ | ||
///@{ | ||
FunctorCode VisitLayerElement(LayerElement *layerElement) override; | ||
FunctorCode VisitMeasure(Measure *measure) override; | ||
FunctorCode VisitPage(Page *page) override; | ||
FunctorCode VisitPb(Pb *pb) override; | ||
FunctorCode VisitSb(Sb *sb) override; | ||
FunctorCode VisitStaff(Staff *staff) override; | ||
FunctorCode VisitSystem(System *system) override; | ||
///@} | ||
|
||
protected: | ||
// | ||
private: | ||
/** Create zone if not exist */ | ||
Zone *GetZone(FacsimileInterface *interface, std::string type); | ||
|
||
public: | ||
// | ||
private: | ||
/** The doc */ | ||
Doc *m_doc; | ||
// | ||
View m_view; | ||
/** The surface we are going to add / update zone */ | ||
Surface *m_surface; | ||
// | ||
Page *m_currentPage; | ||
System *m_currentSystem; | ||
// | ||
int m_pageMarginTop; | ||
int m_pageMarginLeft; | ||
}; | ||
|
||
} // namespace vrv | ||
|
||
#endif // __VRV_FACSIMILEFUNCTOR_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.