'Ask user for display format for floats and use it.
This function also checks whether the format is valid and emits
`sig_option_changed`.'

def change_format(self):

    (format, valid) = QInputDialog.getText(self, _('Format'), _('Float    formatting'), QLineEdit.Normal, self.dataModel.get_format())
    if valid:
        format = str(format)
        try:
            (format % 1.1)
        except:
            msg = _('Format    ({})    is    incorrect').format(format)
            QMessageBox.critical(self, _('Error'), msg)
            return
        if (not format.startswith('%')):
            msg = _("Format    ({})    should    start    with    '%'").format(format)
            QMessageBox.critical(self, _('Error'), msg)
            return
        self.dataModel.set_format(format)
        self.sig_option_changed.emit('dataframe_format', format)
