def set_date_from_x_onclick(self, event, date_holder): """ Sets the date_holder to a date from a line node closest to the pick event date_holder: a QDateTimeEdit object. """ found_date = utils.find_nearest_date_from_event(event) date_holder.setDateTime(found_date) self.reset_plot_selects_and_calib_help()
def set_log_pos_from_node_date_click(self, event): """ Sets self.log_pos variable to the date (x-axis) from the node nearest the pick event """ found_date = utils.find_nearest_date_from_event(event) #self.calib_help.setText("Logger node " + str(found_date) + " selected, click button \"Calibrate by selection in plot\" again.") self.calib_help.setText("Logger node " + str(found_date) + " selected, click \"new\" and select new level.") self.log_pos = found_date self.reset_cid() self.pushButtonMpos.setEnabled(True)
def get_node_date_from_click(self, event): found_date = utils.find_nearest_date_from_event(event) self.reset_cid() return found_date