diff base/Selection.cpp @ 46:5364a9d338a2

* Add Insert Instant function in main window * Ensure selections and window geometry are saved in session file * Add wait cursor on session file save * Various improvements to display of texts in pane (clearer readability) * Use commands for setting properties on layers and panes (still need to batch up multiple sets on the same property) * Fix failure of spectrogram to refresh when initial part became visible * Some fixes & paint optimisations in View &c * Make curve mode for time value layers work properly when resolution == 1 * Some vague improvements for time value layer vertical scale
author Chris Cannam
date Thu, 16 Mar 2006 18:46:00 +0000
parents 935a2419a77c
children 39ae3dee27b9
line wrap: on
line diff
--- a/base/Selection.cpp	Wed Mar 15 18:11:23 2006 +0000
+++ b/base/Selection.cpp	Thu Mar 16 18:46:00 2006 +0000
@@ -186,3 +186,19 @@
 
     return Selection();
 }
+
+QString
+MultiSelection::toXmlString(QString indent,
+			    QString extraAttributes) const
+{
+    QString s;
+    s += indent + QString("<selections %1>\n").arg(extraAttributes);
+    for (SelectionList::iterator i = m_selections.begin();
+	 i != m_selections.end(); ++i) {
+	s += indent + QString("  <selection start=\"%1\" end=\"%2\"/>\n")
+	    .arg(i->getStartFrame()).arg(i->getEndFrame());
+    }
+    s += indent + "</selections>\n";
+    return s;
+}
+