Loading...
Searching...
No Matches
Library::LibraryInterface Class Reference
Inheritance diagram for Library::LibraryInterface:
score::InterfaceBase Clap::LibraryHandler Faust::LibraryHandler Gfx::CSF::LibraryHandler Gfx::Filter::LibraryHandler Gfx::GeometryFilter::LibraryHandler Gfx::RawRasterLibraryHandler Gfx::VSA::LibraryHandler Gfx::Video::LibraryHandler JS::ConsoleLibraryHandler JS::LibraryHandler JS::ModuleLibraryHandler LV2::LibraryHandler Library::LibraryDocumentLoader Library::PresetLibraryHandler Media::Sound::LibraryHandler Patternist::LibraryHandler Pd::LibraryHandler Protocols::OSCLibraryHandler Scenario::ScenarioLibraryHandler Scenario::SlotLibraryHandler YSFX::LibraryHandler vst3::LibraryHandler vst::LibraryHandler

Public Member Functions

virtual QSet< QString > acceptedFiles () const noexcept
 
virtual QSet< QString > acceptedMimeTypes () const noexcept
 
virtual QWidget * previewWidget (const QString &path, QWidget *parent) const noexcept
 
virtual QWidget * previewWidget (const Process::Preset &preset, QWidget *parent) const noexcept
 
virtual void setup (ProcessesItemModel &model, const score::GUIApplicationContext &ctx)
 
virtual void addPath (std::string_view)
 
virtual void removePath (std::string_view)
 
virtual std::optional< ProcessEntryscanPath (std::string_view path)
 
virtual std::function< void()> asyncAddPath (std::string_view path)
 
virtual bool onDrop (const QMimeData &mime, int row, int column, const QDir &parent)
 
virtual bool onDoubleClick (const QString &path, const score::DocumentContext &ctx)
 
- Public Member Functions inherited from score::InterfaceBase
virtual InterfaceKey interfaceKey () const noexcept=0
 Identifies an interface uniquely.
 

Member Function Documentation

◆ asyncAddPath()

std::function< void()> Library::LibraryInterface::asyncAddPath ( std::string_view  path)
virtual

Called on a worker thread during async scanning. Return a non-empty function to accept the file; that function will be invoked on the GUI thread (the "commit" phase). Only for handlers whose commit does not touch the ProcessesItemModel tree (e.g. the QML module panel, the preset library): tree insertions must go through scanPath so they are published with correct signals. Default implementation defers everything to addPath on the GUI thread.

Reimplemented in JS::ModuleLibraryHandler.

◆ scanPath()

std::optional< ProcessEntry > Library::LibraryInterface::scanPath ( std::string_view  path)
virtual

Called on a worker thread during async scanning. Pure: no model access, no GUI objects — return the staged entry for this file, or nullopt to reject it. The model publishes accepted entries on the GUI thread with correct insertion signals. This is how process-library scan handlers contribute files; handlers that commit to something other than the process tree use asyncAddPath instead.


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