def set_title(self, title): """Set the Title of the page or hide it otherwise""" if title: maybe_elide_text(self.title_label, title, self.max_title_width, markup=TITLE_STYLE) self.title_label.setVisible(True) else: self.title_label.setVisible(False)
def set_subtitle(self, subtitle): """Set the Subtitle of the page or hide it otherwise""" if subtitle: maybe_elide_text(self.subtitle_label, subtitle, self.max_subtitle_width) self.subtitle_label.setVisible(True) else: self.subtitle_label.setVisible(False)
def show_error(self, message): """Show an error message inside the page.""" self.is_processing = False maybe_elide_text(self.form_errors_label, message, self.max_width * 0.95, markup=ERROR_STYLE)