Guest
Public paste!

Untitled

By: a guest | Mar 16th, 2010 | Syntax: C++ | Size: 0.94 KB | Hits: 53 | Expires: Never
Copy text to clipboard
  1. locations = locationLibrary->getLocations();
  2.  
  3.     fromComboBox->clear();
  4.     toComboBox->clear();
  5.  
  6.     fromComboBox->insertItem(QComboBox::InsertAtBottom, "");
  7.     toComboBox->insertItem(QComboBox::InsertAtBottom, "");
  8.  
  9.     fromComboBox->insertItem(QComboBox::InsertAtBottom, tr("New..."));
  10.     toComboBox->insertItem(QComboBox::InsertAtBottom, tr("New..."));
  11.  
  12.     if (temporaryFromLocationSet) {
  13.         fromComboBox->insertItem(QComboBox::InsertAtBottom, temporaryFromLocation);
  14.     }
  15.     if (temporaryToLocationSet) {
  16.         toComboBox->insertItem(QComboBox::InsertAtBottom, temporaryToLocation);
  17.     }
  18.  
  19.     fromComboBox->insertItem(QComboBox::InsertAtBottom, tr("GPS"));
  20.  
  21.     for (QVector<reittiopas::Loc>::const_iterator iter = locations.begin(); iter != locations.end(); iter++) {
  22.         fromComboBox->insertItem(QComboBox::InsertAtBottom, iter->name1);
  23.         toComboBox->insertItem(QComboBox::InsertAtBottom, iter->name1);
  24.     }