KiCad PCB EDA Suite
connectivity_algo.cpp File Reference
#include <connectivity/connectivity_algo.h>
#include <progress_reporter.h>
#include <geometry/geometry_utils.h>
#include <board_commit.h>
#include <wx/log.h>
#include <thread>
#include <mutex>
#include <algorithm>
#include <future>

Go to the source code of this file.

Functions

void reportProgress (PROGRESS_REPORTER *aReporter, int aCount, int aSize, int aDelta)
 

Function Documentation

◆ reportProgress()

void reportProgress ( PROGRESS_REPORTER aReporter,
int  aCount,
int  aSize,
int  aDelta 
)

Definition at line 409 of file connectivity_algo.cpp.

410 {
411  if( aReporter && ( ( aCount % aDelta ) == 0 || aCount == aSize - 1 ) )
412  {
413  aReporter->SetCurrentProgress( (double) aCount / (double) aSize );
414  aReporter->KeepRefreshing( false );
415  }
416 }
virtual bool KeepRefreshing(bool aWait=false)=0
Update the UI (if any).
virtual void SetCurrentProgress(double aProgress)=0
Set the progress value to aProgress (0..1).

References PROGRESS_REPORTER::KeepRefreshing(), and PROGRESS_REPORTER::SetCurrentProgress().

Referenced by CN_CONNECTIVITY_ALGO::Build().