mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +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:
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
enum class PluginStatus
|
||||
{
|
||||
// IMPORTANT: ordinal order is the Plugins dialog Status sort priority.
|
||||
Activated,
|
||||
Error,
|
||||
Inactive,
|
||||
Loading
|
||||
};
|
||||
|
||||
inline std::string to_string(PluginStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case PluginStatus::Activated: return "Activated";
|
||||
case PluginStatus::Error: return "Error";
|
||||
case PluginStatus::Inactive: return "Inactive";
|
||||
case PluginStatus::Loading: return "Loading";
|
||||
}
|
||||
|
||||
return "Inactive";
|
||||
}
|
||||
}
|
||||
} // namespace Slic3r::GUI
|
||||
Reference in New Issue
Block a user