DomainInfoDock::DomainInfoDock(QWidget *parent) : EditorDock(parent), ui(new Ui::DomainInfoDock) { ui->setupUi(this); //Resize the edit button so that it fits the icon button above ui->editButton->setMaximumWidth(ui->iconButton->geometry().width()); //Update rules whenever they change ConfigurationStack &stack=ConfigurationStack::instance(); connect(&stack, SIGNAL(domainChanged(QString,QString)), this, SLOT(onDomainChanged(QString,QString))); connect(&stack, SIGNAL(configurationChanged()), this, SLOT(onProgramsOrRulesChanged())); connect(&stack, SIGNAL(allRulesChanged()), this, SLOT(onProgramsOrRulesChanged())); connect(&stack, SIGNAL(loopsChanged()), this, SLOT(onProgramsOrRulesChanged())); connect(&stack, SIGNAL(rulesChanged()), this, SLOT(onProgramsOrRulesChanged())); connect(&stack, SIGNAL(programChanged(QString,QString)), this, SLOT(onProgramsOrRulesChanged())); connect(&stack, SIGNAL(warningsChanged()), this, SLOT(onProgramsOrRulesChanged())); //Connect the edit button connect(ui->editButton, SIGNAL(clicked()), this, SLOT(onEditClicked())); //Forward domain/program activated signals to parents connect(ui->loopsTreeWidget, SIGNAL(programActivated(QString)), this, SIGNAL(programActivated(QString))); connect(ui->loopsTreeWidget, SIGNAL(ruleActivated(int)), this, SIGNAL(ruleActivated(int))); connect(ui->incomingTreeWidget, SIGNAL(domainActivated(QString)), this, SIGNAL(domainActivated(QString))); connect(ui->incomingTreeWidget, SIGNAL(programActivated(QString)), this, SIGNAL(programActivated(QString))); connect(ui->incomingTreeWidget, SIGNAL(ruleActivated(int)), this, SIGNAL(ruleActivated(int))); connect(ui->leavingTreeWidget, SIGNAL(domainActivated(QString)), this, SIGNAL(domainActivated(QString))); connect(ui->leavingTreeWidget, SIGNAL(programActivated(QString)), this, SIGNAL(programActivated(QString))); connect(ui->leavingTreeWidget, SIGNAL(ruleActivated(int)), this, SIGNAL(ruleActivated(int))); }
void SpriteAnimation::setLoops(const int &loops) { int currentState = m_spriteAnimation->loopCount(); if (currentState != loops) { m_spriteAnimation->setLoopCount(loops); emit loopsChanged(); } }