590{
591 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
592 wxBoxSizer *bSizer_printing_title = new wxBoxSizer(wxHORIZONTAL);
593
596
599
601
603 bSizer_printing_title->Add(0, 0, 1, wxEXPAND, 0);
604
608
612
613 wxBoxSizer *bSizer_subtask_info = new wxBoxSizer(wxVERTICAL);
614 wxBoxSizer *bSizer_task_name = new wxBoxSizer(wxVERTICAL);
615 wxBoxSizer *bSizer_task_name_hor = new wxBoxSizer(wxHORIZONTAL);
616 wxPanel* task_name_panel = new wxPanel(parent);
617 task_name_panel->SetBackgroundColour(*wxWHITE);
618
622 #ifdef __WXOSX_MAC__
624 #else
625 m_staticText_subtask_value->SetFont(wxFont(13, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxT(
"HarmonyOS Sans SC")));
626 #endif
628
630
635
636
638
639
644
648 bSizer_task_name_hor->Add(0, 0, 0, wxLEFT, FromDIP(10));
651 bSizer_task_name_hor->Add(0, 0, 0, wxRIGHT, FromDIP(10));
652
653
654 task_name_panel->SetSizer(bSizer_task_name_hor);
655 task_name_panel->Layout();
656 task_name_panel->Fit();
657
658 bSizer_task_name->Add(task_name_panel, 0, wxEXPAND, FromDIP(5));
659
660
663#ifdef __WXOSX_MAC__
665#else
666 m_staticText_profile_value->SetFont(wxFont(11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxT(
"HarmonyOS Sans SC")));
667#endif
668
670
671 auto progress_lr_panel = new wxPanel(parent, wxID_ANY);
672 progress_lr_panel->SetBackgroundColour(*wxWHITE);
673
677
678 wxBoxSizer *bSizer_task_btn = new wxBoxSizer(wxHORIZONTAL);
679
680 bSizer_task_btn->Add(FromDIP(10), 0, 0);
681
682 StateColor white_bg(std::pair<wxColour, int>(wxColour(255, 255, 255),
StateColor::Disabled), std::pair<wxColour, int>(wxColour(255, 255, 255),
StateColor::Pressed),
683 std::pair<wxColour, int>(wxColour(255, 255, 255),
StateColor::Hovered), std::pair<wxColour, int>(wxColour(255, 255, 255),
StateColor::Enabled),
685
686 m_button_partskip =
new Button(progress_lr_panel, wxEmptyString,
"print_control_partskip_disable", 0, 16, wxID_ANY);
697
698 m_button_pause_resume =
new ScalableButton(progress_lr_panel, wxID_ANY,
"print_control_pause", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER,
true);
699
703 }
704
707 }
708 });
709
714 }
715
718 }
719 });
720
721 m_button_abort =
new ScalableButton(progress_lr_panel, wxID_ANY,
"print_control_stop", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER,
true);
723
726 });
727
730 );
731
732 wxBoxSizer *bSizer_buttons = new wxBoxSizer(wxHORIZONTAL);
733 wxBoxSizer *bSizer_text = new wxBoxSizer(wxHORIZONTAL);
734 wxBoxSizer *bSizer_finish_time = new wxBoxSizer(wxHORIZONTAL);
735 wxPanel* penel_text = new wxPanel(progress_lr_panel);
736 wxPanel* penel_finish_time = new wxPanel(progress_lr_panel);
737
738 penel_text->SetBackgroundColour(*wxWHITE);
739 penel_finish_time->SetBackgroundColour(*wxWHITE);
740
741 wxBoxSizer *sizer_percent = new wxBoxSizer(wxVERTICAL);
742 sizer_percent->Add(0, 0, 1, wxEXPAND, 0);
743
744 wxBoxSizer *sizer_percent_icon = new wxBoxSizer(wxVERTICAL);
745 sizer_percent_icon->Add(0, 0, 1, wxEXPAND, 0);
746
747
752
757
759
760 #ifdef __WXOSX_MAC__
762 #else
764 #endif
765
766
769 m_staticText_progress_left->SetFont(wxFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxT(
"HarmonyOS Sans SC")));
771
773 m_staticText_layers->SetFont(wxFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxT(
"HarmonyOS Sans SC")));
776
777 bSizer_text->Add(sizer_percent, 0, wxEXPAND, 0);
778 bSizer_text->Add(sizer_percent_icon, 0, wxEXPAND, 0);
779 bSizer_text->Add(0, 0, 1, wxEXPAND, 0);
781 bSizer_text->Add(0, 0, 0, wxLEFT, FromDIP(20));
783
786 wxBoxSizer *printingstage_vertical_sizer = new wxBoxSizer(wxVERTICAL);
787 wxBoxSizer *printingstage_horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
788
794
798#ifdef __WXOSX_MAC__
800#else
801 m_printing_stage_value->SetFont(wxFont(11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxT(
"HarmonyOS Sans SC")));
802#endif
804
806
808 auto *dev_manager = wxGetApp().getDeviceManager();
809 MachineObject *obj = dev_manager ? dev_manager->get_selected_machine() : nullptr;
810 if (obj && obj->stage_curr == 58) {
813 } else {
816 }
818 Layout();
819 event.Skip();
820 });
822 auto *dev_manager = wxGetApp().getDeviceManager();
823 MachineObject *obj = dev_manager ? dev_manager->get_selected_machine() : nullptr;
824 if (obj && obj->stage_curr == 58) {
827 }
829 Layout();
830 event.Skip();
831 });
832
833
834 penel_text->SetSizer(bSizer_text);
835 penel_text->Layout();
836
837
838
845 auto *dev_manager = wxGetApp().getDeviceManager();
846 MachineObject *obj = dev_manager ? dev_manager->get_selected_machine() : nullptr;
847 if (obj && obj->stage_curr == 58) {
850 }
851 event.Skip();
852 });
854 auto *dev_manager = wxGetApp().getDeviceManager();
855 MachineObject *obj = dev_manager ? dev_manager->get_selected_machine() : nullptr;
856 if (obj && obj->stage_curr == 58) {
859 event.Skip();
860 }
861 });
862
863 printingstage_horizontal_sizer->Add(
m_printing_stage_value, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 0);
864 printingstage_horizontal_sizer->Add(
m_question_button, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(5));
865 printingstage_vertical_sizer->Add(printingstage_horizontal_sizer, 0, wxALIGN_CENTER_VERTICAL, 0);
868
869
873 wxFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("HarmonyOS Sans SC")));
876 bSizer_finish_time->Add(0, 0, 1, wxEXPAND, 0);
878
879 penel_finish_time->SetSizer(bSizer_finish_time);
880 penel_finish_time->Layout();
881
882 auto progress_lr_sizer = new wxBoxSizer(wxHORIZONTAL);
883 auto progress_left_sizer = new wxBoxSizer(wxVERTICAL);
884 auto progress_right_sizer = new wxBoxSizer(wxHORIZONTAL);
885
886 progress_left_sizer->Add(penel_text, 0, wxEXPAND | wxALL, 0);
887 progress_left_sizer->Add(
m_gauge_progress, 0, wxEXPAND | wxTOP | wxBOTTOM, FromDIP(10));
888
889
890 progress_left_sizer->Add(penel_finish_time, 0, wxEXPAND |wxALL, 0);
891
892
893 progress_right_sizer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(18));
894 progress_right_sizer->Add(
m_button_partskip, 0, wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(0));
895 progress_right_sizer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(18));
897 progress_right_sizer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(18));
898 progress_right_sizer->Add(
m_button_abort, 0, wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(0));
899 progress_right_sizer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(18));
900
901 progress_lr_sizer->Add(progress_left_sizer, 1, wxEXPAND | wxALL, 0);
902 progress_lr_sizer->Add(progress_right_sizer, 0, wxEXPAND | wxALL , 0);
903
904 progress_lr_panel->SetSizer(progress_lr_sizer);
905 progress_lr_panel->SetMaxSize(wxSize(FromDIP(720), -1));
906
907 progress_lr_panel->Layout();
908 progress_lr_panel->Fit();
909
910 bSizer_subtask_info->Add(0, 0, 0, wxEXPAND | wxTOP, FromDIP(14));
911 bSizer_subtask_info->Add(bSizer_task_name, 0, wxEXPAND|wxRIGHT, FromDIP(18));
913 bSizer_subtask_info->Add(progress_lr_panel, 0, wxEXPAND | wxTOP, FromDIP(5));
914
920
922 m_staticline->SetBackgroundColour(wxColour(238,238,238));
925
928
929 wxBoxSizer *static_text_sizer = new wxBoxSizer(wxHORIZONTAL);
930
933 static_text_sizer->Add(
m_error_text, 1, wxEXPAND | wxLEFT, FromDIP(17));
934
937
938 static_text_sizer->Add( FromDIP(10), 0, 0, 0, 0 );
939 static_text_sizer->Add(
m_button_clean, 0, wxALIGN_CENTRE_VERTICAL|wxRIGHT, FromDIP(5));
940
943
945 sizer->Add(0, FromDIP(12), 0);
947 sizer->Add(0, 0, 0, wxTOP, FromDIP(15));
948 sizer->Add(
m_staticline, 0, wxEXPAND | wxALL, FromDIP(10));
950 sizer->Add(0, FromDIP(12), 0);
951
956 sizer->Add(0, 0, 0, wxTOP, FromDIP(15));
960 wxBoxSizer *static_request_failed_panel_sizer = new wxBoxSizer(wxHORIZONTAL);
966
969
970 static_request_failed_panel_sizer->Add(0, 0, 1, wxEXPAND, 0);
975
976
979
980 wxBoxSizer * static_score_sizer = new wxBoxSizer(wxVERTICAL);
982 static_score_text->Wrap(-1);
983 static_score_sizer->Add(static_score_text, 1, wxEXPAND | wxALL, FromDIP(10));
989
991 wxBoxSizer *static_score_star_sizer = new wxBoxSizer(wxHORIZONTAL);
995 wxBU_EXACTFIT | wxNO_BORDER, true, 26);
996 m_score_star[i]->SetMinSize(wxSize(FromDIP(26), FromDIP(26)));
997 m_score_star[i]->SetMaxSize(wxSize(FromDIP(26), FromDIP(26)));
998 m_score_star[i]->Bind(wxEVT_LEFT_DOWN, [
this, i](
auto &e) {
1000 ScalableBitmap light_star = ScalableBitmap(nullptr, "score_star_light", 26);
1004 break;
1005 }
1006 }
1008 ScalableBitmap dark_star = ScalableBitmap(nullptr, "score_star_dark", 26);
1010 }
1013 });
1014 static_score_star_sizer->Add(
m_score_star[i], 1, wxEXPAND | wxLEFT, FromDIP(5));
1015 }
1016
1020
1021 static_score_star_sizer->Add(0, 0, 1, wxEXPAND, 0);
1023 static_score_sizer->Add(static_score_star_sizer, 0, wxEXPAND, FromDIP(10));
1025
1029
1031 sizer->Add(0, FromDIP(12), 0);
1032
1036 task_name_panel->Hide();
1038 }
1039
1040 parent->SetSizer(sizer);
1041 parent->Layout();
1042 parent->Fit();
1043}
#define LB_AUTO_WRAP
Definition Label.hpp:12
#define _L(s)
Definition OBJ.cpp:34
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
#define PROGRESSBAR_HEIGHT
Definition StatusPanel.cpp:178
#define TASK_THUMBNAIL_SIZE
Definition StatusPanel.cpp:181
#define PAGE_TITLE_HEIGHT
Definition StatusPanel.cpp:168
#define PAGE_TITLE_LEFT_MARGIN
Definition StatusPanel.cpp:170
#define PAGE_MIN_WIDTH
Definition StatusPanel.cpp:177
static wxFont Body_13
Definition Label.hpp:54
static wxFont Head_18
Definition Label.hpp:42
static wxFont Body_11
Definition Label.hpp:57
static wxFont Body_12
Definition Label.hpp:55
static wxFont Body_10
Definition Label.hpp:56
const wxBitmap & bmp() const
Definition wxExtensions.hpp:189
wxStaticText * m_staticText_subtask_value
Definition StatusPanel.hpp:308
ScalableButton * m_button_abort
Definition StatusPanel.hpp:327
ScalableBitmap m_bitmap_use_weight
Definition StatusPanel.hpp:299
wxPanel * m_staticline
Definition StatusPanel.hpp:303
std::vector< ScalableButton * > m_score_star
Definition StatusPanel.hpp:340
Button * m_button_market_retry
Definition StatusPanel.hpp:331
ScalableButton * m_button_pause_resume
Definition StatusPanel.hpp:326
wxPanel * m_panel_error_txt
Definition StatusPanel.hpp:304
Label * m_error_text
Definition StatusPanel.hpp:348
wxStaticText * m_has_rated_prompt
Definition StatusPanel.hpp:320
wxPanel * m_score_staticline
Definition StatusPanel.hpp:333
bool m_star_count_dirty
Definition StatusPanel.hpp:341
ProgressBar * m_gauge_progress
Definition StatusPanel.hpp:347
wxStaticText * m_staticText_profile_value
Definition StatusPanel.hpp:313
wxStaticText * m_staticText_progress_percent
Definition StatusPanel.hpp:314
ScalableBitmap m_bitmap_use_time
Definition StatusPanel.hpp:298
wxStaticText * m_staticText_printing
Definition StatusPanel.hpp:307
Button * m_button_market_scoring
Definition StatusPanel.hpp:329
wxPanel * m_score_subtask_info
Definition StatusPanel.hpp:332
ScalableBitmap m_thumbnail_placeholder
Definition StatusPanel.hpp:295
wxStaticBitmap * m_bitmap_static_use_time
Definition StatusPanel.hpp:324
wxStaticText * m_staticText_consumption_of_weight
Definition StatusPanel.hpp:310
wxPanel * m_printing_stage_underline
Definition StatusPanel.hpp:335
wxStaticText * m_staticText_layers
Definition StatusPanel.hpp:319
wxStaticText * m_staticText_progress_left
Definition StatusPanel.hpp:316
wxStaticText * m_staticText_consumption_of_time
Definition StatusPanel.hpp:309
wxPanel * m_printing_stage_panel
Definition StatusPanel.hpp:336
Button * m_button_partskip
Definition StatusPanel.hpp:328
wxPanel * m_panel_printing_title
Definition StatusPanel.hpp:302
wxStaticText * m_request_failed_info
Definition StatusPanel.hpp:321
wxBoxSizer * m_printing_sizer
Definition StatusPanel.hpp:306
wxPanel * m_request_failed_panel
Definition StatusPanel.hpp:334
wxStaticText * m_staticText_progress_end
Definition StatusPanel.hpp:318
wxStaticText * m_staticText_progress_percent_icon
Definition StatusPanel.hpp:315
Button * m_button_clean
Definition StatusPanel.hpp:330
wxStaticBitmap * m_bitmap_static_use_weight
Definition StatusPanel.hpp:325
int m_star_count
Definition StatusPanel.hpp:339
wxStaticText * m_printing_stage_value
Definition StatusPanel.hpp:311
void on_stage_clicked(wxMouseEvent &event)
Definition StatusPanel.cpp:1213
@ Hovered
Definition StateColor.hpp:20
@ Normal
Definition StateColor.hpp:16
@ Disabled
Definition StateColor.hpp:22
@ Pressed
Definition StateColor.hpp:21
@ Enabled
Definition StateColor.hpp:17
wxMouseEvent
Definition CameraPopup.cpp:47
static const wxColour STATUS_TITLE_BG
Definition StatusPanel.cpp:140
static wxColour PAGE_TITLE_FONT_COL
Definition StatusPanel.cpp:160
@ ProgressBar
Definition NotificationManager.hpp:112
@ CALIBRATION
Definition StatusPanel.hpp:100
static const wxColour STAGE_TEXT_COL
Definition StatusPanel.cpp:152
#define _L_CONTEXT(s, ctx)
Definition I18N.hpp:15