Changeset 12894 for fact/tools/Edd
- Timestamp:
- 02/16/12 14:44:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/Edd/Edd.cc
r11462 r12894 921 921 QTimer *Timer = new QTimer(this); 922 922 connect(Timer, SIGNAL(timeout()), this, SLOT(CheckAlarm())); 923 Timer->start(5000);923 if (QString(DimServer::getDnsNode()).contains("ethz.ch")) Timer->start(5000); 924 924 } 925 925 … … 940 940 void GUI::MenuNewHistory() { 941 941 942 QStringList List ;942 QStringList List, Index; 943 943 char *Name, *Format; 944 944 int Type; … … 954 954 // Open dialog and open history window 955 955 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); 957 957 958 958 // Check if cancelled or empty data … … 960 960 if (!OK || List.isEmpty()) return; 961 961 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())); 964 977 } 965 978
Note:
See TracChangeset
for help on using the changeset viewer.