Line 69... |
Line 69... |
|
|
moduleTreeView = new TreeView(this);
|
moduleTreeView = new TreeView(this);
|
|
|
moduleTreeView->setWindowTitle(QObject::tr("Simple Tree Model"));
|
moduleTreeView->setWindowTitle(QObject::tr("Simple Tree Model"));
|
m_pcontextMenu = new QMenu(moduleTreeView);
|
m_pcontextMenu = new QMenu(moduleTreeView);
|
|
|
|
#if 0
|
m_paddChainAct = m_pcontextMenu->addAction(QIcon(":/images/insert.png"),tr("添加链"));
|
m_paddChainAct = m_pcontextMenu->addAction(QIcon(":/images/insert.png"),tr("添加链"));
|
m_pdeleteChainAct = m_pcontextMenu->addAction(QIcon(":/images/delete.png"),tr("删除链"));
|
m_pdeleteChainAct = m_pcontextMenu->addAction(QIcon(":/images/delete.png"),tr("删除链"));
|
|
#else
|
|
m_paddChainAct = m_pcontextMenu->addAction(QIcon(":/images/insert.png"),tr("insert scanchain"));
|
|
m_pdeleteChainAct = m_pcontextMenu->addAction(QIcon(":/images/delete.png"),tr("delete scanchain"));
|
|
#endif
|
|
|
connect(m_paddChainAct,SIGNAL(triggered()), toolWindow, SLOT(addScanChain()));
|
connect(m_paddChainAct,SIGNAL(triggered()), toolWindow, SLOT(addScanChain()));
|
connect(m_pdeleteChainAct,SIGNAL(triggered()),toolWindow, SLOT(deleteScanChain()));
|
connect(m_pdeleteChainAct,SIGNAL(triggered()),toolWindow, SLOT(deleteScanChain()));
|
|
|
moduleTreeView->setModel(NULL);
|
moduleTreeView->setModel(NULL);
|
m_pmessageTreeView->setModel(m_iShowMessageModel);
|
m_pmessageTreeView->setModel(m_iShowMessageModel);
|
Line 89... |
Line 96... |
moduleTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
|
moduleTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
|
connect(moduleTreeView, SIGNAL(customContextMenuRequested(const QPoint&)),
|
connect(moduleTreeView, SIGNAL(customContextMenuRequested(const QPoint&)),
|
this, SLOT(show_contextmenu(const QPoint&)));
|
this, SLOT(show_contextmenu(const QPoint&)));
|
moduleTreeView->show();
|
moduleTreeView->show();
|
|
|
addMessage("welcome","####Welcome to use EziDebug####");
|
addMessage("welcome","####Welcome to EziDebug####");
|
|
|
/* 根据工程 文件是否创建 来是否显示 树状结构图*/
|
/* 根据工程 文件是否创建 来是否显示 树状结构图*/
|
// 在 toolwindow 的 构造 时 检测是否存在 默认路径 ,如果存在有效的默认路径,则会根据该路径1个工程对象
|
// 在 toolwindow 的 构造 时 检测是否存在 默认路径 ,如果存在有效的默认路径,则会根据该路径1个工程对象
|
// 构造完 toolwindow 后 接着 构造 listwindow ,如果 listwidow 检查 toolwindow 下的
|
// 构造完 toolwindow 后 接着 构造 listwindow ,如果 listwidow 检查 toolwindow 下的
|
// 工程对象指针来 判断 是否 需要 重现 树状结构 ,如果 工程对象指针 不为空的话 ,
|
// 工程对象指针来 判断 是否 需要 重现 树状结构 ,如果 工程对象指针 不为空的话 ,
|
Line 1633... |
Line 1640... |
|
|
// log 文件被破坏, 可能还没有扫描到扫描链
|
// log 文件被破坏, 可能还没有扫描到扫描链
|
//if(prj->getScanChainInfo().count())
|
//if(prj->getScanChainInfo().count())
|
//{
|
//{
|
// 配置文件被破坏 是否删除工程代码中所有的扫描链代码?
|
// 配置文件被破坏 是否删除工程代码中所有的扫描链代码?
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("配置文件被破坏"), tr("是否删除工程代码中所有扫描链代码?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("配置文件被破坏"), tr("是否删除工程代码中所有扫描链代码?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("The configuration file has been destroyed,\n Do you want to delete all scan chain code ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
|
|
#endif
|
|
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
QMap<QString,EziDebugVlgFile*> ivlgFileMap ;
|
QMap<QString,EziDebugVlgFile*> ivlgFileMap ;
|
QMap<QString,EziDebugVhdlFile*> ivhdlFileMap ;
|
QMap<QString,EziDebugVhdlFile*> ivhdlFileMap ;
|
Line 1689... |
Line 1701... |
// (代码中的扫描链 在 log文件中不存在 说明log文件曾经被破坏过!)
|
// (代码中的扫描链 在 log文件中不存在 说明log文件曾经被破坏过!)
|
if(prj->getLogFileExistFlag()&&prj->getLogfileDestroyedFlag())
|
if(prj->getLogFileExistFlag()&&prj->getLogfileDestroyedFlag())
|
{
|
{
|
// 提示删除所有链
|
// 提示删除所有链
|
// 部分扫描链信息丢失 是否删除所有扫描链代码
|
// 部分扫描链信息丢失 是否删除所有扫描链代码
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链信息丢失"), tr("是否删除所有扫描链代码?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链信息丢失"), tr("是否删除所有扫描链代码?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("Some scan chain information has lost, \n Do you want to delete all scan chain code ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#endif
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
// 删除所有链代码
|
// 删除所有链代码
|
|
|
prj->deleteAllEziDebugCode(prj->getPrjVlgFileMap(),prj->getPrjVhdlFileMap());
|
prj->deleteAllEziDebugCode(prj->getPrjVlgFileMap(),prj->getPrjVhdlFileMap());
|
Line 1800... |
Line 1816... |
}
|
}
|
addMessage("error",ichain);
|
addMessage("error",ichain);
|
}
|
}
|
|
|
// 是否删除相关扫描链代码,否则相应扫描链不可用!
|
// 是否删除相关扫描链代码,否则相应扫描链不可用!
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("相关扫描链不可用,是否删除相关扫描链代码?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("相关扫描链不可用,是否删除相关扫描链代码?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("Some scan chains has been destroyed ,\n Do you want to delete all scan chain code ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#endif
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
iunDelChainList = prj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
iunDelChainList = prj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
if(iunDelChainList.count())
|
if(iunDelChainList.count())
|
{
|
{
|
addMessage("error","EziDebug error: Some chains do not be deleted for some reasons!");
|
addMessage("error","EziDebug error: Some chains can not be deleted for some reasons!");
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
{
|
{
|
addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
}
|
}
|
addMessage("error","EziDebug error: Please check the code file is compiled successed!");
|
addMessage("error","EziDebug error: Please check the code file is compiled successfully or not!");
|
}
|
}
|
|
|
for(int i = 0 ; i < idestroyedChainList.count() ; i++)
|
for(int i = 0 ; i < idestroyedChainList.count() ; i++)
|
{
|
{
|
QString idestroyedChain = idestroyedChainList.at(i) ;
|
QString idestroyedChain = idestroyedChainList.at(i) ;
|
Line 1881... |
Line 1901... |
// 删除 新分配的 log_file_info 指针
|
// 删除 新分配的 log_file_info 指针
|
|
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
|
|
QStandardItem * pitem = addMessage("info",tr("EziDebug info: The default project parameter:"));
|
QStandardItem * pitem = addMessage("info",tr("EziDebug info: The default project parameters:"));
|
addMessage("process",tr(" Scanchain Max Reg Number: %1").arg(prj->getMaxRegNumPerChain()),pitem);
|
addMessage("process",tr(" Scanchain Max Register Number: %1").arg(prj->getMaxRegNumPerChain()),pitem);
|
addMessage("process",tr(" Project Path: %1").arg(prj->getCurrentDir().absolutePath()),pitem);
|
addMessage("process",tr(" Project Path: %1").arg(prj->getCurrentDir().absolutePath()),pitem);
|
addMessage("process",tr(" Compile Software: \"%1\"").arg((prj->getToolType() == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
addMessage("process",tr(" Compile Software: \"%1\"").arg((prj->getToolType() == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
|
|
if(prj->getChainTreeItemMap().count())
|
if(prj->getChainTreeItemMap().count())
|
{
|
{
|