Added calibration function to class MainWidget.