~ubuntu-branches/ubuntu/jaunty/kgraphviewer/jaunty

« back to all changes in this revision

Viewing changes to src/part/canvasedge.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve Stalcup
  • Date: 2008-08-30 21:38:37 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080830213837-m9yz9i817rdqt26d
Tags: 4:2.0.2-kde4.1.1-0ubuntu1
* New upstream release
* Removed debian/cdbs dir, using cdbs kde4.mk

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
                       qreal wdhcf, qreal hdvcf,
52
52
                       QGraphicsItem* parent)
53
53
                       : QAbstractGraphicsShapeItem(parent),
54
 
    m_scaleX(scaleX),
55
 
    m_scaleY(scaleY), m_xMargin(xMargin), m_yMargin(yMargin),
56
 
    m_gh(gh), m_wdhcf(wdhcf), m_hdvcf(hdvcf), m_edge(e),
 
54
    m_scaleX(scaleX), m_scaleY(scaleY),
 
55
    m_xMargin(xMargin), m_yMargin(yMargin),
 
56
    m_gh(/*gh*/0), m_wdhcf(wdhcf), m_hdvcf(hdvcf), m_edge(e),
57
57
    m_font(0), m_view(view), m_popup(new QMenu())
58
58
{
59
59
  kDebug() << "edge "  << edge()->fromNode()->id() << "->"  << edge()->toNode()->id() << m_gh;
76
76
  connect(e,SIGNAL(changed()),this,SLOT(modelChanged()));
77
77
  connect(this, SIGNAL(selected(CanvasEdge*, Qt::KeyboardModifiers)), view, SLOT(slotEdgeSelected(CanvasEdge*, Qt::KeyboardModifiers)));
78
78
  
 
79
  connect(this, SIGNAL(edgeContextMenuEvent(const QString&, const QPoint&)), view, SLOT(slotContextMenuEvent(const QString&, const QPoint&)));
79
80
80
81
 
81
82
CanvasEdge::~CanvasEdge()
490
491
  }
491
492
  else if (event->button() == Qt::RightButton)
492
493
  {
493
 
    // opens the selected edge contextual menu and if necessary select the edge
494
494
    if (!edge()->isSelected())
495
495
    {
496
496
      edge()->setSelected(true);
497
497
      emit(selected(this,event->modifiers()));
498
498
      update();
499
499
    }
500
 
    kDebug() << "opens the contextual menu";
501
 
    
502
 
    m_popup->exec(event->screenPos());
 
500
    kDebug() << "emiting edgeContextMenuEvent("<<m_edge->id()<<","<<event->screenPos()<<")";
 
501
    emit(edgeContextMenuEvent(m_edge->id(), event->screenPos() ));
 
502
// opens the selected edge contextual menu and if necessary select the edge
 
503
/*    kDebug() << "opens the contextual menu";
 
504
    m_popup->exec(event->screenPos());*/
503
505
  }
504
506
}
505
507