Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
5dde02103b
|
|
@ -1522,28 +1522,41 @@ bool ParameterEditorModel::slotOnDeleteItem(const QString& strDeleteItemID)
|
||||||
pArrayCategory = m_rootItem->GetParameterProperty(pParentItem->GetId());
|
pArrayCategory = m_rootItem->GetParameterProperty(pParentItem->GetId());
|
||||||
if(pArrayCategory != NULL)
|
if(pArrayCategory != NULL)
|
||||||
{
|
{
|
||||||
|
CCompositeParameterItem* pCompositeDeleteItem = dynamic_cast<CCompositeParameterItem*> (pParentItem);
|
||||||
|
if(pCompositeDeleteItem != NULL)
|
||||||
|
{
|
||||||
|
for(int i=0;i<pCompositeDeleteItem->GetChildCount();++i)
|
||||||
|
{
|
||||||
|
if(!pCompositeDeleteItem->GetParameterItem(i)) continue;
|
||||||
|
ParameterProperty* pDeleteProperty = m_rootItem->GetParameterProperty(pCompositeDeleteItem->GetParameterItem(i)->GetId());
|
||||||
|
if(pDeleteProperty != NULL)
|
||||||
|
{
|
||||||
|
lstDeleteRows.push_back(pDeleteProperty->GetRow());//得到待删除的节点在父节点的索引
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//统计待删除对象在父节点中的索引
|
//统计待删除对象在父节点中的索引
|
||||||
CCompositeParameterItem* pCompositeDeleteItem = dynamic_cast<CCompositeParameterItem*> (pDeleteItem);
|
//CCompositeParameterItem* pCompositeDeleteItem = dynamic_cast<CCompositeParameterItem*> (pDeleteItem);
|
||||||
if(pCompositeDeleteItem != NULL)
|
//if(pCompositeDeleteItem != NULL)
|
||||||
{
|
//{
|
||||||
for(int i=0;i<pCompositeDeleteItem->GetChildCount();++i)
|
// for(int i=0;i<pCompositeDeleteItem->GetChildCount();++i)
|
||||||
{
|
// {
|
||||||
if(!pCompositeDeleteItem->GetParameterItem(i)) continue;
|
// if(!pCompositeDeleteItem->GetParameterItem(i)) continue;
|
||||||
ParameterProperty* pDeleteProperty = m_rootItem->GetParameterProperty(pCompositeDeleteItem->GetParameterItem(i)->GetId());
|
// ParameterProperty* pDeleteProperty = m_rootItem->GetParameterProperty(pCompositeDeleteItem->GetParameterItem(i)->GetId());
|
||||||
if(pDeleteProperty != NULL)
|
// if(pDeleteProperty != NULL)
|
||||||
{
|
// {
|
||||||
lstDeleteRows.push_back(pDeleteProperty->GetRow());//得到待删除的节点在父节点的索引
|
// lstDeleteRows.push_back(pDeleteProperty->GetRow());//得到待删除的节点在父节点的索引
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
ParameterProperty* pDeleteProperty = m_rootItem->GetParameterProperty(pDeleteItem->GetId());
|
// ParameterProperty* pDeleteProperty = m_rootItem->GetParameterProperty(pDeleteItem->GetId());
|
||||||
if(pDeleteProperty != NULL)
|
// if(pDeleteProperty != NULL)
|
||||||
{
|
// {
|
||||||
lstDeleteRows.push_back(pDeleteProperty->GetRow());
|
// lstDeleteRows.push_back(pDeleteProperty->GetRow());
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
qSort(lstDeleteRows.begin(),lstDeleteRows.end());
|
qSort(lstDeleteRows.begin(),lstDeleteRows.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1353,27 +1353,28 @@ void WorkflowSceneManager::slotAddModule(const QString& moduleName)
|
||||||
// pai::objectmodel::PaiWorkflowDataModel* pWorkflow = pModuleConsole->m_pWorkflowDataModel;
|
// pai::objectmodel::PaiWorkflowDataModel* pWorkflow = pModuleConsole->m_pWorkflowDataModel;
|
||||||
// ::GetWorkflowConsole()->GetWorkflowWidget()->SetWorkflow(pWorkflow);
|
// ::GetWorkflowConsole()->GetWorkflowWidget()->SetWorkflow(pWorkflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin ToolBar工具栏
|
// Plugin ToolBar工具栏
|
||||||
if (pModuleParamers->m_toolBar_plugin)
|
if (amodule && amodule->m_listAct.size() > 0)
|
||||||
|
{
|
||||||
|
// 从插件里获取QAction 显示在Plugin ToolBar工具栏
|
||||||
|
pModuleParamers->m_toolBar_plugin->clear();
|
||||||
|
for (int i = 0; i < amodule->m_listAct.size(); i++)
|
||||||
|
{
|
||||||
|
QAction* pAct = amodule->m_listAct.at(i);
|
||||||
|
QString sicon = pAct->property("icon_v").toString();
|
||||||
|
QIcon imIcon(::GetImagePath() + sicon);
|
||||||
|
pAct->setIcon(imIcon);
|
||||||
|
pModuleParamers->m_toolBar_plugin->addAction(pAct);
|
||||||
|
}
|
||||||
|
pModuleParamers->m_toolBar_plugin->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
pModuleParamers->m_toolBar_plugin->hide();
|
pModuleParamers->m_toolBar_plugin->hide();
|
||||||
|
}
|
||||||
|
|
||||||
if(amodule&&amodule->parDialog) {
|
if(amodule&&amodule->parDialog) {
|
||||||
|
|
||||||
if (pModuleParamers->m_toolBar_plugin->isHidden())
|
|
||||||
{
|
|
||||||
// 从插件里获取QAction 显示在Plugin ToolBar工具栏
|
|
||||||
pModuleParamers->m_toolBar_plugin->clear();
|
|
||||||
for (int i = 0; i < amodule->m_listAct.size(); i++)
|
|
||||||
{
|
|
||||||
QAction* pAct = amodule->m_listAct.at(i);
|
|
||||||
QString sicon = pAct->property("icon_v").toString();
|
|
||||||
QIcon imIcon(::GetImagePath() + sicon);
|
|
||||||
pAct->setIcon(imIcon);
|
|
||||||
pModuleParamers->m_toolBar_plugin->addAction(pAct);
|
|
||||||
}
|
|
||||||
pModuleParamers->m_toolBar_plugin->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
// QRect rt=amodule->parDialog->geometry();
|
// QRect rt=amodule->parDialog->geometry();
|
||||||
// pModuleParamers->m_pParameterEditor->setVisible(false);
|
// pModuleParamers->m_pParameterEditor->setVisible(false);
|
||||||
// pModuleParamers->m_pDialogLayout->setVisible(true);
|
// pModuleParamers->m_pDialogLayout->setVisible(true);
|
||||||
|
|
|
||||||
|
|
@ -1236,7 +1236,7 @@ bool PELibraryModule::validate()
|
||||||
bool PELibraryModule::InitModule(QWidget*pWidget)
|
bool PELibraryModule::InitModule(QWidget*pWidget)
|
||||||
{
|
{
|
||||||
typedef QDialog *(* LPDDIALOG)(QWidget*pWidget);
|
typedef QDialog *(* LPDDIALOG)(QWidget*pWidget);
|
||||||
typedef void* (*LPD_ACTION_FUNC)(int* count);
|
typedef void* (*LPD_ACTION_FUNC)(QWidget*pWidget, int* count);
|
||||||
|
|
||||||
typedef int (* LPFNDLLFUNC)();
|
typedef int (* LPFNDLLFUNC)();
|
||||||
LPFNDLLFUNC lpfnDllFunc,lpfnInitDllFunc;
|
LPFNDLLFUNC lpfnDllFunc,lpfnInitDllFunc;
|
||||||
|
|
@ -1297,19 +1297,6 @@ bool PELibraryModule::InitModule(QWidget*pWidget)
|
||||||
if(m_parDialog) {
|
if(m_parDialog) {
|
||||||
if(errorinf) errorinf->ErrorNo=0;
|
if(errorinf) errorinf->ErrorNo=0;
|
||||||
parDialog=m_parDialog(pWidget);
|
parDialog=m_parDialog(pWidget);
|
||||||
|
|
||||||
LPD_ACTION_FUNC ACT_Func = (LPD_ACTION_FUNC)Methodlib.resolve("getAction_CApi");
|
|
||||||
if (ACT_Func)
|
|
||||||
{
|
|
||||||
int ncount = 0;
|
|
||||||
QAction** actArr = (QAction**)ACT_Func(&ncount);
|
|
||||||
for (int i = 0; i < ncount; i++)
|
|
||||||
{
|
|
||||||
QAction* pAct = actArr[i];
|
|
||||||
QString s = pAct->property("icon_v").toString();
|
|
||||||
m_listAct << actArr[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(errorinf) {
|
if(errorinf) {
|
||||||
if(errorinf->ErrorNo<0) {
|
if(errorinf->ErrorNo<0) {
|
||||||
if(parDialog) {
|
if(parDialog) {
|
||||||
|
|
@ -1329,6 +1316,20 @@ bool PELibraryModule::InitModule(QWidget*pWidget)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_listAct.clear();
|
||||||
|
LPD_ACTION_FUNC ACT_Func = (LPD_ACTION_FUNC)Methodlib.resolve("getAction_CApi");
|
||||||
|
if (ACT_Func)
|
||||||
|
{
|
||||||
|
int ncount = 0;
|
||||||
|
QAction** actArr = (QAction**)ACT_Func(pWidget, &ncount);
|
||||||
|
for (int i = 0; i < ncount; i++)
|
||||||
|
{
|
||||||
|
QAction* pAct = actArr[i];
|
||||||
|
QString s = pAct->property("icon_v").toString();
|
||||||
|
m_listAct << actArr[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
/////////////////
|
/////////////////
|
||||||
Hd = (struct HD_STRU *)Methodlib.resolve("HD");
|
Hd = (struct HD_STRU *)Methodlib.resolve("HD");
|
||||||
Inc = (struct INC_STRU *)Methodlib.resolve("INC");
|
Inc = (struct INC_STRU *)Methodlib.resolve("INC");
|
||||||
|
|
@ -1341,17 +1342,26 @@ bool PELibraryModule::InitModule(QWidget*pWidget)
|
||||||
// 显示乱码进行字符串转码
|
// 显示乱码进行字符串转码
|
||||||
if (strlen(Inc->Script)==0&&strlen(Inc->Name)>0)// m_pMemRdWt->ChangeName函数会用Inc->Name生成Inc->Scrip,防止重复转换字符串格式,暂时先这样判断是否转换过格式
|
if (strlen(Inc->Script)==0&&strlen(Inc->Name)>0)// m_pMemRdWt->ChangeName函数会用Inc->Name生成Inc->Scrip,防止重复转换字符串格式,暂时先这样判断是否转换过格式
|
||||||
{
|
{
|
||||||
ToUnicode(Inc->Name);
|
if (Inc)
|
||||||
ToUnicode(Inc->Script);
|
{
|
||||||
ToUnicode(Inc->Unit);
|
ToUnicode(Inc->Name);
|
||||||
ToUnicode(Conc->Name);
|
ToUnicode(Inc->Script);
|
||||||
ToUnicode(Conc->Script);
|
ToUnicode(Inc->Unit);
|
||||||
ToUnicode(Conc->Unit);
|
}
|
||||||
ToUnicode(Conc->Options);
|
if (Conc)
|
||||||
ToUnicode(Conc->ValType);
|
{
|
||||||
ToUnicode(Outc->Name);
|
ToUnicode(Conc->Name);
|
||||||
ToUnicode(Outc->Script);
|
ToUnicode(Conc->Script);
|
||||||
ToUnicode(Outc->Unit);
|
ToUnicode(Conc->Unit);
|
||||||
|
ToUnicode(Conc->Options);
|
||||||
|
ToUnicode(Conc->ValType);
|
||||||
|
}
|
||||||
|
if (Outc)
|
||||||
|
{
|
||||||
|
ToUnicode(Outc->Name);
|
||||||
|
ToUnicode(Outc->Script);
|
||||||
|
ToUnicode(Outc->Unit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(paramCardNameInSlf.isEmpty()) {
|
if(paramCardNameInSlf.isEmpty()) {
|
||||||
if(Hd){
|
if(Hd){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user