OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
PrinterFileSystem::File Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Printer/PrinterFileSystem.h>

Collaboration diagram for PrinterFileSystem::File:

Public Member Functions

bool IsSelect () const
bool IsDownload () const
int DownloadProgress () const
std::string Title () const
std::string Metadata (std::string const &key, std::string const &dflt) const

Public Attributes

std::string name
std::string path
time_t time = 0
boost::uint64_t size = 0
int flags = 0
wxBitmap thumbnail
std::shared_ptr< Download > download
std::string local_path
std::map< std::string, std::string > metadata

Friends

bool operator< (File const &l, File const &r)

Detailed Description

Member Function Documentation

◆ DownloadProgress()

int PrinterFileSystem::File::DownloadProgress ( ) const
593{ return download ? download->progress : !local_path.empty() ? 100 : -2; }
std::string local_path
Definition PrinterFileSystem.h:160
std::shared_ptr< Download > download
Definition PrinterFileSystem.h:159

References download, and local_path.

◆ IsDownload()

bool PrinterFileSystem::File::IsDownload ( ) const
inline
164{ return flags & FF_DOWNLOAD; }
@ FF_DOWNLOAD
Definition PrinterFileSystem.h:119
int flags
Definition PrinterFileSystem.h:157

References PrinterFileSystem::FF_DOWNLOAD, and flags.

◆ IsSelect()

bool PrinterFileSystem::File::IsSelect ( ) const
inline
163{ return flags & FF_SELECT; }
@ FF_SELECT
Definition PrinterFileSystem.h:117

References PrinterFileSystem::FF_SELECT, and flags.

◆ Metadata()

std::string PrinterFileSystem::File::Metadata ( std::string const & key,
std::string const & dflt ) const
598{
599 auto iter = metadata.find(key);
600 return iter == metadata.end() || iter->second.empty() ? dflt : iter->second;
601}
std::map< std::string, std::string > metadata
Definition PrinterFileSystem.h:161

References metadata.

Referenced by Title().

Here is the caller graph for this function:

◆ Title()

std::string PrinterFileSystem::File::Title ( ) const
595{ return Metadata("Title", ""); }
std::string Metadata(std::string const &key, std::string const &dflt) const
Definition PrinterFileSystem.cpp:597

References Metadata().

Here is the call graph for this function:

◆ operator<

bool operator< ( File const & l,
File const & r )
friend
169{ return l.time > r.time; }

References time.

Member Data Documentation

◆ download

std::shared_ptr<Download> PrinterFileSystem::File::download

Referenced by DownloadProgress().

◆ flags

int PrinterFileSystem::File::flags = 0

Referenced by IsDownload(), and IsSelect().

◆ local_path

std::string PrinterFileSystem::File::local_path

◆ metadata

std::map<std::string, std::string> PrinterFileSystem::File::metadata

◆ name

std::string PrinterFileSystem::File::name

◆ path

std::string PrinterFileSystem::File::path

◆ size

boost::uint64_t PrinterFileSystem::File::size = 0

◆ thumbnail

wxBitmap PrinterFileSystem::File::thumbnail

◆ time

time_t PrinterFileSystem::File::time = 0

Referenced by operator<.


The documentation for this struct was generated from the following files: