mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Refactoring to allow to quickly build the various options to show the estimated printing time in gcode viewer scene
This commit is contained in:
parent
510e787bc7
commit
8fc5be7e4f
15 changed files with 125 additions and 174 deletions
|
@ -341,13 +341,15 @@ private:
|
|||
Shells m_shells;
|
||||
EViewType m_view_type{ EViewType::FeatureType };
|
||||
bool m_legend_enabled{ true };
|
||||
#if GCODE_VIEWER_TIME_ESTIMATE != TIME_ESTIMATE_NONE
|
||||
PrintEstimatedTimeStatistics m_time_statistics;
|
||||
#if ENABLE_GCODE_VIEWER_MODAL_TIME_ESTIMATE_DIALOG
|
||||
#if GCODE_VIEWER_TIME_ESTIMATE == TIME_ESTIMATE_MODAL
|
||||
mutable bool m_time_estimate_enabled{ false };
|
||||
mutable unsigned int m_time_estimate_frames_count{ 0 };
|
||||
#else
|
||||
bool m_time_estimate_enabled{ false };
|
||||
#endif // ENABLE_GCODE_VIEWER_MODAL_TIME_ESTIMATE_DIALOG
|
||||
#endif // GCODE_VIEWER_TIME_ESTIMATE == TIME_ESTIMATE_MODAL
|
||||
#endif // GCODE_VIEWER_TIME_ESTIMATE != TIME_ESTIMATE_NONE
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
mutable Statistics m_statistics;
|
||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
@ -403,8 +405,10 @@ public:
|
|||
bool is_legend_enabled() const { return m_legend_enabled; }
|
||||
void enable_legend(bool enable) { m_legend_enabled = enable; }
|
||||
|
||||
#if GCODE_VIEWER_TIME_ESTIMATE != TIME_ESTIMATE_NONE
|
||||
bool is_time_estimate_enabled() const { return m_time_estimate_enabled; }
|
||||
void enable_time_estimate(bool enable);
|
||||
#endif // GCODE_VIEWER_TIME_ESTIMATE
|
||||
|
||||
void export_toolpaths_to_obj(const char* filename) const;
|
||||
|
||||
|
@ -416,7 +420,9 @@ private:
|
|||
void render_toolpaths() const;
|
||||
void render_shells() const;
|
||||
void render_legend() const;
|
||||
#if GCODE_VIEWER_TIME_ESTIMATE != TIME_ESTIMATE_NONE
|
||||
void render_time_estimate() const;
|
||||
#endif // GCODE_VIEWER_TIME_ESTIMATE
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
void render_statistics() const;
|
||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue