Advisor

Author:Neil Wallace (neil@openmolar.com)

This class is how I get openmolar to give notifications to the user.

I wanted a non-intrusive popup to appear in the top-right corner of both the client and admin applications, very similar to the notification system of the gnome desktop.

However.. openmolar is cross-platform, and the notification standards of all desktops seem to be a moving target. So I wrote my own version.

../../../_images/Advisor.png

The Advisor has various levels of imoprtance.

  • level 0 (a 5 second popup which can be “clicked through” and hopefully not interupt workflow)
  • level 1 (an information dialog which has to be accepted)
  • level 2 (a warning dialog. In this case the warning is also outputted to the terminal.)

I may experiment with pynotify or similar in future to provide some of this functionality.

methods and attributes

class lib_openmolar.common.qt4.widgets.advisor_notification.Advisor(parent=None)[source]

Bases: PyQt4.QtGui.QWidget

provides various notifications to the user

__init__(self, parent=None)[source]
advise(message, warning_level=0)[source]

inform the user of events - warning level0 = no interaction popup. warning level 1 advisory, requires user response. warning level 2 warning, and logged in output.

advise_dl(message)[source]

convenience function which calls advise with a default of 1. useful when connected to a signal

advise_err(message)[source]

convenience function which calls advise with a default of 1. useful when connected to a signal

hide_brief_message()[source]
setBriefMessagePosition(point, right_to_left=False)[source]

set the position the brief message label will appear arg is QtCore.QPoint, if right_to_left is true, then this point is the top right of the box.

wait(waiting=True)[source]

Table Of Contents

Previous topic

Common Classes

Next topic

BaseDialog