14 m_Mutex(QMutex::Recursive),
15 m_ScanDateTime(QDateTime::currentDateTime()),
56 for (
int i = sz-1; i>=n; i--) {
79 for (
int i=0; i<nc; i++) {
106 if ((0 <= n) && (n <
m_Columns.size())) {
119 if (column && (column->
name()==nm)) {
129 const char *ptr = nms + 3;
130 const char *found, *next;
135 for (col = 0; ptr; col++) {
136 while ((*ptr)==
'\t' || (*ptr)==
' ') {
140 found = strstr(ptr,
" ");
150 qstrncpy(nam, ptr, found-ptr+1);
177 foreach (hdrline, hdr) {
181 nocont = !
m_Header.contains(hdrline);
196 for (
int col = 0; ptr; col++) {
198 val = strtod(ptr, &next);
254 res -> assignment(proto);
257 res -> assignment(0.0);
265 FILE *f = fopen(qPrintable(name),
"w");
275 for (
int i = 0; i < hsz; i++) {
277 fputs(qPrintable(
m_Header[i]+
"\n"), f);
282 for (
int i = 0; i < nc; i++) {
285 fprintf(f,
"\t%s", qPrintable(c->
name()));
291 for (
int r = 0; r<nr; r++) {
294 for (
int i = 0; i < nc; i++) {
297 fprintf(f,
"\t%0.12g", c->
data(r));
342 for (
int i=0; i<ncols; i++) {
void setColumnCount(int n)
const double * data() const
QStringList header() const
void setScanNumber(int n)
QseColumn * appendColumn(const QString &name, const QseColumn *proto=NULL)
void mergeHeaders(const QStringList &hdr)
QDateTime scanDateTime() const
void writeScan(const QString &name)
void setScanCommand(const QString &cmd)
QseScan(const char *name)
void setScanDateTime(const QDateTime &datetime)
QString scanDateLine() const
void setColumnNames(const char *nms)
QString scanCommand() const
QString scanColumnNamesLine() const
void setName(QString name)
QHash< QString, QseColumn * > m_ColumnsDictionary
void appendHeader(const QString &h)
void appendData(const char *l)
QseColumn * column(int n) const
QString scanColumnCountLine() const
QList< QseColumn * > m_Columns