Brief description of class still missing. More...
#include <Schedule.h>
Public Member Functions | |
void | init (LineParser &p) |
Schedule () | |
~Schedule () | |
Static Public Member Functions | |
static ScheduleList | read (const QString &fileName) |
Public Attributes | |
QString | array |
QDateTime | end |
QString | info |
QString | site |
QDateTime | start |
Brief description of class still missing.
Full description of class still missing
void Schedule::init | ( | LineParser & | p | ) |
References array, end, info, site, start, and QGpCoreTools::LineParser::toString().
Referenced by read().
{ bool ok=true; site=p.toString(1, ok); array=p.toString(2, ok); start.setDate(QDate::fromString(p.toString(3, ok), "yyyy-MM-dd")); start.setTime(QTime::fromString(p.toString(4, ok), "hh:mm")); end.setDate(QDate::fromString(p.toString(5, ok), "yyyy-MM-dd")); end.setTime(QTime::fromString(p.toString(6, ok), "hh:mm")); info=p.toString(7, ok); }
ScheduleList Schedule::read | ( | const QString & | fileName | ) | [static] |
References QGpCoreTools::endl(), info, init(), QGpCoreTools::LineParser::setString(), and QGpCoreTools::tr().
Referenced by Process::setArguments().
{ QFile f(fileName); if(!f.open(QIODevice::ReadOnly)) { App::stream() << tr("Cannot open file %1").arg(fileName) << endl; } ScheduleList list; QTextStream s(&f); LineParser p; while(!s.atEnd()) { QString l=s.readLine(); if(l.left(1)!="#") { p.setString(l); Schedule e; e.init(p); if(e.info!="Taurus") { list.append(e); } } } return list; }
QString Schedule::array |
Referenced by init().
QDateTime Schedule::end |
Referenced by init(), and Schedule().
QString Schedule::info |
QString Schedule::site |
Referenced by init().
QDateTime Schedule::start |
Referenced by init(), and Schedule().