'A non modal popup that notifies the user that a background task has
been completed. This class guarantees that only a single popup is
visible at any one time. Other requests are queued and displayed after
the user dismisses the current popup.
:param callback: A callable that is called with payload if the user
asks to proceed. Note that this is always called in the GUI thread.
:param cancel_callback: A callable that is called with the payload if
the users asks not to proceed.
:param payload: Arbitrary object, passed to callback
:param html_log: An HTML or plain text log
:param log_viewer_title: The title for the log viewer window
:param title: The title for this popup
:param msg: The msg to display
:param det_msg: Detailed message
:param log_is_file: If True the html_log parameter is interpreted as
the path to a file on disk containing the log
encoded with utf-8
:param checkbox_msg: If not None, a checkbox is displayed in the
dialog, showing this message. The callback is
called with both the payload and the state of the
checkbox as arguments.
:param checkbox_checked: If True the checkbox is checked by default.
:param action_callback: If not None, an extra button is added, which
when clicked will cause action_callback to be called
instead of callback. action_callback is called in
exactly the same way as callback.
:param action_label: The text on the action button
:param action_icon: The icon for the action button, must be a QIcon object or None
:param focus_action: If True, the action button will be focused instead of the Yes button
:param show_det: If True, the Detailed message will be shown initially
:param show_ok: If True, OK will be shown instead of YES/NO
:param icon: The icon to be used for this popop (defaults to question mark). Can be either a QIcon or a string to be used with I()
:log_viewer_unique_name: If set, ViewLog will remember/reuse its size for this name in calibre.gui2.gprefs'

def __call__(self, callback, payload, html_log, log_viewer_title, title, msg, det_msg=u'', show_copy_button=False, cancel_callback=None, log_is_file=False, checkbox_msg=None, checkbox_checked=False, action_callback=None, action_label=None, action_icon=None, focus_action=False, show_det=False, show_ok=False, icon=None, log_viewer_unique_name=None, **kw):

    question = Question(payload, callback, cancel_callback, title, msg, html_log, log_viewer_title, log_is_file, det_msg, show_copy_button, checkbox_msg, checkbox_checked, action_callback, action_label, action_icon, focus_action, show_det, show_ok, icon, log_viewer_unique_name)
    self.questions.append(question)
    self.show_question()
