Changeset 152 for Evidence/Edd
- Timestamp:
- 01/27/10 15:28:06 (15 years ago)
- Location:
- Evidence/Edd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Evidence/Edd/Edd.cc
r151 r152 174 174 Grid->attach(this); 175 175 Legend = new QwtLegend(); 176 Legend->setItemMode(QwtLegend::ClickableItem); 176 177 insertLegend(Legend, QwtPlot::TopLegend); 177 178 179 connect(this, SIGNAL(legendClicked (QwtPlotItem *)), SLOT(LegendClicked(QwtPlotItem *))); 180 178 181 // Connect to DIM handler 179 182 if (connect(Handler, SIGNAL(YEP(DimInfo *, int, QString, QByteArray, QString)), SLOT(Update(DimInfo *, int, QString, QByteArray, QString))) == false) { … … 409 412 } 410 413 411 //412 414 // Opening context menu 413 //414 415 void Edd_Plot::contextMenuEvent(QContextMenuEvent *Event) { 415 416 … … 417 418 } 418 419 420 // Drag&Drop method 421 void 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 419 432 void Edd_Plot::MenuZoomOut() { 420 433 … … 648 661 Graph = new Edd_Plot(); 649 662 for (int i=0; i<18; i++) { 650 Text = Text.sprintf("B IAS/VOLT/ID00/00-%.3d",i);663 Text = Text.sprintf("Bias/VOLT/ID00/00-%.3d",i); 651 664 Value = new Edd_Indicator(Text); 652 665 BiasLayout->addWidget(Value, i%9+1, 0+i/9, 1, 1); 653 666 Graph->AddService(Text); 654 667 655 Text = Text.sprintf("B IAS/VOLT/ID00/01-%.3d",i);668 Text = Text.sprintf("Bias/VOLT/ID00/01-%.3d",i); 656 669 Value = new Edd_Indicator(Text); 657 670 BiasLayout->addWidget(Value, i%9+1, 2+i/9, 1, 1); … … 660 673 661 674 BiasLayout->addWidget(Graph, 0, 4, 12, 3); 662 Value = new Edd_Indicator("B IAS/Status");675 Value = new Edd_Indicator("Bias/Status"); 663 676 Value->setMaximumWidth(200); 664 677 BiasLayout->addWidget(Value, 0, 0, 1, 3); 665 678 666 Textout = new Edd_Textout("B IAS/Textout");679 Textout = new Edd_Textout("Bias/Textout"); 667 680 Textout->setFixedWidth(400); 668 681 BiasLayout->addWidget(Textout, 10, 0, 4, 4); -
Evidence/Edd/Edd.h
r142 r152 96 96 97 97 void HandleZoom(const QwtDoubleRect &); 98 void contextMenuEvent(QContextMenuEvent *); 98 void contextMenuEvent(QContextMenuEvent *); 99 void LegendClicked(QwtPlotItem *); 99 100 void MenuZoomOut(); 100 101 void MenuSingleTrace();
Note:
See TracChangeset
for help on using the changeset viewer.