Files
OrcaSlicer/src/slic3r/GUI/DeviceTab/uiDeviceUpdateVersion.h
Dipl.-Ing. Raoul Rubien, BSc 23bd320076 Fixes 2 Bugs and 13 Compiler Warnings (#10670)
* fixes: %g directive writing between 1 and 13 bytes into a region of size between 6 and 18 [-Wformat-overflow=]

* fixes: %5s directive writing between 5 and 63 bytes into a region of size 58 [-Wformat-overflow=]

* fixes: catching polymorphic type by value [-Wcatch-value=]

* fixes: [-Wcomment]; removes whitespaces

* increases buffer size from 71B to 90B to avoid potential ovfl.
2026-08-05 21:41:04 +08:00

48 lines
1.4 KiB
C++

/**********************************************************
* File: uiDeviceUpdateVersion.h
* Description: The panel with firmware info
*
* \n class uiDeviceUpdateVersion
**********************************************************/
#pragma once
#include <wx/panel.h>
#include "slic3r/GUI/wxExtensions.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
// Previous defintions
class wxStaticText;
class wxStaticBitmap;
namespace Slic3r::GUI
{
// @Class uiDeviceUpdateVersion
// @Note The panel with firmware info
class uiDeviceUpdateVersion : public wxPanel
{
public:
uiDeviceUpdateVersion(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL);
~uiDeviceUpdateVersion() = default;
public:
void UpdateInfo(const DevFirmwareVersionInfo& info);
private:
void CreateWidgets();
void SetName(const wxString& str) { m_dev_name->SetLabel(str); };
void SetSerial(const wxString& str) { m_dev_snl->SetLabel(str); };
void SetVersion(const wxString& cur_version, const wxString& latest_version);
private:
wxStaticText* m_dev_name;
wxStaticText* m_dev_snl;
wxStaticText* m_dev_version;
wxStaticBitmap* m_dev_upgrade_indicator;
};
};// end of namespace Slic3r::GUI