Ejemplo n.º 1
0
MSAOverview::MSAOverview(MSAEditorUI *_ui)
    : editor(_ui->getEditor()),
      ui(_ui),
      sequenceArea(_ui->getSequenceArea())
{
    connect(sequenceArea, SIGNAL(si_visibleRangeChanged()), this, SLOT(sl_visibleRangeChanged()));
    connect(sequenceArea, SIGNAL(si_selectionChanged(MSAEditorSelection,MSAEditorSelection)),
            SLOT(sl_selectionChanged()));
    connect(editor->getMSAObject(), SIGNAL(si_alignmentChanged(MAlignment,MAlignmentModInfo)),
            SLOT(sl_redraw()));
}
Ejemplo n.º 2
0
MaOverview::MaOverview(MaEditorWgt *ui)
    : QWidget(ui),
      editor(ui->getEditor()),
      ui(ui),
      sequenceArea(ui->getSequenceArea()),
      stepX(0),
      stepY(0)
{
    connect(sequenceArea, SIGNAL(si_visibleRangeChanged()), this, SLOT(sl_visibleRangeChanged()));
    connect(sequenceArea, SIGNAL(si_selectionChanged(MaEditorSelection,MaEditorSelection)),
            SLOT(sl_selectionChanged()));
    connect(editor->getMaObject(), SIGNAL(si_alignmentChanged(MultipleAlignment,MaModificationInfo)),
            SLOT(sl_redraw()));
    connect(ui->getScrollController(), SIGNAL(si_visibleAreaChanged()), SLOT(sl_redraw()));
    connect(ui->getCollapseModel(), SIGNAL(si_toggled()), SLOT(sl_redraw()));
}
Ejemplo n.º 3
0
void ZoomableAssemblyOverview::checkedSetVisibleRange(qint64 newStartPos, qint64 newLen, bool force) {
    if(!zoomable) return;
    U2OpStatusImpl os;
    qint64 modelLen = model->getModelLength(os);
    Q_UNUSED(modelLen);
    assert(newLen <= modelLen);
    if(newLen != visibleRange.length || newStartPos != visibleRange.startPos || force) {
        qint64 minLen = minimalOverviewedLen();
        qint64 minLenDiff = 0;
        if(newLen < minLen) {
            minLenDiff = minLen - newLen;
        }
        //shift start pos to keep needed region in the center, if
        //requested length is smaller than minimal allowed length
        newStartPos -= minLenDiff / 2;

        newStartPos = qMax((qint64)0, newStartPos);
        visibleRange.length = qMax(newLen, minLen);
        checkedMoveVisibleRange(newStartPos);

        emit si_visibleRangeChanged(visibleRange);
    }
}