Line 14... |
Line 14... |
|
|
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()
|
Line 56... |
Line 60... |
}
|
}
|
else
|
else
|
{
|
{
|
m_isXilinxErrChecked = false ;
|
m_isXilinxErrChecked = false ;
|
}
|
}
|
QWizard::done(result);
|
|
|
|
|
QWizard::done(result);
|
}
|
}
|
|
|
|
|
void ProjectSetWizard::saveModifiedPage(int m)
|
void ProjectSetWizard::saveModifiedPage(int m)
|
{
|
{
|
Line 131... |
Line 135... |
// }
|
// }
|
|
|
|
|
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());
|
Line 160... |
Line 187... |
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;
|
Line 210... |
Line 250... |
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");
|
Line 240... |
Line 280... |
}
|
}
|
|
|
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"));
|
Line 252... |
Line 305... |
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);
|