cctw  0.2.1
Functions
cctwqtmainwindow.cpp File Reference
#include "cctwqtmainwindow.h"
#include "ui_cctwqtmainwindow.h"
#include <QLineEdit>
#include <QThread>
#include <QFileDialog>
#include <QMessageBox>
#include <QCloseEvent>
#include "qwt_plot_curve.h"
#include "qwt_legend.h"
#include "qwt_plot_panner.h"
#include "qwt_plot_magnifier.h"
#include "qwt_plot_zoomer.h"
#include "qwt_symbol.h"
#include "QtConcurrentRun"
#include "cctwdatachunk.h"
Include dependency graph for cctwqtmainwindow.cpp:

Go to the source code of this file.

Functions

static herr_t iterate_objects (hid_t o_id, const char *name, const H5O_info_t *object_info, void *op_data)
 
static QStringList iterateHDF5datasets (QString path)
 

Function Documentation

static herr_t iterate_objects ( hid_t  o_id,
const char *  name,
const H5O_info_t *  object_info,
void *  op_data 
)
static

Definition at line 334 of file cctwqtmainwindow.cpp.

Referenced by iterateHDF5datasets().

338 {
339 // printf("Object: %s\n", name);
340 
341  if (object_info) {
342  switch (object_info->type) {
343  case H5O_TYPE_DATASET:
344  if (op_data) {
345  QStringList *sl = (QStringList*)(op_data);
346 
347  if (sl) {
348  sl->append(QString("/%1").arg(name));
349  }
350  }
351  break;
352  }
353  }
354  return 0;
355 }
static QStringList iterateHDF5datasets ( QString  path)
static

Definition at line 357 of file cctwqtmainwindow.cpp.

References iterate_objects().

Referenced by CctwqtMainWindow::doCheckDataFile().

358 {
359  /* Save old error handler */
360  H5E_auto2_t old_func;
361  void *old_client_data;
362 
363  H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data);
364 
365  /* Turn off error handling */
366  H5Eset_auto(H5E_DEFAULT, NULL, NULL);
367 
368  QStringList paths;
369 
370  hid_t file = H5Fopen(qPrintable(path), H5F_ACC_RDONLY, H5P_DEFAULT);
371 
372 // H5Giterate(file, "/", NULL, dataset, &paths);
373 
374 // H5Lvisit(file, H5_INDEX_NAME, H5_ITER_INC, iterate_links, &paths);
375 
376  H5Ovisit(file, H5_INDEX_NAME, H5_ITER_INC, iterate_objects, &paths);
377 
378  /* Close file */
379  herr_t ret = H5Fclose(file);
380 
381  /* Restore previous error handler */
382  H5Eset_auto(H5E_DEFAULT, old_func, old_client_data);
383 
384  return paths;
385 }
static herr_t iterate_objects(hid_t o_id, const char *name, const H5O_info_t *object_info, void *op_data)