comparison main/MainWindow.cpp @ 241:9aace07f6082

* Allow entry of numbers smaller than 1 in the Set Counters dialog * Renumber Selected Instants now starts its count at the next counter value -- previously it always started at 1:1 and the values that you had set were only used when tapping * pull Reset Counters up a menu level to make it easier to get to
author Chris Cannam
date Tue, 12 Feb 2008 15:41:01 +0000
parents 91426a5e4b53
children 0c868fb3623c
comparison
equal deleted inserted replaced
240:91426a5e4b53 241:9aace07f6082
610 action->setCheckable(true); 610 action->setCheckable(true);
611 action->setChecked(cycles[i] == m_labeller->getCounterCycleSize()); 611 action->setChecked(cycles[i] == m_labeller->getCounterCycleSize());
612 cycleGroup->addAction(action); 612 cycleGroup->addAction(action);
613 cycleMenu->addAction(action); 613 cycleMenu->addAction(action);
614 } 614 }
615
616 action = new QAction(tr("Reset Counters..."), this);
617 connect(action, SIGNAL(triggered()), this, SLOT(resetInstantsCounters()));
618 numberingMenu->addAction(action);
619 } 615 }
620 616
621 if (i->first == Labeller::ValueNone || 617 if (i->first == Labeller::ValueNone ||
622 i->first == Labeller::ValueFromTwoLevelCounter || 618 i->first == Labeller::ValueFromTwoLevelCounter ||
623 i->first == Labeller::ValueFromRealTime) { 619 i->first == Labeller::ValueFromRealTime) {
624 numberingMenu->addSeparator(); 620 numberingMenu->addSeparator();
625 } 621 }
626 } 622 }
627 623
628 action = new QAction(tr("Re-Number Selected Instants"), this); 624 action = new QAction(tr("Set Numbering Counters..."), this);
629 action->setStatusTip(tr("Re-number the selected instants using the current labelling scheme")); 625 action->setStatusTip(tr("Set the counters used for counter-based labelling"));
626 connect(action, SIGNAL(triggered()), this, SLOT(resetInstantsCounters()));
627 menu->addAction(action);
628
629 action = new QAction(tr("Renumber Selected Instants"), this);
630 action->setStatusTip(tr("Renumber the selected instants using the current labelling scheme"));
630 connect(action, SIGNAL(triggered()), this, SLOT(renumberInstants())); 631 connect(action, SIGNAL(triggered()), this, SLOT(renumberInstants()));
631 connect(this, SIGNAL(canRenumberInstants(bool)), action, SLOT(setEnabled(bool))); 632 connect(this, SIGNAL(canRenumberInstants(bool)), action, SLOT(setEnabled(bool)));
632 // m_keyReference->registerShortcut(action); 633 // m_keyReference->registerShortcut(action);
633 menu->addAction(action); 634 menu->addAction(action);
634 } 635 }
3286 3287
3287 void 3288 void
3288 MainWindow::resetInstantsCounters() 3289 MainWindow::resetInstantsCounters()
3289 { 3290 {
3290 LabelCounterInputDialog dialog(m_labeller, this); 3291 LabelCounterInputDialog dialog(m_labeller, this);
3292 dialog.setWindowTitle(tr("Reset Counters"));
3291 dialog.exec(); 3293 dialog.exec();
3292 } 3294 }
3293 3295
3294 void 3296 void
3295 MainWindow::modelGenerationFailed(QString transformName, QString message) 3297 MainWindow::modelGenerationFailed(QString transformName, QString message)