Changeset 12894 for fact/tools/Edd


Ignore:
Timestamp:
02/16/12 14:44:55 (13 years ago)
Author:
ogrimm
Message:
Updated Edd for history plotting of more complex arrays
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/Edd/Edd.cc

    r11462 r12894  
    921921  QTimer *Timer = new QTimer(this);
    922922  connect(Timer, SIGNAL(timeout()), this, SLOT(CheckAlarm()));
    923   Timer->start(5000);
     923  if (QString(DimServer::getDnsNode()).contains("ethz.ch")) Timer->start(5000);
    924924
    925925   
     
    940940void GUI::MenuNewHistory() {
    941941
    942   QStringList List;
     942  QStringList List, Index;
    943943  char *Name, *Format;
    944944  int Type;
     
    954954  // Open dialog and open history window
    955955  QString Result = QInputDialog::getItem(this, "Edd Request",
    956     "Enter or choose DIM service name (add index separated by colon)", List, 0, true, &OK);
     956    "Enter or choose DIM service name (add index or index range a-b separated by colon)", List, 0, true, &OK);
    957957
    958958  // Check if cancelled or empty data
     
    960960  if (!OK || List.isEmpty()) return;
    961961
    962   if (List.size() == 1) OpenHistory(List[0].toAscii().data(), 0);
    963   else OpenHistory(List[0].toAscii().data(), atoi(List[1].toAscii().data()));
     962  // Check if index was given
     963  if (List.size() == 1) {
     964        OpenHistory(List[0].toAscii().data(), 0);
     965        return;
     966  }
     967
     968  // Single index or index range?
     969  Index = List[1].trimmed().split("-", QString::SkipEmptyParts);
     970  if (Index.isEmpty()) {
     971        QMessageBox::warning(NULL, "Edd Message", QString("Incorrect index range given") ,QMessageBox::Ok);
     972        return;
     973  }
     974
     975  if (Index.size() == 1) OpenHistory(List[0].toAscii().data(), atoi(Index[0].toAscii().data()));
     976  else OpenHistory(List[0].toAscii().data(), atoi(Index[0].toAscii().data()), atoi(Index[1].toAscii().data()));
    964977}
    965978
Note: See TracChangeset for help on using the changeset viewer.