OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::NotificationManager Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/NotificationManager.hpp>

Collaboration diagram for Slic3r::GUI::NotificationManager:

Classes

struct  NotificationData
class  NotificationIDProvider
class  PopNotification
class  ObjectIDNotification
class  PlaterWarningNotification
class  ProgressBarNotification
class  URLDownloadNotification
class  PrintHostUploadNotification
class  ProgressIndicatorNotification
class  ExportFinishedNotification
class  UpdatedItemsInfoNotification
class  SharedProfilesNotification
class  OrcaSyncConflictNotification
class  PluginMissingNotification
struct  DelayedNotification
class  SlicingProgressNotification
class  HintNotification

Public Types

enum class  NotificationLevel : int {
  ProgressBarNotificationLevel = 1 , HintNotificationLevel , RegularNotificationLevel , PrintInfoNotificationLevel ,
  PrintInfoShortNotificationLevel , ImportantNotificationLevel , WarningNotificationLevel , SeriousWarningNotificationLevel ,
  ErrorNotificationLevel
}

Public Member Functions

 NotificationManager (wxEvtHandler *evt_handler)
 ~NotificationManager ()
void on_change_color_mode (bool is_dark)
void init ()
void push_notification (const NotificationType type, int timestamp=0)
void push_notification (const std::string &text, int timestamp=0)
void push_notification (NotificationType type, NotificationLevel level, const std::string &text, const std::string &hypertext="", std::function< bool(wxEvtHandler *)> callback=std::function< bool(wxEvtHandler *)>(), int timestamp=0)
void push_delayed_notification (const NotificationType type, std::function< bool(void)> condition_callback, int64_t initial_delay, int64_t delay_interval)
void stop_delayed_notifications_of_type (const NotificationType type)
void push_validate_error_notification (StringObjectException const &error)
void push_upload_job_notification (int id, float filesize, const std::string &filename, const std::string &host, float percentage=0)
void set_upload_job_notification_percentage (int id, const std::string &filename, const std::string &host, float percentage)
void upload_job_notification_show_canceled (int id, const std::string &filename, const std::string &host)
void upload_job_notification_show_error (int id, const std::string &filename, const std::string &host)
void push_slicing_serious_warning_notification (const std::string &text, std::vector< ModelObject const * > objs)
void push_slicing_serious_warning_notification (const std::string &text, std::vector< ModelInstance const * > insts)
void close_slicing_serious_warning_notification (const std::string &text)
void push_slicing_error_notification (const std::string &text, std::vector< ModelObject const * > objs)
void push_slicing_warning_notification (const std::string &text, bool gray, ModelObject const *obj, ObjectID oid, int warning_step, int warning_msg_id, NotificationLevel level=NotificationLevel::WarningNotificationLevel)
void set_all_slicing_errors_gray (bool g)
void set_all_slicing_warnings_gray (bool g)
void close_slicing_errors_and_warnings ()
void close_slicing_error_notification (const std::string &text)
void remove_slicing_warnings_of_released_objects (const std::vector< ObjectID > &living_oids)
void push_general_error_notification (const std::string &text)
void close_general_error_notification (const std::string &text)
void push_plater_error_notification (const std::string &text)
void push_plater_warning_notification (const std::string &text)
void close_plater_error_notification (const std::string &text)
void close_plater_warning_notification (const std::string &text)
void push_flushing_volume_error_notification (NotificationType type, NotificationLevel level, const std::string &text, const std::string &hypertext="", std::function< bool(wxEvtHandler *)> callback=std::function< bool(wxEvtHandler *)>())
void close_flushing_volume_error_notification (NotificationType type, NotificationLevel level)
void push_slicing_customize_error_notification (NotificationType type, NotificationLevel level, const std::string &text, const std::string &hypertext="", std::function< bool(wxEvtHandler *)> callback=std::function< bool(wxEvtHandler *)>())
void close_slicing_customize_error_notification (NotificationType type, NotificationLevel level)
void push_simplify_suggestion_notification (const std::string &text, ObjectID object_id, const std::string &hypertext="", std::function< bool(wxEvtHandler *)> callback=std::function< bool(wxEvtHandler *)>())
void set_simplify_suggestion_multiline (const ObjectID oid, bool bMulti)
void remove_simplify_suggestion_of_released_objects (const std::vector< ObjectID > &living_oids)
void remove_simplify_suggestion_with_id (const ObjectID oid)
void set_sidebar_collapsed (bool collapsed)
void set_fff (bool b)
void set_fdm (bool b)
void set_sla (bool b)
void push_exporting_finished_notification (const std::string &path, const std::string &dir_path, bool on_removable)
void push_import_finished_notification (const std::string &path, const std::string &dir_path, bool on_removable)
void push_shared_profiles_notification (const std::string &explore_url)
void push_orca_sync_conflict_notification (const std::string &text, int conflict_code, std::function< bool(wxEvtHandler *)> pull_callback, std::function< bool(wxEvtHandler *)> force_push_callback)
void push_plugin_missing_notification (NotificationType type, const std::string &text, const std::string &resolve_label, std::vector< JumpTo > body, std::function< bool(wxEvtHandler *)> resolve_callback)
void push_download_URL_progress_notification (size_t id, const std::string &text, std::function< bool(DownloaderUserAction, int)> user_action_callback)
void set_download_URL_progress (size_t id, float percentage)
void set_download_URL_paused (size_t id)
void set_download_URL_canceled (size_t id)
void set_download_URL_error (size_t id, const std::string &text)
void init_slicing_progress_notification (std::function< bool()> cancel_callback)
void update_slicing_notif_dailytips (bool need_change)
void set_slicing_progress_began ()
void set_slicing_progress_percentage (const std::string &text, float percentage)
void set_slicing_progress_canceled (const std::string &text)
void set_slicing_progress_hidden ()
void set_slicing_complete_print_time (const std::string &info, bool sidebar_colapsed)
void set_slicing_progress_export_possible ()
void init_progress_indicator ()
void progress_indicator_set_range (int range)
void progress_indicator_set_cancel_callback (CancelFn callback=CancelFn())
void progress_indicator_set_progress (int pr)
void progress_indicator_set_status_text (const char *)
int progress_indicator_get_range () const
void push_hint_notification (bool open_next)
bool is_hint_notification_open ()
void deactivate_loaded_hints ()
void push_updated_item_info_notification (InfoItemType type)
void new_export_began (bool on_removable)
void device_ejected ()
void render_notifications (GLCanvas3D &canvas, float overlay_width, float bottom_margin, float right_margin)
void close_notification_of_type (const NotificationType type)
void remove_notification_of_type (const NotificationType type)
void clear_all ()
void set_in_preview (bool preview)
void apply_in_preview ()
void set_move_from_overlay (bool move)
bool update_notifications (GLCanvas3D &canvas)
size_t get_notification_count () const
void bbl_show_plateinfo_notification (const std::string &text)
void bbl_close_plateinfo_notification ()
void bbl_show_3mf_warn_notification (const std::string &text, NotificationLevel level=NotificationLevel::ErrorNotificationLevel)
void bbl_close_3mf_warn_notification ()
void bbl_show_preview_only_notification (const std::string &text)
void bbl_close_preview_only_notification ()
void bbl_show_plugin_install_notification (const std::string &text)
void bbl_close_plugin_install_notification ()
void bbl_show_objectsinfo_notification (const std::string &text, bool is_warning, bool is_hidden)
void bbl_close_objectsinfo_notification ()
void bbl_show_seqprintinfo_notification (const std::string &text)
void bbl_close_seqprintinfo_notification ()
void bbl_show_slice_emptylayer_notification (const std::string &text, bool bOverride=true)
void bbl_show_app_newversion_notification ()
void bbl_show_need_support_on_notification ()
void bbl_close_need_support_on_notification ()
void bbl_show_gcode_overlap_notification ()
void bbl_close_gcode_overlap_notification ()
void bbl_show_bed_filament_incompatible_notification (const std::string &text)
void bbl_close_bed_filament_incompatible_notification ()
void bbl_show_filament_map_invalid_notification_before_slice (const NotificationType type, const std::string &text)
void bbl_close_filament_map_invalid_notification_before_slice (const NotificationType type)
void bbl_show_filament_map_invalid_notification_after_slice (const NotificationType type, const std::string &text)
void bbl_close_filament_map_invalid_notification_after_slice (const NotificationType type)
void bbl_show_sole_text_notification (NotificationType sType, const std::string &text, bool bOverride, int level, bool autohide)
void bbl_chose_sole_text_notification (NotificationType sType)
void set_scale (float scale=1.0)

Public Attributes

float m_scale = 1.0f

Private Member Functions

void close_and_delete_self (PopNotification *)
bool push_notification_data (const NotificationData &notification_data, int timestamp)
bool push_notification_data (std::unique_ptr< NotificationManager::PopNotification > notification, int timestamp)
void push_delayed_notification_data (std::unique_ptr< NotificationManager::PopNotification > notification, std::function< bool(void)> condition_callback, int64_t initial_delay, int64_t delay_interval)
bool activate_existing (const NotificationManager::PopNotification *notification)
void sort_notifications ()
bool has_slicing_error_notification ()
size_t get_standard_duration (NotificationLevel level)

Private Attributes

bool m_is_dark = false
bool m_initialized { false }
bool m_imgui_ready { false }
wxEvtHandler * m_evt_handler
NotificationIDProvider m_id_provider
std::deque< std::unique_ptr< PopNotification > > m_pop_notifications
PopNotification * m_to_delete_after_finish_render {nullptr}
std::vector< DelayedNotification > m_waiting_notifications
std::unordered_set< int > m_used_timestamps
bool m_in_preview { false }
int m_in_view { 0 }
bool m_move_from_overlay { false }
int64_t m_last_render { 0LL }
const std::vector< NotificationType > m_multiple_types
const std::vector< NotificationData > basic_notifications

Detailed Description


Class Documentation

◆ Slic3r::GUI::NotificationManager::NotificationData

struct Slic3r::GUI::NotificationManager::NotificationData
Collaboration diagram for Slic3r::GUI::NotificationManager::NotificationData:
Class Members
function< bool(wxEvtHandler *)> callback
const int duration
const string hypertext
NotificationLevel level
string ori_text
int sub_msg_id {-1}
const string text1
const string text2
NotificationType type
bool use_warn_color { false }

Member Enumeration Documentation

◆ NotificationLevel

Enumerator
ProgressBarNotificationLevel 
HintNotificationLevel 
RegularNotificationLevel 
PrintInfoNotificationLevel 
PrintInfoShortNotificationLevel 
ImportantNotificationLevel 
WarningNotificationLevel 
SeriousWarningNotificationLevel 
ErrorNotificationLevel 
208 {
209 // The notifications will be presented in the order of importance, thus these enum values
210 // are sorted by the importance.
211 // Important notification with progress bar, no fade-out, might appear again after closing. Position at the bottom.
212 ProgressBarNotificationLevel = 1,
213 // "Did you know" notification with special icon and buttons, Position close to bottom.
214 HintNotificationLevel,
215 // "Good to know" notification, usually but not always with a quick fade-out.
216 RegularNotificationLevel,
217 // Regular level notifiaction containing info about objects or print. Has Icon.
218 PrintInfoNotificationLevel,
219 // PrintInfoNotificationLevel with shorter time
220 PrintInfoShortNotificationLevel,
221 // Information notification without a fade-out or with a longer fade-out.
222 ImportantNotificationLevel,
223 // Warning, no fade-out.
224 WarningNotificationLevel,
225 // Serious warning, bold reminder
226 SeriousWarningNotificationLevel,
227 // Error, no fade-out. Top most position.
228 ErrorNotificationLevel,
229 };

Constructor & Destructor Documentation

◆ NotificationManager()

Slic3r::GUI::NotificationManager::NotificationManager ( wxEvtHandler * evt_handler)
1880 :
1881 m_evt_handler(evt_handler)
1882{
1883}
wxEvtHandler * m_evt_handler
Definition NotificationManager.hpp:1071

References m_evt_handler.

◆ ~NotificationManager()

Slic3r::GUI::NotificationManager::~NotificationManager ( )
inline
232{}

Member Function Documentation

◆ activate_existing()

bool Slic3r::GUI::NotificationManager::activate_existing ( const NotificationManager::PopNotification * notification)
private
3280{
3281 NotificationType new_type = notification->get_type();
3282 const std::string &new_text = notification->get_data().text1;
3283 for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end(); ++it) {
3284 if ((*it)->get_type() == new_type && !(*it)->is_finished()) {
3285 // multiple of one type allowed, but must have different text
3286 if (std::find(m_multiple_types.begin(), m_multiple_types.end(), new_type) != m_multiple_types.end()) {
3287 // If found same type and same text, return true - update will be performed on the old notif
3288 if ((*it)->compare_text(new_text) == false) {
3289 continue;
3290 }
3291 // multiple of one type allowed, but must have different text nad ObjectID
3292 } else if (new_type == NotificationType::SlicingWarning) {
3293 auto w1 = dynamic_cast<const ObjectIDNotification*>(notification);
3294 auto w2 = dynamic_cast<const ObjectIDNotification*>(it->get());
3295 if (w1 != nullptr && w2 != nullptr) {
3296 const NotificationData& data1 = w1->get_data();
3297 const NotificationData& data2 = w2->get_data();
3298 if (data1.sub_msg_id != data2.sub_msg_id)
3299 continue;
3300 //if (!(*it)->compare_text(new_text) || w1->object_id != w2->object_id) {
3301 // continue;
3302 //}
3303 } else {
3304 continue;
3305 }
3306 }
3307 if (it != m_pop_notifications.end() - 1)
3308 std::rotate(it, it + 1, m_pop_notifications.end());
3309 return true;
3310 }
3311 }
3312 return false;
3313}
Definition NotificationManager.hpp:675
const std::vector< NotificationType > m_multiple_types
Definition NotificationManager.hpp:1088
std::deque< std::unique_ptr< PopNotification > > m_pop_notifications
Definition NotificationManager.hpp:1074
Definition NotificationManager.hpp:439
NotificationType
Definition NotificationManager.hpp:65
@ SlicingWarning
Definition NotificationManager.hpp:102

References Slic3r::GUI::NotificationManager::PopNotification::get_data(), Slic3r::GUI::NotificationManager::PopNotification::get_type(), m_multiple_types, m_pop_notifications, Slic3r::GUI::SlicingWarning, Slic3r::GUI::NotificationManager::NotificationData::sub_msg_id, and Slic3r::GUI::NotificationManager::NotificationData::text1.

Referenced by push_notification_data(), and update_notifications().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_in_preview()

void Slic3r::GUI::NotificationManager::apply_in_preview ( )
inline
bool m_in_preview
Definition NotificationManager.hpp:1081
void set_in_preview(bool preview)
Definition NotificationManager.cpp:3315

References m_in_preview, and set_in_preview().

Referenced by push_plater_warning_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bbl_chose_sole_text_notification()

