45 #ifdef CEXMC_USE_ROOTQT
47 #include <QContextMenuEvent>
55 CexmcHistoWidget::CexmcHistoWidget()
59 fCanvas->SetFillColor( 10 );
63 void CexmcHistoWidget::contextMenuEvent( QContextMenuEvent * aEvent )
72 if ( aEvent->reason() == QContextMenuEvent::Other )
75 TListIter curPrimitive( fCanvas->GetListOfPrimitives() );
76 while ( (
object = curPrimitive.Next() ) )
78 if ( ! object->InheritsFrom( TH1::Class() ) )
80 TH1 * histo( static_cast< TH1 * >(
object ) );
81 TAxis * axis( histo->GetXaxis() );
84 axis = histo->GetYaxis();
87 axis = histo->GetZaxis();