X-Git-Url: http://woldlab.caltech.edu/gitweb/?a=blobdiff_plain;f=alg%2Fmussa.hpp;h=152d8217349568755913e67c1a77fed6aaa6eaa6;hb=6d25d4d945af696134bdf788b111f38b197b1a15;hp=27cd239f41c78091abda71fb58f1b95190307da7;hpb=c760a5d3839b241f2f94437731050622b197bf03;p=mussa.git diff --git a/alg/mussa.hpp b/alg/mussa.hpp index 27cd239..152d821 100644 --- a/alg/mussa.hpp +++ b/alg/mussa.hpp @@ -13,7 +13,8 @@ // ---------------------------------------- // ---------- mussa_class.hh ----------- // ---------------------------------------- -#include +#include +#include #include #include @@ -31,13 +32,19 @@ std::string int_to_str(int an_int); +class Mussa; +//! provide a simple name to point to our Mussa shared_ptr +typedef boost::shared_ptr MussaRef; + class Mussa : public QObject { Q_OBJECT signals: //! call whatever signaling system we want - void progress(const std::string& description, int cur, int max); + void progress(const QString& description, int cur, int max); + //! triggered when our state changes between unsaved(true) and saved(false) + void isModified(bool); public: typedef std::set motif_set; @@ -47,6 +54,9 @@ public: Mussa(); Mussa(const Mussa &); + //! dynamically construct a new Mussa object and return a reference to it + static MussaRef init(); + //! save all of mussa void save(boost::filesystem::path save_path=""); //! save the nway comparison @@ -62,8 +72,14 @@ public: void clear(); //! set parameters from a file - 'mupa' ~ mussa parameters - void load_mupa_file(std::string para_file_path) { load_mupa_file(boost::filesystem::path(para_file_path));} + void load_mupa_file(std::string para_file_path); void load_mupa_file(boost::filesystem::path para_file_path); + //! load mussa parameters from a stream, specifing output location + void load_mupa_stream( + std::istream & para_file, + boost::filesystem::path& file_path_base + ); + // set parameters individually (eg from user input into gui classes) //! set analysis name @@ -100,6 +116,8 @@ public: enum analysis_modes get_analysis_mode() const; //! return a string name for an analysis mode std::string get_analysis_mode_name() const; + //! set our current dirty state + void set_dirty(bool); //! return if we have unsaved changes bool is_dirty() const; //! is there anything loaded into this analysis? @@ -234,6 +252,4 @@ public: void seqcomp(); }; -//! provide a simple name to point to our Mussa shared_ptr -typedef boost::shared_ptr MussaRef; #endif