CMS50I session select test 6

This commit is contained in:
Mark Watkins 2014-08-19 14:19:16 +10:00
parent 5f9f6271a9
commit b95de3c947
4 changed files with 12 additions and 10 deletions

View File

@ -186,7 +186,8 @@ QString CMS50F37Loader::getUser()
QString CMS50F37Loader::getVendor()
{
vendor = QString();
if (!vendor.isEmpty()) return vendor;
sendCommand(COMMAND_GET_OXIMETER_VENDOR);
QTime time;
@ -199,7 +200,8 @@ QString CMS50F37Loader::getVendor()
QString CMS50F37Loader::getModel()
{
model = QString();
if (!model.isEmpty()) return model;
sendCommand(COMMAND_GET_OXIMETER_MODEL);
QTime time;

View File

@ -254,16 +254,16 @@ void OximeterImport::on_directImportButton_clicked()
ui->tableOxiSessions->setItem(i, 1, item);
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
item = new QTableWidgetItem(tr("%1 Session #%2").arg(oximodule->loaderName()).arg(i+1, 0));
item = new QTableWidgetItem(tr("%1 Session #%2").arg(oximodule->getModel()).arg(i+1, 0));
ui->tableOxiSessions->setItem(i, 2, item);
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
}
selecting_session = true;
ui->tableOxiSessions->selectRow(chosen_session = 0);
ui->tableOxiSessions->selectRow(0);
return;
} else {
chosen_session = 0;
chosen_sessions.push_back(0);
oximodule->getDuration(0);
oximodule->setStartTime(oximodule->getDateTime(0));
}
@ -284,7 +284,8 @@ void OximeterImport::doImport()
oximodule->Open("import");
if (oximodule->commandDriven()) {
oximodule->getSessionData(chosen_session);
int chosen=chosen_sessions.takeFirst();
oximodule->getSessionData(chosen);
}
// Wait to start import streaming..
@ -990,7 +991,7 @@ void OximeterImport::on_chooseSessionButton_clicked()
if (selecting_session) {
ui->stackedWidget->setCurrentWidget(ui->directImportPage);
chosen_session = item->data(Qt::UserRole).toInt();
chosen_sessions.push_back(item->data(Qt::UserRole).toInt());
// go back and start import
doImport();

View File

@ -106,8 +106,7 @@ private:
int spo2;
bool selecting_session;
int chosen_session;
QList<int> chosen_sessions;
};
#endif // OXIMETERIMPORT_H

View File

@ -1349,7 +1349,7 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</attribute>
<column>
<property name="text">
<string>Import Time</string>
<string>Start Time</string>
</property>
</column>
<column>