fix update dynamic table
This commit is contained in:
parent
9e42cbb222
commit
ece2debbad
|
|
@ -95,6 +95,7 @@ QMap<QString,propertyStateInfo> CtExtraInfoDlg::getPropertyValue(BaseProperty* p
|
||||||
}
|
}
|
||||||
map.insert(pro.proName,info);
|
map.insert(pro.proName,info);
|
||||||
}
|
}
|
||||||
|
pPro->setDataChanged(true);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "propertyContentDlg.h"
|
#include "propertyContentDlg.h"
|
||||||
|
#include "baseProperty.h"
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
@ -47,6 +48,8 @@ QWidget* PropertyContentDlg::createEditor(propertyStateInfo pro)
|
||||||
else if(pro.type.contains("INTEGER"))
|
else if(pro.type.contains("INTEGER"))
|
||||||
{
|
{
|
||||||
QSpinBox* spin = new QSpinBox(this);
|
QSpinBox* spin = new QSpinBox(this);
|
||||||
|
if(pro.lengthPrecision > 0)
|
||||||
|
spin->setRange(-pro.lengthPrecision,pro.lengthPrecision);
|
||||||
pWidget = spin;
|
pWidget = spin;
|
||||||
}
|
}
|
||||||
else if(pro.type.contains("BIGINT"))
|
else if(pro.type.contains("BIGINT"))
|
||||||
|
|
@ -67,6 +70,8 @@ QWidget* PropertyContentDlg::createEditor(propertyStateInfo pro)
|
||||||
{
|
{
|
||||||
QDoubleSpinBox* dbSpin = new QDoubleSpinBox(this);
|
QDoubleSpinBox* dbSpin = new QDoubleSpinBox(this);
|
||||||
dbSpin->setDecimals(15);
|
dbSpin->setDecimals(15);
|
||||||
|
if(pro.lengthPrecision > 0)
|
||||||
|
dbSpin->setRange(-pro.lengthPrecision,pro.lengthPrecision);
|
||||||
pWidget = dbSpin;
|
pWidget = dbSpin;
|
||||||
}
|
}
|
||||||
else if(pro.type.contains("NUMERIC") || pro.type.contains("DECIMAL"))
|
else if(pro.type.contains("NUMERIC") || pro.type.contains("DECIMAL"))
|
||||||
|
|
@ -251,6 +256,7 @@ QMap<QString,propertyStateInfo> PropertyContentDlg::getPropertyValue(BasePropert
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pPro->setDataChanged(true);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ QMap<QString,propertyStateInfo> PtExtraInfoDlg::getPropertyValue(BaseProperty* p
|
||||||
}
|
}
|
||||||
map.insert(pro.proName,info);
|
map.insert(pro.proName,info);
|
||||||
}
|
}
|
||||||
|
pPro->setDataChanged(true);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -683,6 +683,7 @@ int ProjectModelManager::createPropertyTable(const QString& sMeta,const QString&
|
||||||
QPair<QString,QString> pair = combinePropertySql(item); //拼接单句sql
|
QPair<QString,QString> pair = combinePropertySql(item); //拼接单句sql
|
||||||
fields.append(pair.first);
|
fields.append(pair.first);
|
||||||
}
|
}
|
||||||
|
fields.append("FOREIGN KEY (global_uuid) REFERENCES PUBLIC.component (global_uuid)");
|
||||||
|
|
||||||
QJsonObject objState = getSelectedState(lstSelect,lstBase);
|
QJsonObject objState = getSelectedState(lstSelect,lstBase);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,13 @@ void TopologyView::initial()
|
||||||
QString nZ = info.zone;
|
QString nZ = info.zone;
|
||||||
QString nS= info.station;
|
QString nS= info.station;
|
||||||
|
|
||||||
QString sGrid = DataBase::GetInstance()->getGridNameById(nG.toInt());
|
//QString sGrid = DataBase::GetInstance()->getGridNameById(nG.toInt());
|
||||||
QString sZone = DataBase::GetInstance()->getZoneNameById(nZ.toInt());
|
//QString sZone = DataBase::GetInstance()->getZoneNameById(nZ.toInt());
|
||||||
QString sStation = DataBase::GetInstance()->getStationNameById(nS.toInt());
|
//QString sStation = DataBase::GetInstance()->getStationNameById(nS.toInt());
|
||||||
|
|
||||||
|
QString sGrid = nG; //暂时不使用id查找名称
|
||||||
|
QString sZone = nZ;
|
||||||
|
QString sStation = nS;
|
||||||
|
|
||||||
QStandardItem *pItem = new QStandardItem(info.tag);
|
QStandardItem *pItem = new QStandardItem(info.tag);
|
||||||
pItem->setData(info.uuid.toString(),Qt::UserRole);
|
pItem->setData(info.uuid.toString(),Qt::UserRole);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue