mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-02 18:46:54 +00:00
Don't cover STL types.
This commit is contained in:
parent
6e2914b990
commit
4cd007cb6d
common
eeschema/dialogs
include
@ -161,7 +161,7 @@ void TEMPLATES::Format( OUTPUTFORMATTER* out, bool aGlobal ) const
|
|||||||
// use at this time will not want the newlines or the indentation.
|
// use at this time will not want the newlines or the indentation.
|
||||||
out->Print( "(templatefields" );
|
out->Print( "(templatefields" );
|
||||||
|
|
||||||
const TEMPLATE_FIELDNAMES& source = aGlobal ? m_globals : m_project;
|
const std::vector<TEMPLATE_FIELDNAME>& source = aGlobal ? m_globals : m_project;
|
||||||
|
|
||||||
for( const TEMPLATE_FIELDNAME& temp : source )
|
for( const TEMPLATE_FIELDNAME& temp : source )
|
||||||
{
|
{
|
||||||
@ -254,7 +254,7 @@ void TEMPLATES::AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName, bool
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEMPLATE_FIELDNAMES& target = aGlobal ? m_globals : m_project;
|
std::vector<TEMPLATE_FIELDNAME>& target = aGlobal ? m_globals : m_project;
|
||||||
|
|
||||||
// ensure uniqueness, overwrite any template fieldname by the same name.
|
// ensure uniqueness, overwrite any template fieldname by the same name.
|
||||||
for( TEMPLATE_FIELDNAME& temp : target )
|
for( TEMPLATE_FIELDNAME& temp : target )
|
||||||
@ -305,7 +305,7 @@ void TEMPLATES::DeleteAllFieldNameTemplates( bool aGlobal )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const TEMPLATE_FIELDNAMES& TEMPLATES::GetTemplateFieldNames()
|
const std::vector<TEMPLATE_FIELDNAME>& TEMPLATES::GetTemplateFieldNames()
|
||||||
{
|
{
|
||||||
if( m_resolvedDirty )
|
if( m_resolvedDirty )
|
||||||
resolveTemplates();
|
resolveTemplates();
|
||||||
@ -314,7 +314,7 @@ const TEMPLATE_FIELDNAMES& TEMPLATES::GetTemplateFieldNames()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const TEMPLATE_FIELDNAMES& TEMPLATES::GetTemplateFieldNames( bool aGlobal )
|
const std::vector<TEMPLATE_FIELDNAME>& TEMPLATES::GetTemplateFieldNames( bool aGlobal )
|
||||||
{
|
{
|
||||||
if( aGlobal )
|
if( aGlobal )
|
||||||
return m_globals;
|
return m_globals;
|
||||||
|
@ -67,12 +67,12 @@ private:
|
|||||||
bool TransferDataFromGrid();
|
bool TransferDataFromGrid();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TEMPLATES* m_templateMgr;
|
TEMPLATES* m_templateMgr;
|
||||||
TEMPLATE_FIELDNAMES m_fields;
|
std::vector<TEMPLATE_FIELDNAME> m_fields;
|
||||||
bool m_global; // Editing global (vs. project) fieldname templates
|
bool m_global; // Editing global (vs. project) fieldname templates
|
||||||
|
|
||||||
int m_checkboxColWidth;
|
int m_checkboxColWidth;
|
||||||
TEMPLATES m_templateMgrInstance;
|
TEMPLATES m_templateMgrInstance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,8 +139,6 @@ struct TEMPLATE_FIELDNAME
|
|||||||
bool m_URL; // If field should have a browse button
|
bool m_URL; // If field should have a browse button
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES;
|
|
||||||
|
|
||||||
|
|
||||||
class TEMPLATES
|
class TEMPLATES
|
||||||
{
|
{
|
||||||
@ -179,12 +177,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Return a template field name list for read only access.
|
* Return a template field name list for read only access.
|
||||||
*/
|
*/
|
||||||
const TEMPLATE_FIELDNAMES& GetTemplateFieldNames();
|
const std::vector<TEMPLATE_FIELDNAME>& GetTemplateFieldNames();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a specific list (global or project) for read only access.
|
* Return a specific list (global or project) for read only access.
|
||||||
*/
|
*/
|
||||||
const TEMPLATE_FIELDNAMES& GetTemplateFieldNames( bool aGlobal );
|
const std::vector<TEMPLATE_FIELDNAME>& GetTemplateFieldNames( bool aGlobal );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for \a aName in the template field name list.
|
* Search for \a aName in the template field name list.
|
||||||
@ -200,10 +198,10 @@ protected:
|
|||||||
void parse( TEMPLATE_FIELDNAMES_LEXER* in, bool aGlobal );
|
void parse( TEMPLATE_FIELDNAMES_LEXER* in, bool aGlobal );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TEMPLATE_FIELDNAMES m_globals;
|
std::vector<TEMPLATE_FIELDNAME> m_globals;
|
||||||
TEMPLATE_FIELDNAMES m_project;
|
std::vector<TEMPLATE_FIELDNAME> m_project;
|
||||||
|
|
||||||
// Combined list. Project templates override global ones.
|
// Combined list. Project templates override global ones.
|
||||||
TEMPLATE_FIELDNAMES m_resolved;
|
std::vector<TEMPLATE_FIELDNAME> m_resolved;
|
||||||
bool m_resolvedDirty;
|
bool m_resolvedDirty;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user