2
* UGENE - Integrated Bioinformatics Tools.
3
* Copyright (C) 2008-2011 UniPro <ugene@unipro.ru>
4
* http://ugene.unipro.ru
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
#ifndef _U2_MSA_EDITOR_NAME_LIST_H_
23
#define _U2_MSA_EDITOR_NAME_LIST_H_
25
#include <U2Core/global.h>
26
#include <U2Core/U2Region.h>
28
#include <QtGui/QMenu>
29
#include <QtGui/QScrollBar>
30
#include <QtGui/QRubberBand>
38
class MAlignmentModInfo;
39
class MSAEditorSelection;
41
class MSAEditorNameList: public QWidget {
44
MSAEditorNameList(MSAEditorUI* ui, QScrollBar* nhBar);
48
void sl_buildStaticMenu(GObjectView* v, QMenu* m);
49
void sl_buildContextMenu(GObjectView* v, QMenu* m);
50
void sl_copyCurrentSequence();
51
void sl_editSequenceName();
52
void sl_lockedStateChanged();
53
void sl_removeCurrentSequence();
54
void sl_alignmentChanged(const MAlignment&, const MAlignmentModInfo&);
55
void sl_onScrollBarActionTriggered( int scrollAction );
57
void sl_startChanged(const QPoint& p, const QPoint& prev);
58
void sl_selectionChanged(const MSAEditorSelection& current, const MSAEditorSelection& prev);
60
void sl_nameBarMoved(int n);
61
void sl_fontChanged();
64
void resizeEvent(QResizeEvent* e);
65
void paintEvent(QPaintEvent* e);
66
void keyPressEvent (QKeyEvent *e);
67
void mousePressEvent(QMouseEvent *e);
68
void mouseMoveEvent(QMouseEvent* e);
69
void mouseReleaseEvent(QMouseEvent *e);
70
void mouseDoubleClickEvent(QMouseEvent *e);
71
void focusOutEvent(QFocusEvent* fe);
72
void focusInEvent(QFocusEvent* fe);
73
void wheelEvent (QWheelEvent * we);
77
bool isRowInSelection(int row);
79
void buildMenu(QMenu* m);
80
void updateScrollBar();
81
void updateSelection(int newSeqNum);
82
void moveSelectedRegion( int shift );
84
void drawContent(QPainter& p);
85
void drawSelection(QPainter& p);
86
void drawSequenceItem(QPainter& p, int n, bool selected);
87
void drawFocus(QPainter& p);
94
bool scribbling,shifting;
96
QRubberBand* rubberBand;
97
QAction* editSequenceNameAction;
98
QAction* copyCurrentSequenceAction;
99
QAction* removeCurrentSequenceAction;