def on_debug_message(self, message): msg = 'DEBUG - occurred at: [ {} ]\n{}'.format( NotificationsWidget._get_time(), NotificationsWidget._strip_new_line(message)) notification_item = QStandardItem() notification_item.setText(msg) notification_item.setIcon(QIcon.fromTheme('dialog-question')) notification_item.setEditable(False) self.all_notification_model.appendRow(notification_item)
def on_error_message(self, message): msg = 'ERROR - occurred at: [ {} ]\n{}'.format( NotificationsWidget._get_time(), NotificationsWidget._strip_new_line(message)) LOG.debug('-----on_error_message called: {}'.format(message)) notification_item = QStandardItem() notification_item.setText(msg) notification_item.setIcon(QIcon.fromTheme('dialog-error')) notification_item.setEditable(False) self.all_notification_model.appendRow(notification_item)
def on_debug_message(self, message): timestamp = time() dt_object = datetime.fromtimestamp(timestamp) current_time = str(dt_object) msg = 'DEBUG\nTIME {}\n {}'.format(current_time, message) notification_item = QStandardItem() notification_item.setText(msg) notification_item.setIcon(QIcon.fromTheme('dialog-question')) notification_item.setEditable(False) self.all_notification_model.appendRow(notification_item)