mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-30 22:32:07 +00:00
Implement plugin sorting functionality
Add support for sorting plugins by status, name, or source in both ascending and descending order.
This commit is contained in:
29
src/slic3r/GUI/PluginSource.hpp
Normal file
29
src/slic3r/GUI/PluginSource.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
enum class PluginSource
|
||||
{
|
||||
// IMPORTANT: ordinal order is the Plugins dialog Source sort priority.
|
||||
Mine,
|
||||
Subscribed,
|
||||
Local
|
||||
};
|
||||
|
||||
inline std::string to_string(PluginSource source)
|
||||
{
|
||||
switch (source)
|
||||
{
|
||||
case PluginSource::Mine: return "mine";
|
||||
case PluginSource::Subscribed: return "subscribed";
|
||||
case PluginSource::Local: return "local";
|
||||
}
|
||||
|
||||
return "local";
|
||||
}
|
||||
}
|
||||
} // namespace Slic3r::GUI
|
||||
Reference in New Issue
Block a user