parent
56f2c57cc4
commit
48470053bd
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
This is a dummy file needed to create CoreCtrl.moc
|
||||
@ -0,0 +1,35 @@
|
||||
#ifndef _H_QCAMSETTINGDLG_H_
|
||||
#define _H_QCAMSETTINGDLG_H_
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_QCamSettingDlg.h"
|
||||
#include "iCoreCtrl.h"
|
||||
#include "RoiImgViewer.h"
|
||||
#include <QImage>
|
||||
|
||||
class QCamSettingDlg : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCamSettingDlg(QWidget *parent = Q_NULLPTR);
|
||||
~QCamSettingDlg();
|
||||
void setCoreCtrlPtr(ICoreCtrl* ptr);
|
||||
void onShowImage(QString serial, QImage img);
|
||||
void onModCam(QString serial);//ÐÞ¸ÄÏà»ú Ô¤ÀÀ
|
||||
void onCamEvent(const QString& serial, emTpCameraStatus status, bool ret);
|
||||
void onInitWidget(QString serial);//Ìí¼ÓÏà»ú
|
||||
|
||||
Q_SLOT void onButtonClicked();
|
||||
|
||||
void onShowVirtualDir(bool bShow);
|
||||
void EnableUI(bool b);
|
||||
private:
|
||||
Ui::QCamSettingDlg ui;
|
||||
ICoreCtrl* m_pCoreCtl{ nullptr };
|
||||
|
||||
RoiImgViewer* m_pImgViewer{ nullptr };
|
||||
QString m_curCamKey;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,57 @@
|
||||
#include "QCameraConfigUI.h"
|
||||
#include <QFileDialog>
|
||||
#include "baseStruct.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
QCameraConfigUI::QCameraConfigUI(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
connect(ui.m_pbApply, SIGNAL(clicked()), this, SLOT(onButtonClicked()));//保存
|
||||
connect(ui.m_pbClose, SIGNAL(clicked()), this, SLOT(onButtonClicked()));//关闭
|
||||
connect(ui.m_pbSelectDir, SIGNAL(clicked()), this, SLOT(onButtonClicked()));//配置虚拟文件夹路径
|
||||
|
||||
ui.comboBox->clear();
|
||||
for (QMap<emTpDeviceType, QString>::const_iterator it = gCameraNamesMap.begin(); it != gCameraNamesMap.end(); ++it)
|
||||
{
|
||||
QString strVal = *it;
|
||||
int key = it.key();
|
||||
ui.comboBox->addItem(strVal, key);
|
||||
}
|
||||
}
|
||||
|
||||
QCameraConfigUI::~QCameraConfigUI()
|
||||
{
|
||||
}
|
||||
|
||||
Q_SLOT void QCameraConfigUI::onButtonClicked()
|
||||
{
|
||||
QString strObj = sender()->objectName();
|
||||
if ("m_pbApply" == strObj)
|
||||
{
|
||||
QDialog::accept();
|
||||
}
|
||||
else if ("m_pbClose" == strObj)
|
||||
{
|
||||
QDialog::reject();
|
||||
}
|
||||
else if ("m_pbSelectDir" == strObj)
|
||||
{
|
||||
QString strPath = QFileDialog::getExistingDirectory(this);
|
||||
ui.lineEdit_3->setText(strPath);
|
||||
}
|
||||
}
|
||||
|
||||
tagCamInfo QCameraConfigUI::getNewCamInfo()
|
||||
{
|
||||
int ntype = ui.comboBox->currentData().toInt();
|
||||
QString serial = ui.lineEdit->text();//serial
|
||||
QString showName = ui.lineEdit_2->text();//show name
|
||||
QString filePath = ui.lineEdit_3->text();//path
|
||||
tagCamInfo camInfo;
|
||||
camInfo.nType = ntype;
|
||||
camInfo.serialNo = serial;
|
||||
camInfo.showName = showName;
|
||||
camInfo.loadPath = filePath;
|
||||
return camInfo;
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
/*!
|
||||
*FileName: QCameraConfigUI.h
|
||||
*Author: Pan Yingdong
|
||||
*Email: bob.pan@hzleaper.com
|
||||
*Created:2021/4/8 10:56
|
||||
*Note:ĎŕťúĹäÖĂŇłĂć
|
||||
*/
|
||||
#ifndef _H_QCAMERACONFIGUI_H_
|
||||
#define _H_QCAMERACONFIGUI_H_
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include "ui_QCameraConfigUI.h"
|
||||
typedef struct tagCamInfo
|
||||
{
|
||||
int nType{ 0 };
|
||||
QString showName;
|
||||
QString serialNo;
|
||||
QString loadPath;
|
||||
}CamInfo;
|
||||
class QCameraConfigUI : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCameraConfigUI(QWidget *parent = Q_NULLPTR);
|
||||
~QCameraConfigUI();
|
||||
|
||||
Q_SLOT void onButtonClicked();
|
||||
tagCamInfo getNewCamInfo();
|
||||
private:
|
||||
Ui::QCameraConfigUI ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QCameraConfigUI</class>
|
||||
<widget class="QWidget" name="QCameraConfigUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>289</width>
|
||||
<height>182</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QCameraConfigUI</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>相机类型(*)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>序列号(*)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>显示名称(*)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="m_pbSelectDir">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>配置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>虚拟相机路径:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="m_pbApply">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="m_pbClose">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@ -0,0 +1,46 @@
|
||||
/*!
|
||||
*FileName: QCameraMgrUI.h
|
||||
*Author: Pan Yingdong
|
||||
*Email: bob.pan@hzleaper.com
|
||||
*Created:2021/4/8 10:56
|
||||
*Note:相机管理页面
|
||||
*/
|
||||
#ifndef _H_QCAMERAMGRUI_H_
|
||||
#define _H_QCAMERAMGRUI_H_
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_QCameraMgrUI.h"
|
||||
#include <QStandardItem>
|
||||
#include <QStandardItemModel>
|
||||
#include "iCoreCtrl.h"
|
||||
#include "QCameraConfigUI.h"
|
||||
#include "QCamSettingDlg.h"
|
||||
|
||||
/*相机管理页面 展示相机列表*/
|
||||
class QCameraMgrUI : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCameraMgrUI(QWidget *parent = Q_NULLPTR);
|
||||
~QCameraMgrUI();
|
||||
|
||||
void onInitCamInfo(ICoreCtrl* pCtrl);
|
||||
|
||||
Q_SLOT void onButtonClicked();
|
||||
void onUpdateTableView();
|
||||
Q_SLOT void onDoubleClicked(const QModelIndex &index);
|
||||
Q_SLOT void onShowImage(QString serial, QImage img);
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *evt);
|
||||
|
||||
private:
|
||||
Ui::QCameraMgrUI ui;
|
||||
QStandardItemModel m_tableModel;
|
||||
|
||||
ICoreCtrl *m_pCorctl{ nullptr };
|
||||
QCamSettingDlg *m_pCamSetUI{ nullptr };
|
||||
QCameraConfigUI *m_pCamConfigUI{ nullptr };
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QCameraMgrUI</class>
|
||||
<widget class="QWidget" name="QCameraMgrUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>722</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>相机管理</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>相机列表</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTableView" name="tableView">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="m_pbModCam">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>修改/预览</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="m_pbDelCam">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>删除</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="m_pbAddCam">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>手动添加</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="m_pbFound">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查找可用</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_pbClose">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关闭</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Binary file not shown.
Loading…
Reference in New Issue