mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-01-30 16:38:41 +03:00
Merge pull request #121 from Rudokhvist/debug
Fix build issues. Closes #120
This commit is contained in:
@@ -4287,15 +4287,18 @@ wxString GUI_App::transition_tridid(int trid_id) const
|
|||||||
//QDS
|
//QDS
|
||||||
void GUI_App::request_login(bool show_user_info)
|
void GUI_App::request_login(bool show_user_info)
|
||||||
{
|
{
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
ShowUserLogin();
|
ShowUserLogin();
|
||||||
|
|
||||||
if (show_user_info) {
|
if (show_user_info) {
|
||||||
get_login_info();
|
get_login_info();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI_App::get_login_info()
|
void GUI_App::get_login_info()
|
||||||
{
|
{
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
// if (m_agent) {
|
// if (m_agent) {
|
||||||
// if (m_agent->is_user_login()) {
|
// if (m_agent->is_user_login()) {
|
||||||
// std::string login_cmd = m_agent->build_login_cmd();
|
// std::string login_cmd = m_agent->build_login_cmd();
|
||||||
@@ -4368,13 +4371,16 @@ void GUI_App::get_login_info()
|
|||||||
GUI::wxGetApp().run_script_left(strJS);
|
GUI::wxGetApp().run_script_left(strJS);
|
||||||
m_qidi_login = false;
|
m_qidi_login = false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GUI_App::is_user_login()
|
bool GUI_App::is_user_login()
|
||||||
{
|
{
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
if (m_agent) {
|
if (m_agent) {
|
||||||
return m_agent->is_user_login();
|
return m_agent->is_user_login();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4382,6 +4388,7 @@ bool GUI_App::is_user_login()
|
|||||||
bool GUI_App::check_login()
|
bool GUI_App::check_login()
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
if (m_agent) {
|
if (m_agent) {
|
||||||
result = m_agent->is_user_login();
|
result = m_agent->is_user_login();
|
||||||
}
|
}
|
||||||
@@ -4389,6 +4396,7 @@ bool GUI_App::check_login()
|
|||||||
if (!result) {
|
if (!result) {
|
||||||
ShowUserLogin();
|
ShowUserLogin();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5150,10 +5158,13 @@ void GUI_App::check_update(bool show_tips, int by_user)
|
|||||||
//B y41
|
//B y41
|
||||||
void GUI_App::check_new_version(bool show_tips, int by_user)
|
void GUI_App::check_new_version(bool show_tips, int by_user)
|
||||||
{
|
{
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
QIDINetwork qidi;
|
QIDINetwork qidi;
|
||||||
qidi.check_new_version(show_tips, by_user);
|
qidi.check_new_version(show_tips, by_user);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
void GUI_App::update_versioninfo(QIDIVersion version)
|
void GUI_App::update_versioninfo(QIDIVersion version)
|
||||||
{
|
{
|
||||||
version_info.url = version.url;
|
version_info.url = version.url;
|
||||||
@@ -5161,7 +5172,7 @@ void GUI_App::update_versioninfo(QIDIVersion version)
|
|||||||
version_info.description = version.description;
|
version_info.description = version.description;
|
||||||
version_info.force_upgrade = version.force_upgrade;
|
version_info.force_upgrade = version.force_upgrade;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//QDS pop up a dialog and download files
|
//QDS pop up a dialog and download files
|
||||||
void GUI_App::request_new_version(int by_user)
|
void GUI_App::request_new_version(int by_user)
|
||||||
|
|||||||
@@ -271,8 +271,9 @@ private:
|
|||||||
wxColour m_color_selected_btn_bg;
|
wxColour m_color_selected_btn_bg;
|
||||||
bool m_force_colors_update { false };
|
bool m_force_colors_update { false };
|
||||||
//#endif
|
//#endif
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
std::vector<Device> m_devices;
|
std::vector<Device> m_devices;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> m_mode_palette;
|
std::vector<std::string> m_mode_palette;
|
||||||
|
|
||||||
@@ -437,9 +438,10 @@ public:
|
|||||||
#endif //_MSW_DARK_MODE
|
#endif //_MSW_DARK_MODE
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
std::vector<Device> get_devices() { return m_devices; };
|
std::vector<Device> get_devices() { return m_devices; };
|
||||||
void set_devices(std::vector<Device> devices) { m_devices = devices; };
|
void set_devices(std::vector<Device> devices) { m_devices = devices; };
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const wxFont& small_font() { return m_small_font; }
|
const wxFont& small_font() { return m_small_font; }
|
||||||
@@ -724,7 +726,9 @@ public:
|
|||||||
const ColorRGB& get_picking_color() const;
|
const ColorRGB& get_picking_color() const;
|
||||||
|
|
||||||
//y
|
//y
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
void update_versioninfo(QIDIVersion version);
|
void update_versioninfo(QIDIVersion version);
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int updating_qidi_networking();
|
int updating_qidi_networking();
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
#include <slic3r/GUI/CreatePresetsDialog.hpp>
|
#include <slic3r/GUI/CreatePresetsDialog.hpp>
|
||||||
|
|
||||||
//y
|
//y
|
||||||
#ifdef QDT_RELEASE_TO_PUBLIC
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
#include "../QIDI/QIDINetwork.hpp"
|
#include "../QIDI/QIDINetwork.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
#include <wx/tokenzr.h>
|
#include <wx/tokenzr.h>
|
||||||
|
|
||||||
//B64
|
//B64
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
#include "../QIDI/QIDINetwork.hpp"
|
#include "../QIDI/QIDINetwork.hpp"
|
||||||
|
#endif
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include "./Widgets/SwitchButton.hpp"
|
#include "./Widgets/SwitchButton.hpp"
|
||||||
#include "./Widgets/DeviceButton.hpp"
|
#include "./Widgets/DeviceButton.hpp"
|
||||||
|
|||||||
@@ -352,7 +352,9 @@ private:
|
|||||||
Machine_info select_machine;
|
Machine_info select_machine;
|
||||||
|
|
||||||
//w42
|
//w42
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
Box_info machine_filament_info;
|
Box_info machine_filament_info;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool has_box_machine = false;
|
bool has_box_machine = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1886,6 +1886,7 @@ void SendMultiMachinePage::StopThread() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SendMultiMachinePage::ThreadWorker() {
|
void SendMultiMachinePage::ThreadWorker() {
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
QIDINetwork qidi;
|
QIDINetwork qidi;
|
||||||
wxString msg = "";
|
wxString msg = "";
|
||||||
while (!m_stopThread) {
|
while (!m_stopThread) {
|
||||||
@@ -1897,6 +1898,7 @@ void SendMultiMachinePage::ThreadWorker() {
|
|||||||
temp_obj->ams_exist_bits = qidi.get_box_state(msg, temp_obj->dev_url, temp_obj->dev_apikey) ? 1 : 0;
|
temp_obj->ams_exist_bits = qidi.get_box_state(msg, temp_obj->dev_url, temp_obj->dev_apikey) ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendMultiMachinePage::OnClose(wxCloseEvent& event)
|
void SendMultiMachinePage::OnClose(wxCloseEvent& event)
|
||||||
|
|||||||
@@ -3480,6 +3480,7 @@ void GetBoxInfoDialog::synchronization(wxCommandEvent &event)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
void GetBoxInfoDialog::generate_filament_id(GUI::Box_info& machine_filament_info)
|
void GetBoxInfoDialog::generate_filament_id(GUI::Box_info& machine_filament_info)
|
||||||
{
|
{
|
||||||
std::string filament_id = "QD";
|
std::string filament_id = "QD";
|
||||||
@@ -3516,6 +3517,7 @@ void GetBoxInfoDialog::update_filament_info(GUI::Box_info& machine_filament_info
|
|||||||
std::string preset_name_box = wxGetApp().get_tab(Preset::TYPE_PRINTER)->get_presets()->get_edited_preset().name;
|
std::string preset_name_box = wxGetApp().get_tab(Preset::TYPE_PRINTER)->get_presets()->get_edited_preset().name;
|
||||||
m_plater->box_msg.box_list_preset_name = preset_name_box;
|
m_plater->box_msg.box_list_preset_name = preset_name_box;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void GetBoxInfoDialog::cancel(wxCommandEvent &event)
|
void GetBoxInfoDialog::cancel(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -385,9 +385,10 @@ public:
|
|||||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||||
void init_printer_combox();
|
void init_printer_combox();
|
||||||
std::string NormalizeVendor(const std::string& str);
|
std::string NormalizeVendor(const std::string& str);
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
void generate_filament_id(GUI::Box_info& machine_filament_info);
|
void generate_filament_id(GUI::Box_info& machine_filament_info);
|
||||||
void update_filament_info(GUI::Box_info& machine_filament_info);
|
void update_filament_info(GUI::Box_info& machine_filament_info);
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> m_printer_ip;
|
std::vector<std::string> m_printer_ip;
|
||||||
std::vector<std::string> m_printer_api_key;
|
std::vector<std::string> m_printer_api_key;
|
||||||
|
|||||||
@@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||||
|
#if QDT_RELEASE_TO_PUBLIC
|
||||||
#include "../QIDI/QIDINetwork.hpp"
|
#include "../QIDI/QIDINetwork.hpp"
|
||||||
|
#endif
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user