nurupo / ProjectTox-Qt-GUI

A cross-platform front end for ProjectTox Core library, written in C++11 with use of Qt5
GNU General Public License v3.0
342 stars 116 forks source link

Notifications #71

Open nurupo opened 11 years ago

nurupo commented 11 years ago

Implement support of notification messages.

Notifications can be either system QSystemTrayIcon or a custom widget pop-ups. System notifications are platform-dependent, and platforms like Windows have a limit on how much text can be displayed

A notification title. This title should be a maximum of 48 characters long in English (to accommodate localization). The title is the first line of the notification, and set apart through the use of font size, color, and weight. Text for use in the body of the notification. This text should be a maximum of 200 characters in English (to accommodate localization). http://msdn.microsoft.com/en-us/library/windows/desktop/ee330740%28v=vs.85%29.aspx#define_notification

and notifications may not appear at all (if they are disabled).

Note that display of messages are dependent on the system configuration and user preferences, and that messages may not appear at all. Hence, it should not be relied upon as the sole means for providing critical information. http://qt-project.org/doc/qt-5.1/qtwidgets/qsystemtrayicon.html#showMessage

Custom pop-ups look like a way to go, but it would be nice to also support system notifications as an extra.

Since notifications concern only events received from Core, a Notification Manager class can be instantiated in Main Window class and then connected to Core's event signals.

A settings page with options to enable/disable notifications and to choose between custom pop-up or system notifications should be added.

Schlumpf commented 10 years ago

Maybe interesting: https://github.com/gorthauer/QtDockTile