19 #ifndef OST_SEQUENCE_VIEWER_SEQUENCE_MODEL
20 #define OST_SEQUENCE_VIEWER_SEQUENCE_MODEL
39 #include <QAbstractTableModel>
40 #include <QItemSelection>
43 namespace ost {
namespace gui {
62 QModelIndexList
GetModelIndexes(
const QString& subject,
const QString& sequence_name=QString());
79 int rowCount(
const QModelIndex& parent=QModelIndex())
const;
81 int columnCount(
const QModelIndex& parent=QModelIndex())
const;
83 QVariant
data(
const QModelIndex& index,
int role=Qt::DisplayRole)
const;
85 QVariant
headerData(
int section, Qt::Orientation orientation,
86 int role=Qt::DisplayRole)
const;
88 virtual Qt::ItemFlags
flags(
const QModelIndex& index=QModelIndex())
const;
98 void SelectionChanged(
const QItemSelection& sel,
const QItemSelection& desel);
100 int GetColumnCount()
const;
104 QPair<int, BaseViewObject*> GetRowWithItem(
int row)
const;
105 QPair<int, BaseViewObject*> GetRowWithItem(
const QModelIndex& index)
const;
107 QList<BaseViewObject*> objects_;
110 QString empty_string_;
111 QStringList empty_string_list_;
112 QStringList display_modes_;
113 QString current_display_mode_;
QPair< seq::AlignmentHandle, int > GetAlignmentForRow(int row)
void RemoveGfxEntity(const gfx::EntityP &entity)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
QModelIndexList GetModelIndexes(gfx::EntityP &entity, const mol::EntityView &view)
int GetGlobalRow(BaseViewObject *obj, int row) const
const PainterList & GetPainters(const QModelIndex &index) const
boost::shared_ptr< Entity > EntityP
void RemoveAlignment(const seq::AlignmentHandle &alignment)
const QString & GetCurrentDisplayMode()
void InsertSequences(const QList< QString > &names, seq::SequenceList &list)
const QStringList & GetDisplayModes()
void InsertChain(QString &name, mol::ChainView &view)
void SelectionChanged(const QItemSelection &sel, const QItemSelection &desel)
QList< Painter * > PainterList
int rowCount(const QModelIndex &parent=QModelIndex()) const
void InsertGfxEntity(const gfx::EntityP &entity)
void SetDisplayMode(const QString &mode)
void EmitRowChanged(int row)
SequenceModel(QObject *parent=0)
void InsertAlignment(const seq::AlignmentHandle &alignment)
void InsertSequence(QString &name, seq::SequenceHandle &seq)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
representation of a multiple sequence alignemnt consisting of two or more sequences ...
virtual Qt::ItemFlags flags(const QModelIndex &index=QModelIndex()) const
void DoubleClicked(const QModelIndex &index)
int columnCount(const QModelIndex &parent=QModelIndex()) const