diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index 377802a..63f4d79 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -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 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); - + _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_fWaveBase, QVariant::Double); - _CreateVariantPropertyItem("波形绘制参数", "波形间隔", formInfo->m_nWaveJg, QVariant::Int); - _CreateVariantPropertyItem("波形绘制参数", "波形高度", formInfo->m_fWaveHei, QVariant::Double); _CreateVariantPropertyItem("波形绘制参数", "线宽", formInfo->m_dWidth, QVariant::Int); _CreateVariantPropertyItem("波形绘制参数", "颜色", formInfo->m_lineColor, QVariant::Color); } diff --git a/logPlus/forminfo.cpp b/logPlus/forminfo.cpp index fb8cee0..bc89ab3 100644 --- a/logPlus/forminfo.cpp +++ b/logPlus/forminfo.cpp @@ -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; diff --git a/logPlus/mainwindow.cpp b/logPlus/mainwindow.cpp index bf85a25..9de0cb9 100644 --- a/logPlus/mainwindow.cpp +++ b/logPlus/mainwindow.cpp @@ -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