1 #ifndef _PATH_WIDGET_H_
2 #define _PATH_WIDGET_H_
8 #include "alg/sequence.hpp"
9 #include "alg/glsequence.hpp"
10 #include "qui/seqbrowser/ScrollableSequenceBrowser.hpp"
11 #include "qui/seqbrowser/SequenceBrowserSidebar.hpp"
13 //! the master widget that makes a useful Sequence Browser
14 class SequenceBrowserWidget : public QWidget
19 SequenceBrowserWidget(QWidget *parent=0);
21 //! return current zoom size
24 //! reset all of our stored data back to the empty state
27 /* Attach sequences to our browser, its best to attach them all
28 * at once, as otherwise the Sidebar has some rendering trouble
29 * as it draw and redraws the SequenceDescriptions in the various
32 //void push_sequences(std::vector<Sequence>& sequences);
33 void setSequences(const std::vector<Sequence>& sequences, AnnotationColors& cm);
34 void setSequences(std::vector<GlSequence>& sequences);
35 const std::vector<GlSequence>& sequences() const;
37 //! reset just the links we're displaying
39 //! set per species links
40 void link(const std::vector<int> &path, const std::vector<bool>& isRC, int length);
41 // return set of pathids defined by order of link calls
42 const std::set<int> selectedPaths() const;
43 void centerOnPath(const std::vector<int>& paths);
46 //! copy selected sequence
47 void copySelectedSequenceAsFasta();
49 //! set the zoom level of our browser
51 //! zoom to fit the whole scene on the screen
54 double zoomToSequence();
56 void updatePosition();
57 //! ask the user where to save an image of the current browser view
58 void promptSaveBrowserPixmap();
63 ScrollableSequenceBrowser scrollable_browser;
64 SequenceBrowserSidebar left_sidebar;
65 SequenceBrowserSidebar right_sidebar;
67 //! sequences created by a setSequences(vector<Sequences>) call
68 /*! I need to save them so i can free them to avoid a memory leak
70 std::vector<GlSequence> converted_sequences;