[ref]同步711
This commit is contained in:
parent
e79ee6bbcd
commit
67583b747f
@ -1,4 +1,4 @@
|
||||
#ifndef CDATAOPTCOMMON_H
|
||||
#ifndef CDATAOPTCOMMON_H
|
||||
#define CDATAOPTCOMMON_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
class CDataOptPluginWidget : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
public:
|
||||
CDataOptPluginWidget(QObject *parent = 0);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDataOptWidget.h"
|
||||
#include "CDataOptWidget.h"
|
||||
#include "ui_CDataOptWidget.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
#include <QFile>
|
||||
@ -454,7 +454,7 @@ int CDataOptWidget::createReqHead(SOptReqHead &head)
|
||||
if(createSysInfoInstance(sysInfo) == false)
|
||||
{
|
||||
LOGERROR("创建系统信息访问库实例失败!");
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -467,13 +467,13 @@ int CDataOptWidget::createReqHead(SOptReqHead &head)
|
||||
if(permMng->PermDllInit() != PERM_NORMAL)
|
||||
{
|
||||
LOGERROR("权限接口初始化失败!");
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}else
|
||||
{
|
||||
if(PERM_NORMAL != permMng->CurUser(userID, usergID, level, loginSec, instanceName))
|
||||
{
|
||||
userID = -1;
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -488,7 +488,7 @@ int CDataOptWidget::createReqHead(SOptReqHead &head)
|
||||
head.nUserGroupID = usergID;
|
||||
head.nOptTime = QDateTime::currentDateTime().toMSecsSinceEpoch();
|
||||
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
|
||||
void CDataOptWidget::filter(const QString &text)
|
||||
@ -575,7 +575,7 @@ void CDataOptWidget::setDefaultWidth()
|
||||
|
||||
void CDataOptWidget::cancelSetValue()
|
||||
{
|
||||
QString mess = QString(tr("当前未选中任何项!"));
|
||||
QString mess = QString(tr("请至少选择一项人工置数信息!"));
|
||||
QList<QTreeWidgetItem*> list = ui->treeWidget->selectedItems();
|
||||
if (list.size() <= 0)
|
||||
{
|
||||
@ -671,13 +671,13 @@ void CDataOptWidget::cancelSetValue()
|
||||
bool CDataOptWidget::cancelItemSetValue(const QString &desc,const QString &tagName, int tagType)
|
||||
{
|
||||
STOptTagInfo info;
|
||||
if(m_pWork->getOptTagInfoByTagAndType(tagName,tagType,info) !=kbdSuccess )
|
||||
if(m_pWork->getOptTagInfoByTagAndType(tagName,tagType,info) !=iotSuccess )
|
||||
{
|
||||
slotShowMess(tr("获取标签操作信息有误,%1").arg(desc));
|
||||
return false;
|
||||
}
|
||||
STTagInfo tagInfo;
|
||||
if(m_pWork->getTagInfoByTag(tagName,tagInfo) !=kbdSuccess )
|
||||
if(m_pWork->getTagInfoByTag(tagName,tagInfo) !=iotSuccess )
|
||||
{
|
||||
slotShowMess(tr("获取标签信息有误,%1").arg(desc));
|
||||
return false;
|
||||
@ -698,9 +698,8 @@ void CDataOptWidget::removeOptTagInfo(const STOptTagInfo &info)
|
||||
msg.setSubject(info.subSystem, CH_HMI_TO_OPT_OPTCMD_DOWN);
|
||||
SOptTagSet sOptTagSet;
|
||||
SOptTagQueue optTagQueue;
|
||||
COptTagSet cOptTagSet;
|
||||
|
||||
if(createReqHead(sOptTagSet.stHead)!= kbdSuccess)
|
||||
if(createReqHead(sOptTagSet.stHead)!= iotSuccess)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
@ -713,7 +712,7 @@ void CDataOptWidget::removeOptTagInfo(const STOptTagInfo &info)
|
||||
optTagQueue.nSubSystem = info.subSystem;
|
||||
|
||||
sOptTagSet.vecTagQueue.push_back(optTagQueue);
|
||||
std::string content = cOptTagSet.generate(sOptTagSet);
|
||||
std::string content = COptTagSet::generate(sOptTagSet);
|
||||
int type = info.tagType;
|
||||
if(type == 1)
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDATAOPTWIDGET_H
|
||||
#ifndef CDATAOPTWIDGET_H
|
||||
#define CDATAOPTWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDataOptWork.h"
|
||||
#include "CDataOptWork.h"
|
||||
#include "Common.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
|
||||
@ -22,21 +22,21 @@ int CDataOptWork::getOptTagInfoByTagAndType(const QString &tag, int type,STOptTa
|
||||
if(m_optTagInfoList[index].tagName == tag && type == m_optTagInfoList[index].tagType)
|
||||
{
|
||||
info = m_optTagInfoList[index];
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
}
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
|
||||
int CDataOptWork::getTagInfoByTag(const QString &tag, STTagInfo &info)
|
||||
{
|
||||
if(m_TagInfoMap.find(tag) == m_TagInfoMap.end())
|
||||
{
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}else
|
||||
{
|
||||
info = m_TagInfoMap.value(tag);
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "pub_logger_api/logger.h"
|
||||
@ -19,7 +19,7 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(perm->SysLogin("Test", "kbdct", 1, 12*60*60, "hmi") != 0)
|
||||
if(perm->SysLogin("admin", "admin", 1, 12*60*60, "hmi") != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDbInterface.h"
|
||||
#include "CDbInterface.h"
|
||||
#include "public/pub_sysinfo_api/SysInfoApi.h"
|
||||
#include "public/pub_logger_api/logger.h"
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDBINTERFACE_H
|
||||
#ifndef CDBINTERFACE_H
|
||||
#define CDBINTERFACE_H
|
||||
|
||||
#include "dbms/rdb_api/CRdbAccess.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDevHisDataPluginWidget.h"
|
||||
#include "CDevHisDataPluginWidget.h"
|
||||
#include "CDevHisDataWidget.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDEVHISDATAPLUGINWIDGET_H
|
||||
#ifndef CDEVHISDATAPLUGINWIDGET_H
|
||||
#define CDEVHISDATAPLUGINWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class CDevHisDataPluginWidget : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
|
||||
public:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDevHisDataWidget.h"
|
||||
#include "CDevHisDataWidget.h"
|
||||
#include "ui_CDevHisDataWidget.h"
|
||||
#include "CTableViewPrinter.h"
|
||||
#include "model_excel/xlsx/xlsxdocument.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDEVHISDATAWIDGET_H
|
||||
#ifndef CDEVHISDATAWIDGET_H
|
||||
#define CDEVHISDATAWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDevHisTableModel.h"
|
||||
#include "CDevHisTableModel.h"
|
||||
#include <QDateTime>
|
||||
|
||||
CDevHisTableModel::CDevHisTableModel(QObject *parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDEVHISTABLEMODEL_H
|
||||
#ifndef CDEVHISTABLEMODEL_H
|
||||
#define CDEVHISTABLEMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDevHisTableView.h"
|
||||
#include "CDevHisTableView.h"
|
||||
|
||||
CDevHisTableView::CDevHisTableView(QWidget *parent)
|
||||
:QTableView(parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDEVHISTABLEVIEW_H
|
||||
#ifndef CDEVHISTABLEVIEW_H
|
||||
#define CDEVHISTABLEVIEW_H
|
||||
|
||||
#include <QTableView>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CHisDataManage.h"
|
||||
#include "CHisDataManage.h"
|
||||
#include "public/pub_logger_api/logger.h"
|
||||
|
||||
#define SAMPLE_CYC_MIN 5 //MIN
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CHISDATAMANAGE_H
|
||||
#ifndef CHISDATAMANAGE_H
|
||||
#define CHISDATAMANAGE_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTableViewPrinter.h"
|
||||
#include "CTableViewPrinter.h"
|
||||
#include <QPainter>
|
||||
#include <QPrinter>
|
||||
#include <QTableView>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTABLEVIEWPRINTER_H
|
||||
#ifndef CTABLEVIEWPRINTER_H
|
||||
#define CTABLEVIEWPRINTER_H
|
||||
|
||||
class QPointF;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include <QApplication>
|
||||
#include <QApplication>
|
||||
#include "CDevHisDataWidget.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
#include "dp_chg_data_api/CDpcdaForApp.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDOCPATHMANAGE_H
|
||||
#ifndef CDOCPATHMANAGE_H
|
||||
#define CDOCPATHMANAGE_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#include "CDocumentManagePlugin.h"
|
||||
#include "CDocumentManagePlugin.h"
|
||||
#include "CDocumentManageWidget.h"
|
||||
|
||||
CDocumentManagePlugin::CDocumentManagePlugin(QObject *parent)
|
||||
{
|
||||
|
||||
Q_UNUSED(parent);
|
||||
}
|
||||
|
||||
CDocumentManagePlugin::~CDocumentManagePlugin()
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
#ifndef CDOCUMENTMANAGEPLUGIN_H
|
||||
#ifndef CDOCUMENTMANAGEPLUGIN_H
|
||||
#define CDOCUMENTMANAGEPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#include "GraphShape/CPluginWidget.h" //< ISCS6000_HOME/platform/src/include/gui/GraphShape
|
||||
#include "GraphShape/CPluginWidget.h" //< RQEH6000_HOME/platform/src/include/gui/GraphShape
|
||||
|
||||
class CDocumentManagePlugin : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
|
||||
public:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDocumentManageWidget.h"
|
||||
#include "CDocumentManageWidget.h"
|
||||
#include "ui_CDocumentManageWidget.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
#include <QFile>
|
||||
@ -33,6 +33,11 @@ CDocumentManageWidget::~CDocumentManageWidget()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CDocumentManageWidget::setFileTableColumnWidth(int colum, int value)
|
||||
{
|
||||
ui->m_tableWidget->setColumnWidth(colum,value);
|
||||
}
|
||||
|
||||
void CDocumentManageWidget::initStyle()
|
||||
{
|
||||
QString qss = QString();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CDOCUMENTMANAGEWIDGET_H
|
||||
#ifndef CDOCUMENTMANAGEWIDGET_H
|
||||
#define CDOCUMENTMANAGEWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
@ -15,12 +15,16 @@ public:
|
||||
explicit CDocumentManageWidget(QWidget *parent = 0, bool isEditMode = true);
|
||||
~CDocumentManageWidget();
|
||||
|
||||
public slots:
|
||||
void setFileTableColumnWidth(int colum, int value);
|
||||
|
||||
private:
|
||||
void initStyle();
|
||||
|
||||
private slots:
|
||||
void slotSearch();
|
||||
|
||||
|
||||
private:
|
||||
Ui::CDocumentManageWidget *ui;
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CFileFolderTree.h"
|
||||
#include "CFileFolderTree.h"
|
||||
#include "CDocComManage.h"
|
||||
#include "CInputDialog.h"
|
||||
#include <QContextMenuEvent>
|
||||
@ -210,6 +210,7 @@ void CFileFolderTree::slotModify()
|
||||
{
|
||||
currentItem()->setText(0, newName);
|
||||
currentItem()->setData(0, Qt::UserRole, newModuleDir);
|
||||
emit fileItemClicked(newModuleDir);
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,7 +265,7 @@ void CFileFolderTree::contextMenuEvent(QContextMenuEvent *event)
|
||||
QTreeWidgetItem * pItem = static_cast<QTreeWidgetItem*>(indexAt(event->pos()).internalPointer());
|
||||
if(Q_NULLPTR != pItem)
|
||||
{
|
||||
QMenu menu;
|
||||
QMenu menu(this);
|
||||
menu.addAction(tr("添加"), [=](){ slotAdd(); });
|
||||
menu.addAction(tr("修改"), [=](){ slotModify(); });
|
||||
menu.addAction(tr("删除"), [=](){ slotDelete(); });
|
||||
@ -272,7 +273,7 @@ void CFileFolderTree::contextMenuEvent(QContextMenuEvent *event)
|
||||
}
|
||||
else
|
||||
{
|
||||
QMenu menu;
|
||||
QMenu menu(this);
|
||||
menu.addAction(tr("添加"), [=](){ slotAdd(); });
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFILEFOLDERTREE_H
|
||||
#ifndef CFILEFOLDERTREE_H
|
||||
#define CFILEFOLDERTREE_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CFileTableWidget.h"
|
||||
#include "CFileTableWidget.h"
|
||||
#include "CDocComManage.h"
|
||||
#include <QMessageBox>
|
||||
#include <QDateTime>
|
||||
@ -7,6 +7,9 @@
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QDesktopServices>
|
||||
#include <QtMath>
|
||||
#include "pub_utility_api/I18N.h"
|
||||
|
||||
|
||||
CFileTableWidget::CFileTableWidget(QWidget *parent)
|
||||
: QTableWidget(parent)
|
||||
@ -250,16 +253,22 @@ void CFileTableWidget::setTableRowHeight(const int &nHeight)
|
||||
void CFileTableWidget::initialize()
|
||||
{
|
||||
setColumnCount(4);
|
||||
setColumnWidth(COLUMN_SEQ, 50);
|
||||
setColumnWidth(COLUMN_NAME, 350);
|
||||
setColumnWidth(COLUMN_DATE, 190);
|
||||
// setColumnWidth(COLUMN_SEQ, 50);
|
||||
// setColumnWidth(COLUMN_NAME, 350);
|
||||
// setColumnWidth(COLUMN_DATE, 190);
|
||||
setHorizontalHeaderLabels(QStringList() << tr("序号") << tr("文档名称") << tr("文档修改时间") << tr("文档路径"));
|
||||
horizontalHeader()->setDefaultSectionSize(200);
|
||||
setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
horizontalHeader()->setStretchLastSection(true);
|
||||
setAlternatingRowColors(true);
|
||||
verticalHeader()->setHidden(true);
|
||||
|
||||
resizeRowsToContents();
|
||||
horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
setWordWrap(true);
|
||||
}
|
||||
|
||||
void CFileTableWidget::makeTable(const QString &path)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFILETABLEWIDGET_H
|
||||
#ifndef CFILETABLEWIDGET_H
|
||||
#define CFILETABLEWIDGET_H
|
||||
|
||||
#include <QTableWidget>
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
#include "CInputDialog.h"
|
||||
#include "CInputDialog.h"
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLayout>
|
||||
|
||||
const QString CN_BtnObjName = "CInputDialog#QDialogButtonBox";
|
||||
|
||||
CInputDialog::CInputDialog(QWidget *parent)
|
||||
: QDialog(parent),
|
||||
: CustomDialog(parent),
|
||||
m_nInputId(0)
|
||||
{
|
||||
QVBoxLayout * layout = new QVBoxLayout(this);
|
||||
m_pMainLayout = new QVBoxLayout(this);
|
||||
QDialogButtonBox * buttonBox = new QDialogButtonBox(
|
||||
QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
layout->addWidget(buttonBox);
|
||||
layout->setMargin(3);
|
||||
layout->setSpacing(3);
|
||||
setLayout(layout);
|
||||
m_pMainLayout->addWidget(buttonBox);
|
||||
m_pMainLayout->setMargin(3);
|
||||
m_pMainLayout->setSpacing(3);
|
||||
setLayout(m_pMainLayout);
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, [=]{accept();});
|
||||
connect(buttonBox, &QDialogButtonBox::rejected, [=]{reject();});
|
||||
}
|
||||
@ -31,7 +33,7 @@ void CInputDialog::setTitle(const QString &title)
|
||||
|
||||
int CInputDialog::addOneInput(const QString &text, const QString &value)
|
||||
{
|
||||
QVBoxLayout *gLayout = dynamic_cast<QVBoxLayout*>(this->layout());
|
||||
QVBoxLayout *gLayout = dynamic_cast<QVBoxLayout*>(m_pMainLayout);
|
||||
if(gLayout)
|
||||
{
|
||||
QVBoxLayout * layout = new QVBoxLayout;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
#ifndef CINPUTDIALOG_H
|
||||
#ifndef CINPUTDIALOG_H
|
||||
#define CINPUTDIALOG_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QDialog>
|
||||
#include <QMap>
|
||||
#include "pub_widget/CustomDialog.h"
|
||||
|
||||
class QLineEdit;
|
||||
class CInputDialog : public QDialog
|
||||
class CInputDialog : public CustomDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -22,7 +22,7 @@ public:
|
||||
private:
|
||||
int m_nInputId;
|
||||
QMap<int, QLineEdit *> m_inputMap;
|
||||
|
||||
QVBoxLayout *m_pMainLayout;
|
||||
};
|
||||
|
||||
#endif // CINPUTDIALOG_H
|
||||
|
||||
@ -43,7 +43,8 @@ FORMS += \
|
||||
|
||||
LIBS += \
|
||||
-lpub_utility_api \
|
||||
-lperm_mng_api
|
||||
-lperm_mng_api \
|
||||
-lpub_widget
|
||||
|
||||
COMMON_PRI=$$PWD/../../../common.pri
|
||||
exists($$COMMON_PRI) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CDocumentManageWidget.h"
|
||||
#include "CDocumentManageWidget.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFAULTRECALLRECORDCOMMON_H
|
||||
#ifndef CFAULTRECALLRECORDCOMMON_H
|
||||
#define CFAULTRECALLRECORDCOMMON_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CFaultRecallRecordPluginWidget.h"
|
||||
#include "CFaultRecallRecordPluginWidget.h"
|
||||
#include "CFaultRecallRecordWidget.h"
|
||||
CFaultRecallRecordPluginWidget::CFaultRecallRecordPluginWidget(QObject *parent): QObject(parent)
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFAULTRECALLRECORDPLUGINWIDGET_H
|
||||
#ifndef CFAULTRECALLRECORDPLUGINWIDGET_H
|
||||
#define CFAULTRECALLRECORDPLUGINWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class CFaultRecallRecordPluginWidget : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
public:
|
||||
CFaultRecallRecordPluginWidget(QObject *parent = 0);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CFaultRecallRecordWidget.h"
|
||||
#include "CFaultRecallRecordWidget.h"
|
||||
#include "ui_CFaultRecallRecordWidget.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
#include <QFile>
|
||||
@ -469,6 +469,9 @@ void CFaultRecallRecordWidget::setRecordStatus(int status)
|
||||
|
||||
void CFaultRecallRecordWidget::slotItemDoubleClicked(QTreeWidgetItem *item, int cl)
|
||||
{
|
||||
Q_UNUSED(item);
|
||||
Q_UNUSED(cl);
|
||||
|
||||
slotPlayBtn();
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFAULTRECALLRECORDWIDGET_H
|
||||
#ifndef CFAULTRECALLRECORDWIDGET_H
|
||||
#define CFAULTRECALLRECORDWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
@ -65,7 +65,7 @@ public slots:
|
||||
void setColumnHidden(int column,bool hide);
|
||||
void setColumnWidth(int column,int width);
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void sigPlay(const QString& file,qint64 startTime, qint64 endTime);
|
||||
|
||||
private:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "pub_logger_api/logger.h"
|
||||
@ -19,7 +19,7 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(perm->SysLogin("admin", "kbdct", 1, 12*60*60, "hmi") != 0)
|
||||
if(perm->SysLogin("admin", "admin", 1, 12*60*60, "hmi") != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "FaultRecordModel.h"
|
||||
#include "FaultRecordModel.h"
|
||||
#include <QDateTime>
|
||||
FaultRecordModel::FaultRecordModel(QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef FAULTRECORDMODEL_H
|
||||
#ifndef FAULTRECORDMODEL_H
|
||||
#define FAULTRECORDMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "FaultRecordPluginWidget.h"
|
||||
#include "FaultRecordPluginWidget.h"
|
||||
#include "FaultRecordWidget.h"
|
||||
#include <QWidget>
|
||||
#include "StructDefine.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef FAULTRECORDPLUGINWIDGET_H
|
||||
#ifndef FAULTRECORDPLUGINWIDGET_H
|
||||
#define FAULTRECORDPLUGINWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class FaultRecordPluginWidget : public QObject , public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
public:
|
||||
FaultRecordPluginWidget(QObject *parent = nullptr);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "FaultRecordWidget.h"
|
||||
#include "FaultRecordWidget.h"
|
||||
#include "ui_FaultRecordWidget.h"
|
||||
#include <QDir>
|
||||
#include <QCompleter>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef FAULTRECORDWIDGET_H
|
||||
#ifndef FAULTRECORDWIDGET_H
|
||||
#define FAULTRECORDWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef STRUCTDEFINE_H
|
||||
#ifndef STRUCTDEFINE_H
|
||||
#define STRUCTDEFINE_H
|
||||
#include <QMetaType>
|
||||
#include <QSharedPointer>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "FaultRecordWidget.h"
|
||||
#include "FaultRecordWidget.h"
|
||||
#include <QApplication>
|
||||
#include "pub_logger_api/logger.h"
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include <QWidget>
|
||||
#include <QWidget>
|
||||
#include "FbdEditorPluginWidget.h"
|
||||
#include "FbdEditorWidget.h"
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef FBDEDITORPLUGINWIDGET_H
|
||||
#ifndef FBDEDITORPLUGINWIDGET_H
|
||||
#define FBDEDITORPLUGINWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class CFbdEditorPluginWidget: public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
|
||||
public:
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#include "FbdEditorWidget.h"
|
||||
#include "FbdEditorWidget.h"
|
||||
#include "fbd_designer/fbd_editor/CFBDMainWindow.h"
|
||||
#include "fbd_designer/fbd_editor/CFBDMainWindow_global.h"
|
||||
#include "public/pub_utility_api/FileUtil.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
#include <QGridLayout>
|
||||
|
||||
FbdEditorWidget::FbdEditorWidget(bool editMode, QWidget *parent) :
|
||||
@ -20,10 +22,14 @@ FbdEditorWidget::FbdEditorWidget(bool editMode, QWidget *parent) :
|
||||
else
|
||||
{
|
||||
m_ptrWindow = new CFBDMainWindow(parent);
|
||||
m_ptrWindow->setObjectName("fbdEditorWindow");
|
||||
m_ptrWindow->slotInit();
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
layout->addWidget(m_ptrWindow);
|
||||
layout->setMargin(0);
|
||||
setLayout(layout);
|
||||
|
||||
initStyle();
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,6 +42,34 @@ FbdEditorWidget::~FbdEditorWidget()
|
||||
m_ptrWindow = NULL;
|
||||
}
|
||||
|
||||
void FbdEditorWidget::initStyle()
|
||||
{
|
||||
QString qss = QString();
|
||||
std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ;
|
||||
QFile qssfile1(QString::fromStdString(strFullPath));
|
||||
qssfile1.open(QFile::ReadOnly);
|
||||
if (qssfile1.isOpen())
|
||||
{
|
||||
qss += QLatin1String(qssfile1.readAll());
|
||||
//setStyleSheet(qss);
|
||||
qssfile1.close();
|
||||
}
|
||||
|
||||
strFullPath = iot_public::CFileStyle::getPathOfStyleFile("fbd_designer.qss") ;
|
||||
QFile qssfile2(QString::fromStdString(strFullPath));
|
||||
qssfile2.open(QFile::ReadOnly);
|
||||
if (qssfile2.isOpen())
|
||||
{
|
||||
qss += QLatin1String(qssfile2.readAll());
|
||||
//setStyleSheet(qss);
|
||||
qssfile2.close();
|
||||
}
|
||||
if(!qss.isEmpty())
|
||||
{
|
||||
setStyleSheet(qss);
|
||||
}
|
||||
}
|
||||
|
||||
void FbdEditorWidget::slotHideMenu(bool bHide)
|
||||
{
|
||||
if(m_ptrWindow)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef FBDEDITORWIDGET_H
|
||||
#ifndef FBDEDITORWIDGET_H
|
||||
#define FBDEDITORWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
@ -11,6 +11,8 @@ class FbdEditorWidget : public QWidget
|
||||
public:
|
||||
explicit FbdEditorWidget(bool editMode, QWidget *parent = 0);
|
||||
~FbdEditorWidget();
|
||||
private:
|
||||
void initStyle();
|
||||
|
||||
public slots:
|
||||
void slotHideMenu(bool bHide);
|
||||
|
||||
@ -33,7 +33,9 @@ HEADERS += \
|
||||
FbdEditorPluginWidget.h \
|
||||
FbdEditorWidget.h
|
||||
|
||||
LIBS += -lfbd_editor
|
||||
LIBS += -lfbd_editor -lpub_widget
|
||||
LIBS += -lpub_utility_api
|
||||
|
||||
|
||||
exists($$PWD/../../../common.pri) {
|
||||
include($$PWD/../../../common.pri)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
class CHangPanelPluginWidget : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
public:
|
||||
CHangPanelPluginWidget(QObject *parent = 0);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CHangPanelWidget.h"
|
||||
#include "CHangPanelWidget.h"
|
||||
#include "ui_CHangPanelWidget.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
#include <QFile>
|
||||
@ -272,7 +272,7 @@ void CHangPanelWidget::loadHangType()
|
||||
{
|
||||
int nTokenId = query.value(0).toInt();
|
||||
QString sDesc = query.value(1).toString();
|
||||
int nTokenProp = query.value(2).toInt();
|
||||
//int nTokenProp = query.value(2).toInt();
|
||||
m_typeMap.insert(nTokenId, sDesc);
|
||||
}
|
||||
return;
|
||||
@ -441,7 +441,7 @@ int CHangPanelWidget::createReqHead(SOptReqHead &head)
|
||||
if(createSysInfoInstance(sysInfo) == false)
|
||||
{
|
||||
LOGERROR("创建系统信息访问库实例失败!");
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -454,13 +454,13 @@ int CHangPanelWidget::createReqHead(SOptReqHead &head)
|
||||
if(permMng->PermDllInit() != PERM_NORMAL)
|
||||
{
|
||||
LOGERROR("权限接口初始化失败!");
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}else
|
||||
{
|
||||
if(PERM_NORMAL != permMng->CurUser(userID, usergID, level, loginSec, instanceName))
|
||||
{
|
||||
userID = -1;
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -475,12 +475,14 @@ int CHangPanelWidget::createReqHead(SOptReqHead &head)
|
||||
head.nUserGroupID = usergID;
|
||||
head.nOptTime = QDateTime::currentDateTime().toMSecsSinceEpoch();
|
||||
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
|
||||
void CHangPanelWidget::filter(const QString &content)
|
||||
{
|
||||
Q_UNUSED(content);
|
||||
|
||||
/* 没看出实际作用,注释掉
|
||||
int locId = ui->cLocation->currentData().toInt();
|
||||
int row = ui->tableWidget->rowCount();
|
||||
for(int index(0);index<row;index++)
|
||||
@ -488,6 +490,7 @@ void CHangPanelWidget::filter(const QString &content)
|
||||
int loc = ui->tableWidget->item(index,0)->data(Qt::UserRole).toInt();
|
||||
int type = ui->tableWidget->item(index,4)->data(Qt::UserRole).toInt();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void CHangPanelWidget::slotShowMess(const QString &mess)
|
||||
@ -540,10 +543,10 @@ void CHangPanelWidget::cancelHangePanel()
|
||||
slotShowMess(mess);
|
||||
return;
|
||||
}
|
||||
int row = ui->tableWidget->currentRow();
|
||||
QString tagName= ui->tableWidget->item(row,10)->data(Qt::UserRole).toString(); //标签
|
||||
QString descName= ui->tableWidget->item(row,10)->text(); //标签
|
||||
int tagType = ui->tableWidget->item(row,3)->data(Qt::UserRole).toInt(); //挂牌类型
|
||||
//int row = ui->tableWidget->currentRow();
|
||||
//QString tagName= ui->tableWidget->item(row,10)->data(Qt::UserRole).toString(); //标签
|
||||
//QString descName= ui->tableWidget->item(row,10)->text(); //标签
|
||||
//int tagType = ui->tableWidget->item(row,3)->data(Qt::UserRole).toInt(); //挂牌类型
|
||||
|
||||
struct itemData
|
||||
{
|
||||
@ -581,13 +584,13 @@ void CHangPanelWidget::cancelHangePanel()
|
||||
bool CHangPanelWidget::cancelItemHangePanel(const QString &desc, const QString &tagName, int tagType)
|
||||
{
|
||||
SHangPanelInfo info;
|
||||
if(m_pWork->getHangInfoByTagAndType(tagName,tagType,info) !=kbdSuccess ) //得到挂牌信息
|
||||
if(m_pWork->getHangInfoByTagAndType(tagName,tagType,info) !=iotSuccess ) //得到挂牌信息
|
||||
{
|
||||
slotShowMess(tr("获取标签挂牌信息有误,%1").arg(desc));
|
||||
return false;
|
||||
}
|
||||
SDeviceInfo tagInfo;
|
||||
if(m_pWork->getHangeInfoByTag(tagName,tagInfo) !=kbdSuccess ) //挂牌设备信息
|
||||
if(m_pWork->getHangeInfoByTag(tagName,tagInfo) !=iotSuccess ) //挂牌设备信息
|
||||
{
|
||||
slotShowMess(tr("获取标签挂牌信息有误,%1").arg(desc));
|
||||
return false;
|
||||
@ -607,9 +610,8 @@ void CHangPanelWidget::removeHangInfo(const SHangPanelInfo &info)
|
||||
msg.setSubject(info.subSystem, CH_HMI_TO_OPT_OPTCMD_DOWN);
|
||||
STokenSet sOptHangSet;
|
||||
STokenQueue optHangQueue;
|
||||
CTokenSet cTokenSet;
|
||||
|
||||
if(createReqHead(sOptHangSet.stHead)!= kbdSuccess){ return ; }
|
||||
if(createReqHead(sOptHangSet.stHead)!= iotSuccess){ return ; }
|
||||
|
||||
optHangQueue.strKeyIdTag = info.keyIdTag.toStdString();
|
||||
optHangQueue.nTokenId = info.tokenId ;// 0:取消;1:设置;
|
||||
@ -617,7 +619,7 @@ void CHangPanelWidget::removeHangInfo(const SHangPanelInfo &info)
|
||||
optHangQueue.nSubSystem = info.subSystem;
|
||||
|
||||
sOptHangSet.vecTokenQueue.push_back(optHangQueue);
|
||||
std::string content = cTokenSet.generate(sOptHangSet);
|
||||
std::string content = CTokenSet::generate(sOptHangSet);
|
||||
msg.setMsgType(MT_OPT_TOKEN_DELETE);
|
||||
|
||||
msg.setData(content);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CHangPanelWidget_H
|
||||
#ifndef CHangPanelWidget_H
|
||||
#define CHangPanelWidget_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CHangPanelWork.h"
|
||||
#include "CHangPanelWork.h"
|
||||
#include "Common.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
|
||||
@ -22,21 +22,21 @@ int CHangPanelWork::getHangInfoByTagAndType(const QString &tag, int type,SHangPa
|
||||
if(m_listHangPanel[index].tagName == tag && type == m_listHangPanel[index].tokenId)
|
||||
{
|
||||
info = m_listHangPanel[index];
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
}
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
|
||||
int CHangPanelWork::getHangeInfoByTag(const QString &tag, SDeviceInfo &info)
|
||||
{
|
||||
if(m_mapDeviceInfo.find(tag) == m_mapDeviceInfo.end())
|
||||
{
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}else
|
||||
{
|
||||
info = m_mapDeviceInfo.value(tag);
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "pub_logger_api/logger.h"
|
||||
@ -19,7 +19,7 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(perm->SysLogin("Test", "kbdct", 1, 12*60*60, "hmi") != 0)
|
||||
if(perm->SysLogin("Test", "admin", 1, 12*60*60, "hmi") != 0)
|
||||
{
|
||||
//return -1;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CGroupManageDialog.h"
|
||||
#include "CGroupManageDialog.h"
|
||||
#include <QPushButton>
|
||||
#include <QGridLayout>
|
||||
#include <QSpacerItem>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CGROUPMANAGEDIALOG_H
|
||||
#ifndef CGROUPMANAGEDIALOG_H
|
||||
#define CGROUPMANAGEDIALOG_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CHmiRollPlugin.h"
|
||||
#include "CHmiRollPlugin.h"
|
||||
#include "CHmiRollWidget.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CHMIROLLPLUGIN_H
|
||||
#ifndef CHMIROLLPLUGIN_H
|
||||
#define CHMIROLLPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class CHmiRollPlugin : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
|
||||
public:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CHmiRollWidget.h"
|
||||
#include "CHmiRollWidget.h"
|
||||
#include "ConfigWidget.h"
|
||||
#include "CRollSwitchWidget.h"
|
||||
#include <QGridLayout>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CHMIROLLWIDGET_H
|
||||
#ifndef CHMIROLLWIDGET_H
|
||||
#define CHMIROLLWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CLineEditWithBtn.h"
|
||||
#include "CLineEditWithBtn.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QEvent>
|
||||
#include <QDir>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CLINEEDITWITHBTN_H
|
||||
#ifndef CLINEEDITWITHBTN_H
|
||||
#define CLINEEDITWITHBTN_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CRollSwitchWidget.h"
|
||||
#include "CRollSwitchWidget.h"
|
||||
#include <QLabel>
|
||||
#include <QGridLayout>
|
||||
#include <QHeaderView>
|
||||
@ -95,7 +95,7 @@ void CRollSwitchWidget::initWidget()
|
||||
cLayout->addWidget(m_timeSpin);
|
||||
|
||||
QGridLayout *gLayout = new QGridLayout(this);
|
||||
gLayout->addLayout(hLayout, 0, 0, 1, 1);
|
||||
gLayout->addLayout(hLayout, 0, 0, 1,3);
|
||||
gLayout->addWidget(m_TableWidget, 1, 0, 1, 3);
|
||||
gLayout->addLayout(cLayout, 2, 0, 1, 3);
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CROLLSWITCHWIDGET_H
|
||||
#ifndef CROLLSWITCHWIDGET_H
|
||||
#define CROLLSWITCHWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTableDelegata.h"
|
||||
#include "CTableDelegata.h"
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include "CLineEditWithBtn.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTABLEDELEGATA_H
|
||||
#ifndef CTABLEDELEGATA_H
|
||||
#define CTABLEDELEGATA_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CXmlOpt.h"
|
||||
#include "CXmlOpt.h"
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CXMLOPT_H
|
||||
#ifndef CXMLOPT_H
|
||||
#define CXMLOPT_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "ConfigWidget.h"
|
||||
#include "ConfigWidget.h"
|
||||
#include <CTableDelegata.h>
|
||||
#include <QGridLayout>
|
||||
#include <QSpacerItem>
|
||||
@ -8,6 +8,7 @@
|
||||
#include <QContextMenuEvent>
|
||||
#include <QHeaderView>
|
||||
#include <QListView>
|
||||
#include "pub_widget/MessageBox.h"
|
||||
|
||||
ConfigWidget::ConfigWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
@ -233,6 +234,16 @@ void ConfigWidget::slotDelClick()
|
||||
if(m_GroupComb->currentText().isEmpty())
|
||||
return;
|
||||
QList<QTableWidgetSelectionRange> selectList = m_TableWidget->selectedRanges();
|
||||
|
||||
if( selectList.isEmpty() )
|
||||
{
|
||||
N_MessageBox::warning(this, tr("警告"), tr("请选择任意一条记录"));
|
||||
return;
|
||||
}
|
||||
int button = N_MessageBox::information( this, tr("提示"), tr("确认删除?"), N_MessageBox::Yes, N_MessageBox::No );
|
||||
if ( button != N_MessageBox::Yes )
|
||||
return;
|
||||
|
||||
for(int nIndex=selectList.count()-1; nIndex>=0; nIndex--)
|
||||
{
|
||||
int bottomRow = selectList.at(nIndex).bottomRow();
|
||||
@ -251,7 +262,8 @@ void ConfigWidget::slotMoveUpClick()
|
||||
QList<QTableWidgetSelectionRange> selectList = m_TableWidget->selectedRanges();
|
||||
if(selectList.isEmpty() || selectList.first().topRow() == 0)
|
||||
{
|
||||
return;
|
||||
N_MessageBox::warning(this, tr("警告"), tr("请选择任意一条记录"));
|
||||
return;
|
||||
}
|
||||
|
||||
int insertRow = selectList.first().topRow() - 1;
|
||||
@ -271,7 +283,8 @@ void ConfigWidget::slotMoveDownClick()
|
||||
QList<QTableWidgetSelectionRange> selectList = m_TableWidget->selectedRanges();
|
||||
if(selectList.isEmpty() || selectList.last().bottomRow() == m_TableWidget->rowCount()-1)
|
||||
{
|
||||
return;
|
||||
N_MessageBox::warning(this, tr("警告"), tr("请选择任意一条记录"));
|
||||
return;
|
||||
}
|
||||
|
||||
int insertRow = selectList.last().bottomRow() + 2;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CONFIGWIDGET_H
|
||||
#ifndef CONFIGWIDGET_H
|
||||
#define CONFIGWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -46,7 +46,8 @@ HEADERS += \
|
||||
CHmiRollPlugin.h
|
||||
|
||||
LIBS += \
|
||||
-lpub_utility_api
|
||||
-lpub_utility_api\
|
||||
-lpub_widget
|
||||
|
||||
|
||||
COMMON_PRI=$$PWD/../../../common.pri
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CHmiRollWidget.h"
|
||||
#include "CHmiRollWidget.h"
|
||||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CExcelOpt.h"
|
||||
#include "CExcelOpt.h"
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QMutexLocker>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEXCELOPT_H
|
||||
#ifndef CEXCELOPT_H
|
||||
#define CEXCELOPT_H
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CInversetimelimitPluginWidget.h"
|
||||
#include "CInversetimelimitPluginWidget.h"
|
||||
#include "inversetimelimit.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CINVERSETIMELIMITPLUGINWIDGET_H
|
||||
#ifndef CINVERSETIMELIMITPLUGINWIDGET_H
|
||||
#define CINVERSETIMELIMITPLUGINWIDGET_H
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
class CInversetimelimitPluginWidge : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
public:
|
||||
CInversetimelimitPluginWidge(QObject *parent = 0);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CProcessDialog.h"
|
||||
#include "CProcessDialog.h"
|
||||
#include "ui_CProcessDialog.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CPROCESSDIALOG_H
|
||||
#ifndef CPROCESSDIALOG_H
|
||||
#define CPROCESSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "inversetimelimit.h"
|
||||
#include "inversetimelimit.h"
|
||||
#include "ui_inversetimelimit.h"
|
||||
#include "CProcessDialog.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef INVERSETIMELIMIT_H
|
||||
#ifndef INVERSETIMELIMIT_H
|
||||
#define INVERSETIMELIMIT_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "inversetimelimit.h"
|
||||
#include "inversetimelimit.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "mainwindow.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include <QSplitter>
|
||||
#include <QWebEngineView>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef PARA_H
|
||||
#ifndef PARA_H
|
||||
#define PARA_H
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CCamInfo.h"
|
||||
#include "CCamInfo.h"
|
||||
#include "OnvifLibs/onvif.h"
|
||||
#include <QString>
|
||||
#include "CPresetInfo.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CCAMINFO_H
|
||||
#ifndef CCAMINFO_H
|
||||
#define CCAMINFO_H
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "COnvifOpt.h"
|
||||
#include "COnvifOpt.h"
|
||||
#include "common/Common.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
COnvifOpt::COnvifOpt(QObject *parent) : QObject(parent)
|
||||
@ -15,12 +15,12 @@ COnvifOpt::~COnvifOpt()
|
||||
void COnvifOpt::slotCamInfo(CCamInfo caminfo)
|
||||
{
|
||||
LOGINFO("in slotCamInfo(),start getOnvifArgs()");
|
||||
if(kbdSuccess ==caminfo.getOnvifArgs())
|
||||
if(iotSuccess ==caminfo.getOnvifArgs())
|
||||
{
|
||||
emit sigInitStream(caminfo,kbdSuccess);
|
||||
emit sigInitStream(caminfo,iotSuccess);
|
||||
}else
|
||||
{
|
||||
emit sigInitStream(caminfo,kbdFailed);
|
||||
emit sigInitStream(caminfo,iotFailed);
|
||||
}
|
||||
LOGINFO("sig sigInitStream emit");
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CONVIFOPT_H
|
||||
#ifndef CONVIFOPT_H
|
||||
#define CONVIFOPT_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CPRESETINFO_H
|
||||
#ifndef CPRESETINFO_H
|
||||
#define CPRESETINFO_H
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CRdbAccessUtilty.h"
|
||||
#include "CRdbAccessUtilty.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
#include <QDebug>
|
||||
#include "Common.h"
|
||||
@ -23,7 +23,7 @@ CRdbAccessUtilty::~CRdbAccessUtilty()
|
||||
bool CRdbAccessUtilty::getCamInfo(std::string pointtag, CCamInfo & outCamInfo)
|
||||
{
|
||||
std::string pointtype,pointTagWithoutType;
|
||||
if(splitTagName(pointtag,pointtype,pointTagWithoutType) == kbdFailed)
|
||||
if(splitTagName(pointtag,pointtype,pointTagWithoutType) == iotFailed)
|
||||
{
|
||||
LOGERROR("分割标签名错误,标签名为[%s]",pointtag.c_str());
|
||||
return false;
|
||||
@ -58,7 +58,7 @@ int CRdbAccessUtilty::splitTagName(const std::string &inTag, std::string &outTyp
|
||||
std::size_t firstDotindex = inTag.find_first_of('.');
|
||||
if(firstDotindex == std::string::npos)
|
||||
{
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
|
||||
// 赋值表名;
|
||||
@ -75,11 +75,11 @@ int CRdbAccessUtilty::splitTagName(const std::string &inTag, std::string &outTyp
|
||||
else if(inTag.substr(0,firstDotindex) == std::string("mix")){
|
||||
outType = "mix";
|
||||
}else{
|
||||
return kbdFailed;
|
||||
return iotFailed;
|
||||
}
|
||||
|
||||
outTagName = inTag.substr(firstDotindex+1,inTag.size());
|
||||
return kbdSuccess;
|
||||
return iotSuccess;
|
||||
}
|
||||
|
||||
bool CRdbAccessUtilty::queryPointTable(const std::string &pointtag, const std::string &pointType, CCamInfo &outCamInfo)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CRDBACCESSUTILTY_H
|
||||
#ifndef CRDBACCESSUTILTY_H
|
||||
#define CRDBACCESSUTILTY_H
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "IpcPlusPluginWidget.h"
|
||||
#include "IpcPlusPluginWidget.h"
|
||||
#include "IpcPlusWidget.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
IpcPlusPluginWidget::IpcPlusPluginWidget(QObject *parent) : QObject(parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef IPCPLUSPLUGINWIDGET_H
|
||||
#ifndef IPCPLUSPLUGINWIDGET_H
|
||||
#define IPCPLUSPLUGINWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class IpcPlusPluginWidget : public QObject,public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
public:
|
||||
IpcPlusPluginWidget(QObject *parent=0);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "IpcPlusWidget.h"
|
||||
#include "IpcPlusWidget.h"
|
||||
#include "ui_IpcPlusWidget.h"
|
||||
#include <QLayout>
|
||||
#include <QPushButton>
|
||||
@ -191,7 +191,7 @@ void IpcPlusWidget::slotInitStream(CCamInfo caminfo,int result)
|
||||
{
|
||||
LOGINFO("slotInitStream()");
|
||||
|
||||
if(result == kbdFailed)
|
||||
if(result == iotFailed)
|
||||
{
|
||||
// QMessageBox::information(this,tr("提醒"),tr("设置直播流失败"));
|
||||
LOGINFO("information QMessagexBox 设置直播流失败");
|
||||
@ -507,8 +507,7 @@ bool IpcPlusWidget::sendOptContinuousMove(int cmd, double cmd_speed)
|
||||
stOptKeyValue.strKeyValue = QString::number(cmd_speed).toStdString() ;
|
||||
stCustomCmd.vecOptCustCtrlQueue.push_back(stOptKeyValue);
|
||||
|
||||
COptCustCtrlRequest objReq;
|
||||
std::string strMsg = objReq.generate(stCustomCmd);
|
||||
std::string strMsg = COptCustCtrlRequest::generate(stCustomCmd);
|
||||
if (strMsg.empty())
|
||||
{
|
||||
LOGERROR("生成控制命令失败");
|
||||
@ -556,8 +555,7 @@ bool IpcPlusWidget::sendOptStopMove()
|
||||
stOptKeyValue.strKeyValue = m_caminfo.camTag() ;
|
||||
stCustomCmd.vecOptCustCtrlQueue.push_back(stOptKeyValue);
|
||||
|
||||
COptCustCtrlRequest objReq;
|
||||
std::string strMsg = objReq.generate(stCustomCmd);
|
||||
std::string strMsg = COptCustCtrlRequest::generate(stCustomCmd);
|
||||
if (strMsg.empty())
|
||||
{
|
||||
LOGERROR("生成控制命令失败");
|
||||
@ -610,8 +608,7 @@ bool IpcPlusWidget::sendOptGotopreset(const std::string &preset_tag)
|
||||
stOptKeyValue.strKeyValue = preset_tag;
|
||||
stCustomCmd.vecOptCustCtrlQueue.push_back(stOptKeyValue);
|
||||
|
||||
COptCustCtrlRequest objReq;
|
||||
std::string strMsg = objReq.generate(stCustomCmd);
|
||||
std::string strMsg = COptCustCtrlRequest::generate(stCustomCmd);
|
||||
if (strMsg.empty())
|
||||
{
|
||||
LOGERROR("生成控制命令失败");
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef IPCPLUSWIDGET_H
|
||||
#ifndef IPCPLUSWIDGET_H
|
||||
#define IPCPLUSWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "VoiceSlider.h"
|
||||
#include "VoiceSlider.h"
|
||||
#include "ui_VoiceSlider.h"
|
||||
|
||||
VoiceSlider::VoiceSlider(int voice,bool bo, QWidget *parent, Qt::WindowFlags f) :
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef VOICESLIDER_H
|
||||
#ifndef VOICESLIDER_H
|
||||
#define VOICESLIDER_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user