36 TempoMapImportHandler::TempoMapImportHandler (
XMLTree const & source,
Session & session) :
42 if (!(tempo_map = root->
child (
X_(
"TempoMap")))) {
52 return _(
"Tempo map");
60 name =
_(
"Tempo Map");
66 std::ostringstream oss;
67 unsigned int tempos = 0;
68 unsigned int meters = 0;
71 for (
XMLNodeIterator it = children.begin(); it != children.end(); it++) {
72 if ((*it)->name() ==
"Tempo") {
74 }
else if ((*it)->name() ==
"Meters") {
80 oss <<
_(
"Tempo marks: ") << tempos <<
_(
"\nMeter marks: ") << meters;
89 boost::optional<bool> replace =
Prompt (
_(
"This will replace the current tempo map!\nAre you sure you want to do this?"));
90 return replace.get_value_or (
false);
virtual std::string get_info() const
XMLNodeList::iterator XMLNodeIterator
std::string name
Name of element.
int set_state(const XMLNode &, int version)
const XMLNodeList & children(const std::string &str=std::string()) const
ARDOUR::Session & session
Target session.
std::list< XMLNode * > XMLNodeList
Virtual interface class for element importers.
static int current_state_version
std::string get_info() const
void _cancel_move()
Cancel move.
Virtual interface class for element import handlers.
ElementList elements
Elements this handler handles.
XMLNode * child(const char *) const
static PBD::Signal1< bool, std::string > Prompt
Signal for ok/cancel prompting.
TempoMapImporter(XMLTree const &source, Session &session, XMLNode const &node)