00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_SEQUENCE_VIEWER_SEQUENCE_VIEW_OBJECT
00020 #define OST_SEQUENCE_VIEWER_SEQUENCE_VIEW_OBJECT
00021
00022
00023
00024
00025
00026 #ifndef Q_MOC_RUN
00027
00028 #include <ost/mol/entity_handle.hh>
00029
00030 #include <ost/gfx/entity.hh>
00031
00032 #include <ost/seq/sequence_list.hh>
00033
00034 #include "align_properties_painter.hh"
00035 #include "conservation_painter.hh"
00036 #include "background_painter.hh"
00037 #include "seq_secstr_painter.hh"
00038 #include "seq_selection_painter.hh"
00039 #include "seq_text_painter.hh"
00040
00041 #include "base_view_object.hh"
00042 #endif
00043
00044 namespace ost { namespace gui {
00045
00046 class SequenceViewObject : public BaseViewObject
00047 {
00048 Q_OBJECT
00049
00050 public:
00051 SequenceViewObject(seq::SequenceList& sequences, const QList<QString>& names, QObject* parent = 0);
00052 SequenceViewObject(seq::SequenceHandle& sequence, const QString& name, QObject* parent = 0);
00053 SequenceViewObject(mol::ChainView& chain, const QString& name, QObject* parent = 0);
00054 SequenceViewObject(const gfx::EntityP& entity, QObject* parent = 0);
00055 SequenceViewObject(QObject* parent = 0);
00056
00057 void Init();
00058
00059 void AddSequence(seq::ConstSequenceHandle sequence, const QString& name=QString());
00060 void AddChain(mol::ChainView& chain, const QString& name=QString());
00061
00062 void AttachGfxObject(gfx::EntityP& ent);
00063 gfx::EntityP& GetGfxObject();
00064
00065 virtual void SetDisplayMode(const QString& mode);
00066
00067 QMap<int, QList<int> > GetIndexesForView(const mol::EntityView& view);
00068 QMap<int, QList<int> > GetIndexesForSubject(const QString& subject, const QString& sequence_name=QString());
00069
00070 protected:
00071 static const QString properties_mode;
00072 static const QString secondary_structure_mode;
00073
00074 static AlignPropertiesPainter* align_properties_painter;
00075 static ConservationPainter* conservation_painter;
00076 static BackgroundPainter* background_painter;
00077 static SeqSecStrPainter* seq_secondary_structure_painter;
00078 static SeqSelectionPainter* seq_selection_painter;
00079 static SeqTextPainter* seq_text_painter;
00080
00081 private:
00082 gfx::EntityP entity_;
00083
00084
00085 };
00086
00087
00088 }}
00089
00090 #endif