void Slic3r::GUI::NotificationManager::bbl_chose_sole_text_notification ( NotificationType sType)
3684{
3685 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3686 if (notification->get_type() == sType) { notification->close(); }
3687}

References m_pop_notifications.

◆ bbl_close_3mf_warn_notification()

void Slic3r::GUI::NotificationManager::bbl_close_3mf_warn_notification ( )
3385{
3386 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3387 if (notification->get_type() == NotificationType::BBL3MFInfo) {
3388 notification->close();
3389 }
3390}
@ BBL3MFInfo
Definition NotificationManager.hpp:159

References Slic3r::GUI::BBL3MFInfo, and m_pop_notifications.

Referenced by Slic3r::GUI::Plater::load_project().

Here is the caller graph for this function:

◆ bbl_close_bed_filament_incompatible_notification()

void Slic3r::GUI::NotificationManager::bbl_close_bed_filament_incompatible_notification ( )
3600{
3602}
void close_notification_of_type(const NotificationType type)
Definition NotificationManager.cpp:2231
@ BBLBedFilamentIncompatible
Definition NotificationManager.hpp:182

References Slic3r::GUI::BBLBedFilamentIncompatible, and close_notification_of_type().

Here is the call graph for this function:

◆ bbl_close_filament_map_invalid_notification_after_slice()

void Slic3r::GUI::NotificationManager::bbl_close_filament_map_invalid_notification_after_slice ( const NotificationType type)
3640{
3642}

References close_notification_of_type().

Here is the call graph for this function:

◆ bbl_close_filament_map_invalid_notification_before_slice()

void Slic3r::GUI::NotificationManager::bbl_close_filament_map_invalid_notification_before_slice ( const NotificationType type)
3617{
3619}

References close_notification_of_type().

Here is the call graph for this function:

◆ bbl_close_gcode_overlap_notification()

void Slic3r::GUI::NotificationManager::bbl_close_gcode_overlap_notification ( )
3584{
3585 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3586 if (notification->get_type() == NotificationType::BBLGcodeOverlap) { notification->close(); }
3587}
@ BBLGcodeOverlap
Definition NotificationManager.hpp:167

References Slic3r::GUI::BBLGcodeOverlap, and m_pop_notifications.

◆ bbl_close_need_support_on_notification()

void Slic3r::GUI::NotificationManager::bbl_close_need_support_on_notification ( )
3559{
3560 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3561 if (notification->get_type() == NotificationType::BBLNeedSupportON) { notification->close(); }
3562}
@ BBLNeedSupportON
Definition NotificationManager.hpp:165

References Slic3r::GUI::BBLNeedSupportON, and m_pop_notifications.

◆ bbl_close_objectsinfo_notification()

void Slic3r::GUI::NotificationManager::bbl_close_objectsinfo_notification ( )
3455{
3456 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3457 if (notification->get_type() == NotificationType::BBLObjectInfo) { notification->close(); }
3458}
@ BBLObjectInfo
Definition NotificationManager.hpp:161

References Slic3r::GUI::BBLObjectInfo, and m_pop_notifications.

Referenced by Slic3r::GUI::Plater::show_object_info().

Here is the caller graph for this function:

◆ bbl_close_plateinfo_notification()

void Slic3r::GUI::NotificationManager::bbl_close_plateinfo_notification ( )
3399{
3400 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3401 if (notification->get_type() == NotificationType::BBLPlateInfo) {
3402 notification->close();
3403 }
3404}
@ BBLPlateInfo
Definition NotificationManager.hpp:157

References Slic3r::GUI::BBLPlateInfo, and m_pop_notifications.

Referenced by Slic3r::GUI::Plater::load_project().

Here is the caller graph for this function:

◆ bbl_close_plugin_install_notification()

void Slic3r::GUI::NotificationManager::bbl_close_plugin_install_notification ( )
3508{
3509 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3510 if (notification->get_type() == NotificationType::BBLPluginInstallHint) { notification->close(); }
3511}
@ BBLPluginInstallHint
Definition NotificationManager.hpp:171

References Slic3r::GUI::BBLPluginInstallHint, and m_pop_notifications.

◆ bbl_close_preview_only_notification()

void Slic3r::GUI::NotificationManager::bbl_close_preview_only_notification ( )
3414{
3415 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3416 if (notification->get_type() == NotificationType::BBLPreviewOnlyMode) {
3417 notification->close();
3418 }
3419}
@ BBLPreviewOnlyMode
Definition NotificationManager.hpp:176

References Slic3r::GUI::BBLPreviewOnlyMode, and m_pop_notifications.

Referenced by Slic3r::GUI::Plater::load_project().

Here is the caller graph for this function:

◆ bbl_close_seqprintinfo_notification()

void Slic3r::GUI::NotificationManager::bbl_close_seqprintinfo_notification ( )
3478{
3479 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
3480 if (notification->get_type() == NotificationType::BBLSeqPrintInfo) { notification->close(); }
3481}
@ BBLSeqPrintInfo
Definition NotificationManager.hpp:169

References Slic3r::GUI::BBLSeqPrintInfo, and m_pop_notifications.

Referenced by Slic3r::GUI::Plater::config_change_notification().

Here is the caller graph for this function:

◆ bbl_show_3mf_warn_notification()

void Slic3r::GUI::NotificationManager::bbl_show_3mf_warn_notification ( const std::string & text,
NotificationLevel level = NotificationLevel::ErrorNotificationLevel )
3393{
3395 push_notification_data(data, 0);
3396}
#define BBL_NOTICE_MAX_INTERVAL
Definition NotificationManager.hpp:55
bool push_notification_data(const NotificationData &notification_data, int timestamp)
Definition NotificationManager.cpp:3097

References Slic3r::GUI::BBL3MFInfo, BBL_NOTICE_MAX_INTERVAL, and push_notification_data().

Referenced by Slic3r::GUI::Plater::priv::load_files().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bbl_show_app_newversion_notification()

void Slic3r::GUI::NotificationManager::bbl_show_app_newversion_notification ( )
3536{
3538}
void push_notification(const NotificationType type, int timestamp=0)
Definition NotificationManager.cpp:1892
@ NewAppAvailable
Definition NotificationManager.hpp:81

References Slic3r::GUI::NewAppAvailable, and push_notification().

Here is the call graph for this function:

◆ bbl_show_bed_filament_incompatible_notification()

void Slic3r::GUI::NotificationManager::bbl_show_bed_filament_incompatible_notification ( const std::string & text)
3590{
3591 auto callback = [](wxEvtHandler*) {
3592 const wxString bed_filament_compatibility_wiki = "https://wiki.bambulab.com/en/general/filament-guide-material-table";
3593 wxGetApp().open_browser_with_warning_dialog(bed_filament_compatibility_wiki);
3594 return false;
3595 };
3597}
@ ErrorNotificationLevel
Definition NotificationManager.hpp:228
#define _u8L(s)
Definition I18N.hpp:11

References _u8L, Slic3r::GUI::BBLBedFilamentIncompatible, ErrorNotificationLevel, and push_notification_data().

Here is the call graph for this function:

◆ bbl_show_filament_map_invalid_notification_after_slice()

void Slic3r::GUI::NotificationManager::bbl_show_filament_map_invalid_notification_after_slice ( const NotificationType type,
const std::string & text )
3622{
3623 auto callback = [](wxEvtHandler*) {
3624 auto plater = wxGetApp().plater();
3625 wxCommandEvent evt(EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG);
3626 evt.SetEventObject(plater);
3627 auto canvas_type = plater->canvas3D()->get_canvas_type();
3628 if (canvas_type == GLCanvas3D::ECanvasType::CanvasPreview)
3629 evt.SetInt(1); // 1 means from gcode viewer, should do slice right now
3630 else
3631 evt.SetInt(0);
3632 wxPostEvent(plater, evt);
3633 return false;
3634 };
3635
3636 push_notification_data({ type,NotificationLevel::ErrorNotificationLevel,0,_u8L("Error:") + "\n" + text,_u8L("Click here to regroup"),callback }, 0);
3637}
ECanvasType get_canvas_type()
Definition GLCanvas3D.hpp:953
@ CanvasPreview
Definition GLCanvas3D.hpp:627
GLCanvas3D * canvas3D()
Definition Plater.cpp:22070
static Plater * plater()
Definition GUI_Factories.cpp:400

References _u8L, Slic3r::GUI::GLCanvas3D::CanvasPreview, ErrorNotificationLevel, Slic3r::GUI::plater(), and push_notification_data().

Here is the call graph for this function:

◆ bbl_show_filament_map_invalid_notification_before_slice()

void Slic3r::GUI::NotificationManager::bbl_show_filament_map_invalid_notification_before_slice ( const NotificationType type,
const std::string & text )
3605{
3606 auto callback = [](wxEvtHandler*) {
3607 auto plater = wxGetApp().plater();
3608 auto partplate = plater->get_partplate_list().get_curr_plate();
3609 try_pop_up_before_slice(false, plater, partplate, true); // ignore the return value
3610 return false;
3611 };
3612
3613 push_notification_data({ type,NotificationLevel::ErrorNotificationLevel,0,_u8L("Error:") + "\n" + text,_u8L("Click here to regroup"),callback }, 0);
3614}
PartPlate * get_curr_plate()
Definition PartPlate.hpp:962
PartPlateList & get_partplate_list()
Definition Plater.cpp:22578
bool try_pop_up_before_slice(bool is_slice_all, Plater *plater_ref, PartPlate *partplate_ref, bool force_pop_up)
Try to pop up the filament map dialog before slicing.
Definition FilamentMapDialog.cpp:127

References _u8L, ErrorNotificationLevel, Slic3r::GUI::plater(), push_notification_data(), and Slic3r::GUI::try_pop_up_before_slice().

Here is the call graph for this function:

◆ bbl_show_gcode_overlap_notification()

void Slic3r::GUI::NotificationManager::bbl_show_gcode_overlap_notification ( )
3566{
3568 _u8L("Warning:") + "\n" + _u8L("G-code path overlap")};
3569
3570 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3571 if (notification->get_type() == NotificationType::BBLGcodeOverlap) {
3572 notification->reinit();
3573 notification->update(data);
3574 return;
3575 }
3576 }
3577
3578 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3579 push_notification_data(std::move(notification), 0);
3580}
@ WarningNotificationLevel
Definition NotificationManager.hpp:224
NotificationIDProvider m_id_provider
Definition NotificationManager.hpp:1073

References _u8L, Slic3r::GUI::BBLGcodeOverlap, m_evt_handler, m_id_provider, m_pop_notifications, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ bbl_show_need_support_on_notification()

void Slic3r::GUI::NotificationManager::bbl_show_need_support_on_notification ( )
3541{
3543 _u8L("Warning:") + "\n" + _u8L("Your model needs support! Please enable support material.")};
3544
3545 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3546 if (notification->get_type() == NotificationType::BBLNeedSupportON) {
3547 notification->reinit();
3548 notification->update(data);
3549 return;
3550 }
3551 }
3552
3553 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3554 push_notification_data(std::move(notification), 0);
3555}

References _u8L, Slic3r::GUI::BBLNeedSupportON, m_evt_handler, m_id_provider, m_pop_notifications, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ bbl_show_objectsinfo_notification()

void Slic3r::GUI::NotificationManager::bbl_show_objectsinfo_notification ( const std::string & text,
bool is_warning,
bool is_hidden )
3422{
3423 std::string hyper_text;
3424 auto callback = std::function<bool(wxEvtHandler *)>();
3425 if (is_warning) {
3426 callback =[](wxEvtHandler *) {
3427 wxCommandEvent *evt = new wxCommandEvent(EVT_REPAIR_MODEL);
3428 wxQueueEvent(wxGetApp().plater(), evt);
3429 return false;
3430 };
3431 hyper_text = _u8L(" (Repair)");
3432 }
3434 if (is_warning)
3435 data.use_warn_color = true;
3436
3437 for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
3438 std::unique_ptr<PopNotification>& notification = *it;
3439 if (notification->get_type() == NotificationType::BBLObjectInfo) {
3440 it = m_pop_notifications.erase(it);
3441 break;
3442 }
3443 else
3444 ++it;
3445 }
3446
3447 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3448 notification->set_Multiline(true);
3449 if (is_hidden)
3450 notification->hide(true);
3451 push_notification_data(std::move(notification), 0);
3452}
@ PrintInfoNotificationLevel
Definition NotificationManager.hpp:218
bool use_warn_color
Definition NotificationManager.hpp:453

References _u8L, BBL_NOTICE_MAX_INTERVAL, Slic3r::GUI::BBLObjectInfo, m_evt_handler, m_id_provider, m_pop_notifications, Slic3r::GUI::plater(), PrintInfoNotificationLevel, push_notification_data(), and Slic3r::GUI::NotificationManager::NotificationData::use_warn_color.

Referenced by Slic3r::GUI::Plater::show_object_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bbl_show_plateinfo_notification()

void Slic3r::GUI::NotificationManager::bbl_show_plateinfo_notification ( const std::string & text)

References BBL_NOTICE_MAX_INTERVAL, Slic3r::GUI::BBLPlateInfo, PrintInfoNotificationLevel, and push_notification_data().

Here is the call graph for this function:

◆ bbl_show_plugin_install_notification()

void Slic3r::GUI::NotificationManager::bbl_show_plugin_install_notification ( const std::string & text)
3484{
3485 std::string hyper_text;
3486 auto callback = [](wxEvtHandler *) {
3487 wxCommandEvent *evt = new wxCommandEvent(EVT_INSTALL_PLUGIN_NETWORKING);
3488 wxQueueEvent(wxGetApp().plater(), evt);
3489 return false;
3490 };
3491 hyper_text = _u8L(" Click here to install it.");
3493
3494 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3495 if (notification->get_type() == NotificationType::BBLPluginInstallHint) {
3496 notification->reinit();
3497 notification->update(data);
3498 return;
3499 }
3500 }
3501
3502 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3503 notification->set_Multiline(true);
3504 push_notification_data(std::move(notification), 0);
3505}

References _u8L, Slic3r::GUI::BBLPluginInstallHint, m_evt_handler, m_id_provider, m_pop_notifications, Slic3r::GUI::plater(), push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ bbl_show_preview_only_notification()

void Slic3r::GUI::NotificationManager::bbl_show_preview_only_notification ( const std::string & text)

References Slic3r::GUI::BBLPreviewOnlyMode, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ bbl_show_seqprintinfo_notification()

void Slic3r::GUI::NotificationManager::bbl_show_seqprintinfo_notification ( const std::string & text)
3461{
3463
3464 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3465 if (notification->get_type() == NotificationType::BBLSeqPrintInfo) {
3466 notification->reinit();
3467 notification->update(data);
3468 return;
3469 }
3470 }
3471
3472 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3473 notification->set_Multiline(true);
3474 push_notification_data(std::move(notification), 0);
3475}

References BBL_NOTICE_MAX_INTERVAL, Slic3r::GUI::BBLSeqPrintInfo, m_evt_handler, m_id_provider, m_pop_notifications, PrintInfoNotificationLevel, and push_notification_data().

