启动软件默认打开 ‘例子’项目。
左下角属性字体、颜色等属性,默认收缩显示 波列道道头显示波列名称
This commit is contained in:
parent
cbc97c6c6b
commit
b456e69d1e
|
|
@ -2361,6 +2361,14 @@ QtVariantProperty* PropertyWidget::_CreateVariantPropertyItem(QString strGroup,
|
|||
item->setValue(vtPropertyValue);
|
||||
m_propertyData[item] = strPropertyCaption;
|
||||
pGroupItem->addSubProperty(item);
|
||||
|
||||
// 字体不展开
|
||||
if (QVariant::Font == propertyType || QVariant::Color == propertyType)
|
||||
{
|
||||
QList<QtBrowserItem *> list = m_pPropertyBrowser->items(item);
|
||||
if (list.size() > 0)
|
||||
m_pPropertyBrowser->setExpanded(list.at(0), false);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
@ -2951,12 +2959,11 @@ void PropertyWidget::initWaveProperty(FormInfo *formInfo, int nType)
|
|||
_CreateVariantPropertyItem("波形绘制参数", "幅度刻度", formInfo->m_strAmp, QVariant::String);
|
||||
_CreateVariantPropertyItem("波形绘制参数", "最大振幅", formInfo->m_fMaxAmp, QVariant::Double);
|
||||
_CreateVariantPropertyItem("波形绘制参数", "显示刻度", formInfo->m_bShowScale, QVariant::Bool);
|
||||
|
||||
if (nType == 0 || nType == 1)
|
||||
{
|
||||
_CreateVariantPropertyItem("波形绘制参数", "波列基值", formInfo->m_fWaveBase, QVariant::Double);
|
||||
_CreateVariantPropertyItem("波形绘制参数", "波形间隔", formInfo->m_nWaveJg, QVariant::Int);
|
||||
_CreateVariantPropertyItem("波形绘制参数", "波形高度", formInfo->m_fWaveHei, QVariant::Double);
|
||||
if (nType == 0 || nType == 1)
|
||||
{
|
||||
_CreateVariantPropertyItem("波形绘制参数", "线宽", formInfo->m_dWidth, QVariant::Int);
|
||||
_CreateVariantPropertyItem("波形绘制参数", "颜色", formInfo->m_lineColor, QVariant::Color);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -620,6 +620,8 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
|||
|
||||
if(m_strType=="waveObject")
|
||||
{
|
||||
painter.drawText(rect.left(), rect.top(), rect.width(), 30, Qt::AlignCenter, m_strLineName);
|
||||
|
||||
if (m_nDrawType == 0 || m_nDrawType == 1)
|
||||
{
|
||||
int nbot = rect.bottom()- rect.height() / 3.0;
|
||||
|
|
|
|||
|
|
@ -244,6 +244,12 @@ void MainWindow::initToolBar()
|
|||
// connect(m_runAc, &QAction::triggered, this, &MainWindow::s_SaveImage);
|
||||
// connect(m_debugAc, &QAction::triggered, this, &MainWindow::s_DrawImg);
|
||||
// connect(m_loadAc, &QAction::triggered, this, &MainWindow::s_DrawLine);
|
||||
QTimer::singleShot(500, this, [=]() {
|
||||
QString fileFull = GetProjectFolder() + "例子.wwl";
|
||||
QFileInfo fileInfo(fileFull);
|
||||
if (fileInfo.exists())
|
||||
emit CallManage::getInstance()->sig_OpenProject(fileFull);
|
||||
});
|
||||
}
|
||||
|
||||
//初始化插件QAction
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user