KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FILE_CHECKLIST_DATA Class Reference

The rows and tick states behind FILE_CHECKLIST_CTRL. More...

#include <file_checklist_ctrl.h>

Public Member Functions

void SetEntries (const std::vector< FILE_CHECKLIST_ENTRY > &aEntries)
 
const std::vector< wxString > & Sections () const
 Section headings in the order they were added.
 
const std::vector< FILE_CHECKLIST_ENTRY > & Rows (const wxString &aSection) const
 Rows under a section, in the order they were added. Empty for an unknown section.
 
void SetChecked (const wxString &aPath, bool aChecked)
 
void SetSectionChecked (const wxString &aSection, bool aChecked)
 
bool IsSectionChecked (const wxString &aSection) const
 True when the section has rows and every one of them is ticked.
 
std::vector< wxString > CheckedPaths () const
 Paths of every ticked row, in the order they were added.
 

Private Attributes

std::vector< wxString > m_sections
 
std::map< wxString, std::vector< FILE_CHECKLIST_ENTRY > > m_rowsBySection
 

Detailed Description

The rows and tick states behind FILE_CHECKLIST_CTRL.

It owns no window, so the rules that decide what the control shows can be tested headlessly.

Sections and the rows within them keep the order in which they were added.

Definition at line 57 of file file_checklist_ctrl.h.

Member Function Documentation

◆ CheckedPaths()

std::vector< wxString > FILE_CHECKLIST_DATA::CheckedPaths ( ) const

Paths of every ticked row, in the order they were added.

Definition at line 98 of file file_checklist_ctrl.cpp.

References m_rowsBySection, and m_sections.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ IsSectionChecked()

bool FILE_CHECKLIST_DATA::IsSectionChecked ( const wxString & aSection) const

True when the section has rows and every one of them is ticked.

Drives its header checkbox, which has no third state for a partly ticked section.

Definition at line 81 of file file_checklist_ctrl.cpp.

References FILE_CHECKLIST_ENTRY::checked, and m_rowsBySection.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ Rows()

const std::vector< FILE_CHECKLIST_ENTRY > & FILE_CHECKLIST_DATA::Rows ( const wxString & aSection) const

Rows under a section, in the order they were added. Empty for an unknown section.

Definition at line 44 of file file_checklist_ctrl.cpp.

References empty(), and m_rowsBySection.

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ Sections()

const std::vector< wxString > & FILE_CHECKLIST_DATA::Sections ( ) const
inline

Section headings in the order they were added.

Definition at line 63 of file file_checklist_ctrl.h.

References m_sections.

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetChecked()

void FILE_CHECKLIST_DATA::SetChecked ( const wxString & aPath,
bool aChecked )

Definition at line 53 of file file_checklist_ctrl.cpp.

References m_rowsBySection.

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ SetEntries()

void FILE_CHECKLIST_DATA::SetEntries ( const std::vector< FILE_CHECKLIST_ENTRY > & aEntries)

◆ SetSectionChecked()

void FILE_CHECKLIST_DATA::SetSectionChecked ( const wxString & aSection,
bool aChecked )

Definition at line 69 of file file_checklist_ctrl.cpp.

References FILE_CHECKLIST_ENTRY::checked, and m_rowsBySection.

Referenced by BOOST_AUTO_TEST_CASE().

Member Data Documentation

◆ m_rowsBySection

std::map<wxString, std::vector<FILE_CHECKLIST_ENTRY> > FILE_CHECKLIST_DATA::m_rowsBySection
private

◆ m_sections

std::vector<wxString> FILE_CHECKLIST_DATA::m_sections
private

Definition at line 79 of file file_checklist_ctrl.h.

Referenced by CheckedPaths(), Sections(), and SetEntries().


The documentation for this class was generated from the following files: