2022-07-15 15:37:19 +00:00
|
|
|
#include "NotificationProgressIndicator.hpp"
|
|
|
|
#include "slic3r/GUI/NotificationManager.hpp"
|
|
|
|
|
|
|
|
namespace Slic3r { namespace GUI {
|
|
|
|
|
|
|
|
NotificationProgressIndicator::NotificationProgressIndicator(NotificationManager *nm): m_nm{nm} {}
|
|
|
|
|
2022-12-06 10:08:29 +00:00
|
|
|
void NotificationProgressIndicator::clear_percent()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-05-04 09:52:22 +00:00
|
|
|
void NotificationProgressIndicator::show_error_info(wxString msg, int code, wxString description, wxString extra)
|
2023-03-31 11:34:08 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-07-15 15:37:19 +00:00
|
|
|
void NotificationProgressIndicator::set_range(int range)
|
|
|
|
{
|
|
|
|
m_nm->progress_indicator_set_range(range);
|
|
|
|
}
|
|
|
|
|
|
|
|
void NotificationProgressIndicator::set_cancel_callback(CancelFn fn)
|
|
|
|
{
|
2024-07-24 06:48:05 +00:00
|
|
|
m_cancelfn = std::move(fn);
|
|
|
|
m_nm->progress_indicator_set_cancel_callback(m_cancelfn);
|
2022-07-15 15:37:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void NotificationProgressIndicator::set_progress(int pr)
|
|
|
|
{
|
2024-07-24 06:48:05 +00:00
|
|
|
if (!pr)
|
|
|
|
set_cancel_callback(m_cancelfn);
|
2022-07-15 15:37:19 +00:00
|
|
|
m_nm->progress_indicator_set_progress(pr);
|
|
|
|
}
|
|
|
|
|
|
|
|
void NotificationProgressIndicator::set_status_text(const char *msg)
|
|
|
|
{
|
|
|
|
m_nm->progress_indicator_set_status_text(msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
int NotificationProgressIndicator::get_range() const
|
|
|
|
{
|
|
|
|
return m_nm->progress_indicator_get_range();
|
|
|
|
}
|
|
|
|
|
|
|
|
}} // namespace Slic3r::GUI
|