OpenStructure
sequence_view_object.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_SEQUENCE_VIEWER_SEQUENCE_VIEW_OBJECT
20 #define OST_SEQUENCE_VIEWER_SEQUENCE_VIEW_OBJECT
21 
22 /*
23  Author: Stefan Scheuber
24  */
25 
26 #ifndef Q_MOC_RUN
27 
28 #include <ost/mol/entity_handle.hh>
29 
30 #include <ost/gfx/entity.hh>
31 
32 #include <ost/seq/sequence_list.hh>
33 
35 #include "conservation_painter.hh"
36 #include "background_painter.hh"
37 #include "seq_secstr_painter.hh"
38 #include "seq_selection_painter.hh"
39 #include "seq_text_painter.hh"
40 
41 #include "base_view_object.hh"
42 #endif
43 
44 namespace ost { namespace gui {
45 
47 {
48  Q_OBJECT
49 
50 public:
51  SequenceViewObject(seq::SequenceList& sequences, const QList<QString>& names, QObject* parent = 0);
52  SequenceViewObject(seq::SequenceHandle& sequence, const QString& name, QObject* parent = 0);
53  SequenceViewObject(mol::ChainView& chain, const QString& name, QObject* parent = 0);
54  SequenceViewObject(const gfx::EntityP& entity, QObject* parent = 0);
55  SequenceViewObject(QObject* parent = 0);
56 
57  void Init();
58 
59  void AddSequence(seq::ConstSequenceHandle sequence, const QString& name=QString());
60  void AddChain(mol::ChainView& chain, const QString& name=QString());
61 
64 
65  virtual void SetDisplayMode(const QString& mode);
66 
67  QMap<int, QList<int> > GetIndexesForView(const mol::EntityView& view);
68  QMap<int, QList<int> > GetIndexesForSubject(const QString& subject, const QString& sequence_name=QString());
69 
70 protected:
71  static const QString properties_mode;
72  static const QString secondary_structure_mode;
73 
80 
81 private:
82  gfx::EntityP entity_;
83 
84 
85 };
86 
87 
88 }}
89 
90 #endif
static ConservationPainter * conservation_painter
SequenceViewObject(seq::SequenceHandle &sequence, const QString &name, QObject *parent=0)
SequenceViewObject(seq::SequenceList &sequences, const QList< QString > &names, QObject *parent=0)
static const QString secondary_structure_mode
void AddSequence(seq::ConstSequenceHandle sequence, const QString &name=QString())
void AddChain(mol::ChainView &chain, const QString &name=QString())
static AlignPropertiesPainter * align_properties_painter
static SeqTextPainter * seq_text_painter
QMap< int, QList< int > > GetIndexesForSubject(const QString &subject, const QString &sequence_name=QString())
gfx::EntityP & GetGfxObject()
static SeqSecStrPainter * seq_secondary_structure_painter
virtual void SetDisplayMode(const QString &mode)
void AttachGfxObject(gfx::EntityP &ent)
static const QString properties_mode
SequenceViewObject(QObject *parent=0)
static SeqSelectionPainter * seq_selection_painter
static BackgroundPainter * background_painter
QMap< int, QList< int > > GetIndexesForView(const mol::EntityView &view)
SequenceViewObject(const gfx::EntityP &entity, QObject *parent=0)
SequenceViewObject(mol::ChainView &chain, const QString &name, QObject *parent=0)
definition of ChainView
Definition: chain_view.hh:37
definition of EntityView
Definition: entity_view.hh:86
mutable sequence handle.
list of sequences.
boost::shared_ptr< Entity > EntityP
Definition: entity_fw.hh:27
Definition: base.dox:1