SingleCameraOperationWnd.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. #include "SingleCameraOperationWnd.h"
  2. #include "ui_SingleCameraOperationWnd.h"
  3. #include <QSettings>
  4. #include <QCloseEvent>
  5. #include <QVBoxLayout>
  6. #include <QDebug>
  7. #include <QTimer>
  8. #include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
  9. SingleCameraOperationWnd::SingleCameraOperationWnd(QWidget *parent)
  10. : QMainWindow(parent)
  11. , ui(new Ui::SingleCameraOperationWnd), scaleFactor(1.0)
  12. {
  13. ui->setupUi(this);
  14. isShow = true;
  15. initFrom();
  16. }
  17. SingleCameraOperationWnd::~SingleCameraOperationWnd()
  18. {
  19. delete ui;
  20. }
  21. void SingleCameraOperationWnd::initFrom() {
  22. QTimer *timer = new QTimer(this);
  23. connect(timer, &QTimer::timeout, this, &SingleCameraOperationWnd::checkSettings);
  24. timer->start(100);
  25. ui->label_Percentage->setAlignment(Qt::AlignCenter);
  26. // 设置右下部分
  27. // loadSliderStates();
  28. initSliders();
  29. initLineEdits();
  30. initProgressBar();
  31. // 连接 QSlider 的 valueChanged 信号到 QProgressBar 的 setValue 槽
  32. connect(ui->RedLightverticalSlider, &QSlider::valueChanged, ui->RedLightprogressBar, &QProgressBar::setValue);
  33. connect(ui->BlueLightverticalSlider, &QSlider::valueChanged, ui->BlueLightprogressBar, &QProgressBar::setValue);
  34. connect(ui->GreenLightverticalSlider, &QSlider::valueChanged, ui->GreenLightprogressBar, &QProgressBar::setValue);
  35. connect(ui->DotLightverticalSlider, &QSlider::valueChanged, ui->DotLightprogressBar, &QProgressBar::setValue);
  36. connectSliderAndLineEdit(ui->RedLightverticalSlider, ui->RedLightlineEdit);
  37. connectSliderAndLineEdit(ui->GreenLightverticalSlider, ui->GreenLightlineEdit);
  38. connectSliderAndLineEdit(ui->BlueLightverticalSlider, ui->BlueLightlineEdit);
  39. connectSliderAndLineEdit(ui->DotLightverticalSlider, ui->DotLightlineEdit);
  40. connect(ui->LiveButton,&QPushButton::clicked,this,&SingleCameraOperationWnd::loadLiveVedio);
  41. // 设置右上部分
  42. QWidget *viewport = ui->scrollArea->viewport();
  43. QWidget *container = new QWidget(viewport);
  44. QVBoxLayout *layout = new QVBoxLayout(container);
  45. layout->setSpacing(16); // 设置Group之间的间隔距离
  46. layout->setMargin(0);
  47. QList<int> numbers = {1, 2, 3, 4, 5, 6, 7, 8};
  48. QList<Group*> widgets;
  49. for (int i = 0; i < numbers.size(); ++i) {
  50. int num = numbers[i];
  51. CameraImageHandler* manager = new CameraImageHandler(num);
  52. Group* widget = manager->getGroup();
  53. connect(widget,&Group::send_button_Signal,this,&SingleCameraOperationWnd::showAndHideButton);
  54. connect(widget,&Group::send_ComboBox_singal,this,&SingleCameraOperationWnd::handleComBoxChange);
  55. if (widget != nullptr) {
  56. layout->addWidget(widget);
  57. widgets.append(widget);
  58. groupMap[num] = widget;
  59. }
  60. delete manager;
  61. }
  62. // 设置控件的最小高度和最大宽度
  63. int minHeight = 162;
  64. int maxWidth = 244;
  65. for (Group* w : widgets) {
  66. w->setMinimumHeight(minHeight);
  67. w->setMaximumWidth(maxWidth);
  68. }
  69. container->setLayout(layout);
  70. ui->scrollArea->setWidget(container);
  71. ui->scrollArea->resize(261, 700);
  72. ui->Operatewidget->setMouseTracking(true);
  73. connect(ui->Operatewidget,&ImageWidget::sendDoubleClicksignal,this,&SingleCameraOperationWnd::handleDoubleClick);
  74. connect(ui->DatacomboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
  75. this, &SingleCameraOperationWnd::on_DatacomboBox_currentIndexChanged);
  76. }
  77. void SingleCameraOperationWnd::closeEvent(QCloseEvent *event) {
  78. // 保存滑块状态
  79. // saveSliderStates();
  80. // 确保调用基类的 closeEvent 处理其他关闭逻辑
  81. QMainWindow::closeEvent(event);
  82. }
  83. void SingleCameraOperationWnd::initSliders() {
  84. QList<QSlider*> sliders = {
  85. ui->RedLightverticalSlider, ui->GreenLightverticalSlider,
  86. ui->BlueLightverticalSlider, ui->DotLightverticalSlider
  87. };
  88. QList<int> initialValues = {22, 11, 0, 0};
  89. for (int i = 0; i < sliders.size(); ++i) {
  90. sliders[i]->setMinimum(0);
  91. sliders[i]->setMaximum(100);
  92. sliders[i]->setValue(initialValues[i]);
  93. }
  94. }
  95. void SingleCameraOperationWnd::initLineEdits() {
  96. QList<QLineEdit*> lineEdits = {
  97. ui->RedLightlineEdit, ui->GreenLightlineEdit,
  98. ui->BlueLightlineEdit, ui->DotLightlineEdit,
  99. };
  100. for (QLineEdit* lineEdit : lineEdits) {
  101. lineEdit->setAlignment(Qt::AlignCenter);
  102. }
  103. }
  104. void SingleCameraOperationWnd::initProgressBar(){
  105. QList<int> initialValues = {22, 11, 0, 0};
  106. QList<QProgressBar*> progressBar = {
  107. ui->RedLightprogressBar,ui->GreenLightprogressBar,
  108. ui->BlueLightprogressBar,ui->DotLightprogressBar
  109. };
  110. for (int i = 0; i < progressBar.size(); ++i) {
  111. progressBar[i]->setMinimum(0);
  112. progressBar[i]->setMaximum(100);
  113. progressBar[i]->setValue(initialValues[i]);
  114. }
  115. }
  116. // void SingleCameraOperationWnd::saveSliderStates() {
  117. // QSettings settings("YourCompany", "YourApp");
  118. // settings.beginGroup("SliderStates");
  119. // settings.setValue("verticalSlider", ui->verticalSlider->value());
  120. // settings.setValue("verticalSlider_2", ui->verticalSlider_2->value());
  121. // settings.setValue("verticalSlider_3", ui->verticalSlider_3->value());
  122. // settings.setValue("verticalSlider_4", ui->verticalSlider_4->value());
  123. // settings.setValue("verticalSlider_5", ui->verticalSlider_5->value());
  124. // settings.setValue("verticalSlider_6", ui->verticalSlider_6->value());
  125. // settings.endGroup();
  126. // }
  127. // void SingleCameraOperationWnd::loadSliderStates() {
  128. // QSettings settings("YourCompany", "YourApp");
  129. // settings.beginGroup("SliderStates");
  130. // ui->verticalSlider->setValue(settings.value("verticalSlider", 11).toInt());
  131. // ui->verticalSlider_2->setValue(settings.value("verticalSlider_2", 22).toInt());
  132. // ui->verticalSlider_3->setValue(settings.value("verticalSlider_3", 9).toInt());
  133. // ui->verticalSlider_4->setValue(settings.value("verticalSlider_4", 11).toInt());
  134. // ui->verticalSlider_5->setValue(settings.value("verticalSlider_5", 0).toInt());
  135. // ui->verticalSlider_6->setValue(settings.value("verticalSlider_6", 0).toInt());
  136. // settings.endGroup();
  137. // }
  138. // QSlider 和 QLineEdit 的联动
  139. void SingleCameraOperationWnd::connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit)
  140. {
  141. QIntValidator* validator = new QIntValidator(slider->minimum(), slider->maximum(), lineEdit);
  142. lineEdit->setValidator(validator);
  143. connect(slider, &QSlider::valueChanged, [lineEdit](int value) {
  144. lineEdit->setText(QString::number(value));
  145. });
  146. connect(lineEdit, &QLineEdit::textChanged, [slider](const QString &text) {
  147. bool ok;
  148. int value = text.toInt(&ok);
  149. if (ok && value >= slider->minimum() && value <= slider->maximum()) {
  150. slider->setValue(value);
  151. } else if (!text.isEmpty()) {
  152. int closestValue = qMin(qMax(text.toInt(&ok), slider->minimum()), slider->maximum());
  153. slider->setValue(closestValue);
  154. }
  155. });
  156. }
  157. void SingleCameraOperationWnd::checkSettings() {
  158. QSettings settings("YourCompany", "YourApplication_");
  159. int groupId = settings.value("GroupId", 0).toInt();
  160. int index = settings.value("Index", 0).toInt();
  161. if (groupId != lastGroupId || index != lastIndex) {
  162. lastGroupId = groupId;
  163. lastIndex = index;
  164. loadSettings();
  165. }
  166. }
  167. void SingleCameraOperationWnd::loadSettings()
  168. {
  169. QSettings settings("YourCompany", "YourApplication_");
  170. int groupId = settings.value("GroupId", 0).toInt();
  171. int index = settings.value("Index", 0).toInt();
  172. loadGroupSettings(groupId, index);
  173. }
  174. void SingleCameraOperationWnd::loadGroupSettings(int Id, int Index) {
  175. QSettings settings("YourOrganization", "YourApplication");
  176. settings.beginGroup(QString::number(Id));
  177. QString imagePath1 = settings.value("ImagePath1").toString();
  178. int materialWndType = settings.value("MaterialWndType").toInt();
  179. QStringList textList = settings.value("TextList").toStringList();
  180. settings.endGroup();
  181. QSize size = ui->Operatewidget->size();
  182. QPixmap newPixmap;
  183. // 判断是实时图片还是物料窗口
  184. if (Index == 1) {
  185. newPixmap = QPixmap(imagePath1);
  186. clearLayout();
  187. } else if (Index == 2) {
  188. if (materialWndType == 1) {
  189. clearLayout();
  190. WaferWidget();
  191. } else if (materialWndType == 2) {
  192. clearLayout();
  193. WaffleWidget();
  194. } else if (materialWndType == 3) {
  195. clearLayout();
  196. MaterialBoxWidget();
  197. }
  198. }
  199. QPixmap scaledPixmap = newPixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
  200. ui->Operatewidget->setPixmap(scaledPixmap);
  201. // 更新当前图片的成员变量
  202. currentPixmap = scaledPixmap;
  203. scaleFactor = 1.0;
  204. ui->label_Percentage->setText("100%");
  205. ui->DatacomboBox->clear();
  206. ui->DatacomboBox->addItems(textList);
  207. // qDebug() << "ComboBox items added:" << ui->DatacomboBox->count();
  208. // connect(ui->DatacomboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(SingleCameraOperationWnd::onComboBoxIndexChanged(int)));
  209. }
  210. // 清除大窗口上当前的布局
  211. void SingleCameraOperationWnd::clearLayout() {
  212. // 获取当前布局
  213. QLayout* layout = ui->Operatewidget->layout();
  214. if (layout) {
  215. QLayoutItem *child;
  216. while ((child = layout->takeAt(0)) != nullptr) {
  217. if (child->widget() != nullptr) {
  218. delete child->widget(); // 删除控件
  219. }
  220. delete child; // 删除布局项
  221. }
  222. delete layout; // 删除布局本身
  223. }
  224. }
  225. // 圆晶
  226. void SingleCameraOperationWnd::WaferWidget() {
  227. // QGridLayout *layout = new QGridLayout(ui->Operatewidget);
  228. // wafer = new Wafer(2, ui->Operatewidget);
  229. // wafer->initFrom(ui->Operatewidget);
  230. // layout->setContentsMargins(0, 0, 0, 0);
  231. // layout->addWidget(wafer->globalWidget);
  232. // ui->Operatewidget->setLayout(layout);
  233. // ui->Operatewidget->setFixedSize(786, 786);
  234. }
  235. // 华夫盒
  236. void SingleCameraOperationWnd::WaffleWidget() {
  237. QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
  238. waffle = new Waffle(2, ui->Operatewidget);
  239. layout->setContentsMargins(0, 0, 0, 0);
  240. layout->addWidget(waffle);
  241. ui->Operatewidget->setLayout(layout);
  242. ui->Operatewidget->setFixedSize(786, 786);
  243. }
  244. // 料盒
  245. void SingleCameraOperationWnd::MaterialBoxWidget() {
  246. QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
  247. materialbox = new MaterialBox(2, ui->Operatewidget);
  248. layout->setContentsMargins(0, 0, 0, 0);
  249. layout->addWidget(materialbox);
  250. ui->Operatewidget->setLayout(layout);
  251. ui->Operatewidget->setFixedSize(786, 786);
  252. }
  253. void SingleCameraOperationWnd::on_ZoomUpButton_clicked() {
  254. scaleFactor *= 1.1;
  255. int newWidth = currentPixmap.width() * scaleFactor;
  256. int newHeight = currentPixmap.height() * scaleFactor;
  257. QPixmap scaledImage = currentPixmap.scaled(newWidth, newHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation);
  258. ui->Operatewidget->setPixmap(scaledImage); // 这里传递缩放后的图片
  259. double percentage = (scaleFactor * 100);
  260. QString percentageStr = QString::number((int)percentage);
  261. ui->label_Percentage->setText(QString("%1%").arg(percentageStr));
  262. }
  263. void SingleCameraOperationWnd::on_ZoomOutButton_clicked() {
  264. double newScaleFactor = scaleFactor * 0.9;
  265. if (newScaleFactor >= 1.0) {
  266. scaleFactor = newScaleFactor;
  267. } else {
  268. scaleFactor = 1.0;
  269. }
  270. int newWidth = currentPixmap.width() * scaleFactor;
  271. int newHeight = currentPixmap.height() * scaleFactor;
  272. QPixmap scaledImage = currentPixmap.scaled(newWidth, newHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation);
  273. ui->Operatewidget->setPixmap(scaledImage); // 这里传递缩放后的图片
  274. double percentage = scaleFactor * 100;
  275. QString percentageStr = QString::number((int)percentage);
  276. ui->label_Percentage->setText(QString("%1%").arg(percentageStr));
  277. }
  278. // void SingleCameraOperationWnd::wheelEvent(QWheelEvent *event) {
  279. // // 检查鼠标事件是否发生在 Operatewidget 上
  280. // if (ui->Operatewidget->rect().contains(ui->Operatewidget->mapFromGlobal(event->globalPos()))) {
  281. // if (event->angleDelta().y() > 0) {
  282. // scaleFactor *= 1.1;
  283. // } else {
  284. // double newScaleFactor = scaleFactor * 0.9;
  285. // // 确保新的缩放因子不小于1.0(即图片的原始大小)
  286. // if (newScaleFactor >= 1.0) {
  287. // scaleFactor = newScaleFactor;
  288. // } else {
  289. // scaleFactor = 1.0; // 如果新的缩放因子小于1.0,则直接设置为1.0
  290. // }
  291. // }
  292. // int newWidth = currentPixmap.width() * scaleFactor;
  293. // int newHeight = currentPixmap.height() * scaleFactor;
  294. // QPixmap scaledImage = currentPixmap.scaled(newWidth, newHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation);
  295. // ui->Operatewidget->setPixmap(scaledImage); // 这里传递缩放后的图片
  296. // double percentage = scaleFactor * 100;
  297. // QString percentageStr = QString::number((int)percentage);
  298. // ui->label_Percentage->setText(QString("%1%").arg(percentageStr));
  299. // }
  300. // QMainWindow::wheelEvent(event);
  301. // }
  302. void SingleCameraOperationWnd::wheelEvent(QWheelEvent *event) {
  303. // 检查鼠标事件是否发生在 Operatewidget 上
  304. if (ui->Operatewidget->rect().contains(ui->Operatewidget->mapFromGlobal(event->globalPos()))) {
  305. if (event->angleDelta().y() > 0) {
  306. scaleFactor *= 1.1;
  307. } else {
  308. double newScaleFactor = scaleFactor * 0.9;
  309. // 确保新的缩放因子不小于1.0(即图片的原始大小)
  310. if (newScaleFactor >= 1.0) {
  311. scaleFactor = newScaleFactor;
  312. } else {
  313. scaleFactor = 1.0; // 如果新的缩放因子小于1.0,则直接设置为1.0
  314. }
  315. }
  316. int newWidth = currentPixmap.width() * scaleFactor;
  317. int newHeight = currentPixmap.height() * scaleFactor;
  318. qDebug()<<"11111"<<newWidth<<newHeight;
  319. QPixmap scaledImage = currentPixmap.scaled(newWidth, newHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation);
  320. // ui->Operatewidget->setPixmap(scaledImage); // 这里传递缩放后的图片
  321. // ui->Operatewidget->setPixmapAndPoint(scaledImage);
  322. double percentage = scaleFactor * 100;
  323. QString percentageStr = QString::number((int)percentage);
  324. ui->label_Percentage->setText(QString("%1%").arg(percentageStr));
  325. }
  326. QMainWindow::wheelEvent(event);
  327. }
  328. void SingleCameraOperationWnd::onComboBoxIndexChanged(int index) {
  329. // 根据index获取图片路径
  330. QString imagePath = getImagePathFromIndex(index);
  331. if (!imagePath.isEmpty()) {
  332. QPixmap newPixmap(imagePath);
  333. QPixmap scaledPixmap = newPixmap.scaled(ui->Operatewidget->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
  334. ui->Operatewidget->setPixmap(scaledPixmap);
  335. // 更新当前图片的成员变量
  336. currentPixmap = scaledPixmap;
  337. scaleFactor = 1.0;
  338. ui->label_Percentage->setText("100%");
  339. }
  340. }
  341. QString SingleCameraOperationWnd::getImagePathFromIndex(int index) {
  342. QStringList imagePaths = {
  343. ":/images/test_image/image.png",
  344. ":/images/test_image/image_2.png",
  345. };
  346. if (index >= 0 && index < imagePaths.size()) {
  347. return imagePaths[index];
  348. }
  349. return ":/images/test_image/image.png";
  350. }
  351. void SingleCameraOperationWnd::showEvent(QShowEvent *event) {
  352. QMainWindow::showEvent(event);
  353. loadSettings();
  354. }
  355. void SingleCameraOperationWnd::hideEvent(QHideEvent *event) {
  356. QMainWindow::hideEvent(event);
  357. }
  358. void SingleCameraOperationWnd::handleDoubleClick(){
  359. QPixmap scaledImage = currentPixmap.scaled(currentPixmap.width(), currentPixmap.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
  360. ui->Operatewidget->setPixmap(scaledImage); // 这里传递缩放后的图片
  361. scaleFactor = 1.0;
  362. ui->label_Percentage->setText("100%");
  363. }
  364. void SingleCameraOperationWnd::showAndHideButton(){
  365. if(isShow == true){
  366. isShow = false;
  367. }else{
  368. isShow = true;
  369. }
  370. QList<QLineEdit*> lineEdits = {
  371. ui->RedLightlineEdit, ui->GreenLightlineEdit,
  372. ui->BlueLightlineEdit, ui->DotLightlineEdit,
  373. };
  374. QList<QSlider*> sliders = {
  375. ui->RedLightverticalSlider, ui->GreenLightverticalSlider,
  376. ui->BlueLightverticalSlider, ui->DotLightverticalSlider
  377. };
  378. QList<QProgressBar*> progressBar = {
  379. ui->RedLightprogressBar,ui->GreenLightprogressBar,
  380. ui->BlueLightprogressBar,ui->DotLightprogressBar
  381. };
  382. if(isShow == true){
  383. for (QLineEdit* lineEdit : lineEdits) {
  384. lineEdit->show();
  385. }
  386. for (int i = 0; i < sliders.size(); ++i) {
  387. sliders[i]->show();
  388. }
  389. for (int i = 0; i < progressBar.size(); ++i) {
  390. progressBar[i]->show();
  391. }
  392. ui->BlueLight->show();
  393. ui->RedLight->show();
  394. ui->DotLight->show();
  395. ui->GreenLight->show();
  396. ui->BlueLightlabel->show();
  397. ui->RedLightlabel->show();
  398. ui->DotLightlabel->show();
  399. ui->GreenLightlabel->show();
  400. }else{
  401. for (QLineEdit* lineEdit : lineEdits) {
  402. lineEdit->hide();
  403. }
  404. for (int i = 0; i < sliders.size(); ++i) {
  405. sliders[i]->hide();
  406. }
  407. for (int i = 0; i < progressBar.size(); ++i) {
  408. progressBar[i]->hide();
  409. }
  410. ui->BlueLight->hide();
  411. ui->RedLight->hide();
  412. ui->DotLight->hide();
  413. ui->GreenLight->hide();
  414. ui->BlueLightlabel->hide();
  415. ui->RedLightlabel->hide();
  416. ui->DotLightlabel->hide();
  417. ui->GreenLightlabel->hide();
  418. }
  419. }
  420. void SingleCameraOperationWnd::startCamera(int cameraId) {
  421. m_grabber = new ImageGrabber(cameraId);
  422. connect(m_grabber, &ImageGrabber::imageGrabbed,
  423. this, &SingleCameraOperationWnd::updateImage);
  424. m_grabber->start();
  425. }
  426. void SingleCameraOperationWnd::on_DatacomboBox_currentIndexChanged(int index){
  427. QSettings settings("YourCompany", "YourApplication_");
  428. int groupId = settings.value("GroupId", 0).toInt();
  429. if (groupMap.contains(groupId)) {
  430. Group* group = groupMap[groupId];
  431. // 修改属性
  432. group->setDatacomboBox(index);
  433. } else {
  434. qDebug() << "Group with id" << groupId << "not found.";
  435. }
  436. }
  437. void SingleCameraOperationWnd::handleComBoxChange(int groupId,int index){
  438. QSettings settings("YourCompany", "YourApplication_");
  439. int currentGroupId = settings.value("GroupId", 0).toInt();
  440. if(currentGroupId == groupId){
  441. ui->DatacomboBox->setCurrentIndex(index);
  442. }
  443. }
  444. void SingleCameraOperationWnd::updateImage(const QImage&image){
  445. QPixmap pixmap = QPixmap::fromImage(image);
  446. QSize size = ui->Operatewidget->size();
  447. // QPixmap scaledPixmap = pixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
  448. QPixmap scaledPixmap = pixmap.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
  449. ui->Operatewidget->setPixmap(scaledPixmap);
  450. }
  451. void SingleCameraOperationWnd::loadLiveVedio(){
  452. startCamera(0);
  453. }