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 <wildcards_and_files_ext.h>
#include <widgets/tab_traversal.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"

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 207 of file dialog_sheet_properties.cpp.

208 {
209  if( a.GetPosition() != b.GetPosition() )
210  return true;
211 
212  if( a.GetHorizJustify() != b.GetHorizJustify() )
213  return true;
214 
215  if( a.GetVertJustify() != b.GetVertJustify() )
216  return true;
217 
218  if( a.GetTextAngle() != b.GetTextAngle() )
219  return true;
220 
221  return false;
222 }
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
Definition: eda_text.h:199
wxPoint GetPosition() const override
Definition: sch_field.cpp:709
double GetTextAngle() const
Definition: eda_text.h:174
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
Definition: eda_text.h:198

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 225 of file dialog_sheet_properties.cpp.

226 {
227  for( size_t i = 0; i < SHEET_MANDATORY_FIELDS; ++i )
228  {
229  if( positioningChanged( a->at( i ), b.at( i ) ) )
230  return true;
231  }
232 
233  return false;
234 }
The first 2 are mandatory, and must be instantiated in SCH_SHEET.
Definition: sch_sheet.h:47
static bool positioningChanged(const SCH_FIELD &a, const SCH_FIELD &b)

References positioningChanged(), and SHEET_MANDATORY_FIELDS.