OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2011 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 
27 #include <ost/mol/entity_handle.hh>
28 
29 #include <ost/gfx/entity.hh>
30 
31 #include <ost/seq/sequence_list.hh>
32 
34 #include "conservation_painter.hh"
35 #include "background_painter.hh"
36 #include "seq_secstr_painter.hh"
37 #include "seq_selection_painter.hh"
38 #include "seq_text_painter.hh"
39 
40 #include "base_view_object.hh"
41 
42 
43 namespace ost { namespace gui {
44 
46 {
47  Q_OBJECT
48 
49 public:
50  SequenceViewObject(seq::SequenceList& sequences, const QList<QString>& names, QObject* parent = 0);
51  SequenceViewObject(seq::SequenceHandle& sequence, const QString& name, QObject* parent = 0);
52  SequenceViewObject(mol::ChainView& chain, const QString& name, QObject* parent = 0);
53  SequenceViewObject(const gfx::EntityP& entity, QObject* parent = 0);
54  SequenceViewObject(QObject* parent = 0);
55 
56  void Init();
57 
58  void AddSequence(seq::ConstSequenceHandle sequence, const QString& name=QString());
59  void AddChain(mol::ChainView& chain, const QString& name=QString());
60 
61  void AttachGfxObject(gfx::EntityP& ent);
63 
64  virtual void SetDisplayMode(const QString& mode);
65 
66  QMap<int, QList<int> > GetIndexesForView(const mol::EntityView& view);
67  QMap<int, QList<int> > GetIndexesForSubject(const QString& subject, const QString& sequence_name=QString());
68 
69 protected:
70  static const QString properties_mode;
71  static const QString secondary_structure_mode;
72 
79 
80 private:
81  gfx::EntityP entity_;
82 
83 
84 };
85 
86 
87 }}
88 
89 #endif