27#include <wx/dataview.h>
56 virtual int GetCount(
int aSeverity = -1 )
const = 0;
61 virtual std::shared_ptr<RC_ITEM>
GetItem(
int aIndex )
const = 0;
81 typedef std::vector<KIID>
KIIDS;
89 RC_ITEM(
const std::shared_ptr<RC_ITEM>& aItem )
115 m_ids.push_back( aItem );
116 m_ids.push_back( bItem );
117 m_ids.push_back( cItem );
118 m_ids.push_back( dItem );
138 const std::map<KIID, EDA_ITEM*>& aItemMap )
const;
151 SEVERITY aSeverity,
const std::map<KIID, EDA_ITEM*>& aItemMap )
const;
178 return wxEmptyString;
233 return wxDataViewItem(
const_cast<void*
>(
static_cast<void const*
>( aNode ) ) );
247 void Update( std::shared_ptr<RC_ITEMS_PROVIDER> aProvider,
int aSeverities );
256 bool IsContainer( wxDataViewItem
const& aItem )
const override;
258 wxDataViewItem
GetParent( wxDataViewItem
const& aItem )
const override;
260 unsigned int GetChildren( wxDataViewItem
const& aItem,
261 wxDataViewItemArray& aChildren )
const override;
265 wxString
GetColumnType(
unsigned int aCol )
const override {
return "string"; }
271 void GetValue( wxVariant& aVariant, wxDataViewItem
const& aItem,
272 unsigned int aCol )
const override;
277 bool SetValue( wxVariant
const& aVariant, wxDataViewItem
const& aItem,
278 unsigned int aCol )
override
288 bool GetAttr( wxDataViewItem
const& aItem,
unsigned int aCol,
289 wxDataViewItemAttr& aAttr )
const override;
299 void DeleteItems(
bool aCurrentOnly,
bool aIncludeExclusions,
bool aDeep );
302 void rebuildModel( std::shared_ptr<RC_ITEMS_PROVIDER> aProvider,
int aSeverities );
The base frame for deriving all KiCad main window classes.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Provide an abstract interface of a RC_ITEM* list manager.
virtual void SetSeverities(int aSeverities)=0
virtual void DeleteItem(int aIndex, bool aDeep)=0
Remove (and optionally deletes) the indexed item from the list.
virtual ~RC_ITEMS_PROVIDER()
virtual int GetCount(int aSeverity=-1) const =0
virtual std::shared_ptr< RC_ITEM > GetItem(int aIndex) const =0
Retrieve a RC_ITEM by index.
A holder for a rule check item, DRC in Pcbnew or ERC in Eeschema.
wxString m_settingsKey
The key used to describe this type of error in settings.
void SetItems(const KIID &aItem, const KIID &bItem=niluuid, const KIID &cItem=niluuid, const KIID &dItem=niluuid)
int m_errorCode
The error code's numeric value.
virtual void GetJsonViolation(RC_JSON::VIOLATION &aViolation, UNITS_PROVIDER *aUnitsProvider, SEVERITY aSeverity, const std::map< KIID, EDA_ITEM * > &aItemMap) const
Translate this object into an RC_JSON::VIOLATION object.
static wxString getSeverityString(SEVERITY aSeverity)
MARKER_BASE * GetParent() const
std::vector< KIID > KIIDS
void AddItem(EDA_ITEM *aItem)
MARKER_BASE * m_parent
The marker this item belongs to, if any.
virtual KIID GetAuxItem3ID() const
void SetErrorMessage(const wxString &aMessage)
virtual KIID GetAuxItem2ID() const
virtual KIID GetMainItemID() const
virtual KIID GetAuxItemID() const
wxString GetErrorText() const
virtual wxString ShowReport(UNITS_PROVIDER *aUnitsProvider, SEVERITY aSeverity, const std::map< KIID, EDA_ITEM * > &aItemMap) const
Translate this object into a text string suitable for saving to disk in a report.
virtual wxString GetErrorMessage() const
wxString m_errorMessage
A message describing the details of this specific error.
void SetParent(MARKER_BASE *aMarker)
RC_ITEM(const std::shared_ptr< RC_ITEM > &aItem)
void SetErrorCode(int aCode)
wxString GetSettingsKey() const
std::vector< KIID > GetIDs() const
wxString m_errorTitle
The string describing the type of error.
virtual wxString GetViolatingRuleDesc() const
void SetItems(const KIIDS &aIds)
wxString GetColumnType(unsigned int aCol) const override
void GetValue(wxVariant &aVariant, wxDataViewItem const &aItem, unsigned int aCol) const override
Called by the wxDataView to fetch an item's value.
std::vector< RC_TREE_NODE * > m_tree
unsigned int GetChildren(wxDataViewItem const &aItem, wxDataViewItemArray &aChildren) const override
bool HasContainerColumns(wxDataViewItem const &aItem) const override
EDA_DRAW_FRAME * m_editFrame
static wxDataViewItem ToItem(RC_TREE_NODE const *aNode)
bool SetValue(wxVariant const &aVariant, wxDataViewItem const &aItem, unsigned int aCol) override
Called by the wxDataView to edit an item's content.
void SelectMarker(const MARKER_BASE *aMarker)
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
void ValueChanged(RC_TREE_NODE *aNode)
void Update(std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
bool GetAttr(wxDataViewItem const &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override
Called by the wxDataView to fetch an item's formatting.
void DeleteItems(bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
Deletes the current item or all items.
void DeleteCurrentItem(bool aDeep)
unsigned int GetColumnCount() const override
wxDataViewItem GetParent(wxDataViewItem const &aItem) const override
void CenterMarker(const MARKER_BASE *aMarker)
static KIID ToUUID(wxDataViewItem aItem)
std::shared_ptr< RC_ITEMS_PROVIDER > m_rcItemsProvider
bool IsContainer(wxDataViewItem const &aItem) const override
void rebuildModel(std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
std::shared_ptr< RC_ITEM > m_RcItem
RC_TREE_NODE(RC_TREE_NODE *aParent, const std::shared_ptr< RC_ITEM > &aRcItem, NODE_TYPE aType)
std::vector< RC_TREE_NODE * > m_Children
Contains the json serialization structs for DRC and ERC reports If you are trying to change the outpu...