KiCad PCB EDA Suite
dialog_sheet_properties.cpp File Reference
#include <dialog_sheet_properties.h>
#include <kiface_base.h>
#include <wx/string.h>
#include <wx/log.h>
#include <wx/tooltip.h>
#include <confirm.h>
#include <validators.h>
#include <wx_filename.h>
#include <wildcards_and_files_ext.h>
#include <widgets/tab_traversal.h>
#include <kiplatform/ui.h>
#include <sch_edit_frame.h>
#include <sch_sheet.h>
#include <schematic.h>
#include <bitmaps.h>
#include <eeschema_settings.h>
#include <settings/color_settings.h>
#include <trace_helpers.h>
#include "panel_eeschema_color_settings.h"
#include "wx/dcclient.h"

Go to the source code of this file.

Functions

static bool positioningChanged (const SCH_FIELD &a, const SCH_FIELD &b)
 
static bool positioningChanged (FIELDS_GRID_TABLE< SCH_FIELD > *a, std::vector< SCH_FIELD > &b)
 

Function Documentation

◆ positioningChanged() [1/2]

static bool positioningChanged ( const SCH_FIELD a,
const SCH_FIELD b 
)
static

Definition at line 213 of file dialog_sheet_properties.cpp.

214{
215 if( a.GetPosition() != b.GetPosition() )
216 return true;
217
218 if( a.GetHorizJustify() != b.GetHorizJustify() )
219 return true;
220
221 if( a.GetVertJustify() != b.GetVertJustify() )
222 return true;
223
224 if( a.GetTextAngle() != b.GetTextAngle() )
225 return true;
226
227 return false;
228}
const EDA_ANGLE & GetTextAngle() const
Definition: eda_text.h:117
GR_TEXT_H_ALIGN_T GetHorizJustify() const
Definition: eda_text.h:139
GR_TEXT_V_ALIGN_T GetVertJustify() const
Definition: eda_text.h:142
VECTOR2I GetPosition() const override
Definition: sch_field.cpp:1052

References EDA_TEXT::GetHorizJustify(), SCH_FIELD::GetPosition(), EDA_TEXT::GetTextAngle(), and EDA_TEXT::GetVertJustify().

Referenced by positioningChanged(), and DIALOG_SHEET_PROPERTIES::TransferDataFromWindow().

◆ positioningChanged() [2/2]

static bool positioningChanged ( FIELDS_GRID_TABLE< SCH_FIELD > *  a,
std::vector< SCH_FIELD > &  b 
)
static

Definition at line 231 of file dialog_sheet_properties.cpp.

232{
233 for( size_t i = 0; i < SHEET_MANDATORY_FIELDS; ++i )
234 {
235 if( positioningChanged( a->at( i ), b.at( i ) ) )
236 return true;
237 }
238
239 return false;
240}
static bool positioningChanged(const SCH_FIELD &a, const SCH_FIELD &b)
@ SHEET_MANDATORY_FIELDS
The first 2 are mandatory, and must be instantiated in SCH_SHEET.
Definition: sch_sheet.h:47

References positioningChanged(), and SHEET_MANDATORY_FIELDS.