mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-07 07:41:06 +00:00
* Add Missing Includes Across src/slic3r/GUI Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained. * Drop the OS-Specific Includes Added Outside Their Platform Guards GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build. * Add the clang-tidy Configuration That Generated These Includes Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly. * Match Windows Paths in the clang-tidy Ignore List Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
47 lines
1023 B
C++
47 lines
1023 B
C++
#pragma once
|
|
#include <nlohmann/json.hpp>
|
|
#include <string>
|
|
#include "slic3r/Utils/json_diff.hpp"
|
|
|
|
namespace Slic3r {
|
|
|
|
class MachineObject;
|
|
|
|
|
|
class DevStorage
|
|
{
|
|
public:
|
|
DevStorage(MachineObject *obj) : m_owner(obj){}
|
|
|
|
public:
|
|
|
|
enum SdcardState : int {
|
|
NO_SDCARD = 0,
|
|
HAS_SDCARD_NORMAL = 1,
|
|
HAS_SDCARD_ABNORMAL = 2,
|
|
HAS_SDCARD_READONLY = 3,
|
|
SDCARD_STATE_NUM = 4
|
|
};
|
|
|
|
/* sdcard */
|
|
SdcardState get_sdcard_state() const { return m_sdcard_state; };
|
|
SdcardState set_sdcard_state(int state);
|
|
|
|
static void ParseV1_0(const json &print_json, DevStorage *system);
|
|
|
|
bool is_timelapse_storage_low(const std::string& storage) const;
|
|
|
|
private:
|
|
[[maybe_unused]] MachineObject *m_owner;
|
|
SdcardState m_sdcard_state { NO_SDCARD };
|
|
// timelapse storage space info (from device push cam data)
|
|
int tl_internal_free_kb{-1};
|
|
int tl_internal_total_kb{-1};
|
|
int tl_external_free_kb{-1};
|
|
int tl_external_total_kb{-1};
|
|
|
|
|
|
|
|
};
|
|
|
|
} // namespace Slic3r
|