Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 600:f3842da4d510 with-dependencies
Merge from default
| author | Chris Cannam <chris.cannam@eecs.qmul.ac.uk> |
|---|---|
| date | Wed, 24 Jul 2013 18:25:45 +0100 |
| parents | 110eecb5d9f6 |
| children | c0a20cd1a9ff |
comparison
equal
deleted
inserted
replaced
| 599:4901db78f907 | 600:f3842da4d510 |
|---|---|
| 773 i->first == Labeller::ValueFromRealTime) { | 773 i->first == Labeller::ValueFromRealTime) { |
| 774 numberingMenu->addSeparator(); | 774 numberingMenu->addSeparator(); |
| 775 } | 775 } |
| 776 } | 776 } |
| 777 | 777 |
| 778 action = new QAction(tr("Reset Numbering Counters"), this); | |
| 779 action->setStatusTip(tr("Reset to 1 all the counters used for counter-based labelling")); | |
| 780 connect(action, SIGNAL(triggered()), this, SLOT(resetInstantsCounters())); | |
| 781 connect(this, SIGNAL(replacedDocument()), action, SLOT(trigger())); | |
| 782 menu->addAction(action); | |
| 783 | |
| 778 action = new QAction(tr("Set Numbering Counters..."), this); | 784 action = new QAction(tr("Set Numbering Counters..."), this); |
| 779 action->setStatusTip(tr("Set the counters used for counter-based labelling")); | 785 action->setStatusTip(tr("Set the counters used for counter-based labelling")); |
| 780 connect(action, SIGNAL(triggered()), this, SLOT(resetInstantsCounters())); | 786 connect(action, SIGNAL(triggered()), this, SLOT(setInstantsCounters())); |
| 781 menu->addAction(action); | 787 menu->addAction(action); |
| 782 | 788 |
| 783 action = new QAction(tr("Renumber Selected Instants"), this); | 789 action = new QAction(tr("Renumber Selected Instants"), this); |
| 784 action->setStatusTip(tr("Renumber the selected instants using the current labelling scheme")); | 790 action->setStatusTip(tr("Renumber the selected instants using the current labelling scheme")); |
| 785 connect(action, SIGNAL(triggered()), this, SLOT(renumberInstants())); | 791 connect(action, SIGNAL(triggered()), this, SLOT(renumberInstants())); |
| 2059 action->setCheckable(true); | 2065 action->setCheckable(true); |
| 2060 action->setChecked(true); | 2066 action->setChecked(true); |
| 2061 action->setShortcut(tr("1")); | 2067 action->setShortcut(tr("1")); |
| 2062 action->setStatusTip(tr("Navigate")); | 2068 action->setStatusTip(tr("Navigate")); |
| 2063 connect(action, SIGNAL(triggered()), this, SLOT(toolNavigateSelected())); | 2069 connect(action, SIGNAL(triggered()), this, SLOT(toolNavigateSelected())); |
| 2070 connect(this, SIGNAL(replacedDocument()), action, SLOT(trigger())); | |
| 2064 group->addAction(action); | 2071 group->addAction(action); |
| 2065 m_keyReference->registerShortcut(action); | 2072 m_keyReference->registerShortcut(action); |
| 2066 m_toolActions[ViewManager::NavigateMode] = action; | 2073 m_toolActions[ViewManager::NavigateMode] = action; |
| 2067 | 2074 |
| 2068 action = toolbar->addAction(il.load("select"), | 2075 action = toolbar->addAction(il.load("select"), |
| 4046 settings.setValue("labellercycle", cycle); | 4053 settings.setValue("labellercycle", cycle); |
| 4047 settings.endGroup(); | 4054 settings.endGroup(); |
| 4048 } | 4055 } |
| 4049 | 4056 |
| 4050 void | 4057 void |
| 4051 MainWindow::resetInstantsCounters() | 4058 MainWindow::setInstantsCounters() |
| 4052 { | 4059 { |
| 4053 LabelCounterInputDialog dialog(m_labeller, this); | 4060 LabelCounterInputDialog dialog(m_labeller, this); |
| 4054 dialog.setWindowTitle(tr("Reset Counters")); | 4061 dialog.setWindowTitle(tr("Reset Counters")); |
| 4055 dialog.exec(); | 4062 dialog.exec(); |
| 4063 } | |
| 4064 | |
| 4065 void | |
| 4066 MainWindow::resetInstantsCounters() | |
| 4067 { | |
| 4068 if (m_labeller) m_labeller->resetCounters(); | |
| 4056 } | 4069 } |
| 4057 | 4070 |
| 4058 void | 4071 void |
| 4059 MainWindow::modelGenerationFailed(QString transformName, QString message) | 4072 MainWindow::modelGenerationFailed(QString transformName, QString message) |
| 4060 { | 4073 { |
