comparison widgets/Pane.cpp @ 36:c28ebb4ba4de

* Improvements to text layer editing, and implement file I/O for it * Start some fixes to spectrogram frequency computation
author Chris Cannam
date Mon, 20 Feb 2006 17:23:40 +0000
parents 10ba9276a315
children 21d061e66177
comparison
equal deleted inserted replaced
35:10ba9276a315 36:c28ebb4ba4de
614 614
615 void 615 void
616 Pane::mouseDoubleClickEvent(QMouseEvent *e) 616 Pane::mouseDoubleClickEvent(QMouseEvent *e)
617 { 617 {
618 std::cerr << "mouseDoubleClickEvent" << std::endl; 618 std::cerr << "mouseDoubleClickEvent" << std::endl;
619
620 m_clickPos = e->pos();
621 m_clickedInRange = true;
622 m_shiftPressed = (e->modifiers() & Qt::ShiftModifier);
623 m_ctrlPressed = (e->modifiers() & Qt::ControlModifier);
624
625 ViewManager::ToolMode mode = ViewManager::NavigateMode;
626 if (m_manager) mode = m_manager->getToolMode();
627
628 if (mode == ViewManager::EditMode) {
629
630 Layer *layer = getSelectedLayer();
631 if (layer && layer->isLayerEditable()) {
632 layer->editOpen(e);
633 }
634 }
619 } 635 }
620 636
621 void 637 void
622 Pane::leaveEvent(QEvent *) 638 Pane::leaveEvent(QEvent *)
623 { 639 {
711 break; 727 break;
712 728
713 case ViewManager::DrawMode: 729 case ViewManager::DrawMode:
714 setCursor(Qt::CrossCursor); 730 setCursor(Qt::CrossCursor);
715 break; 731 break;
716 732 /*
717 case ViewManager::TextMode: 733 case ViewManager::TextMode:
718 setCursor(Qt::IBeamCursor); 734 setCursor(Qt::IBeamCursor);
719 break; 735 break;
736 */
720 } 737 }
721 } 738 }
722 739
723 QString 740 QString
724 Pane::toXmlString(QString indent, QString extraAttributes) const 741 Pane::toXmlString(QString indent, QString extraAttributes) const