Add window titles
[mussa.git] / alg / mussa.cpp
index 7226e43f2b6c26b732d527ccbc0b2e4905e9ded2..c93990b72e81ef371cdcb615d234231c5ac3a466 100644 (file)
@@ -62,6 +62,11 @@ boost::filesystem::path Mussa::get_analysis_path() const
   return analysis_path;
 }
 
+void Mussa::set_analysis_path(boost::filesystem::path pathname)
+{
+  analysis_path = pathname;
+}
+
 // set all parameters to null state
 void
 Mussa::clear()
@@ -102,11 +107,23 @@ Mussa::set_name(string a_name)
   dirty = true;
 }
 
-string Mussa::get_name()
+string Mussa::get_name() const
 {
   return analysis_name;
 }
 
+string Mussa::get_title() const
+{
+  fs::path analysis_path = get_analysis_path();
+  if (not analysis_path.empty()) {
+    return analysis_path.native_file_string();
+  } else if (get_name().size() > 0) {
+    return get_name();
+  } else {
+    return std::string("Unnamed");
+  }
+}
+
 int 
 Mussa::size() const
 {