Referenced by Slic3r::GUI::Plater::config_change_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bbl_show_slice_emptylayer_notification()

void Slic3r::GUI::NotificationManager::bbl_show_slice_emptylayer_notification ( const std::string & text,
bool bOverride = true )
3514{
3516
3517 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3518 if (notification->get_type() == NotificationType::BBLSliceEmptyLayer) {
3519 if (bOverride)
3520 notification->update(data);
3521 else {
3523 notification->update(sdata);
3524 }
3525
3526 return;
3527 }
3528 }
3529
3530 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3531 notification->set_Multiline(true);
3532 push_notification_data(std::move(notification), 0);
3533}
@ BBLSliceEmptyLayer
Definition NotificationManager.hpp:163

References _u8L, Slic3r::GUI::BBLSliceEmptyLayer, m_evt_handler, m_id_provider, m_pop_notifications, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ bbl_show_sole_text_notification()

void Slic3r::GUI::NotificationManager::bbl_show_sole_text_notification ( NotificationType sType,
const std::string & text,
bool bOverride,
int level,
bool autohide )
3644 {
3645
3646 NotificationLevel nlevel;
3647 int nHideTime = 20;
3648 switch ( level) {
3649 case 1:
3651 nHideTime = 0;
3652 break;
3653 case 2:
3655 nHideTime = 0;
3656 case 0:
3657 default:
3659
3660 if (autohide == false) nHideTime = BBL_NOTICE_MAX_INTERVAL;
3661 break;
3662 }
3663
3664 NotificationData data{sType, nlevel, nHideTime, text};
3665 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3666 if (notification->get_type() == sType) {
3667 if (bOverride) {
3668 notification->update(data);
3669 }
3670 else {
3671 NotificationData sdata{sType, nlevel, nHideTime, notification->get_text1() + "\n" + text};
3672 notification->update(sdata);
3673 }
3674
3675 return;
3676 }
3677 }
3678
3679 auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
3680 notification->set_Multiline(true);
3681 push_notification_data(std::move(notification), 0);
3682}
NotificationLevel
Definition NotificationManager.hpp:208

References BBL_NOTICE_MAX_INTERVAL, ErrorNotificationLevel, m_evt_handler, m_id_provider, m_pop_notifications, PrintInfoNotificationLevel, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ clear_all()

void Slic3r::GUI::NotificationManager::clear_all ( )
2264{
2265 for (size_t i = 0; i < size_t(NotificationType::NotificationTypeCount); i++) {
2267 }
2268}
void remove_notification_of_type(const NotificationType type)
Definition NotificationManager.cpp:2252
@ NotificationTypeCount
Definition NotificationManager.hpp:200

References Slic3r::GUI::NotificationTypeCount, and remove_notification_of_type().

Referenced by Slic3r::GUI::Plater::new_project().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close_and_delete_self()

void Slic3r::GUI::NotificationManager::close_and_delete_self ( PopNotification * self)
private
2241{
2242 for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
2243 std::unique_ptr<PopNotification> &notification = *it;
2244 if (notification.get() == self) {
2245 m_pop_notifications.erase(it);
2246 break;
2247 }else
2248 ++it;
2249 }
2250}

References m_pop_notifications.

Referenced by render_notifications().

Here is the caller graph for this function:

◆ close_flushing_volume_error_notification()

void Slic3r::GUI::NotificationManager::close_flushing_volume_error_notification ( NotificationType type,
NotificationLevel level )
2176{
2177 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2178 if (notification->get_type() == type && notification->get_data().level == level) { notification->close(); }
2179 }
2180}

References m_pop_notifications.

◆ close_general_error_notification()

void Slic3r::GUI::NotificationManager::close_general_error_notification ( const std::string & text)
2115{
2116 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2117 if (notification->get_type() == NotificationType::BBLGeneralError && notification->compare_text(_u8L("Error:") + "\n" + text)) {
2118 notification->close();
2119 }
2120 }
2121}
@ BBLGeneralError
Definition NotificationManager.hpp:104

References _u8L, Slic3r::GUI::BBLGeneralError, and m_pop_notifications.

◆ close_notification_of_type()

void Slic3r::GUI::NotificationManager::close_notification_of_type ( const NotificationType type)
2232{
2233 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2234 if (notification->get_type() == type) {
2235 notification->close();
2236 }
2237 }
2238}

References m_pop_notifications.

Referenced by bbl_close_bed_filament_incompatible_notification(), bbl_close_filament_map_invalid_notification_after_slice(), bbl_close_filament_map_invalid_notification_before_slice(), Slic3r::GUI::Plater::load_project(), new_export_began(), push_exporting_finished_notification(), push_import_finished_notification(), push_orca_sync_conflict_notification(), and push_shared_profiles_notification().

Here is the caller graph for this function:

◆ close_plater_error_notification()

void Slic3r::GUI::NotificationManager::close_plater_error_notification ( const std::string & text)
2101{
2102 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2103 if (notification->get_type() == NotificationType::PlaterError) {
2104 notification->close();
2105 }
2106 }
2107}
@ PlaterError
Definition NotificationManager.hpp:106

References m_pop_notifications, and Slic3r::GUI::PlaterError.

◆ close_plater_warning_notification()

void Slic3r::GUI::NotificationManager::close_plater_warning_notification ( const std::string & text)
2160{
2161 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2162 if (notification->get_type() == NotificationType::PlaterWarning && notification->compare_text(_u8L("Warning:") + "\n" + text)) {
2163 dynamic_cast<PlaterWarningNotification*>(notification.get())->real_close();
2164 }
2165 }
2166}
void real_close()
Definition NotificationManager.hpp:689
@ PlaterWarning
Definition NotificationManager.hpp:110

References _u8L, m_pop_notifications, Slic3r::GUI::PlaterWarning, and Slic3r::GUI::NotificationManager::PlaterWarningNotification::real_close().

Here is the call graph for this function:

◆ close_slicing_customize_error_notification()

void Slic3r::GUI::NotificationManager::close_slicing_customize_error_notification ( NotificationType type,
NotificationLevel level )
2131{
2132 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2133 if (notification->get_type() == type && notification->get_data().level == level) {
2134 notification->close();
2135 }
2136 }
2137}

References m_pop_notifications.

◆ close_slicing_error_notification()

void Slic3r::GUI::NotificationManager::close_slicing_error_notification ( const std::string & text)
2217{
2218 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2219 if (notification->get_type() == NotificationType::SlicingError && notification->compare_text(_u8L("Error:") + "\n" + text)) {
2220 notification->close();
2221 }
2222 }
2223}
@ SlicingError
Definition NotificationManager.hpp:97

References _u8L, m_pop_notifications, and Slic3r::GUI::SlicingError.

◆ close_slicing_errors_and_warnings()

void Slic3r::GUI::NotificationManager::close_slicing_errors_and_warnings ( )
2209{
2210 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2211 if (notification->get_type() == NotificationType::SlicingError || notification->get_type() == NotificationType::SlicingWarning) {
2212 notification->close();
2213 }
2214 }
2215}

References m_pop_notifications, Slic3r::GUI::SlicingError, and Slic3r::GUI::SlicingWarning.

◆ close_slicing_serious_warning_notification()

void Slic3r::GUI::NotificationManager::close_slicing_serious_warning_notification ( const std::string & text)
2842{
2843 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2844 if (notification->get_type() == NotificationType::SlicingSeriousWarning && notification->compare_text(_u8L("Serious warning:") + "\n" + text)) { notification->close(); }
2845 }
2846}
@ SlicingSeriousWarning
Definition NotificationManager.hpp:99

References _u8L, m_pop_notifications, and Slic3r::GUI::SlicingSeriousWarning.

◆ deactivate_loaded_hints()

void Slic3r::GUI::NotificationManager::deactivate_loaded_hints ( )
3078{
3079 ;
3080}

◆ device_ejected()

void Slic3r::GUI::NotificationManager::device_ejected ( )
3362{
3363 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3364 if (notification->get_type() == NotificationType::ExportFinished && dynamic_cast<ExportFinishedNotification*>(notification.get())->m_to_removable)
3365 notification->close();
3366 }
3367}
bool m_to_removable
Definition NotificationManager.hpp:873
@ ExportFinished
Definition NotificationManager.hpp:73

References Slic3r::GUI::ExportFinished, m_pop_notifications, and Slic3r::GUI::NotificationManager::ExportFinishedNotification::m_to_removable.

◆ get_notification_count()

size_t Slic3r::GUI::NotificationManager::get_notification_count ( ) const
3369{
3370 size_t ret = 0;
3371 for (const std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3372 if (notification->get_state() != PopNotification::EState::Hidden)
3373 ret++;
3374 }
3375 return ret;
3376}
@ Hidden
Definition NotificationManager.hpp:478

References Slic3r::GUI::NotificationManager::PopNotification::Hidden, and m_pop_notifications.

◆ get_standard_duration()

size_t Slic3r::GUI::NotificationManager::get_standard_duration ( NotificationLevel level)
inlineprivate
1047 {
1048 switch (level) {
1049
1058 default: return 10;
1059 }
1060 }
@ PrintInfoShortNotificationLevel
Definition NotificationManager.hpp:220
@ ProgressBarNotificationLevel
Definition NotificationManager.hpp:212
@ HintNotificationLevel
Definition NotificationManager.hpp:214
@ ImportantNotificationLevel
Definition NotificationManager.hpp:222
@ RegularNotificationLevel
Definition NotificationManager.hpp:216

References ErrorNotificationLevel, HintNotificationLevel, ImportantNotificationLevel, PrintInfoNotificationLevel, PrintInfoShortNotificationLevel, ProgressBarNotificationLevel, RegularNotificationLevel, and WarningNotificationLevel.

Referenced by push_notification().

Here is the caller graph for this function:

◆ has_slicing_error_notification()

bool Slic3r::GUI::NotificationManager::has_slicing_error_notification ( )
private
3337{
3338 return std::any_of(m_pop_notifications.begin(), m_pop_notifications.end(), [](auto &n) {
3339 return n->get_type() == NotificationType::SlicingError;
3340 });
3341}

References m_pop_notifications.

◆ init()

◆ init_progress_indicator()

void Slic3r::GUI::NotificationManager::init_progress_indicator ( )
2980{
2981 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2982 if (notification->get_type() == NotificationType::ProgressIndicator) {
2983 return;
2984 }
2985 }
2987 auto notification = std::make_unique<NotificationManager::ProgressIndicatorNotification>(data, m_id_provider, m_evt_handler);
2988 push_notification_data(std::move(notification), 0);
2989}
@ ProgressIndicator
Definition NotificationManager.hpp:142

References m_evt_handler, m_id_provider, m_pop_notifications, ProgressBarNotificationLevel, Slic3r::GUI::ProgressIndicator, and push_notification_data().

Referenced by progress_indicator_set_cancel_callback(), progress_indicator_set_progress(), progress_indicator_set_range(), and progress_indicator_set_status_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_slicing_progress_notification()

void Slic3r::GUI::NotificationManager::init_slicing_progress_notification ( std::function< bool()> cancel_callback)
2849{
2850 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2851 if (notification->get_type() == NotificationType::SlicingProgress) {
2852 dynamic_cast<SlicingProgressNotification*>(notification.get())->set_cancel_callback(cancel_callback);
2853 return;
2854 }
2855 }
2857 [](wxEvtHandler* evnthndlr) {
2858 if (evnthndlr != nullptr)
2859 wxPostEvent(evnthndlr, ExportGcodeNotificationClickedEvent(EVT_EXPORT_GCODE_NOTIFICAION_CLICKED));
2860 return true;
2861 }
2862 };
2863 push_notification_data(std::make_unique<NotificationManager::SlicingProgressNotification>(data, m_id_provider, m_evt_handler, cancel_callback), 0);
2864}
Definition SlicingProgressNotification.hpp:16
void set_cancel_callback(std::function< bool()> callback)
Definition SlicingProgressNotification.hpp:41
SimpleEvent ExportGcodeNotificationClickedEvent
Definition NotificationManager.hpp:39
@ SlicingProgress
Definition NotificationManager.hpp:118

References m_evt_handler, m_id_provider, m_pop_notifications, ProgressBarNotificationLevel, push_notification_data(), Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_cancel_callback(), and Slic3r::GUI::SlicingProgress.

Here is the call graph for this function:

◆ is_hint_notification_open()

bool Slic3r::GUI::NotificationManager::is_hint_notification_open ( )
3070{
3071 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3072 if (notification->get_type() == NotificationType::DidYouKnowHint)
3073 return true;
3074 }
3075 return false;
3076}
@ DidYouKnowHint
Definition NotificationManager.hpp:137

References Slic3r::GUI::DidYouKnowHint, and m_pop_notifications.

◆ new_export_began()

void Slic3r::GUI::NotificationManager::new_export_began ( bool on_removable)
3344{
3346 // If we want to hold information of ejecting removable on later export finished notifications
3347 /*
3348 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3349 if (notification->get_type() == NotificationType::ExportToRemovableFinished) {
3350 if (!on_removable) {
3351 const NotificationData old_data = notification->get_data();
3352 notification->update( {old_data.type, old_data.level ,old_data.duration, std::string(), old_data.hypertext} );
3353 } else {
3354 notification->close();
3355 }
3356 return;
3357 }
3358 }
3359 */
3360}

References close_notification_of_type(), and Slic3r::GUI::ExportFinished.

Here is the call graph for this function:

◆ on_change_color_mode()

void Slic3r::GUI::NotificationManager::on_change_color_mode ( bool is_dark)
1885 {
1887 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications){
1888 notification->on_change_color_mode(is_dark);
1889 }
1890}
static bool is_dark()
Definition TextureImportDialog.cpp:85
bool m_is_dark
Definition NotificationManager.hpp:1062

References is_dark(), m_is_dark, and m_pop_notifications.

Here is the call graph for this function:

◆ progress_indicator_get_range()

int Slic3r::GUI::NotificationManager::progress_indicator_get_range ( ) const
3034{
3035 for (const std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3036 if (notification->get_type() == NotificationType::ProgressIndicator) {
3037 return dynamic_cast<ProgressIndicatorNotification*>(notification.get())->get_range();
3038 }
3039 }
3040 return 0;
3041}
int get_range() const
Definition NotificationManager.hpp:842

References Slic3r::GUI::NotificationManager::ProgressIndicatorNotification::get_range(), m_pop_notifications, and Slic3r::GUI::ProgressIndicator.

Here is the call graph for this function:

◆ progress_indicator_set_cancel_callback()

void Slic3r::GUI::NotificationManager::progress_indicator_set_cancel_callback ( CancelFn callback = CancelFn())
3002{
3003 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3004 if (notification->get_type() == NotificationType::ProgressIndicator) {
3005 dynamic_cast<ProgressIndicatorNotification*>(notification.get())->set_cancel_callback(callback);
3006 return;
3007 }
3008 }
3010}
void set_cancel_callback(CancelFn callback)
Definition NotificationManager.hpp:839
void init_progress_indicator()
Definition NotificationManager.cpp:2979

