Stacked Graphs
Geometry & Aesthetics
 All Classes Functions Variables Enumerations
fileloader.h
1 #ifndef FILELOADER_H
2 #define FILELOADER_H
3 
4 #define FILE_HEADER "#STACKED"
5 
6 #include <QObject>
7 #include <QTextStream>
8 #include <QFile>
9 #include <dataset.h>
10 
14 class DataLoader : public QObject
15 {
16  Q_OBJECT
17 
18 public:
23  explicit DataLoader(QObject *parent = 0);
24  ~DataLoader();
25 
35  bool LoadData(const QString& path, DataSet& dataset) const;
42  void RandomData(int numItems, DataSet& dataset) const;
43 
44 private:
45  void createRandomItemData(DataItem& item) const;
46  void setMinMaxValues(DataSet& dataset) const;
47 };
48 
49 #endif // FILELOADER_H
DataLoader(QObject *parent=0)
Default Qt-style constructor.
Definition: fileloader.cpp:8
void RandomData(int numItems, DataSet &dataset) const
Generates a random dataset of numItems layers.
Definition: fileloader.cpp:108
bool LoadData(const QString &path, DataSet &dataset) const
Loads a data set from the specified file path.
Definition: fileloader.cpp:18
The data set.
Definition: dataset.h:85
Responsible for loading data sets from file or generating random data to use.
Definition: fileloader.h:14
Represents a single layer of the stacked graph.
Definition: dataset.h:23