-void Dispatcher::renameSourceBlock(Context context, SourceItem *item){
- static QString fctName = "Dispatcher::renameSourceBlock()";
+void Dispatcher::renameStimuliItem(Context context, StimuliItem *item){
+ static QString fctName = "Dispatcher::renameStimuliItem()";
"New name:", QLineEdit::Normal,
item->getRefBlock()->getName(), &ok);
if (!ok) return;
"New name:", QLineEdit::Normal,
item->getRefBlock()->getName(), &ok);
if (!ok) return;
-void Dispatcher::duplicateSourceItem(Context context, SourceItem *item) {
- static QString fctName = "Dispatcher::duplicateSourceItem()";
+void Dispatcher::duplicateStimuliItem(Context context, StimuliItem *item) {
+ static QString fctName = "Dispatcher::duplicateStimuliItem()";
GroupScene *scene = getSceneById(idScene);
ReferenceBlock* ref = params->getReferenceBlock(idCategory,idBlock);
// if block has no inputs, propose to add it as a source to top scene
GroupScene *scene = getSceneById(idScene);
ReferenceBlock* ref = params->getReferenceBlock(idCategory,idBlock);
// if block has no inputs, propose to add it as a source to top scene
- if ((scene->isTopScene()) && (ref->isGeneratorBlock())) {
- int ret = QMessageBox::question(NULL,"Adding a block to top scene","Selected block may be used as a source for the top scene. Do you want to add it as a source ?");
+ if ((scene->isTopScene()) && (ref->isSourceBlock())) {
+ int ret = QMessageBox::question(NULL,"Adding a block to top scene","Selected block may be used as a stimuli for the top scene. Do you want to add it as a stimuli ?");
- if (newSource) {
- FunctionalBlock* newOne = params->getGraph()->createSourceBlock(ref, true);
- scene->createSourceItem(newOne);
+ if (newStimuli) {
+ FunctionalBlock* newOne = params->getGraph()->createStimuliBlock(ref, true);
+ scene->createStimuliItem(newOne);
FunctionalBlock* newOne = params->getGraph()->createFunctionalBlock(group, ref, true);
QString name = "clkrstgen_";
FunctionalBlock* newOne = params->getGraph()->createFunctionalBlock(group, ref, true);
QString name = "clkrstgen_";
- QString clkName = "ext_clk_"+QString::number(params->clocks.size()-1);
- QString rstName = "ext_reset_"+QString::number(params->clocks.size()-1);
+ QString clkName = "ext_clk_"+QString::number(params->getGraph()->getClocks().size()-1);
+ QString rstName = "ext_reset_"+QString::number(params->getGraph()->getClocks().size()-1);
fromIfaceClk = new GroupInterface(group,clkName, AbstractInterface::Input, AbstractInterface::Clock);
fromIfaceReset = new GroupInterface(group,rstName, AbstractInterface::Input, AbstractInterface::Reset);
group->addInterface(fromIfaceClk);
fromIfaceClk = new GroupInterface(group,clkName, AbstractInterface::Input, AbstractInterface::Clock);
fromIfaceReset = new GroupInterface(group,rstName, AbstractInterface::Input, AbstractInterface::Reset);
group->addInterface(fromIfaceClk);
static QString fctName = "Dispatcher::createTopScene()";
#ifdef DEBUG_FCTNAME
cout << "call to " << qPrintable(fctName) << endl;
static QString fctName = "Dispatcher::createTopScene()";
#ifdef DEBUG_FCTNAME
cout << "call to " << qPrintable(fctName) << endl;
-void Dispatcher::removeSourceItem(Context context, SourceItem *item) {
- static QString fctName = "Dispatcher::removeSourceItem()";
+void Dispatcher::removeStimuliItem(Context context, StimuliItem *item) {
+ static QString fctName = "Dispatcher::removeStimuliItem()";
- int ret = QMessageBox::question(NULL,"Removing source block",msg, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
+ int ret = QMessageBox::question(NULL,"Removing stimuli block",msg, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
if (ret == QMessageBox::Cancel) {
return;
}
removeAllBlockConnections(context, item);
FunctionalBlock* block = AB_TO_FUN(item->getRefBlock());
if (ret == QMessageBox::Cancel) {
return;
}
removeAllBlockConnections(context, item);
FunctionalBlock* block = AB_TO_FUN(item->getRefBlock());