References init_progress_indicator(), m_pop_notifications, Slic3r::GUI::ProgressIndicator, and Slic3r::GUI::NotificationManager::ProgressIndicatorNotification::set_cancel_callback().

Here is the call graph for this function:

◆ progress_indicator_set_progress()

void Slic3r::GUI::NotificationManager::progress_indicator_set_progress ( int pr)
3012{
3013 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3014 if (notification->get_type() == NotificationType::ProgressIndicator) {
3015 dynamic_cast<ProgressIndicatorNotification*>(notification.get())->set_progress(pr);
3016 // Ask for rendering - needs to be done on every progress. Calls to here doesnt trigger IDLE event or rendering.
3017 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(100);
3018 return;
3019 }
3020 }
3022}
void set_progress(int pr)
Definition NotificationManager.hpp:840

References init_progress_indicator(), m_pop_notifications, Slic3r::GUI::ProgressIndicator, and Slic3r::GUI::NotificationManager::ProgressIndicatorNotification::set_progress().

Here is the call graph for this function:

◆ progress_indicator_set_range()

void Slic3r::GUI::NotificationManager::progress_indicator_set_range ( int range)
2992{
2993 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2994 if (notification->get_type() == NotificationType::ProgressIndicator) {
2995 dynamic_cast<ProgressIndicatorNotification*>(notification.get())->set_range(range);
2996 return;
2997 }
2998 }
3000}
void set_range(int range)
Definition NotificationManager.hpp:838
auto range(Cont &&cont)
Definition libslic3r.h:405

References init_progress_indicator(), m_pop_notifications, Slic3r::GUI::ProgressIndicator, Slic3r::range(), and Slic3r::GUI::NotificationManager::ProgressIndicatorNotification::set_range().

Here is the call graph for this function:

◆ progress_indicator_set_status_text()

void Slic3r::GUI::NotificationManager::progress_indicator_set_status_text ( const char * text)
3024{
3025 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3026 if (notification->get_type() == NotificationType::ProgressIndicator) {
3027 dynamic_cast<ProgressIndicatorNotification*>(notification.get())->set_status_text(text);
3028 return;
3029 }
3030 }
3032}
void set_status_text(const char *)
Definition NotificationManager.cpp:1761

References init_progress_indicator(), m_pop_notifications, Slic3r::GUI::ProgressIndicator, and Slic3r::GUI::NotificationManager::ProgressIndicatorNotification::set_status_text().

Here is the call graph for this function:

◆ push_delayed_notification()

void Slic3r::GUI::NotificationManager::push_delayed_notification ( const NotificationType type,
std::function< bool(void)> condition_callback,
int64_t initial_delay,
int64_t delay_interval )
1917{
1918 auto it = std::find_if(std::begin(basic_notifications), std::end(basic_notifications),
1919 boost::bind(&NotificationData::type, boost::placeholders::_1) == type);
1920 assert(it != std::end(basic_notifications));
1921 if (it != std::end(basic_notifications))
1922 push_delayed_notification_data(std::make_unique<PopNotification>(*it, m_id_provider, m_evt_handler), condition_callback, initial_delay, delay_interval);
1923}
NotificationType type
Definition NotificationManager.hpp:440
void push_delayed_notification_data(std::unique_ptr< NotificationManager::PopNotification > notification, std::function< bool(void)> condition_callback, int64_t initial_delay, int64_t delay_interval)
Definition NotificationManager.cpp:3140
const std::vector< NotificationData > basic_notifications
Definition NotificationManager.hpp:1101

References basic_notifications, m_evt_handler, m_id_provider, push_delayed_notification_data(), and Slic3r::GUI::NotificationManager::NotificationData::type.

Here is the call graph for this function:

◆ push_delayed_notification_data()

void Slic3r::GUI::NotificationManager::push_delayed_notification_data ( std::unique_ptr< NotificationManager::PopNotification > notification,
std::function< bool(void)> condition_callback,
int64_t initial_delay,
int64_t delay_interval )
private
3144{
3145 if (initial_delay == 0 && condition_callback()) {
3146 if( push_notification_data(std::move(notification), 0))
3147 return;
3148 }
3149 m_waiting_notifications.emplace_back(std::move(notification), condition_callback, initial_delay == 0 ? delay_interval : initial_delay, delay_interval);
3150 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(initial_delay == 0 ? delay_interval : initial_delay);
3151}
std::vector< DelayedNotification > m_waiting_notifications
Definition NotificationManager.hpp:1077

References m_waiting_notifications, and push_notification_data().

Referenced by push_delayed_notification(), and push_hint_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_download_URL_progress_notification()

void Slic3r::GUI::NotificationManager::push_download_URL_progress_notification ( size_t id,
const std::string & text,
std::function< bool(DownloaderUserAction, int)> user_action_callback )
2579{
2580 // If already exists
2581 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2582 if (notification->get_type() == NotificationType::URLDownload && dynamic_cast<URLDownloadNotification*>(notification.get())->get_download_id() == id) {
2583 return;
2584 }
2585 }
2586 // push new one
2588 push_notification_data(std::make_unique<NotificationManager::URLDownloadNotification>(data, m_id_provider, m_evt_handler, id, user_action_callback), 0);
2589}
Definition NotificationManager.hpp:724
size_t get_download_id()
Definition NotificationManager.hpp:742
@ URLDownload
Definition NotificationManager.hpp:153

References _u8L, Slic3r::GUI::NotificationManager::URLDownloadNotification::get_download_id(), m_evt_handler, m_id_provider, m_pop_notifications, ProgressBarNotificationLevel, push_notification_data(), and Slic3r::GUI::URLDownload.

Referenced by Slic3r::GUI::Downloader::start_download().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_exporting_finished_notification()

void Slic3r::GUI::NotificationManager::push_exporting_finished_notification ( const std::string & path,
const std::string & dir_path,
bool on_removable )
2308{
2310 NotificationData data{ NotificationType::ExportFinished, NotificationLevel::RegularNotificationLevel, on_removable ? 0 : 20, _u8L("Exported successfully") + "\n" + path };
2311 push_notification_data(std::make_unique<NotificationManager::ExportFinishedNotification>(data, m_id_provider, m_evt_handler, on_removable, path, dir_path), 0);
2313}
void set_slicing_progress_hidden()
Definition NotificationManager.cpp:2929

References _u8L, close_notification_of_type(), Slic3r::GUI::ExportFinished, m_evt_handler, m_id_provider, push_notification_data(), RegularNotificationLevel, and set_slicing_progress_hidden().

Here is the call graph for this function:

◆ push_flushing_volume_error_notification()

void Slic3r::GUI::NotificationManager::push_flushing_volume_error_notification ( NotificationType type,
NotificationLevel level,
const std::string & text,
const std::string & hypertext = "",
std::function< bool(wxEvtHandler *)> callback = std::function<bool(wxEvtHandler *)>() )
2169{
2171 std::string prefix_msg = level == NotificationLevel::WarningNotificationLevel ? _u8L("Warning:") : _u8L("Error:");
2172 push_notification_data({type, level, 0, prefix_msg + "\n" + text, hypertext, callback}, 0);
2173}
void set_all_slicing_errors_gray(bool g)
Definition NotificationManager.cpp:2182

References _u8L, push_notification_data(), set_all_slicing_errors_gray(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ push_general_error_notification()

void Slic3r::GUI::NotificationManager::push_general_error_notification ( const std::string & text)

References _u8L, Slic3r::GUI::BBLGeneralError, ErrorNotificationLevel, and push_notification_data().

Referenced by Slic3r::GUI::Plater::export_stl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_hint_notification()

void Slic3r::GUI::NotificationManager::push_hint_notification ( bool open_next)
3044{
3045 return;
3046 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3047 if (notification->get_type() == NotificationType::DidYouKnowHint) {
3048 (dynamic_cast<HintNotification*>(notification.get()))->open_next();
3049 return;
3050 }
3051 }
3052
3054 // from user - open now
3055 if (!open_next) {
3056 push_notification_data(std::make_unique<NotificationManager::HintNotification>(data, m_id_provider, m_evt_handler, open_next), 0);
3058 // at startup - delay for half a second to let other notification pop up, than try every 30 seconds
3059 // show only if no notifications are shown
3060 }
3061 else {
3062 auto condition = [&self = std::as_const(*this)]() {
3063 return self.get_notification_count() == 0;
3064 };
3065 push_delayed_notification_data(std::make_unique<NotificationManager::HintNotification>(data, m_id_provider, m_evt_handler, open_next), condition, 500, 30000);
3066 }
3067}
Definition HintNotification.hpp:91
void stop_delayed_notifications_of_type(const NotificationType type)
Definition NotificationManager.cpp:3153

References Slic3r::GUI::DidYouKnowHint, HintNotificationLevel, m_evt_handler, m_id_provider, m_pop_notifications, push_delayed_notification_data(), push_notification_data(), and stop_delayed_notifications_of_type().

Here is the call graph for this function:

◆ push_import_finished_notification()

void Slic3r::GUI::NotificationManager::push_import_finished_notification ( const std::string & path,
const std::string & dir_path,
bool on_removable )
2316{
2318 NotificationData data{ NotificationType::ExportFinished, NotificationLevel::RegularNotificationLevel, on_removable ? 0 : 20, _u8L("Model file downloaded.") + "\n" + path };
2319 push_notification_data(std::make_unique<NotificationManager::ExportFinishedNotification>(data, m_id_provider, m_evt_handler, on_removable, path, dir_path), 0);
2321}

References _u8L, close_notification_of_type(), Slic3r::GUI::ExportFinished, m_evt_handler, m_id_provider, push_notification_data(), RegularNotificationLevel, and set_slicing_progress_hidden().

Here is the call graph for this function:

◆ push_notification() [1/3]

void Slic3r::GUI::NotificationManager::push_notification ( const NotificationType type,
int timestamp = 0 )
1893{
1894 auto it = std::find_if(std::begin(basic_notifications), std::end(basic_notifications),
1895 boost::bind(&NotificationData::type, boost::placeholders::_1) == type);
1896 assert(it != std::end(basic_notifications));
1897 if (it != std::end(basic_notifications))
1898 push_notification_data(*it, timestamp);
1899}

References basic_notifications, push_notification_data(), and Slic3r::GUI::NotificationManager::NotificationData::type.

Referenced by Slic3r::GUI::Plater::_calib_pa_pattern(), bbl_show_app_newversion_notification(), Slic3r::PluginManager::fetch_plugins_from_cloud(), Slic3r::GUI::Plater::load_gcode(), Slic3r::GUI::Plater::notify_painting_removed(), and Slic3r::GUI::Downloader::start_download().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_notification() [2/3]

void Slic3r::GUI::NotificationManager::push_notification ( const std::string & text,
int timestamp = 0 )
1901{
1903}
@ CustomNotification
Definition NotificationManager.hpp:66

References Slic3r::GUI::CustomNotification, push_notification_data(), and RegularNotificationLevel.

Here is the call graph for this function:

◆ push_notification() [3/3]

void Slic3r::GUI::NotificationManager::push_notification ( NotificationType type,
NotificationLevel level,
const std::string & text,
const std::string & hypertext = "",
std::function< bool(wxEvtHandler *)> callback = std::function<bool(wxEvtHandler*)>(),
int timestamp = 0 )
1911{
1912 int duration = get_standard_duration(level);
1913 push_notification_data({ type, level, duration, text, hypertext, callback }, timestamp);
1914}
size_t get_standard_duration(NotificationLevel level)
Definition NotificationManager.hpp:1046

References get_standard_duration(), and push_notification_data().

Here is the call graph for this function:

◆ push_notification_data() [1/2]

bool Slic3r::GUI::NotificationManager::push_notification_data ( const NotificationData & notification_data,
int timestamp )
private
3098{
3099 return push_notification_data(std::make_unique<PopNotification>(notification_data, m_id_provider, m_evt_handler), timestamp);
3100}

References m_evt_handler, m_id_provider, and push_notification_data().

Referenced by bbl_show_3mf_warn_notification(), bbl_show_bed_filament_incompatible_notification(), bbl_show_filament_map_invalid_notification_after_slice(), bbl_show_filament_map_invalid_notification_before_slice(), bbl_show_gcode_overlap_notification(), bbl_show_need_support_on_notification(), bbl_show_objectsinfo_notification(), bbl_show_plateinfo_notification(), bbl_show_plugin_install_notification(), bbl_show_preview_only_notification(), bbl_show_seqprintinfo_notification(), bbl_show_slice_emptylayer_notification(), bbl_show_sole_text_notification(), init_progress_indicator(), init_slicing_progress_notification(), push_delayed_notification_data(), push_download_URL_progress_notification(), push_exporting_finished_notification(), push_flushing_volume_error_notification(), push_general_error_notification(), push_hint_notification(), push_import_finished_notification(), push_notification(), push_notification(), push_notification(), push_notification_data(), push_orca_sync_conflict_notification(), push_plater_error_notification(), push_plater_warning_notification(), push_plugin_missing_notification(), push_shared_profiles_notification(), push_simplify_suggestion_notification(), push_slicing_customize_error_notification(), push_slicing_error_notification(), push_slicing_serious_warning_notification(), push_slicing_serious_warning_notification(), push_slicing_warning_notification(), push_updated_item_info_notification(), push_upload_job_notification(), push_validate_error_notification(), and update_notifications().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_notification_data() [2/2]

bool Slic3r::GUI::NotificationManager::push_notification_data ( std::unique_ptr< NotificationManager::PopNotification > notification,
int timestamp )
private
3102{
3103 // if timestamped notif, push only new one
3104 if (timestamp != 0) {
3105 if (m_used_timestamps.find(timestamp) == m_used_timestamps.end()) {
3106 m_used_timestamps.insert(timestamp);
3107 } else {
3108 return false;
3109 }
3110 }
3111 if(!notification->is_valid_delete_callback()){
3112 auto delete_self = [this](NotificationManager::PopNotification* it) {
3114 };
3115 notification->set_delete_callback(delete_self);
3116 }
3117 bool retval = false;
3118 if (this->activate_existing(notification.get())) {
3120 // Precise Seam already aggregates all causes; replace it on repeated warning events.
3121 if (notification->get_type() == NotificationType::SlicingWarning &&
3122 notification->get_data().sub_msg_id != PrintStateBase::SlicingPreciseSeamWarning) {
3123 m_pop_notifications.back()->append(notification->get_data().ori_text);
3124 } else {
3125 m_pop_notifications.back()->update(notification->get_data());
3126 }
3127 }
3128 } else {
3129 m_pop_notifications.emplace_back(std::move(notification));
3130
3131 retval = true;
3132 }
3133 if (!m_initialized)
3134 return retval;
3135 GLCanvas3D& canvas = *wxGetApp().plater()->get_current_canvas3D();
3136 canvas.schedule_extra_frame(0);
3137 return retval;
3138}
bool activate_existing(const NotificationManager::PopNotification *notification)
Definition NotificationManager.cpp:3279
bool m_imgui_ready
Definition NotificationManager.hpp:1069
PopNotification * m_to_delete_after_finish_render
Definition NotificationManager.hpp:1075
std::unordered_set< int > m_used_timestamps
Definition NotificationManager.hpp:1079
@ SlicingPreciseSeamWarning
Definition PrintBase.hpp:74

References activate_existing(), m_imgui_ready, m_initialized, m_pop_notifications, m_to_delete_after_finish_render, m_used_timestamps, Slic3r::GUI::GLCanvas3D::schedule_extra_frame(), Slic3r::PrintStateBase::SlicingPreciseSeamWarning, and Slic3r::GUI::SlicingWarning.

Here is the call graph for this function:

◆ push_orca_sync_conflict_notification()

void Slic3r::GUI::NotificationManager::push_orca_sync_conflict_notification ( const std::string & text,
int conflict_code,
std::function< bool(wxEvtHandler *)> pull_callback,
std::function< bool(wxEvtHandler *)> force_push_callback )
2484{
2487 push_notification_data(std::make_unique<NotificationManager::OrcaSyncConflictNotification>(
2488 data, m_id_provider, m_evt_handler, std::move(pull_callback), std::move(force_push_callback), conflict_code), 0);
2489}
@ OrcaSyncConflict
Definition NotificationManager.hpp:189

References close_notification_of_type(), m_evt_handler, m_id_provider, Slic3r::GUI::OrcaSyncConflict, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ push_plater_error_notification()

void Slic3r::GUI::NotificationManager::push_plater_error_notification ( const std::string & text)

References _u8L, ErrorNotificationLevel, Slic3r::GUI::PlaterError, and push_notification_data().

Referenced by Slic3r::GUI::Plater::export_stl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_plater_warning_notification()

void Slic3r::GUI::NotificationManager::push_plater_warning_notification ( const std::string & text)
2140{
2141 // Find if was not hidden
2142 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2143 if (notification->get_type() == NotificationType::PlaterWarning && notification->compare_text(_u8L("Warning:") + "\n" + text)) {
2144 if (notification->get_state() == PopNotification::EState::Hidden) {
2145 //dynamic_cast<PlaterWarningNotification*>(notification.get())->show();
2146 return;
2147 }
2148 }
2149 }
2150
2152
2153 auto notification = std::make_unique<NotificationManager::PlaterWarningNotification>(data, m_id_provider, m_evt_handler);
2154 push_notification_data(std::move(notification), 0);
2155 // dissaper if in preview
2157}
void apply_in_preview()
Definition NotificationManager.hpp:373

References _u8L, apply_in_preview(), Slic3r::GUI::NotificationManager::PopNotification::Hidden, m_evt_handler, m_id_provider, m_pop_notifications, Slic3r::GUI::PlaterWarning, push_notification_data(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ push_plugin_missing_notification()

void Slic3r::GUI::NotificationManager::push_plugin_missing_notification ( NotificationType type,
const std::string & text,
const std::string & resolve_label,
std::vector< JumpTo > body,
std::function< bool(wxEvtHandler *)> resolve_callback )
2568{
2569 m_pop_notifications.erase(std::remove_if(m_pop_notifications.begin(), m_pop_notifications.end(),
2570 [type](const std::unique_ptr<PopNotification>& notification) {
2571 return notification && notification->get_type() == type;
2572 }), m_pop_notifications.end());
2574 push_notification_data(std::make_unique<NotificationManager::PluginMissingNotification>(
2575 data, m_id_provider, m_evt_handler, resolve_label, std::move(body), std::move(resolve_callback)), 0);
2576}

References ErrorNotificationLevel, m_evt_handler, m_id_provider, m_pop_notifications, and push_notification_data().

Here is the call graph for this function:

◆ push_shared_profiles_notification()

void Slic3r::GUI::NotificationManager::push_shared_profiles_notification ( const std::string & explore_url)
2472{
2475 _u8L("Shared profiles may be available for this printer."),
2476 _u8L("Browse shared profiles") };
2477 push_notification_data(std::make_unique<NotificationManager::SharedProfilesNotification>(data, m_id_provider, m_evt_handler, explore_url), 0);
2478}
@ OrcaSharedProfilesAvailable
Definition NotificationManager.hpp:187

References _u8L, close_notification_of_type(), m_evt_handler, m_id_provider, Slic3r::GUI::OrcaSharedProfilesAvailable, push_notification_data(), and RegularNotificationLevel.

Here is the call graph for this function:

◆ push_simplify_suggestion_notification()

void Slic3r::GUI::NotificationManager::push_simplify_suggestion_notification ( const std::string & text,
ObjectID object_id,
const std::string & hypertext = "",
std::function< bool(wxEvtHandler *)> callback = std::function<bool(wxEvtHandler*)>() )
2225{
2227 auto notification = std::make_unique<NotificationManager::ObjectIDNotification>(data, m_id_provider, m_evt_handler);
2228 notification->object_id = object_id;
2229 push_notification_data(std::move(notification), 0);
2230}
@ SimplifySuggestion
Definition NotificationManager.hpp:145

References m_evt_handler, m_id_provider, PrintInfoNotificationLevel, push_notification_data(), and Slic3r::GUI::SimplifySuggestion.

Referenced by Slic3r::GUI::GLGizmoSimplify::add_simplify_suggestion_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_slicing_customize_error_notification()

void Slic3r::GUI::NotificationManager::push_slicing_customize_error_notification ( NotificationType type,
NotificationLevel level,
const std::string & text,
const std::string & hypertext = "",
std::function< bool(wxEvtHandler *)> callback = std::function<bool(wxEvtHandler*)>() )
2124{
2126 std::string prefix_msg = level == NotificationLevel::WarningNotificationLevel ? _u8L("Warning:") : _u8L("Error:");
2127 push_notification_data({type, level, 0, prefix_msg + "\n" + text, hypertext, callback}, 0);
2128}

References _u8L, push_notification_data(), set_all_slicing_errors_gray(), and WarningNotificationLevel.

Here is the call graph for this function:

◆ push_slicing_error_notification()

void Slic3r::GUI::NotificationManager::push_slicing_error_notification ( const std::string & text,
std::vector< ModelObject const * > objs )
2028{
2029 std::vector<ObjectID> ids;
2030 for (auto optr : objs) {
2031 if (optr)
2032 ids.push_back(optr->id());
2033 }
2034 std::function<bool(wxEvtHandler*)> callback;
2035 if (!objs.empty()) {
2036 callback = [ids](wxEvtHandler*) {
2037 auto& objects = wxGetApp().model().objects;
2038 std::vector<ObjectVolumeID> ovs;
2039 for (auto id : ids) {
2040 auto iter = std::find_if(objects.begin(), objects.end(), [id](auto o) { return o->id() == id; });
2041 if (iter != objects.end()) { ovs.push_back({ *iter, nullptr }); }
2042 }
2043 if (!ovs.empty()) {
2044 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
2045 wxGetApp().obj_list()->select_items(ovs);
2046 }
2047 return false;
2048 };
2049 }
2050 auto link = callback ? _u8L("Jump to") : "";
2051 if (!objs.empty()) {
2052 link += " [";
2053 for (auto obj : objs) {
2054 if (obj)
2055 link += obj->name + ", ";
2056 }
2057 if (!objs.empty()) {
2058 link.pop_back();
2059 link.pop_back();
2060 }
2061 link += "] ";
2062 }
2066}
#define TAB_ID_PREPARE
Definition MainFrame.hpp:60

References _u8L, ErrorNotificationLevel, push_notification_data(), set_all_slicing_errors_gray(), set_slicing_progress_hidden(), Slic3r::GUI::SlicingError, and TAB_ID_PREPARE.

Here is the call graph for this function:

◆ push_slicing_serious_warning_notification() [1/2]

void Slic3r::GUI::NotificationManager::push_slicing_serious_warning_notification ( const std::string & text,
std::vector< ModelInstance const * > insts )
2752{
2753 std::vector<std::pair<ObjectID, ObjectID>> ids;
2754 for (auto iptr : insts) {
2755 if (iptr && iptr->get_object()) {
2756 ids.push_back({iptr->get_object()->id(), iptr->id()});
2757 }
2758 }
2759 std::function<bool(wxEvtHandler*)> callback;
2760 if (!insts.empty()) {
2761 callback = [ids](wxEvtHandler*) {
2762 auto& objects = wxGetApp().model().objects;
2763 wxDataViewItemArray sel_items;
2764 std::vector<ObjectVolumeID> fallback_ovs;
2765 auto* obj_list = wxGetApp().obj_list();
2766 if (!obj_list) return false;
2767 auto* model = obj_list->GetModel();
2768 if (!model) return false;
2769
2770 for (const auto& pair : ids) {
2771 ObjectID obj_id = pair.first;
2772 ObjectID inst_id = pair.second;
2773
2774 auto iter = std::find_if(objects.begin(), objects.end(), [obj_id](auto o) { return o->id() == obj_id; });
2775 if (iter != objects.end()) {
2776 ModelObject* obj = *iter;
2777 int inst_idx = -1;
2778 for (int i=0; i<obj->instances.size(); ++i) {
2779 if (obj->instances[i]->id() == inst_id) {
2780 inst_idx = i;
2781 break;
2782 }
2783 }
2784
2785 if (inst_idx != -1) {
2786 wxDataViewItem item;
2787 wxDataViewItem objItem = model->GetObjectItem(obj);
2788 if (objItem.IsOk()) {
2789 int vm_obj_idx = model->GetIdByItem(objItem);
2790 if (vm_obj_idx != -1) {
2791 item = model->GetItemByInstanceId(vm_obj_idx, inst_idx);
2792 }
2793 }
2794
2795 if (item.IsOk()) {
2796 sel_items.Add(item);
2797 } else {
2798 fallback_ovs.push_back({obj, nullptr});
2799 }
2800 } else {
2801 fallback_ovs.push_back({obj, nullptr});
2802 }
2803 }
2804 }
2805
2806 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
2807
2808 if (!sel_items.empty()) {
2809 obj_list->select_items(sel_items);
2811 } else if (!fallback_ovs.empty()) {
2812 obj_list->select_items(fallback_ovs);
2814 }
2815
2816 return false;
2817 };
2818 }
2819 auto link = callback ? _u8L("Jump to") : "";
2820 std::vector<std::string> names;
2821 for (auto iptr : insts) {
2822 if (iptr && iptr->get_object()) {
2823 names.push_back(iptr->get_object()->name);
2824 }
2825 }
2826 if (!names.empty()) {
2827 link += " [";
2828 for (size_t i = 0; i < names.size(); ++i) {
2829 if (i > 0) link += ", ";
2830 link += names[i];
2831 }
2832 link += "] ";
2833 }
2836 callback},
2837 0);
2839}
@ SeriousWarningNotificationLevel
Definition NotificationManager.hpp:226
void set_all_slicing_warnings_gray(bool g)
Definition NotificationManager.cpp:2190
void select_items(const wxDataViewItemArray &sels)
Definition GUI_ObjectList.cpp:5347
ObjectDataViewModel * GetModel() const
Definition GUI_ObjectList.hpp:233
void update_selections_on_canvas()
Definition GUI_ObjectList.cpp:5149
static ObjectList * obj_list()
Definition GUI_Factories.cpp:405

References _u8L, Slic3r::ModelObject::instances, Slic3r::GUI::obj_list(), push_notification_data(), SeriousWarningNotificationLevel, set_all_slicing_warnings_gray(), set_slicing_progress_hidden(), Slic3r::GUI::SlicingSeriousWarning, and TAB_ID_PREPARE.

Here is the call graph for this function:

◆ push_slicing_serious_warning_notification() [2/2]

void Slic3r::GUI::NotificationManager::push_slicing_serious_warning_notification ( const std::string & text,
std::vector< ModelObject const * > objs )
2707{
2708 std::vector<ObjectID> ids;
2709 for (auto optr : objs) {
2710 if (optr) ids.push_back(optr->id());
2711 }
2712 std::function<bool(wxEvtHandler*)> callback;
2713 if (!objs.empty()) {
2714 callback = [ids](wxEvtHandler*) {
2715 auto& objects = wxGetApp().model().objects;
2716 std::vector<ObjectVolumeID> ovs;
2717 for (auto id : ids) {
2718 auto iter = std::find_if(objects.begin(), objects.end(), [id](auto o) { return o->id() == id; });
2719 if (iter != objects.end()) { ovs.push_back({ *iter, nullptr }); }
2720 }
2721 if (!ovs.empty()) {
2722 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
2723 wxGetApp().obj_list()->select_items(ovs);
2724 wxGetApp().obj_list()->update_selections_on_canvas();
2725 }
2726 return false;
2727 };
2728 }
2729 auto link = callback ? _u8L("Jump to") : "";
2730 std::vector<std::string> names;
2731 for (auto optr : objs) {
2732 if (optr) {
2733 names.push_back(optr->name);
2734 }
2735 }
2736 if (!names.empty()) {
2737 link += " [";
2738 for (size_t i = 0; i < names.size(); ++i) {
2739 if (i > 0) link += ", ";
2740 link += names[i];
2741 }
2742 link += "] ";
2743 }
2746 callback},
2747 0);
2749}

References _u8L, push_notification_data(), SeriousWarningNotificationLevel, set_all_slicing_warnings_gray(), set_slicing_progress_hidden(), Slic3r::GUI::SlicingSeriousWarning, and TAB_ID_PREPARE.

Here is the call graph for this function:

◆ push_slicing_warning_notification()

void Slic3r::GUI::NotificationManager::push_slicing_warning_notification ( const std::string & text,
bool gray,
ModelObject const * obj,
ObjectID oid,
int warning_step,
int warning_msg_id,
NotificationLevel level = NotificationLevel::WarningNotificationLevel )
2068{
2069 std::function<bool(wxEvtHandler*)> callback;
2070 if (obj) {
2071 callback = [id = obj->id()](wxEvtHandler*) {
2072 auto& objects = wxGetApp().model().objects;
2073 auto iter = std::find_if(objects.begin(), objects.end(), [id](auto o) { return o->id() == id; });
2074 if (iter != objects.end()) {
2075 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
2076 wxGetApp().obj_list()->select_items({ {*iter, nullptr} });
2077 }
2078 return false;
2079 };
2080 }
2081 auto link = callback ? _u8L("Jump to") : "";
2082 if (obj) link += std::string(" [") + obj->name + "]";
2083 NotificationData data { NotificationType::SlicingWarning, level, 0, _u8L("Warning:") + "\n" + text, link, callback };
2084
2085 data.sub_msg_id = warning_msg_id;
2086 data.ori_text = text;
2087
2088 auto notification = std::make_unique<NotificationManager::ObjectIDNotification>(data, m_id_provider, m_evt_handler);
2089 notification->object_id = oid;
2090 notification->warning_step = warning_step;
2091 if (push_notification_data(std::move(notification), 0)) {
2092 m_pop_notifications.back()->set_gray(gray);
2093 }
2094}
int sub_msg_id
Definition NotificationManager.hpp:451

