Mercurial > hg > svgui
comparison widgets/Pane.cpp @ 19:46d8f5add6f0
* Introduce potentially-separate read and write ring buffers, so we can swap
in a new set when something changes -- thus allowing us to respond quickly
when something changes during playback, without losing the long buffers
* Some fixes for display & editing
author | Chris Cannam |
---|---|
date | Fri, 27 Jan 2006 18:04:07 +0000 |
parents | 7c767d41bcee |
children | 1deb5f87a18c |
comparison
equal
deleted
inserted
replaced
18:7c767d41bcee | 19:46d8f5add6f0 |
---|---|
225 } | 225 } |
226 paint.drawText(x, y, text); | 226 paint.drawText(x, y, text); |
227 } | 227 } |
228 | 228 |
229 if (m_clickedInRange && m_shiftPressed) { | 229 if (m_clickedInRange && m_shiftPressed) { |
230 //!!! be nice if this looked a bit more in keeping with the | 230 if (m_manager && (m_manager->getToolMode() == ViewManager::NavigateMode)) { |
231 //selection block | 231 //!!! be nice if this looked a bit more in keeping with the |
232 paint.setPen(Qt::blue); | 232 //selection block |
233 paint.drawRect(m_clickPos.x(), m_clickPos.y(), | 233 paint.setPen(Qt::blue); |
234 m_mousePos.x() - m_clickPos.x(), | 234 paint.drawRect(m_clickPos.x(), m_clickPos.y(), |
235 m_mousePos.y() - m_clickPos.y()); | 235 m_mousePos.x() - m_clickPos.x(), |
236 m_mousePos.y() - m_clickPos.y()); | |
237 } | |
236 } | 238 } |
237 | 239 |
238 paint.end(); | 240 paint.end(); |
239 } | 241 } |
240 | 242 |
576 } else if (mode == ViewManager::DrawMode) { | 578 } else if (mode == ViewManager::DrawMode) { |
577 | 579 |
578 Layer *layer = getSelectedLayer(); | 580 Layer *layer = getSelectedLayer(); |
579 if (layer) { | 581 if (layer) { |
580 layer->drawDrag(e); | 582 layer->drawDrag(e); |
583 update(); | |
581 } | 584 } |
582 | 585 |
583 } else if (mode == ViewManager::EditMode) { | 586 } else if (mode == ViewManager::EditMode) { |
584 | 587 |
585 Layer *layer = getSelectedLayer(); | 588 Layer *layer = getSelectedLayer(); |
586 if (layer) { | 589 if (layer) { |
587 layer->editDrag(e); | 590 layer->editDrag(e); |
591 update(); | |
588 } | 592 } |
589 } | 593 } |
590 } | 594 } |
591 | 595 |
592 void | 596 void |
678 case ViewManager::SelectMode: | 682 case ViewManager::SelectMode: |
679 setCursor(Qt::ArrowCursor); | 683 setCursor(Qt::ArrowCursor); |
680 break; | 684 break; |
681 | 685 |
682 case ViewManager::EditMode: | 686 case ViewManager::EditMode: |
683 setCursor(Qt::SizeAllCursor); | 687 setCursor(Qt::UpArrowCursor); |
684 break; | 688 break; |
685 | 689 |
686 case ViewManager::DrawMode: | 690 case ViewManager::DrawMode: |
687 setCursor(Qt::CrossCursor); | 691 setCursor(Qt::CrossCursor); |
688 break; | 692 break; |