Version: 9.12.0
testhelper.hxx File Reference
#include <QString>
#include "TreeModel.hxx"
#include "DataObject.hxx"

Go to the source code of this file.

Macros

#define DATAFILENAME   "data.txt"
 

Functions

QString TESTHELPER_testfilename (const char *basefilename)
 
DataObjectTESTHELPER_dummyObject (QString label)
 
void TESTHELPER_loadDataFromFile (TreeModel *dataTreeModel, const QString &filename)
 

Macro Definition Documentation

◆ DATAFILENAME

#define DATAFILENAME   "data.txt"

Function Documentation

◆ TESTHELPER_dummyObject()

DataObject* TESTHELPER_dummyObject ( QString  label)

This creates a dummy data object for the needs of the test functions. The label is the basename of the spécified pathname.

References QCHARSTAR, and DataObject::setLabel().

◆ TESTHELPER_loadDataFromFile()

void TESTHELPER_loadDataFromFile ( TreeModel dataTreeModel,
const QString &  filename 
)

This test function shows how it's possible to load data from a file to populate the tree model.

References TreeModel::addData(), MyDataObject::PROPERTY_KEY_CIRCUIT, MyDataObject::PROPERTY_KEY_REPFONC, MyDataObject::PROPERTY_KEY_TYPE, QCHARSTAR, QLOG, SEP, and DataObject::setProperty().

◆ TESTHELPER_testfilename()

QString TESTHELPER_testfilename ( const char *  basefilename)

References QLOG.