Object Detection  5.0
Image Processing Using Qt and Opencv
cvvideocaptureplugin.cpp
1 #include "cvvideocapture.h"
2 #include "cvvideocaptureplugin.h"
3 
4 #include <QtPlugin>
5 
6 CVVideoCapturePlugin::CVVideoCapturePlugin(QObject *parent)
7  : QObject(parent)
8 {
9  m_initialized = false;
10 }
11 
12 void CVVideoCapturePlugin::initialize(QDesignerFormEditorInterface * /* core */)
13 {
14  if (m_initialized)
15  return;
16 
17  // Add extension registrations, etc. here
18 
19  m_initialized = true;
20 }
21 
22 bool CVVideoCapturePlugin::isInitialized() const
23 {
24  return m_initialized;
25 }
26 
27 QWidget *CVVideoCapturePlugin::createWidget(QWidget *parent)
28 {
29  return new CVVideoCapture(parent);
30 }
31 
32 QString CVVideoCapturePlugin::name() const
33 {
34  return QLatin1String("CVVideoCapture");
35 }
36 
37 QString CVVideoCapturePlugin::group() const
38 {
39  return QLatin1String("Open CV");
40 }
41 
42 QIcon CVVideoCapturePlugin::icon() const
43 {
44  return QIcon(":/opencv.png");
45 }
46 
47 QString CVVideoCapturePlugin::toolTip() const
48 {
49  return QLatin1String("Video Capture");
50 }
51 
52 QString CVVideoCapturePlugin::whatsThis() const
53 {
54  return QLatin1String("Opencv Video Capture Widget");
55 }
56 
57 bool CVVideoCapturePlugin::isContainer() const
58 {
59  return false;
60 }
61 
62 QString CVVideoCapturePlugin::domXml() const
63 {
64  return QLatin1String("<widget class=\"CVVideoCapture\" name=\"cVVideoCapture\">\n</widget>\n");
65 }
66 
67 QString CVVideoCapturePlugin::includeFile() const
68 {
69  return QLatin1String("cvvideocapture.h");
70 }
71 #if QT_VERSION < 0x050000
72 Q_EXPORT_PLUGIN2(cvvideocaptureplugin, CVVideoCapturePlugin)
73 #endif // QT_VERSION < 0x050000