#include "projectsetwizard.h"
|
#include "projectsetwizard.h"
|
#include "toolwindow.h"
|
#include "toolwindow.h"
|
#include "ezidebugscanchain.h"
|
#include "ezidebugscanchain.h"
|
#include <QDebug>
|
#include <QDebug>
|
#include <QtGui>
|
#include <QtGui>
|
|
|
ProjectSetWizard::ProjectSetWizard(QWidget *parent):QWizard(parent)
|
ProjectSetWizard::ProjectSetWizard(QWidget *parent):QWizard(parent)
|
{
|
{
|
QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));
|
QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));
|
|
|
createPage1();
|
createPage1();
|
createPage2();
|
createPage2();
|
createConclusionPage();
|
createConclusionPage();
|
|
|
addPage(m_iprjSetPage);
|
addPage(m_iprjSetPage);
|
addPage(m_iregSetPage);
|
addPage(m_iregSetPage);
|
addPage(m_itoolSetPage);
|
addPage(m_itoolSetPage);
|
|
|
|
#if 0
|
setWindowTitle(tr("工程设置向导"));
|
setWindowTitle(tr("工程设置向导"));
|
|
#else
|
|
setWindowTitle(tr("Project Settings Wizard"));
|
|
#endif
|
|
|
connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(saveModifiedPage(int)));
|
connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(saveModifiedPage(int)));
|
}
|
}
|
|
|
ProjectSetWizard::~ProjectSetWizard()
|
ProjectSetWizard::~ProjectSetWizard()
|
{
|
{
|
|
|
}
|
}
|
|
|
void ProjectSetWizard::done (int result)
|
void ProjectSetWizard::done (int result)
|
{
|
{
|
// ToolWindow* pparent = 0 ;
|
// ToolWindow* pparent = 0 ;
|
|
|
/*保存使用工具*/
|
/*保存使用工具*/
|
if(!(alteraCheckBox->isChecked()||xilinxCheckBox->isChecked()))
|
if(!(alteraCheckBox->isChecked()||xilinxCheckBox->isChecked()))
|
{
|
{
|
qDebug() << "No Tool Selected!";
|
qDebug() << "No Tool Selected!";
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
}
|
}
|
else if(alteraCheckBox->isChecked()&&xilinxCheckBox->isChecked())
|
else if(alteraCheckBox->isChecked()&&xilinxCheckBox->isChecked())
|
{
|
{
|
qDebug() << "Wrong Tool selected!";
|
qDebug() << "Wrong Tool selected!";
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
}
|
}
|
else if(alteraCheckBox->isChecked())
|
else if(alteraCheckBox->isChecked())
|
{
|
{
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
}
|
}
|
else if(xilinxCheckBox->isChecked())
|
else if(xilinxCheckBox->isChecked())
|
{
|
{
|
m_ecurrentTool = EziDebugPrj::ToolIse ;
|
m_ecurrentTool = EziDebugPrj::ToolIse ;
|
}
|
}
|
|
|
if(m_ixilinxComplieOption->checkState() == Qt::Checked)
|
if(m_ixilinxComplieOption->checkState() == Qt::Checked)
|
{
|
{
|
m_isXilinxErrChecked = true ;
|
m_isXilinxErrChecked = true ;
|
}
|
}
|
else
|
else
|
{
|
{
|
m_isXilinxErrChecked = false ;
|
m_isXilinxErrChecked = false ;
|
}
|
}
|
QWizard::done(result);
|
|
|
|
|
QWizard::done(result);
|
}
|
}
|
|
|
|
|
void ProjectSetWizard::saveModifiedPage(int m)
|
void ProjectSetWizard::saveModifiedPage(int m)
|
{
|
{
|
m = m ;
|
m = m ;
|
if(m_iprjSetPage == m_currentPage)
|
if(m_iprjSetPage == m_currentPage)
|
{
|
{
|
/*保存路径信息*/
|
/*保存路径信息*/
|
m_icurrentDir = QDir::fromNativeSeparators(proPathComboBox->itemText(proPathComboBox->currentIndex()));
|
m_icurrentDir = QDir::fromNativeSeparators(proPathComboBox->itemText(proPathComboBox->currentIndex()));
|
qDebug() << m_icurrentDir << __LINE__;
|
qDebug() << m_icurrentDir << __LINE__;
|
|
|
}
|
}
|
else if(m_iregSetPage == m_currentPage)
|
else if(m_iregSetPage == m_currentPage)
|
{
|
{
|
/*保存寄存器最大个数信息*/
|
/*保存寄存器最大个数信息*/
|
m_uncurrentRegNum = m_nregNumComBox->currentText().toInt() ;
|
m_uncurrentRegNum = m_nregNumComBox->currentText().toInt() ;
|
}
|
}
|
else if(m_itoolSetPage == m_currentPage)
|
else if(m_itoolSetPage == m_currentPage)
|
{
|
{
|
/*保存使用工具*/
|
/*保存使用工具*/
|
/*不会进入这个条件*/
|
/*不会进入这个条件*/
|
}
|
}
|
else
|
else
|
{
|
{
|
/*空指针*/
|
/*空指针*/
|
}
|
}
|
|
|
m_currentPage = this->currentPage() ;
|
m_currentPage = this->currentPage() ;
|
}
|
}
|
|
|
void ProjectSetWizard::changeXilinxCompileOption(bool checked)
|
void ProjectSetWizard::changeXilinxCompileOption(bool checked)
|
{
|
{
|
if(checked)
|
if(checked)
|
{
|
{
|
m_ixilinxComplieOption->setCheckable(true);
|
m_ixilinxComplieOption->setCheckable(true);
|
}
|
}
|
else
|
else
|
{
|
{
|
m_ixilinxComplieOption->setCheckable(false);
|
m_ixilinxComplieOption->setCheckable(false);
|
}
|
}
|
}
|
}
|
|
|
void ProjectSetWizard::browse()
|
void ProjectSetWizard::browse()
|
{
|
{
|
// QString directory = QFileDialog::getExistingDirectory(this,
|
// QString directory = QFileDialog::getExistingDirectory(this,
|
// tr("Chose a File"), QDir::currentPath());
|
// tr("Chose a File"), QDir::currentPath());
|
|
|
// if (!directory.isEmpty()) {
|
// if (!directory.isEmpty()) {
|
// if (proPathComboBox->findText(directory) == -1)
|
// if (proPathComboBox->findText(directory) == -1)
|
// proPathComboBox->addItem(directory);
|
// proPathComboBox->addItem(directory);
|
// proPathComboBox->setCurrentIndex(proPathComboBox->findText(directory));
|
// proPathComboBox->setCurrentIndex(proPathComboBox->findText(directory));
|
// }
|
// }
|
|
|
|
|
// QFileDialog::Options options;
|
// QFileDialog::Options options;
|
// //options |= QFileDialog::DontUseNativeDialog;
|
// //options |= QFileDialog::DontUseNativeDialog;
|
// QString selectedFilter;
|
// QString selectedFilter;
|
// QString fileName = QFileDialog::getOpenFileName(this,
|
// QString fileName = QFileDialog::getOpenFileName(this,
|
// tr("QFileDialog::getOpenFileName()"),
|
// tr("QFileDialog::getOpenFileName()"),
|
// proPathComboBox->currentText(),
|
// proPathComboBox->currentText(),
|
// tr("所有文件 (*.*);;文本文件 (*.txt)"),
|
// tr("所有文件 (*.*);;文本文件 (*.txt)"),
|
// &selectedFilter,
|
// &selectedFilter,
|
// options);
|
// options);
|
// if (!fileName.isEmpty()){
|
// if (!fileName.isEmpty()){
|
// if (proPathComboBox->findText(fileName) == -1)
|
// if (proPathComboBox->findText(fileName) == -1)
|
// proPathComboBox->addItem(fileName);
|
// proPathComboBox->addItem(fileName);
|
// proPathComboBox->setCurrentIndex(proPathComboBox->findText(fileName));
|
// proPathComboBox->setCurrentIndex(proPathComboBox->findText(fileName));
|
// }
|
// }
|
|
|
|
|
QFileDialog::Options options = QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly;
|
QFileDialog::Options options = QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly;
|
//options |= QFileDialog::DontUseNativeDialog;
|
//options |= QFileDialog::DontUseNativeDialog;
|
|
|
|
#if 0
|
QString directory = QFileDialog::getExistingDirectory(this,
|
QString directory = QFileDialog::getExistingDirectory(this,
|
tr("设置工程目录"),
|
tr("设置工程目录"),
|
proPathComboBox->currentText(),
|
proPathComboBox->currentText(),
|
options);
|
options);
|
|
#else
|
|
QString directory = QFileDialog::getExistingDirectory(this,
|
|
tr("Setting project directory"),
|
|
proPathComboBox->currentText(),
|
|
options);
|
|
#endif
|
|
|
if (!directory.isEmpty()){
|
if (!directory.isEmpty()){
|
if (proPathComboBox->findText(directory) == -1)
|
if (proPathComboBox->findText(directory) == -1)
|
proPathComboBox->addItem(directory);
|
proPathComboBox->addItem(directory);
|
proPathComboBox->setCurrentIndex(proPathComboBox->findText(directory));
|
proPathComboBox->setCurrentIndex(proPathComboBox->findText(directory));
|
}
|
}
|
}
|
}
|
|
|
void ProjectSetWizard::createPage1()
|
void ProjectSetWizard::createPage1()
|
{
|
{
|
m_iprjSetPage = new QWizardPage(this);
|
m_iprjSetPage = new QWizardPage(this);
|
|
m_iprjSetPage->setButtonText(QWizard::NextButton,tr("Next"));
|
|
m_iprjSetPage->setButtonText(QWizard::BackButton,tr("Back"));
|
|
m_iprjSetPage->setButtonText(QWizard::CancelButton,tr("Cancel"));
|
|
m_iprjSetPage->setButtonText(QWizard::HelpButton,tr("Help"));
|
|
m_iprjSetPage->setButtonText(QWizard::FinishButton,tr("Finish"));
|
|
#if 0
|
m_iprjSetPage->setTitle(tr("设置工程目录"));
|
m_iprjSetPage->setTitle(tr("设置工程目录"));
|
|
#else
|
|
//m_iprjSetPage->setTitle(tr("Setting Project Directory"));
|
|
#endif
|
|
|
|
#if 0
|
QLabel *label = new QLabel(tr("工程目录:"));
|
QLabel *label = new QLabel(tr("工程目录:"));
|
|
#else
|
|
QLabel *label = new QLabel(tr("The project directory:"));
|
|
#endif
|
|
|
proPathComboBox = createComboBox(QDir::currentPath());
|
proPathComboBox = createComboBox(QDir::currentPath());
|
label->setBuddy(proPathComboBox);
|
label->setBuddy(proPathComboBox);
|
proPathComboBox->clear();
|
proPathComboBox->clear();
|
proPathComboBox->clearEditText();
|
proPathComboBox->clearEditText();
|
ToolWindow *pparent = dynamic_cast<ToolWindow*>(this->parentWidget());
|
ToolWindow *pparent = dynamic_cast<ToolWindow*>(this->parentWidget());
|
if(pparent->getCurrentProject())
|
if(pparent->getCurrentProject())
|
{
|
{
|
proPathComboBox->addItem(pparent->getCurrentProject()->getCurrentDir().absolutePath());
|
proPathComboBox->addItem(pparent->getCurrentProject()->getCurrentDir().absolutePath());
|
m_icurrentDir = QDir::toNativeSeparators(pparent->getCurrentProject()->getCurrentDir().absolutePath()) ;
|
m_icurrentDir = QDir::toNativeSeparators(pparent->getCurrentProject()->getCurrentDir().absolutePath()) ;
|
qDebug() << m_icurrentDir << __LINE__;
|
qDebug() << m_icurrentDir << __LINE__;
|
}
|
}
|
|
|
|
#if 0
|
browseButton = createButton(tr("浏览"), SLOT(browse()));
|
browseButton = createButton(tr("浏览"), SLOT(browse()));
|
|
#else
|
|
browseButton = createButton(tr("Browse"), SLOT(browse()));
|
|
#endif
|
|
|
QGridLayout *layout = new QGridLayout;
|
QGridLayout *layout = new QGridLayout;
|
layout->addWidget(label, 0, 0);
|
layout->addWidget(label, 0, 0);
|
layout->addWidget(proPathComboBox, 3, 0, 1, 4);
|
layout->addWidget(proPathComboBox, 3, 0, 1, 4);
|
layout->addWidget(browseButton, 3, 4, 1, 1);
|
layout->addWidget(browseButton, 3, 4, 1, 1);
|
m_iprjSetPage->setLayout(layout);
|
m_iprjSetPage->setLayout(layout);
|
|
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
void ProjectSetWizard::createPage2()
|
void ProjectSetWizard::createPage2()
|
{
|
{
|
m_iregSetPage = new QWizardPage(this);
|
m_iregSetPage = new QWizardPage(this);
|
|
m_iregSetPage->setButtonText(QWizard::NextButton,tr("Next"));
|
|
m_iregSetPage->setButtonText(QWizard::BackButton,tr("Back"));
|
|
m_iregSetPage->setButtonText(QWizard::CancelButton,tr("Cancel"));
|
|
m_iregSetPage->setButtonText(QWizard::HelpButton,tr("Help"));
|
|
m_iregSetPage->setButtonText(QWizard::FinishButton,tr("Finish"));
|
|
#if 0
|
m_iregSetPage->setTitle(QObject::tr("设置最大扫描链的寄存器个数"));
|
m_iregSetPage->setTitle(QObject::tr("设置最大扫描链的寄存器个数"));
|
|
#else
|
|
//m_iregSetPage->setTitle(QObject::tr("Setting max reg number Per-chain"));
|
|
#endif
|
|
|
|
|
///////////test/////////////////
|
///////////test/////////////////
|
// chainNum = 1;
|
// chainNum = 1;
|
QStringList chainNameList;
|
QStringList chainNameList;
|
chainNameList << "Chain 1"
|
chainNameList << "Chain 1"
|
<< "Chain 2"
|
<< "Chain 2"
|
<< "Chain 3"
|
<< "Chain 3"
|
<< "Chain 4"
|
<< "Chain 4"
|
<< "Chain 5";
|
<< "Chain 5";
|
///////////end of test/////////////////
|
///////////end of test/////////////////
|
|
|
|
|
//QVector<int> regNumVector;
|
//QVector<int> regNumVector;
|
QStringList regNumList;
|
QStringList regNumList;
|
|
|
QGridLayout *layout = new QGridLayout;
|
QGridLayout *layout = new QGridLayout;
|
|
|
#if 0
|
#if 0
|
for(int i = 0; i < chainNum; i++){
|
for(int i = 0; i < chainNum; i++){
|
QLabel *label = new QLabel(chainNameList[i] + tr(":"));
|
QLabel *label = new QLabel(chainNameList[i] + tr(":"));
|
spinBox = new QSpinBox;
|
spinBox = new QSpinBox;
|
spinBox->setMaximum(2048);
|
spinBox->setMaximum(2048);
|
//regNumVector.append(0);
|
//regNumVector.append(0);
|
//connect(spinBox, SIGNAL(valueChanged(int)), regNumVector, SLOT(replace(i, int)));
|
//connect(spinBox, SIGNAL(valueChanged(int)), regNumVector, SLOT(replace(i, int)));
|
regNumList << tr("0");
|
regNumList << tr("0");
|
//connect(spinBox, SIGNAL(valueChanged(int)), regNumList[i], SLOT(setNum()));
|
//connect(spinBox, SIGNAL(valueChanged(int)), regNumList[i], SLOT(setNum()));
|
|
|
label->setBuddy(spinBox);
|
label->setBuddy(spinBox);
|
layout->addWidget(label, i, 0, 1, 1);
|
layout->addWidget(label, i, 0, 1, 1);
|
layout->addWidget(spinBox, i, 1, 1, 2);
|
layout->addWidget(spinBox, i, 1, 1, 2);
|
}
|
}
|
#endif
|
#endif
|
m_nregNumComBox = new QComboBox(this) ;
|
m_nregNumComBox = new QComboBox(this) ;
|
m_imaxregNumLabel = new QLabel("The Max Regnum Per Chain :",this);
|
m_imaxregNumLabel = new QLabel("The max register number per-chain :",this);
|
|
|
m_imaxregNumLabel->setBuddy(m_imaxregNumLabel);
|
m_imaxregNumLabel->setBuddy(m_imaxregNumLabel);
|
layout->addWidget(m_imaxregNumLabel, 0, 0, 1, 1,Qt::AlignLeft);
|
layout->addWidget(m_imaxregNumLabel, 0, 0, 1, 1,Qt::AlignLeft);
|
layout->addWidget(m_nregNumComBox, 0 , 1, 1, 1);
|
layout->addWidget(m_nregNumComBox, 0 , 1, 1, 1);
|
//m_nregNumComBox->addItem("256");
|
//m_nregNumComBox->addItem("256");
|
m_nregNumComBox->addItem("512");
|
m_nregNumComBox->addItem("512");
|
m_nregNumComBox->addItem("1024");
|
m_nregNumComBox->addItem("1024");
|
m_nregNumComBox->addItem("2048");
|
m_nregNumComBox->addItem("2048");
|
layout->setMargin(50);
|
layout->setMargin(50);
|
m_iregSetPage->setLayout(layout);
|
m_iregSetPage->setLayout(layout);
|
|
|
ToolWindow *pparent = dynamic_cast<ToolWindow*>(this->parentWidget());
|
ToolWindow *pparent = dynamic_cast<ToolWindow*>(this->parentWidget());
|
if(pparent->getCurrentProject())
|
if(pparent->getCurrentProject())
|
{
|
{
|
int nNum = pparent->getCurrentProject()->getMaxRegNumPerChain() ;
|
int nNum = pparent->getCurrentProject()->getMaxRegNumPerChain() ;
|
if((nNum != 512)&&(nNum != 1024)&&(nNum != 2048))
|
if((nNum != 512)&&(nNum != 1024)&&(nNum != 2048))
|
{
|
{
|
qDebug() << "EziDebug Error: The project 's max reg num is not right!";
|
qDebug() << "EziDebug Error: The project 's max reg num is not right!";
|
nNum = 512 ;
|
nNum = 512 ;
|
}
|
}
|
|
|
m_nregNumComBox->setCurrentIndex(m_nregNumComBox->findText(QString::number(nNum)));
|
m_nregNumComBox->setCurrentIndex(m_nregNumComBox->findText(QString::number(nNum)));
|
m_uncurrentRegNum = nNum ;
|
m_uncurrentRegNum = nNum ;
|
}
|
}
|
}
|
}
|
|
|
void ProjectSetWizard::createConclusionPage()
|
void ProjectSetWizard::createConclusionPage()
|
{
|
{
|
m_itoolSetPage = new QWizardPage(this);
|
m_itoolSetPage = new QWizardPage(this);
|
|
m_itoolSetPage->setButtonText(QWizard::NextButton,tr("Next"));
|
|
m_itoolSetPage->setButtonText(QWizard::BackButton,tr("Back"));
|
|
m_itoolSetPage->setButtonText(QWizard::CancelButton,tr("Cancel"));
|
|
m_itoolSetPage->setButtonText(QWizard::HelpButton,tr("Help"));
|
|
m_itoolSetPage->setButtonText(QWizard::FinishButton,tr("Finish"));
|
|
|
|
|
|
#if 0
|
m_itoolSetPage->setTitle(QObject::tr("设置所用FPGA类型"));
|
m_itoolSetPage->setTitle(QObject::tr("设置所用FPGA类型"));
|
|
#else
|
|
//m_itoolSetPage->setTitle(QObject::tr("Setting FPGA type"));
|
|
#endif
|
|
|
|
|
|
|
#if 0
|
#if 0
|
QLabel *languageLabel = new QLabel(tr("所使用编程语言:"));
|
QLabel *languageLabel = new QLabel(tr("所使用编程语言:"));
|
QCheckBox *verilogCheckBox = new QCheckBox(tr("Verilog"));
|
QCheckBox *verilogCheckBox = new QCheckBox(tr("Verilog"));
|
QCheckBox *vhdlCheckBox = new QCheckBox(tr("VHDL"));
|
QCheckBox *vhdlCheckBox = new QCheckBox(tr("VHDL"));
|
|
|
QLabel *slotLabel = new QLabel(tr("所使用计数器时钟:"));
|
QLabel *slotLabel = new QLabel(tr("所使用计数器时钟:"));
|
slotComboBox = createComboBox(tr(""));
|
slotComboBox = createComboBox(tr(""));
|
#endif
|
#endif
|
|
|
//添加各个时钟。。。。
|
//添加各个时钟。。。。
|
|
#if 0
|
QLabel *fpgaLabel = new QLabel(tr("所使用FPGA:"));
|
QLabel *fpgaLabel = new QLabel(tr("所使用FPGA:"));
|
|
#else
|
|
QLabel *fpgaLabel = new QLabel(tr("The FPGA type:"));
|
|
#endif
|
|
|
alteraCheckBox = new QRadioButton(tr("Altera"),this);
|
alteraCheckBox = new QRadioButton(tr("Altera"),this);
|
xilinxCheckBox = new QRadioButton(tr("Xilinx"),this);
|
xilinxCheckBox = new QRadioButton(tr("Xilinx"),this);
|
|
|
|
alteraCheckBox->setEnabled(false);
|
alteraCheckBox->setCheckable(true);
|
alteraCheckBox->setCheckable(true);
|
xilinxCheckBox->setCheckable(true);
|
xilinxCheckBox->setCheckable(true);
|
|
|
m_ixilinxComplieOption = new QCheckBox(tr("Disable Equivalent Register Removal"),this);
|
m_ixilinxComplieOption = new QCheckBox(tr("Disable Equivalent Register Removal"),this);
|
m_ixilinxComplieOption->setCheckable(false);
|
m_ixilinxComplieOption->setCheckable(false);
|
m_ixilinxComplieOption->setVisible(false);
|
m_ixilinxComplieOption->setVisible(false);
|
connect(xilinxCheckBox,SIGNAL(toggled(bool)),this,SLOT(changeXilinxCompileOption(bool)));
|
connect(xilinxCheckBox,SIGNAL(toggled(bool)),this,SLOT(changeXilinxCompileOption(bool)));
|
QGridLayout *layout = new QGridLayout;
|
QGridLayout *layout = new QGridLayout;
|
//layout->addWidget(languageLabel, 0, 0);
|
//layout->addWidget(languageLabel, 0, 0);
|
//layout->addWidget(verilogCheckBox, 1, 0, 1, 2);
|
//layout->addWidget(verilogCheckBox, 1, 0, 1, 2);
|
//layout->addWidget(vhdlCheckBox, 1, 2, 1, 2);
|
//layout->addWidget(vhdlCheckBox, 1, 2, 1, 2);
|
//layout->addWidget(slotLabel, 3, 0);
|
//layout->addWidget(slotLabel, 3, 0);
|
//layout->addWidget(slotComboBox, 3, 1, 1, 4);
|
//layout->addWidget(slotComboBox, 3, 1, 1, 4);
|
ToolWindow *pparent = dynamic_cast<ToolWindow*>(this->parentWidget());
|
ToolWindow *pparent = dynamic_cast<ToolWindow*>(this->parentWidget());
|
if(pparent->getCurrentProject())
|
if(pparent->getCurrentProject())
|
{
|
{
|
if(pparent->getCurrentProject()->getToolType() == EziDebugPrj::ToolQuartus)
|
if(pparent->getCurrentProject()->getToolType() == EziDebugPrj::ToolQuartus)
|
{
|
{
|
alteraCheckBox->setChecked(true);
|
alteraCheckBox->setChecked(true);
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
m_ecurrentTool = EziDebugPrj::ToolQuartus ;
|
}
|
}
|
else if(pparent->getCurrentProject()->getToolType() == EziDebugPrj::ToolIse)
|
else if(pparent->getCurrentProject()->getToolType() == EziDebugPrj::ToolIse)
|
{
|
{
|
xilinxCheckBox->setChecked(true);
|
xilinxCheckBox->setChecked(true);
|
m_ecurrentTool = EziDebugPrj::ToolIse ;
|
m_ecurrentTool = EziDebugPrj::ToolIse ;
|
}
|
}
|
else
|
else
|
{
|
{
|
qDebug() << "EziDebug Error: The project 's fpag type is not right!" ;
|
qDebug() << "EziDebug Error: The project 's fpag type is not right!" ;
|
}
|
}
|
}
|
}
|
|
|
layout->addWidget(fpgaLabel, 4, 0);
|
layout->addWidget(fpgaLabel, 4, 0);
|
layout->addWidget(alteraCheckBox, 5, 0, 1, 2);
|
layout->addWidget(alteraCheckBox, 5, 0, 1, 2);
|
layout->addWidget(xilinxCheckBox, 5, 2, 1, 2);
|
layout->addWidget(xilinxCheckBox, 5, 2, 1, 2);
|
layout->addWidget(m_ixilinxComplieOption,6,2,1,2);
|
layout->addWidget(m_ixilinxComplieOption,6,2,1,2);
|
|
|
m_itoolSetPage->setLayout(layout);
|
m_itoolSetPage->setLayout(layout);
|
}
|
}
|
|
|
QPushButton *ProjectSetWizard::createButton(const QString &text, const char *member)
|
QPushButton *ProjectSetWizard::createButton(const QString &text, const char *member)
|
{
|
{
|
QPushButton *button = new QPushButton(text);
|
QPushButton *button = new QPushButton(text);
|
connect(button, SIGNAL(clicked()), this, member);
|
connect(button, SIGNAL(clicked()), this, member);
|
return button;
|
return button;
|
}
|
}
|
|
|
QComboBox *ProjectSetWizard::createComboBox(const QString &text, const QStringList &items)
|
QComboBox *ProjectSetWizard::createComboBox(const QString &text, const QStringList &items)
|
{
|
{
|
QComboBox *comboBox = new QComboBox;
|
QComboBox *comboBox = new QComboBox;
|
comboBox->setEditable(true);
|
comboBox->setEditable(true);
|
if(text != tr(""))
|
if(text != tr(""))
|
comboBox->addItem(text);
|
comboBox->addItem(text);
|
if(!items.isEmpty())
|
if(!items.isEmpty())
|
comboBox->insertItems(comboBox->count(), items);
|
comboBox->insertItems(comboBox->count(), items);
|
comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
|
|
return comboBox;
|
return comboBox;
|
}
|
}
|
|
|
QString ProjectSetWizard::getProPath()
|
QString ProjectSetWizard::getProPath()
|
{
|
{
|
return proPathComboBox->currentText();
|
return proPathComboBox->currentText();
|
}
|
}
|
|
|
void ProjectSetWizard::cc()
|
void ProjectSetWizard::cc()
|
{
|
{
|
qDebug("flag is cc");
|
qDebug("flag is cc");
|
|
|
proPathComboBox->addItem(tr("aa"));
|
proPathComboBox->addItem(tr("aa"));
|
}
|
}
|
|
|
|
|
|
|