References _u8L, Slic3r::ObjectBase::id(), m_evt_handler, m_id_provider, m_pop_notifications, Slic3r::ModelObject::name, Slic3r::GUI::NotificationManager::NotificationData::ori_text, push_notification_data(), Slic3r::GUI::SlicingWarning, Slic3r::GUI::NotificationManager::NotificationData::sub_msg_id, and TAB_ID_PREPARE.

Here is the call graph for this function:

◆ push_updated_item_info_notification()

void Slic3r::GUI::NotificationManager::push_updated_item_info_notification ( InfoItemType type)
3082{
3083 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3084 if (notification->get_type() == NotificationType::UpdatedItemsInfo) {
3085 (dynamic_cast<UpdatedItemsInfoNotification*>(notification.get()))->add_type(type);
3086 return;
3087 }
3088 }
3089
3091 auto notification = std::make_unique<NotificationManager::UpdatedItemsInfoNotification>(data, m_id_provider, m_evt_handler, type);
3092 if (push_notification_data(std::move(notification), 0)) {
3093 (dynamic_cast<UpdatedItemsInfoNotification*>(m_pop_notifications.back().get()))->add_type(type);
3094 }
3095
3096}
@ UpdatedItemsInfo
Definition NotificationManager.hpp:140
id get(id object, const void *key)
Definition MacIME.mm:22

References m_evt_handler, m_id_provider, m_pop_notifications, PrintInfoNotificationLevel, push_notification_data(), and Slic3r::GUI::UpdatedItemsInfo.

Here is the call graph for this function:

◆ push_upload_job_notification()

void Slic3r::GUI::NotificationManager::push_upload_job_notification ( int id,
float filesize,
const std::string & filename,
const std::string & host,
float percentage = 0 )
2654{
2655 // find if upload with same id was not already in notification
2656 // done by compare_jon_id not compare_text thus has to be performed here
2657 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2658 if (notification->get_type() == NotificationType::PrintHostUpload && dynamic_cast<PrintHostUploadNotification*>(notification.get())->compare_job_id(id)) {
2659 return;
2660 }
2661 }
2662 std::string text = PrintHostUploadNotification::get_upload_job_text(id, filename, host);
2664 push_notification_data(std::make_unique<NotificationManager::PrintHostUploadNotification>(data, m_id_provider, m_evt_handler, 0, id, filesize), 0);
2665}
static std::string get_upload_job_text(int id, const std::string &filename, const std::string &host)
Definition NotificationManager.hpp:797
bool compare_job_id(const int other_id) const
Definition NotificationManager.hpp:801
@ PrintHostUpload
Definition NotificationManager.hpp:114

References Slic3r::GUI::NotificationManager::PrintHostUploadNotification::compare_job_id(), Slic3r::GUI::NotificationManager::PrintHostUploadNotification::get_upload_job_text(), m_evt_handler, m_id_provider, m_pop_notifications, Slic3r::GUI::PrintHostUpload, ProgressBarNotificationLevel, and push_notification_data().

Here is the call graph for this function:

◆ push_validate_error_notification()

void Slic3r::GUI::NotificationManager::push_validate_error_notification ( StringObjectException const & error)
1926{
1927 auto po = dynamic_cast<PrintObjectBase const *>(error.object);
1928 auto mo = po ? po->model_object() : dynamic_cast<ModelObject const *>(error.object);
1929 //ORCA: Update to handle ModelInstance selection for validation errors with fallback
1930 /*
1931 std::function<bool(wxEvtHandler*)> callback;
1932 if (mo || !error.opt_key.empty()) {
1933 callback =
1934 [id = mo ? mo->id() : 0, opt = error.opt_key](wxEvtHandler*) {
1935 auto& objects = wxGetApp().model().objects;
1936 auto iter = id.id ? std::find_if(objects.begin(), objects.end(), [id](auto o) { return o->id() == id; }) : objects.end();
1937 if (iter != objects.end()) {
1938 wxGetApp().obj_list()->select_items({ {*iter, nullptr} });
1939 wxGetApp().obj_list()->update_selections_on_canvas();
1940 }
1941 if (!opt.empty()) {
1942 if (iter != objects.end())
1943 wxGetApp().params_panel()->switch_to_object();
1944 wxGetApp().sidebar().jump_to_option(opt, Preset::TYPE_PRINT, L"");
1945 }
1946 else {
1947 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
1948 }
1949 return false;
1950 };
1951 }
1952 auto link = (mo || !error.opt_key.empty()) ? _u8L("Jump to") : "";
1953 if (mo) link += std::string(" [") + mo->name + "]";
1954 */
1955 auto mi = dynamic_cast<ModelInstance const *>(error.object);
1956 std::function<bool(wxEvtHandler*)> callback;
1957 if (mo || mi || !error.opt_key.empty()) {
1958 callback =
1959 [id = mo ? mo->id() : (mi ? mi->id() : 0),
1960 parent_id = mi ? mi->get_object()->id() : 0,
1961 is_inst = (mi != nullptr),
1962 opt = error.opt_key](wxEvtHandler*) {
1963 auto& objects = wxGetApp().model().objects;
1964
1965 if (is_inst) {
1966 bool selected = false;
1967 auto iter = std::find_if(objects.begin(), objects.end(), [parent_id](auto o) { return o->id() == parent_id; });
1968 if (iter != objects.end()) {
1969 ModelObject* obj = *iter;
1970 int inst_idx = -1;
1971 for(size_t i=0; i<obj->instances.size(); ++i) {
1972 if (obj->instances[i]->id() == id) {
1973 inst_idx = i;
1974 break;
1975 }
1976 }
1977 if (inst_idx != -1) {
1978 auto* model = wxGetApp().obj_list()->GetModel();
1979 wxDataViewItem item;
1980 wxDataViewItem objItem = model->GetObjectItem(obj);
1981 if (objItem.IsOk()) {
1982 int vm_obj_idx = model->GetIdByItem(objItem);
1983 if (vm_obj_idx != -1) {
1984 item = model->GetItemByInstanceId(vm_obj_idx, inst_idx);
1985 }
1986 }
1987 if (item.IsOk()) {
1988 wxDataViewItemArray sel_items;
1989 sel_items.Add(item);
1990 wxGetApp().obj_list()->select_items(sel_items);
1991 selected = true;
1992 }
1993 }
1994
1995 if (!selected) {
1996 wxGetApp().obj_list()->select_items({ {obj, nullptr} });
1997 }
1998 }
1999 } else {
2000 auto iter = id.id ? std::find_if(objects.begin(), objects.end(), [id](auto o) { return o->id() == id; }) : objects.end();
2001 if (iter != objects.end())
2002 wxGetApp().obj_list()->select_items({ {*iter, nullptr} });
2003 }
2004
2005 if (!opt.empty()) {
2006 const Preset::Type opt_type = resolve_validation_option_type(opt);
2007
2008 if (opt_type == Preset::TYPE_PRINT && ((!is_inst && id.id) || (is_inst && parent_id.id))) // if object found and it's a print preset option, switch to object first
2009 wxGetApp().params_panel()->switch_to_object();
2010
2011 wxGetApp().sidebar().jump_to_option(opt, opt_type, L"");
2012 }
2013 else {
2014 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
2015 }
2016 return false;
2017 };
2018 }
2019 auto link = (mo || mi || !error.opt_key.empty()) ? _u8L("Jump to") : "";
2020 if (mo) link += std::string(" [") + mo->name + "]";
2021 if (mi) link += std::string(" [") + mi->get_object()->name + "]";
2022 if (!error.opt_key.empty()) link += std::string(" (") + error.opt_key + ")";
2023 push_notification_data({NotificationType::ValidateError, NotificationLevel::ErrorNotificationLevel, 0, _u8L("Error:") + "\n" + error.string, link, callback}, 0);
2025}
#define L(s)
Definition ExtrusionEntity.cpp:25
Type
Definition Preset.hpp:244
@ TYPE_PRINT
Definition Preset.hpp:246
T * end(Slic3r::Mat< N, M, T > &mat)
Definition Point.hpp:841
Preset::Type resolve_validation_option_type(const std::string &opt_key)
Definition NotificationManager.cpp:145
@ ValidateError
Definition NotificationManager.hpp:92

References _u8L, ErrorNotificationLevel, Slic3r::ModelObject::instances, L, Slic3r::PrintObjectBase::model_object(), Slic3r::StringObjectException::object, Slic3r::StringObjectException::opt_key, push_notification_data(), set_slicing_progress_hidden(), Slic3r::StringObjectException::string, TAB_ID_PREPARE, Slic3r::Preset::TYPE_PRINT, and Slic3r::GUI::ValidateError.

Here is the call graph for this function:

◆ remove_notification_of_type()

void Slic3r::GUI::NotificationManager::remove_notification_of_type ( const NotificationType type)
2252 {
2253 for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
2254 std::unique_ptr<PopNotification> &notification = *it;
2255 if (notification->get_type() == type) {
2256 it = m_pop_notifications.erase(it);
2257 break;
2258 } else
2259 ++it;
2260 }
2261}

References m_pop_notifications.

Referenced by clear_all().

Here is the caller graph for this function:

◆ remove_simplify_suggestion_of_released_objects()

void Slic3r::GUI::NotificationManager::remove_simplify_suggestion_of_released_objects ( const std::vector< ObjectID > & living_oids)
2280{
2281 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications)
2282 if (notification->get_type() == NotificationType::SimplifySuggestion) {
2283 if (!std::binary_search(living_oids.begin(), living_oids.end(),
2284 static_cast<ObjectIDNotification*>(notification.get())->object_id))
2285 notification->close();
2286 }
2287}
ObjectID object_id
Definition NotificationManager.hpp:680

References m_pop_notifications, Slic3r::GUI::NotificationManager::ObjectIDNotification::object_id, and Slic3r::GUI::SimplifySuggestion.

◆ remove_simplify_suggestion_with_id()

void Slic3r::GUI::NotificationManager::remove_simplify_suggestion_with_id ( const ObjectID oid)
2290{
2291 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications)
2292 if (notification->get_type() == NotificationType::SimplifySuggestion) {
2293 if (static_cast<ObjectIDNotification*>(notification.get())->object_id == oid)
2294 notification->close();
2295 }
2296}

References m_pop_notifications, Slic3r::GUI::NotificationManager::ObjectIDNotification::object_id, and Slic3r::GUI::SimplifySuggestion.

◆ remove_slicing_warnings_of_released_objects()

void Slic3r::GUI::NotificationManager::remove_slicing_warnings_of_released_objects ( const std::vector< ObjectID > & living_oids)
2271{
2272 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
2273 if (notification->get_type() == NotificationType::SlicingWarning) {
2274 if (! std::binary_search(living_oids.begin(), living_oids.end(),
2275 static_cast<ObjectIDNotification*>(notification.get())->object_id))
2276 notification->close();
2277 }
2278}

References m_pop_notifications, Slic3r::GUI::NotificationManager::ObjectIDNotification::object_id, and Slic3r::GUI::SlicingWarning.

◆ render_notifications()

void Slic3r::GUI::NotificationManager::render_notifications ( GLCanvas3D & canvas,
float overlay_width,
float bottom_margin,
float right_margin )
3166{
3167 // Notifications render inside an ImGui frame, so the font atlas is built from this point on
3168 // and pushed notifications may safely measure their text.
3169 m_imgui_ready = true;
3170
3172
3173 float bottom_up_last_y = bottom_margin; // ORCA dont scale margins
3174
3175 int i = 0;
3176 for (const auto& notification : m_pop_notifications) {
3177 if (notification->get_data().level == NotificationLevel::ErrorNotificationLevel || notification->get_data().level == NotificationLevel::SeriousWarningNotificationLevel) {
3178 notification->bbl_render_block_notification(canvas, bottom_up_last_y, m_move_from_overlay && !m_in_preview, overlay_width * m_scale, right_margin); // ORCA dont scale margins
3179 if (notification->get_state() != PopNotification::EState::Finished)
3180 bottom_up_last_y = notification->get_top() + GAP_WIDTH;
3181 }
3182 else {
3183 if (notification->get_state() != PopNotification::EState::Hidden && notification->get_state() != PopNotification::EState::Finished) {
3184 i++;
3185 notification->render(canvas, bottom_up_last_y, m_move_from_overlay && !m_in_preview, overlay_width * m_scale, right_margin); // ORCA dont scale margins
3186 if (notification->get_state() != PopNotification::EState::Finished)
3187 bottom_up_last_y = notification->get_top() + GAP_WIDTH;
3188 }
3189 }
3190 }
3191 for (const auto& notification : m_pop_notifications) {
3192 if (notification->get_data().type == NotificationType::SlicingProgress && notification->get_state() != PopNotification::EState::Hidden && notification->get_state() != PopNotification::EState::Finished) {
3193 ;// assert(i <= 1);
3194 }
3195 }
3199 }
3201}
static constexpr float GAP_WIDTH
Definition NotificationManager.cpp:61
static int64_t timestamp_now()
Definition GLCanvas3D.hpp:1416
@ Finished
Definition NotificationManager.hpp:483
int64_t m_last_render
Definition NotificationManager.hpp:1086
bool m_move_from_overlay
Definition NotificationManager.hpp:1084
float m_scale
Definition NotificationManager.hpp:1160
void sort_notifications()
Definition NotificationManager.cpp:3267
void close_and_delete_self(PopNotification *)
Definition NotificationManager.cpp:2240

References close_and_delete_self(), ErrorNotificationLevel, Slic3r::GUI::NotificationManager::PopNotification::Finished, GAP_WIDTH, Slic3r::GUI::NotificationManager::PopNotification::Hidden, m_imgui_ready, m_in_preview, m_last_render, m_move_from_overlay, m_pop_notifications, m_scale, m_to_delete_after_finish_render, SeriousWarningNotificationLevel, Slic3r::GUI::SlicingProgress, sort_notifications(), and Slic3r::GUI::GLCanvas3D::timestamp_now().

Here is the call graph for this function:

◆ set_all_slicing_errors_gray()

void Slic3r::GUI::NotificationManager::set_all_slicing_errors_gray ( bool g)
2183{
2184 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2185 if (notification->get_type() == NotificationType::SlicingError) {
2186 notification->set_gray(g);
2187 }
2188 }
2189}

References m_pop_notifications, and Slic3r::GUI::SlicingError.

Referenced by push_flushing_volume_error_notification(), push_slicing_customize_error_notification(), and push_slicing_error_notification().

Here is the caller graph for this function:

◆ set_all_slicing_warnings_gray()

void Slic3r::GUI::NotificationManager::set_all_slicing_warnings_gray ( bool g)
2191{
2192 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
2193 if (notification->get_type() == NotificationType::SlicingWarning) {
2194 notification->set_gray(g);
2195 }
2196 }
2197}

References m_pop_notifications, and Slic3r::GUI::SlicingWarning.

Referenced by push_slicing_serious_warning_notification(), and push_slicing_serious_warning_notification().

Here is the caller graph for this function:

◆ set_download_URL_canceled()

void Slic3r::GUI::NotificationManager::set_download_URL_canceled ( size_t id)
2624{
2625 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2626 if (notification->get_type() == NotificationType::URLDownload) {
2627 URLDownloadNotification* ntf = dynamic_cast<URLDownloadNotification*>(notification.get());
2628 if (ntf->get_download_id() != id)
2629 continue;
2630 ntf->close();
2631 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2632 return;
2633 }
2634 }
2635}
virtual void close()
Definition NotificationManager.cpp:477

References Slic3r::GUI::NotificationManager::PopNotification::close(), Slic3r::GUI::NotificationManager::URLDownloadNotification::get_download_id(), m_pop_notifications, and Slic3r::GUI::URLDownload.

Referenced by Slic3r::GUI::Downloader::on_canceled().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_download_URL_error()

void Slic3r::GUI::NotificationManager::set_download_URL_error ( size_t id,
const std::string & text )
2637{
2638 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2639 if (notification->get_type() == NotificationType::URLDownload) {
2640 URLDownloadNotification* ntf = dynamic_cast<URLDownloadNotification*>(notification.get());
2641 if (ntf->get_download_id() != id)
2642 continue;
2643 float percent_b4 = ntf->get_percentage();
2644 ntf->set_percentage(-1.f);
2645 ntf->set_error_message(text);
2646 if (ntf->get_percentage() != percent_b4)
2647 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2648 return;
2649 }
2650 }
2651}
float get_percentage() const
Definition NotificationManager.hpp:700

References Slic3r::GUI::NotificationManager::URLDownloadNotification::get_download_id(), Slic3r::GUI::NotificationManager::ProgressBarNotification::get_percentage(), m_pop_notifications, Slic3r::GUI::NotificationManager::URLDownloadNotification::set_error_message(), Slic3r::GUI::NotificationManager::URLDownloadNotification::set_percentage(), and Slic3r::GUI::URLDownload.

Referenced by Slic3r::GUI::Downloader::on_error().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_download_URL_paused()

void Slic3r::GUI::NotificationManager::set_download_URL_paused ( size_t id)
2610{
2611 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2612 if (notification->get_type() == NotificationType::URLDownload) {
2613 URLDownloadNotification* ntf = dynamic_cast<URLDownloadNotification*>(notification.get());
2614 if (ntf->get_download_id() != id)
2615 continue;
2616 ntf->set_paused(true);
2617 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2618 return;
2619 }
2620 }
2621}
void set_paused(bool paused)
Definition NotificationManager.hpp:744

References Slic3r::GUI::NotificationManager::URLDownloadNotification::get_download_id(), m_pop_notifications, Slic3r::GUI::NotificationManager::URLDownloadNotification::set_paused(), and Slic3r::GUI::URLDownload.

Referenced by Slic3r::GUI::Downloader::on_paused().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_download_URL_progress()

void Slic3r::GUI::NotificationManager::set_download_URL_progress ( size_t id,
float percentage )
2592{
2593 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2594 if (notification->get_type() == NotificationType::URLDownload) {
2595 URLDownloadNotification* ntf = dynamic_cast<URLDownloadNotification*>(notification.get());
2596 if (ntf->get_download_id() != id)
2597 continue;
2598 // if this changes the percentage, it should be shown now
2599 float percent_b4 = ntf->get_percentage();
2600 ntf->set_percentage(percentage);
2601 ntf->set_paused(false);
2602 if (ntf->get_percentage() != percent_b4)
2603 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2604 return;
2605 }
2606 }
2607}

References Slic3r::GUI::NotificationManager::URLDownloadNotification::get_download_id(), Slic3r::GUI::NotificationManager::ProgressBarNotification::get_percentage(), m_pop_notifications, Slic3r::GUI::NotificationManager::URLDownloadNotification::set_paused(), Slic3r::GUI::NotificationManager::URLDownloadNotification::set_percentage(), and Slic3r::GUI::URLDownload.

Referenced by Slic3r::GUI::Downloader::on_progress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_fdm()

void Slic3r::GUI::NotificationManager::set_fdm ( bool b)
inline
304{ set_fff(b); }
void set_fff(bool b)
Definition NotificationManager.cpp:2961

References set_fff().

Here is the call graph for this function:

◆ set_fff()

void Slic3r::GUI::NotificationManager::set_fff ( bool b)
2962{
2963 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2964 if (notification->get_type() == NotificationType::SlicingProgress) {
2965 dynamic_cast<SlicingProgressNotification*>(notification.get())->set_fff(fff);
2966 break;
2967 }
2968 }
2969}
void set_fff(bool b)
Definition SlicingProgressNotification.hpp:54

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_fff(), and Slic3r::GUI::SlicingProgress.

Referenced by set_fdm(), and set_sla().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_in_preview()

void Slic3r::GUI::NotificationManager::set_in_preview ( bool preview)
3316{
3317 m_in_preview = preview;
3318 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
3319 if (notification->get_type() == NotificationType::PlaterWarning)
3320 notification->hide(preview);
3321 if (notification->get_type() == NotificationType::BBLPlateInfo)
3322 notification->hide(preview);
3323 if (notification->get_type() == NotificationType::SignDetected)
3324 notification->hide(!preview);
3325 if (notification->get_type() == NotificationType::BBLObjectInfo)
3326 notification->hide(preview);
3327 if (notification->get_type() == NotificationType::BBLSeqPrintInfo)
3328 notification->hide(preview);
3329 if (m_in_preview && notification->get_type() == NotificationType::DidYouKnowHint)
3330 notification->close();
3331 if (notification->get_type() == NotificationType::ValidateWarning)
3332 notification->hide(preview);
3333 }
3334}
@ ValidateWarning
Definition NotificationManager.hpp:94
@ SignDetected
Definition NotificationManager.hpp:126

References Slic3r::GUI::BBLObjectInfo, Slic3r::GUI::BBLPlateInfo, Slic3r::GUI::BBLSeqPrintInfo, Slic3r::GUI::DidYouKnowHint, m_in_preview, m_pop_notifications, Slic3r::GUI::PlaterWarning, Slic3r::GUI::SignDetected, and Slic3r::GUI::ValidateWarning.

Referenced by apply_in_preview().

Here is the caller graph for this function:

◆ set_move_from_overlay()

void Slic3r::GUI::NotificationManager::set_move_from_overlay ( bool move)
inline
375{ m_move_from_overlay = move; }

References m_move_from_overlay.

◆ set_scale()

void Slic3r::GUI::NotificationManager::set_scale ( float scale = 1.0)
3691{
3692 if(m_scale != scale) m_scale = scale;
3693 for (auto& notif : m_pop_notifications) {
3694 notif->set_scale(scale);
3695 }
3696}
int scale(const int val)
Definition WipeTowerDialog.cpp:58

References m_pop_notifications, m_scale, and scale().

Here is the call graph for this function:

◆ set_sidebar_collapsed()

void Slic3r::GUI::NotificationManager::set_sidebar_collapsed ( bool collapsed)
2953{
2954 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2955 if (notification->get_type() == NotificationType::SlicingProgress) {
2956 dynamic_cast<SlicingProgressNotification*>(notification.get())->set_sidebar_collapsed(collapsed);
2957 break;
2958 }
2959 }
2960}
void set_sidebar_collapsed(bool collapsed)
Definition SlicingProgressNotification.cpp:167

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_sidebar_collapsed(), and Slic3r::GUI::SlicingProgress.

Here is the call graph for this function:

◆ set_simplify_suggestion_multiline()

void Slic3r::GUI::NotificationManager::set_simplify_suggestion_multiline ( const ObjectID oid,
bool bMulti )
2299{
2300 for (std::unique_ptr<PopNotification> &notification : m_pop_notifications)
2301 if (notification->get_type() == NotificationType::SimplifySuggestion) {
2302 if (static_cast<ObjectIDNotification *>(notification.get())->object_id == oid)
2303 notification->set_Multiline(bMulti);
2304 }
2305}

References m_pop_notifications, Slic3r::GUI::NotificationManager::ObjectIDNotification::object_id, and Slic3r::GUI::SimplifySuggestion.

◆ set_sla()

void Slic3r::GUI::NotificationManager::set_sla ( bool b)
inline
305{ set_fff(!b); }

References set_fff().

Here is the call graph for this function:

◆ set_slicing_complete_print_time()

void Slic3r::GUI::NotificationManager::set_slicing_complete_print_time ( const std::string & info,
bool sidebar_colapsed )
2943{
2944 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2945 if (notification->get_type() == NotificationType::SlicingProgress) {
2946 dynamic_cast<SlicingProgressNotification*>(notification.get())->set_sidebar_collapsed(sidebar_colapsed);
2947 dynamic_cast<SlicingProgressNotification*>(notification.get())->set_print_info(info);
2948 break;
2949 }
2950 }
2951}
void set_print_info(const std::string &info)
Definition SlicingProgressNotification.cpp:157

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_print_info(), Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_sidebar_collapsed(), and Slic3r::GUI::SlicingProgress.

Here is the call graph for this function:

◆ set_slicing_progress_began()

void Slic3r::GUI::NotificationManager::set_slicing_progress_began ( )
2883{
2884 auto find_slicing_progress = [this]() -> SlicingProgressNotification* {
2885 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2886 if (notification->get_type() == NotificationType::SlicingProgress)
2887 return dynamic_cast<SlicingProgressNotification*>(notification.get());
2888 }
2889 return nullptr;
2890 };
2891
2892 SlicingProgressNotification* notification = find_slicing_progress();
2893 if (notification == nullptr) {
2894 wxGetApp().plater()->init_notification_manager();
2895 notification = find_slicing_progress();
2896 }
2897 if (notification != nullptr)
2898 notification->set_progress_state(SlicingProgressNotification::SlicingProgressState::SP_BEGAN);
2899}

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_progress_state(), Slic3r::GUI::SlicingProgress, and Slic3r::GUI::NotificationManager::SlicingProgressNotification::SP_BEGAN.

Here is the call graph for this function:

◆ set_slicing_progress_canceled()

void Slic3r::GUI::NotificationManager::set_slicing_progress_canceled ( const std::string & text)
2916{
2917 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2918 if (notification->get_type() == NotificationType::SlicingProgress) {
2919 SlicingProgressNotification* spn = dynamic_cast<SlicingProgressNotification*>(notification.get());
2921 spn->set_status_text(text);
2922 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2923 return;
2924 }
2925 }
2926 // Slicing progress notification was not found - init it thru plater so correct cancel callback function is appended
2927 wxGetApp().plater()->init_notification_manager();
2928}
bool set_progress_state(float percent)
Definition SlicingProgressNotification.cpp:65

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_progress_state(), Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_status_text(), Slic3r::GUI::SlicingProgress, and Slic3r::GUI::NotificationManager::SlicingProgressNotification::SP_CANCELLED.

Here is the call graph for this function:

◆ set_slicing_progress_export_possible()

void Slic3r::GUI::NotificationManager::set_slicing_progress_export_possible ( )
2971{
2972 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2973 if (notification->get_type() == NotificationType::SlicingProgress) {
2974 dynamic_cast<SlicingProgressNotification*>(notification.get())->set_export_possible(true);
2975 break;
2976 }
2977 }
2978}
void set_export_possible(bool b)
Definition SlicingProgressNotification.hpp:55

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_export_possible(), and Slic3r::GUI::SlicingProgress.

Here is the call graph for this function:

◆ set_slicing_progress_hidden()

void Slic3r::GUI::NotificationManager::set_slicing_progress_hidden ( )
2930{
2931 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2932 if (notification->get_type() == NotificationType::SlicingProgress) {
2933 SlicingProgressNotification* notif = dynamic_cast<SlicingProgressNotification*>(notification.get());
2935 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2936 return;
2937 }
2938 }
2939 // Slicing progress notification was not found - init it thru plater so correct cancel callback function is appended
2940 wxGetApp().plater()->init_notification_manager();
2941}

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_progress_state(), Slic3r::GUI::SlicingProgress, and Slic3r::GUI::NotificationManager::SlicingProgressNotification::SP_NO_SLICING.

Referenced by push_exporting_finished_notification(), push_import_finished_notification(), push_slicing_error_notification(), push_slicing_serious_warning_notification(), push_slicing_serious_warning_notification(), and push_validate_error_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_slicing_progress_percentage()

void Slic3r::GUI::NotificationManager::set_slicing_progress_percentage ( const std::string & text,
float percentage )
2901{
2902 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2903 if (notification->get_type() == NotificationType::SlicingProgress) {
2904 SlicingProgressNotification* spn = dynamic_cast<SlicingProgressNotification*>(notification.get());
2905 if(spn->set_progress_state(percentage)) {
2906 spn->set_status_text(text);
2907 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2908 }
2909 return;
2910 }
2911 }
2912 // Slicing progress notification was not found - init it thru plater so correct cancel callback function is appended
2913 wxGetApp().plater()->init_notification_manager();
2914}

References m_pop_notifications, Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_progress_state(), Slic3r::GUI::NotificationManager::SlicingProgressNotification::set_status_text(), and Slic3r::GUI::SlicingProgress.

Here is the call graph for this function:

◆ set_upload_job_notification_percentage()

void Slic3r::GUI::NotificationManager::set_upload_job_notification_percentage ( int id,
const std::string & filename,
const std::string & host,
float percentage )
2667{
2668 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2669 if (notification->get_type() == NotificationType::PrintHostUpload) {
2670 PrintHostUploadNotification* phun = dynamic_cast<PrintHostUploadNotification*>(notification.get());
2671 if (phun->compare_job_id(id)) {
2672 phun->set_percentage(percentage);
2673 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2674 break;
2675 }
2676 }
2677 }
2678}

References Slic3r::GUI::NotificationManager::PrintHostUploadNotification::compare_job_id(), m_pop_notifications, Slic3r::GUI::PrintHostUpload, and Slic3r::GUI::NotificationManager::PrintHostUploadNotification::set_percentage().

Here is the call graph for this function:

◆ sort_notifications()

void Slic3r::GUI::NotificationManager::sort_notifications ( )
private
3268{
3269 // Stable sorting, so that the order of equal ranges is stable.
3270 std::stable_sort(m_pop_notifications.begin(), m_pop_notifications.end(), [](const std::unique_ptr<PopNotification> &n1, const std::unique_ptr<PopNotification> &n2) {
3271 int n1l = (int)n1->get_data().level;
3272 int n2l = (int)n2->get_data().level;
3273 if (n1l == n2l && n1->is_gray() && !n2->is_gray())
3274 return true;
3275 return (n1l < n2l);
3276 });
3277}

References m_pop_notifications.

Referenced by render_notifications().

Here is the caller graph for this function:

◆ stop_delayed_notifications_of_type()

void Slic3r::GUI::NotificationManager::stop_delayed_notifications_of_type ( const NotificationType type)
3154{
3155 for (auto it = m_waiting_notifications.begin(); it != m_waiting_notifications.end();) {
3156 if ((*it).notification->get_type() == type) {
3157 it = m_waiting_notifications.erase(it);
3158 }
3159 else {
3160 ++it;
3161 }
3162 }
3163}

