| 65 | } |
| 66 | |
| 67 | std::string QmitkFitPlotDataWidget::StreamModelToString() const |
| 68 | { |
| 69 | std::ostringstream stream; |
| 70 | stream.imbue(std::locale("C")); |
| 71 | |
| 72 | //head line |
| 73 | const auto colCount = this->m_InternalModel->columnCount(); |
| 74 | for (int col = 0; col < colCount; ++col) |
| 75 | { |
| 76 | if (col != 0) |
| 77 | { |
| 78 | stream << ","; |
| 79 | } |
| 80 | stream << SanatizeString(m_InternalModel->headerData(col, Qt::Horizontal, Qt::DisplayRole).toString().toStdString()); |
| 81 | } |
| 82 | stream << std::endl; |
| 83 | |
| 84 | //content |
| 85 | const auto rowCount = this->m_InternalModel->rowCount(); |
| 86 | for (int row = 0; row < rowCount; ++row) |
| 87 | { |
| 88 | for (int col = 0; col < colCount; ++col) |
| 89 | { |
| 90 | QModelIndex index = this->m_InternalModel->index(row, col); |
| 91 | if (col != 0) |
| 92 | { |
| 93 | stream << ","; |
| 94 | } |
| 95 | stream << SanatizeString(m_InternalModel->data(index, Qt::DisplayRole).toString().toStdString()); |
| 96 | } |
| 97 | stream << std::endl; |
| 98 | } |
| 99 | |
| 100 | return stream.str(); |
| 101 | } |
| 102 | |
| 103 | void QmitkFitPlotDataWidget::OnClipboardResultsButtonClicked() const |
| 104 | { |
no test coverage detected