summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/element_importer.h
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2008-11-26 17:13:50 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2008-11-26 17:13:50 +0000
commit38382b792113cbf23881c1dca64e16c2d0207d45 (patch)
tree5fb1185a6f21ecc769a4c229fc0f6b7415eabaf5 /libs/ardour/ardour/element_importer.h
parent95a86871c028ab7f0ae16608adb9b86495678d50 (diff)
More work on track import and some cleaning up of ElementImporter interface
git-svn-id: svn://localhost/ardour2/branches/3.0@4265 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/element_importer.h')
-rw-r--r--libs/ardour/ardour/element_importer.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h
index 34ab0a7cc6..7979fbd0a4 100644
--- a/libs/ardour/ardour/element_importer.h
+++ b/libs/ardour/ardour/element_importer.h
@@ -41,7 +41,7 @@ class ElementImporter
public:
ElementImporter (XMLTree const & source, ARDOUR::Session & session);
- virtual ~ElementImporter () {};
+ virtual ~ElementImporter ();
/** Returns the element name
* @return the name of the element
@@ -54,27 +54,18 @@ class ElementImporter
virtual string get_info () const = 0;
/** Prepares to move element
- * Should take care of all tasks that need to be done
- * before moving the element. This includes prompting
- * the user for more information if necessary.
- *
- * If the element can be moved, queued should be set to true.
*
* @return whther or not the element could be prepared for moving
*/
- virtual bool prepare_move () = 0;
+ bool prepare_move ();
/** Cancels moving of element
* If the element has been set to be moved, this cancels the move.
- * queued should be set to false.
*/
- virtual void cancel_move () = 0;
+ void cancel_move ();
- /** Moves the element to the taget session
- * In addition to actually adding the element to the session
- * changing ids, renaming files etc. should be taken care of.
- */
- virtual void move () = 0;
+ /// Moves the element to the taget session
+ void move ();
/// Check if element is broken. Cannot be moved if broken.
bool broken () { return _broken; }
@@ -86,6 +77,24 @@ class ElementImporter
static sigc::signal <bool, string> Prompt;
protected:
+
+ /** Moves the element to the taget session
+ * In addition to actually adding the element to the session
+ * changing ids, renaming files etc. should be taken care of.
+ */
+ virtual void _move () = 0;
+
+ /** Should take care of all tasks that need to be done
+ * before moving the element. This includes prompting
+ * the user for more information if necessary.
+ *
+ * @return whether or not the element can be moved
+ */
+ virtual bool _prepare_move () = 0;
+
+ /// Cancel move
+ virtual void _cancel_move () = 0;
+
/// Source XML-tree
XMLTree const & source;
@@ -93,7 +102,7 @@ class ElementImporter
ARDOUR::Session & session;
/// Ture if the element has been prepared and queued for importing
- bool queued;
+ bool queued () { return _queued; }
/// Name of element
string name;
@@ -114,6 +123,7 @@ class ElementImporter
void set_broken () { _broken = true; }
private:
+ bool _queued;
bool _broken;
};