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:
Andrew
2026-07-02 17:29:54 +08:00
parent 5d8aa9610a
commit b724cb6631
12 changed files with 696 additions and 107 deletions

View 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