Skip to content

Conversation

@mathildemerle
Copy link
Collaborator

This PR continues the complete change of medInria notification system (which was in a bottom bar).

This PR adds the class of the notification widget itself, displayed on middle top of the application, and which close automatically after x seconds. It can be closed by the user manually also if he/she wants. The idea is to use it to display quick information to the user, not full paragraphs. The notification has 3 types: MESSAGE for quick info, SUCCESS for success messages, and ERROR for error messages.

To test

  • add in medHomageArea.cpp for instance include <medNotificationWidget.h>
  • add medLog in target_link_libraries from its CMakeLists.txt
  • in medHomepageArea::resizeEvent for instance (just after the application has its final size), choose the type of message you want to test:
    auto notification = new med::NotificationWidget(this);
    //------------- Message test
    //notification->setText("A longer message to display a tip or information to the user");
    //notification->setIcon(med::NotificationWidget::MESSAGE);
    //------------- Success test
    //notification->setText("Segmentation succeed");
    //notification->setIcon(med::NotificationWidget::SUCCESS);
    //------------- Failure test
    notification->setText("Segmentation failed, this tool needs a mesh as input");                          
    notification->setIcon(med::NotificationWidget::ERROR);
    //------------- Show widget
    notification->show();

Screenshots of example

error

message

success

PS: no need to review the svg lines. Those are images, and Github does not understand them as such.
Ⓜ️

@mathildemerle mathildemerle added this to the 4.0 milestone Oct 7, 2021
@mathildemerle mathildemerle mentioned this pull request Oct 12, 2021
28 tasks
@mathildemerle mathildemerle marked this pull request as draft February 7, 2022 09:46
@mathildemerle mathildemerle removed this from the 4.0 milestone Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant