bool EditIsoView::setAll(const std::string&,const AGEvent *,AGMessageObject *pCaller) { AGWidget *w=dynamic_cast<AGWidget*>(pCaller); if(w->getName()=="water") getMap()->setAllWater(); else if(w->getName()=="grass") getMap()->setAllLand(); completeUpdate(); sigMapEdited(0); return true; }
void EditIsoView::editAt(const Pos2D &p,bool dir) { int x=(int)(2*p.x/TILE_WIDTH+2); int y=(int)(2*p.y/TILE_WIDTH+3); if(dir) getMap()->addFlat(x,y,30,editSize); else getMap()->addFlat(x,y,-30,editSize); completeUpdate(); sigMapEdited(0); }
McaEditorReferenceArea::McaEditorReferenceArea(McaEditorWgt *ui, SequenceObjectContext *ctx) : PanView(ui, ctx, McaEditorReferenceRenderAreaFactory(ui, NULL != ui ? ui->getEditor() : NULL)), editor(NULL != ui ? ui->getEditor() : NULL), ui(ui), renderer(dynamic_cast<McaReferenceAreaRenderer *>(getRenderArea()->getRenderer())) { SAFE_POINT(NULL != renderer, "Renderer is NULL", ); singleBaseSelection = true; setLocalToolbarVisible(false); settings->showMainRuler = false; scrollBar->hide(); rowBar->hide(); connect(ui->getEditor()->getMaObject(), SIGNAL(si_alignmentChanged(MultipleAlignment,MaModificationInfo)), SLOT(sl_update())); connect(ui->getScrollController(), SIGNAL(si_visibleAreaChanged()), SLOT(sl_visibleRangeChanged())); connect(ui->getSequenceArea(), SIGNAL(si_selectionChanged(MaEditorSelection,MaEditorSelection)), SLOT(sl_selectionChanged(MaEditorSelection,MaEditorSelection))); connect(ui, SIGNAL(si_clearSelection()), SLOT(sl_clearSelection())); connect(ui->getSequenceArea(), SIGNAL(si_clearReferenceSelection()), SLOT(sl_clearSelection())); connect(ctx->getSequenceSelection(), SIGNAL(si_selectionChanged(LRegionsSelection*, const QVector<U2Region>&, const QVector<U2Region>&)), SLOT(sl_onSelectionChanged(LRegionsSelection*, const QVector<U2Region>&, const QVector<U2Region>&))); connect(this, SIGNAL(si_selectionChanged()), ui->getSequenceArea(), SLOT(sl_backgroundSelectionChanged())); connect(editor, SIGNAL(si_fontChanged(const QFont &)), SLOT(sl_fontChanged(const QFont &))); connect(ui->getConsensusArea(), SIGNAL(si_mismatchRedrawRequired()), SLOT(completeUpdate())); connect(scrollBar, SIGNAL(valueChanged(int)), ui->getScrollController()->getHorizontalScrollBar(), SLOT(setValue(int))); sl_fontChanged(editor->getFont()); }
void McaEditorReferenceArea::sl_update() { getSequenceObject()->forceCachedSequenceUpdate(); completeUpdate(); }