mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-01 07:12:07 +00:00
ENH: refine ui logic with filament group
1. Add filament group pop up when slice 2. Add more filament modes in filament dialog 3. Add capsule button jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I8bc3a2e08696e406b89e550a0335a1a36728ee65 (cherry picked from commit f1702a5c3604f685a3b35ea0e83d29bdbbd90f70)
This commit is contained in:
54
src/slic3r/GUI/FilamentGroupPopup.hpp
Normal file
54
src/slic3r/GUI/FilamentGroupPopup.hpp
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef FILAMENT_GROUP_HOVER_HPP
|
||||
#define FILAMENT_GROUP_HOVER_HPP
|
||||
|
||||
#include <wx/graphics.h>
|
||||
#include <wx/hyperlink.h>
|
||||
#include "wxExtensions.hpp"
|
||||
#include "Widgets/PopupWindow.hpp"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
bool is_pop_up_required();
|
||||
FilamentMapMode get_prefered_map_mode();
|
||||
|
||||
class FilamentGroupPopup : public PopupWindow
|
||||
{
|
||||
public:
|
||||
FilamentGroupPopup(wxWindow *parent);
|
||||
void tryPopup(bool connect_status);
|
||||
void tryClose();
|
||||
|
||||
FilamentMapMode GetSelectedMode() const { return m_mode; }
|
||||
|
||||
private:
|
||||
void StartTimer();
|
||||
void ResetTimer();
|
||||
|
||||
void OnRadioBtn(wxCommandEvent &event);
|
||||
void OnLeaveWindow(wxMouseEvent &);
|
||||
void OnEnterWindow(wxMouseEvent &);
|
||||
void OnTimer(wxTimerEvent &event);
|
||||
void OnRemindBtn(wxCommandEvent &event);
|
||||
|
||||
void Init(bool connect_status);
|
||||
void UpdateButtonStatus(int hover_idx = -1);
|
||||
void DrawRoundedCorner(int radius);
|
||||
|
||||
private:
|
||||
enum ButtonType { btForFlush, btForMatch, btManual, btCount };
|
||||
|
||||
const std::vector<FilamentMapMode> mode_list = {fmmAutoForFlush, fmmAutoForMatch, fmmManual};
|
||||
|
||||
FilamentMapMode m_mode;
|
||||
wxTimer *m_timer;
|
||||
|
||||
std::vector<wxBitmapButton *> radio_btns;
|
||||
std::vector<wxStaticText *> button_labels;
|
||||
std::vector<wxStaticText *> button_desps;
|
||||
std::vector<wxStaticText *> detail_infos;
|
||||
|
||||
wxStaticText *wiki_link;
|
||||
wxCheckBox *remind_checkbox;
|
||||
};
|
||||
}} // namespace Slic3r::GUI
|
||||
#endif
|
||||
Reference in New Issue
Block a user