mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-01-31 17:08:41 +03:00
Add QIDI model and opptimize user avatars
This commit is contained in:
@@ -242,7 +242,7 @@ AboutDialog::AboutDialog()
|
||||
//B
|
||||
// version
|
||||
{
|
||||
vesizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
|
||||
vesizer->Add(0, FromDIP(190), 1, wxEXPAND, FromDIP(5));
|
||||
auto version_text = GUI_App::format_display_version();
|
||||
#if QDT_INTERNAL_TESTING
|
||||
wxString versionText = QDT_INTERNAL_TESTING == 1 ? _L("Internal Version") : _L("Beta Version");
|
||||
@@ -260,19 +260,19 @@ AboutDialog::AboutDialog()
|
||||
version_font.SetPointSize(FromDIP(16));
|
||||
version->SetFont(version_font);
|
||||
version->SetForegroundColour(wxColour("#FFFFFD"));
|
||||
version->SetBackgroundColour(wxColour("#4479FB"));
|
||||
version->SetBackgroundColour(wxColour("#303ab2"));
|
||||
vesizer->Add(version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
|
||||
#if QDT_INTERNAL_TESTING
|
||||
wxString plugin_version = wxString::Format("Plugin Version: %s", wxGetApp().getAgent() ? wxGetApp().getAgent()->get_version() : "");
|
||||
wxStaticText *plugin_version_text = new wxStaticText(this, wxID_ANY, plugin_version, wxDefaultPosition, wxDefaultSize);
|
||||
plugin_version_text->SetForegroundColour(wxColour("#FFFFFE"));
|
||||
plugin_version_text->SetBackgroundColour(wxColour("#4479FB"));
|
||||
plugin_version_text->SetBackgroundColour(wxColour("#303ab2"));
|
||||
vesizer->Add(plugin_version_text, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
|
||||
|
||||
wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));
|
||||
wxStaticText* build_time_text = new wxStaticText(this, wxID_ANY, build_time, wxDefaultPosition, wxDefaultSize);
|
||||
build_time_text->SetForegroundColour(wxColour("#FFFFFE"));
|
||||
build_time_text->SetBackgroundColour(wxColour("#4479FB"));
|
||||
build_time_text->SetBackgroundColour(wxColour("#303ab2"));
|
||||
vesizer->Add(build_time_text, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
|
||||
#endif
|
||||
vesizer->Add(0, 0, 1, wxEXPAND, FromDIP(5));
|
||||
@@ -331,7 +331,7 @@ AboutDialog::AboutDialog()
|
||||
|
||||
copyright_hor_sizer->Add(copyright_ver_sizer, 0, wxLEFT, FromDIP(20));
|
||||
|
||||
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2021-2024 Lunkuo All Rights Reserved", wxDefaultPosition, wxDefaultSize);
|
||||
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2024 QIDI All Rights Reserved", wxDefaultPosition, wxDefaultSize);
|
||||
html_text->SetForegroundColour(wxColour(107, 107, 107));
|
||||
|
||||
copyright_ver_sizer->Add(html_text, 0, wxALL , 0);
|
||||
|
||||
@@ -96,8 +96,6 @@
|
||||
#include "Notebook.hpp"
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "Widgets/ProgressDialog.hpp"
|
||||
#include <io.h>
|
||||
#include <cstdio>
|
||||
|
||||
//QDS: DailyTip and UserGuide Dialog
|
||||
#include "WebDownPluginDlg.hpp"
|
||||
@@ -3956,18 +3954,9 @@ void GUI_App::get_login_info()
|
||||
{
|
||||
m_user_name = "";
|
||||
wxGetApp().app_config->set("user_token", "");
|
||||
wxGetApp().app_config->set("user_head_url", "");
|
||||
wxGetApp().app_config->set("user_head_name", "");
|
||||
wxString user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
|
||||
wxString strJS = wxString::Format("SetUserOffline()");
|
||||
GUI::wxGetApp().run_script_left(strJS);
|
||||
//y34
|
||||
std::ifstream file(user_head_path);
|
||||
if (file.good())
|
||||
{
|
||||
file.close();
|
||||
remove(user_head_path.c_str());
|
||||
}
|
||||
m_qidi_login = false;
|
||||
}
|
||||
else
|
||||
@@ -4003,22 +3992,8 @@ void GUI_App::get_login_info()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string head_name = wxGetApp().app_config->get("user_head_name");
|
||||
//y34
|
||||
if (!head_name.empty())
|
||||
{
|
||||
wxString user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
|
||||
std::ifstream file(user_head_path);
|
||||
if (file.good())
|
||||
{
|
||||
file.close();
|
||||
remove(user_head_path.c_str());
|
||||
}
|
||||
}
|
||||
m_user_name = "";
|
||||
wxGetApp().app_config->set("user_token", "");
|
||||
wxGetApp().app_config->set("user_head_url", "");
|
||||
wxGetApp().app_config->set("user_head_name", "");
|
||||
wxString strJS = wxString::Format("SetUserOffline()");
|
||||
GUI::wxGetApp().run_script_left(strJS);
|
||||
m_qidi_login = false;
|
||||
|
||||
@@ -500,7 +500,7 @@ wxMenu* MenuFactory::append_submenu_add_generic(wxMenu* menu, ModelVolumeType ty
|
||||
//B
|
||||
if (type == ModelVolumeType::INVALID) {
|
||||
sub_menu->AppendSeparator();
|
||||
for (auto &item : { L("3DBenchy"), L("ksr FDMTest")}) {
|
||||
for (auto &item : { L("QIDI"), L("3DBenchy"), L("ksr FDMTest")}) {
|
||||
append_menu_item(
|
||||
sub_menu, wxID_ANY, _(item), "", [type, item](wxCommandEvent &) { obj_list()->load_generic_subobject(item, type); }, "", menu);
|
||||
}
|
||||
|
||||
@@ -2106,6 +2106,9 @@ static TriangleMesh create_mesh(const std::string& type_name, const BoundingBoxf
|
||||
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/torus.stl").c_str(), true, nullptr);
|
||||
else if (type_name == "Rounded Rectangle")
|
||||
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/rounded_rectangle.stl").c_str(), true, nullptr);
|
||||
//ZY3
|
||||
else if (type_name == "QIDI")
|
||||
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/QIDI.stl").c_str(), true, nullptr);
|
||||
else if (type_name == "3DBenchy")
|
||||
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/3DBenchy.stl").c_str(), true, nullptr);
|
||||
else if (type_name == "ksr FDMTest")
|
||||
|
||||
@@ -1950,6 +1950,9 @@ bool MainFrame::get_enable_print_status()
|
||||
{
|
||||
enable = false;
|
||||
}
|
||||
//y37
|
||||
if(m_plater->only_gcode_mode())
|
||||
enable = false;
|
||||
enable = enable && !is_all_plates;
|
||||
}
|
||||
else if (m_print_select == eExportGcode)
|
||||
|
||||
@@ -1317,7 +1317,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater, wxString title)
|
||||
// wxString hyperlink_1 = wxString::Format(L"https://wiki.qidi3d.com/%s/software/qidi-studio/fluidd", region);
|
||||
// m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you can't connect to the printer"), hyperlink_1, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
wxString hyperlink_2 = wxString::Format(L"https://wiki.qidi3d.com/%s/software/qidi-studio/troubleshooting/connect-send-problem", region);
|
||||
m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you failed to send the task"), hyperlink_2, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you failed to send the print job"), hyperlink_2, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
|
||||
hyperlink_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
m_sizer_prepare->Add(hyperlink_sizer, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
@@ -492,12 +492,12 @@ wxBitmap create_scaled_bitmap_of_login(const std::string& bmp_name_in,
|
||||
Slic3r::GUI::wxGetApp().dark_mode();
|
||||
|
||||
// Try loading an SVG first, then PNG if SVG is not found:
|
||||
wxBitmap* bmp;
|
||||
wxBitmap* bmp{nullptr};
|
||||
if(!bmp_name.empty())
|
||||
bmp = cache.load_login_png(bmp_name, width, height, grayscale, resize ? win->FromDIP(10) * 0.1f : 0.f);
|
||||
else
|
||||
{
|
||||
if(px_cnt > 50)
|
||||
if (px_cnt > 50)
|
||||
bmp = cache.load_png("user_dark", width, height, grayscale, resize ? win->FromDIP(10) * 0.1f : 0.f);
|
||||
else
|
||||
{
|
||||
@@ -505,11 +505,8 @@ wxBitmap create_scaled_bitmap_of_login(const std::string& bmp_name_in,
|
||||
bmp = cache.load_png("user_dark_tiny", width, height, grayscale, resize ? win->FromDIP(10) * 0.1f : 0.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (bmp == nullptr) {
|
||||
// Neither SVG nor PNG has been found, raise error
|
||||
if (bmp == nullptr)
|
||||
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
||||
}
|
||||
|
||||
return *bmp;
|
||||
}
|
||||
|
||||
@@ -175,10 +175,9 @@ wxString OctoPrint::get_test_ok_msg () const
|
||||
|
||||
wxString OctoPrint::get_test_failed_msg (wxString &msg) const
|
||||
{
|
||||
return GUI::from_u8((boost::format("%s: %s\n\n%s")
|
||||
% _utf8(L("Could not connect to OctoPrint"))
|
||||
% std::string(msg.ToUTF8())
|
||||
% _utf8(L("Note: OctoPrint version at least 1.1.0 is required."))).str());
|
||||
return GUI::from_u8((boost::format("%s: %s\n")
|
||||
% _utf8(L("Could not connect to Moonraker"))
|
||||
% std::string(msg.ToUTF8())).str());
|
||||
}
|
||||
|
||||
bool OctoPrint::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const
|
||||
|
||||
Reference in New Issue
Block a user