24#ifndef KICAD_DIFF_DOC_PROPERTY_HELPERS_H
25#define KICAD_DIFF_DOC_PROPERTY_HELPERS_H
63 aDeltas.push_back( std::move( d ) );
72 aDeltas.push_back( std::move( d ) );
84 auto append = [&aDeltas](
const wxString& aName,
const wxString& aBeforeValue,
const wxString& aAfterValue )
86 if( aBeforeValue == aAfterValue )
93 aDeltas.push_back( std::move( d ) );
static DIFF_VALUE FromEnum(int aValue, const std::string &aLabel)
static DIFF_VALUE FromBool(bool aValue)
static DIFF_VALUE FromString(const wxString &aValue)
Describe the page size and margins of a paper page on which to eventually print or plot.
wxString GetTypeAsString() const
const PAGE_SIZE_TYPE & GetType() const
Hold the information shown in the lower right corner of a plot, printout, or editing view.
const wxString & GetCompany() const
void SetRevision(const wxString &aRevision)
void SetComment(int aIdx, const wxString &aComment)
const wxString & GetRevision() const
void SetTitle(const wxString &aTitle)
const wxString & GetDate() const
const wxString & GetComment(int aIdx) const
void SetCompany(const wxString &aCompany)
const wxString & GetTitle() const
void SetDate(const wxString &aDate)
Set the date field, and defaults to the current time and date.
wxString DocPropComment(int aIndex)
bool ApplyTitleBlockProperty(TITLE_BLOCK &aTarget, const wxString &aName, const TITLE_BLOCK &aSource)
Copy the title block field named by a document property from aSource into aTarget.
const wxString DOC_PROP_DATE
const wxString DOC_PROP_PAGE_FORMAT
Property-name keys for the synthetic document-level ITEM_CHANGE (empty KIID_PATH).
constexpr int DOC_TITLE_BLOCK_COMMENTS
Matches the count TITLE_BLOCK::Format writes, which is all a file can hold.
const wxString DOC_PROP_REVISION
void AppendTitleBlockDeltas(std::vector< PROPERTY_DELTA > &aDeltas, const TITLE_BLOCK &aBefore, const TITLE_BLOCK &aAfter)
Append a delta for every title block field that differs between the two documents,...
const wxString DOC_PROP_PAGE_ORIENTATION
const wxString DOC_PROP_COMPANY
void AppendPaperDeltas(std::vector< PROPERTY_DELTA > &aDeltas, const PAGE_INFO &aBefore, const PAGE_INFO &aAfter)
Append DOC_PROP_PAGE_FORMAT and/or DOC_PROP_PAGE_ORIENTATION deltas to aDeltas when the two PAGE_INFO...
const wxString DOC_PROP_TITLE
Title block fields. The comments are numbered from one, as the page settings dialog shows them.
Single (name, before, after) triple for one mutated property on an item.