-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMainWindowBarcode.cpp
More file actions
41 lines (32 loc) · 1.19 KB
/
MainWindowBarcode.cpp
File metadata and controls
41 lines (32 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <QDockWidget>
#include <QTextBrowser>
#include "MainWindow.h"
#include "BarcodeView.h"
#include "ui_MainWindow.h"
void MainWindow::createBarcodeWindow(bool showWindow)
{
QDockWidget *dock = new QDockWidget(tr("Barcode CLV"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
barcode = new BarcodeView(dock);
dock->setWidget(barcode);
// dock->resize(250,400);
addDockWidget(Qt::BottomDockWidgetArea, dock);
ui->menuTools->addAction(dock->toggleViewAction());
//resize Qt buck
dock->setFloating(true);
dock->hide();
dock->setFloating(false);
if(showWindow)
dock->show();
connect(barcode, SIGNAL(addTrace(QString,QColor)), this, SLOT(addTrace(QString,QColor)));
connect(barcode, SIGNAL(processImages(QString)), this, SLOT(processImages(QString)));
}
void MainWindow::closeBarcode()
{
if(barcode)
{
disconnect(barcode, SIGNAL(addTrace(QString,QColor)), this, SLOT(addTrace(QString,QColor)));
disconnect(barcode, SIGNAL(processImages(QString)), this, SLOT(processImages(QString)));
barcode->BarcodeClose();
}
}