References m_waiting_notifications.

Referenced by push_hint_notification().

Here is the caller graph for this function:

◆ update_notifications()

bool Slic3r::GUI::NotificationManager::update_notifications ( GLCanvas3D & canvas)
3204{
3205 // no update if not top window
3206 wxWindow* p = dynamic_cast<wxWindow*>(wxGetApp().plater());
3207 while (p->GetParent() != nullptr)
3208 p = p->GetParent();
3209 wxTopLevelWindow* top_level_wnd = dynamic_cast<wxTopLevelWindow*>(p);
3210 if (!top_level_wnd->IsActive())
3211 return false;
3212
3213 // next_render() returns numeric_limits::max if no need for frame
3214 const int64_t max = std::numeric_limits<int64_t>::max();
3215 int64_t next_render = max;
3216 const int64_t time_since_render = GLCanvas3D::timestamp_now() - m_last_render;
3217 bool request_render = false;
3218 // During render, each notification detects if its currently hovered and changes its state to EState::Hovered
3219 // If any notification is hovered, all restarts its countdown
3220 bool hover = false;
3221 for (const std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
3222 if (notification->is_hovered()) {
3223 hover = true;
3224 break;
3225 }
3226 }
3227 // update state of all notif and erase finished
3228 for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
3229 std::unique_ptr<PopNotification>& notification = *it;
3230 request_render |= notification->update_state(hover, time_since_render);
3231 next_render = std::min<int64_t>(next_render, notification->next_render());
3232 if (notification->get_state() == PopNotification::EState::Finished)
3233 it = m_pop_notifications.erase(it);
3234 else
3235 ++it;
3236 }
3237
3238 // delayed notifications
3239 for (auto it = m_waiting_notifications.begin(); it != m_waiting_notifications.end();) {
3240 // substract time
3241 if ((*it).remaining_time > 0)
3242 (*it).remaining_time -= time_since_render;
3243 if ((*it).remaining_time <= 0) {
3244 if ((*it).notification && (*it).condition_callback()) { // push notification, erase it from waiting list (frame is scheduled by push)
3245 (*it).notification->reset_timer();
3246 // if activate_existing returns false, we expect push to return true.
3247 if(!this->activate_existing((*it).notification.get()) || (*it).delay_interval == 0) {
3248 push_notification_data(std::move((*it).notification), 0);
3249 it = m_waiting_notifications.erase(it);
3250 continue;
3251 }
3252 }
3253 // not possible to push, delay for delay_interval
3254 (*it).remaining_time = (*it).delay_interval;
3255 }
3256 next_render = std::min<int64_t>(next_render, (*it).remaining_time);
3257 ++it;
3258 }
3259
3260 // request next frame in future
3261 if (next_render < max)
3262 canvas.schedule_extra_frame(int(next_render));
3263
3264 return request_render;
3265}

References activate_existing(), Slic3r::GUI::NotificationManager::PopNotification::Finished, m_last_render, m_pop_notifications, m_waiting_notifications, push_notification_data(), Slic3r::GUI::GLCanvas3D::schedule_extra_frame(), and Slic3r::GUI::GLCanvas3D::timestamp_now().

Here is the call graph for this function:

◆ update_slicing_notif_dailytips()

void Slic3r::GUI::NotificationManager::update_slicing_notif_dailytips ( bool need_change)
2866{
2867 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2868 if (notification->get_type() == NotificationType::SlicingProgress) {
2869 SlicingProgressNotification* spn = dynamic_cast<SlicingProgressNotification*>(notification.get());
2870 if (need_change) {
2871 wxGetApp().plater()->get_dailytips()->close();
2872 spn->get_dailytips_panel()->retrieve_data_from_hint_database(HintDataNavigation::Random);
2873 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2874 }
2875 return;
2876 }
2877 }
2878 // Slicing progress notification was not found - init it thru plater so correct cancel callback function is appended
2879 wxGetApp().plater()->init_notification_manager();
2880}
@ Random
Definition HintNotification.hpp:38

References Slic3r::GUI::NotificationManager::SlicingProgressNotification::get_dailytips_panel(), m_pop_notifications, Slic3r::GUI::Random, Slic3r::GUI::DailyTipsPanel::retrieve_data_from_hint_database(), and Slic3r::GUI::SlicingProgress.

Here is the call graph for this function:

◆ upload_job_notification_show_canceled()

void Slic3r::GUI::NotificationManager::upload_job_notification_show_canceled ( int id,
const std::string & filename,
const std::string & host )
2680{
2681 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2682 if (notification->get_type() == NotificationType::PrintHostUpload) {
2683 PrintHostUploadNotification* phun = dynamic_cast<PrintHostUploadNotification*>(notification.get());
2684 if (phun->compare_job_id(id)) {
2685 phun->cancel();
2686 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2687 break;
2688 }
2689 }
2690 }
2691}

References Slic3r::GUI::NotificationManager::PrintHostUploadNotification::cancel(), Slic3r::GUI::NotificationManager::PrintHostUploadNotification::compare_job_id(), m_pop_notifications, and Slic3r::GUI::PrintHostUpload.

Here is the call graph for this function:

◆ upload_job_notification_show_error()

void Slic3r::GUI::NotificationManager::upload_job_notification_show_error ( int id,
const std::string & filename,
const std::string & host )
2693{
2694 for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
2695 if (notification->get_type() == NotificationType::PrintHostUpload) {
2696 PrintHostUploadNotification* phun = dynamic_cast<PrintHostUploadNotification*>(notification.get());
2697 if(phun->compare_job_id(id)) {
2698 phun->error();
2699 wxGetApp().plater()->get_current_canvas3D()->schedule_extra_frame(0);
2700 break;
2701 }
2702 }
2703 }
2704}

References Slic3r::GUI::NotificationManager::PrintHostUploadNotification::compare_job_id(), Slic3r::GUI::NotificationManager::PrintHostUploadNotification::error(), m_pop_notifications, and Slic3r::GUI::PrintHostUpload.

Here is the call graph for this function:

Member Data Documentation

◆ basic_notifications

const std::vector<NotificationData> Slic3r::GUI::NotificationManager::basic_notifications
private
1101 {
1104 [](wxEvtHandler* evnthndlr) {
1105 if (evnthndlr != nullptr)
1106 wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED));
1107 return true;
1108 }
1109 },
1111 std::string(_devL("value can not be empty when you add a G-code for color change.\nPlease check the \"Color Change G-code\" in \"Printer Settings > Custom G-code\"").mb_str())},
1113 std::string(_devL("You need add a color change event to the print. The print need look like a sign.").mb_str())},
1115 _u8L("Integration was successful.") },
1117 _u8L("Integration failed.") },
1119 _u8L("Undo integration was successful.") },
1120
1122 _u8L("New network plug-in available."),
1123 _u8L("Details"),
1124 [](wxEvtHandler* evnthndlr) {
1125 //BBS set feishu release page by default
1126 wxCommandEvent* evt = new wxCommandEvent(EVT_UPDATE_PLUGINS_WHEN_LAUNCH);
1127 wxQueueEvent(wxGetApp().plater(), evt);
1128 return true;
1129 }},
1130
1132 _u8L("New printer config available."), _u8L("Details"),
1133 [](wxEvtHandler *evnthndlr) {
1134 if (evnthndlr != nullptr) wxPostEvent(evnthndlr, PrinterConfigUpdateAvailableClickedEvent(EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED));
1135 return true;
1136 }},
1137
1139 _u8L("The number of user presets cached in the cloud has exceeded the upper limit, newly created user presets can only be used locally."),
1140 _u8L("Wiki Guide"),
1141 [](wxEvtHandler* evnthndlr) {
1142 wxLaunchDefaultBrowser("https://wiki.bambulab.com/en/software/bambu-studio/3rd-party-printer-profile#cloud-user-presets-limit");
1143 return false;
1144 }},
1145
1147 _u8L("Undo integration failed.") },
1149 NotificationData{NotificationType::NewAppAvailable, NotificationLevel::ImportantNotificationLevel, 20, _u8L("An update is available!"), _u8L("Go to download page"),
1150 [](wxEvtHandler *evnthndlr) {
1151 //BBS set feishu release page by default
1152 wxGetApp().open_browser_with_warning_dialog("https://www.thingiverse.com/"); return true;
1153 }},
1154 //{NotificationType::NewAppAvailable, NotificationLevel::ImportantNotificationLevel, 20, _u8L("New vesion of PrusaSlicer is available.", _u8L("Download page.") },
1155 //{NotificationType::LoadingFailed, NotificationLevel::RegularNotificationLevel, 20, _u8L("Loading of model has Failed") },
1156 //{NotificationType::DeviceEjected, NotificationLevel::RegularNotificationLevel, 10, _u8L("Removable device has been safely ejected")} // if we want changeble text (like here name of device), we need to do it as CustomNotification
1157 };
SimpleEvent PresetUpdateAvailableClickedEvent
Definition NotificationManager.hpp:41
SimpleEvent PrinterConfigUpdateAvailableClickedEvent
Definition NotificationManager.hpp:43
@ BBLPrinterConfigUpdateAvailable
Definition NotificationManager.hpp:177
@ Mouse3dDisconnected
Definition NotificationManager.hpp:76
@ BBLUserPresetExceedLimit
Definition NotificationManager.hpp:178
@ PresetUpdateAvailable
Definition NotificationManager.hpp:87
@ DesktopIntegrationFail
Definition NotificationManager.hpp:131
@ BBLPluginUpdateAvailable
Definition NotificationManager.hpp:175
@ DesktopIntegrationSuccess
Definition NotificationManager.hpp:130
@ ExportOngoing
Definition NotificationManager.hpp:151
@ UndoDesktopIntegrationSuccess
Definition NotificationManager.hpp:132
@ EmptyColorChangeCode
Definition NotificationManager.hpp:120
@ UndoDesktopIntegrationFail
Definition NotificationManager.hpp:133
@ EmptyAutoColorChange
Definition NotificationManager.hpp:124
#define _devL(s)
Definition I18N.hpp:8

Referenced by push_delayed_notification(), and push_notification().

◆ m_evt_handler

◆ m_id_provider

◆ m_imgui_ready

bool Slic3r::GUI::NotificationManager::m_imgui_ready { false }
private
1069{ false };

Referenced by push_notification_data(), and render_notifications().

◆ m_in_preview

bool Slic3r::GUI::NotificationManager::m_in_preview { false }
private
1081{ false };

Referenced by apply_in_preview(), render_notifications(), and set_in_preview().

◆ m_in_view

int Slic3r::GUI::NotificationManager::m_in_view { 0 }
private
1082{ 0 };

◆ m_initialized

bool Slic3r::GUI::NotificationManager::m_initialized { false }
private
1064{ false };

Referenced by init(), and push_notification_data().

◆ m_is_dark

bool Slic3r::GUI::NotificationManager::m_is_dark = false
private

Referenced by on_change_color_mode().

◆ m_last_render

int64_t Slic3r::GUI::NotificationManager::m_last_render { 0LL }
private
1086{ 0LL };

Referenced by render_notifications(), and update_notifications().

◆ m_move_from_overlay

bool Slic3r::GUI::NotificationManager::m_move_from_overlay { false }
private
1084{ false };

Referenced by render_notifications(), and set_move_from_overlay().

◆ m_multiple_types

const std::vector<NotificationType> Slic3r::GUI::NotificationManager::m_multiple_types
private
Initial value:
1088 {
1095 // A published file load can produce several distinct 3MF warnings (invalid values,
1096 // skipped settings, changed slots); let them stack rather than clobber each other.
1098 };

Referenced by activate_existing().

◆ m_pop_notifications

std::deque<std::unique_ptr<PopNotification> > Slic3r::GUI::NotificationManager::m_pop_notifications
private

Referenced by activate_existing(), bbl_chose_sole_text_notification(), bbl_close_3mf_warn_notification(), bbl_close_gcode_overlap_notification(), bbl_close_need_support_on_notification(), bbl_close_objectsinfo_notification(), bbl_close_plateinfo_notification(), bbl_close_plugin_install_notification(), bbl_close_preview_only_notification(), bbl_close_seqprintinfo_notification(), bbl_show_gcode_overlap_notification(), bbl_show_need_support_on_notification(), bbl_show_objectsinfo_notification(), bbl_show_plugin_install_notification(), bbl_show_seqprintinfo_notification(), bbl_show_slice_emptylayer_notification(), bbl_show_sole_text_notification(), close_and_delete_self(), close_flushing_volume_error_notification(), close_general_error_notification(), close_notification_of_type(), close_plater_error_notification(), close_plater_warning_notification(), close_slicing_customize_error_notification(), close_slicing_error_notification(), close_slicing_errors_and_warnings(), close_slicing_serious_warning_notification(), device_ejected(), get_notification_count(), has_slicing_error_notification(), init_progress_indicator(), init_slicing_progress_notification(), is_hint_notification_open(), on_change_color_mode(), progress_indicator_get_range(), progress_indicator_set_cancel_callback(), progress_indicator_set_progress(), progress_indicator_set_range(), progress_indicator_set_status_text(), push_download_URL_progress_notification(), push_hint_notification(), push_notification_data(), push_plater_warning_notification(), push_plugin_missing_notification(), push_slicing_warning_notification(), push_updated_item_info_notification(), push_upload_job_notification(), remove_notification_of_type(), remove_simplify_suggestion_of_released_objects(), remove_simplify_suggestion_with_id(), remove_slicing_warnings_of_released_objects(), render_notifications(), set_all_slicing_errors_gray(), set_all_slicing_warnings_gray(), set_download_URL_canceled(), set_download_URL_error(), set_download_URL_paused(), set_download_URL_progress(), set_fff(), set_in_preview(), set_scale(), set_sidebar_collapsed(), set_simplify_suggestion_multiline(), set_slicing_complete_print_time(), set_slicing_progress_began(), set_slicing_progress_canceled(), set_slicing_progress_export_possible(), set_slicing_progress_hidden(), set_slicing_progress_percentage(), set_upload_job_notification_percentage(), sort_notifications(), update_notifications(), update_slicing_notif_dailytips(), upload_job_notification_show_canceled(), and upload_job_notification_show_error().

◆ m_scale

float Slic3r::GUI::NotificationManager::m_scale = 1.0f

Referenced by render_notifications(), and set_scale().

◆ m_to_delete_after_finish_render

PopNotification* Slic3r::GUI::NotificationManager::m_to_delete_after_finish_render {nullptr}
private
1075{nullptr};

Referenced by push_notification_data(), and render_notifications().

◆ m_used_timestamps

std::unordered_set<int> Slic3r::GUI::NotificationManager::m_used_timestamps
private

Referenced by push_notification_data().

◆ m_waiting_notifications

std::vector<DelayedNotification> Slic3r::GUI::NotificationManager::m_waiting_notifications
private

The documentation for this class was generated from the following files: