*/
#include "integrationtablemodel.h"
+#include <QtCore/QLocale>
IntegrationTableModel::IntegrationTableModel(const std::shared_ptr<Integrator> integrator, QObject* parent) :
QAbstractTableModel(parent),
QVariant IntegrationTableModel::data(const QModelIndex& index, int role) const
{
+ QLocale l = QLocale::system();
+
if (index.row() >= m_integrator->peakCount())
return QVariant();
case Qt::DisplayRole:
switch (index.column()) {
case 0:
- return peak->peakTime();
- //return QString::number(peak->peakTime(), 'f', 4);
+ return l.toString(peak->peakTime(), 'f', 4);
case 1:
- return QString::number(peak->auc(), 'f', 4);
+ return l.toString(peak->auc(), 'f', 4);
case 2:
- return QString::number(peak->height(), 'f', 4);
+ return l.toString(peak->height(), 'f', 4);
case 3:
- return QString::number(peak->width(), 'f', 4);
+ return l.toString(peak->width(), 'f', 4);
default:
return QVariant();
}