diff --git a/bin/xyylMCWEACSystem.exe b/bin/xyylMCWEACSystem.exe index bdb4ccc..6292031 100644 Binary files a/bin/xyylMCWEACSystem.exe and b/bin/xyylMCWEACSystem.exe differ diff --git a/xyylMCWEACSystem/leadscheme.cpp b/xyylMCWEACSystem/leadscheme.cpp index 25873a7..1dc2920 100644 --- a/xyylMCWEACSystem/leadscheme.cpp +++ b/xyylMCWEACSystem/leadscheme.cpp @@ -6,6 +6,9 @@ #include "operatorjson.h" #include #include +#include +#include +#include #include "logger.h" LeadScheme::LeadScheme(QWidget * parent ):QWidget (parent) { @@ -26,7 +29,7 @@ void LeadScheme::init() m_btnNew.setText("新建"); m_btndelete.setText("删除"); m_btnCancel.setText("取消"); - m_btnOK.setText("确认"); + m_btnOK.setText("修改"); m_btnNew.setStyleSheet("QPushButton{\ background: white;\ border-radius:10px;padding:7px 10px;\ @@ -246,7 +249,22 @@ void LeadScheme::initLay() } #else QStringList Sches; - Sches<<"8通道"<<"16通道"<<"64通道"<<"sss"<<"kk"; + Sches<<"8通道"<<"16通道"<<"64通道"; + //遍历加载当前已经存在的方案 + QDir dir(QApplication::applicationDirPath()+"/Scheme/"); + QStringList fileList; + QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Dirs); + foreach (auto fileInfo, fileInfoList) + { + if(fileInfo.isFile()) + { + + if(!Sches.contains(fileInfo.baseName()) && fileInfo.baseName().compare("0")!=0) + { + Sches.append(fileInfo.baseName()); + } + } + } gridlayOut->addWidget(labScheme,0,colmn++,Qt::AlignHCenter); QScrollArea * scroll = new QScrollArea; scroll->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); @@ -597,4 +615,7 @@ void LeadScheme::slotSave() m_listBtnsSchemes.append(btn); } m_vlayHH->addStretch(); + //4 删除对应的位置文件 + + QFile::remove( QApplication::applicationDirPath()+"/Scheme/"+sDeleName+".json"); }