Changeset 152 for Evidence/Edd


Ignore:
Timestamp:
01/27/10 15:28:06 (15 years ago)
Author:
ogrimm
Message:
Updates
Location:
Evidence/Edd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Evidence/Edd/Edd.cc

    r151 r152  
    174174  Grid->attach(this);
    175175  Legend = new QwtLegend();
     176  Legend->setItemMode(QwtLegend::ClickableItem);
    176177  insertLegend(Legend, QwtPlot::TopLegend);
    177178
     179  connect(this, SIGNAL(legendClicked (QwtPlotItem *)), SLOT(LegendClicked(QwtPlotItem *)));
     180 
    178181  // Connect to DIM handler
    179182  if (connect(Handler, SIGNAL(YEP(DimInfo *, int, QString, QByteArray, QString)), SLOT(Update(DimInfo *, int, QString, QByteArray, QString))) == false) {
     
    409412}
    410413   
    411 //
    412414// Opening context menu
    413 //
    414415void Edd_Plot::contextMenuEvent(QContextMenuEvent *Event) {
    415416
     
    417418}
    418419
     420// Drag&Drop method
     421void Edd_Plot::LegendClicked(QwtPlotItem *Item) {
     422
     423  QDrag *Drag = new QDrag(this);
     424  QMimeData *MimeData = new QMimeData;
     425  MimeData->setText(Item->title().text().remove(".hist"));
     426  Drag->setMimeData(MimeData);
     427  Drag->exec();
     428}
     429
     430
     431// Zoom completely out
    419432void Edd_Plot::MenuZoomOut() {
    420433
     
    648661  Graph = new Edd_Plot();
    649662  for (int i=0; i<18; i++) {
    650     Text = Text.sprintf("BIAS/VOLT/ID00/00-%.3d",i);
     663    Text = Text.sprintf("Bias/VOLT/ID00/00-%.3d",i);
    651664    Value = new Edd_Indicator(Text);
    652665    BiasLayout->addWidget(Value, i%9+1, 0+i/9, 1, 1);
    653666    Graph->AddService(Text);
    654667
    655     Text = Text.sprintf("BIAS/VOLT/ID00/01-%.3d",i);
     668    Text = Text.sprintf("Bias/VOLT/ID00/01-%.3d",i);
    656669    Value = new Edd_Indicator(Text);
    657670    BiasLayout->addWidget(Value, i%9+1, 2+i/9, 1, 1);
     
    660673
    661674  BiasLayout->addWidget(Graph, 0, 4, 12, 3);
    662   Value = new Edd_Indicator("BIAS/Status");
     675  Value = new Edd_Indicator("Bias/Status");
    663676  Value->setMaximumWidth(200);
    664677  BiasLayout->addWidget(Value, 0, 0, 1, 3);     
    665678
    666   Textout = new Edd_Textout("BIAS/Textout");
     679  Textout = new Edd_Textout("Bias/Textout");
    667680  Textout->setFixedWidth(400);
    668681  BiasLayout->addWidget(Textout, 10, 0, 4, 4);     
  • Evidence/Edd/Edd.h

    r142 r152  
    9696
    9797    void HandleZoom(const QwtDoubleRect &);
    98     void contextMenuEvent(QContextMenuEvent *);   
     98    void contextMenuEvent(QContextMenuEvent *);
     99        void LegendClicked(QwtPlotItem *);
    99100    void MenuZoomOut();
    100101    void MenuSingleTrace();       
Note: See TracChangeset for help on using the changeset viewer.