23 #ifndef NOOBAPLUGINAPI_H
24 #define NOOBAPLUGINAPI_H
26 #include "noobapluginbase.h"
31 #include <QStringList>
102 Q_DECLARE_METATYPE(nooba::VideoState)
103 Q_DECLARE_METATYPE(nooba::AlertType)
104 Q_DECLARE_METATYPE(nooba::PathType)
121 ProcParams(
const ProcParams& rhs);
122 ProcParams& operator=(
const ProcParams& rhs);
126 void setFrameId(
int id);
129 void setFrameRate(
double rate);
130 double frameRate()
const;
132 void setErrorState(
bool isError);
133 bool isError()
const;
135 void setErrorMsg(
const QString& errMsg);
136 QString errMsg()
const;
154 ProcParamsPrivate* createPrivateStruct(
const ProcParams& rhs);
155 ProcParamsPrivate* d;
165 explicit PluginPassData();
168 PluginPassData(
const PluginPassData& rhs);
169 PluginPassData& operator=(
const PluginPassData& rhs);
170 QStringList strList()
const;
171 void setStrList(
const QStringList& list);
172 void appendStrList(
const QString& str);
173 void setImage(
const QImage& image);
174 QImage& getImage()
const;
192 PluginInfo(
const QString& name,
const int majorVersion,
const int minorVersion,
193 const QString& description,
const QString& author);
194 PluginInfo(
const PluginInfo& rhs);
195 PluginInfo& operator=(
const PluginInfo& rhs);
199 QString name()
const;
200 QString description()
const;
201 QString author()
const;
203 int majorVersion()
const;
204 int minorVersion()
const;
237 virtual bool init() = 0;
310 { emit createIntParamRequest(varName, val, max, min);}
331 void createDoubleParam(
const QString& varName,
double val,
double max = 100.0,
double min = 0.0)
332 { emit createDoubleParamRequest(varName, val, max, min); }
356 { emit createStringParamRequest(varName, val, isFilePath);}
376 { emit createFilePathParamRequest(varName, path, pathType, filter); }
392 { emit createMultiValParamRequest(varName, varList); }
403 void createLineParam(
const QString& varName,
const QString& frameViewerTitle, QColor lineColor)
404 { emit createLineParamRequest(varName, frameViewerTitle, lineColor); }
414 { emit debugMsgRequest(msg); }
421 { emit outputDataRequest(data); }
423 void outputData(
const QStringList& strList, QList<QImage> imageList)
424 { emit outputDataRequest(strList, imageList); }
431 { emit createFrameViewerRequest(title, isVisible); }
439 { emit updateFrameViewerRequest(title, frame); }
446 { emit updateFrameViewerVisibilityRequest(title, isVisible); }
453 { emit generateAlertRequest(frameViewerTitle, msg, alert); }
457 void createIntParamRequest(
const QString& varName,
int val,
int max = 100,
int min = 0);
458 void createDoubleParamRequest(
const QString& varName,
double val,
double max = 100.0,
double min = 0.0);
459 void createStringParamRequest(
const QString& varName, QString val,
bool isFilePath =
false);
460 void createMultiValParamRequest(
const QString& varName,
const QStringList& varList);
461 void createLineParamRequest(
const QString& varName,
const QString& frameViewerTitle, QColor lineColor);
462 void debugMsgRequest(
const QString& msg);
464 void outputDataRequest(
const QStringList& strList, QList<QImage> imageList);
465 void createFrameViewerRequest(
const QString& title,
bool isVisible =
true);
466 void updateFrameViewerRequest(
const QString& title,
const QImage& frame);
467 void updateFrameViewerVisibilityRequest(
const QString& title,
bool isVisible);
468 void createFilePathParamRequest(
const QString& varName, QString path,
470 void generateAlertRequest(
const QString& frameViewerTitle,
const QString& msg,
nooba::AlertType alert);
479 Q_UNUSED(varName) Q_UNUSED(val)
482 virtual void onDoubleParamChanged(
const QString& varName,
double val) {
483 Q_UNUSED(varName) Q_UNUSED(val)
486 virtual
void onStringParamChanged(const QString& varName, const QString& val){
487 Q_UNUSED(varName) Q_UNUSED(val)
490 virtual
void onMultiValParamChanged(const QString& varName, const QString& val){
491 Q_UNUSED(varName) Q_UNUSED(val)
494 virtual
void onFilePathParamChanged(const QString& varName, const QString& path) {
495 Q_UNUSED(varName) Q_UNUSED(path)
507 virtual void inputData(
const QStringList& strList, QList<QImage> imageList){
508 Q_UNUSED(strList) Q_UNUSED(imageList)
511 virtual
void onLineParamUpdated(const QString& varName, const QString frameViewerTitle, QLine line)
512 { Q_UNUSED(varName) Q_UNUSED(frameViewerTitle) Q_UNUSED(line) }
524 NoobaPluginAPI(const NoobaPluginAPI& rhs);
525 NoobaPluginAPI& operator=(const NoobaPluginAPI& rhs);
530 Q_DECLARE_INTERFACE(NoobaPluginAPI, "NoobaVSS.NoobaPluginAPI/" )
531 #endif // NOOBAPLUGINAPI_H