if(pPSSFacadeState->isProjectSelected())
{
this,
"Add Design File",
"Design (*.rlc)");
// QMessageBox::information(this,tr("Flow"),openFileName);
if(!openFileName.isEmpty())
{
string designFileFullName = openFileName.toStdString();
int lastDelim = designFileFullName.find_last_of("/");
string designFileName = designFileFullName.substr(lastDelim + 1,designFileFullName.size());
designFileName = CRouterOptions::getUniqueInstance()->getProjectLocation() + "/" + designFileName;
//copy the input file in prj dir
pRouterOptions->setDesignFileName(designFileName);
CPSSFacadeState::getUniqueInstance()->setDesignAdded();
// QMessageBox::information(this,tr("Flow"),tr("After copy of design"));
QFlags<Qt::ItemFlag> flag(Qt::ItemIsEnabled);
flag = flag | Qt::ItemIsSelectable;
QList<QTreeWidgetItem
*> widgetList
= m_uiMainWindow.
routingFlowTree->findItems
(QString("Open Design"),Qt
::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
widgetList
= m_uiMainWindow.
routingFlowTree->findItems
(QString("View Design"),Qt
::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
widgetList
= m_uiMainWindow.
routingFlowTree->findItems
(QString("Routing"),Qt
::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
widgetList
= m_uiMainWindow.
routingFlowTree->findItems
(QString("Run Routing"),Qt
::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
// QMessageBox::information(this,tr("Flow"),tr("After 1"));
m_uiMainWindow.actionDesign_File_2->setEnabled(true);
// QMessageBox::information(this,tr("Flow"),tr("After 2"));
m_pRouterPropDialog->setDefaultOutputFileNames();
// QMessageBox::information(this,tr("Flow"),tr("After enabling tree items"));
//disable Tree items after routing
/*widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("View Routing Solution"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Reports"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing Statistics"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing Solution Cell View"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing Solution Net View"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}*/
// QMessageBox::information(this,tr("Flow"),tr("After disabling tree items"));
m_uiMainWindow.actionRun->setEnabled(true);
// m_uiMainWindow.actionStop->setEnabled(true);
m_uiMainWindow.actionProperties->setEnabled(true);
m_uiMainWindow.actionPSS_Flow->setEnabled(false);
pPSSFacadeState->setFlowFreezed();
/*QCursor cursor;
cursor.setShape(Qt::WaitCursor);
QApplication::setOverrideCursor(cursor);*/
// QMessageBox::information(this,tr("Flow"),tr("after setting tree inputs"));
m_uiMainWindow.
outputPane->append
(QString("Reading inputs..."));
//emit readRouterInputs();
// QMessageBox::information(this,tr("Add Design"), tr("Before strat router input thread"));
startRouterInputThread();
//CPSSRouterInterface::getUniqueInstance(m_uiMainWindow)->processRoutingFlowInputs();
}
else
{
QMessageBox::information(this, tr
("Add Design Error"), tr
("Enter valid Design"));
}
}//end of if(isProjectSelected)
if(pPSSFacadeState->isProjectSelected())
{
QString openFileName = QFileDialog::getOpenFileName(
this,
"Add Design File",
QDir::currentPath(),
"Design (*.rlc)");
// QMessageBox::information(this,tr("Flow"),openFileName);
if(!openFileName.isEmpty())
{
string designFileFullName = openFileName.toStdString();
int lastDelim = designFileFullName.find_last_of("/");
string designFileName = designFileFullName.substr(lastDelim + 1,designFileFullName.size());
designFileName = CRouterOptions::getUniqueInstance()->getProjectLocation() + "/" + designFileName;
//copy the input file in prj dir
QFile::copy(openFileName,QString(designFileName.c_str()));
pRouterOptions->setDesignFileName(designFileName);
CPSSFacadeState::getUniqueInstance()->setDesignAdded();
// QMessageBox::information(this,tr("Flow"),tr("After copy of design"));
QFlags<Qt::ItemFlag> flag(Qt::ItemIsEnabled);
flag = flag | Qt::ItemIsSelectable;
QList<QTreeWidgetItem *> widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Open Design"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("View Design"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Run Routing"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(flag);
}
// QMessageBox::information(this,tr("Flow"),tr("After 1"));
m_uiMainWindow.actionDesign_File_2->setEnabled(true);
// QMessageBox::information(this,tr("Flow"),tr("After 2"));
m_pRouterPropDialog->setDefaultOutputFileNames();
// QMessageBox::information(this,tr("Flow"),tr("After enabling tree items"));
//disable Tree items after routing
/*widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("View Routing Solution"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Reports"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing Statistics"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing Solution Cell View"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}
widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Routing Solution Net View"),Qt::MatchRecursive);
if (widgetList.size() > 0 )
{
widgetList.takeFirst()->setFlags(false);
}*/
// QMessageBox::information(this,tr("Flow"),tr("After disabling tree items"));
m_uiMainWindow.actionRun->setEnabled(true);
// m_uiMainWindow.actionStop->setEnabled(true);
m_uiMainWindow.actionProperties->setEnabled(true);
m_uiMainWindow.actionPSS_Flow->setEnabled(false);
pPSSFacadeState->setFlowFreezed();
/*QCursor cursor;
cursor.setShape(Qt::WaitCursor);
QApplication::setOverrideCursor(cursor);*/
// QMessageBox::information(this,tr("Flow"),tr("after setting tree inputs"));
m_uiMainWindow.outputPane->append(QString("Reading inputs..."));
//emit readRouterInputs();
// QMessageBox::information(this,tr("Add Design"), tr("Before strat router input thread"));
startRouterInputThread();
//CPSSRouterInterface::getUniqueInstance(m_uiMainWindow)->processRoutingFlowInputs();
}
else
{
QMessageBox::information(this, tr("Add Design Error"), tr("Enter valid Design"));
}
}//end of if(isProjectSelected)
To copy to clipboard, switch view to plain text mode
Bookmarks