12#include "iselection.h"
33 Q_PLUGIN_METADATA(IID
"iVS3D.IBase")
34 Q_PLUGIN_METADATA(IID
"iVS3D.ISelection")
45 QString
getName()
const override;
47 QMap<QString, QVariant>
getSettings()
const override;
58 void syncSettingsWidget(uint n,
bool keepIsolated);
61 void slot_nChanged(
int n);
62 void slot_checkboxToggled(
bool checked);
65 std::unique_ptr<QWidget> createSettingsWidget();
The NthFrame class implements the IBase and ISelection plugin interfaces to select every Nth frame as...
Definition nthframe.h:31
int m_fps
Frames per second from video (for default N calculation)
Definition nthframe.h:70
void activate() override
activate is called when the plugin is activated in iVS3D. Plugins can override this method to perform...
Definition nthframe.cpp:78
~NthFrame()=default
Destructor.
NthFrame()
Constructor initializing N to 1 and default settings.
Definition nthframe.cpp:33
PLUG::SelectionResult selectImages(const PLUG::SelectionData &data, volatile bool &cancelFlag) override
Selects images based on the provided selection data.
Definition nthframe.cpp:111
bool m_keepIsolated
Keep isolated images outside the N-frame pattern.
Definition nthframe.h:69
PLUG::SettingsWidgetResult getSettingsWidget() override
getSettingsWidget creates and returns a settings QWidget for this plugin.
Definition nthframe.cpp:45
void deactivate() override
deactivate is called when the plugin is deactivated in iVS3D. Plugins can override this method to per...
Definition nthframe.cpp:82
QString getName() const override
getName returns the name of the plugin which will be displayed in the iVS3D interface.
Definition nthframe.cpp:41
QMap< QString, QVariant > getSettings() const override
getSettings retrieves the current settings of the plugin as a map of key-value pairs....
Definition nthframe.cpp:49
unsigned int m_n
Frame interval (select every Nth frame)
Definition nthframe.h:68
PLUG::InputLoadedResult onInputLoaded(const PLUG::InputData &input) override
onInputLoaded is called when a new input video or image set is loaded.
Definition nthframe.cpp:91
uint m_numFrames
Total frame count of the current input.
Definition nthframe.h:71
PLUG::ApplySettingsResult applySettings(const QMap< QString, QVariant > &settings) override
applySettings applies the provided settings to the plugin. This method is used to restore plugin conf...
Definition nthframe.cpp:56
void onCudaChanged(bool enabled) override
onCudaChanged is called when the CUDA usage setting is changed in iVS3D.
Definition nthframe.cpp:86
The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObjec...
Definition ibase.h:102
Interface for keyframe/image-selection plugins in iVS3D.
Definition iselection.h:53
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
Data available for image selection in ISelection plugins.
Definition iselection.h:31