11#include <tl/expected.hpp>
106 using QObject::QObject;
158 QStringList settingsList;
159 for (
auto it = settings.constBegin(); it != settings.constEnd(); ++it) {
160 settingsList.append(it.key() +
"=" + it.value().toString());
162 return settingsList.join(
";");
265 const std::vector<uint>& selectedImages) {
266 (void)selectedImages;
323 void encounteredError(
Error error);
329Q_DECLARE_METATYPE(
PLUG::InputMetaData)
Represents an error with a code and a message. The message is intended for display to the user.
Definition ierror.h:28
The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObjec...
Definition ibase.h:102
virtual void activate()
activate is called when the plugin is activated in iVS3D. Plugins can override this method to perform...
Definition ibase.h:180
virtual SettingsWidgetResult getSettingsWidget()=0
getSettingsWidget creates and returns a settings QWidget for this plugin.
virtual QString getName() const =0
getName returns the name of the plugin which will be displayed in the iVS3D interface.
virtual void onIndexChanged(uint index)
onIndexChanged is called when the currently displayed frame index changes in the viewer.
Definition ibase.h:250
virtual ApplySettingsResult applySettings(const QMap< QString, QVariant > &settings)=0
applySettings applies the provided settings to the plugin. This method is used to restore plugin conf...
virtual QString getSettingsString() const
getSettingsString is a helper method that converts the plugin settings into a human-readable string f...
Definition ibase.h:156
void updateSelectedImages(std::vector< uint > selectedImages)
[signal] updateSelectedImages(std::vector<uint> selectedImages) can be emitted when the plugin wants ...
virtual InputLoadedResult onInputLoaded(const InputData &input)
onInputLoaded is called when a new input video or image set is loaded.
Definition ibase.h:206
virtual MetaDataLoadedResult onMetaDataLoaded(const InputMetaData &inputMetaData)
onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.
Definition ibase.h:231
virtual void deactivate()
deactivate is called when the plugin is deactivated in iVS3D. Plugins can override this method to per...
Definition ibase.h:187
virtual void onCudaChanged(bool enabled)
onCudaChanged is called when the CUDA usage setting is changed in iVS3D.
Definition ibase.h:198
void updatePreview(bool clearOldPreview=true)
[signal] updatePreview(bool clearOldPreview) can be emitted when the plugin requests an update of the...
virtual void onSelectedImagesChanged(const std::vector< uint > &selectedImages)
onSelectedImagesChanged is called when the current keyframe / selected-image list changed.
Definition ibase.h:264
void updateProgress(int progress, QString message=QString())
[signal] updateProgress(int progress, QString message) can be emitted to inform iVS3D about the progr...
virtual QMap< QString, QVariant > getSettings() const =0
getSettings retrieves the current settings of the plugin as a map of key-value pairs....
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23
Plugin interface namespace containing common plugin contracts and helper types.
tl::expected< void, Error > InputLoadedResult
Type alias for the result of handling an input loaded event, which can be either a successful void re...
Definition ibase.h:58
tl::expected< void, Error > ApplySettingsResult
Type alias for the result of applying settings to a plugin, which can be either a successful void res...
Definition ibase.h:51
tl::expected< std::unique_ptr< QWidget >, Error > SettingsWidgetResult
Type alias for the result of a settings widget creation operation, which can be either a successful u...
Definition ibase.h:44
tl::expected< void, Error > MetaDataLoadedResult
Type alias for the result of handling a metadata-loaded event, either success (void) or an Error.
Definition ibase.h:65