/home/koen/project/wt/cvs/wt/examples/charts/ChartsExample.C File Reference

#include <math.h>
#include <fstream>
#include "ChartsExample.h"
#include "ChartConfig.h"
#include "CsvUtil.h"
#include <Wt/WApplication>
#include <Wt/WDate>
#include <Wt/WEnvironment>
#include <Wt/WStandardItemModel>
#include <Wt/WText>
#include <Wt/WBorderLayout>
#include <Wt/WFitLayout>
#include <Wt/Ext/Calendar>
#include <Wt/Ext/Container>
#include <Wt/Ext/DateField>
#include <Wt/Ext/LineEdit>
#include <Wt/Ext/NumberField>
#include <Wt/Ext/Panel>
#include <Wt/Ext/TableView>
#include <Wt/Chart/WCartesianChart>
#include <Wt/Chart/WPieChart>

Go to the source code of this file.

Functions

WAbstractItemModelreadCsvFile (const char *fname, WContainerWidget *parent)


Function Documentation

WAbstractItemModel* @81::readCsvFile ( const char *  fname,
WContainerWidget parent 
) [static]

Definition at line 37 of file ChartsExample.C.

00039   {
00040     WStandardItemModel *model = new WStandardItemModel(0, 0, parent);
00041     std::ifstream f(fname);
00042     
00043     if (f) {
00044       readFromCsv(f, model);
00045       return model;
00046     } else {
00047       WString error(WString::tr("error-missing-data"));
00048       error.arg(fname, UTF8);
00049       new WText(error, parent);
00050       return 0;
00051     }
00052   }


Generated on Mon Jan 26 14:14:20 2009 for Wt by doxygen 1.5.6