mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 01:36:13 +08:00
Fixes and icons.
Sla printer icons with Connect status. Fix of non-static variable and missing includes update of priter_type table missing include
This commit is contained in:
parent
bf8c3e7653
commit
ff64f7167d
2
deps/+wxWidgets/wxWidgets.cmake
vendored
2
deps/+wxWidgets/wxWidgets.cmake
vendored
@ -33,7 +33,7 @@ add_cmake_project(wxWidgets
|
||||
"-DCMAKE_DEBUG_POSTFIX:STRING="
|
||||
-DwxBUILD_PRECOMP=ON
|
||||
${_wx_toolkit}
|
||||
-DwxUSE_MEDIACTRL=ON
|
||||
-DwxUSE_MEDIACTRL=OFF
|
||||
-DwxUSE_DETECT_SM=OFF
|
||||
-DwxUSE_UNICODE=ON
|
||||
-DwxUSE_UNICODE_UTF8=${_unicode_utf8}
|
||||
|
16
resources/icons/sla_printer_available.svg
Normal file
16
resources/icons/sla_printer_available.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
||||
<g id="sla">
|
||||
<rect x="3" y="11" fill="#808080" width="1" height="4"/>
|
||||
<rect x="12" y="11" fill="#808080" width="1" height="4"/>
|
||||
<rect x="7.5" y="6.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 19.5 3.5)" fill="#808080" width="1" height="10"/>
|
||||
<rect x="7.5" y="9.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22.5 6.5)" fill="#808080" width="1" height="10"/>
|
||||
<rect x="10.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 24.5 1.5)" fill="#808080" width="2" height="3"/>
|
||||
<rect x="3.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 17.5 8.5)" fill="#808080" width="2" height="3"/>
|
||||
<rect x="3" y="1" fill="#ED6B21" width="10" height="10"/>
|
||||
<circle fill="#808180" cx="12" cy="12" r="4"/>
|
||||
<circle fill="#7DF028" cx="12" cy="12" r="3.5"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
16
resources/icons/sla_printer_busy.svg
Normal file
16
resources/icons/sla_printer_busy.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
||||
<g id="sla">
|
||||
<rect x="3" y="11" fill="#808080" width="1" height="4"/>
|
||||
<rect x="12" y="11" fill="#808080" width="1" height="4"/>
|
||||
<rect x="7.5" y="6.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 19.5 3.5)" fill="#808080" width="1" height="10"/>
|
||||
<rect x="7.5" y="9.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22.5 6.5)" fill="#808080" width="1" height="10"/>
|
||||
<rect x="10.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 24.5 1.5)" fill="#808080" width="2" height="3"/>
|
||||
<rect x="3.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 17.5 8.5)" fill="#808080" width="2" height="3"/>
|
||||
<rect x="3" y="1" fill="#ED6B21" width="10" height="10"/>
|
||||
<circle fill="#808180" cx="12" cy="12" r="4"/>
|
||||
<circle fill="#FFDC00" cx="12" cy="12" r="3.5"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
16
resources/icons/sla_printer_offline.svg
Normal file
16
resources/icons/sla_printer_offline.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
||||
<g id="sla">
|
||||
<rect x="3" y="11" fill="#808080" width="1" height="4"/>
|
||||
<rect x="12" y="11" fill="#808080" width="1" height="4"/>
|
||||
<rect x="7.5" y="6.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 19.5 3.5)" fill="#808080" width="1" height="10"/>
|
||||
<rect x="7.5" y="9.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22.5 6.5)" fill="#808080" width="1" height="10"/>
|
||||
<rect x="10.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 24.5 1.5)" fill="#808080" width="2" height="3"/>
|
||||
<rect x="3.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 17.5 8.5)" fill="#808080" width="2" height="3"/>
|
||||
<rect x="3" y="1" fill="#ED6B21" width="10" height="10"/>
|
||||
<circle fill="#808180" cx="12" cy="12" r="4"/>
|
||||
<circle fill="#D30000" cx="12" cy="12" r="3.5"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -48,7 +48,7 @@ if (SLIC3R_GUI)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set (wxWidgets_CONFIG_OPTIONS "--toolkit=gtk${SLIC3R_GTK}")
|
||||
endif ()
|
||||
find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl webview media)
|
||||
find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl webview)
|
||||
|
||||
include(${wxWidgets_USE_FILE})
|
||||
|
||||
|
@ -1536,6 +1536,10 @@ bool PageDownloader::on_finish_downloader() const
|
||||
return m_downloader->on_finish();
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
bool DownloaderUtils::Worker::perform_registration_linux = false;
|
||||
#endif // __linux__
|
||||
|
||||
bool DownloaderUtils::Worker::perform_register(const std::string& path)
|
||||
{
|
||||
boost::filesystem::path aux_dest (path);
|
||||
@ -3063,10 +3067,10 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
||||
|
||||
#ifdef __linux__
|
||||
// Desktop integration on Linux
|
||||
BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << page_downloader->m_downloader->get_perform_registration_linux();
|
||||
BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << DownloaderUtils::Worker::perform_registration_linux;
|
||||
if (page_welcome->integrate_desktop())
|
||||
DesktopIntegrationDialog::perform_desktop_integration();
|
||||
if (page_downloader->m_downloader->get_perform_registration_linux())
|
||||
if (DownloaderUtils::Worker::perform_registration_linux)
|
||||
DesktopIntegrationDialog::perform_downloader_desktop_integration();
|
||||
#endif
|
||||
|
||||
|
@ -31,9 +31,6 @@ namespace DownloaderUtils {
|
||||
wxWindow* m_parent{ nullptr };
|
||||
wxTextCtrl* m_input_path{ nullptr };
|
||||
bool downloader_checked{ false };
|
||||
#ifdef __linux__
|
||||
bool perform_registration_linux{ false };
|
||||
#endif // __linux__
|
||||
|
||||
void deregister();
|
||||
|
||||
@ -51,7 +48,7 @@ namespace DownloaderUtils {
|
||||
bool on_finish();
|
||||
static bool perform_register(const std::string& path);
|
||||
#ifdef __linux__
|
||||
bool get_perform_registration_linux() { return perform_registration_linux; }
|
||||
static bool perform_registration_linux;
|
||||
#endif // __linux__
|
||||
};
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
#ifndef slic3r_FreqChangedParams_hpp_
|
||||
#define slic3r_FreqChangedParams_hpp_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Event.hpp"
|
||||
|
||||
class wxButton;
|
||||
|
@ -2640,7 +2640,7 @@ wxMenu* GUI_App::get_config_menu()
|
||||
break;
|
||||
case ConfigMenuMediaDialog:
|
||||
//MediaDialog(nullptr).ShowModal();
|
||||
wxMediaPlayerDialog("Media").ShowModal();
|
||||
//wxMediaPlayerDialog("Media").ShowModal();
|
||||
break;
|
||||
case ConfigMenuConnectDialog:
|
||||
//WebViewDialog(plater()).ShowModal();
|
||||
@ -3194,7 +3194,7 @@ void GUI_App::show_downloader_registration_dialog()
|
||||
auto downloader_worker = new DownloaderUtils::Worker(nullptr);
|
||||
downloader_worker->perform_register(app_config->get("url_downloader_dest"));
|
||||
#ifdef __linux__
|
||||
if (downloader_worker->get_perform_registration_linux())
|
||||
if (DownloaderUtils::Worker::perform_registration_linux)
|
||||
DesktopIntegrationDialog::perform_downloader_desktop_integration();
|
||||
#endif // __linux__
|
||||
} else {
|
||||
|
@ -876,7 +876,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
//auto downloader_worker = new DownloaderUtils::Worker(nullptr);
|
||||
DownloaderUtils::Worker::perform_register(wxGetApp().app_config->get("url_downloader_dest"));
|
||||
#ifdef __linux__
|
||||
if (downloader_worker->get_perform_registration_linux())
|
||||
if (DownloaderUtils::Worker::perform_registration_linux)
|
||||
DesktopIntegrationDialog::perform_downloader_desktop_integration();
|
||||
#endif // __linux__
|
||||
// than open url
|
||||
|
@ -761,7 +761,7 @@ void PreferencesDialog::accept(wxEvent&)
|
||||
if (!downloader->on_finish())
|
||||
return;
|
||||
#ifdef __linux__
|
||||
if( downloader->get_perform_registration_linux())
|
||||
if(DownloaderUtils::Worker::perform_registration_linux)
|
||||
DesktopIntegrationDialog::perform_downloader_desktop_integration();
|
||||
#endif // __linux__
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <wx/panel.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/sizer.h>
|
||||
|
||||
#include "libslic3r/Preset.hpp"
|
||||
#include "GUI.hpp"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
|
||||
namespace pt = boost::property_tree;
|
||||
|
||||
|
@ -70,25 +70,36 @@ private:
|
||||
std::map<std::string, std::string> m_user_data;
|
||||
std::string m_username;
|
||||
|
||||
// first string is "printer_type" code from Connect edpoints
|
||||
const std::map<std::string, std::string> printer_type_and_name_table = {
|
||||
{"1.2.5", "MK2.5" },
|
||||
{"1.2.6", "MK2.5S" },
|
||||
{"1.3.0", "MK3" },
|
||||
{"1.3.1", "MK3S" },
|
||||
{"1.3.5", "MK3.5" },
|
||||
{"1.3.9", "MK3.9" },
|
||||
{"1.4.0", "MK4" },
|
||||
{"2.1.0", "MINI" },
|
||||
{"3.1.0", "XL" },
|
||||
{"5.1.0", "SL1" },
|
||||
// ysFIXME : needs to add Connect ids for next printers
|
||||
{"0.0.0", "MK4IS" },
|
||||
{"0.0.0", "MK3SMMU2S" },
|
||||
{"0.0.0", "MK3MMU2" },
|
||||
{"0.0.0", "MK2.5S" },
|
||||
{"0.0.0", "MK2.5" },
|
||||
{"0.0.0", "MK2.5SMMU2S" },
|
||||
{"0.0.0", "MK2.5MMU2" },
|
||||
{"0.0.0", "MK2S" },
|
||||
{"0.0.0", "MK2SMM" },
|
||||
{"0.0.0", "SL1" },
|
||||
{"0.0.0", "SL1S" },
|
||||
};
|
||||
/* TODO:
|
||||
4 1 0 iXL
|
||||
6 2 0 Trilab DeltiQ 2
|
||||
6 2 1 Trilab DelriQ 2 Plus
|
||||
7 1 0 Trilab AzteQ
|
||||
7 2 0 Trilab AzteQ Industrial
|
||||
7 2 1 Trilab AzteQ Industrial Plus
|
||||
*/
|
||||
|
||||
const std::map<std::string, ConnectPrinterState> printer_state_table = {
|
||||
{"OFFLINE" , ConnectPrinterState::CONNECT_PRINTER_OFFLINE},
|
||||
|
Loading…
x
Reference in New Issue
Block a user