Mercurial > hg > svgui
comparison widgets/Pane.cpp @ 18:7c767d41bcee
* Add basic drag editing of time instants.
Plenty of tuning to do for both this and drawing.
author | Chris Cannam |
---|---|
date | Thu, 26 Jan 2006 18:01:38 +0000 |
parents | 0183ebb725ca |
children | 46d8f5add6f0 |
comparison
equal
deleted
inserted
replaced
17:0183ebb725ca | 18:7c767d41bcee |
---|---|
340 | 340 |
341 Layer *layer = getSelectedLayer(); | 341 Layer *layer = getSelectedLayer(); |
342 if (layer) { | 342 if (layer) { |
343 layer->drawStart(e); | 343 layer->drawStart(e); |
344 } | 344 } |
345 | |
346 } else if (mode == ViewManager::EditMode) { | |
347 | |
348 Layer *layer = getSelectedLayer(); | |
349 if (layer) { | |
350 layer->editStart(e); | |
351 } | |
345 } | 352 } |
346 | 353 |
347 emit paneInteractedWith(); | 354 emit paneInteractedWith(); |
348 } | 355 } |
349 | 356 |
420 } else if (mode == ViewManager::DrawMode) { | 427 } else if (mode == ViewManager::DrawMode) { |
421 | 428 |
422 Layer *layer = getSelectedLayer(); | 429 Layer *layer = getSelectedLayer(); |
423 if (layer) { | 430 if (layer) { |
424 layer->drawEnd(e); | 431 layer->drawEnd(e); |
432 update(); | |
433 } | |
434 | |
435 } else if (mode == ViewManager::EditMode) { | |
436 | |
437 Layer *layer = getSelectedLayer(); | |
438 if (layer) { | |
439 layer->editEnd(e); | |
425 update(); | 440 update(); |
426 } | 441 } |
427 } | 442 } |
428 | 443 |
429 m_clickedInRange = false; | 444 m_clickedInRange = false; |
562 | 577 |
563 Layer *layer = getSelectedLayer(); | 578 Layer *layer = getSelectedLayer(); |
564 if (layer) { | 579 if (layer) { |
565 layer->drawDrag(e); | 580 layer->drawDrag(e); |
566 } | 581 } |
582 | |
583 } else if (mode == ViewManager::EditMode) { | |
584 | |
585 Layer *layer = getSelectedLayer(); | |
586 if (layer) { | |
587 layer->editDrag(e); | |
588 } | |
567 } | 589 } |
568 } | 590 } |
569 | 591 |
570 void | 592 void |
571 Pane::mouseDoubleClickEvent(QMouseEvent *e) | 593 Pane::mouseDoubleClickEvent(QMouseEvent *e) |