1 #include "QnetNewMeasureDialog.h" 
   12 #include "ControlPoint.h" 
   15 #include "SerialNumberList.h" 
   31     m_qnetTool = qnetTool;
 
   33     QLabel *listLabel = 
new QLabel(
"Select Files:");
 
   35     m_fileList = 
new QListWidget;
 
   36     m_fileList->setSelectionMode(QAbstractItemView::ExtendedSelection);
 
   39     m_okButton = 
new QPushButton(
"OK");
 
   41     QPushButton *cancelButton = 
new QPushButton(
"Cancel");
 
   42     QHBoxLayout *buttonLayout = 
new QHBoxLayout;
 
   43     buttonLayout->addWidget(m_okButton);
 
   44     buttonLayout->addWidget(cancelButton);
 
   46     connect(m_okButton, SIGNAL(clicked()), 
this, SLOT(accept()));
 
   47     connect(cancelButton, SIGNAL(clicked()), 
this, SLOT(reject()));
 
   49     QVBoxLayout *vLayout = 
new QVBoxLayout;
 
   50     vLayout->addWidget(listLabel);
 
   51     vLayout->addWidget(m_fileList);
 
   52     vLayout->addLayout(buttonLayout);
 
   55     setWindowTitle(
"Add Measures to ControlPoint");
 
   69     int bottomMostSelectedItemIndex = 0;
 
   73     for (
int i = 0; i < snList->
size(); i++) {
 
   82       QListWidgetItem *item = 
new QListWidgetItem(label);
 
   87       if (pointFiles.contains(label)) {
 
   88         m_fileList->insertItem(bottomMostSelectedItemIndex++, item);
 
   89         item->setSelected(
true);
 
   92         m_fileList->addItem(item);
 
   98   QStringList QnetNewMeasureDialog::selectedFiles()
 const {
 
  101     foreach (QListWidgetItem *fileItem, m_fileList->selectedItems()) {
 
  102       result.append(fileItem->text());
 
  109   void QnetNewMeasureDialog::enableOkButton(
const QString &text) {
 
  110     m_okButton->setEnabled(!text.isEmpty());