Advertisement
Guest User

Untitled

a guest
Dec 5th, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. void Widget::on_buttonImport_clicked() {
  2.     string filename = QFileDialog::getOpenFileName().toStdString();
  3.     ifstream f;
  4.     f.open(filename.c_str());
  5.     string s;
  6.     getline(f, s);
  7.     for (int i = 0; i < ui->comboGestures->count(); i++) {
  8.         getline(f, s);
  9.         QStringList nums = QString::fromStdString(s).split(";", QString::SkipEmptyParts);
  10.         for (int j = 1; j < nums.count() - 1; j++) {
  11.             count[i][j] = nums[j].toInt();
  12.         }
  13.         failRate[i] = nums[nums.count() - 1].replace(",", ".").toDouble();
  14.     }
  15.  
  16.     f.close();
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement